cola Report for GDS5393

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

The call of run_all_consensus_partition_methods() was:

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

Dimension of the input matrix:

mat = get_matrix(res_list)
dim(mat)
#> [1] 44956   120

Density distribution

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

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

plot of chunk density-heatmap

Suggest the best k

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

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

suggest_best_k(res_list)
The best k 1-PAC Mean silhouette Concordance Optional k
MAD:kmeans 2 1.000 0.970 0.987 **
ATC:kmeans 3 1.000 0.998 0.999 ** 2
ATC:skmeans 3 1.000 0.984 0.993 ** 2
MAD:skmeans 2 0.915 0.947 0.977 *
ATC:pam 6 0.915 0.851 0.931 * 2,3
MAD:NMF 2 0.914 0.939 0.973 *
ATC:NMF 2 0.899 0.947 0.977
MAD:pam 2 0.898 0.913 0.965
CV:pam 2 0.897 0.896 0.962
CV:skmeans 2 0.884 0.921 0.968
CV:NMF 2 0.882 0.923 0.968
SD:pam 2 0.881 0.921 0.966
CV:kmeans 2 0.868 0.936 0.972
SD:NMF 2 0.867 0.921 0.967
SD:kmeans 2 0.854 0.939 0.973
SD:skmeans 2 0.853 0.929 0.968
SD:mclust 5 0.796 0.836 0.882
ATC:mclust 5 0.766 0.745 0.827
MAD:mclust 4 0.764 0.843 0.877
CV:mclust 5 0.751 0.791 0.871
MAD:hclust 2 0.618 0.832 0.920
ATC:hclust 3 0.567 0.792 0.885
CV:hclust 2 0.553 0.820 0.909
SD:hclust 2 0.535 0.813 0.908

**: 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.867           0.921       0.967          0.496 0.505   0.505
#> CV:NMF      2 0.882           0.923       0.968          0.495 0.507   0.507
#> MAD:NMF     2 0.914           0.939       0.973          0.495 0.510   0.510
#> ATC:NMF     2 0.899           0.947       0.977          0.453 0.546   0.546
#> SD:skmeans  2 0.853           0.929       0.968          0.499 0.503   0.503
#> CV:skmeans  2 0.884           0.921       0.968          0.500 0.501   0.501
#> MAD:skmeans 2 0.915           0.947       0.977          0.499 0.503   0.503
#> ATC:skmeans 2 1.000           0.980       0.993          0.499 0.503   0.503
#> SD:mclust   2 0.357           0.490       0.762          0.353 0.541   0.541
#> CV:mclust   2 0.346           0.815       0.801          0.375 0.532   0.532
#> MAD:mclust  2 0.471           0.754       0.700          0.333 0.507   0.507
#> ATC:mclust  2 0.499           0.934       0.888          0.409 0.552   0.552
#> SD:kmeans   2 0.854           0.939       0.973          0.490 0.513   0.513
#> CV:kmeans   2 0.868           0.936       0.972          0.489 0.513   0.513
#> MAD:kmeans  2 1.000           0.970       0.987          0.488 0.513   0.513
#> ATC:kmeans  2 0.982           0.963       0.985          0.471 0.532   0.532
#> SD:pam      2 0.881           0.921       0.966          0.478 0.513   0.513
#> CV:pam      2 0.897           0.896       0.962          0.473 0.523   0.523
#> MAD:pam     2 0.898           0.913       0.965          0.478 0.510   0.510
#> ATC:pam     2 1.000           0.974       0.989          0.501 0.501   0.501
#> SD:hclust   2 0.535           0.813       0.908          0.475 0.516   0.516
#> CV:hclust   2 0.553           0.820       0.909          0.465 0.519   0.519
#> MAD:hclust  2 0.618           0.832       0.920          0.469 0.541   0.541
#> ATC:hclust  2 0.524           0.860       0.919          0.436 0.583   0.583
get_stats(res_list, k = 3)
#>             k 1-PAC mean_silhouette concordance area_increased  Rand Jaccard
#> SD:NMF      3 0.509           0.529       0.749          0.307 0.804   0.622
#> CV:NMF      3 0.511           0.482       0.672          0.303 0.816   0.654
#> MAD:NMF     3 0.543           0.629       0.810          0.309 0.788   0.603
#> ATC:NMF     3 0.727           0.837       0.902          0.436 0.744   0.549
#> SD:skmeans  3 0.663           0.798       0.883          0.315 0.815   0.641
#> CV:skmeans  3 0.703           0.798       0.889          0.311 0.792   0.603
#> MAD:skmeans 3 0.790           0.887       0.937          0.317 0.815   0.641
#> ATC:skmeans 3 1.000           0.984       0.993          0.220 0.872   0.750
#> SD:mclust   3 0.495           0.642       0.793          0.687 0.569   0.379
#> CV:mclust   3 0.542           0.788       0.846          0.570 0.763   0.605
#> MAD:mclust  3 0.586           0.717       0.843          0.791 0.716   0.539
#> ATC:mclust  3 0.608           0.636       0.799          0.496 0.736   0.539
#> SD:kmeans   3 0.573           0.701       0.829          0.342 0.738   0.526
#> CV:kmeans   3 0.548           0.633       0.795          0.339 0.775   0.585
#> MAD:kmeans  3 0.574           0.674       0.810          0.346 0.736   0.525
#> ATC:kmeans  3 1.000           0.998       0.999          0.411 0.703   0.489
#> SD:pam      3 0.557           0.733       0.853          0.318 0.818   0.664
#> CV:pam      3 0.703           0.822       0.921          0.311 0.811   0.655
#> MAD:pam     3 0.563           0.599       0.790          0.333 0.835   0.690
#> ATC:pam     3 1.000           0.965       0.986          0.316 0.690   0.460
#> SD:hclust   3 0.419           0.618       0.773          0.305 0.843   0.700
#> CV:hclust   3 0.453           0.627       0.800          0.348 0.839   0.696
#> MAD:hclust  3 0.506           0.429       0.717          0.351 0.921   0.858
#> ATC:hclust  3 0.567           0.792       0.885          0.492 0.727   0.540
get_stats(res_list, k = 4)
#>             k 1-PAC mean_silhouette concordance area_increased  Rand Jaccard
#> SD:NMF      4 0.703           0.755       0.886          0.105 0.760   0.442
#> CV:NMF      4 0.698           0.764       0.887          0.106 0.748   0.448
#> MAD:NMF     4 0.753           0.773       0.899          0.100 0.873   0.665
#> ATC:NMF     4 0.590           0.567       0.788          0.107 0.847   0.588
#> SD:skmeans  4 0.761           0.815       0.899          0.115 0.865   0.640
#> CV:skmeans  4 0.710           0.729       0.873          0.114 0.863   0.633
#> MAD:skmeans 4 0.743           0.802       0.880          0.107 0.887   0.692
#> ATC:skmeans 4 0.868           0.869       0.940          0.115 0.944   0.857
#> SD:mclust   4 0.601           0.647       0.828          0.192 0.792   0.532
#> CV:mclust   4 0.495           0.662       0.771          0.171 0.841   0.651
#> MAD:mclust  4 0.764           0.843       0.877          0.179 0.812   0.599
#> ATC:mclust  4 0.598           0.765       0.816          0.158 0.889   0.693
#> SD:kmeans   4 0.540           0.395       0.632          0.120 0.802   0.526
#> CV:kmeans   4 0.516           0.509       0.681          0.122 0.815   0.534
#> MAD:kmeans  4 0.551           0.550       0.733          0.125 0.909   0.741
#> ATC:kmeans  4 0.697           0.614       0.759          0.107 0.885   0.675
#> SD:pam      4 0.657           0.740       0.855          0.166 0.826   0.571
#> CV:pam      4 0.628           0.715       0.812          0.161 0.834   0.586
#> MAD:pam     4 0.687           0.758       0.852          0.149 0.810   0.546
#> ATC:pam     4 0.828           0.777       0.867          0.101 0.907   0.737
#> SD:hclust   4 0.441           0.526       0.718          0.115 0.932   0.818
#> CV:hclust   4 0.505           0.554       0.768          0.105 0.882   0.699
#> MAD:hclust  4 0.477           0.472       0.648          0.116 0.739   0.496
#> ATC:hclust  4 0.617           0.669       0.800          0.113 0.929   0.788
get_stats(res_list, k = 5)
#>             k 1-PAC mean_silhouette concordance area_increased  Rand Jaccard
#> SD:NMF      5 0.601           0.581       0.775         0.0840 0.852   0.551
#> CV:NMF      5 0.646           0.704       0.828         0.0813 0.845   0.540
#> MAD:NMF     5 0.600           0.596       0.779         0.0869 0.835   0.516
#> ATC:NMF     5 0.670           0.701       0.827         0.0729 0.818   0.458
#> SD:skmeans  5 0.721           0.646       0.797         0.0686 0.906   0.681
#> CV:skmeans  5 0.737           0.714       0.831         0.0701 0.904   0.677
#> MAD:skmeans 5 0.710           0.660       0.797         0.0747 0.905   0.684
#> ATC:skmeans 5 0.855           0.836       0.896         0.0650 0.905   0.722
#> SD:mclust   5 0.796           0.836       0.882         0.0641 0.943   0.802
#> CV:mclust   5 0.751           0.791       0.871         0.1040 0.871   0.629
#> MAD:mclust  5 0.779           0.831       0.898         0.0652 0.890   0.668
#> ATC:mclust  5 0.766           0.745       0.827         0.0847 0.895   0.660
#> SD:kmeans   5 0.624           0.467       0.632         0.0720 0.800   0.448
#> CV:kmeans   5 0.622           0.577       0.716         0.0739 0.836   0.480
#> MAD:kmeans  5 0.614           0.487       0.684         0.0704 0.829   0.479
#> ATC:kmeans  5 0.727           0.639       0.793         0.0690 0.858   0.530
#> SD:pam      5 0.637           0.576       0.770         0.0673 0.887   0.604
#> CV:pam      5 0.674           0.711       0.803         0.0801 0.925   0.724
#> MAD:pam     5 0.629           0.534       0.744         0.0788 0.898   0.638
#> ATC:pam     5 0.861           0.834       0.926         0.0727 0.909   0.691
#> SD:hclust   5 0.543           0.489       0.703         0.0929 0.927   0.772
#> CV:hclust   5 0.539           0.494       0.706         0.0965 0.854   0.558
#> MAD:hclust  5 0.569           0.471       0.707         0.0891 0.850   0.544
#> ATC:hclust  5 0.677           0.631       0.774         0.0692 0.896   0.651
get_stats(res_list, k = 6)
#>             k 1-PAC mean_silhouette concordance area_increased  Rand Jaccard
#> SD:NMF      6 0.554           0.355       0.596         0.0486 0.879   0.538
#> CV:NMF      6 0.564           0.400       0.651         0.0536 0.926   0.712
#> MAD:NMF     6 0.561           0.411       0.656         0.0503 0.881   0.563
#> ATC:NMF     6 0.661           0.579       0.768         0.0296 0.939   0.760
#> SD:skmeans  6 0.756           0.755       0.853         0.0484 0.882   0.547
#> CV:skmeans  6 0.797           0.775       0.874         0.0501 0.922   0.684
#> MAD:skmeans 6 0.778           0.750       0.858         0.0506 0.897   0.599
#> ATC:skmeans 6 0.835           0.832       0.912         0.0439 0.974   0.900
#> SD:mclust   6 0.717           0.658       0.788         0.0584 0.874   0.551
#> CV:mclust   6 0.727           0.532       0.752         0.0462 0.854   0.491
#> MAD:mclust  6 0.744           0.688       0.830         0.0752 0.870   0.535
#> ATC:mclust  6 0.867           0.865       0.924         0.0603 0.910   0.642
#> SD:kmeans   6 0.713           0.650       0.745         0.0454 0.897   0.582
#> CV:kmeans   6 0.713           0.663       0.755         0.0449 0.943   0.740
#> MAD:kmeans  6 0.701           0.586       0.760         0.0450 0.905   0.596
#> ATC:kmeans  6 0.738           0.633       0.769         0.0419 0.903   0.587
#> SD:pam      6 0.714           0.634       0.816         0.0504 0.936   0.711
#> CV:pam      6 0.715           0.692       0.779         0.0537 0.913   0.637
#> MAD:pam     6 0.762           0.669       0.817         0.0431 0.873   0.499
#> ATC:pam     6 0.915           0.851       0.931         0.0702 0.915   0.639
#> SD:hclust   6 0.600           0.465       0.662         0.0500 0.877   0.574
#> CV:hclust   6 0.626           0.481       0.714         0.0528 0.887   0.581
#> MAD:hclust  6 0.628           0.498       0.685         0.0424 0.932   0.722
#> ATC:hclust  6 0.730           0.602       0.779         0.0561 0.876   0.528

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) other(p) time(p) individual(p) k
#> SD:NMF      117    0.861    0.468   0.650       0.00544 2
#> CV:NMF      117    0.861    0.468   0.650       0.00544 2
#> MAD:NMF     117    0.861    0.468   0.650       0.00814 2
#> ATC:NMF     119    0.575    0.800   0.651       0.05842 2
#> SD:skmeans  117    0.820    0.673   0.788       0.01108 2
#> CV:skmeans  115    1.000    0.739   0.495       0.01084 2
#> MAD:skmeans 117    0.983    0.673   0.634       0.01610 2
#> ATC:skmeans 118    0.940    0.714   0.267       0.01912 2
#> SD:mclust    87    0.935    0.246   1.000       0.02902 2
#> CV:mclust   119    1.000    0.386   0.795       0.00708 2
#> MAD:mclust  104    0.951    0.277   0.808       0.02051 2
#> ATC:mclust  119    0.366    1.000   0.795       0.02087 2
#> SD:kmeans   117    0.896    0.407   0.791       0.00562 2
#> CV:kmeans   116    0.992    0.373   0.705       0.00698 2
#> MAD:kmeans  119    1.000    0.363   0.793       0.00587 2
#> ATC:kmeans  117    0.894    0.539   0.486       0.02305 2
#> SD:pam      115    1.000    0.426   0.648       0.01338 2
#> CV:pam      113    0.911    0.517   0.645       0.01384 2
#> MAD:pam     114    1.000    0.450   0.593       0.01073 2
#> ATC:pam     118    0.804    0.789   0.196       0.01875 2
#> SD:hclust   112    0.879    0.687   1.000       0.00227 2
#> CV:hclust   110    1.000    0.597   1.000       0.00159 2
#> MAD:hclust  110    0.871    0.395   1.000       0.00237 2
#> ATC:hclust  113    0.158    1.000   1.000       0.03397 2
test_to_known_factors(res_list, k = 3)
#>               n agent(p) other(p) time(p) individual(p) k
#> SD:NMF       78   0.6435 0.612611  0.1696      1.66e-02 3
#> CV:NMF       79   0.8419 1.000000  1.0000      4.61e-02 3
#> MAD:NMF     102   0.9209 0.588823  0.3497      1.05e-02 3
#> ATC:NMF     117   0.8681 0.715360  0.4275      2.13e-02 3
#> SD:skmeans  113   0.9067 0.456037  0.1802      9.39e-04 3
#> CV:skmeans  114   0.9227 0.533850  0.1169      1.78e-03 3
#> MAD:skmeans 119   0.8418 0.524018  0.2415      1.56e-03 3
#> ATC:skmeans 119   0.7137 0.427559  0.1321      4.84e-02 3
#> SD:mclust   103   0.3177 0.587827  0.6944      1.33e-02 3
#> CV:mclust   116   0.1483 0.866552  0.9411      7.97e-03 3
#> MAD:mclust  104   0.2761 0.595553  0.6285      1.44e-02 3
#> ATC:mclust   84   0.5037 0.815731  0.4919      4.79e-02 3
#> SD:kmeans   107   0.7065 0.788028  0.6377      4.74e-03 3
#> CV:kmeans    91   0.1788 0.409088  0.9963      7.66e-03 3
#> MAD:kmeans  104   0.6407 0.839454  0.6226      7.61e-03 3
#> ATC:kmeans  120   0.2605 0.998819  0.0571      2.32e-02 3
#> SD:pam      107   0.0881 0.001134  0.9913      3.27e-03 3
#> CV:pam      112   0.0897 0.000928  0.9708      5.53e-03 3
#> MAD:pam      89   0.2614 0.760048  0.7639      4.25e-02 3
#> ATC:pam     118   0.1528 0.925174  0.0403      2.69e-02 3
#> SD:hclust    98   0.5025 0.432299  0.8792      2.44e-04 3
#> CV:hclust    94   0.7404 0.187313  0.9768      9.02e-06 3
#> MAD:hclust   38       NA       NA      NA            NA 3
#> ATC:hclust  115   0.2921 0.881812  0.2218      1.40e-02 3
test_to_known_factors(res_list, k = 4)
#>               n agent(p) other(p) time(p) individual(p) k
#> SD:NMF      104   0.0845  0.28835  0.1623      1.01e-02 4
#> CV:NMF      107   0.1579  0.19337  0.1647      1.60e-02 4
#> MAD:NMF     104   0.1214  0.42601  0.1154      2.85e-02 4
#> ATC:NMF      86   0.1917  0.81502  0.7263      1.92e-02 4
#> SD:skmeans  112   0.2472  0.70668  0.4778      1.35e-02 4
#> CV:skmeans   96   0.2489  0.48482  0.4673      1.51e-02 4
#> MAD:skmeans 113   0.2904  0.66138  0.6935      5.87e-03 4
#> ATC:skmeans 116   0.3050  0.76007  0.2277      5.55e-02 4
#> SD:mclust    89   0.6028  0.62753  0.6393      2.12e-02 4
#> CV:mclust    98   0.5858  0.76880  0.3742      3.80e-02 4
#> MAD:mclust  116   0.8379  0.88134  0.4963      1.82e-02 4
#> ATC:mclust  115   0.3052  0.98681  0.2473      7.91e-02 4
#> SD:kmeans    47   0.5338  0.58483  0.8032      5.41e-02 4
#> CV:kmeans    85   0.0509  0.94040  0.9883      2.75e-02 4
#> MAD:kmeans   82   0.1195  0.94486  0.9564      4.43e-02 4
#> ATC:kmeans   85   0.0241  0.27191  0.2987      2.39e-02 4
#> SD:pam      103   0.1068  0.00110  0.7946      1.19e-04 4
#> CV:pam       96   0.1319  0.00402  0.5807      5.52e-04 4
#> MAD:pam     104   0.2579  0.01048  0.8846      3.01e-04 4
#> ATC:pam     113   0.3495  0.85584  0.0759      6.39e-02 4
#> SD:hclust    81   0.2123  0.05834  0.9777      1.34e-05 4
#> CV:hclust    77   0.1357  0.03494  0.9837      3.20e-06 4
#> MAD:hclust   73   0.2185  0.09097  0.9578      5.00e-05 4
#> ATC:hclust   96   0.0124  0.15165  0.5087      8.55e-03 4
test_to_known_factors(res_list, k = 5)
#>               n agent(p) other(p) time(p) individual(p) k
#> SD:NMF       88  0.29191  0.00571  0.1207      7.89e-03 5
#> CV:NMF      107  0.08934  0.00871  0.0579      5.54e-03 5
#> MAD:NMF      92  0.14574  0.00182  0.1040      2.43e-02 5
#> ATC:NMF     101  0.78108  0.96643  0.5633      1.80e-03 5
#> SD:skmeans  102  0.22972  0.88590  0.6097      1.51e-02 5
#> CV:skmeans  106  0.23119  0.81010  0.4713      3.98e-03 5
#> MAD:skmeans 102  0.14244  0.82122  0.7047      1.10e-02 5
#> ATC:skmeans 112  0.46351  0.98368  0.3517      2.85e-02 5
#> SD:mclust   116  0.56204  0.75771  0.5881      2.64e-03 5
#> CV:mclust   114  0.55636  0.80200  0.6174      3.23e-03 5
#> MAD:mclust  115  0.58197  0.83634  0.5035      6.28e-03 5
#> ATC:mclust  111  0.63393  0.11788  0.3202      2.20e-02 5
#> SD:kmeans    65  0.44375  0.48182  0.6770      7.81e-02 5
#> CV:kmeans    87  0.00942  0.27410  0.3772      1.28e-02 5
#> MAD:kmeans   64  0.84896  0.53563  0.8225      4.49e-02 5
#> ATC:kmeans   86  0.15380  0.11775  0.3891      1.24e-02 5
#> SD:pam       70  0.12139  0.13551  0.9735      2.15e-03 5
#> CV:pam      107  0.17695  0.16046  0.9438      4.25e-05 5
#> MAD:pam      71  0.18845  0.91734  0.9759      2.43e-03 5
#> ATC:pam     111  0.67769  0.28323  0.3202      6.12e-02 5
#> SD:hclust    64  0.08186  0.50098  0.9700      4.52e-05 5
#> CV:hclust    67  0.15349  0.00442  0.9868      1.81e-04 5
#> MAD:hclust   60  0.45969  0.05365  0.9963      2.53e-04 5
#> ATC:hclust   82  0.53405  0.21961  0.8193      2.86e-01 5
test_to_known_factors(res_list, k = 6)
#>               n agent(p) other(p) time(p) individual(p) k
#> SD:NMF       40   0.2531 0.221499   0.524      2.18e-02 6
#> CV:NMF       52   0.2010 0.104303   0.508      5.30e-02 6
#> MAD:NMF      56   0.3455 0.654554   0.553      1.00e-01 6
#> ATC:NMF      77   0.6646 0.574145   0.157      2.01e-02 6
#> SD:skmeans  112   0.2346 0.000337   0.744      3.29e-05 6
#> CV:skmeans  110   0.2615 0.000370   0.524      9.72e-06 6
#> MAD:skmeans 106   0.2589 0.000200   0.797      2.39e-05 6
#> ATC:skmeans 109   0.2072 0.460282   0.075      1.01e-02 6
#> SD:mclust    96   0.6625 0.161663   0.709      1.77e-02 6
#> CV:mclust    84   0.5937 0.199636   0.778      2.46e-02 6
#> MAD:mclust   95   0.5042 0.093203   0.673      5.75e-03 6
#> ATC:mclust  117   0.4170 0.034356   0.527      3.72e-02 6
#> SD:kmeans    98   0.7187 0.000299   0.762      1.20e-03 6
#> CV:kmeans   105   0.5384 0.000411   0.577      1.56e-03 6
#> MAD:kmeans   87   0.8795 0.000436   0.789      2.79e-03 6
#> ATC:kmeans   94   0.5150 0.085205   0.643      3.80e-02 6
#> SD:pam      100   0.0190 0.579144   0.800      3.14e-06 6
#> CV:pam      101   0.0444 0.631253   0.674      3.95e-06 6
#> MAD:pam      95   0.0664 0.002323   0.303      8.05e-06 6
#> ATC:pam     110   0.3355 0.351066   0.312      5.02e-03 6
#> SD:hclust    72   0.1442 0.033717   0.998      2.24e-06 6
#> CV:hclust    77   0.2235 0.005293   0.999      9.91e-07 6
#> MAD:hclust   70   0.0741 0.017137   0.988      4.50e-05 6
#> ATC:hclust   77   0.0958 0.062051   0.500      1.70e-02 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 44956 rows and 120 columns.
#>   Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'SD' method.
#>   Subgroups are detected by 'hclust' method.
#>   Performed in total 1250 partitions by row resampling.
#>   Best k for subgroups seems to be 2.
#> 
#> Following methods can be applied to this 'ConsensusPartition' object:
#>  [1] "cola_report"             "collect_classes"         "collect_plots"          
#>  [4] "collect_stats"           "colnames"                "compare_signatures"     
#>  [7] "consensus_heatmap"       "dimension_reduction"     "functional_enrichment"  
#> [10] "get_anno_col"            "get_anno"                "get_classes"            
#> [13] "get_consensus"           "get_matrix"              "get_membership"         
#> [16] "get_param"               "get_signatures"          "get_stats"              
#> [19] "is_best_k"               "is_stable_k"             "membership_heatmap"     
#> [22] "ncol"                    "nrow"                    "plot_ecdf"              
#> [25] "rownames"                "select_partition_number" "show"                   
#> [28] "suggest_best_k"          "test_to_known_factors"

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

collect_plots(res)

plot of chunk SD-hclust-collect-plots

The plots are:

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

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

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

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

select_partition_number(res)

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

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

get_stats(res)
#>   k 1-PAC mean_silhouette concordance area_increased  Rand Jaccard
#> 2 2 0.535           0.813       0.908         0.4750 0.516   0.516
#> 3 3 0.419           0.618       0.773         0.3053 0.843   0.700
#> 4 4 0.441           0.526       0.718         0.1153 0.932   0.818
#> 5 5 0.543           0.489       0.703         0.0929 0.927   0.772
#> 6 6 0.600           0.465       0.662         0.0500 0.877   0.574

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
#> GSM1105438     2  0.0000      0.894 0.000 1.000
#> GSM1105486     2  0.1184      0.894 0.016 0.984
#> GSM1105487     1  0.0376      0.894 0.996 0.004
#> GSM1105490     2  0.2778      0.884 0.048 0.952
#> GSM1105491     1  0.8608      0.618 0.716 0.284
#> GSM1105495     2  0.3733      0.871 0.072 0.928
#> GSM1105498     2  0.9393      0.519 0.356 0.644
#> GSM1105499     1  0.0000      0.893 1.000 0.000
#> GSM1105506     2  0.8909      0.592 0.308 0.692
#> GSM1105442     2  0.1414      0.894 0.020 0.980
#> GSM1105511     2  0.2778      0.884 0.048 0.952
#> GSM1105514     2  0.0000      0.894 0.000 1.000
#> GSM1105518     2  0.6048      0.818 0.148 0.852
#> GSM1105522     1  0.0000      0.893 1.000 0.000
#> GSM1105534     1  0.0000      0.893 1.000 0.000
#> GSM1105535     1  0.0000      0.893 1.000 0.000
#> GSM1105538     1  0.7219      0.764 0.800 0.200
#> GSM1105542     2  0.1414      0.894 0.020 0.980
#> GSM1105443     2  0.0672      0.896 0.008 0.992
#> GSM1105551     1  0.6438      0.797 0.836 0.164
#> GSM1105554     1  0.0000      0.893 1.000 0.000
#> GSM1105555     1  0.0376      0.894 0.996 0.004
#> GSM1105447     2  0.0672      0.896 0.008 0.992
#> GSM1105467     2  0.1414      0.894 0.020 0.980
#> GSM1105470     2  0.0000      0.894 0.000 1.000
#> GSM1105471     2  0.3431      0.876 0.064 0.936
#> GSM1105474     2  0.0000      0.894 0.000 1.000
#> GSM1105475     2  0.1414      0.894 0.020 0.980
#> GSM1105440     1  0.0000      0.893 1.000 0.000
#> GSM1105488     2  0.1414      0.894 0.020 0.980
#> GSM1105489     1  0.0376      0.894 0.996 0.004
#> GSM1105492     1  0.0000      0.893 1.000 0.000
#> GSM1105493     1  0.5178      0.845 0.884 0.116
#> GSM1105497     2  0.4298      0.863 0.088 0.912
#> GSM1105500     2  0.9393      0.519 0.356 0.644
#> GSM1105501     2  0.5629      0.831 0.132 0.868
#> GSM1105508     1  0.9686      0.360 0.604 0.396
#> GSM1105444     2  0.0000      0.894 0.000 1.000
#> GSM1105513     2  0.2778      0.884 0.048 0.952
#> GSM1105516     2  0.9850      0.255 0.428 0.572
#> GSM1105520     2  0.6048      0.818 0.148 0.852
#> GSM1105524     1  0.0000      0.893 1.000 0.000
#> GSM1105536     2  0.6343      0.798 0.160 0.840
#> GSM1105537     1  0.0000      0.893 1.000 0.000
#> GSM1105540     1  0.7219      0.764 0.800 0.200
#> GSM1105544     2  0.9522      0.479 0.372 0.628
#> GSM1105445     2  0.0672      0.896 0.008 0.992
#> GSM1105553     1  0.6438      0.797 0.836 0.164
#> GSM1105556     1  0.0000      0.893 1.000 0.000
#> GSM1105557     2  0.2778      0.884 0.048 0.952
#> GSM1105449     2  0.0672      0.896 0.008 0.992
#> GSM1105469     2  0.9491      0.479 0.368 0.632
#> GSM1105472     2  0.0000      0.894 0.000 1.000
#> GSM1105473     1  0.6048      0.820 0.852 0.148
#> GSM1105476     2  0.0000      0.894 0.000 1.000
#> GSM1105477     2  0.1414      0.894 0.020 0.980
#> GSM1105478     2  0.8608      0.637 0.284 0.716
#> GSM1105510     2  0.1414      0.894 0.020 0.980
#> GSM1105530     1  0.1414      0.894 0.980 0.020
#> GSM1105539     1  0.1184      0.894 0.984 0.016
#> GSM1105480     2  0.8608      0.637 0.284 0.716
#> GSM1105512     1  0.0000      0.893 1.000 0.000
#> GSM1105532     1  0.1414      0.894 0.980 0.020
#> GSM1105541     1  0.1184      0.894 0.984 0.016
#> GSM1105439     2  0.0376      0.895 0.004 0.996
#> GSM1105463     1  0.1633      0.893 0.976 0.024
#> GSM1105482     1  0.0376      0.894 0.996 0.004
#> GSM1105483     2  0.9491      0.479 0.368 0.632
#> GSM1105494     2  0.9393      0.519 0.356 0.644
#> GSM1105503     2  0.7139      0.775 0.196 0.804
#> GSM1105507     1  0.8016      0.701 0.756 0.244
#> GSM1105446     2  0.1184      0.895 0.016 0.984
#> GSM1105519     1  0.3733      0.874 0.928 0.072
#> GSM1105526     2  0.0000      0.894 0.000 1.000
#> GSM1105527     2  0.9491      0.479 0.368 0.632
#> GSM1105531     1  0.3879      0.873 0.924 0.076
#> GSM1105543     2  0.0000      0.894 0.000 1.000
#> GSM1105546     1  0.0376      0.894 0.996 0.004
#> GSM1105547     1  0.2778      0.883 0.952 0.048
#> GSM1105455     2  0.0376      0.895 0.004 0.996
#> GSM1105458     2  0.0672      0.896 0.008 0.992
#> GSM1105459     2  0.0000      0.894 0.000 1.000
#> GSM1105462     1  0.3431      0.880 0.936 0.064
#> GSM1105441     2  0.0376      0.895 0.004 0.996
#> GSM1105465     2  0.1414      0.894 0.020 0.980
#> GSM1105484     2  0.0000      0.894 0.000 1.000
#> GSM1105485     2  0.1414      0.894 0.020 0.980
#> GSM1105496     2  0.9393      0.519 0.356 0.644
#> GSM1105505     2  0.7139      0.775 0.196 0.804
#> GSM1105509     1  0.8016      0.701 0.756 0.244
#> GSM1105448     2  0.0000      0.894 0.000 1.000
#> GSM1105521     1  0.3733      0.874 0.928 0.072
#> GSM1105528     2  0.0000      0.894 0.000 1.000
#> GSM1105529     2  0.1414      0.894 0.020 0.980
#> GSM1105533     1  0.0000      0.893 1.000 0.000
#> GSM1105545     2  0.6438      0.793 0.164 0.836
#> GSM1105548     1  0.0376      0.894 0.996 0.004
#> GSM1105549     1  0.2778      0.883 0.952 0.048
#> GSM1105457     2  0.0376      0.895 0.004 0.996
#> GSM1105460     2  0.0672      0.896 0.008 0.992
#> GSM1105461     2  0.0000      0.894 0.000 1.000
#> GSM1105464     1  0.3431      0.880 0.936 0.064
#> GSM1105466     2  0.8909      0.595 0.308 0.692
#> GSM1105479     2  0.2948      0.881 0.052 0.948
#> GSM1105502     1  0.1843      0.892 0.972 0.028
#> GSM1105515     1  0.0000      0.893 1.000 0.000
#> GSM1105523     1  0.9815      0.224 0.580 0.420
#> GSM1105550     1  0.9044      0.560 0.680 0.320
#> GSM1105450     2  0.0000      0.894 0.000 1.000
#> GSM1105451     2  0.0000      0.894 0.000 1.000
#> GSM1105454     2  0.3733      0.871 0.072 0.928
#> GSM1105468     2  0.0000      0.894 0.000 1.000
#> GSM1105481     2  0.3733      0.871 0.072 0.928
#> GSM1105504     1  0.1843      0.892 0.972 0.028
#> GSM1105517     1  0.5842      0.822 0.860 0.140
#> GSM1105525     1  0.9815      0.224 0.580 0.420
#> GSM1105552     1  0.9044      0.560 0.680 0.320
#> GSM1105452     2  0.1414      0.894 0.020 0.980
#> GSM1105453     2  0.0000      0.894 0.000 1.000
#> GSM1105456     2  0.3733      0.871 0.072 0.928

show/hide code output

cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#>            class entropy silhouette    p1    p2    p3
#> GSM1105438     2  0.0237      0.754 0.000 0.996 0.004
#> GSM1105486     2  0.1163      0.751 0.000 0.972 0.028
#> GSM1105487     1  0.0747      0.780 0.984 0.000 0.016
#> GSM1105490     2  0.6507      0.535 0.028 0.688 0.284
#> GSM1105491     1  0.8162      0.409 0.644 0.192 0.164
#> GSM1105495     2  0.6912      0.342 0.028 0.628 0.344
#> GSM1105498     3  0.8473      0.670 0.176 0.208 0.616
#> GSM1105499     1  0.4399      0.768 0.812 0.000 0.188
#> GSM1105506     3  0.8800      0.398 0.116 0.396 0.488
#> GSM1105442     2  0.2878      0.719 0.000 0.904 0.096
#> GSM1105511     2  0.6507      0.535 0.028 0.688 0.284
#> GSM1105514     2  0.0000      0.755 0.000 1.000 0.000
#> GSM1105518     3  0.7773      0.466 0.072 0.316 0.612
#> GSM1105522     1  0.4555      0.764 0.800 0.000 0.200
#> GSM1105534     1  0.4399      0.768 0.812 0.000 0.188
#> GSM1105535     1  0.4555      0.764 0.800 0.000 0.200
#> GSM1105538     1  0.8213      0.514 0.632 0.140 0.228
#> GSM1105542     2  0.2878      0.719 0.000 0.904 0.096
#> GSM1105443     2  0.5656      0.583 0.004 0.712 0.284
#> GSM1105551     1  0.5650      0.590 0.688 0.000 0.312
#> GSM1105554     1  0.4399      0.768 0.812 0.000 0.188
#> GSM1105555     1  0.0747      0.780 0.984 0.000 0.016
#> GSM1105447     2  0.5588      0.595 0.004 0.720 0.276
#> GSM1105467     2  0.2096      0.749 0.004 0.944 0.052
#> GSM1105470     2  0.0000      0.755 0.000 1.000 0.000
#> GSM1105471     2  0.6770      0.502 0.044 0.692 0.264
#> GSM1105474     2  0.0000      0.755 0.000 1.000 0.000
#> GSM1105475     2  0.4682      0.664 0.004 0.804 0.192
#> GSM1105440     1  0.4555      0.764 0.800 0.000 0.200
#> GSM1105488     2  0.2796      0.720 0.000 0.908 0.092
#> GSM1105489     1  0.0747      0.780 0.984 0.000 0.016
#> GSM1105492     1  0.4555      0.764 0.800 0.000 0.200
#> GSM1105493     1  0.5053      0.704 0.812 0.024 0.164
#> GSM1105497     2  0.6355      0.457 0.024 0.696 0.280
#> GSM1105500     3  0.8473      0.670 0.176 0.208 0.616
#> GSM1105501     2  0.7644      0.371 0.068 0.624 0.308
#> GSM1105508     3  0.9328      0.192 0.372 0.168 0.460
#> GSM1105444     2  0.0237      0.754 0.000 0.996 0.004
#> GSM1105513     2  0.6507      0.535 0.028 0.688 0.284
#> GSM1105516     2  0.9700     -0.322 0.348 0.428 0.224
#> GSM1105520     3  0.7773      0.466 0.072 0.316 0.612
#> GSM1105524     1  0.4555      0.764 0.800 0.000 0.200
#> GSM1105536     2  0.7533      0.425 0.088 0.668 0.244
#> GSM1105537     1  0.4555      0.764 0.800 0.000 0.200
#> GSM1105540     1  0.8213      0.514 0.632 0.140 0.228
#> GSM1105544     2  0.9676     -0.338 0.220 0.432 0.348
#> GSM1105445     2  0.5656      0.583 0.004 0.712 0.284
#> GSM1105553     1  0.5650      0.590 0.688 0.000 0.312
#> GSM1105556     1  0.4399      0.768 0.812 0.000 0.188
#> GSM1105557     2  0.6507      0.535 0.028 0.688 0.284
#> GSM1105449     2  0.5517      0.603 0.004 0.728 0.268
#> GSM1105469     3  0.8284      0.657 0.148 0.224 0.628
#> GSM1105472     2  0.0000      0.755 0.000 1.000 0.000
#> GSM1105473     1  0.5719      0.694 0.792 0.052 0.156
#> GSM1105476     2  0.0000      0.755 0.000 1.000 0.000
#> GSM1105477     2  0.4682      0.664 0.004 0.804 0.192
#> GSM1105478     3  0.7841      0.630 0.092 0.272 0.636
#> GSM1105510     2  0.2711      0.720 0.000 0.912 0.088
#> GSM1105530     1  0.3038      0.759 0.896 0.000 0.104
#> GSM1105539     1  0.2959      0.761 0.900 0.000 0.100
#> GSM1105480     3  0.7841      0.630 0.092 0.272 0.636
#> GSM1105512     1  0.4399      0.768 0.812 0.000 0.188
#> GSM1105532     1  0.3038      0.759 0.896 0.000 0.104
#> GSM1105541     1  0.2959      0.761 0.900 0.000 0.100
#> GSM1105439     2  0.5016      0.623 0.000 0.760 0.240
#> GSM1105463     1  0.3116      0.759 0.892 0.000 0.108
#> GSM1105482     1  0.3192      0.782 0.888 0.000 0.112
#> GSM1105483     3  0.8284      0.657 0.148 0.224 0.628
#> GSM1105494     3  0.8125      0.669 0.172 0.180 0.648
#> GSM1105503     3  0.8570      0.505 0.120 0.316 0.564
#> GSM1105507     1  0.9054      0.318 0.496 0.144 0.360
#> GSM1105446     2  0.0892      0.748 0.000 0.980 0.020
#> GSM1105519     1  0.6441      0.704 0.696 0.028 0.276
#> GSM1105526     2  0.2261      0.740 0.000 0.932 0.068
#> GSM1105527     3  0.8284      0.657 0.148 0.224 0.628
#> GSM1105531     1  0.4002      0.731 0.840 0.000 0.160
#> GSM1105543     2  0.0237      0.755 0.000 0.996 0.004
#> GSM1105546     1  0.1643      0.784 0.956 0.000 0.044
#> GSM1105547     1  0.3181      0.764 0.912 0.024 0.064
#> GSM1105455     2  0.5058      0.620 0.000 0.756 0.244
#> GSM1105458     2  0.5656      0.583 0.004 0.712 0.284
#> GSM1105459     2  0.0000      0.755 0.000 1.000 0.000
#> GSM1105462     1  0.4137      0.754 0.872 0.032 0.096
#> GSM1105441     2  0.5016      0.623 0.000 0.760 0.240
#> GSM1105465     2  0.2878      0.719 0.000 0.904 0.096
#> GSM1105484     2  0.2066      0.738 0.000 0.940 0.060
#> GSM1105485     2  0.2878      0.719 0.000 0.904 0.096
#> GSM1105496     3  0.8125      0.669 0.172 0.180 0.648
#> GSM1105505     3  0.8570      0.505 0.120 0.316 0.564
#> GSM1105509     1  0.9054      0.318 0.496 0.144 0.360
#> GSM1105448     2  0.0000      0.755 0.000 1.000 0.000
#> GSM1105521     1  0.6441      0.704 0.696 0.028 0.276
#> GSM1105528     2  0.2261      0.740 0.000 0.932 0.068
#> GSM1105529     2  0.2878      0.719 0.000 0.904 0.096
#> GSM1105533     1  0.2066      0.773 0.940 0.000 0.060
#> GSM1105545     2  0.7606      0.412 0.092 0.664 0.244
#> GSM1105548     1  0.1643      0.784 0.956 0.000 0.044
#> GSM1105549     1  0.3181      0.764 0.912 0.024 0.064
#> GSM1105457     2  0.5058      0.620 0.000 0.756 0.244
#> GSM1105460     2  0.5656      0.583 0.004 0.712 0.284
#> GSM1105461     2  0.0000      0.755 0.000 1.000 0.000
#> GSM1105464     1  0.4137      0.754 0.872 0.032 0.096
#> GSM1105466     3  0.8258      0.623 0.112 0.284 0.604
#> GSM1105479     2  0.6224      0.498 0.016 0.688 0.296
#> GSM1105502     1  0.3116      0.760 0.892 0.000 0.108
#> GSM1105515     1  0.4399      0.768 0.812 0.000 0.188
#> GSM1105523     3  0.5621      0.316 0.308 0.000 0.692
#> GSM1105550     1  0.9276      0.173 0.524 0.212 0.264
#> GSM1105450     2  0.0000      0.755 0.000 1.000 0.000
#> GSM1105451     2  0.0000      0.755 0.000 1.000 0.000
#> GSM1105454     3  0.7295     -0.028 0.028 0.480 0.492
#> GSM1105468     2  0.0000      0.755 0.000 1.000 0.000
#> GSM1105481     2  0.6715      0.434 0.028 0.660 0.312
#> GSM1105504     1  0.3116      0.760 0.892 0.000 0.108
#> GSM1105517     1  0.7580      0.585 0.604 0.056 0.340
#> GSM1105525     3  0.5621      0.316 0.308 0.000 0.692
#> GSM1105552     1  0.9276      0.173 0.524 0.212 0.264
#> GSM1105452     2  0.2711      0.721 0.000 0.912 0.088
#> GSM1105453     2  0.0000      0.755 0.000 1.000 0.000
#> GSM1105456     3  0.7295     -0.028 0.028 0.480 0.492

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>            class entropy silhouette    p1    p2    p3    p4
#> GSM1105438     2  0.0188     0.7001 0.000 0.996 0.000 0.004
#> GSM1105486     2  0.1118     0.6956 0.000 0.964 0.000 0.036
#> GSM1105487     3  0.3975     0.4697 0.240 0.000 0.760 0.000
#> GSM1105490     2  0.4781     0.4728 0.004 0.660 0.000 0.336
#> GSM1105491     3  0.5847     0.4124 0.208 0.064 0.712 0.016
#> GSM1105495     2  0.6654     0.0173 0.048 0.476 0.016 0.460
#> GSM1105498     4  0.7410     0.6424 0.068 0.184 0.112 0.636
#> GSM1105499     1  0.4372     0.7745 0.728 0.000 0.268 0.004
#> GSM1105506     4  0.8116     0.3799 0.176 0.364 0.024 0.436
#> GSM1105442     2  0.4420     0.5974 0.204 0.776 0.008 0.012
#> GSM1105511     2  0.4781     0.4728 0.004 0.660 0.000 0.336
#> GSM1105514     2  0.0000     0.7007 0.000 1.000 0.000 0.000
#> GSM1105518     4  0.3717     0.5526 0.008 0.132 0.016 0.844
#> GSM1105522     1  0.3907     0.7710 0.768 0.000 0.232 0.000
#> GSM1105534     1  0.4193     0.7735 0.732 0.000 0.268 0.000
#> GSM1105535     1  0.3907     0.7710 0.768 0.000 0.232 0.000
#> GSM1105538     3  0.8932     0.0744 0.212 0.140 0.496 0.152
#> GSM1105542     2  0.4420     0.5974 0.204 0.776 0.008 0.012
#> GSM1105443     2  0.4543     0.5059 0.000 0.676 0.000 0.324
#> GSM1105551     3  0.5537     0.4079 0.056 0.000 0.688 0.256
#> GSM1105554     1  0.4372     0.7745 0.728 0.000 0.268 0.004
#> GSM1105555     3  0.3975     0.4697 0.240 0.000 0.760 0.000
#> GSM1105447     2  0.4677     0.5168 0.004 0.680 0.000 0.316
#> GSM1105467     2  0.1824     0.6931 0.004 0.936 0.000 0.060
#> GSM1105470     2  0.0000     0.7007 0.000 1.000 0.000 0.000
#> GSM1105471     2  0.6112     0.1744 0.004 0.544 0.040 0.412
#> GSM1105474     2  0.0000     0.7007 0.000 1.000 0.000 0.000
#> GSM1105475     2  0.5292     0.5976 0.060 0.724 0.000 0.216
#> GSM1105440     1  0.3907     0.7710 0.768 0.000 0.232 0.000
#> GSM1105488     2  0.4342     0.6021 0.196 0.784 0.008 0.012
#> GSM1105489     3  0.3975     0.4697 0.240 0.000 0.760 0.000
#> GSM1105492     1  0.3907     0.7710 0.768 0.000 0.232 0.000
#> GSM1105493     3  0.3166     0.5602 0.116 0.000 0.868 0.016
#> GSM1105497     2  0.7809     0.1557 0.180 0.472 0.012 0.336
#> GSM1105500     4  0.7410     0.6424 0.068 0.184 0.112 0.636
#> GSM1105501     2  0.6717     0.3469 0.076 0.600 0.016 0.308
#> GSM1105508     4  0.9748     0.1757 0.236 0.160 0.260 0.344
#> GSM1105444     2  0.0188     0.7001 0.000 0.996 0.000 0.004
#> GSM1105513     2  0.4781     0.4728 0.004 0.660 0.000 0.336
#> GSM1105516     2  0.9327    -0.1393 0.112 0.412 0.252 0.224
#> GSM1105520     4  0.3717     0.5526 0.008 0.132 0.016 0.844
#> GSM1105524     1  0.3907     0.7710 0.768 0.000 0.232 0.000
#> GSM1105536     2  0.7367     0.4005 0.064 0.596 0.068 0.272
#> GSM1105537     1  0.3907     0.7710 0.768 0.000 0.232 0.000
#> GSM1105540     3  0.8932     0.0744 0.212 0.140 0.496 0.152
#> GSM1105544     2  0.9587    -0.2685 0.188 0.336 0.148 0.328
#> GSM1105445     2  0.4543     0.5059 0.000 0.676 0.000 0.324
#> GSM1105553     3  0.5537     0.4079 0.056 0.000 0.688 0.256
#> GSM1105556     1  0.4372     0.7745 0.728 0.000 0.268 0.004
#> GSM1105557     2  0.4781     0.4728 0.004 0.660 0.000 0.336
#> GSM1105449     2  0.4746     0.5269 0.008 0.688 0.000 0.304
#> GSM1105469     4  0.7389     0.6287 0.184 0.192 0.024 0.600
#> GSM1105472     2  0.0000     0.7007 0.000 1.000 0.000 0.000
#> GSM1105473     3  0.4615     0.5647 0.020 0.048 0.816 0.116
#> GSM1105476     2  0.0000     0.7007 0.000 1.000 0.000 0.000
#> GSM1105477     2  0.5292     0.5976 0.060 0.724 0.000 0.216
#> GSM1105478     4  0.6648     0.6033 0.120 0.236 0.008 0.636
#> GSM1105510     2  0.4034     0.6156 0.180 0.804 0.004 0.012
#> GSM1105530     3  0.2002     0.6309 0.020 0.000 0.936 0.044
#> GSM1105539     3  0.2111     0.6304 0.024 0.000 0.932 0.044
#> GSM1105480     4  0.6648     0.6033 0.120 0.236 0.008 0.636
#> GSM1105512     1  0.4372     0.7745 0.728 0.000 0.268 0.004
#> GSM1105532     3  0.2002     0.6309 0.020 0.000 0.936 0.044
#> GSM1105541     3  0.2111     0.6304 0.024 0.000 0.932 0.044
#> GSM1105439     2  0.4193     0.5558 0.000 0.732 0.000 0.268
#> GSM1105463     3  0.2335     0.6290 0.020 0.000 0.920 0.060
#> GSM1105482     1  0.4989     0.3758 0.528 0.000 0.472 0.000
#> GSM1105483     4  0.7389     0.6287 0.184 0.192 0.024 0.600
#> GSM1105494     4  0.7020     0.6532 0.064 0.156 0.108 0.672
#> GSM1105503     4  0.4928     0.5682 0.008 0.132 0.072 0.788
#> GSM1105507     1  0.9570     0.2625 0.360 0.132 0.288 0.220
#> GSM1105446     2  0.2469     0.6638 0.108 0.892 0.000 0.000
#> GSM1105519     1  0.7450     0.5261 0.504 0.028 0.376 0.092
#> GSM1105526     2  0.3128     0.6848 0.040 0.884 0.000 0.076
#> GSM1105527     4  0.7389     0.6287 0.184 0.192 0.024 0.600
#> GSM1105531     3  0.2799     0.6106 0.008 0.000 0.884 0.108
#> GSM1105543     2  0.2197     0.6774 0.080 0.916 0.000 0.004
#> GSM1105546     3  0.4454     0.3405 0.308 0.000 0.692 0.000
#> GSM1105547     3  0.5040     0.3281 0.364 0.000 0.628 0.008
#> GSM1105455     2  0.4222     0.5523 0.000 0.728 0.000 0.272
#> GSM1105458     2  0.4522     0.5113 0.000 0.680 0.000 0.320
#> GSM1105459     2  0.0000     0.7007 0.000 1.000 0.000 0.000
#> GSM1105462     3  0.3027     0.6208 0.024 0.032 0.904 0.040
#> GSM1105441     2  0.4193     0.5558 0.000 0.732 0.000 0.268
#> GSM1105465     2  0.4420     0.5974 0.204 0.776 0.008 0.012
#> GSM1105484     2  0.3391     0.6423 0.148 0.844 0.004 0.004
#> GSM1105485     2  0.4420     0.5974 0.204 0.776 0.008 0.012
#> GSM1105496     4  0.7020     0.6532 0.064 0.156 0.108 0.672
#> GSM1105505     4  0.4928     0.5682 0.008 0.132 0.072 0.788
#> GSM1105509     1  0.9570     0.2625 0.360 0.132 0.288 0.220
#> GSM1105448     2  0.0000     0.7007 0.000 1.000 0.000 0.000
#> GSM1105521     1  0.7450     0.5261 0.504 0.028 0.376 0.092
#> GSM1105528     2  0.3128     0.6848 0.040 0.884 0.000 0.076
#> GSM1105529     2  0.4420     0.5974 0.204 0.776 0.008 0.012
#> GSM1105533     3  0.5848     0.2399 0.376 0.000 0.584 0.040
#> GSM1105545     2  0.7389     0.3914 0.064 0.592 0.068 0.276
#> GSM1105548     3  0.4454     0.3405 0.308 0.000 0.692 0.000
#> GSM1105549     3  0.5040     0.3281 0.364 0.000 0.628 0.008
#> GSM1105457     2  0.4222     0.5523 0.000 0.728 0.000 0.272
#> GSM1105460     2  0.4522     0.5113 0.000 0.680 0.000 0.320
#> GSM1105461     2  0.0000     0.7007 0.000 1.000 0.000 0.000
#> GSM1105464     3  0.3027     0.6208 0.024 0.032 0.904 0.040
#> GSM1105466     4  0.7205     0.5816 0.148 0.256 0.012 0.584
#> GSM1105479     2  0.5421     0.1868 0.004 0.548 0.008 0.440
#> GSM1105502     3  0.2483     0.6309 0.032 0.000 0.916 0.052
#> GSM1105515     1  0.4193     0.7735 0.732 0.000 0.268 0.000
#> GSM1105523     4  0.6745     0.4056 0.152 0.000 0.244 0.604
#> GSM1105550     3  0.9468     0.0550 0.152 0.204 0.416 0.228
#> GSM1105450     2  0.0000     0.7007 0.000 1.000 0.000 0.000
#> GSM1105451     2  0.0000     0.7007 0.000 1.000 0.000 0.000
#> GSM1105454     4  0.5223     0.3476 0.008 0.292 0.016 0.684
#> GSM1105468     2  0.0000     0.7007 0.000 1.000 0.000 0.000
#> GSM1105481     2  0.5669     0.1056 0.004 0.516 0.016 0.464
#> GSM1105504     3  0.2483     0.6309 0.032 0.000 0.916 0.052
#> GSM1105517     1  0.8538     0.3779 0.420 0.048 0.356 0.176
#> GSM1105525     4  0.6745     0.4056 0.152 0.000 0.244 0.604
#> GSM1105552     3  0.9468     0.0550 0.152 0.204 0.416 0.228
#> GSM1105452     2  0.3907     0.6168 0.180 0.808 0.004 0.008
#> GSM1105453     2  0.0000     0.7007 0.000 1.000 0.000 0.000
#> GSM1105456     4  0.5223     0.3476 0.008 0.292 0.016 0.684

show/hide code output

cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#>            class entropy silhouette    p1    p2    p3    p4    p5
#> GSM1105438     2  0.0798     0.6443 0.000 0.976 0.000 0.016 0.008
#> GSM1105486     2  0.1638     0.6434 0.000 0.932 0.000 0.064 0.004
#> GSM1105487     3  0.4609     0.5673 0.280 0.000 0.688 0.024 0.008
#> GSM1105490     2  0.5276     0.3219 0.000 0.516 0.000 0.436 0.048
#> GSM1105491     3  0.5419     0.4804 0.004 0.064 0.700 0.028 0.204
#> GSM1105495     5  0.6477     0.2150 0.024 0.444 0.024 0.048 0.460
#> GSM1105498     4  0.6306     0.4550 0.012 0.084 0.088 0.676 0.140
#> GSM1105499     1  0.1638     0.7688 0.932 0.000 0.064 0.004 0.000
#> GSM1105506     4  0.5389     0.4366 0.084 0.176 0.004 0.712 0.024
#> GSM1105442     2  0.4484     0.4878 0.004 0.732 0.016 0.016 0.232
#> GSM1105511     2  0.5276     0.3219 0.000 0.516 0.000 0.436 0.048
#> GSM1105514     2  0.0000     0.6453 0.000 1.000 0.000 0.000 0.000
#> GSM1105518     5  0.4470     0.5272 0.000 0.008 0.008 0.328 0.656
#> GSM1105522     1  0.0794     0.7645 0.972 0.000 0.028 0.000 0.000
#> GSM1105534     1  0.1478     0.7682 0.936 0.000 0.064 0.000 0.000
#> GSM1105535     1  0.0794     0.7645 0.972 0.000 0.028 0.000 0.000
#> GSM1105538     3  0.7882     0.1591 0.208 0.052 0.432 0.292 0.016
#> GSM1105542     2  0.4484     0.4878 0.004 0.732 0.016 0.016 0.232
#> GSM1105443     2  0.6030     0.2879 0.000 0.464 0.000 0.420 0.116
#> GSM1105551     3  0.5833     0.4739 0.024 0.000 0.640 0.244 0.092
#> GSM1105554     1  0.1638     0.7688 0.932 0.000 0.064 0.004 0.000
#> GSM1105555     3  0.4609     0.5673 0.280 0.000 0.688 0.024 0.008
#> GSM1105447     2  0.6062     0.2965 0.000 0.464 0.000 0.416 0.120
#> GSM1105467     2  0.2719     0.6242 0.000 0.852 0.000 0.144 0.004
#> GSM1105470     2  0.0290     0.6469 0.000 0.992 0.000 0.008 0.000
#> GSM1105471     2  0.7101    -0.0897 0.004 0.472 0.032 0.156 0.336
#> GSM1105474     2  0.0000     0.6453 0.000 1.000 0.000 0.000 0.000
#> GSM1105475     2  0.5447     0.5297 0.000 0.640 0.000 0.248 0.112
#> GSM1105440     1  0.0880     0.7648 0.968 0.000 0.032 0.000 0.000
#> GSM1105488     2  0.4357     0.4939 0.004 0.740 0.016 0.012 0.228
#> GSM1105489     3  0.4609     0.5673 0.280 0.000 0.688 0.024 0.008
#> GSM1105492     1  0.0794     0.7645 0.972 0.000 0.028 0.000 0.000
#> GSM1105493     3  0.3291     0.6664 0.016 0.000 0.856 0.028 0.100
#> GSM1105497     5  0.5686     0.0489 0.000 0.428 0.024 0.036 0.512
#> GSM1105500     4  0.6306     0.4550 0.012 0.084 0.088 0.676 0.140
#> GSM1105501     4  0.6722    -0.1187 0.064 0.420 0.008 0.460 0.048
#> GSM1105508     4  0.6348     0.3893 0.144 0.008 0.240 0.596 0.012
#> GSM1105444     2  0.0290     0.6435 0.000 0.992 0.000 0.000 0.008
#> GSM1105513     2  0.5276     0.3219 0.000 0.516 0.000 0.436 0.048
#> GSM1105516     4  0.8375     0.3147 0.116 0.280 0.224 0.372 0.008
#> GSM1105520     5  0.4470     0.5272 0.000 0.008 0.008 0.328 0.656
#> GSM1105524     1  0.0794     0.7645 0.972 0.000 0.028 0.000 0.000
#> GSM1105536     2  0.7199     0.2783 0.008 0.496 0.064 0.332 0.100
#> GSM1105537     1  0.0794     0.7645 0.972 0.000 0.028 0.000 0.000
#> GSM1105540     3  0.7882     0.1591 0.208 0.052 0.432 0.292 0.016
#> GSM1105544     4  0.8821     0.3525 0.064 0.196 0.120 0.440 0.180
#> GSM1105445     2  0.6030     0.2879 0.000 0.464 0.000 0.420 0.116
#> GSM1105553     3  0.5833     0.4739 0.024 0.000 0.640 0.244 0.092
#> GSM1105556     1  0.1638     0.7688 0.932 0.000 0.064 0.004 0.000
#> GSM1105557     2  0.5276     0.3219 0.000 0.516 0.000 0.436 0.048
#> GSM1105449     2  0.6007     0.3346 0.000 0.488 0.000 0.396 0.116
#> GSM1105469     4  0.2925     0.5404 0.084 0.008 0.004 0.880 0.024
#> GSM1105472     2  0.0290     0.6469 0.000 0.992 0.000 0.008 0.000
#> GSM1105473     3  0.4525     0.6612 0.032 0.004 0.796 0.096 0.072
#> GSM1105476     2  0.0000     0.6453 0.000 1.000 0.000 0.000 0.000
#> GSM1105477     2  0.5447     0.5297 0.000 0.640 0.000 0.248 0.112
#> GSM1105478     4  0.3201     0.5097 0.012 0.052 0.008 0.876 0.052
#> GSM1105510     2  0.4460     0.5165 0.000 0.748 0.016 0.032 0.204
#> GSM1105530     3  0.1954     0.7210 0.032 0.000 0.932 0.008 0.028
#> GSM1105539     3  0.2036     0.7209 0.036 0.000 0.928 0.008 0.028
#> GSM1105480     4  0.3201     0.5097 0.012 0.052 0.008 0.876 0.052
#> GSM1105512     1  0.1638     0.7688 0.932 0.000 0.064 0.004 0.000
#> GSM1105532     3  0.1954     0.7210 0.032 0.000 0.932 0.008 0.028
#> GSM1105541     3  0.2036     0.7209 0.036 0.000 0.928 0.008 0.028
#> GSM1105439     2  0.5699     0.4408 0.000 0.584 0.000 0.308 0.108
#> GSM1105463     3  0.2352     0.7191 0.032 0.000 0.912 0.008 0.048
#> GSM1105482     1  0.4268     0.4904 0.708 0.000 0.272 0.016 0.004
#> GSM1105483     4  0.2925     0.5404 0.084 0.008 0.004 0.880 0.024
#> GSM1105494     4  0.6401     0.4084 0.008 0.080 0.080 0.652 0.180
#> GSM1105503     5  0.5462     0.5005 0.000 0.008 0.064 0.316 0.612
#> GSM1105507     1  0.7346     0.1289 0.396 0.016 0.244 0.336 0.008
#> GSM1105446     2  0.2753     0.5871 0.000 0.856 0.000 0.008 0.136
#> GSM1105519     1  0.5977     0.4294 0.592 0.004 0.284 0.116 0.004
#> GSM1105526     2  0.3697     0.6234 0.000 0.820 0.000 0.100 0.080
#> GSM1105527     4  0.2925     0.5404 0.084 0.008 0.004 0.880 0.024
#> GSM1105531     3  0.3164     0.6961 0.044 0.000 0.868 0.012 0.076
#> GSM1105543     2  0.2470     0.6077 0.000 0.884 0.000 0.012 0.104
#> GSM1105546     3  0.5189     0.4706 0.332 0.000 0.620 0.036 0.012
#> GSM1105547     3  0.5880     0.3746 0.360 0.000 0.560 0.028 0.052
#> GSM1105455     2  0.5772     0.4186 0.000 0.564 0.000 0.328 0.108
#> GSM1105458     2  0.6028     0.2957 0.000 0.468 0.000 0.416 0.116
#> GSM1105459     2  0.0404     0.6475 0.000 0.988 0.000 0.012 0.000
#> GSM1105462     3  0.2618     0.7129 0.036 0.000 0.900 0.052 0.012
#> GSM1105441     2  0.5699     0.4408 0.000 0.584 0.000 0.308 0.108
#> GSM1105465     2  0.4484     0.4878 0.004 0.732 0.016 0.016 0.232
#> GSM1105484     2  0.3618     0.5509 0.004 0.808 0.016 0.004 0.168
#> GSM1105485     2  0.4484     0.4878 0.004 0.732 0.016 0.016 0.232
#> GSM1105496     4  0.6401     0.4084 0.008 0.080 0.080 0.652 0.180
#> GSM1105505     5  0.5462     0.5005 0.000 0.008 0.064 0.316 0.612
#> GSM1105509     1  0.7346     0.1289 0.396 0.016 0.244 0.336 0.008
#> GSM1105448     2  0.0000     0.6453 0.000 1.000 0.000 0.000 0.000
#> GSM1105521     1  0.5977     0.4294 0.592 0.004 0.284 0.116 0.004
#> GSM1105528     2  0.3697     0.6234 0.000 0.820 0.000 0.100 0.080
#> GSM1105529     2  0.4484     0.4878 0.004 0.732 0.016 0.016 0.232
#> GSM1105533     1  0.5064    -0.0175 0.552 0.000 0.416 0.004 0.028
#> GSM1105545     2  0.7199     0.2764 0.008 0.496 0.064 0.332 0.100
#> GSM1105548     3  0.5189     0.4706 0.332 0.000 0.620 0.036 0.012
#> GSM1105549     3  0.5880     0.3746 0.360 0.000 0.560 0.028 0.052
#> GSM1105457     2  0.5772     0.4186 0.000 0.564 0.000 0.328 0.108
#> GSM1105460     2  0.6028     0.2957 0.000 0.468 0.000 0.416 0.116
#> GSM1105461     2  0.0404     0.6475 0.000 0.988 0.000 0.012 0.000
#> GSM1105464     3  0.2618     0.7129 0.036 0.000 0.900 0.052 0.012
#> GSM1105466     4  0.3859     0.5122 0.044 0.100 0.004 0.832 0.020
#> GSM1105479     2  0.6161    -0.0418 0.004 0.508 0.008 0.092 0.388
#> GSM1105502     3  0.2390     0.7223 0.044 0.000 0.912 0.012 0.032
#> GSM1105515     1  0.1478     0.7682 0.936 0.000 0.064 0.000 0.000
#> GSM1105523     4  0.5833     0.3642 0.028 0.000 0.256 0.636 0.080
#> GSM1105550     4  0.8254     0.0853 0.144 0.104 0.364 0.368 0.020
#> GSM1105450     2  0.0162     0.6461 0.000 0.996 0.000 0.004 0.000
#> GSM1105451     2  0.0000     0.6453 0.000 1.000 0.000 0.000 0.000
#> GSM1105454     5  0.5171     0.5425 0.024 0.164 0.004 0.076 0.732
#> GSM1105468     2  0.0703     0.6467 0.000 0.976 0.000 0.024 0.000
#> GSM1105481     2  0.5891    -0.1371 0.004 0.492 0.008 0.064 0.432
#> GSM1105504     3  0.2390     0.7223 0.044 0.000 0.912 0.012 0.032
#> GSM1105517     1  0.7268     0.2701 0.468 0.020 0.300 0.200 0.012
#> GSM1105525     4  0.5833     0.3642 0.028 0.000 0.256 0.636 0.080
#> GSM1105552     4  0.8254     0.0853 0.144 0.104 0.364 0.368 0.020
#> GSM1105452     2  0.3942     0.5192 0.004 0.772 0.016 0.004 0.204
#> GSM1105453     2  0.0000     0.6453 0.000 1.000 0.000 0.000 0.000
#> GSM1105456     5  0.5171     0.5425 0.024 0.164 0.004 0.076 0.732

show/hide code output

cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#>            class entropy silhouette    p1    p2    p3    p4    p5    p6
#> GSM1105438     2  0.1082     0.6451 0.000 0.956 0.000 0.000 0.040 0.004
#> GSM1105486     2  0.2431     0.5037 0.000 0.860 0.000 0.008 0.132 0.000
#> GSM1105487     3  0.7636     0.2817 0.252 0.000 0.312 0.256 0.000 0.180
#> GSM1105490     5  0.5284     0.7218 0.000 0.388 0.000 0.104 0.508 0.000
#> GSM1105491     3  0.7440     0.3900 0.008 0.060 0.460 0.224 0.220 0.028
#> GSM1105495     6  0.5238     0.0866 0.000 0.408 0.000 0.000 0.096 0.496
#> GSM1105498     4  0.6197     0.3706 0.004 0.036 0.028 0.600 0.240 0.092
#> GSM1105499     1  0.0935     0.7308 0.964 0.000 0.032 0.000 0.004 0.000
#> GSM1105506     5  0.7226    -0.0241 0.076 0.172 0.008 0.360 0.380 0.004
#> GSM1105442     2  0.4018     0.5648 0.000 0.656 0.000 0.020 0.324 0.000
#> GSM1105511     5  0.5284     0.7218 0.000 0.388 0.000 0.104 0.508 0.000
#> GSM1105514     2  0.0146     0.6534 0.000 0.996 0.000 0.000 0.004 0.000
#> GSM1105518     6  0.5066     0.6461 0.000 0.000 0.004 0.248 0.116 0.632
#> GSM1105522     1  0.0260     0.7253 0.992 0.000 0.000 0.000 0.000 0.008
#> GSM1105534     1  0.0790     0.7304 0.968 0.000 0.032 0.000 0.000 0.000
#> GSM1105535     1  0.0260     0.7253 0.992 0.000 0.000 0.000 0.000 0.008
#> GSM1105538     4  0.8334     0.0926 0.224 0.000 0.272 0.296 0.156 0.052
#> GSM1105542     2  0.4018     0.5648 0.000 0.656 0.000 0.020 0.324 0.000
#> GSM1105443     5  0.5060     0.7464 0.000 0.324 0.000 0.016 0.600 0.060
#> GSM1105551     4  0.5703    -0.0234 0.000 0.000 0.244 0.524 0.000 0.232
#> GSM1105554     1  0.0935     0.7308 0.964 0.000 0.032 0.000 0.004 0.000
#> GSM1105555     3  0.7636     0.2817 0.252 0.000 0.312 0.256 0.000 0.180
#> GSM1105447     5  0.5060     0.7426 0.000 0.324 0.000 0.016 0.600 0.060
#> GSM1105467     2  0.3568     0.3677 0.000 0.764 0.000 0.008 0.212 0.016
#> GSM1105470     2  0.0458     0.6475 0.000 0.984 0.000 0.000 0.016 0.000
#> GSM1105471     2  0.6855    -0.0936 0.000 0.432 0.012 0.036 0.216 0.304
#> GSM1105474     2  0.0146     0.6534 0.000 0.996 0.000 0.000 0.004 0.000
#> GSM1105475     2  0.4581    -0.2567 0.000 0.516 0.000 0.036 0.448 0.000
#> GSM1105440     1  0.0363     0.7246 0.988 0.000 0.000 0.000 0.000 0.012
#> GSM1105488     2  0.3986     0.5706 0.000 0.664 0.000 0.020 0.316 0.000
#> GSM1105489     3  0.7636     0.2817 0.252 0.000 0.312 0.256 0.000 0.180
#> GSM1105492     1  0.0260     0.7253 0.992 0.000 0.000 0.000 0.000 0.008
#> GSM1105493     3  0.6297     0.5506 0.044 0.000 0.592 0.224 0.112 0.028
#> GSM1105497     2  0.6031     0.0671 0.000 0.404 0.000 0.000 0.252 0.344
#> GSM1105500     4  0.6197     0.3706 0.004 0.036 0.028 0.600 0.240 0.092
#> GSM1105501     5  0.6378     0.5986 0.064 0.288 0.008 0.104 0.536 0.000
#> GSM1105508     4  0.7904     0.4125 0.156 0.004 0.200 0.392 0.228 0.020
#> GSM1105444     2  0.1219     0.6512 0.000 0.948 0.000 0.000 0.048 0.004
#> GSM1105513     5  0.5284     0.7218 0.000 0.388 0.000 0.104 0.508 0.000
#> GSM1105516     5  0.8623    -0.1001 0.144 0.148 0.188 0.144 0.372 0.004
#> GSM1105520     6  0.5066     0.6461 0.000 0.000 0.004 0.248 0.116 0.632
#> GSM1105524     1  0.0260     0.7253 0.992 0.000 0.000 0.000 0.000 0.008
#> GSM1105536     2  0.6744    -0.3190 0.012 0.416 0.060 0.120 0.392 0.000
#> GSM1105537     1  0.0260     0.7253 0.992 0.000 0.000 0.000 0.000 0.008
#> GSM1105540     4  0.8334     0.0926 0.224 0.000 0.272 0.296 0.156 0.052
#> GSM1105544     5  0.8199    -0.2309 0.064 0.128 0.072 0.312 0.392 0.032
#> GSM1105445     5  0.5060     0.7464 0.000 0.324 0.000 0.016 0.600 0.060
#> GSM1105553     4  0.5703    -0.0234 0.000 0.000 0.244 0.524 0.000 0.232
#> GSM1105556     1  0.0935     0.7308 0.964 0.000 0.032 0.000 0.004 0.000
#> GSM1105557     5  0.5284     0.7218 0.000 0.388 0.000 0.104 0.508 0.000
#> GSM1105449     5  0.4892     0.7336 0.000 0.348 0.000 0.012 0.592 0.048
#> GSM1105469     4  0.5342     0.4341 0.076 0.004 0.008 0.540 0.372 0.000
#> GSM1105472     2  0.0458     0.6475 0.000 0.984 0.000 0.000 0.016 0.000
#> GSM1105473     3  0.5104     0.5946 0.044 0.004 0.748 0.052 0.052 0.100
#> GSM1105476     2  0.0146     0.6534 0.000 0.996 0.000 0.000 0.004 0.000
#> GSM1105477     2  0.4581    -0.2567 0.000 0.516 0.000 0.036 0.448 0.000
#> GSM1105478     4  0.5550     0.3906 0.008 0.024 0.008 0.544 0.376 0.040
#> GSM1105510     2  0.3653     0.5956 0.000 0.692 0.000 0.008 0.300 0.000
#> GSM1105530     3  0.0790     0.6906 0.032 0.000 0.968 0.000 0.000 0.000
#> GSM1105539     3  0.1049     0.6918 0.032 0.000 0.960 0.008 0.000 0.000
#> GSM1105480     4  0.5550     0.3906 0.008 0.024 0.008 0.544 0.376 0.040
#> GSM1105512     1  0.0935     0.7308 0.964 0.000 0.032 0.000 0.004 0.000
#> GSM1105532     3  0.0790     0.6906 0.032 0.000 0.968 0.000 0.000 0.000
#> GSM1105541     3  0.1049     0.6918 0.032 0.000 0.960 0.008 0.000 0.000
#> GSM1105439     5  0.4389     0.6885 0.000 0.448 0.000 0.000 0.528 0.024
#> GSM1105463     3  0.1861     0.6917 0.036 0.000 0.928 0.016 0.000 0.020
#> GSM1105482     1  0.4187     0.5348 0.736 0.000 0.096 0.168 0.000 0.000
#> GSM1105483     4  0.5342     0.4341 0.076 0.004 0.008 0.540 0.372 0.000
#> GSM1105494     4  0.6286     0.3219 0.000 0.036 0.028 0.592 0.212 0.132
#> GSM1105503     6  0.6238     0.6187 0.000 0.000 0.080 0.248 0.112 0.560
#> GSM1105507     1  0.7533     0.0999 0.424 0.004 0.208 0.200 0.160 0.004
#> GSM1105446     2  0.2558     0.6362 0.000 0.840 0.000 0.004 0.156 0.000
#> GSM1105519     1  0.5625     0.4609 0.612 0.000 0.240 0.112 0.036 0.000
#> GSM1105526     2  0.3398     0.4311 0.000 0.740 0.000 0.008 0.252 0.000
#> GSM1105527     4  0.5342     0.4341 0.076 0.004 0.008 0.540 0.372 0.000
#> GSM1105531     3  0.1556     0.6615 0.000 0.000 0.920 0.000 0.000 0.080
#> GSM1105543     2  0.2402     0.6404 0.000 0.856 0.000 0.004 0.140 0.000
#> GSM1105546     3  0.6862     0.1816 0.344 0.000 0.368 0.236 0.000 0.052
#> GSM1105547     1  0.6941    -0.1269 0.392 0.000 0.364 0.180 0.056 0.008
#> GSM1105455     5  0.4498     0.7125 0.000 0.428 0.000 0.004 0.544 0.024
#> GSM1105458     5  0.5073     0.7479 0.000 0.328 0.000 0.016 0.596 0.060
#> GSM1105459     2  0.0713     0.6408 0.000 0.972 0.000 0.000 0.028 0.000
#> GSM1105462     3  0.2990     0.6688 0.036 0.000 0.872 0.048 0.040 0.004
#> GSM1105441     5  0.4389     0.6885 0.000 0.448 0.000 0.000 0.528 0.024
#> GSM1105465     2  0.4018     0.5648 0.000 0.656 0.000 0.020 0.324 0.000
#> GSM1105484     2  0.3398     0.6125 0.000 0.740 0.000 0.008 0.252 0.000
#> GSM1105485     2  0.4018     0.5648 0.000 0.656 0.000 0.020 0.324 0.000
#> GSM1105496     4  0.6286     0.3219 0.000 0.036 0.028 0.592 0.212 0.132
#> GSM1105505     6  0.6238     0.6187 0.000 0.000 0.080 0.248 0.112 0.560
#> GSM1105509     1  0.7533     0.0999 0.424 0.004 0.208 0.200 0.160 0.004
#> GSM1105448     2  0.0260     0.6517 0.000 0.992 0.000 0.000 0.008 0.000
#> GSM1105521     1  0.5625     0.4609 0.612 0.000 0.240 0.112 0.036 0.000
#> GSM1105528     2  0.3398     0.4311 0.000 0.740 0.000 0.008 0.252 0.000
#> GSM1105529     2  0.4018     0.5648 0.000 0.656 0.000 0.020 0.324 0.000
#> GSM1105533     1  0.4184     0.0671 0.556 0.000 0.432 0.008 0.000 0.004
#> GSM1105545     2  0.6769    -0.3157 0.012 0.416 0.060 0.124 0.388 0.000
#> GSM1105548     3  0.6862     0.1816 0.344 0.000 0.368 0.236 0.000 0.052
#> GSM1105549     1  0.6941    -0.1269 0.392 0.000 0.364 0.180 0.056 0.008
#> GSM1105457     5  0.4498     0.7125 0.000 0.428 0.000 0.004 0.544 0.024
#> GSM1105460     5  0.5073     0.7479 0.000 0.328 0.000 0.016 0.596 0.060
#> GSM1105461     2  0.0713     0.6408 0.000 0.972 0.000 0.000 0.028 0.000
#> GSM1105464     3  0.2990     0.6688 0.036 0.000 0.872 0.048 0.040 0.004
#> GSM1105466     4  0.6226     0.2686 0.036 0.092 0.008 0.496 0.364 0.004
#> GSM1105479     2  0.5814    -0.0185 0.000 0.468 0.004 0.000 0.164 0.364
#> GSM1105502     3  0.1908     0.6880 0.044 0.000 0.924 0.012 0.000 0.020
#> GSM1105515     1  0.0790     0.7304 0.968 0.000 0.032 0.000 0.000 0.000
#> GSM1105523     4  0.5067     0.3334 0.004 0.000 0.300 0.612 0.080 0.004
#> GSM1105550     4  0.8308     0.2284 0.164 0.032 0.256 0.328 0.212 0.008
#> GSM1105450     2  0.0363     0.6498 0.000 0.988 0.000 0.000 0.012 0.000
#> GSM1105451     2  0.0146     0.6534 0.000 0.996 0.000 0.000 0.004 0.000
#> GSM1105454     6  0.3655     0.6220 0.000 0.108 0.000 0.004 0.088 0.800
#> GSM1105468     2  0.0937     0.6350 0.000 0.960 0.000 0.000 0.040 0.000
#> GSM1105481     2  0.5682    -0.1029 0.000 0.452 0.004 0.000 0.136 0.408
#> GSM1105504     3  0.1908     0.6880 0.044 0.000 0.924 0.012 0.000 0.020
#> GSM1105517     1  0.7038     0.3014 0.484 0.012 0.252 0.184 0.064 0.004
#> GSM1105525     4  0.5067     0.3334 0.004 0.000 0.300 0.612 0.080 0.004
#> GSM1105552     4  0.8308     0.2284 0.164 0.032 0.256 0.328 0.212 0.008
#> GSM1105452     2  0.3512     0.6004 0.000 0.720 0.000 0.008 0.272 0.000
#> GSM1105453     2  0.0146     0.6534 0.000 0.996 0.000 0.000 0.004 0.000
#> GSM1105456     6  0.3655     0.6220 0.000 0.108 0.000 0.004 0.088 0.800

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) other(p) time(p) individual(p) k
#> SD:hclust 112   0.8793   0.6872   1.000      2.27e-03 2
#> SD:hclust  98   0.5025   0.4323   0.879      2.44e-04 3
#> SD:hclust  81   0.2123   0.0583   0.978      1.34e-05 4
#> SD:hclust  64   0.0819   0.5010   0.970      4.52e-05 5
#> SD:hclust  72   0.1442   0.0337   0.998      2.24e-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: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 44956 rows and 120 columns.
#>   Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'SD' method.
#>   Subgroups are detected by 'kmeans' method.
#>   Performed in total 1250 partitions by row resampling.
#>   Best k for subgroups seems to be 2.
#> 
#> Following methods can be applied to this 'ConsensusPartition' object:
#>  [1] "cola_report"             "collect_classes"         "collect_plots"          
#>  [4] "collect_stats"           "colnames"                "compare_signatures"     
#>  [7] "consensus_heatmap"       "dimension_reduction"     "functional_enrichment"  
#> [10] "get_anno_col"            "get_anno"                "get_classes"            
#> [13] "get_consensus"           "get_matrix"              "get_membership"         
#> [16] "get_param"               "get_signatures"          "get_stats"              
#> [19] "is_best_k"               "is_stable_k"             "membership_heatmap"     
#> [22] "ncol"                    "nrow"                    "plot_ecdf"              
#> [25] "rownames"                "select_partition_number" "show"                   
#> [28] "suggest_best_k"          "test_to_known_factors"

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

collect_plots(res)

plot of chunk SD-kmeans-collect-plots

The plots are:

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

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

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

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

select_partition_number(res)

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

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

get_stats(res)
#>   k 1-PAC mean_silhouette concordance area_increased  Rand Jaccard
#> 2 2 0.854           0.939       0.973         0.4901 0.513   0.513
#> 3 3 0.573           0.701       0.829         0.3419 0.738   0.526
#> 4 4 0.540           0.395       0.632         0.1195 0.802   0.526
#> 5 5 0.624           0.467       0.632         0.0720 0.800   0.448
#> 6 6 0.713           0.650       0.745         0.0454 0.897   0.582

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
#> GSM1105438     2  0.0000      0.966 0.000 1.000
#> GSM1105486     2  0.0000      0.966 0.000 1.000
#> GSM1105487     1  0.0000      0.978 1.000 0.000
#> GSM1105490     2  0.0000      0.966 0.000 1.000
#> GSM1105491     2  0.6438      0.819 0.164 0.836
#> GSM1105495     2  0.6438      0.819 0.164 0.836
#> GSM1105498     2  0.6531      0.814 0.168 0.832
#> GSM1105499     1  0.0000      0.978 1.000 0.000
#> GSM1105506     2  0.0000      0.966 0.000 1.000
#> GSM1105442     2  0.0000      0.966 0.000 1.000
#> GSM1105511     2  0.0000      0.966 0.000 1.000
#> GSM1105514     2  0.0000      0.966 0.000 1.000
#> GSM1105518     2  0.1843      0.946 0.028 0.972
#> GSM1105522     1  0.0000      0.978 1.000 0.000
#> GSM1105534     1  0.0000      0.978 1.000 0.000
#> GSM1105535     1  0.0000      0.978 1.000 0.000
#> GSM1105538     1  0.0000      0.978 1.000 0.000
#> GSM1105542     2  0.0000      0.966 0.000 1.000
#> GSM1105443     2  0.0000      0.966 0.000 1.000
#> GSM1105551     1  0.0000      0.978 1.000 0.000
#> GSM1105554     1  0.0000      0.978 1.000 0.000
#> GSM1105555     1  0.0000      0.978 1.000 0.000
#> GSM1105447     2  0.0000      0.966 0.000 1.000
#> GSM1105467     2  0.0000      0.966 0.000 1.000
#> GSM1105470     2  0.0000      0.966 0.000 1.000
#> GSM1105471     2  0.2043      0.943 0.032 0.968
#> GSM1105474     2  0.0000      0.966 0.000 1.000
#> GSM1105475     2  0.0000      0.966 0.000 1.000
#> GSM1105440     1  0.0000      0.978 1.000 0.000
#> GSM1105488     2  0.0000      0.966 0.000 1.000
#> GSM1105489     1  0.0000      0.978 1.000 0.000
#> GSM1105492     1  0.0000      0.978 1.000 0.000
#> GSM1105493     1  0.0000      0.978 1.000 0.000
#> GSM1105497     2  0.0000      0.966 0.000 1.000
#> GSM1105500     2  0.0000      0.966 0.000 1.000
#> GSM1105501     2  0.0000      0.966 0.000 1.000
#> GSM1105508     1  0.0000      0.978 1.000 0.000
#> GSM1105444     2  0.0000      0.966 0.000 1.000
#> GSM1105513     2  0.0000      0.966 0.000 1.000
#> GSM1105516     1  0.9963      0.155 0.536 0.464
#> GSM1105520     2  0.7219      0.773 0.200 0.800
#> GSM1105524     1  0.0000      0.978 1.000 0.000
#> GSM1105536     2  0.0000      0.966 0.000 1.000
#> GSM1105537     1  0.0000      0.978 1.000 0.000
#> GSM1105540     1  0.0000      0.978 1.000 0.000
#> GSM1105544     2  0.0000      0.966 0.000 1.000
#> GSM1105445     2  0.0000      0.966 0.000 1.000
#> GSM1105553     2  0.6438      0.819 0.164 0.836
#> GSM1105556     1  0.0000      0.978 1.000 0.000
#> GSM1105557     2  0.0000      0.966 0.000 1.000
#> GSM1105449     2  0.0000      0.966 0.000 1.000
#> GSM1105469     1  0.6148      0.813 0.848 0.152
#> GSM1105472     2  0.0000      0.966 0.000 1.000
#> GSM1105473     1  0.0000      0.978 1.000 0.000
#> GSM1105476     2  0.0000      0.966 0.000 1.000
#> GSM1105477     2  0.0000      0.966 0.000 1.000
#> GSM1105478     2  0.4690      0.884 0.100 0.900
#> GSM1105510     2  0.0000      0.966 0.000 1.000
#> GSM1105530     1  0.0000      0.978 1.000 0.000
#> GSM1105539     1  0.0000      0.978 1.000 0.000
#> GSM1105480     2  0.0000      0.966 0.000 1.000
#> GSM1105512     1  0.0000      0.978 1.000 0.000
#> GSM1105532     1  0.0000      0.978 1.000 0.000
#> GSM1105541     1  0.0000      0.978 1.000 0.000
#> GSM1105439     2  0.0000      0.966 0.000 1.000
#> GSM1105463     1  0.0000      0.978 1.000 0.000
#> GSM1105482     1  0.0000      0.978 1.000 0.000
#> GSM1105483     2  0.0672      0.960 0.008 0.992
#> GSM1105494     2  0.0000      0.966 0.000 1.000
#> GSM1105503     2  0.9661      0.408 0.392 0.608
#> GSM1105507     1  0.6438      0.798 0.836 0.164
#> GSM1105446     2  0.0000      0.966 0.000 1.000
#> GSM1105519     1  0.0000      0.978 1.000 0.000
#> GSM1105526     2  0.0000      0.966 0.000 1.000
#> GSM1105527     2  0.0000      0.966 0.000 1.000
#> GSM1105531     1  0.0000      0.978 1.000 0.000
#> GSM1105543     2  0.0000      0.966 0.000 1.000
#> GSM1105546     1  0.0000      0.978 1.000 0.000
#> GSM1105547     1  0.0000      0.978 1.000 0.000
#> GSM1105455     2  0.0000      0.966 0.000 1.000
#> GSM1105458     2  0.0000      0.966 0.000 1.000
#> GSM1105459     2  0.0000      0.966 0.000 1.000
#> GSM1105462     1  0.7528      0.704 0.784 0.216
#> GSM1105441     2  0.0000      0.966 0.000 1.000
#> GSM1105465     2  0.0376      0.963 0.004 0.996
#> GSM1105484     2  0.0000      0.966 0.000 1.000
#> GSM1105485     2  0.0000      0.966 0.000 1.000
#> GSM1105496     2  0.9552      0.448 0.376 0.624
#> GSM1105505     1  0.0000      0.978 1.000 0.000
#> GSM1105509     1  0.0000      0.978 1.000 0.000
#> GSM1105448     2  0.0000      0.966 0.000 1.000
#> GSM1105521     1  0.0000      0.978 1.000 0.000
#> GSM1105528     2  0.0000      0.966 0.000 1.000
#> GSM1105529     2  0.0000      0.966 0.000 1.000
#> GSM1105533     1  0.0000      0.978 1.000 0.000
#> GSM1105545     2  0.0000      0.966 0.000 1.000
#> GSM1105548     1  0.0000      0.978 1.000 0.000
#> GSM1105549     1  0.0000      0.978 1.000 0.000
#> GSM1105457     2  0.0000      0.966 0.000 1.000
#> GSM1105460     2  0.0000      0.966 0.000 1.000
#> GSM1105461     2  0.0000      0.966 0.000 1.000
#> GSM1105464     1  0.0000      0.978 1.000 0.000
#> GSM1105466     2  0.0000      0.966 0.000 1.000
#> GSM1105479     2  0.0000      0.966 0.000 1.000
#> GSM1105502     1  0.0000      0.978 1.000 0.000
#> GSM1105515     1  0.0000      0.978 1.000 0.000
#> GSM1105523     1  0.0000      0.978 1.000 0.000
#> GSM1105550     1  0.0000      0.978 1.000 0.000
#> GSM1105450     2  0.0000      0.966 0.000 1.000
#> GSM1105451     2  0.0000      0.966 0.000 1.000
#> GSM1105454     2  0.6438      0.819 0.164 0.836
#> GSM1105468     2  0.0000      0.966 0.000 1.000
#> GSM1105481     2  0.6531      0.814 0.168 0.832
#> GSM1105504     1  0.0000      0.978 1.000 0.000
#> GSM1105517     1  0.0000      0.978 1.000 0.000
#> GSM1105525     1  0.0000      0.978 1.000 0.000
#> GSM1105552     1  0.0000      0.978 1.000 0.000
#> GSM1105452     2  0.0000      0.966 0.000 1.000
#> GSM1105453     2  0.0000      0.966 0.000 1.000
#> GSM1105456     2  0.6438      0.819 0.164 0.836

show/hide code output

cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#>            class entropy silhouette    p1    p2    p3
#> GSM1105438     2  0.0000      0.800 0.000 1.000 0.000
#> GSM1105486     2  0.2356      0.790 0.000 0.928 0.072
#> GSM1105487     1  0.2796      0.902 0.908 0.000 0.092
#> GSM1105490     3  0.6215      0.562 0.000 0.428 0.572
#> GSM1105491     2  0.6483      0.406 0.008 0.600 0.392
#> GSM1105495     2  0.6888      0.335 0.016 0.552 0.432
#> GSM1105498     3  0.1031      0.637 0.000 0.024 0.976
#> GSM1105499     1  0.0000      0.917 1.000 0.000 0.000
#> GSM1105506     3  0.6811      0.582 0.016 0.404 0.580
#> GSM1105442     2  0.4796      0.652 0.000 0.780 0.220
#> GSM1105511     3  0.6811      0.582 0.016 0.404 0.580
#> GSM1105514     2  0.0592      0.799 0.000 0.988 0.012
#> GSM1105518     3  0.2448      0.643 0.000 0.076 0.924
#> GSM1105522     1  0.1163      0.912 0.972 0.000 0.028
#> GSM1105534     1  0.0000      0.917 1.000 0.000 0.000
#> GSM1105535     1  0.0000      0.917 1.000 0.000 0.000
#> GSM1105538     1  0.0000      0.917 1.000 0.000 0.000
#> GSM1105542     2  0.3038      0.768 0.000 0.896 0.104
#> GSM1105443     3  0.6252      0.542 0.000 0.444 0.556
#> GSM1105551     1  0.2878      0.900 0.904 0.000 0.096
#> GSM1105554     1  0.0000      0.917 1.000 0.000 0.000
#> GSM1105555     1  0.2878      0.900 0.904 0.000 0.096
#> GSM1105447     3  0.6154      0.573 0.000 0.408 0.592
#> GSM1105467     2  0.2261      0.793 0.000 0.932 0.068
#> GSM1105470     2  0.2448      0.787 0.000 0.924 0.076
#> GSM1105471     3  0.3686      0.651 0.000 0.140 0.860
#> GSM1105474     2  0.2261      0.793 0.000 0.932 0.068
#> GSM1105475     2  0.6126     -0.114 0.000 0.600 0.400
#> GSM1105440     1  0.0000      0.917 1.000 0.000 0.000
#> GSM1105488     2  0.3038      0.768 0.000 0.896 0.104
#> GSM1105489     1  0.2878      0.900 0.904 0.000 0.096
#> GSM1105492     1  0.0000      0.917 1.000 0.000 0.000
#> GSM1105493     1  0.3116      0.896 0.892 0.000 0.108
#> GSM1105497     2  0.5497      0.559 0.000 0.708 0.292
#> GSM1105500     3  0.5678      0.573 0.000 0.316 0.684
#> GSM1105501     3  0.6836      0.575 0.016 0.412 0.572
#> GSM1105508     1  0.1964      0.900 0.944 0.000 0.056
#> GSM1105444     2  0.0000      0.800 0.000 1.000 0.000
#> GSM1105513     3  0.6192      0.572 0.000 0.420 0.580
#> GSM1105516     1  0.8666      0.359 0.584 0.264 0.152
#> GSM1105520     3  0.2056      0.629 0.024 0.024 0.952
#> GSM1105524     1  0.0000      0.917 1.000 0.000 0.000
#> GSM1105536     2  0.6252     -0.218 0.000 0.556 0.444
#> GSM1105537     1  0.0000      0.917 1.000 0.000 0.000
#> GSM1105540     3  0.6192      0.300 0.420 0.000 0.580
#> GSM1105544     3  0.6208      0.633 0.068 0.164 0.768
#> GSM1105445     3  0.3752      0.655 0.000 0.144 0.856
#> GSM1105553     3  0.2492      0.622 0.016 0.048 0.936
#> GSM1105556     1  0.0000      0.917 1.000 0.000 0.000
#> GSM1105557     3  0.6192      0.572 0.000 0.420 0.580
#> GSM1105449     2  0.2165      0.794 0.000 0.936 0.064
#> GSM1105469     3  0.6704      0.428 0.376 0.016 0.608
#> GSM1105472     2  0.1163      0.799 0.000 0.972 0.028
#> GSM1105473     1  0.4399      0.854 0.812 0.000 0.188
#> GSM1105476     2  0.2448      0.787 0.000 0.924 0.076
#> GSM1105477     2  0.6260     -0.170 0.000 0.552 0.448
#> GSM1105478     3  0.3619      0.656 0.000 0.136 0.864
#> GSM1105510     2  0.3038      0.768 0.000 0.896 0.104
#> GSM1105530     1  0.3482      0.895 0.872 0.000 0.128
#> GSM1105539     1  0.3482      0.895 0.872 0.000 0.128
#> GSM1105480     3  0.6396      0.632 0.016 0.320 0.664
#> GSM1105512     1  0.0424      0.916 0.992 0.000 0.008
#> GSM1105532     1  0.3482      0.895 0.872 0.000 0.128
#> GSM1105541     1  0.3482      0.895 0.872 0.000 0.128
#> GSM1105439     3  0.6260      0.535 0.000 0.448 0.552
#> GSM1105463     1  0.6180      0.559 0.584 0.000 0.416
#> GSM1105482     1  0.0000      0.917 1.000 0.000 0.000
#> GSM1105483     3  0.8040      0.601 0.092 0.300 0.608
#> GSM1105494     3  0.4750      0.645 0.000 0.216 0.784
#> GSM1105503     3  0.2569      0.632 0.032 0.032 0.936
#> GSM1105507     1  0.3207      0.872 0.904 0.012 0.084
#> GSM1105446     2  0.0592      0.798 0.000 0.988 0.012
#> GSM1105519     1  0.1163      0.912 0.972 0.000 0.028
#> GSM1105526     3  0.6180      0.547 0.000 0.416 0.584
#> GSM1105527     3  0.8040      0.601 0.092 0.300 0.608
#> GSM1105531     3  0.5016      0.377 0.240 0.000 0.760
#> GSM1105543     2  0.0424      0.799 0.000 0.992 0.008
#> GSM1105546     1  0.0000      0.917 1.000 0.000 0.000
#> GSM1105547     1  0.0000      0.917 1.000 0.000 0.000
#> GSM1105455     3  0.6280      0.513 0.000 0.460 0.540
#> GSM1105458     3  0.5835      0.610 0.000 0.340 0.660
#> GSM1105459     2  0.2261      0.793 0.000 0.932 0.068
#> GSM1105462     3  0.1643      0.609 0.044 0.000 0.956
#> GSM1105441     2  0.2261      0.793 0.000 0.932 0.068
#> GSM1105465     2  0.5948      0.465 0.000 0.640 0.360
#> GSM1105484     2  0.3038      0.768 0.000 0.896 0.104
#> GSM1105485     2  0.3038      0.768 0.000 0.896 0.104
#> GSM1105496     3  0.2318      0.618 0.028 0.028 0.944
#> GSM1105505     3  0.2796      0.575 0.092 0.000 0.908
#> GSM1105509     1  0.1964      0.900 0.944 0.000 0.056
#> GSM1105448     2  0.0000      0.800 0.000 1.000 0.000
#> GSM1105521     1  0.1163      0.912 0.972 0.000 0.028
#> GSM1105528     2  0.2796      0.773 0.000 0.908 0.092
#> GSM1105529     2  0.3038      0.768 0.000 0.896 0.104
#> GSM1105533     1  0.2959      0.899 0.900 0.000 0.100
#> GSM1105545     3  0.6244      0.544 0.000 0.440 0.560
#> GSM1105548     1  0.3038      0.899 0.896 0.000 0.104
#> GSM1105549     1  0.1411      0.915 0.964 0.000 0.036
#> GSM1105457     3  0.6192      0.572 0.000 0.420 0.580
#> GSM1105460     3  0.6252      0.542 0.000 0.444 0.556
#> GSM1105461     2  0.2261      0.793 0.000 0.932 0.068
#> GSM1105464     1  0.3482      0.895 0.872 0.000 0.128
#> GSM1105466     3  0.6192      0.572 0.000 0.420 0.580
#> GSM1105479     3  0.6045      0.598 0.000 0.380 0.620
#> GSM1105502     1  0.3482      0.895 0.872 0.000 0.128
#> GSM1105515     1  0.0000      0.917 1.000 0.000 0.000
#> GSM1105523     3  0.5529      0.402 0.296 0.000 0.704
#> GSM1105550     3  0.6140      0.339 0.404 0.000 0.596
#> GSM1105450     2  0.2261      0.793 0.000 0.932 0.068
#> GSM1105451     2  0.2261      0.793 0.000 0.932 0.068
#> GSM1105454     3  0.3528      0.632 0.016 0.092 0.892
#> GSM1105468     2  0.2261      0.793 0.000 0.932 0.068
#> GSM1105481     3  0.2902      0.620 0.016 0.064 0.920
#> GSM1105504     3  0.4931      0.393 0.232 0.000 0.768
#> GSM1105517     1  0.2711      0.883 0.912 0.000 0.088
#> GSM1105525     1  0.4002      0.874 0.840 0.000 0.160
#> GSM1105552     1  0.6204      0.548 0.576 0.000 0.424
#> GSM1105452     2  0.2711      0.775 0.000 0.912 0.088
#> GSM1105453     2  0.2261      0.793 0.000 0.932 0.068
#> GSM1105456     3  0.3528      0.632 0.016 0.092 0.892

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>            class entropy silhouette    p1    p2    p3    p4
#> GSM1105438     2  0.3356    0.42341 0.000 0.824 0.000 0.176
#> GSM1105486     2  0.0000    0.50745 0.000 1.000 0.000 0.000
#> GSM1105487     1  0.3448    0.78638 0.828 0.000 0.004 0.168
#> GSM1105490     2  0.7806    0.10999 0.000 0.412 0.324 0.264
#> GSM1105491     4  0.7546    0.10688 0.000 0.188 0.400 0.412
#> GSM1105495     3  0.7314   -0.15000 0.000 0.168 0.496 0.336
#> GSM1105498     3  0.3335    0.40639 0.000 0.020 0.860 0.120
#> GSM1105499     1  0.1389    0.80499 0.952 0.000 0.000 0.048
#> GSM1105506     2  0.8127    0.05118 0.008 0.376 0.348 0.268
#> GSM1105442     2  0.7226    0.02223 0.000 0.468 0.144 0.388
#> GSM1105511     2  0.8182    0.00946 0.008 0.360 0.324 0.308
#> GSM1105514     2  0.3356    0.42341 0.000 0.824 0.000 0.176
#> GSM1105518     3  0.2412    0.43072 0.000 0.084 0.908 0.008
#> GSM1105522     1  0.4824    0.74820 0.780 0.000 0.076 0.144
#> GSM1105534     1  0.0188    0.80263 0.996 0.000 0.000 0.004
#> GSM1105535     1  0.1474    0.80471 0.948 0.000 0.000 0.052
#> GSM1105538     1  0.0592    0.80179 0.984 0.000 0.000 0.016
#> GSM1105542     2  0.5326    0.26191 0.000 0.604 0.016 0.380
#> GSM1105443     2  0.6912    0.27969 0.000 0.592 0.192 0.216
#> GSM1105551     1  0.4095    0.77772 0.804 0.000 0.024 0.172
#> GSM1105554     1  0.0188    0.80401 0.996 0.000 0.000 0.004
#> GSM1105555     1  0.4070    0.77584 0.824 0.000 0.044 0.132
#> GSM1105447     2  0.6014    0.21714 0.000 0.588 0.360 0.052
#> GSM1105467     2  0.0000    0.50745 0.000 1.000 0.000 0.000
#> GSM1105470     2  0.0000    0.50745 0.000 1.000 0.000 0.000
#> GSM1105471     3  0.5180    0.34551 0.000 0.196 0.740 0.064
#> GSM1105474     2  0.0000    0.50745 0.000 1.000 0.000 0.000
#> GSM1105475     2  0.6397    0.31499 0.000 0.648 0.144 0.208
#> GSM1105440     1  0.1302    0.80596 0.956 0.000 0.000 0.044
#> GSM1105488     2  0.5326    0.26191 0.000 0.604 0.016 0.380
#> GSM1105489     1  0.3447    0.78531 0.852 0.000 0.020 0.128
#> GSM1105492     1  0.0188    0.80263 0.996 0.000 0.000 0.004
#> GSM1105493     1  0.4907    0.74760 0.764 0.000 0.060 0.176
#> GSM1105497     4  0.7836    0.10016 0.000 0.328 0.272 0.400
#> GSM1105500     4  0.7818   -0.08065 0.000 0.264 0.332 0.404
#> GSM1105501     2  0.8170    0.03011 0.008 0.372 0.312 0.308
#> GSM1105508     1  0.5998    0.64718 0.680 0.000 0.108 0.212
#> GSM1105444     2  0.3400    0.42081 0.000 0.820 0.000 0.180
#> GSM1105513     2  0.7832    0.07237 0.000 0.392 0.344 0.264
#> GSM1105516     4  0.9491    0.02798 0.284 0.136 0.196 0.384
#> GSM1105520     3  0.0657    0.44578 0.000 0.012 0.984 0.004
#> GSM1105524     1  0.1474    0.80471 0.948 0.000 0.000 0.052
#> GSM1105536     2  0.7738    0.06347 0.000 0.424 0.240 0.336
#> GSM1105537     1  0.1474    0.80471 0.948 0.000 0.000 0.052
#> GSM1105540     3  0.7629   -0.01186 0.204 0.000 0.400 0.396
#> GSM1105544     3  0.8301    0.04270 0.104 0.072 0.456 0.368
#> GSM1105445     3  0.5747    0.32567 0.000 0.196 0.704 0.100
#> GSM1105553     3  0.2676    0.42805 0.000 0.012 0.896 0.092
#> GSM1105556     1  0.0592    0.80179 0.984 0.000 0.000 0.016
#> GSM1105557     2  0.7985    0.08760 0.004 0.396 0.336 0.264
#> GSM1105449     2  0.1940    0.47441 0.000 0.924 0.076 0.000
#> GSM1105469     4  0.9312   -0.08531 0.176 0.116 0.352 0.356
#> GSM1105472     2  0.0000    0.50745 0.000 1.000 0.000 0.000
#> GSM1105473     1  0.7268    0.56064 0.516 0.000 0.172 0.312
#> GSM1105476     2  0.0000    0.50745 0.000 1.000 0.000 0.000
#> GSM1105477     2  0.7740    0.03073 0.000 0.404 0.232 0.364
#> GSM1105478     3  0.7002    0.19067 0.000 0.164 0.568 0.268
#> GSM1105510     2  0.5364    0.25014 0.000 0.592 0.016 0.392
#> GSM1105530     1  0.7133    0.61150 0.548 0.000 0.172 0.280
#> GSM1105539     1  0.7028    0.63209 0.568 0.000 0.172 0.260
#> GSM1105480     3  0.7937    0.08342 0.012 0.236 0.480 0.272
#> GSM1105512     1  0.1824    0.80129 0.936 0.000 0.004 0.060
#> GSM1105532     1  0.7133    0.61150 0.548 0.000 0.172 0.280
#> GSM1105541     1  0.7005    0.63433 0.572 0.000 0.172 0.256
#> GSM1105439     2  0.7114    0.25332 0.000 0.560 0.188 0.252
#> GSM1105463     3  0.6976    0.25677 0.136 0.000 0.544 0.320
#> GSM1105482     1  0.1890    0.80463 0.936 0.000 0.008 0.056
#> GSM1105483     3  0.9291   -0.05396 0.092 0.224 0.356 0.328
#> GSM1105494     3  0.6449    0.24830 0.000 0.152 0.644 0.204
#> GSM1105503     3  0.2271    0.44526 0.000 0.008 0.916 0.076
#> GSM1105507     1  0.7501    0.11928 0.472 0.000 0.196 0.332
#> GSM1105446     2  0.3873    0.39217 0.000 0.772 0.000 0.228
#> GSM1105519     1  0.3652    0.77131 0.856 0.000 0.052 0.092
#> GSM1105526     2  0.8128    0.02405 0.008 0.384 0.272 0.336
#> GSM1105527     3  0.9249   -0.02769 0.080 0.256 0.348 0.316
#> GSM1105531     3  0.4936    0.35335 0.008 0.000 0.652 0.340
#> GSM1105543     2  0.3873    0.39217 0.000 0.772 0.000 0.228
#> GSM1105546     1  0.0469    0.80464 0.988 0.000 0.000 0.012
#> GSM1105547     1  0.1256    0.80297 0.964 0.000 0.008 0.028
#> GSM1105455     2  0.6819    0.28799 0.000 0.604 0.188 0.208
#> GSM1105458     2  0.6413    0.09506 0.000 0.516 0.416 0.068
#> GSM1105459     2  0.0000    0.50745 0.000 1.000 0.000 0.000
#> GSM1105462     3  0.4277    0.37958 0.000 0.000 0.720 0.280
#> GSM1105441     2  0.1211    0.49243 0.000 0.960 0.040 0.000
#> GSM1105465     4  0.7830    0.09475 0.000 0.332 0.268 0.400
#> GSM1105484     2  0.5573    0.25770 0.000 0.604 0.028 0.368
#> GSM1105485     2  0.5352    0.25431 0.000 0.596 0.016 0.388
#> GSM1105496     3  0.2530    0.41740 0.000 0.000 0.888 0.112
#> GSM1105505     3  0.4454    0.37092 0.000 0.000 0.692 0.308
#> GSM1105509     1  0.5512    0.65871 0.728 0.000 0.100 0.172
#> GSM1105448     2  0.3400    0.42081 0.000 0.820 0.000 0.180
#> GSM1105521     1  0.3399    0.77816 0.868 0.000 0.040 0.092
#> GSM1105528     2  0.5313    0.26509 0.000 0.608 0.016 0.376
#> GSM1105529     2  0.5326    0.26191 0.000 0.604 0.016 0.380
#> GSM1105533     1  0.5429    0.72958 0.720 0.000 0.072 0.208
#> GSM1105545     2  0.8163    0.02587 0.008 0.376 0.300 0.316
#> GSM1105548     1  0.2843    0.80004 0.892 0.000 0.020 0.088
#> GSM1105549     1  0.2730    0.79336 0.896 0.000 0.016 0.088
#> GSM1105457     2  0.7818    0.09436 0.000 0.404 0.332 0.264
#> GSM1105460     2  0.7145    0.25042 0.000 0.556 0.192 0.252
#> GSM1105461     2  0.0000    0.50745 0.000 1.000 0.000 0.000
#> GSM1105464     1  0.7235    0.60576 0.532 0.000 0.180 0.288
#> GSM1105466     2  0.8117    0.05869 0.008 0.380 0.348 0.264
#> GSM1105479     3  0.7596    0.09416 0.000 0.332 0.456 0.212
#> GSM1105502     1  0.6617    0.67286 0.608 0.000 0.128 0.264
#> GSM1105515     1  0.0592    0.80179 0.984 0.000 0.000 0.016
#> GSM1105523     3  0.5599    0.34543 0.040 0.000 0.644 0.316
#> GSM1105550     4  0.8291   -0.14300 0.140 0.048 0.368 0.444
#> GSM1105450     2  0.0000    0.50745 0.000 1.000 0.000 0.000
#> GSM1105451     2  0.0000    0.50745 0.000 1.000 0.000 0.000
#> GSM1105454     3  0.3542    0.41283 0.000 0.120 0.852 0.028
#> GSM1105468     2  0.0000    0.50745 0.000 1.000 0.000 0.000
#> GSM1105481     3  0.4285    0.41542 0.000 0.104 0.820 0.076
#> GSM1105504     3  0.4917    0.35390 0.008 0.000 0.656 0.336
#> GSM1105517     1  0.7728    0.02761 0.416 0.000 0.232 0.352
#> GSM1105525     3  0.7877   -0.12041 0.308 0.000 0.388 0.304
#> GSM1105552     3  0.6876    0.26188 0.116 0.000 0.532 0.352
#> GSM1105452     2  0.5313    0.26586 0.000 0.608 0.016 0.376
#> GSM1105453     2  0.0000    0.50745 0.000 1.000 0.000 0.000
#> GSM1105456     3  0.3485    0.41434 0.000 0.116 0.856 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
#> GSM1105438     2  0.1197   0.641291 0.000 0.952 0.000 0.000 0.048
#> GSM1105486     2  0.2068   0.681967 0.000 0.904 0.004 0.092 0.000
#> GSM1105487     1  0.5011   0.588981 0.660 0.000 0.292 0.012 0.036
#> GSM1105490     4  0.3528   0.686151 0.000 0.084 0.016 0.848 0.052
#> GSM1105491     5  0.4547   0.291213 0.000 0.192 0.072 0.000 0.736
#> GSM1105495     5  0.5825   0.380207 0.000 0.084 0.316 0.012 0.588
#> GSM1105498     4  0.6511  -0.117295 0.000 0.000 0.204 0.460 0.336
#> GSM1105499     1  0.3805   0.689347 0.784 0.000 0.192 0.016 0.008
#> GSM1105506     4  0.3157   0.692187 0.000 0.060 0.016 0.872 0.052
#> GSM1105442     5  0.4557  -0.141268 0.000 0.404 0.012 0.000 0.584
#> GSM1105511     4  0.1648   0.715002 0.000 0.040 0.020 0.940 0.000
#> GSM1105514     2  0.1329   0.647087 0.000 0.956 0.008 0.004 0.032
#> GSM1105518     5  0.6813   0.454712 0.000 0.008 0.344 0.212 0.436
#> GSM1105522     1  0.5961   0.407727 0.548 0.000 0.360 0.076 0.016
#> GSM1105534     1  0.0404   0.757868 0.988 0.000 0.000 0.012 0.000
#> GSM1105535     1  0.4296   0.669699 0.756 0.000 0.204 0.024 0.016
#> GSM1105538     1  0.0404   0.757868 0.988 0.000 0.000 0.012 0.000
#> GSM1105542     2  0.4440   0.303224 0.000 0.528 0.004 0.000 0.468
#> GSM1105443     2  0.6162   0.013878 0.000 0.460 0.012 0.436 0.092
#> GSM1105551     1  0.5189   0.569996 0.644 0.000 0.300 0.012 0.044
#> GSM1105554     1  0.0613   0.757194 0.984 0.000 0.004 0.008 0.004
#> GSM1105555     1  0.4450   0.641100 0.756 0.000 0.188 0.012 0.044
#> GSM1105447     2  0.7162   0.122420 0.000 0.420 0.020 0.252 0.308
#> GSM1105467     2  0.2623   0.676807 0.000 0.884 0.004 0.096 0.016
#> GSM1105470     2  0.2068   0.681967 0.000 0.904 0.004 0.092 0.000
#> GSM1105471     5  0.8123   0.263444 0.000 0.100 0.256 0.300 0.344
#> GSM1105474     2  0.2136   0.682485 0.000 0.904 0.008 0.088 0.000
#> GSM1105475     2  0.5290   0.201421 0.000 0.560 0.004 0.392 0.044
#> GSM1105440     1  0.4086   0.701113 0.796 0.000 0.152 0.024 0.028
#> GSM1105488     2  0.4440   0.303224 0.000 0.528 0.004 0.000 0.468
#> GSM1105489     1  0.3745   0.705090 0.820 0.000 0.132 0.012 0.036
#> GSM1105492     1  0.1701   0.756553 0.944 0.000 0.012 0.028 0.016
#> GSM1105493     1  0.3977   0.592182 0.764 0.000 0.204 0.000 0.032
#> GSM1105497     5  0.4498   0.148351 0.000 0.280 0.032 0.000 0.688
#> GSM1105500     4  0.3556   0.668613 0.000 0.036 0.012 0.836 0.116
#> GSM1105501     4  0.1965   0.714465 0.000 0.052 0.024 0.924 0.000
#> GSM1105508     4  0.7239  -0.089979 0.292 0.000 0.296 0.392 0.020
#> GSM1105444     2  0.1341   0.639198 0.000 0.944 0.000 0.000 0.056
#> GSM1105513     4  0.4112   0.661526 0.000 0.072 0.020 0.812 0.096
#> GSM1105516     4  0.5808   0.447445 0.248 0.008 0.088 0.644 0.012
#> GSM1105520     5  0.6477   0.427388 0.000 0.000 0.392 0.184 0.424
#> GSM1105524     1  0.4296   0.669699 0.756 0.000 0.204 0.024 0.016
#> GSM1105536     4  0.2930   0.703212 0.000 0.076 0.032 0.880 0.012
#> GSM1105537     1  0.4296   0.669699 0.756 0.000 0.204 0.024 0.016
#> GSM1105540     4  0.4741   0.599368 0.104 0.000 0.104 0.768 0.024
#> GSM1105544     4  0.3294   0.670137 0.008 0.000 0.036 0.852 0.104
#> GSM1105445     4  0.8013  -0.258316 0.000 0.084 0.260 0.328 0.328
#> GSM1105553     5  0.6377   0.459778 0.000 0.000 0.336 0.180 0.484
#> GSM1105556     1  0.0854   0.755643 0.976 0.000 0.004 0.012 0.008
#> GSM1105557     4  0.3410   0.689231 0.000 0.076 0.016 0.856 0.052
#> GSM1105449     2  0.4347   0.613110 0.000 0.784 0.008 0.096 0.112
#> GSM1105469     4  0.2248   0.686880 0.012 0.000 0.088 0.900 0.000
#> GSM1105472     2  0.2011   0.682856 0.000 0.908 0.004 0.088 0.000
#> GSM1105473     1  0.5361   0.125387 0.544 0.000 0.412 0.016 0.028
#> GSM1105476     2  0.2136   0.682485 0.000 0.904 0.008 0.088 0.000
#> GSM1105477     4  0.3005   0.702517 0.000 0.068 0.032 0.880 0.020
#> GSM1105478     4  0.4634   0.607643 0.000 0.028 0.044 0.760 0.168
#> GSM1105510     2  0.4443   0.299333 0.000 0.524 0.004 0.000 0.472
#> GSM1105530     3  0.4211   0.186475 0.360 0.000 0.636 0.004 0.000
#> GSM1105539     3  0.4182   0.167502 0.352 0.000 0.644 0.004 0.000
#> GSM1105480     4  0.3166   0.676334 0.000 0.016 0.020 0.860 0.104
#> GSM1105512     1  0.2908   0.698453 0.868 0.000 0.108 0.016 0.008
#> GSM1105532     3  0.4211   0.186475 0.360 0.000 0.636 0.004 0.000
#> GSM1105541     3  0.4225   0.158117 0.364 0.000 0.632 0.004 0.000
#> GSM1105439     2  0.6121   0.000857 0.000 0.464 0.012 0.436 0.088
#> GSM1105463     3  0.4365   0.297878 0.020 0.000 0.748 0.020 0.212
#> GSM1105482     1  0.1267   0.754458 0.960 0.000 0.024 0.004 0.012
#> GSM1105483     4  0.1877   0.703693 0.000 0.012 0.064 0.924 0.000
#> GSM1105494     4  0.6666   0.083719 0.000 0.016 0.156 0.488 0.340
#> GSM1105503     3  0.6377  -0.343957 0.000 0.000 0.484 0.180 0.336
#> GSM1105507     4  0.5732   0.432936 0.224 0.000 0.128 0.640 0.008
#> GSM1105446     2  0.2179   0.606249 0.000 0.888 0.000 0.000 0.112
#> GSM1105519     1  0.3387   0.667569 0.836 0.000 0.132 0.024 0.008
#> GSM1105526     4  0.2278   0.713829 0.000 0.044 0.032 0.916 0.008
#> GSM1105527     4  0.1461   0.715108 0.000 0.016 0.028 0.952 0.004
#> GSM1105531     3  0.4434   0.250927 0.000 0.000 0.736 0.056 0.208
#> GSM1105543     2  0.2488   0.600392 0.000 0.872 0.004 0.000 0.124
#> GSM1105546     1  0.1982   0.753572 0.932 0.000 0.028 0.012 0.028
#> GSM1105547     1  0.1173   0.754567 0.964 0.000 0.020 0.004 0.012
#> GSM1105455     2  0.6108   0.063452 0.000 0.484 0.012 0.416 0.088
#> GSM1105458     2  0.7194   0.101457 0.000 0.404 0.020 0.256 0.320
#> GSM1105459     2  0.1851   0.682705 0.000 0.912 0.000 0.088 0.000
#> GSM1105462     3  0.5322   0.258914 0.000 0.000 0.672 0.140 0.188
#> GSM1105441     2  0.3924   0.625744 0.000 0.816 0.008 0.096 0.080
#> GSM1105465     5  0.4697   0.101371 0.000 0.304 0.036 0.000 0.660
#> GSM1105484     2  0.4287   0.315948 0.000 0.540 0.000 0.000 0.460
#> GSM1105485     2  0.4589   0.293537 0.004 0.520 0.004 0.000 0.472
#> GSM1105496     5  0.6308   0.435531 0.000 0.000 0.388 0.156 0.456
#> GSM1105505     3  0.5331   0.103635 0.000 0.000 0.640 0.092 0.268
#> GSM1105509     1  0.6620   0.103586 0.464 0.000 0.172 0.356 0.008
#> GSM1105448     2  0.0880   0.645377 0.000 0.968 0.000 0.000 0.032
#> GSM1105521     1  0.3342   0.667722 0.836 0.000 0.136 0.020 0.008
#> GSM1105528     2  0.4287   0.315492 0.000 0.540 0.000 0.000 0.460
#> GSM1105529     2  0.4440   0.303224 0.000 0.528 0.004 0.000 0.468
#> GSM1105533     1  0.5218   0.292766 0.516 0.000 0.448 0.008 0.028
#> GSM1105545     4  0.2437   0.711928 0.000 0.060 0.032 0.904 0.004
#> GSM1105548     1  0.2701   0.745423 0.896 0.000 0.048 0.012 0.044
#> GSM1105549     1  0.2125   0.737096 0.920 0.000 0.052 0.004 0.024
#> GSM1105457     4  0.4153   0.661317 0.000 0.076 0.024 0.812 0.088
#> GSM1105460     4  0.6158   0.031292 0.000 0.428 0.012 0.468 0.092
#> GSM1105461     2  0.1851   0.682705 0.000 0.912 0.000 0.088 0.000
#> GSM1105464     3  0.4730   0.087452 0.416 0.000 0.568 0.012 0.004
#> GSM1105466     4  0.3359   0.688073 0.000 0.060 0.016 0.860 0.064
#> GSM1105479     4  0.7791   0.107574 0.000 0.284 0.064 0.384 0.268
#> GSM1105502     3  0.4781   0.038987 0.388 0.000 0.592 0.008 0.012
#> GSM1105515     1  0.0727   0.756600 0.980 0.000 0.004 0.012 0.004
#> GSM1105523     3  0.4782   0.379514 0.012 0.000 0.732 0.196 0.060
#> GSM1105550     4  0.4033   0.583007 0.020 0.000 0.208 0.764 0.008
#> GSM1105450     2  0.2011   0.682856 0.000 0.908 0.004 0.088 0.000
#> GSM1105451     2  0.2011   0.682528 0.000 0.908 0.004 0.088 0.000
#> GSM1105454     5  0.7162   0.470053 0.000 0.052 0.364 0.136 0.448
#> GSM1105468     2  0.2011   0.682856 0.000 0.908 0.004 0.088 0.000
#> GSM1105481     5  0.6875   0.426094 0.000 0.040 0.412 0.116 0.432
#> GSM1105504     3  0.4645   0.259402 0.000 0.000 0.724 0.072 0.204
#> GSM1105517     4  0.6526   0.218431 0.276 0.000 0.212 0.508 0.004
#> GSM1105525     3  0.5566   0.376765 0.172 0.000 0.676 0.140 0.012
#> GSM1105552     3  0.6429   0.403363 0.196 0.000 0.628 0.068 0.108
#> GSM1105452     2  0.4291   0.312055 0.000 0.536 0.000 0.000 0.464
#> GSM1105453     2  0.2011   0.682528 0.000 0.908 0.004 0.088 0.000
#> GSM1105456     5  0.7137   0.468771 0.000 0.052 0.368 0.132 0.448

show/hide code output

cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#>            class entropy silhouette    p1    p2    p3    p4    p5    p6
#> GSM1105438     2  0.1471     0.7932 0.000 0.932 0.004 0.000 0.064 0.000
#> GSM1105486     2  0.0260     0.8302 0.000 0.992 0.000 0.000 0.008 0.000
#> GSM1105487     1  0.6686     0.5724 0.548 0.000 0.244 0.024 0.112 0.072
#> GSM1105490     4  0.4213     0.6487 0.000 0.048 0.000 0.708 0.004 0.240
#> GSM1105491     5  0.3264     0.6736 0.000 0.036 0.012 0.008 0.844 0.100
#> GSM1105495     6  0.5792     0.4774 0.000 0.008 0.140 0.004 0.320 0.528
#> GSM1105498     6  0.6430     0.3322 0.000 0.004 0.084 0.352 0.080 0.480
#> GSM1105499     1  0.3481     0.7053 0.792 0.000 0.180 0.012 0.008 0.008
#> GSM1105506     4  0.4314     0.6561 0.000 0.036 0.012 0.716 0.004 0.232
#> GSM1105442     5  0.3752     0.8451 0.000 0.168 0.004 0.000 0.776 0.052
#> GSM1105511     4  0.1390     0.7629 0.000 0.032 0.000 0.948 0.004 0.016
#> GSM1105514     2  0.0937     0.8073 0.000 0.960 0.000 0.000 0.040 0.000
#> GSM1105518     6  0.5373     0.6569 0.000 0.004 0.144 0.060 0.104 0.688
#> GSM1105522     3  0.6726    -0.1203 0.400 0.000 0.428 0.092 0.048 0.032
#> GSM1105534     1  0.0000     0.7888 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM1105535     1  0.4785     0.6825 0.724 0.000 0.188 0.024 0.036 0.028
#> GSM1105538     1  0.0260     0.7875 0.992 0.000 0.000 0.008 0.000 0.000
#> GSM1105542     5  0.3426     0.8964 0.000 0.276 0.004 0.000 0.720 0.000
#> GSM1105443     2  0.5610     0.4180 0.000 0.572 0.004 0.156 0.004 0.264
#> GSM1105551     1  0.6738     0.5672 0.540 0.000 0.248 0.024 0.116 0.072
#> GSM1105554     1  0.0146     0.7882 0.996 0.000 0.004 0.000 0.000 0.000
#> GSM1105555     1  0.5621     0.6441 0.672 0.000 0.160 0.012 0.096 0.060
#> GSM1105447     6  0.5335     0.2418 0.000 0.328 0.004 0.048 0.032 0.588
#> GSM1105467     2  0.1511     0.8119 0.000 0.940 0.000 0.004 0.012 0.044
#> GSM1105470     2  0.0260     0.8302 0.000 0.992 0.000 0.000 0.008 0.000
#> GSM1105471     6  0.4611     0.5526 0.000 0.076 0.024 0.128 0.016 0.756
#> GSM1105474     2  0.0363     0.8288 0.000 0.988 0.000 0.000 0.012 0.000
#> GSM1105475     2  0.4267     0.6224 0.000 0.732 0.000 0.152 0.000 0.116
#> GSM1105440     1  0.5256     0.6934 0.712 0.000 0.152 0.028 0.064 0.044
#> GSM1105488     5  0.3426     0.8964 0.000 0.276 0.004 0.000 0.720 0.000
#> GSM1105489     1  0.5098     0.7123 0.728 0.000 0.100 0.012 0.100 0.060
#> GSM1105492     1  0.2170     0.7857 0.920 0.000 0.016 0.020 0.024 0.020
#> GSM1105493     1  0.4230     0.6013 0.740 0.000 0.196 0.000 0.044 0.020
#> GSM1105497     5  0.3462     0.7397 0.000 0.072 0.004 0.008 0.828 0.088
#> GSM1105500     4  0.2421     0.7387 0.000 0.004 0.004 0.896 0.044 0.052
#> GSM1105501     4  0.1464     0.7635 0.000 0.036 0.000 0.944 0.004 0.016
#> GSM1105508     4  0.6643     0.2441 0.136 0.000 0.252 0.540 0.040 0.032
#> GSM1105444     2  0.1531     0.7896 0.000 0.928 0.004 0.000 0.068 0.000
#> GSM1105513     4  0.4870     0.3546 0.000 0.048 0.000 0.512 0.004 0.436
#> GSM1105516     4  0.3018     0.6966 0.112 0.000 0.024 0.848 0.016 0.000
#> GSM1105520     6  0.5347     0.6474 0.000 0.000 0.164 0.056 0.104 0.676
#> GSM1105524     1  0.4785     0.6825 0.724 0.000 0.188 0.024 0.036 0.028
#> GSM1105536     4  0.1082     0.7619 0.000 0.040 0.000 0.956 0.004 0.000
#> GSM1105537     1  0.4785     0.6825 0.724 0.000 0.188 0.024 0.036 0.028
#> GSM1105540     4  0.2805     0.7285 0.012 0.000 0.056 0.884 0.024 0.024
#> GSM1105544     4  0.2154     0.7413 0.000 0.004 0.004 0.908 0.020 0.064
#> GSM1105445     6  0.3182     0.5606 0.000 0.036 0.008 0.124 0.000 0.832
#> GSM1105553     6  0.5219     0.6311 0.000 0.000 0.136 0.040 0.140 0.684
#> GSM1105556     1  0.0291     0.7876 0.992 0.000 0.004 0.000 0.004 0.000
#> GSM1105557     4  0.4290     0.6504 0.000 0.044 0.004 0.708 0.004 0.240
#> GSM1105449     2  0.3270     0.7306 0.000 0.816 0.004 0.004 0.024 0.152
#> GSM1105469     4  0.1635     0.7620 0.004 0.008 0.016 0.944 0.004 0.024
#> GSM1105472     2  0.0260     0.8302 0.000 0.992 0.000 0.000 0.008 0.000
#> GSM1105473     3  0.5895     0.3334 0.384 0.000 0.508 0.048 0.048 0.012
#> GSM1105476     2  0.0363     0.8288 0.000 0.988 0.000 0.000 0.012 0.000
#> GSM1105477     4  0.1196     0.7610 0.000 0.040 0.000 0.952 0.008 0.000
#> GSM1105478     4  0.4880     0.2774 0.000 0.008 0.020 0.488 0.012 0.472
#> GSM1105510     5  0.3541     0.8948 0.000 0.260 0.000 0.012 0.728 0.000
#> GSM1105530     3  0.3178     0.6358 0.176 0.000 0.804 0.016 0.004 0.000
#> GSM1105539     3  0.2946     0.6289 0.176 0.000 0.812 0.000 0.012 0.000
#> GSM1105480     4  0.4240     0.6213 0.000 0.004 0.020 0.680 0.008 0.288
#> GSM1105512     1  0.2213     0.7277 0.888 0.000 0.100 0.004 0.008 0.000
#> GSM1105532     3  0.3178     0.6358 0.176 0.000 0.804 0.016 0.004 0.000
#> GSM1105541     3  0.3014     0.6258 0.184 0.000 0.804 0.000 0.012 0.000
#> GSM1105439     2  0.5679     0.4208 0.000 0.572 0.004 0.192 0.004 0.228
#> GSM1105463     3  0.4424     0.4869 0.000 0.000 0.732 0.016 0.072 0.180
#> GSM1105482     1  0.1773     0.7823 0.932 0.000 0.016 0.000 0.036 0.016
#> GSM1105483     4  0.1908     0.7635 0.004 0.024 0.012 0.932 0.004 0.024
#> GSM1105494     6  0.4624     0.2801 0.000 0.004 0.016 0.300 0.028 0.652
#> GSM1105503     6  0.5638     0.5781 0.000 0.000 0.232 0.060 0.084 0.624
#> GSM1105507     4  0.3142     0.6941 0.092 0.000 0.044 0.848 0.016 0.000
#> GSM1105446     2  0.2669     0.6534 0.000 0.836 0.008 0.000 0.156 0.000
#> GSM1105519     1  0.3745     0.6248 0.792 0.000 0.148 0.044 0.016 0.000
#> GSM1105526     4  0.0972     0.7623 0.000 0.028 0.000 0.964 0.008 0.000
#> GSM1105527     4  0.3500     0.7204 0.000 0.024 0.020 0.816 0.004 0.136
#> GSM1105531     3  0.4807     0.4044 0.000 0.000 0.676 0.020 0.064 0.240
#> GSM1105543     2  0.2595     0.6478 0.000 0.836 0.004 0.000 0.160 0.000
#> GSM1105546     1  0.3573     0.7723 0.836 0.000 0.024 0.012 0.080 0.048
#> GSM1105547     1  0.1577     0.7833 0.940 0.000 0.008 0.000 0.036 0.016
#> GSM1105455     2  0.5550     0.4533 0.000 0.592 0.004 0.172 0.004 0.228
#> GSM1105458     6  0.5689    -0.0314 0.000 0.424 0.004 0.056 0.036 0.480
#> GSM1105459     2  0.0260     0.8302 0.000 0.992 0.000 0.000 0.008 0.000
#> GSM1105462     3  0.5336     0.5172 0.000 0.000 0.664 0.176 0.036 0.124
#> GSM1105441     2  0.2604     0.7516 0.000 0.856 0.004 0.004 0.004 0.132
#> GSM1105465     5  0.3634     0.7916 0.000 0.112 0.004 0.004 0.808 0.072
#> GSM1105484     5  0.3288     0.8959 0.000 0.276 0.000 0.000 0.724 0.000
#> GSM1105485     5  0.3606     0.8961 0.000 0.264 0.004 0.008 0.724 0.000
#> GSM1105496     6  0.5448     0.6275 0.000 0.000 0.160 0.044 0.136 0.660
#> GSM1105505     3  0.5729     0.1660 0.000 0.000 0.548 0.040 0.080 0.332
#> GSM1105509     4  0.5592     0.3504 0.260 0.000 0.148 0.580 0.012 0.000
#> GSM1105448     2  0.1082     0.8077 0.000 0.956 0.004 0.000 0.040 0.000
#> GSM1105521     1  0.3578     0.6338 0.800 0.000 0.152 0.032 0.016 0.000
#> GSM1105528     5  0.3288     0.8959 0.000 0.276 0.000 0.000 0.724 0.000
#> GSM1105529     5  0.3543     0.8974 0.000 0.272 0.004 0.004 0.720 0.000
#> GSM1105533     3  0.5637     0.1965 0.332 0.000 0.564 0.004 0.044 0.056
#> GSM1105545     4  0.1010     0.7623 0.000 0.036 0.000 0.960 0.004 0.000
#> GSM1105548     1  0.4859     0.7312 0.748 0.000 0.056 0.016 0.116 0.064
#> GSM1105549     1  0.2540     0.7694 0.892 0.000 0.044 0.000 0.044 0.020
#> GSM1105457     4  0.4445     0.5935 0.000 0.044 0.000 0.656 0.004 0.296
#> GSM1105460     2  0.6006     0.3427 0.000 0.524 0.004 0.248 0.008 0.216
#> GSM1105461     2  0.0000     0.8294 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1105464     3  0.3643     0.6257 0.200 0.000 0.768 0.024 0.008 0.000
#> GSM1105466     4  0.4561     0.6164 0.000 0.036 0.012 0.672 0.004 0.276
#> GSM1105479     6  0.4905     0.4228 0.000 0.164 0.000 0.160 0.004 0.672
#> GSM1105502     3  0.3194     0.6147 0.172 0.000 0.808 0.004 0.012 0.004
#> GSM1105515     1  0.0146     0.7882 0.996 0.000 0.004 0.000 0.000 0.000
#> GSM1105523     3  0.4306     0.5839 0.004 0.000 0.756 0.148 0.012 0.080
#> GSM1105550     4  0.3219     0.6300 0.004 0.000 0.192 0.792 0.012 0.000
#> GSM1105450     2  0.0260     0.8302 0.000 0.992 0.000 0.000 0.008 0.000
#> GSM1105451     2  0.0291     0.8281 0.000 0.992 0.004 0.000 0.000 0.004
#> GSM1105454     6  0.5665     0.6501 0.000 0.028 0.152 0.028 0.124 0.668
#> GSM1105468     2  0.0260     0.8302 0.000 0.992 0.000 0.000 0.008 0.000
#> GSM1105481     6  0.5551     0.6134 0.000 0.016 0.192 0.020 0.120 0.652
#> GSM1105504     3  0.4281     0.4969 0.000 0.000 0.748 0.020 0.060 0.172
#> GSM1105517     4  0.5048     0.4929 0.120 0.000 0.192 0.672 0.016 0.000
#> GSM1105525     3  0.4146     0.6356 0.048 0.000 0.800 0.100 0.020 0.032
#> GSM1105552     3  0.6785     0.5585 0.100 0.000 0.592 0.164 0.076 0.068
#> GSM1105452     5  0.3426     0.8964 0.000 0.276 0.004 0.000 0.720 0.000
#> GSM1105453     2  0.0436     0.8287 0.000 0.988 0.004 0.000 0.004 0.004
#> GSM1105456     6  0.5625     0.6475 0.000 0.024 0.156 0.028 0.124 0.668

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) other(p) time(p) individual(p) k
#> SD:kmeans 117    0.896 0.407198   0.791       0.00562 2
#> SD:kmeans 107    0.706 0.788028   0.638       0.00474 3
#> SD:kmeans  47    0.534 0.584835   0.803       0.05414 4
#> SD:kmeans  65    0.444 0.481815   0.677       0.07807 5
#> SD:kmeans  98    0.719 0.000299   0.762       0.00120 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 44956 rows and 120 columns.
#>   Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'SD' method.
#>   Subgroups are detected by 'skmeans' method.
#>   Performed in total 1250 partitions by row resampling.
#>   Best k for subgroups seems to be 2.
#> 
#> Following methods can be applied to this 'ConsensusPartition' object:
#>  [1] "cola_report"             "collect_classes"         "collect_plots"          
#>  [4] "collect_stats"           "colnames"                "compare_signatures"     
#>  [7] "consensus_heatmap"       "dimension_reduction"     "functional_enrichment"  
#> [10] "get_anno_col"            "get_anno"                "get_classes"            
#> [13] "get_consensus"           "get_matrix"              "get_membership"         
#> [16] "get_param"               "get_signatures"          "get_stats"              
#> [19] "is_best_k"               "is_stable_k"             "membership_heatmap"     
#> [22] "ncol"                    "nrow"                    "plot_ecdf"              
#> [25] "rownames"                "select_partition_number" "show"                   
#> [28] "suggest_best_k"          "test_to_known_factors"

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

collect_plots(res)

plot of chunk SD-skmeans-collect-plots

The plots are:

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

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

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

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

select_partition_number(res)

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

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

get_stats(res)
#>   k 1-PAC mean_silhouette concordance area_increased  Rand Jaccard
#> 2 2 0.853           0.929       0.968         0.4994 0.503   0.503
#> 3 3 0.663           0.798       0.883         0.3154 0.815   0.641
#> 4 4 0.761           0.815       0.899         0.1150 0.865   0.640
#> 5 5 0.721           0.646       0.797         0.0686 0.906   0.681
#> 6 6 0.756           0.755       0.853         0.0484 0.882   0.547

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
#> GSM1105438     2   0.000      0.959 0.000 1.000
#> GSM1105486     2   0.000      0.959 0.000 1.000
#> GSM1105487     1   0.000      0.975 1.000 0.000
#> GSM1105490     2   0.000      0.959 0.000 1.000
#> GSM1105491     2   0.706      0.779 0.192 0.808
#> GSM1105495     2   0.722      0.770 0.200 0.800
#> GSM1105498     2   0.969      0.411 0.396 0.604
#> GSM1105499     1   0.000      0.975 1.000 0.000
#> GSM1105506     2   0.000      0.959 0.000 1.000
#> GSM1105442     2   0.000      0.959 0.000 1.000
#> GSM1105511     2   0.000      0.959 0.000 1.000
#> GSM1105514     2   0.000      0.959 0.000 1.000
#> GSM1105518     2   0.416      0.891 0.084 0.916
#> GSM1105522     1   0.000      0.975 1.000 0.000
#> GSM1105534     1   0.000      0.975 1.000 0.000
#> GSM1105535     1   0.000      0.975 1.000 0.000
#> GSM1105538     1   0.000      0.975 1.000 0.000
#> GSM1105542     2   0.000      0.959 0.000 1.000
#> GSM1105443     2   0.000      0.959 0.000 1.000
#> GSM1105551     1   0.000      0.975 1.000 0.000
#> GSM1105554     1   0.000      0.975 1.000 0.000
#> GSM1105555     1   0.000      0.975 1.000 0.000
#> GSM1105447     2   0.000      0.959 0.000 1.000
#> GSM1105467     2   0.000      0.959 0.000 1.000
#> GSM1105470     2   0.000      0.959 0.000 1.000
#> GSM1105471     2   0.443      0.884 0.092 0.908
#> GSM1105474     2   0.000      0.959 0.000 1.000
#> GSM1105475     2   0.000      0.959 0.000 1.000
#> GSM1105440     1   0.000      0.975 1.000 0.000
#> GSM1105488     2   0.000      0.959 0.000 1.000
#> GSM1105489     1   0.000      0.975 1.000 0.000
#> GSM1105492     1   0.000      0.975 1.000 0.000
#> GSM1105493     1   0.000      0.975 1.000 0.000
#> GSM1105497     2   0.000      0.959 0.000 1.000
#> GSM1105500     2   0.000      0.959 0.000 1.000
#> GSM1105501     2   0.000      0.959 0.000 1.000
#> GSM1105508     1   0.000      0.975 1.000 0.000
#> GSM1105444     2   0.000      0.959 0.000 1.000
#> GSM1105513     2   0.000      0.959 0.000 1.000
#> GSM1105516     1   0.730      0.747 0.796 0.204
#> GSM1105520     2   0.891      0.602 0.308 0.692
#> GSM1105524     1   0.000      0.975 1.000 0.000
#> GSM1105536     2   0.000      0.959 0.000 1.000
#> GSM1105537     1   0.000      0.975 1.000 0.000
#> GSM1105540     1   0.000      0.975 1.000 0.000
#> GSM1105544     1   0.939      0.470 0.644 0.356
#> GSM1105445     2   0.000      0.959 0.000 1.000
#> GSM1105553     2   0.978      0.368 0.412 0.588
#> GSM1105556     1   0.000      0.975 1.000 0.000
#> GSM1105557     2   0.000      0.959 0.000 1.000
#> GSM1105449     2   0.000      0.959 0.000 1.000
#> GSM1105469     1   0.416      0.894 0.916 0.084
#> GSM1105472     2   0.000      0.959 0.000 1.000
#> GSM1105473     1   0.000      0.975 1.000 0.000
#> GSM1105476     2   0.000      0.959 0.000 1.000
#> GSM1105477     2   0.000      0.959 0.000 1.000
#> GSM1105478     2   0.680      0.794 0.180 0.820
#> GSM1105510     2   0.000      0.959 0.000 1.000
#> GSM1105530     1   0.000      0.975 1.000 0.000
#> GSM1105539     1   0.000      0.975 1.000 0.000
#> GSM1105480     2   0.000      0.959 0.000 1.000
#> GSM1105512     1   0.000      0.975 1.000 0.000
#> GSM1105532     1   0.000      0.975 1.000 0.000
#> GSM1105541     1   0.000      0.975 1.000 0.000
#> GSM1105439     2   0.000      0.959 0.000 1.000
#> GSM1105463     1   0.000      0.975 1.000 0.000
#> GSM1105482     1   0.000      0.975 1.000 0.000
#> GSM1105483     1   0.760      0.725 0.780 0.220
#> GSM1105494     2   0.000      0.959 0.000 1.000
#> GSM1105503     1   0.775      0.682 0.772 0.228
#> GSM1105507     1   0.584      0.831 0.860 0.140
#> GSM1105446     2   0.000      0.959 0.000 1.000
#> GSM1105519     1   0.000      0.975 1.000 0.000
#> GSM1105526     2   0.000      0.959 0.000 1.000
#> GSM1105527     2   0.653      0.791 0.168 0.832
#> GSM1105531     1   0.000      0.975 1.000 0.000
#> GSM1105543     2   0.000      0.959 0.000 1.000
#> GSM1105546     1   0.000      0.975 1.000 0.000
#> GSM1105547     1   0.000      0.975 1.000 0.000
#> GSM1105455     2   0.000      0.959 0.000 1.000
#> GSM1105458     2   0.000      0.959 0.000 1.000
#> GSM1105459     2   0.000      0.959 0.000 1.000
#> GSM1105462     1   0.000      0.975 1.000 0.000
#> GSM1105441     2   0.000      0.959 0.000 1.000
#> GSM1105465     2   0.000      0.959 0.000 1.000
#> GSM1105484     2   0.000      0.959 0.000 1.000
#> GSM1105485     2   0.000      0.959 0.000 1.000
#> GSM1105496     1   0.000      0.975 1.000 0.000
#> GSM1105505     1   0.000      0.975 1.000 0.000
#> GSM1105509     1   0.000      0.975 1.000 0.000
#> GSM1105448     2   0.000      0.959 0.000 1.000
#> GSM1105521     1   0.000      0.975 1.000 0.000
#> GSM1105528     2   0.000      0.959 0.000 1.000
#> GSM1105529     2   0.000      0.959 0.000 1.000
#> GSM1105533     1   0.000      0.975 1.000 0.000
#> GSM1105545     2   0.000      0.959 0.000 1.000
#> GSM1105548     1   0.000      0.975 1.000 0.000
#> GSM1105549     1   0.000      0.975 1.000 0.000
#> GSM1105457     2   0.000      0.959 0.000 1.000
#> GSM1105460     2   0.000      0.959 0.000 1.000
#> GSM1105461     2   0.000      0.959 0.000 1.000
#> GSM1105464     1   0.000      0.975 1.000 0.000
#> GSM1105466     2   0.000      0.959 0.000 1.000
#> GSM1105479     2   0.000      0.959 0.000 1.000
#> GSM1105502     1   0.000      0.975 1.000 0.000
#> GSM1105515     1   0.000      0.975 1.000 0.000
#> GSM1105523     1   0.000      0.975 1.000 0.000
#> GSM1105550     1   0.000      0.975 1.000 0.000
#> GSM1105450     2   0.000      0.959 0.000 1.000
#> GSM1105451     2   0.000      0.959 0.000 1.000
#> GSM1105454     2   0.722      0.770 0.200 0.800
#> GSM1105468     2   0.000      0.959 0.000 1.000
#> GSM1105481     2   0.722      0.770 0.200 0.800
#> GSM1105504     1   0.000      0.975 1.000 0.000
#> GSM1105517     1   0.000      0.975 1.000 0.000
#> GSM1105525     1   0.000      0.975 1.000 0.000
#> GSM1105552     1   0.000      0.975 1.000 0.000
#> GSM1105452     2   0.000      0.959 0.000 1.000
#> GSM1105453     2   0.000      0.959 0.000 1.000
#> GSM1105456     2   0.722      0.770 0.200 0.800

show/hide code output

cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#>            class entropy silhouette    p1    p2    p3
#> GSM1105438     2  0.0000      0.920 0.000 1.000 0.000
#> GSM1105486     2  0.0000      0.920 0.000 1.000 0.000
#> GSM1105487     1  0.4121      0.852 0.832 0.000 0.168
#> GSM1105490     3  0.5968      0.673 0.000 0.364 0.636
#> GSM1105491     2  0.5968      0.455 0.000 0.636 0.364
#> GSM1105495     2  0.6026      0.439 0.000 0.624 0.376
#> GSM1105498     3  0.0000      0.739 0.000 0.000 1.000
#> GSM1105499     1  0.0000      0.875 1.000 0.000 0.000
#> GSM1105506     3  0.5968      0.673 0.000 0.364 0.636
#> GSM1105442     2  0.3816      0.766 0.000 0.852 0.148
#> GSM1105511     3  0.5968      0.673 0.000 0.364 0.636
#> GSM1105514     2  0.0000      0.920 0.000 1.000 0.000
#> GSM1105518     3  0.0000      0.739 0.000 0.000 1.000
#> GSM1105522     1  0.0000      0.875 1.000 0.000 0.000
#> GSM1105534     1  0.0000      0.875 1.000 0.000 0.000
#> GSM1105535     1  0.0000      0.875 1.000 0.000 0.000
#> GSM1105538     1  0.0000      0.875 1.000 0.000 0.000
#> GSM1105542     2  0.0237      0.918 0.000 0.996 0.004
#> GSM1105443     3  0.5968      0.673 0.000 0.364 0.636
#> GSM1105551     1  0.4235      0.850 0.824 0.000 0.176
#> GSM1105554     1  0.0000      0.875 1.000 0.000 0.000
#> GSM1105555     1  0.4235      0.850 0.824 0.000 0.176
#> GSM1105447     3  0.5016      0.715 0.000 0.240 0.760
#> GSM1105467     2  0.0000      0.920 0.000 1.000 0.000
#> GSM1105470     2  0.0000      0.920 0.000 1.000 0.000
#> GSM1105471     3  0.0237      0.740 0.000 0.004 0.996
#> GSM1105474     2  0.0000      0.920 0.000 1.000 0.000
#> GSM1105475     2  0.0000      0.920 0.000 1.000 0.000
#> GSM1105440     1  0.0000      0.875 1.000 0.000 0.000
#> GSM1105488     2  0.0237      0.918 0.000 0.996 0.004
#> GSM1105489     1  0.4235      0.850 0.824 0.000 0.176
#> GSM1105492     1  0.0000      0.875 1.000 0.000 0.000
#> GSM1105493     1  0.4235      0.850 0.824 0.000 0.176
#> GSM1105497     2  0.4555      0.702 0.000 0.800 0.200
#> GSM1105500     2  0.0237      0.918 0.000 0.996 0.004
#> GSM1105501     2  0.6553     -0.125 0.008 0.580 0.412
#> GSM1105508     1  0.0000      0.875 1.000 0.000 0.000
#> GSM1105444     2  0.0000      0.920 0.000 1.000 0.000
#> GSM1105513     3  0.5968      0.673 0.000 0.364 0.636
#> GSM1105516     1  0.4178      0.698 0.828 0.172 0.000
#> GSM1105520     3  0.0000      0.739 0.000 0.000 1.000
#> GSM1105524     1  0.0000      0.875 1.000 0.000 0.000
#> GSM1105536     2  0.0000      0.920 0.000 1.000 0.000
#> GSM1105537     1  0.0000      0.875 1.000 0.000 0.000
#> GSM1105540     1  0.0000      0.875 1.000 0.000 0.000
#> GSM1105544     1  0.6647      0.161 0.592 0.012 0.396
#> GSM1105445     3  0.0237      0.740 0.000 0.004 0.996
#> GSM1105553     3  0.0000      0.739 0.000 0.000 1.000
#> GSM1105556     1  0.0000      0.875 1.000 0.000 0.000
#> GSM1105557     3  0.5968      0.673 0.000 0.364 0.636
#> GSM1105449     2  0.0592      0.909 0.000 0.988 0.012
#> GSM1105469     3  0.6111      0.421 0.396 0.000 0.604
#> GSM1105472     2  0.0000      0.920 0.000 1.000 0.000
#> GSM1105473     1  0.4235      0.850 0.824 0.000 0.176
#> GSM1105476     2  0.0000      0.920 0.000 1.000 0.000
#> GSM1105477     2  0.0000      0.920 0.000 1.000 0.000
#> GSM1105478     3  0.0237      0.740 0.000 0.004 0.996
#> GSM1105510     2  0.0237      0.918 0.000 0.996 0.004
#> GSM1105530     1  0.4235      0.850 0.824 0.000 0.176
#> GSM1105539     1  0.4235      0.850 0.824 0.000 0.176
#> GSM1105480     3  0.6662      0.718 0.044 0.252 0.704
#> GSM1105512     1  0.0000      0.875 1.000 0.000 0.000
#> GSM1105532     1  0.4235      0.850 0.824 0.000 0.176
#> GSM1105541     1  0.4235      0.850 0.824 0.000 0.176
#> GSM1105439     3  0.5968      0.673 0.000 0.364 0.636
#> GSM1105463     1  0.5948      0.683 0.640 0.000 0.360
#> GSM1105482     1  0.0000      0.875 1.000 0.000 0.000
#> GSM1105483     3  0.8259      0.669 0.216 0.152 0.632
#> GSM1105494     3  0.3340      0.739 0.000 0.120 0.880
#> GSM1105503     3  0.0237      0.737 0.004 0.000 0.996
#> GSM1105507     1  0.0000      0.875 1.000 0.000 0.000
#> GSM1105446     2  0.0000      0.920 0.000 1.000 0.000
#> GSM1105519     1  0.0000      0.875 1.000 0.000 0.000
#> GSM1105526     2  0.0000      0.920 0.000 1.000 0.000
#> GSM1105527     3  0.8220      0.671 0.212 0.152 0.636
#> GSM1105531     1  0.5948      0.683 0.640 0.000 0.360
#> GSM1105543     2  0.0000      0.920 0.000 1.000 0.000
#> GSM1105546     1  0.0000      0.875 1.000 0.000 0.000
#> GSM1105547     1  0.0000      0.875 1.000 0.000 0.000
#> GSM1105455     3  0.5968      0.673 0.000 0.364 0.636
#> GSM1105458     2  0.4235      0.744 0.000 0.824 0.176
#> GSM1105459     2  0.0000      0.920 0.000 1.000 0.000
#> GSM1105462     1  0.5948      0.683 0.640 0.000 0.360
#> GSM1105441     2  0.0000      0.920 0.000 1.000 0.000
#> GSM1105465     2  0.5968      0.455 0.000 0.636 0.364
#> GSM1105484     2  0.0237      0.918 0.000 0.996 0.004
#> GSM1105485     2  0.0237      0.918 0.000 0.996 0.004
#> GSM1105496     3  0.0747      0.725 0.016 0.000 0.984
#> GSM1105505     1  0.5948      0.683 0.640 0.000 0.360
#> GSM1105509     1  0.0000      0.875 1.000 0.000 0.000
#> GSM1105448     2  0.0000      0.920 0.000 1.000 0.000
#> GSM1105521     1  0.0000      0.875 1.000 0.000 0.000
#> GSM1105528     2  0.0237      0.918 0.000 0.996 0.004
#> GSM1105529     2  0.0237      0.918 0.000 0.996 0.004
#> GSM1105533     1  0.4235      0.850 0.824 0.000 0.176
#> GSM1105545     2  0.0000      0.920 0.000 1.000 0.000
#> GSM1105548     1  0.4235      0.850 0.824 0.000 0.176
#> GSM1105549     1  0.2356      0.868 0.928 0.000 0.072
#> GSM1105457     3  0.5968      0.673 0.000 0.364 0.636
#> GSM1105460     2  0.1643      0.874 0.000 0.956 0.044
#> GSM1105461     2  0.0000      0.920 0.000 1.000 0.000
#> GSM1105464     1  0.4235      0.850 0.824 0.000 0.176
#> GSM1105466     3  0.5968      0.673 0.000 0.364 0.636
#> GSM1105479     3  0.5810      0.687 0.000 0.336 0.664
#> GSM1105502     1  0.4235      0.850 0.824 0.000 0.176
#> GSM1105515     1  0.0000      0.875 1.000 0.000 0.000
#> GSM1105523     1  0.6095      0.595 0.608 0.000 0.392
#> GSM1105550     1  0.0000      0.875 1.000 0.000 0.000
#> GSM1105450     2  0.0000      0.920 0.000 1.000 0.000
#> GSM1105451     2  0.0000      0.920 0.000 1.000 0.000
#> GSM1105454     3  0.0000      0.739 0.000 0.000 1.000
#> GSM1105468     2  0.0000      0.920 0.000 1.000 0.000
#> GSM1105481     2  0.6154      0.387 0.000 0.592 0.408
#> GSM1105504     1  0.5948      0.683 0.640 0.000 0.360
#> GSM1105517     1  0.0000      0.875 1.000 0.000 0.000
#> GSM1105525     1  0.4235      0.850 0.824 0.000 0.176
#> GSM1105552     1  0.5016      0.804 0.760 0.000 0.240
#> GSM1105452     2  0.0237      0.918 0.000 0.996 0.004
#> GSM1105453     2  0.0000      0.920 0.000 1.000 0.000
#> GSM1105456     3  0.0000      0.739 0.000 0.000 1.000

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>            class entropy silhouette    p1    p2    p3    p4
#> GSM1105438     2  0.0921     0.8575 0.000 0.972 0.000 0.028
#> GSM1105486     2  0.3444     0.8314 0.000 0.816 0.000 0.184
#> GSM1105487     1  0.1118     0.8935 0.964 0.000 0.036 0.000
#> GSM1105490     4  0.1042     0.8748 0.000 0.008 0.020 0.972
#> GSM1105491     2  0.4925     0.1616 0.000 0.572 0.428 0.000
#> GSM1105495     3  0.1389     0.8921 0.000 0.048 0.952 0.000
#> GSM1105498     3  0.1474     0.9200 0.000 0.000 0.948 0.052
#> GSM1105499     1  0.0000     0.9026 1.000 0.000 0.000 0.000
#> GSM1105506     4  0.0817     0.8751 0.000 0.000 0.024 0.976
#> GSM1105442     2  0.0817     0.8526 0.000 0.976 0.024 0.000
#> GSM1105511     4  0.0707     0.8754 0.000 0.000 0.020 0.980
#> GSM1105514     2  0.0921     0.8575 0.000 0.972 0.000 0.028
#> GSM1105518     3  0.1389     0.9221 0.000 0.000 0.952 0.048
#> GSM1105522     1  0.0000     0.9026 1.000 0.000 0.000 0.000
#> GSM1105534     1  0.0000     0.9026 1.000 0.000 0.000 0.000
#> GSM1105535     1  0.0000     0.9026 1.000 0.000 0.000 0.000
#> GSM1105538     1  0.0000     0.9026 1.000 0.000 0.000 0.000
#> GSM1105542     2  0.0817     0.8526 0.000 0.976 0.024 0.000
#> GSM1105443     4  0.1637     0.8513 0.000 0.060 0.000 0.940
#> GSM1105551     1  0.2921     0.8480 0.860 0.000 0.140 0.000
#> GSM1105554     1  0.0000     0.9026 1.000 0.000 0.000 0.000
#> GSM1105555     1  0.3172     0.8356 0.840 0.000 0.160 0.000
#> GSM1105447     2  0.4998     0.1990 0.000 0.512 0.000 0.488
#> GSM1105467     2  0.3444     0.8314 0.000 0.816 0.000 0.184
#> GSM1105470     2  0.3444     0.8314 0.000 0.816 0.000 0.184
#> GSM1105471     3  0.5000     0.0301 0.000 0.000 0.500 0.500
#> GSM1105474     2  0.3444     0.8314 0.000 0.816 0.000 0.184
#> GSM1105475     4  0.3486     0.7089 0.000 0.188 0.000 0.812
#> GSM1105440     1  0.0000     0.9026 1.000 0.000 0.000 0.000
#> GSM1105488     2  0.0817     0.8526 0.000 0.976 0.024 0.000
#> GSM1105489     1  0.2760     0.8544 0.872 0.000 0.128 0.000
#> GSM1105492     1  0.0000     0.9026 1.000 0.000 0.000 0.000
#> GSM1105493     1  0.3172     0.8356 0.840 0.000 0.160 0.000
#> GSM1105497     2  0.1716     0.8316 0.000 0.936 0.064 0.000
#> GSM1105500     2  0.1191     0.8497 0.004 0.968 0.024 0.004
#> GSM1105501     4  0.0817     0.8657 0.000 0.024 0.000 0.976
#> GSM1105508     1  0.0188     0.9010 0.996 0.000 0.000 0.004
#> GSM1105444     2  0.0817     0.8573 0.000 0.976 0.000 0.024
#> GSM1105513     4  0.1004     0.8754 0.000 0.004 0.024 0.972
#> GSM1105516     1  0.3108     0.8285 0.872 0.016 0.000 0.112
#> GSM1105520     3  0.1389     0.9221 0.000 0.000 0.952 0.048
#> GSM1105524     1  0.0000     0.9026 1.000 0.000 0.000 0.000
#> GSM1105536     4  0.4888     0.1366 0.000 0.412 0.000 0.588
#> GSM1105537     1  0.0000     0.9026 1.000 0.000 0.000 0.000
#> GSM1105540     1  0.0000     0.9026 1.000 0.000 0.000 0.000
#> GSM1105544     1  0.8154    -0.0243 0.420 0.180 0.024 0.376
#> GSM1105445     4  0.4804     0.3203 0.000 0.000 0.384 0.616
#> GSM1105553     3  0.1302     0.9225 0.000 0.000 0.956 0.044
#> GSM1105556     1  0.0000     0.9026 1.000 0.000 0.000 0.000
#> GSM1105557     4  0.0817     0.8751 0.000 0.000 0.024 0.976
#> GSM1105449     2  0.3444     0.8314 0.000 0.816 0.000 0.184
#> GSM1105469     4  0.2670     0.7974 0.072 0.000 0.024 0.904
#> GSM1105472     2  0.3444     0.8314 0.000 0.816 0.000 0.184
#> GSM1105473     1  0.3311     0.8303 0.828 0.000 0.172 0.000
#> GSM1105476     2  0.3444     0.8314 0.000 0.816 0.000 0.184
#> GSM1105477     2  0.3266     0.7381 0.000 0.832 0.000 0.168
#> GSM1105478     4  0.1637     0.8550 0.000 0.000 0.060 0.940
#> GSM1105510     2  0.0817     0.8526 0.000 0.976 0.024 0.000
#> GSM1105530     1  0.3444     0.8233 0.816 0.000 0.184 0.000
#> GSM1105539     1  0.3486     0.8197 0.812 0.000 0.188 0.000
#> GSM1105480     4  0.1022     0.8701 0.000 0.000 0.032 0.968
#> GSM1105512     1  0.0000     0.9026 1.000 0.000 0.000 0.000
#> GSM1105532     1  0.3444     0.8233 0.816 0.000 0.184 0.000
#> GSM1105541     1  0.3444     0.8233 0.816 0.000 0.184 0.000
#> GSM1105439     4  0.0469     0.8700 0.000 0.012 0.000 0.988
#> GSM1105463     3  0.1389     0.9092 0.048 0.000 0.952 0.000
#> GSM1105482     1  0.0000     0.9026 1.000 0.000 0.000 0.000
#> GSM1105483     4  0.0817     0.8751 0.000 0.000 0.024 0.976
#> GSM1105494     4  0.4720     0.5981 0.000 0.016 0.264 0.720
#> GSM1105503     3  0.1389     0.9221 0.000 0.000 0.952 0.048
#> GSM1105507     1  0.2011     0.8602 0.920 0.000 0.000 0.080
#> GSM1105446     2  0.0469     0.8546 0.000 0.988 0.012 0.000
#> GSM1105519     1  0.0000     0.9026 1.000 0.000 0.000 0.000
#> GSM1105526     4  0.4933     0.0643 0.000 0.432 0.000 0.568
#> GSM1105527     4  0.0817     0.8751 0.000 0.000 0.024 0.976
#> GSM1105531     3  0.1302     0.9119 0.044 0.000 0.956 0.000
#> GSM1105543     2  0.0188     0.8560 0.000 0.996 0.000 0.004
#> GSM1105546     1  0.0000     0.9026 1.000 0.000 0.000 0.000
#> GSM1105547     1  0.0000     0.9026 1.000 0.000 0.000 0.000
#> GSM1105455     4  0.0592     0.8697 0.000 0.016 0.000 0.984
#> GSM1105458     2  0.4163     0.8162 0.000 0.792 0.020 0.188
#> GSM1105459     2  0.3444     0.8314 0.000 0.816 0.000 0.184
#> GSM1105462     3  0.1398     0.9140 0.040 0.000 0.956 0.004
#> GSM1105441     2  0.3444     0.8314 0.000 0.816 0.000 0.184
#> GSM1105465     2  0.1867     0.8260 0.000 0.928 0.072 0.000
#> GSM1105484     2  0.0817     0.8526 0.000 0.976 0.024 0.000
#> GSM1105485     2  0.0817     0.8526 0.000 0.976 0.024 0.000
#> GSM1105496     3  0.1516     0.9129 0.008 0.016 0.960 0.016
#> GSM1105505     3  0.1389     0.9092 0.048 0.000 0.952 0.000
#> GSM1105509     1  0.0188     0.9010 0.996 0.000 0.000 0.004
#> GSM1105448     2  0.0921     0.8575 0.000 0.972 0.000 0.028
#> GSM1105521     1  0.0000     0.9026 1.000 0.000 0.000 0.000
#> GSM1105528     2  0.0817     0.8526 0.000 0.976 0.024 0.000
#> GSM1105529     2  0.0817     0.8526 0.000 0.976 0.024 0.000
#> GSM1105533     1  0.3219     0.8339 0.836 0.000 0.164 0.000
#> GSM1105545     4  0.1474     0.8516 0.000 0.052 0.000 0.948
#> GSM1105548     1  0.1389     0.8895 0.952 0.000 0.048 0.000
#> GSM1105549     1  0.0000     0.9026 1.000 0.000 0.000 0.000
#> GSM1105457     4  0.0817     0.8751 0.000 0.000 0.024 0.976
#> GSM1105460     4  0.2081     0.8358 0.000 0.084 0.000 0.916
#> GSM1105461     2  0.3444     0.8314 0.000 0.816 0.000 0.184
#> GSM1105464     1  0.3444     0.8233 0.816 0.000 0.184 0.000
#> GSM1105466     4  0.0817     0.8751 0.000 0.000 0.024 0.976
#> GSM1105479     4  0.2919     0.8258 0.000 0.060 0.044 0.896
#> GSM1105502     1  0.3356     0.8280 0.824 0.000 0.176 0.000
#> GSM1105515     1  0.0000     0.9026 1.000 0.000 0.000 0.000
#> GSM1105523     3  0.1913     0.9078 0.040 0.000 0.940 0.020
#> GSM1105550     1  0.5403     0.4190 0.628 0.000 0.024 0.348
#> GSM1105450     2  0.3444     0.8314 0.000 0.816 0.000 0.184
#> GSM1105451     2  0.3444     0.8314 0.000 0.816 0.000 0.184
#> GSM1105454     3  0.1474     0.9223 0.000 0.000 0.948 0.052
#> GSM1105468     2  0.3444     0.8314 0.000 0.816 0.000 0.184
#> GSM1105481     3  0.1488     0.9118 0.000 0.012 0.956 0.032
#> GSM1105504     3  0.1389     0.9092 0.048 0.000 0.952 0.000
#> GSM1105517     1  0.0817     0.8955 0.976 0.000 0.024 0.000
#> GSM1105525     1  0.4391     0.7466 0.740 0.000 0.252 0.008
#> GSM1105552     1  0.4356     0.6886 0.708 0.000 0.292 0.000
#> GSM1105452     2  0.0817     0.8526 0.000 0.976 0.024 0.000
#> GSM1105453     2  0.3444     0.8314 0.000 0.816 0.000 0.184
#> GSM1105456     3  0.1474     0.9223 0.000 0.000 0.948 0.052

show/hide code output

cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#>            class entropy silhouette    p1    p2    p3    p4    p5
#> GSM1105438     2  0.3999    0.72352 0.000 0.656 0.000 0.000 0.344
#> GSM1105486     2  0.4269    0.77025 0.000 0.684 0.000 0.016 0.300
#> GSM1105487     1  0.3280    0.78756 0.808 0.004 0.184 0.004 0.000
#> GSM1105490     4  0.1478    0.77831 0.000 0.064 0.000 0.936 0.000
#> GSM1105491     5  0.3492    0.63863 0.000 0.188 0.016 0.000 0.796
#> GSM1105495     3  0.5901    0.66825 0.000 0.284 0.596 0.008 0.112
#> GSM1105498     3  0.6402    0.61075 0.000 0.288 0.504 0.208 0.000
#> GSM1105499     1  0.0162    0.83153 0.996 0.000 0.000 0.004 0.000
#> GSM1105506     4  0.1121    0.77724 0.000 0.044 0.000 0.956 0.000
#> GSM1105442     5  0.2516    0.71225 0.000 0.140 0.000 0.000 0.860
#> GSM1105511     4  0.1043    0.77630 0.000 0.040 0.000 0.960 0.000
#> GSM1105514     2  0.4135    0.72826 0.000 0.656 0.000 0.004 0.340
#> GSM1105518     3  0.5579    0.69581 0.000 0.300 0.600 0.100 0.000
#> GSM1105522     1  0.1153    0.82507 0.964 0.004 0.008 0.024 0.000
#> GSM1105534     1  0.0000    0.83126 1.000 0.000 0.000 0.000 0.000
#> GSM1105535     1  0.0324    0.83151 0.992 0.004 0.000 0.004 0.000
#> GSM1105538     1  0.0000    0.83126 1.000 0.000 0.000 0.000 0.000
#> GSM1105542     5  0.0000    0.78306 0.000 0.000 0.000 0.000 1.000
#> GSM1105443     4  0.5176    0.16673 0.000 0.468 0.000 0.492 0.040
#> GSM1105551     1  0.3387    0.78128 0.796 0.004 0.196 0.004 0.000
#> GSM1105554     1  0.0000    0.83126 1.000 0.000 0.000 0.000 0.000
#> GSM1105555     1  0.3366    0.77391 0.784 0.004 0.212 0.000 0.000
#> GSM1105447     2  0.2984    0.40462 0.000 0.860 0.000 0.108 0.032
#> GSM1105467     2  0.4269    0.77025 0.000 0.684 0.000 0.016 0.300
#> GSM1105470     2  0.4339    0.76924 0.000 0.684 0.000 0.020 0.296
#> GSM1105471     2  0.6038   -0.25769 0.000 0.576 0.240 0.184 0.000
#> GSM1105474     2  0.4193    0.76765 0.000 0.684 0.000 0.012 0.304
#> GSM1105475     2  0.5136    0.68425 0.000 0.692 0.000 0.128 0.180
#> GSM1105440     1  0.0324    0.83151 0.992 0.004 0.000 0.004 0.000
#> GSM1105488     5  0.0000    0.78306 0.000 0.000 0.000 0.000 1.000
#> GSM1105489     1  0.3231    0.78162 0.800 0.004 0.196 0.000 0.000
#> GSM1105492     1  0.0162    0.83144 0.996 0.004 0.000 0.000 0.000
#> GSM1105493     1  0.3508    0.75099 0.748 0.000 0.252 0.000 0.000
#> GSM1105497     5  0.3209    0.66126 0.000 0.180 0.008 0.000 0.812
#> GSM1105500     5  0.0566    0.77712 0.000 0.012 0.000 0.004 0.984
#> GSM1105501     4  0.3305    0.66514 0.000 0.224 0.000 0.776 0.000
#> GSM1105508     1  0.0324    0.83151 0.992 0.004 0.000 0.004 0.000
#> GSM1105444     2  0.4030    0.71160 0.000 0.648 0.000 0.000 0.352
#> GSM1105513     4  0.3177    0.69699 0.000 0.208 0.000 0.792 0.000
#> GSM1105516     1  0.3508    0.64917 0.748 0.000 0.000 0.252 0.000
#> GSM1105520     3  0.5506    0.70238 0.000 0.284 0.616 0.100 0.000
#> GSM1105524     1  0.0324    0.83151 0.992 0.004 0.000 0.004 0.000
#> GSM1105536     2  0.5618    0.31307 0.000 0.564 0.000 0.348 0.088
#> GSM1105537     1  0.0324    0.83151 0.992 0.004 0.000 0.004 0.000
#> GSM1105540     1  0.3131    0.76842 0.860 0.008 0.028 0.104 0.000
#> GSM1105544     5  0.6332    0.37662 0.256 0.016 0.000 0.152 0.576
#> GSM1105445     2  0.6655   -0.41210 0.000 0.404 0.228 0.368 0.000
#> GSM1105553     3  0.5892    0.69676 0.000 0.288 0.600 0.100 0.012
#> GSM1105556     1  0.0000    0.83126 1.000 0.000 0.000 0.000 0.000
#> GSM1105557     4  0.1197    0.77806 0.000 0.048 0.000 0.952 0.000
#> GSM1105449     2  0.3861    0.75000 0.000 0.728 0.000 0.008 0.264
#> GSM1105469     4  0.0955    0.73781 0.028 0.004 0.000 0.968 0.000
#> GSM1105472     2  0.4269    0.77025 0.000 0.684 0.000 0.016 0.300
#> GSM1105473     1  0.3876    0.70821 0.684 0.000 0.316 0.000 0.000
#> GSM1105476     2  0.4339    0.76924 0.000 0.684 0.000 0.020 0.296
#> GSM1105477     5  0.5624   -0.13256 0.000 0.388 0.000 0.080 0.532
#> GSM1105478     4  0.2017    0.74247 0.000 0.080 0.008 0.912 0.000
#> GSM1105510     5  0.0000    0.78306 0.000 0.000 0.000 0.000 1.000
#> GSM1105530     1  0.4988    0.59710 0.556 0.004 0.416 0.024 0.000
#> GSM1105539     1  0.4915    0.59554 0.556 0.004 0.420 0.020 0.000
#> GSM1105480     4  0.1341    0.76359 0.000 0.056 0.000 0.944 0.000
#> GSM1105512     1  0.0000    0.83126 1.000 0.000 0.000 0.000 0.000
#> GSM1105532     1  0.4988    0.59710 0.556 0.004 0.416 0.024 0.000
#> GSM1105541     1  0.4908    0.60074 0.560 0.004 0.416 0.020 0.000
#> GSM1105439     4  0.4304    0.23774 0.000 0.484 0.000 0.516 0.000
#> GSM1105463     3  0.0324    0.67500 0.004 0.004 0.992 0.000 0.000
#> GSM1105482     1  0.2280    0.81016 0.880 0.000 0.120 0.000 0.000
#> GSM1105483     4  0.0404    0.76112 0.000 0.012 0.000 0.988 0.000
#> GSM1105494     4  0.6351    0.00731 0.000 0.316 0.184 0.500 0.000
#> GSM1105503     3  0.4493    0.69771 0.000 0.136 0.756 0.108 0.000
#> GSM1105507     1  0.2891    0.70897 0.824 0.000 0.000 0.176 0.000
#> GSM1105446     5  0.3983    0.11929 0.000 0.340 0.000 0.000 0.660
#> GSM1105519     1  0.0000    0.83126 1.000 0.000 0.000 0.000 0.000
#> GSM1105526     4  0.5584    0.36473 0.000 0.324 0.000 0.584 0.092
#> GSM1105527     4  0.0510    0.76419 0.000 0.016 0.000 0.984 0.000
#> GSM1105531     3  0.0162    0.67672 0.000 0.004 0.996 0.000 0.000
#> GSM1105543     5  0.4249   -0.21855 0.000 0.432 0.000 0.000 0.568
#> GSM1105546     1  0.0162    0.83144 0.996 0.004 0.000 0.000 0.000
#> GSM1105547     1  0.0000    0.83126 1.000 0.000 0.000 0.000 0.000
#> GSM1105455     4  0.4648    0.25228 0.000 0.464 0.000 0.524 0.012
#> GSM1105458     2  0.1251    0.52921 0.000 0.956 0.000 0.008 0.036
#> GSM1105459     2  0.4269    0.77025 0.000 0.684 0.000 0.016 0.300
#> GSM1105462     3  0.0703    0.66320 0.000 0.000 0.976 0.024 0.000
#> GSM1105441     2  0.4161    0.76240 0.000 0.704 0.000 0.016 0.280
#> GSM1105465     5  0.3171    0.66626 0.000 0.176 0.008 0.000 0.816
#> GSM1105484     5  0.0000    0.78306 0.000 0.000 0.000 0.000 1.000
#> GSM1105485     5  0.0000    0.78306 0.000 0.000 0.000 0.000 1.000
#> GSM1105496     3  0.5922    0.68128 0.000 0.284 0.604 0.016 0.096
#> GSM1105505     3  0.0703    0.68245 0.000 0.024 0.976 0.000 0.000
#> GSM1105509     1  0.0324    0.83038 0.992 0.000 0.004 0.004 0.000
#> GSM1105448     2  0.3999    0.72352 0.000 0.656 0.000 0.000 0.344
#> GSM1105521     1  0.0162    0.83144 0.996 0.000 0.004 0.000 0.000
#> GSM1105528     5  0.0000    0.78306 0.000 0.000 0.000 0.000 1.000
#> GSM1105529     5  0.0000    0.78306 0.000 0.000 0.000 0.000 1.000
#> GSM1105533     1  0.4236    0.69829 0.664 0.004 0.328 0.004 0.000
#> GSM1105545     4  0.4060    0.44942 0.000 0.360 0.000 0.640 0.000
#> GSM1105548     1  0.2970    0.79393 0.828 0.004 0.168 0.000 0.000
#> GSM1105549     1  0.2660    0.80627 0.864 0.000 0.128 0.000 0.008
#> GSM1105457     4  0.1478    0.77814 0.000 0.064 0.000 0.936 0.000
#> GSM1105460     2  0.4292    0.41974 0.000 0.704 0.000 0.272 0.024
#> GSM1105461     2  0.4269    0.77025 0.000 0.684 0.000 0.016 0.300
#> GSM1105464     1  0.4760    0.60149 0.564 0.000 0.416 0.020 0.000
#> GSM1105466     4  0.1410    0.77776 0.000 0.060 0.000 0.940 0.000
#> GSM1105479     2  0.3837   -0.07115 0.000 0.692 0.000 0.308 0.000
#> GSM1105502     1  0.4389    0.66374 0.624 0.004 0.368 0.004 0.000
#> GSM1105515     1  0.0000    0.83126 1.000 0.000 0.000 0.000 0.000
#> GSM1105523     3  0.3197    0.55947 0.012 0.004 0.832 0.152 0.000
#> GSM1105550     1  0.6987    0.13763 0.372 0.008 0.260 0.360 0.000
#> GSM1105450     2  0.4269    0.77025 0.000 0.684 0.000 0.016 0.300
#> GSM1105451     2  0.4269    0.77025 0.000 0.684 0.000 0.016 0.300
#> GSM1105454     3  0.5579    0.69581 0.000 0.300 0.600 0.100 0.000
#> GSM1105468     2  0.4269    0.77025 0.000 0.684 0.000 0.016 0.300
#> GSM1105481     3  0.3957    0.71726 0.000 0.280 0.712 0.008 0.000
#> GSM1105504     3  0.0000    0.67527 0.000 0.000 1.000 0.000 0.000
#> GSM1105517     1  0.3806    0.74602 0.804 0.004 0.152 0.040 0.000
#> GSM1105525     3  0.6427   -0.36746 0.392 0.004 0.452 0.152 0.000
#> GSM1105552     1  0.4383    0.60488 0.572 0.004 0.424 0.000 0.000
#> GSM1105452     5  0.0000    0.78306 0.000 0.000 0.000 0.000 1.000
#> GSM1105453     2  0.4193    0.76765 0.000 0.684 0.000 0.012 0.304
#> GSM1105456     3  0.5579    0.69581 0.000 0.300 0.600 0.100 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
#> GSM1105438     2  0.0260      0.873 0.000 0.992 0.000 0.000 0.008 0.000
#> GSM1105486     2  0.0000      0.875 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1105487     1  0.4353      0.722 0.720 0.000 0.220 0.000 0.032 0.028
#> GSM1105490     4  0.0520      0.855 0.000 0.008 0.000 0.984 0.000 0.008
#> GSM1105491     5  0.2176      0.853 0.000 0.024 0.000 0.000 0.896 0.080
#> GSM1105495     6  0.2882      0.692 0.000 0.000 0.008 0.000 0.180 0.812
#> GSM1105498     6  0.3556      0.731 0.000 0.000 0.028 0.140 0.024 0.808
#> GSM1105499     1  0.0865      0.856 0.964 0.000 0.036 0.000 0.000 0.000
#> GSM1105506     4  0.0291      0.855 0.000 0.000 0.000 0.992 0.004 0.004
#> GSM1105442     5  0.2164      0.862 0.000 0.032 0.000 0.000 0.900 0.068
#> GSM1105511     4  0.0508      0.853 0.000 0.000 0.012 0.984 0.004 0.000
#> GSM1105514     2  0.0146      0.874 0.000 0.996 0.000 0.000 0.004 0.000
#> GSM1105518     6  0.1148      0.811 0.000 0.004 0.016 0.020 0.000 0.960
#> GSM1105522     1  0.3411      0.769 0.804 0.000 0.160 0.000 0.012 0.024
#> GSM1105534     1  0.0000      0.858 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM1105535     1  0.2164      0.849 0.908 0.000 0.060 0.000 0.012 0.020
#> GSM1105538     1  0.0291      0.859 0.992 0.000 0.000 0.000 0.004 0.004
#> GSM1105542     5  0.2092      0.906 0.000 0.124 0.000 0.000 0.876 0.000
#> GSM1105443     2  0.4589      0.550 0.000 0.660 0.008 0.288 0.040 0.004
#> GSM1105551     1  0.4637      0.720 0.708 0.000 0.212 0.000 0.040 0.040
#> GSM1105554     1  0.0000      0.858 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM1105555     1  0.4430      0.680 0.708 0.000 0.232 0.000 0.032 0.028
#> GSM1105447     2  0.5833      0.390 0.000 0.580 0.008 0.060 0.056 0.296
#> GSM1105467     2  0.0146      0.875 0.000 0.996 0.000 0.000 0.004 0.000
#> GSM1105470     2  0.0000      0.875 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1105471     6  0.5701      0.520 0.000 0.260 0.012 0.132 0.008 0.588
#> GSM1105474     2  0.0146      0.874 0.000 0.996 0.000 0.000 0.004 0.000
#> GSM1105475     2  0.0937      0.859 0.000 0.960 0.000 0.040 0.000 0.000
#> GSM1105440     1  0.2358      0.847 0.900 0.000 0.056 0.000 0.016 0.028
#> GSM1105488     5  0.2092      0.906 0.000 0.124 0.000 0.000 0.876 0.000
#> GSM1105489     1  0.4082      0.734 0.752 0.000 0.192 0.000 0.028 0.028
#> GSM1105492     1  0.1053      0.858 0.964 0.000 0.004 0.000 0.012 0.020
#> GSM1105493     1  0.3897      0.539 0.696 0.000 0.280 0.000 0.024 0.000
#> GSM1105497     5  0.2006      0.848 0.000 0.016 0.000 0.000 0.904 0.080
#> GSM1105500     5  0.3605      0.839 0.000 0.096 0.024 0.000 0.820 0.060
#> GSM1105501     4  0.2702      0.789 0.000 0.092 0.036 0.868 0.004 0.000
#> GSM1105508     1  0.2532      0.841 0.884 0.000 0.080 0.000 0.012 0.024
#> GSM1105444     2  0.0363      0.872 0.000 0.988 0.000 0.000 0.012 0.000
#> GSM1105513     4  0.5149      0.612 0.000 0.104 0.008 0.708 0.040 0.140
#> GSM1105516     1  0.4326      0.620 0.716 0.008 0.036 0.232 0.008 0.000
#> GSM1105520     6  0.1092      0.810 0.000 0.000 0.020 0.020 0.000 0.960
#> GSM1105524     1  0.2282      0.846 0.900 0.000 0.068 0.000 0.012 0.020
#> GSM1105536     2  0.4816      0.504 0.000 0.648 0.084 0.264 0.004 0.000
#> GSM1105537     1  0.2282      0.846 0.900 0.000 0.068 0.000 0.012 0.020
#> GSM1105540     1  0.5548      0.556 0.628 0.000 0.268 0.032 0.032 0.040
#> GSM1105544     5  0.7827      0.318 0.204 0.000 0.092 0.148 0.464 0.092
#> GSM1105445     6  0.4950      0.635 0.000 0.028 0.016 0.216 0.044 0.696
#> GSM1105553     6  0.1418      0.793 0.000 0.000 0.032 0.000 0.024 0.944
#> GSM1105556     1  0.0000      0.858 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM1105557     4  0.0405      0.855 0.000 0.004 0.000 0.988 0.000 0.008
#> GSM1105449     2  0.1964      0.843 0.000 0.920 0.004 0.012 0.056 0.008
#> GSM1105469     4  0.0972      0.848 0.000 0.000 0.028 0.964 0.008 0.000
#> GSM1105472     2  0.0000      0.875 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1105473     3  0.4328      0.263 0.460 0.000 0.520 0.000 0.020 0.000
#> GSM1105476     2  0.0146      0.874 0.000 0.996 0.000 0.000 0.004 0.000
#> GSM1105477     2  0.6006      0.467 0.000 0.604 0.080 0.112 0.204 0.000
#> GSM1105478     4  0.4647      0.552 0.000 0.000 0.024 0.696 0.052 0.228
#> GSM1105510     5  0.2092      0.906 0.000 0.124 0.000 0.000 0.876 0.000
#> GSM1105530     3  0.2135      0.787 0.128 0.000 0.872 0.000 0.000 0.000
#> GSM1105539     3  0.2135      0.787 0.128 0.000 0.872 0.000 0.000 0.000
#> GSM1105480     4  0.3256      0.755 0.000 0.000 0.020 0.836 0.032 0.112
#> GSM1105512     1  0.0547      0.857 0.980 0.000 0.020 0.000 0.000 0.000
#> GSM1105532     3  0.2135      0.787 0.128 0.000 0.872 0.000 0.000 0.000
#> GSM1105541     3  0.2135      0.787 0.128 0.000 0.872 0.000 0.000 0.000
#> GSM1105439     2  0.4464      0.477 0.000 0.624 0.008 0.340 0.028 0.000
#> GSM1105463     3  0.3126      0.648 0.000 0.000 0.752 0.000 0.000 0.248
#> GSM1105482     1  0.2282      0.815 0.888 0.000 0.088 0.000 0.024 0.000
#> GSM1105483     4  0.1010      0.846 0.000 0.000 0.036 0.960 0.004 0.000
#> GSM1105494     6  0.4583      0.540 0.000 0.000 0.032 0.288 0.020 0.660
#> GSM1105503     6  0.2301      0.754 0.000 0.000 0.096 0.020 0.000 0.884
#> GSM1105507     1  0.4610      0.689 0.728 0.000 0.048 0.192 0.016 0.016
#> GSM1105446     2  0.3330      0.534 0.000 0.716 0.000 0.000 0.284 0.000
#> GSM1105519     1  0.0547      0.857 0.980 0.000 0.020 0.000 0.000 0.000
#> GSM1105526     4  0.5283      0.578 0.000 0.236 0.076 0.648 0.040 0.000
#> GSM1105527     4  0.0508      0.853 0.000 0.000 0.012 0.984 0.004 0.000
#> GSM1105531     3  0.3175      0.642 0.000 0.000 0.744 0.000 0.000 0.256
#> GSM1105543     2  0.3076      0.611 0.000 0.760 0.000 0.000 0.240 0.000
#> GSM1105546     1  0.1966      0.855 0.924 0.000 0.024 0.000 0.024 0.028
#> GSM1105547     1  0.0632      0.856 0.976 0.000 0.000 0.000 0.024 0.000
#> GSM1105455     2  0.4315      0.516 0.000 0.648 0.008 0.324 0.016 0.004
#> GSM1105458     2  0.3560      0.772 0.000 0.828 0.008 0.012 0.064 0.088
#> GSM1105459     2  0.0000      0.875 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1105462     3  0.2597      0.696 0.000 0.000 0.824 0.000 0.000 0.176
#> GSM1105441     2  0.1511      0.852 0.000 0.940 0.004 0.012 0.044 0.000
#> GSM1105465     5  0.2122      0.855 0.000 0.024 0.000 0.000 0.900 0.076
#> GSM1105484     5  0.2003      0.904 0.000 0.116 0.000 0.000 0.884 0.000
#> GSM1105485     5  0.2092      0.906 0.000 0.124 0.000 0.000 0.876 0.000
#> GSM1105496     6  0.1334      0.800 0.000 0.000 0.032 0.000 0.020 0.948
#> GSM1105505     3  0.3797      0.387 0.000 0.000 0.580 0.000 0.000 0.420
#> GSM1105509     1  0.1349      0.847 0.940 0.000 0.056 0.004 0.000 0.000
#> GSM1105448     2  0.0260      0.873 0.000 0.992 0.000 0.000 0.008 0.000
#> GSM1105521     1  0.0547      0.857 0.980 0.000 0.020 0.000 0.000 0.000
#> GSM1105528     5  0.2092      0.906 0.000 0.124 0.000 0.000 0.876 0.000
#> GSM1105529     5  0.2092      0.906 0.000 0.124 0.000 0.000 0.876 0.000
#> GSM1105533     3  0.4027      0.550 0.308 0.000 0.672 0.000 0.008 0.012
#> GSM1105545     4  0.4640      0.606 0.000 0.232 0.084 0.680 0.004 0.000
#> GSM1105548     1  0.4366      0.748 0.748 0.000 0.168 0.000 0.048 0.036
#> GSM1105549     1  0.2662      0.788 0.856 0.000 0.120 0.000 0.024 0.000
#> GSM1105457     4  0.1312      0.845 0.000 0.004 0.008 0.956 0.020 0.012
#> GSM1105460     2  0.2697      0.810 0.000 0.876 0.008 0.068 0.048 0.000
#> GSM1105461     2  0.0000      0.875 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1105464     3  0.2219      0.785 0.136 0.000 0.864 0.000 0.000 0.000
#> GSM1105466     4  0.0951      0.849 0.000 0.000 0.008 0.968 0.020 0.004
#> GSM1105479     6  0.6799      0.311 0.000 0.316 0.008 0.192 0.044 0.440
#> GSM1105502     3  0.3166      0.733 0.184 0.000 0.800 0.000 0.008 0.008
#> GSM1105515     1  0.0000      0.858 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM1105523     3  0.2658      0.721 0.000 0.000 0.864 0.036 0.000 0.100
#> GSM1105550     3  0.3660      0.629 0.160 0.000 0.780 0.060 0.000 0.000
#> GSM1105450     2  0.0000      0.875 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1105451     2  0.0000      0.875 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1105454     6  0.1317      0.811 0.000 0.004 0.016 0.016 0.008 0.956
#> GSM1105468     2  0.0000      0.875 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1105481     6  0.2243      0.746 0.000 0.004 0.112 0.000 0.004 0.880
#> GSM1105504     3  0.3050      0.659 0.000 0.000 0.764 0.000 0.000 0.236
#> GSM1105517     3  0.4456      0.136 0.456 0.000 0.520 0.020 0.004 0.000
#> GSM1105525     3  0.2884      0.770 0.072 0.000 0.872 0.036 0.004 0.016
#> GSM1105552     3  0.2631      0.767 0.152 0.000 0.840 0.000 0.008 0.000
#> GSM1105452     5  0.2092      0.906 0.000 0.124 0.000 0.000 0.876 0.000
#> GSM1105453     2  0.0146      0.874 0.000 0.996 0.000 0.000 0.004 0.000
#> GSM1105456     6  0.1317      0.811 0.000 0.004 0.016 0.016 0.008 0.956

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) other(p) time(p) individual(p) k
#> SD:skmeans 117    0.820 0.672545   0.788      1.11e-02 2
#> SD:skmeans 113    0.907 0.456037   0.180      9.39e-04 3
#> SD:skmeans 112    0.247 0.706684   0.478      1.35e-02 4
#> SD:skmeans 102    0.230 0.885904   0.610      1.51e-02 5
#> SD:skmeans 112    0.235 0.000337   0.744      3.29e-05 6

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


SD:pam

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

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

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

res
#> A 'ConsensusPartition' object with k = 2, 3, 4, 5, 6.
#>   On a matrix with 44956 rows and 120 columns.
#>   Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'SD' method.
#>   Subgroups are detected by 'pam' method.
#>   Performed in total 1250 partitions by row resampling.
#>   Best k for subgroups seems to be 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.881           0.921       0.966         0.4778 0.513   0.513
#> 3 3 0.557           0.733       0.853         0.3184 0.818   0.664
#> 4 4 0.657           0.740       0.855         0.1661 0.826   0.571
#> 5 5 0.637           0.576       0.770         0.0673 0.887   0.604
#> 6 6 0.714           0.634       0.816         0.0504 0.936   0.711

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
#> GSM1105438     2  0.0000     0.9842 0.000 1.000
#> GSM1105486     2  0.0000     0.9842 0.000 1.000
#> GSM1105487     1  0.0000     0.9339 1.000 0.000
#> GSM1105490     2  0.0000     0.9842 0.000 1.000
#> GSM1105491     1  0.9754     0.3943 0.592 0.408
#> GSM1105495     2  0.0000     0.9842 0.000 1.000
#> GSM1105498     2  0.2043     0.9563 0.032 0.968
#> GSM1105499     1  0.0000     0.9339 1.000 0.000
#> GSM1105506     2  0.0000     0.9842 0.000 1.000
#> GSM1105442     2  0.0000     0.9842 0.000 1.000
#> GSM1105511     2  0.0000     0.9842 0.000 1.000
#> GSM1105514     2  0.0000     0.9842 0.000 1.000
#> GSM1105518     2  0.0000     0.9842 0.000 1.000
#> GSM1105522     1  0.0000     0.9339 1.000 0.000
#> GSM1105534     1  0.0000     0.9339 1.000 0.000
#> GSM1105535     1  0.0000     0.9339 1.000 0.000
#> GSM1105538     1  0.0000     0.9339 1.000 0.000
#> GSM1105542     2  0.0000     0.9842 0.000 1.000
#> GSM1105443     2  0.0000     0.9842 0.000 1.000
#> GSM1105551     1  0.0000     0.9339 1.000 0.000
#> GSM1105554     1  0.0000     0.9339 1.000 0.000
#> GSM1105555     1  0.0000     0.9339 1.000 0.000
#> GSM1105447     2  0.0000     0.9842 0.000 1.000
#> GSM1105467     2  0.0000     0.9842 0.000 1.000
#> GSM1105470     2  0.0000     0.9842 0.000 1.000
#> GSM1105471     2  0.0000     0.9842 0.000 1.000
#> GSM1105474     2  0.0000     0.9842 0.000 1.000
#> GSM1105475     2  0.0000     0.9842 0.000 1.000
#> GSM1105440     1  0.0000     0.9339 1.000 0.000
#> GSM1105488     2  0.0000     0.9842 0.000 1.000
#> GSM1105489     1  0.0000     0.9339 1.000 0.000
#> GSM1105492     1  0.0000     0.9339 1.000 0.000
#> GSM1105493     1  0.0000     0.9339 1.000 0.000
#> GSM1105497     2  0.0000     0.9842 0.000 1.000
#> GSM1105500     2  0.6148     0.8027 0.152 0.848
#> GSM1105501     2  0.0672     0.9780 0.008 0.992
#> GSM1105508     1  0.0000     0.9339 1.000 0.000
#> GSM1105444     2  0.0000     0.9842 0.000 1.000
#> GSM1105513     2  0.0000     0.9842 0.000 1.000
#> GSM1105516     1  0.8267     0.6743 0.740 0.260
#> GSM1105520     2  0.1843     0.9590 0.028 0.972
#> GSM1105524     1  0.0000     0.9339 1.000 0.000
#> GSM1105536     2  0.0938     0.9757 0.012 0.988
#> GSM1105537     1  0.0000     0.9339 1.000 0.000
#> GSM1105540     1  0.9754     0.3943 0.592 0.408
#> GSM1105544     1  0.9754     0.3943 0.592 0.408
#> GSM1105445     2  0.0000     0.9842 0.000 1.000
#> GSM1105553     2  0.7453     0.7019 0.212 0.788
#> GSM1105556     1  0.0000     0.9339 1.000 0.000
#> GSM1105557     2  0.0000     0.9842 0.000 1.000
#> GSM1105449     2  0.0000     0.9842 0.000 1.000
#> GSM1105469     2  0.0938     0.9757 0.012 0.988
#> GSM1105472     2  0.0000     0.9842 0.000 1.000
#> GSM1105473     1  0.0000     0.9339 1.000 0.000
#> GSM1105476     2  0.0000     0.9842 0.000 1.000
#> GSM1105477     2  0.0938     0.9757 0.012 0.988
#> GSM1105478     2  0.0000     0.9842 0.000 1.000
#> GSM1105510     2  0.0000     0.9842 0.000 1.000
#> GSM1105530     1  0.0000     0.9339 1.000 0.000
#> GSM1105539     1  0.0000     0.9339 1.000 0.000
#> GSM1105480     2  0.0000     0.9842 0.000 1.000
#> GSM1105512     1  0.0000     0.9339 1.000 0.000
#> GSM1105532     1  0.0000     0.9339 1.000 0.000
#> GSM1105541     1  0.0000     0.9339 1.000 0.000
#> GSM1105439     2  0.0000     0.9842 0.000 1.000
#> GSM1105463     1  0.0000     0.9339 1.000 0.000
#> GSM1105482     1  0.0000     0.9339 1.000 0.000
#> GSM1105483     2  0.0938     0.9757 0.012 0.988
#> GSM1105494     2  0.0000     0.9842 0.000 1.000
#> GSM1105503     2  0.0000     0.9842 0.000 1.000
#> GSM1105507     1  0.6712     0.7798 0.824 0.176
#> GSM1105446     2  0.0000     0.9842 0.000 1.000
#> GSM1105519     1  0.0000     0.9339 1.000 0.000
#> GSM1105526     2  0.0938     0.9757 0.012 0.988
#> GSM1105527     2  0.0938     0.9757 0.012 0.988
#> GSM1105531     1  0.7376     0.7472 0.792 0.208
#> GSM1105543     2  0.0000     0.9842 0.000 1.000
#> GSM1105546     1  0.0000     0.9339 1.000 0.000
#> GSM1105547     1  0.0000     0.9339 1.000 0.000
#> GSM1105455     2  0.0000     0.9842 0.000 1.000
#> GSM1105458     2  0.0000     0.9842 0.000 1.000
#> GSM1105459     2  0.0000     0.9842 0.000 1.000
#> GSM1105462     2  0.0938     0.9757 0.012 0.988
#> GSM1105441     2  0.0000     0.9842 0.000 1.000
#> GSM1105465     2  0.0000     0.9842 0.000 1.000
#> GSM1105484     2  0.0000     0.9842 0.000 1.000
#> GSM1105485     2  0.0938     0.9757 0.012 0.988
#> GSM1105496     1  0.9815     0.3684 0.580 0.420
#> GSM1105505     1  0.8955     0.5934 0.688 0.312
#> GSM1105509     1  0.0000     0.9339 1.000 0.000
#> GSM1105448     2  0.0000     0.9842 0.000 1.000
#> GSM1105521     1  0.0000     0.9339 1.000 0.000
#> GSM1105528     2  0.0000     0.9842 0.000 1.000
#> GSM1105529     2  0.0000     0.9842 0.000 1.000
#> GSM1105533     1  0.0000     0.9339 1.000 0.000
#> GSM1105545     2  0.0938     0.9757 0.012 0.988
#> GSM1105548     1  0.0000     0.9339 1.000 0.000
#> GSM1105549     1  0.0000     0.9339 1.000 0.000
#> GSM1105457     2  0.0000     0.9842 0.000 1.000
#> GSM1105460     2  0.0000     0.9842 0.000 1.000
#> GSM1105461     2  0.0000     0.9842 0.000 1.000
#> GSM1105464     1  0.0000     0.9339 1.000 0.000
#> GSM1105466     2  0.0000     0.9842 0.000 1.000
#> GSM1105479     2  0.0000     0.9842 0.000 1.000
#> GSM1105502     1  0.0000     0.9339 1.000 0.000
#> GSM1105515     1  0.0000     0.9339 1.000 0.000
#> GSM1105523     1  0.7376     0.7472 0.792 0.208
#> GSM1105550     2  0.9963     0.0127 0.464 0.536
#> GSM1105450     2  0.0000     0.9842 0.000 1.000
#> GSM1105451     2  0.0000     0.9842 0.000 1.000
#> GSM1105454     2  0.0000     0.9842 0.000 1.000
#> GSM1105468     2  0.0000     0.9842 0.000 1.000
#> GSM1105481     2  0.0000     0.9842 0.000 1.000
#> GSM1105504     1  0.1843     0.9146 0.972 0.028
#> GSM1105517     1  0.7376     0.7472 0.792 0.208
#> GSM1105525     1  0.0000     0.9339 1.000 0.000
#> GSM1105552     1  0.0000     0.9339 1.000 0.000
#> GSM1105452     2  0.0000     0.9842 0.000 1.000
#> GSM1105453     2  0.0000     0.9842 0.000 1.000
#> GSM1105456     2  0.0000     0.9842 0.000 1.000

show/hide code output

cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#>            class entropy silhouette    p1    p2    p3
#> GSM1105438     2  0.0000     0.7870 0.000 1.000 0.000
#> GSM1105486     2  0.4702     0.8251 0.000 0.788 0.212
#> GSM1105487     1  0.0000     0.8890 1.000 0.000 0.000
#> GSM1105490     2  0.2356     0.8050 0.000 0.928 0.072
#> GSM1105491     3  0.5268     0.7221 0.212 0.012 0.776
#> GSM1105495     3  0.6244     0.4598 0.000 0.440 0.560
#> GSM1105498     3  0.0983     0.6638 0.016 0.004 0.980
#> GSM1105499     1  0.0000     0.8890 1.000 0.000 0.000
#> GSM1105506     2  0.4750     0.8246 0.000 0.784 0.216
#> GSM1105442     2  0.0000     0.7870 0.000 1.000 0.000
#> GSM1105511     2  0.4750     0.8246 0.000 0.784 0.216
#> GSM1105514     2  0.4702     0.8251 0.000 0.788 0.212
#> GSM1105518     2  0.3038     0.6882 0.000 0.896 0.104
#> GSM1105522     1  0.2356     0.8206 0.928 0.000 0.072
#> GSM1105534     1  0.0000     0.8890 1.000 0.000 0.000
#> GSM1105535     1  0.0000     0.8890 1.000 0.000 0.000
#> GSM1105538     1  0.0000     0.8890 1.000 0.000 0.000
#> GSM1105542     2  0.4702     0.8251 0.000 0.788 0.212
#> GSM1105443     2  0.0237     0.7853 0.000 0.996 0.004
#> GSM1105551     1  0.0000     0.8890 1.000 0.000 0.000
#> GSM1105554     1  0.0000     0.8890 1.000 0.000 0.000
#> GSM1105555     1  0.0000     0.8890 1.000 0.000 0.000
#> GSM1105447     2  0.0000     0.7870 0.000 1.000 0.000
#> GSM1105467     2  0.4702     0.8251 0.000 0.788 0.212
#> GSM1105470     2  0.4702     0.8251 0.000 0.788 0.212
#> GSM1105471     2  0.6192     0.6707 0.000 0.580 0.420
#> GSM1105474     2  0.4702     0.8251 0.000 0.788 0.212
#> GSM1105475     2  0.4702     0.8251 0.000 0.788 0.212
#> GSM1105440     1  0.0000     0.8890 1.000 0.000 0.000
#> GSM1105488     2  0.4178     0.8234 0.000 0.828 0.172
#> GSM1105489     1  0.0000     0.8890 1.000 0.000 0.000
#> GSM1105492     1  0.0000     0.8890 1.000 0.000 0.000
#> GSM1105493     1  0.4121     0.7075 0.832 0.000 0.168
#> GSM1105497     2  0.3412     0.6577 0.000 0.876 0.124
#> GSM1105500     2  0.5737     0.7970 0.012 0.732 0.256
#> GSM1105501     2  0.5156     0.8222 0.008 0.776 0.216
#> GSM1105508     1  0.0000     0.8890 1.000 0.000 0.000
#> GSM1105444     2  0.0000     0.7870 0.000 1.000 0.000
#> GSM1105513     2  0.0237     0.7853 0.000 0.996 0.004
#> GSM1105516     1  0.8685     0.1964 0.584 0.260 0.156
#> GSM1105520     3  0.2339     0.6819 0.012 0.048 0.940
#> GSM1105524     1  0.0000     0.8890 1.000 0.000 0.000
#> GSM1105536     2  0.6192     0.6707 0.000 0.580 0.420
#> GSM1105537     1  0.0000     0.8890 1.000 0.000 0.000
#> GSM1105540     3  0.9324     0.4968 0.212 0.272 0.516
#> GSM1105544     2  0.8984     0.3448 0.212 0.564 0.224
#> GSM1105445     2  0.0237     0.7853 0.000 0.996 0.004
#> GSM1105553     2  0.3752     0.6284 0.000 0.856 0.144
#> GSM1105556     1  0.0000     0.8890 1.000 0.000 0.000
#> GSM1105557     2  0.3340     0.8151 0.000 0.880 0.120
#> GSM1105449     2  0.0000     0.7870 0.000 1.000 0.000
#> GSM1105469     2  0.6192     0.6707 0.000 0.580 0.420
#> GSM1105472     2  0.4702     0.8251 0.000 0.788 0.212
#> GSM1105473     1  0.6225     0.0477 0.568 0.000 0.432
#> GSM1105476     2  0.4702     0.8251 0.000 0.788 0.212
#> GSM1105477     2  0.6192     0.6707 0.000 0.580 0.420
#> GSM1105478     2  0.6204     0.6692 0.000 0.576 0.424
#> GSM1105510     2  0.4555     0.8251 0.000 0.800 0.200
#> GSM1105530     3  0.4750     0.7217 0.216 0.000 0.784
#> GSM1105539     3  0.4750     0.7217 0.216 0.000 0.784
#> GSM1105480     2  0.6204     0.6692 0.000 0.576 0.424
#> GSM1105512     1  0.0000     0.8890 1.000 0.000 0.000
#> GSM1105532     3  0.4750     0.7217 0.216 0.000 0.784
#> GSM1105541     1  0.6111     0.2217 0.604 0.000 0.396
#> GSM1105439     2  0.0237     0.7853 0.000 0.996 0.004
#> GSM1105463     3  0.4750     0.7217 0.216 0.000 0.784
#> GSM1105482     1  0.0000     0.8890 1.000 0.000 0.000
#> GSM1105483     2  0.6192     0.6707 0.000 0.580 0.420
#> GSM1105494     2  0.4750     0.8246 0.000 0.784 0.216
#> GSM1105503     3  0.4702     0.6567 0.000 0.212 0.788
#> GSM1105507     1  0.7710     0.4383 0.680 0.176 0.144
#> GSM1105446     2  0.0000     0.7870 0.000 1.000 0.000
#> GSM1105519     1  0.0747     0.8765 0.984 0.000 0.016
#> GSM1105526     2  0.6192     0.6707 0.000 0.580 0.420
#> GSM1105527     2  0.6192     0.6707 0.000 0.580 0.420
#> GSM1105531     3  0.4702     0.7234 0.212 0.000 0.788
#> GSM1105543     2  0.4702     0.8251 0.000 0.788 0.212
#> GSM1105546     1  0.0000     0.8890 1.000 0.000 0.000
#> GSM1105547     1  0.0000     0.8890 1.000 0.000 0.000
#> GSM1105455     2  0.0237     0.7853 0.000 0.996 0.004
#> GSM1105458     2  0.0000     0.7870 0.000 1.000 0.000
#> GSM1105459     2  0.0000     0.7870 0.000 1.000 0.000
#> GSM1105462     3  0.3879     0.4491 0.000 0.152 0.848
#> GSM1105441     2  0.0000     0.7870 0.000 1.000 0.000
#> GSM1105465     2  0.6192     0.6707 0.000 0.580 0.420
#> GSM1105484     2  0.4702     0.8251 0.000 0.788 0.212
#> GSM1105485     2  0.6192     0.6707 0.000 0.580 0.420
#> GSM1105496     3  0.6498     0.5173 0.008 0.396 0.596
#> GSM1105505     3  0.4883     0.7242 0.208 0.004 0.788
#> GSM1105509     1  0.5810     0.3557 0.664 0.000 0.336
#> GSM1105448     2  0.0000     0.7870 0.000 1.000 0.000
#> GSM1105521     1  0.0000     0.8890 1.000 0.000 0.000
#> GSM1105528     2  0.4702     0.8251 0.000 0.788 0.212
#> GSM1105529     2  0.6192     0.6707 0.000 0.580 0.420
#> GSM1105533     1  0.1289     0.8649 0.968 0.000 0.032
#> GSM1105545     2  0.6192     0.6707 0.000 0.580 0.420
#> GSM1105548     1  0.1753     0.8485 0.952 0.000 0.048
#> GSM1105549     1  0.0000     0.8890 1.000 0.000 0.000
#> GSM1105457     2  0.0237     0.7853 0.000 0.996 0.004
#> GSM1105460     2  0.0000     0.7870 0.000 1.000 0.000
#> GSM1105461     2  0.0000     0.7870 0.000 1.000 0.000
#> GSM1105464     3  0.4887     0.7112 0.228 0.000 0.772
#> GSM1105466     2  0.6126     0.6904 0.000 0.600 0.400
#> GSM1105479     2  0.4702     0.8251 0.000 0.788 0.212
#> GSM1105502     1  0.6307    -0.0999 0.512 0.000 0.488
#> GSM1105515     1  0.0000     0.8890 1.000 0.000 0.000
#> GSM1105523     3  0.4702     0.7234 0.212 0.000 0.788
#> GSM1105550     3  0.7026     0.6543 0.152 0.120 0.728
#> GSM1105450     2  0.4702     0.8251 0.000 0.788 0.212
#> GSM1105451     2  0.0000     0.7870 0.000 1.000 0.000
#> GSM1105454     3  0.6244     0.4548 0.000 0.440 0.560
#> GSM1105468     2  0.4702     0.8251 0.000 0.788 0.212
#> GSM1105481     3  0.0237     0.6535 0.000 0.004 0.996
#> GSM1105504     3  0.4931     0.7234 0.212 0.004 0.784
#> GSM1105517     3  0.7851     0.3835 0.412 0.056 0.532
#> GSM1105525     3  0.5835     0.5586 0.340 0.000 0.660
#> GSM1105552     3  0.4750     0.7217 0.216 0.000 0.784
#> GSM1105452     2  0.4702     0.8251 0.000 0.788 0.212
#> GSM1105453     2  0.0000     0.7870 0.000 1.000 0.000
#> GSM1105456     3  0.6192     0.4850 0.000 0.420 0.580

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>            class entropy silhouette    p1    p2    p3    p4
#> GSM1105438     2  0.3649     0.8893 0.000 0.796 0.000 0.204
#> GSM1105486     4  0.0000     0.9228 0.000 0.000 0.000 1.000
#> GSM1105487     1  0.0000     0.8316 1.000 0.000 0.000 0.000
#> GSM1105490     2  0.4585     0.3558 0.000 0.668 0.000 0.332
#> GSM1105491     3  0.0921     0.7298 0.000 0.028 0.972 0.000
#> GSM1105495     2  0.4697     0.4783 0.000 0.696 0.296 0.008
#> GSM1105498     3  0.6585     0.4792 0.000 0.104 0.584 0.312
#> GSM1105499     1  0.0000     0.8316 1.000 0.000 0.000 0.000
#> GSM1105506     4  0.3356     0.7872 0.000 0.176 0.000 0.824
#> GSM1105442     2  0.3688     0.8888 0.000 0.792 0.000 0.208
#> GSM1105511     4  0.3356     0.7872 0.000 0.176 0.000 0.824
#> GSM1105514     4  0.0188     0.9206 0.000 0.004 0.000 0.996
#> GSM1105518     2  0.4104     0.8529 0.000 0.808 0.028 0.164
#> GSM1105522     1  0.4661     0.5625 0.652 0.000 0.348 0.000
#> GSM1105534     1  0.0000     0.8316 1.000 0.000 0.000 0.000
#> GSM1105535     1  0.0000     0.8316 1.000 0.000 0.000 0.000
#> GSM1105538     1  0.4500     0.5879 0.684 0.000 0.316 0.000
#> GSM1105542     4  0.0000     0.9228 0.000 0.000 0.000 1.000
#> GSM1105443     2  0.3569     0.8873 0.000 0.804 0.000 0.196
#> GSM1105551     1  0.0707     0.8231 0.980 0.020 0.000 0.000
#> GSM1105554     1  0.0000     0.8316 1.000 0.000 0.000 0.000
#> GSM1105555     1  0.1356     0.8184 0.960 0.008 0.032 0.000
#> GSM1105447     2  0.3688     0.8888 0.000 0.792 0.000 0.208
#> GSM1105467     4  0.0000     0.9228 0.000 0.000 0.000 1.000
#> GSM1105470     4  0.0000     0.9228 0.000 0.000 0.000 1.000
#> GSM1105471     4  0.0000     0.9228 0.000 0.000 0.000 1.000
#> GSM1105474     4  0.0000     0.9228 0.000 0.000 0.000 1.000
#> GSM1105475     4  0.0000     0.9228 0.000 0.000 0.000 1.000
#> GSM1105440     1  0.0000     0.8316 1.000 0.000 0.000 0.000
#> GSM1105488     4  0.4040     0.5093 0.000 0.248 0.000 0.752
#> GSM1105489     1  0.0921     0.8190 0.972 0.028 0.000 0.000
#> GSM1105492     1  0.4500     0.5879 0.684 0.000 0.316 0.000
#> GSM1105493     1  0.2973     0.7165 0.856 0.000 0.144 0.000
#> GSM1105497     2  0.3311     0.8684 0.000 0.828 0.000 0.172
#> GSM1105500     4  0.5407     0.6928 0.000 0.108 0.152 0.740
#> GSM1105501     4  0.3356     0.7872 0.000 0.176 0.000 0.824
#> GSM1105508     1  0.3266     0.7106 0.832 0.168 0.000 0.000
#> GSM1105444     2  0.3649     0.8893 0.000 0.796 0.000 0.204
#> GSM1105513     2  0.3726     0.6072 0.000 0.788 0.000 0.212
#> GSM1105516     1  0.9029     0.2500 0.416 0.172 0.320 0.092
#> GSM1105520     3  0.6229     0.5748 0.000 0.116 0.656 0.228
#> GSM1105524     1  0.0000     0.8316 1.000 0.000 0.000 0.000
#> GSM1105536     4  0.0336     0.9190 0.000 0.008 0.000 0.992
#> GSM1105537     1  0.0000     0.8316 1.000 0.000 0.000 0.000
#> GSM1105540     3  0.3764     0.5941 0.000 0.000 0.784 0.216
#> GSM1105544     4  0.4679     0.4094 0.000 0.000 0.352 0.648
#> GSM1105445     2  0.3610     0.8872 0.000 0.800 0.000 0.200
#> GSM1105553     2  0.3311     0.8684 0.000 0.828 0.000 0.172
#> GSM1105556     1  0.0000     0.8316 1.000 0.000 0.000 0.000
#> GSM1105557     2  0.4996    -0.1738 0.000 0.516 0.000 0.484
#> GSM1105449     2  0.3688     0.8888 0.000 0.792 0.000 0.208
#> GSM1105469     4  0.3266     0.7923 0.000 0.168 0.000 0.832
#> GSM1105472     4  0.0000     0.9228 0.000 0.000 0.000 1.000
#> GSM1105473     3  0.4040     0.4918 0.248 0.000 0.752 0.000
#> GSM1105476     4  0.0000     0.9228 0.000 0.000 0.000 1.000
#> GSM1105477     4  0.0000     0.9228 0.000 0.000 0.000 1.000
#> GSM1105478     4  0.0336     0.9183 0.000 0.008 0.000 0.992
#> GSM1105510     4  0.3074     0.7181 0.000 0.152 0.000 0.848
#> GSM1105530     3  0.0000     0.7277 0.000 0.000 1.000 0.000
#> GSM1105539     3  0.4500     0.4458 0.316 0.000 0.684 0.000
#> GSM1105480     4  0.0336     0.9183 0.000 0.008 0.000 0.992
#> GSM1105512     1  0.4134     0.6483 0.740 0.000 0.260 0.000
#> GSM1105532     3  0.0000     0.7277 0.000 0.000 1.000 0.000
#> GSM1105541     1  0.4605     0.4355 0.664 0.000 0.336 0.000
#> GSM1105439     2  0.3569     0.8873 0.000 0.804 0.000 0.196
#> GSM1105463     3  0.0921     0.7298 0.000 0.028 0.972 0.000
#> GSM1105482     1  0.0000     0.8316 1.000 0.000 0.000 0.000
#> GSM1105483     4  0.3266     0.7923 0.000 0.168 0.000 0.832
#> GSM1105494     4  0.1118     0.8954 0.000 0.036 0.000 0.964
#> GSM1105503     3  0.4643     0.4203 0.000 0.344 0.656 0.000
#> GSM1105507     1  0.7975     0.2848 0.448 0.168 0.364 0.020
#> GSM1105446     2  0.3649     0.8893 0.000 0.796 0.000 0.204
#> GSM1105519     1  0.4500     0.5879 0.684 0.000 0.316 0.000
#> GSM1105526     4  0.0000     0.9228 0.000 0.000 0.000 1.000
#> GSM1105527     4  0.3311     0.7899 0.000 0.172 0.000 0.828
#> GSM1105531     3  0.0921     0.7298 0.000 0.028 0.972 0.000
#> GSM1105543     4  0.0188     0.9206 0.000 0.004 0.000 0.996
#> GSM1105546     1  0.0000     0.8316 1.000 0.000 0.000 0.000
#> GSM1105547     1  0.0000     0.8316 1.000 0.000 0.000 0.000
#> GSM1105455     2  0.3528     0.8859 0.000 0.808 0.000 0.192
#> GSM1105458     2  0.3688     0.8888 0.000 0.792 0.000 0.208
#> GSM1105459     2  0.4193     0.8296 0.000 0.732 0.000 0.268
#> GSM1105462     3  0.4925     0.2915 0.000 0.000 0.572 0.428
#> GSM1105441     2  0.3688     0.8888 0.000 0.792 0.000 0.208
#> GSM1105465     4  0.0000     0.9228 0.000 0.000 0.000 1.000
#> GSM1105484     4  0.0000     0.9228 0.000 0.000 0.000 1.000
#> GSM1105485     4  0.0000     0.9228 0.000 0.000 0.000 1.000
#> GSM1105496     3  0.4761     0.3667 0.000 0.372 0.628 0.000
#> GSM1105505     3  0.1118     0.7293 0.000 0.036 0.964 0.000
#> GSM1105509     3  0.7354    -0.0268 0.352 0.168 0.480 0.000
#> GSM1105448     2  0.3649     0.8893 0.000 0.796 0.000 0.204
#> GSM1105521     1  0.4500     0.5879 0.684 0.000 0.316 0.000
#> GSM1105528     4  0.0000     0.9228 0.000 0.000 0.000 1.000
#> GSM1105529     4  0.0000     0.9228 0.000 0.000 0.000 1.000
#> GSM1105533     1  0.1557     0.8047 0.944 0.000 0.056 0.000
#> GSM1105545     4  0.1792     0.8766 0.000 0.068 0.000 0.932
#> GSM1105548     3  0.5776    -0.1579 0.468 0.028 0.504 0.000
#> GSM1105549     1  0.0000     0.8316 1.000 0.000 0.000 0.000
#> GSM1105457     2  0.1022     0.7202 0.000 0.968 0.000 0.032
#> GSM1105460     2  0.3688     0.8888 0.000 0.792 0.000 0.208
#> GSM1105461     2  0.3649     0.8893 0.000 0.796 0.000 0.204
#> GSM1105464     3  0.4304     0.4913 0.284 0.000 0.716 0.000
#> GSM1105466     4  0.0000     0.9228 0.000 0.000 0.000 1.000
#> GSM1105479     4  0.0000     0.9228 0.000 0.000 0.000 1.000
#> GSM1105502     1  0.4977     0.2744 0.540 0.000 0.460 0.000
#> GSM1105515     1  0.0000     0.8316 1.000 0.000 0.000 0.000
#> GSM1105523     3  0.0000     0.7277 0.000 0.000 1.000 0.000
#> GSM1105550     3  0.2647     0.6821 0.000 0.000 0.880 0.120
#> GSM1105450     4  0.0188     0.9206 0.000 0.004 0.000 0.996
#> GSM1105451     2  0.3649     0.8893 0.000 0.796 0.000 0.204
#> GSM1105454     2  0.3311     0.6557 0.000 0.828 0.172 0.000
#> GSM1105468     4  0.0000     0.9228 0.000 0.000 0.000 1.000
#> GSM1105481     3  0.5343     0.5142 0.000 0.028 0.656 0.316
#> GSM1105504     3  0.0000     0.7277 0.000 0.000 1.000 0.000
#> GSM1105517     3  0.5067     0.6256 0.036 0.164 0.776 0.024
#> GSM1105525     3  0.2408     0.6626 0.104 0.000 0.896 0.000
#> GSM1105552     3  0.0921     0.7298 0.000 0.028 0.972 0.000
#> GSM1105452     4  0.0000     0.9228 0.000 0.000 0.000 1.000
#> GSM1105453     2  0.3649     0.8893 0.000 0.796 0.000 0.204
#> GSM1105456     2  0.3311     0.6557 0.000 0.828 0.172 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
#> GSM1105438     2  0.2516     0.8573 0.000 0.860 0.000 0.000 0.140
#> GSM1105486     5  0.0703     0.8513 0.000 0.024 0.000 0.000 0.976
#> GSM1105487     1  0.0000     0.8970 1.000 0.000 0.000 0.000 0.000
#> GSM1105490     4  0.6255     0.2324 0.000 0.208 0.000 0.540 0.252
#> GSM1105491     4  0.6862    -0.1903 0.000 0.156 0.360 0.460 0.024
#> GSM1105495     2  0.5660     0.0486 0.000 0.568 0.060 0.360 0.012
#> GSM1105498     4  0.4280     0.2015 0.000 0.140 0.088 0.772 0.000
#> GSM1105499     1  0.0000     0.8970 1.000 0.000 0.000 0.000 0.000
#> GSM1105506     4  0.4287    -0.0409 0.000 0.000 0.000 0.540 0.460
#> GSM1105442     2  0.4504     0.7786 0.000 0.748 0.000 0.084 0.168
#> GSM1105511     4  0.4287    -0.0409 0.000 0.000 0.000 0.540 0.460
#> GSM1105514     5  0.0794     0.8502 0.000 0.028 0.000 0.000 0.972
#> GSM1105518     2  0.3779     0.4800 0.000 0.752 0.012 0.236 0.000
#> GSM1105522     3  0.4101     0.4814 0.184 0.000 0.768 0.048 0.000
#> GSM1105534     1  0.0000     0.8970 1.000 0.000 0.000 0.000 0.000
#> GSM1105535     1  0.0000     0.8970 1.000 0.000 0.000 0.000 0.000
#> GSM1105538     3  0.4201     0.2608 0.408 0.000 0.592 0.000 0.000
#> GSM1105542     5  0.1792     0.8056 0.000 0.000 0.000 0.084 0.916
#> GSM1105443     2  0.2516     0.8573 0.000 0.860 0.000 0.000 0.140
#> GSM1105551     1  0.1965     0.8211 0.904 0.096 0.000 0.000 0.000
#> GSM1105554     1  0.0000     0.8970 1.000 0.000 0.000 0.000 0.000
#> GSM1105555     1  0.3731     0.7108 0.800 0.040 0.160 0.000 0.000
#> GSM1105447     2  0.2561     0.8571 0.000 0.856 0.000 0.000 0.144
#> GSM1105467     5  0.0880     0.8501 0.000 0.032 0.000 0.000 0.968
#> GSM1105470     5  0.0703     0.8513 0.000 0.024 0.000 0.000 0.976
#> GSM1105471     5  0.1018     0.8487 0.000 0.016 0.016 0.000 0.968
#> GSM1105474     5  0.0703     0.8513 0.000 0.024 0.000 0.000 0.976
#> GSM1105475     5  0.0771     0.8491 0.000 0.004 0.000 0.020 0.976
#> GSM1105440     1  0.0000     0.8970 1.000 0.000 0.000 0.000 0.000
#> GSM1105488     5  0.4647     0.6083 0.000 0.184 0.000 0.084 0.732
#> GSM1105489     1  0.2516     0.7726 0.860 0.140 0.000 0.000 0.000
#> GSM1105492     3  0.4201     0.2608 0.408 0.000 0.592 0.000 0.000
#> GSM1105493     1  0.1557     0.8514 0.940 0.008 0.052 0.000 0.000
#> GSM1105497     2  0.2570     0.6691 0.000 0.888 0.000 0.084 0.028
#> GSM1105500     4  0.4278    -0.0918 0.000 0.000 0.000 0.548 0.452
#> GSM1105501     4  0.4126     0.0647 0.000 0.000 0.000 0.620 0.380
#> GSM1105508     1  0.3816     0.5483 0.696 0.000 0.000 0.304 0.000
#> GSM1105444     2  0.2516     0.8573 0.000 0.860 0.000 0.000 0.140
#> GSM1105513     4  0.6000     0.0676 0.000 0.328 0.000 0.540 0.132
#> GSM1105516     3  0.4517     0.3456 0.000 0.000 0.600 0.388 0.012
#> GSM1105520     4  0.5791     0.1104 0.000 0.140 0.260 0.600 0.000
#> GSM1105524     1  0.0000     0.8970 1.000 0.000 0.000 0.000 0.000
#> GSM1105536     5  0.1211     0.8422 0.000 0.000 0.024 0.016 0.960
#> GSM1105537     1  0.0000     0.8970 1.000 0.000 0.000 0.000 0.000
#> GSM1105540     3  0.3039     0.3864 0.000 0.000 0.808 0.000 0.192
#> GSM1105544     3  0.3980     0.3096 0.000 0.000 0.708 0.008 0.284
#> GSM1105445     2  0.2561     0.8571 0.000 0.856 0.000 0.000 0.144
#> GSM1105553     2  0.3550     0.4937 0.000 0.760 0.000 0.236 0.004
#> GSM1105556     1  0.0000     0.8970 1.000 0.000 0.000 0.000 0.000
#> GSM1105557     4  0.5682     0.1013 0.000 0.088 0.000 0.540 0.372
#> GSM1105449     2  0.2561     0.8571 0.000 0.856 0.000 0.000 0.144
#> GSM1105469     5  0.4380     0.4753 0.000 0.000 0.020 0.304 0.676
#> GSM1105472     5  0.0703     0.8513 0.000 0.024 0.000 0.000 0.976
#> GSM1105473     3  0.3109     0.4985 0.200 0.000 0.800 0.000 0.000
#> GSM1105476     5  0.0703     0.8513 0.000 0.024 0.000 0.000 0.976
#> GSM1105477     5  0.2753     0.7814 0.000 0.000 0.008 0.136 0.856
#> GSM1105478     5  0.3826     0.6054 0.000 0.008 0.004 0.236 0.752
#> GSM1105510     5  0.4458     0.6848 0.000 0.120 0.000 0.120 0.760
#> GSM1105530     3  0.4114     0.2666 0.000 0.000 0.624 0.376 0.000
#> GSM1105539     3  0.6615     0.1054 0.216 0.000 0.408 0.376 0.000
#> GSM1105480     5  0.3607     0.6038 0.000 0.000 0.004 0.244 0.752
#> GSM1105512     1  0.4101     0.2753 0.628 0.000 0.372 0.000 0.000
#> GSM1105532     3  0.4114     0.2666 0.000 0.000 0.624 0.376 0.000
#> GSM1105541     1  0.6332     0.2246 0.524 0.000 0.212 0.264 0.000
#> GSM1105439     2  0.3074     0.8260 0.000 0.804 0.000 0.000 0.196
#> GSM1105463     3  0.6431     0.1849 0.000 0.140 0.476 0.376 0.008
#> GSM1105482     1  0.0000     0.8970 1.000 0.000 0.000 0.000 0.000
#> GSM1105483     5  0.4380     0.4753 0.000 0.000 0.020 0.304 0.676
#> GSM1105494     5  0.5752     0.3145 0.000 0.148 0.000 0.240 0.612
#> GSM1105503     4  0.5726     0.1215 0.000 0.140 0.248 0.612 0.000
#> GSM1105507     3  0.4517     0.3456 0.000 0.000 0.600 0.388 0.012
#> GSM1105446     2  0.2605     0.8561 0.000 0.852 0.000 0.000 0.148
#> GSM1105519     3  0.4161     0.2915 0.392 0.000 0.608 0.000 0.000
#> GSM1105526     5  0.1082     0.8449 0.000 0.000 0.008 0.028 0.964
#> GSM1105527     5  0.3913     0.4713 0.000 0.000 0.000 0.324 0.676
#> GSM1105531     3  0.6178     0.1911 0.000 0.140 0.484 0.376 0.000
#> GSM1105543     5  0.0794     0.8502 0.000 0.028 0.000 0.000 0.972
#> GSM1105546     1  0.0000     0.8970 1.000 0.000 0.000 0.000 0.000
#> GSM1105547     1  0.0000     0.8970 1.000 0.000 0.000 0.000 0.000
#> GSM1105455     2  0.3427     0.8250 0.000 0.796 0.000 0.012 0.192
#> GSM1105458     2  0.2561     0.8571 0.000 0.856 0.000 0.000 0.144
#> GSM1105459     2  0.3561     0.7519 0.000 0.740 0.000 0.000 0.260
#> GSM1105462     5  0.5957     0.1981 0.000 0.000 0.280 0.148 0.572
#> GSM1105441     2  0.2516     0.8573 0.000 0.860 0.000 0.000 0.140
#> GSM1105465     5  0.3033     0.7765 0.000 0.052 0.000 0.084 0.864
#> GSM1105484     5  0.0510     0.8484 0.000 0.016 0.000 0.000 0.984
#> GSM1105485     5  0.1908     0.8049 0.000 0.000 0.000 0.092 0.908
#> GSM1105496     4  0.5464     0.1674 0.000 0.152 0.148 0.688 0.012
#> GSM1105505     4  0.6537    -0.1973 0.000 0.140 0.384 0.464 0.012
#> GSM1105509     3  0.4517     0.3456 0.000 0.000 0.600 0.388 0.012
#> GSM1105448     2  0.2605     0.8561 0.000 0.852 0.000 0.000 0.148
#> GSM1105521     3  0.4182     0.2769 0.400 0.000 0.600 0.000 0.000
#> GSM1105528     5  0.2077     0.8043 0.000 0.008 0.000 0.084 0.908
#> GSM1105529     5  0.0290     0.8487 0.000 0.008 0.000 0.000 0.992
#> GSM1105533     1  0.2127     0.8169 0.892 0.000 0.108 0.000 0.000
#> GSM1105545     5  0.2540     0.7844 0.000 0.000 0.024 0.088 0.888
#> GSM1105548     3  0.5607     0.4467 0.228 0.140 0.632 0.000 0.000
#> GSM1105549     1  0.0000     0.8970 1.000 0.000 0.000 0.000 0.000
#> GSM1105457     2  0.4306     0.2674 0.000 0.508 0.000 0.492 0.000
#> GSM1105460     2  0.2561     0.8571 0.000 0.856 0.000 0.000 0.144
#> GSM1105461     2  0.3074     0.8260 0.000 0.804 0.000 0.000 0.196
#> GSM1105464     3  0.6598     0.1244 0.216 0.000 0.428 0.356 0.000
#> GSM1105466     5  0.0880     0.8467 0.000 0.000 0.000 0.032 0.968
#> GSM1105479     5  0.1012     0.8488 0.000 0.012 0.000 0.020 0.968
#> GSM1105502     4  0.6796    -0.2360 0.328 0.000 0.296 0.376 0.000
#> GSM1105515     1  0.0000     0.8970 1.000 0.000 0.000 0.000 0.000
#> GSM1105523     3  0.0000     0.4776 0.000 0.000 1.000 0.000 0.000
#> GSM1105550     3  0.6565     0.1588 0.004 0.000 0.456 0.360 0.180
#> GSM1105450     5  0.0703     0.8513 0.000 0.024 0.000 0.000 0.976
#> GSM1105451     2  0.2605     0.8561 0.000 0.852 0.000 0.000 0.148
#> GSM1105454     2  0.0162     0.7265 0.000 0.996 0.004 0.000 0.000
#> GSM1105468     5  0.0703     0.8513 0.000 0.024 0.000 0.000 0.976
#> GSM1105481     4  0.8275     0.0315 0.000 0.148 0.260 0.376 0.216
#> GSM1105504     3  0.4114     0.2666 0.000 0.000 0.624 0.376 0.000
#> GSM1105517     3  0.3231     0.4376 0.004 0.000 0.800 0.196 0.000
#> GSM1105525     3  0.1043     0.4916 0.040 0.000 0.960 0.000 0.000
#> GSM1105552     3  0.6368     0.1978 0.008 0.132 0.484 0.376 0.000
#> GSM1105452     5  0.0000     0.8492 0.000 0.000 0.000 0.000 1.000
#> GSM1105453     2  0.2605     0.8561 0.000 0.852 0.000 0.000 0.148
#> GSM1105456     2  0.1410     0.6930 0.000 0.940 0.060 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
#> GSM1105438     2  0.0363    0.82755 0.000 0.988 0.000 0.000 0.012 0.000
#> GSM1105486     5  0.0000    0.83155 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM1105487     1  0.0632    0.87490 0.976 0.000 0.024 0.000 0.000 0.000
#> GSM1105490     4  0.0000    0.77393 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1105491     6  0.1245    0.43086 0.000 0.016 0.032 0.000 0.000 0.952
#> GSM1105495     6  0.1714    0.42750 0.000 0.092 0.000 0.000 0.000 0.908
#> GSM1105498     4  0.2980    0.71211 0.000 0.000 0.012 0.808 0.000 0.180
#> GSM1105499     1  0.0146    0.87854 0.996 0.000 0.004 0.000 0.000 0.000
#> GSM1105506     4  0.0000    0.77393 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1105442     2  0.5693    0.34098 0.000 0.448 0.000 0.000 0.160 0.392
#> GSM1105511     4  0.0000    0.77393 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1105514     5  0.2454    0.71983 0.000 0.160 0.000 0.000 0.840 0.000
#> GSM1105518     4  0.4734    0.63635 0.000 0.152 0.000 0.680 0.000 0.168
#> GSM1105522     3  0.1649    0.56254 0.000 0.000 0.932 0.036 0.000 0.032
#> GSM1105534     1  0.0146    0.87854 0.996 0.000 0.004 0.000 0.000 0.000
#> GSM1105535     1  0.0632    0.87459 0.976 0.000 0.024 0.000 0.000 0.000
#> GSM1105538     3  0.3288    0.56888 0.276 0.000 0.724 0.000 0.000 0.000
#> GSM1105542     5  0.3872    0.54005 0.000 0.004 0.000 0.000 0.604 0.392
#> GSM1105443     2  0.1663    0.83804 0.000 0.912 0.000 0.000 0.088 0.000
#> GSM1105551     1  0.2053    0.78626 0.888 0.000 0.004 0.000 0.000 0.108
#> GSM1105554     1  0.0000    0.87868 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM1105555     1  0.3456    0.69406 0.788 0.000 0.172 0.000 0.000 0.040
#> GSM1105447     2  0.2454    0.82420 0.000 0.840 0.000 0.000 0.160 0.000
#> GSM1105467     5  0.0363    0.83078 0.000 0.012 0.000 0.000 0.988 0.000
#> GSM1105470     5  0.0000    0.83155 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM1105471     5  0.0363    0.83078 0.000 0.012 0.000 0.000 0.988 0.000
#> GSM1105474     5  0.0146    0.83144 0.000 0.004 0.000 0.000 0.996 0.000
#> GSM1105475     5  0.0000    0.83155 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM1105440     1  0.0363    0.87756 0.988 0.000 0.012 0.000 0.000 0.000
#> GSM1105488     5  0.4619    0.50545 0.000 0.044 0.000 0.000 0.564 0.392
#> GSM1105489     1  0.2558    0.72452 0.840 0.000 0.004 0.000 0.000 0.156
#> GSM1105492     3  0.3330    0.56561 0.284 0.000 0.716 0.000 0.000 0.000
#> GSM1105493     1  0.1007    0.85549 0.956 0.000 0.000 0.000 0.000 0.044
#> GSM1105497     6  0.4913   -0.18787 0.000 0.392 0.000 0.056 0.004 0.548
#> GSM1105500     4  0.2070    0.74437 0.000 0.000 0.012 0.896 0.092 0.000
#> GSM1105501     4  0.0000    0.77393 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1105508     1  0.3853    0.52921 0.680 0.000 0.016 0.304 0.000 0.000
#> GSM1105444     2  0.0146    0.82383 0.000 0.996 0.000 0.000 0.004 0.000
#> GSM1105513     4  0.0000    0.77393 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1105516     3  0.3499    0.53445 0.000 0.000 0.680 0.320 0.000 0.000
#> GSM1105520     4  0.4269    0.54814 0.000 0.000 0.036 0.648 0.000 0.316
#> GSM1105524     1  0.0632    0.87459 0.976 0.000 0.024 0.000 0.000 0.000
#> GSM1105536     5  0.0603    0.82993 0.000 0.000 0.004 0.016 0.980 0.000
#> GSM1105537     1  0.0632    0.87459 0.976 0.000 0.024 0.000 0.000 0.000
#> GSM1105540     3  0.3861    0.50492 0.000 0.000 0.756 0.000 0.184 0.060
#> GSM1105544     3  0.3221    0.45674 0.000 0.000 0.736 0.000 0.264 0.000
#> GSM1105445     2  0.2454    0.82420 0.000 0.840 0.000 0.000 0.160 0.000
#> GSM1105553     4  0.4841    0.63445 0.000 0.160 0.004 0.680 0.000 0.156
#> GSM1105556     1  0.0000    0.87868 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM1105557     4  0.0000    0.77393 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1105449     2  0.2454    0.82420 0.000 0.840 0.000 0.000 0.160 0.000
#> GSM1105469     5  0.3499    0.55336 0.000 0.000 0.000 0.320 0.680 0.000
#> GSM1105472     5  0.0000    0.83155 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM1105473     3  0.3953    0.58796 0.196 0.000 0.744 0.000 0.000 0.060
#> GSM1105476     5  0.0547    0.82633 0.000 0.020 0.000 0.000 0.980 0.000
#> GSM1105477     5  0.1075    0.81997 0.000 0.000 0.000 0.048 0.952 0.000
#> GSM1105478     4  0.4029    0.57059 0.000 0.000 0.028 0.680 0.292 0.000
#> GSM1105510     5  0.3695    0.67857 0.000 0.164 0.000 0.060 0.776 0.000
#> GSM1105530     3  0.3737    0.01886 0.000 0.000 0.608 0.000 0.000 0.392
#> GSM1105539     6  0.6039    0.22284 0.356 0.000 0.252 0.000 0.000 0.392
#> GSM1105480     4  0.3784    0.55982 0.000 0.000 0.012 0.680 0.308 0.000
#> GSM1105512     1  0.3860   -0.15390 0.528 0.000 0.472 0.000 0.000 0.000
#> GSM1105532     3  0.3737    0.01886 0.000 0.000 0.608 0.000 0.000 0.392
#> GSM1105541     1  0.5879   -0.04280 0.460 0.000 0.216 0.000 0.000 0.324
#> GSM1105439     2  0.2664    0.81370 0.000 0.816 0.000 0.000 0.184 0.000
#> GSM1105463     6  0.1387    0.43805 0.000 0.000 0.068 0.000 0.000 0.932
#> GSM1105482     1  0.0000    0.87868 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM1105483     5  0.3499    0.55336 0.000 0.000 0.000 0.320 0.680 0.000
#> GSM1105494     4  0.4976    0.64903 0.000 0.000 0.012 0.680 0.152 0.156
#> GSM1105503     4  0.4127    0.59345 0.000 0.000 0.036 0.680 0.000 0.284
#> GSM1105507     3  0.3499    0.53445 0.000 0.000 0.680 0.320 0.000 0.000
#> GSM1105446     2  0.0363    0.82126 0.000 0.988 0.000 0.000 0.012 0.000
#> GSM1105519     3  0.3371    0.56424 0.292 0.000 0.708 0.000 0.000 0.000
#> GSM1105526     5  0.0713    0.82731 0.000 0.000 0.000 0.028 0.972 0.000
#> GSM1105527     5  0.3531    0.54179 0.000 0.000 0.000 0.328 0.672 0.000
#> GSM1105531     6  0.3737    0.10941 0.000 0.000 0.392 0.000 0.000 0.608
#> GSM1105543     5  0.2135    0.75059 0.000 0.128 0.000 0.000 0.872 0.000
#> GSM1105546     1  0.0146    0.87804 0.996 0.000 0.004 0.000 0.000 0.000
#> GSM1105547     1  0.0000    0.87868 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM1105455     2  0.3975    0.53086 0.000 0.716 0.000 0.244 0.040 0.000
#> GSM1105458     2  0.2454    0.82420 0.000 0.840 0.000 0.000 0.160 0.000
#> GSM1105459     2  0.2697    0.78549 0.000 0.812 0.000 0.000 0.188 0.000
#> GSM1105462     5  0.4122    0.51261 0.000 0.000 0.048 0.000 0.704 0.248
#> GSM1105441     2  0.2340    0.82872 0.000 0.852 0.000 0.000 0.148 0.000
#> GSM1105465     5  0.4500    0.51505 0.000 0.036 0.000 0.000 0.572 0.392
#> GSM1105484     5  0.0363    0.83078 0.000 0.012 0.000 0.000 0.988 0.000
#> GSM1105485     5  0.4066    0.54122 0.000 0.000 0.000 0.012 0.596 0.392
#> GSM1105496     6  0.4619    0.00352 0.000 0.012 0.024 0.388 0.000 0.576
#> GSM1105505     6  0.4319    0.11182 0.000 0.000 0.400 0.024 0.000 0.576
#> GSM1105509     3  0.3371    0.55110 0.000 0.000 0.708 0.292 0.000 0.000
#> GSM1105448     2  0.0363    0.82126 0.000 0.988 0.000 0.000 0.012 0.000
#> GSM1105521     3  0.3371    0.56424 0.292 0.000 0.708 0.000 0.000 0.000
#> GSM1105528     5  0.0363    0.83078 0.000 0.012 0.000 0.000 0.988 0.000
#> GSM1105529     5  0.4066    0.53905 0.000 0.012 0.000 0.000 0.596 0.392
#> GSM1105533     1  0.2234    0.78322 0.872 0.000 0.124 0.000 0.000 0.004
#> GSM1105545     5  0.1610    0.79344 0.000 0.000 0.000 0.084 0.916 0.000
#> GSM1105548     3  0.4215    0.52431 0.080 0.000 0.724 0.000 0.000 0.196
#> GSM1105549     1  0.0000    0.87868 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM1105457     4  0.0937    0.76611 0.000 0.040 0.000 0.960 0.000 0.000
#> GSM1105460     2  0.2454    0.82420 0.000 0.840 0.000 0.000 0.160 0.000
#> GSM1105461     2  0.0937    0.81796 0.000 0.960 0.000 0.000 0.040 0.000
#> GSM1105464     6  0.5925    0.30076 0.332 0.000 0.224 0.000 0.000 0.444
#> GSM1105466     5  0.0363    0.83069 0.000 0.000 0.000 0.012 0.988 0.000
#> GSM1105479     5  0.0363    0.83078 0.000 0.012 0.000 0.000 0.988 0.000
#> GSM1105502     6  0.6039    0.22799 0.252 0.000 0.356 0.000 0.000 0.392
#> GSM1105515     1  0.0000    0.87868 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM1105523     3  0.1610    0.56525 0.000 0.000 0.916 0.000 0.000 0.084
#> GSM1105550     3  0.6067    0.04842 0.008 0.000 0.424 0.000 0.192 0.376
#> GSM1105450     5  0.0146    0.83148 0.000 0.004 0.000 0.000 0.996 0.000
#> GSM1105451     2  0.0363    0.82126 0.000 0.988 0.000 0.000 0.012 0.000
#> GSM1105454     2  0.2454    0.73914 0.000 0.840 0.000 0.000 0.000 0.160
#> GSM1105468     5  0.0146    0.83159 0.000 0.004 0.000 0.000 0.996 0.000
#> GSM1105481     6  0.4491    0.23758 0.000 0.000 0.036 0.000 0.388 0.576
#> GSM1105504     3  0.3843   -0.00942 0.000 0.000 0.548 0.000 0.000 0.452
#> GSM1105517     3  0.4031    0.57758 0.004 0.000 0.748 0.188 0.000 0.060
#> GSM1105525     3  0.1219    0.55164 0.004 0.000 0.948 0.000 0.000 0.048
#> GSM1105552     6  0.4039    0.06718 0.008 0.000 0.424 0.000 0.000 0.568
#> GSM1105452     5  0.3737    0.54247 0.000 0.000 0.000 0.000 0.608 0.392
#> GSM1105453     2  0.0363    0.82126 0.000 0.988 0.000 0.000 0.012 0.000
#> GSM1105456     2  0.2793    0.70786 0.000 0.800 0.000 0.000 0.000 0.200

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) other(p) time(p) individual(p) k
#> SD:pam 115   1.0000  0.42629   0.648      1.34e-02 2
#> SD:pam 107   0.0881  0.00113   0.991      3.27e-03 3
#> SD:pam 103   0.1068  0.00110   0.795      1.19e-04 4
#> SD:pam  70   0.1214  0.13551   0.974      2.15e-03 5
#> SD:pam 100   0.0190  0.57914   0.800      3.14e-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: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 44956 rows and 120 columns.
#>   Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'SD' method.
#>   Subgroups are detected by 'mclust' method.
#>   Performed in total 1250 partitions by row resampling.
#>   Best k for subgroups seems to be 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.357           0.490       0.762         0.3530 0.541   0.541
#> 3 3 0.495           0.642       0.793         0.6866 0.569   0.379
#> 4 4 0.601           0.647       0.828         0.1925 0.792   0.532
#> 5 5 0.796           0.836       0.882         0.0641 0.943   0.802
#> 6 6 0.717           0.658       0.788         0.0584 0.874   0.551

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

suggest_best_k(res)
#> [1] 5

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
#> GSM1105438     2  0.9608     0.7108 0.384 0.616
#> GSM1105486     2  0.0000     0.5207 0.000 1.000
#> GSM1105487     1  0.0000     0.6812 1.000 0.000
#> GSM1105490     2  0.9635     0.7109 0.388 0.612
#> GSM1105491     1  0.9850     0.0381 0.572 0.428
#> GSM1105495     1  0.9850     0.0381 0.572 0.428
#> GSM1105498     1  0.9850     0.0381 0.572 0.428
#> GSM1105499     1  0.0000     0.6812 1.000 0.000
#> GSM1105506     1  0.9850     0.0381 0.572 0.428
#> GSM1105442     1  0.9850     0.0381 0.572 0.428
#> GSM1105511     1  0.9933    -0.1011 0.548 0.452
#> GSM1105514     2  0.9522     0.7082 0.372 0.628
#> GSM1105518     1  0.9850     0.0381 0.572 0.428
#> GSM1105522     1  0.0000     0.6812 1.000 0.000
#> GSM1105534     1  0.0000     0.6812 1.000 0.000
#> GSM1105535     1  0.0000     0.6812 1.000 0.000
#> GSM1105538     1  0.0000     0.6812 1.000 0.000
#> GSM1105542     2  0.9661     0.7045 0.392 0.608
#> GSM1105443     2  0.9635     0.7109 0.388 0.612
#> GSM1105551     1  0.0000     0.6812 1.000 0.000
#> GSM1105554     1  0.0000     0.6812 1.000 0.000
#> GSM1105555     1  0.0000     0.6812 1.000 0.000
#> GSM1105447     2  0.9635     0.7109 0.388 0.612
#> GSM1105467     2  0.2423     0.5309 0.040 0.960
#> GSM1105470     2  0.0000     0.5207 0.000 1.000
#> GSM1105471     1  0.9850     0.0381 0.572 0.428
#> GSM1105474     2  0.0000     0.5207 0.000 1.000
#> GSM1105475     2  0.9635     0.7109 0.388 0.612
#> GSM1105440     1  0.0000     0.6812 1.000 0.000
#> GSM1105488     2  0.9635     0.7109 0.388 0.612
#> GSM1105489     1  0.0000     0.6812 1.000 0.000
#> GSM1105492     1  0.0000     0.6812 1.000 0.000
#> GSM1105493     1  0.0000     0.6812 1.000 0.000
#> GSM1105497     1  0.9850     0.0381 0.572 0.428
#> GSM1105500     2  0.9881     0.5866 0.436 0.564
#> GSM1105501     1  1.0000    -0.3465 0.500 0.500
#> GSM1105508     1  0.0000     0.6812 1.000 0.000
#> GSM1105444     2  0.9635     0.7109 0.388 0.612
#> GSM1105513     2  0.9732     0.6809 0.404 0.596
#> GSM1105516     1  0.9850     0.0381 0.572 0.428
#> GSM1105520     1  0.9850     0.0381 0.572 0.428
#> GSM1105524     1  0.0000     0.6812 1.000 0.000
#> GSM1105536     2  0.9686     0.6974 0.396 0.604
#> GSM1105537     1  0.0000     0.6812 1.000 0.000
#> GSM1105540     1  0.3274     0.6383 0.940 0.060
#> GSM1105544     1  0.9850     0.0381 0.572 0.428
#> GSM1105445     1  0.9850     0.0381 0.572 0.428
#> GSM1105553     1  0.9850     0.0381 0.572 0.428
#> GSM1105556     1  0.0000     0.6812 1.000 0.000
#> GSM1105557     2  0.9775     0.6615 0.412 0.588
#> GSM1105449     2  0.9635     0.7109 0.388 0.612
#> GSM1105469     1  0.2423     0.6545 0.960 0.040
#> GSM1105472     2  0.0000     0.5207 0.000 1.000
#> GSM1105473     1  0.0000     0.6812 1.000 0.000
#> GSM1105476     2  0.9522     0.7082 0.372 0.628
#> GSM1105477     2  0.9635     0.7109 0.388 0.612
#> GSM1105478     1  0.9850     0.0381 0.572 0.428
#> GSM1105510     2  0.9686     0.6974 0.396 0.604
#> GSM1105530     1  0.0000     0.6812 1.000 0.000
#> GSM1105539     1  0.0000     0.6812 1.000 0.000
#> GSM1105480     1  0.9850     0.0381 0.572 0.428
#> GSM1105512     1  0.0000     0.6812 1.000 0.000
#> GSM1105532     1  0.0000     0.6812 1.000 0.000
#> GSM1105541     1  0.0000     0.6812 1.000 0.000
#> GSM1105439     2  0.9635     0.7109 0.388 0.612
#> GSM1105463     1  0.0000     0.6812 1.000 0.000
#> GSM1105482     1  0.0000     0.6812 1.000 0.000
#> GSM1105483     1  0.9850     0.0381 0.572 0.428
#> GSM1105494     1  0.9850     0.0381 0.572 0.428
#> GSM1105503     1  0.9850     0.0381 0.572 0.428
#> GSM1105507     1  0.0000     0.6812 1.000 0.000
#> GSM1105446     2  0.9491     0.7063 0.368 0.632
#> GSM1105519     1  0.0000     0.6812 1.000 0.000
#> GSM1105526     2  0.9775     0.6615 0.412 0.588
#> GSM1105527     1  0.9850     0.0381 0.572 0.428
#> GSM1105531     1  0.0376     0.6789 0.996 0.004
#> GSM1105543     2  0.9491     0.7063 0.368 0.632
#> GSM1105546     1  0.0000     0.6812 1.000 0.000
#> GSM1105547     1  0.0000     0.6812 1.000 0.000
#> GSM1105455     2  0.9635     0.7109 0.388 0.612
#> GSM1105458     1  0.9850     0.0381 0.572 0.428
#> GSM1105459     2  0.0000     0.5207 0.000 1.000
#> GSM1105462     1  0.9850     0.0381 0.572 0.428
#> GSM1105441     2  0.9427     0.6991 0.360 0.640
#> GSM1105465     1  0.9850     0.0381 0.572 0.428
#> GSM1105484     2  0.9635     0.7109 0.388 0.612
#> GSM1105485     2  0.9775     0.6617 0.412 0.588
#> GSM1105496     1  0.9850     0.0381 0.572 0.428
#> GSM1105505     1  0.7950     0.4235 0.760 0.240
#> GSM1105509     1  0.0000     0.6812 1.000 0.000
#> GSM1105448     2  0.9522     0.7082 0.372 0.628
#> GSM1105521     1  0.0000     0.6812 1.000 0.000
#> GSM1105528     2  0.9635     0.7109 0.388 0.612
#> GSM1105529     2  0.9635     0.7109 0.388 0.612
#> GSM1105533     1  0.0000     0.6812 1.000 0.000
#> GSM1105545     2  0.9795     0.6502 0.416 0.584
#> GSM1105548     1  0.0000     0.6812 1.000 0.000
#> GSM1105549     1  0.0000     0.6812 1.000 0.000
#> GSM1105457     1  0.9954    -0.1452 0.540 0.460
#> GSM1105460     2  0.9732     0.6809 0.404 0.596
#> GSM1105461     2  0.0000     0.5207 0.000 1.000
#> GSM1105464     1  0.0000     0.6812 1.000 0.000
#> GSM1105466     1  0.9850     0.0381 0.572 0.428
#> GSM1105479     1  0.9866     0.0152 0.568 0.432
#> GSM1105502     1  0.0000     0.6812 1.000 0.000
#> GSM1105515     1  0.0000     0.6812 1.000 0.000
#> GSM1105523     1  0.0000     0.6812 1.000 0.000
#> GSM1105550     1  0.9850     0.0381 0.572 0.428
#> GSM1105450     2  0.0000     0.5207 0.000 1.000
#> GSM1105451     2  0.0000     0.5207 0.000 1.000
#> GSM1105454     1  0.9850     0.0381 0.572 0.428
#> GSM1105468     2  0.0000     0.5207 0.000 1.000
#> GSM1105481     1  0.9850     0.0381 0.572 0.428
#> GSM1105504     1  0.2043     0.6603 0.968 0.032
#> GSM1105517     1  0.0000     0.6812 1.000 0.000
#> GSM1105525     1  0.0000     0.6812 1.000 0.000
#> GSM1105552     1  0.0000     0.6812 1.000 0.000
#> GSM1105452     2  0.9635     0.7109 0.388 0.612
#> GSM1105453     2  0.0000     0.5207 0.000 1.000
#> GSM1105456     1  0.9850     0.0381 0.572 0.428

show/hide code output

cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#>            class entropy silhouette    p1    p2    p3
#> GSM1105438     2  0.6126    -0.3055 0.000 0.600 0.400
#> GSM1105486     3  0.6095     0.7981 0.000 0.392 0.608
#> GSM1105487     1  0.0424     0.8749 0.992 0.000 0.008
#> GSM1105490     2  0.0237     0.6924 0.000 0.996 0.004
#> GSM1105491     3  0.7187    -0.4021 0.024 0.480 0.496
#> GSM1105495     3  0.7075    -0.4097 0.020 0.488 0.492
#> GSM1105498     2  0.5200     0.6135 0.020 0.796 0.184
#> GSM1105499     1  0.0237     0.8763 0.996 0.004 0.000
#> GSM1105506     2  0.0000     0.6934 0.000 1.000 0.000
#> GSM1105442     2  0.5633     0.5288 0.024 0.768 0.208
#> GSM1105511     2  0.0000     0.6934 0.000 1.000 0.000
#> GSM1105514     3  0.5706     0.7560 0.000 0.320 0.680
#> GSM1105518     2  0.5253     0.6116 0.020 0.792 0.188
#> GSM1105522     1  0.0237     0.8763 0.996 0.004 0.000
#> GSM1105534     1  0.0000     0.8751 1.000 0.000 0.000
#> GSM1105535     1  0.0237     0.8763 0.996 0.004 0.000
#> GSM1105538     1  0.0237     0.8763 0.996 0.004 0.000
#> GSM1105542     2  0.5115     0.5047 0.004 0.768 0.228
#> GSM1105443     2  0.0661     0.6937 0.004 0.988 0.008
#> GSM1105551     1  0.4399     0.8271 0.812 0.000 0.188
#> GSM1105554     1  0.0237     0.8763 0.996 0.004 0.000
#> GSM1105555     1  0.4399     0.8271 0.812 0.000 0.188
#> GSM1105447     2  0.1129     0.6924 0.004 0.976 0.020
#> GSM1105467     2  0.4235     0.5051 0.000 0.824 0.176
#> GSM1105470     3  0.5988     0.8228 0.000 0.368 0.632
#> GSM1105471     2  0.5147     0.6160 0.020 0.800 0.180
#> GSM1105474     3  0.5988     0.8228 0.000 0.368 0.632
#> GSM1105475     2  0.1643     0.6724 0.000 0.956 0.044
#> GSM1105440     1  0.0237     0.8763 0.996 0.004 0.000
#> GSM1105488     2  0.5115     0.5047 0.004 0.768 0.228
#> GSM1105489     1  0.4399     0.8271 0.812 0.000 0.188
#> GSM1105492     1  0.0237     0.8763 0.996 0.004 0.000
#> GSM1105493     1  0.4346     0.8275 0.816 0.000 0.184
#> GSM1105497     2  0.6026     0.5160 0.024 0.732 0.244
#> GSM1105500     2  0.0892     0.6954 0.020 0.980 0.000
#> GSM1105501     2  0.0000     0.6934 0.000 1.000 0.000
#> GSM1105508     1  0.0237     0.8763 0.996 0.004 0.000
#> GSM1105444     2  0.5244     0.4830 0.004 0.756 0.240
#> GSM1105513     2  0.0424     0.6954 0.008 0.992 0.000
#> GSM1105516     2  0.3918     0.6268 0.120 0.868 0.012
#> GSM1105520     2  0.6387     0.5327 0.020 0.680 0.300
#> GSM1105524     1  0.0237     0.8763 0.996 0.004 0.000
#> GSM1105536     2  0.0747     0.6872 0.000 0.984 0.016
#> GSM1105537     1  0.0237     0.8763 0.996 0.004 0.000
#> GSM1105540     2  0.6154     0.3524 0.408 0.592 0.000
#> GSM1105544     2  0.0892     0.6954 0.020 0.980 0.000
#> GSM1105445     2  0.4862     0.6298 0.020 0.820 0.160
#> GSM1105553     2  0.6387     0.5327 0.020 0.680 0.300
#> GSM1105556     1  0.0000     0.8751 1.000 0.000 0.000
#> GSM1105557     2  0.0000     0.6934 0.000 1.000 0.000
#> GSM1105449     2  0.3551     0.5853 0.000 0.868 0.132
#> GSM1105469     2  0.4605     0.5670 0.204 0.796 0.000
#> GSM1105472     3  0.5988     0.8228 0.000 0.368 0.632
#> GSM1105473     1  0.9314     0.2261 0.492 0.328 0.180
#> GSM1105476     2  0.4346     0.5138 0.000 0.816 0.184
#> GSM1105477     2  0.1643     0.6688 0.000 0.956 0.044
#> GSM1105478     2  0.4136     0.6534 0.020 0.864 0.116
#> GSM1105510     2  0.4682     0.5327 0.004 0.804 0.192
#> GSM1105530     1  0.4233     0.8372 0.836 0.004 0.160
#> GSM1105539     1  0.4399     0.8271 0.812 0.000 0.188
#> GSM1105480     2  0.0424     0.6954 0.008 0.992 0.000
#> GSM1105512     1  0.0237     0.8763 0.996 0.004 0.000
#> GSM1105532     1  0.4521     0.8294 0.816 0.004 0.180
#> GSM1105541     1  0.4399     0.8271 0.812 0.000 0.188
#> GSM1105439     2  0.0592     0.6879 0.000 0.988 0.012
#> GSM1105463     2  0.9582     0.3392 0.228 0.472 0.300
#> GSM1105482     1  0.0000     0.8751 1.000 0.000 0.000
#> GSM1105483     2  0.0000     0.6934 0.000 1.000 0.000
#> GSM1105494     2  0.0892     0.6954 0.020 0.980 0.000
#> GSM1105503     2  0.6387     0.5327 0.020 0.680 0.300
#> GSM1105507     1  0.6274    -0.0552 0.544 0.456 0.000
#> GSM1105446     3  0.6521     0.4672 0.004 0.492 0.504
#> GSM1105519     1  0.0237     0.8763 0.996 0.004 0.000
#> GSM1105526     2  0.0237     0.6924 0.000 0.996 0.004
#> GSM1105527     2  0.0237     0.6939 0.004 0.996 0.000
#> GSM1105531     2  0.9304     0.3772 0.192 0.508 0.300
#> GSM1105543     3  0.6386     0.7634 0.004 0.412 0.584
#> GSM1105546     1  0.0237     0.8763 0.996 0.004 0.000
#> GSM1105547     1  0.0000     0.8751 1.000 0.000 0.000
#> GSM1105455     2  0.1529     0.6752 0.000 0.960 0.040
#> GSM1105458     2  0.0892     0.6954 0.020 0.980 0.000
#> GSM1105459     3  0.5988     0.8228 0.000 0.368 0.632
#> GSM1105462     2  0.5384     0.6087 0.024 0.788 0.188
#> GSM1105441     3  0.6204     0.7627 0.000 0.424 0.576
#> GSM1105465     2  0.6969     0.4352 0.024 0.596 0.380
#> GSM1105484     2  0.5115     0.5047 0.004 0.768 0.228
#> GSM1105485     2  0.5633     0.5288 0.024 0.768 0.208
#> GSM1105496     2  0.6387     0.5327 0.020 0.680 0.300
#> GSM1105505     2  0.7509     0.4958 0.064 0.636 0.300
#> GSM1105509     1  0.0237     0.8763 0.996 0.004 0.000
#> GSM1105448     2  0.6460    -0.2737 0.004 0.556 0.440
#> GSM1105521     1  0.0237     0.8763 0.996 0.004 0.000
#> GSM1105528     2  0.5115     0.5047 0.004 0.768 0.228
#> GSM1105529     2  0.5115     0.5047 0.004 0.768 0.228
#> GSM1105533     1  0.4399     0.8271 0.812 0.000 0.188
#> GSM1105545     2  0.0424     0.6910 0.000 0.992 0.008
#> GSM1105548     1  0.3941     0.8382 0.844 0.000 0.156
#> GSM1105549     1  0.3267     0.7717 0.884 0.116 0.000
#> GSM1105457     2  0.0000     0.6934 0.000 1.000 0.000
#> GSM1105460     2  0.0237     0.6947 0.004 0.996 0.000
#> GSM1105461     3  0.5988     0.8228 0.000 0.368 0.632
#> GSM1105464     1  0.4521     0.8294 0.816 0.004 0.180
#> GSM1105466     2  0.0000     0.6934 0.000 1.000 0.000
#> GSM1105479     2  0.0892     0.6954 0.020 0.980 0.000
#> GSM1105502     1  0.4399     0.8271 0.812 0.000 0.188
#> GSM1105515     1  0.0000     0.8751 1.000 0.000 0.000
#> GSM1105523     2  0.8562     0.4367 0.208 0.608 0.184
#> GSM1105550     2  0.4654     0.5670 0.208 0.792 0.000
#> GSM1105450     3  0.5988     0.8228 0.000 0.368 0.632
#> GSM1105451     3  0.5988     0.8228 0.000 0.368 0.632
#> GSM1105454     2  0.6387     0.5327 0.020 0.680 0.300
#> GSM1105468     3  0.5988     0.8228 0.000 0.368 0.632
#> GSM1105481     2  0.6387     0.5327 0.020 0.680 0.300
#> GSM1105504     2  0.9231     0.3852 0.184 0.516 0.300
#> GSM1105517     1  0.6302    -0.1457 0.520 0.480 0.000
#> GSM1105525     1  0.5062     0.8193 0.800 0.016 0.184
#> GSM1105552     2  0.9402     0.2623 0.344 0.472 0.184
#> GSM1105452     2  0.5115     0.5047 0.004 0.768 0.228
#> GSM1105453     3  0.5988     0.8228 0.000 0.368 0.632
#> GSM1105456     2  0.6387     0.5327 0.020 0.680 0.300

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>            class entropy silhouette    p1    p2    p3    p4
#> GSM1105438     2  0.1637   0.900222 0.000 0.940 0.000 0.060
#> GSM1105486     2  0.1118   0.914155 0.000 0.964 0.000 0.036
#> GSM1105487     1  0.2973   0.868462 0.856 0.000 0.144 0.000
#> GSM1105490     4  0.0000   0.810522 0.000 0.000 0.000 1.000
#> GSM1105491     3  0.3764   0.299146 0.000 0.172 0.816 0.012
#> GSM1105495     3  0.4985  -0.000136 0.000 0.000 0.532 0.468
#> GSM1105498     4  0.3528   0.664577 0.000 0.000 0.192 0.808
#> GSM1105499     1  0.0000   0.870143 1.000 0.000 0.000 0.000
#> GSM1105506     4  0.0000   0.810522 0.000 0.000 0.000 1.000
#> GSM1105442     3  0.4776   0.240215 0.000 0.272 0.712 0.016
#> GSM1105511     4  0.0000   0.810522 0.000 0.000 0.000 1.000
#> GSM1105514     2  0.0921   0.911896 0.000 0.972 0.000 0.028
#> GSM1105518     4  0.4761   0.378321 0.000 0.000 0.372 0.628
#> GSM1105522     1  0.0921   0.873107 0.972 0.000 0.028 0.000
#> GSM1105534     1  0.0000   0.870143 1.000 0.000 0.000 0.000
#> GSM1105535     1  0.0000   0.870143 1.000 0.000 0.000 0.000
#> GSM1105538     1  0.0000   0.870143 1.000 0.000 0.000 0.000
#> GSM1105542     3  0.5712   0.086445 0.000 0.384 0.584 0.032
#> GSM1105443     4  0.1118   0.794391 0.000 0.036 0.000 0.964
#> GSM1105551     1  0.3610   0.858220 0.800 0.000 0.200 0.000
#> GSM1105554     1  0.0000   0.870143 1.000 0.000 0.000 0.000
#> GSM1105555     1  0.3610   0.858220 0.800 0.000 0.200 0.000
#> GSM1105447     4  0.5598   0.495983 0.000 0.220 0.076 0.704
#> GSM1105467     2  0.3486   0.730621 0.000 0.812 0.000 0.188
#> GSM1105470     2  0.1118   0.914155 0.000 0.964 0.000 0.036
#> GSM1105471     4  0.4040   0.594676 0.000 0.000 0.248 0.752
#> GSM1105474     2  0.0921   0.915180 0.000 0.972 0.000 0.028
#> GSM1105475     4  0.3172   0.677141 0.000 0.160 0.000 0.840
#> GSM1105440     1  0.0000   0.870143 1.000 0.000 0.000 0.000
#> GSM1105488     3  0.5712   0.086445 0.000 0.384 0.584 0.032
#> GSM1105489     1  0.3610   0.858220 0.800 0.000 0.200 0.000
#> GSM1105492     1  0.0000   0.870143 1.000 0.000 0.000 0.000
#> GSM1105493     1  0.3610   0.858220 0.800 0.000 0.200 0.000
#> GSM1105497     3  0.5078   0.238193 0.000 0.272 0.700 0.028
#> GSM1105500     4  0.3674   0.706779 0.000 0.036 0.116 0.848
#> GSM1105501     4  0.0000   0.810522 0.000 0.000 0.000 1.000
#> GSM1105508     1  0.0469   0.872116 0.988 0.000 0.012 0.000
#> GSM1105444     2  0.4015   0.719646 0.000 0.832 0.116 0.052
#> GSM1105513     4  0.0000   0.810522 0.000 0.000 0.000 1.000
#> GSM1105516     4  0.2589   0.734815 0.000 0.000 0.116 0.884
#> GSM1105520     3  0.4985  -0.000136 0.000 0.000 0.532 0.468
#> GSM1105524     1  0.0000   0.870143 1.000 0.000 0.000 0.000
#> GSM1105536     4  0.2011   0.766917 0.000 0.000 0.080 0.920
#> GSM1105537     1  0.0000   0.870143 1.000 0.000 0.000 0.000
#> GSM1105540     4  0.6693   0.302179 0.304 0.000 0.116 0.580
#> GSM1105544     4  0.2973   0.725070 0.000 0.000 0.144 0.856
#> GSM1105445     4  0.3569   0.658635 0.000 0.000 0.196 0.804
#> GSM1105553     3  0.4985  -0.000136 0.000 0.000 0.532 0.468
#> GSM1105556     1  0.0000   0.870143 1.000 0.000 0.000 0.000
#> GSM1105557     4  0.0000   0.810522 0.000 0.000 0.000 1.000
#> GSM1105449     2  0.6597   0.101461 0.000 0.540 0.088 0.372
#> GSM1105469     4  0.0000   0.810522 0.000 0.000 0.000 1.000
#> GSM1105472     2  0.0921   0.915180 0.000 0.972 0.000 0.028
#> GSM1105473     1  0.3726   0.849901 0.788 0.000 0.212 0.000
#> GSM1105476     2  0.1637   0.900222 0.000 0.940 0.000 0.060
#> GSM1105477     4  0.4037   0.681788 0.000 0.056 0.112 0.832
#> GSM1105478     4  0.2704   0.740281 0.000 0.000 0.124 0.876
#> GSM1105510     3  0.7275   0.084079 0.000 0.376 0.472 0.152
#> GSM1105530     1  0.3528   0.860680 0.808 0.000 0.192 0.000
#> GSM1105539     1  0.3610   0.858220 0.800 0.000 0.200 0.000
#> GSM1105480     4  0.0000   0.810522 0.000 0.000 0.000 1.000
#> GSM1105512     1  0.0000   0.870143 1.000 0.000 0.000 0.000
#> GSM1105532     1  0.3610   0.858220 0.800 0.000 0.200 0.000
#> GSM1105541     1  0.3610   0.858220 0.800 0.000 0.200 0.000
#> GSM1105439     4  0.0000   0.810522 0.000 0.000 0.000 1.000
#> GSM1105463     1  0.4999   0.476805 0.508 0.000 0.492 0.000
#> GSM1105482     1  0.2973   0.868462 0.856 0.000 0.144 0.000
#> GSM1105483     4  0.0000   0.810522 0.000 0.000 0.000 1.000
#> GSM1105494     4  0.2530   0.751906 0.000 0.000 0.112 0.888
#> GSM1105503     3  0.4992  -0.025936 0.000 0.000 0.524 0.476
#> GSM1105507     1  0.3764   0.747806 0.784 0.000 0.000 0.216
#> GSM1105446     2  0.4799   0.673089 0.000 0.744 0.224 0.032
#> GSM1105519     1  0.0469   0.872122 0.988 0.000 0.012 0.000
#> GSM1105526     4  0.0817   0.801940 0.000 0.000 0.024 0.976
#> GSM1105527     4  0.0000   0.810522 0.000 0.000 0.000 1.000
#> GSM1105531     3  0.4985  -0.000136 0.000 0.000 0.532 0.468
#> GSM1105543     2  0.0817   0.911103 0.000 0.976 0.000 0.024
#> GSM1105546     1  0.0000   0.870143 1.000 0.000 0.000 0.000
#> GSM1105547     1  0.2647   0.870333 0.880 0.000 0.120 0.000
#> GSM1105455     4  0.2647   0.725006 0.000 0.120 0.000 0.880
#> GSM1105458     4  0.6327   0.443238 0.000 0.124 0.228 0.648
#> GSM1105459     2  0.0921   0.915180 0.000 0.972 0.000 0.028
#> GSM1105462     4  0.5000   0.038996 0.000 0.000 0.500 0.500
#> GSM1105441     2  0.1637   0.900222 0.000 0.940 0.000 0.060
#> GSM1105465     3  0.4222   0.238581 0.000 0.272 0.728 0.000
#> GSM1105484     3  0.5712   0.086445 0.000 0.384 0.584 0.032
#> GSM1105485     3  0.5712   0.086445 0.000 0.384 0.584 0.032
#> GSM1105496     3  0.4985  -0.000136 0.000 0.000 0.532 0.468
#> GSM1105505     3  0.4985  -0.000136 0.000 0.000 0.532 0.468
#> GSM1105509     1  0.0188   0.869142 0.996 0.000 0.000 0.004
#> GSM1105448     2  0.1356   0.899280 0.000 0.960 0.008 0.032
#> GSM1105521     1  0.0000   0.870143 1.000 0.000 0.000 0.000
#> GSM1105528     3  0.5712   0.086445 0.000 0.384 0.584 0.032
#> GSM1105529     3  0.5712   0.086445 0.000 0.384 0.584 0.032
#> GSM1105533     1  0.3610   0.858220 0.800 0.000 0.200 0.000
#> GSM1105545     4  0.0000   0.810522 0.000 0.000 0.000 1.000
#> GSM1105548     1  0.3528   0.860717 0.808 0.000 0.192 0.000
#> GSM1105549     1  0.3688   0.832360 0.792 0.000 0.208 0.000
#> GSM1105457     4  0.0000   0.810522 0.000 0.000 0.000 1.000
#> GSM1105460     4  0.0000   0.810522 0.000 0.000 0.000 1.000
#> GSM1105461     2  0.0921   0.915180 0.000 0.972 0.000 0.028
#> GSM1105464     1  0.3610   0.858220 0.800 0.000 0.200 0.000
#> GSM1105466     4  0.0000   0.810522 0.000 0.000 0.000 1.000
#> GSM1105479     4  0.2530   0.751906 0.000 0.000 0.112 0.888
#> GSM1105502     1  0.3610   0.858220 0.800 0.000 0.200 0.000
#> GSM1105515     1  0.0000   0.870143 1.000 0.000 0.000 0.000
#> GSM1105523     4  0.7526   0.142724 0.332 0.000 0.200 0.468
#> GSM1105550     4  0.2647   0.744271 0.000 0.000 0.120 0.880
#> GSM1105450     2  0.0921   0.915180 0.000 0.972 0.000 0.028
#> GSM1105451     2  0.0921   0.915180 0.000 0.972 0.000 0.028
#> GSM1105454     3  0.4985  -0.000136 0.000 0.000 0.532 0.468
#> GSM1105468     2  0.0921   0.915180 0.000 0.972 0.000 0.028
#> GSM1105481     3  0.4985  -0.000136 0.000 0.000 0.532 0.468
#> GSM1105504     3  0.4985  -0.000136 0.000 0.000 0.532 0.468
#> GSM1105517     1  0.5072   0.627615 0.740 0.000 0.052 0.208
#> GSM1105525     1  0.4284   0.842364 0.780 0.000 0.200 0.020
#> GSM1105552     1  0.4936   0.717669 0.672 0.000 0.316 0.012
#> GSM1105452     3  0.5712   0.086445 0.000 0.384 0.584 0.032
#> GSM1105453     2  0.0921   0.915180 0.000 0.972 0.000 0.028
#> GSM1105456     3  0.4985  -0.000136 0.000 0.000 0.532 0.468

show/hide code output

cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#>            class entropy silhouette    p1    p2    p3    p4    p5
#> GSM1105438     2  0.1597      0.892 0.000 0.940 0.000 0.012 0.048
#> GSM1105486     2  0.0162      0.923 0.000 0.996 0.000 0.004 0.000
#> GSM1105487     1  0.4019      0.856 0.792 0.004 0.152 0.000 0.052
#> GSM1105490     4  0.0162      0.879 0.000 0.004 0.000 0.996 0.000
#> GSM1105491     5  0.2304      0.719 0.000 0.000 0.100 0.008 0.892
#> GSM1105495     3  0.2193      0.901 0.000 0.000 0.900 0.008 0.092
#> GSM1105498     4  0.3692      0.787 0.000 0.000 0.136 0.812 0.052
#> GSM1105499     1  0.0000      0.876 1.000 0.000 0.000 0.000 0.000
#> GSM1105506     4  0.0162      0.879 0.000 0.004 0.000 0.996 0.000
#> GSM1105442     5  0.2463      0.900 0.000 0.100 0.008 0.004 0.888
#> GSM1105511     4  0.1041      0.882 0.000 0.004 0.032 0.964 0.000
#> GSM1105514     2  0.0162      0.923 0.000 0.996 0.000 0.004 0.000
#> GSM1105518     4  0.5741      0.318 0.000 0.000 0.360 0.544 0.096
#> GSM1105522     1  0.0324      0.877 0.992 0.000 0.004 0.004 0.000
#> GSM1105534     1  0.0000      0.876 1.000 0.000 0.000 0.000 0.000
#> GSM1105535     1  0.0162      0.876 0.996 0.000 0.000 0.000 0.004
#> GSM1105538     1  0.0000      0.876 1.000 0.000 0.000 0.000 0.000
#> GSM1105542     5  0.2877      0.923 0.000 0.144 0.004 0.004 0.848
#> GSM1105443     4  0.1285      0.870 0.000 0.036 0.004 0.956 0.004
#> GSM1105551     1  0.4060      0.854 0.788 0.004 0.156 0.000 0.052
#> GSM1105554     1  0.0000      0.876 1.000 0.000 0.000 0.000 0.000
#> GSM1105555     1  0.4019      0.855 0.792 0.004 0.152 0.000 0.052
#> GSM1105447     4  0.4949      0.724 0.000 0.148 0.052 0.752 0.048
#> GSM1105467     2  0.4415      0.366 0.000 0.604 0.000 0.388 0.008
#> GSM1105470     2  0.0162      0.923 0.000 0.996 0.000 0.004 0.000
#> GSM1105471     4  0.5611      0.432 0.000 0.004 0.284 0.616 0.096
#> GSM1105474     2  0.0162      0.923 0.000 0.996 0.000 0.004 0.000
#> GSM1105475     4  0.2732      0.763 0.000 0.160 0.000 0.840 0.000
#> GSM1105440     1  0.0162      0.877 0.996 0.000 0.004 0.000 0.000
#> GSM1105488     5  0.2877      0.923 0.000 0.144 0.004 0.004 0.848
#> GSM1105489     1  0.4019      0.855 0.792 0.004 0.152 0.000 0.052
#> GSM1105492     1  0.0000      0.876 1.000 0.000 0.000 0.000 0.000
#> GSM1105493     1  0.4134      0.855 0.792 0.004 0.148 0.004 0.052
#> GSM1105497     5  0.1990      0.827 0.000 0.028 0.040 0.004 0.928
#> GSM1105500     4  0.2875      0.851 0.000 0.056 0.052 0.884 0.008
#> GSM1105501     4  0.1041      0.882 0.000 0.004 0.032 0.964 0.000
#> GSM1105508     1  0.0324      0.877 0.992 0.000 0.004 0.004 0.000
#> GSM1105444     2  0.1830      0.883 0.000 0.932 0.004 0.012 0.052
#> GSM1105513     4  0.0324      0.878 0.000 0.004 0.000 0.992 0.004
#> GSM1105516     1  0.5091      0.518 0.624 0.004 0.044 0.328 0.000
#> GSM1105520     3  0.5137      0.624 0.000 0.000 0.676 0.228 0.096
#> GSM1105524     1  0.0162      0.876 0.996 0.000 0.000 0.000 0.004
#> GSM1105536     4  0.1357      0.878 0.000 0.004 0.048 0.948 0.000
#> GSM1105537     1  0.0162      0.876 0.996 0.000 0.000 0.000 0.004
#> GSM1105540     1  0.4559      0.756 0.748 0.000 0.100 0.152 0.000
#> GSM1105544     4  0.2032      0.869 0.020 0.000 0.052 0.924 0.004
#> GSM1105445     4  0.5053      0.630 0.000 0.000 0.216 0.688 0.096
#> GSM1105553     3  0.2249      0.900 0.000 0.000 0.896 0.008 0.096
#> GSM1105556     1  0.0000      0.876 1.000 0.000 0.000 0.000 0.000
#> GSM1105557     4  0.0162      0.879 0.000 0.004 0.000 0.996 0.000
#> GSM1105449     2  0.4325      0.668 0.000 0.756 0.004 0.192 0.048
#> GSM1105469     4  0.1518      0.877 0.004 0.004 0.048 0.944 0.000
#> GSM1105472     2  0.0162      0.923 0.000 0.996 0.000 0.004 0.000
#> GSM1105473     1  0.4256      0.853 0.788 0.004 0.148 0.008 0.052
#> GSM1105476     2  0.1908      0.838 0.000 0.908 0.000 0.092 0.000
#> GSM1105477     4  0.1597      0.878 0.000 0.012 0.048 0.940 0.000
#> GSM1105478     4  0.1341      0.864 0.000 0.000 0.056 0.944 0.000
#> GSM1105510     5  0.3213      0.921 0.000 0.144 0.004 0.016 0.836
#> GSM1105530     1  0.4060      0.854 0.788 0.004 0.156 0.000 0.052
#> GSM1105539     1  0.4031      0.854 0.788 0.004 0.160 0.000 0.048
#> GSM1105480     4  0.0404      0.882 0.000 0.000 0.012 0.988 0.000
#> GSM1105512     1  0.0000      0.876 1.000 0.000 0.000 0.000 0.000
#> GSM1105532     1  0.4060      0.854 0.788 0.004 0.156 0.000 0.052
#> GSM1105541     1  0.4031      0.854 0.788 0.004 0.160 0.000 0.048
#> GSM1105439     4  0.0290      0.879 0.000 0.008 0.000 0.992 0.000
#> GSM1105463     1  0.4604      0.809 0.732 0.004 0.216 0.004 0.044
#> GSM1105482     1  0.1518      0.875 0.944 0.000 0.048 0.004 0.004
#> GSM1105483     4  0.1282      0.879 0.000 0.004 0.044 0.952 0.000
#> GSM1105494     4  0.1934      0.864 0.000 0.004 0.052 0.928 0.016
#> GSM1105503     3  0.0912      0.854 0.000 0.000 0.972 0.016 0.012
#> GSM1105507     1  0.3333      0.760 0.788 0.004 0.000 0.208 0.000
#> GSM1105446     2  0.3231      0.680 0.000 0.800 0.000 0.004 0.196
#> GSM1105519     1  0.0324      0.877 0.992 0.000 0.004 0.004 0.000
#> GSM1105526     4  0.1282      0.879 0.000 0.004 0.044 0.952 0.000
#> GSM1105527     4  0.0771      0.882 0.000 0.004 0.020 0.976 0.000
#> GSM1105531     3  0.1443      0.810 0.000 0.004 0.948 0.004 0.044
#> GSM1105543     2  0.0162      0.923 0.000 0.996 0.000 0.004 0.000
#> GSM1105546     1  0.0000      0.876 1.000 0.000 0.000 0.000 0.000
#> GSM1105547     1  0.0451      0.878 0.988 0.000 0.008 0.004 0.000
#> GSM1105455     4  0.2648      0.771 0.000 0.152 0.000 0.848 0.000
#> GSM1105458     4  0.4778      0.737 0.000 0.012 0.136 0.752 0.100
#> GSM1105459     2  0.0162      0.923 0.000 0.996 0.000 0.004 0.000
#> GSM1105462     4  0.7917     -0.119 0.264 0.004 0.316 0.356 0.060
#> GSM1105441     2  0.1251      0.903 0.000 0.956 0.000 0.008 0.036
#> GSM1105465     5  0.1768      0.767 0.000 0.000 0.072 0.004 0.924
#> GSM1105484     5  0.3044      0.923 0.000 0.148 0.004 0.008 0.840
#> GSM1105485     5  0.3067      0.924 0.000 0.140 0.004 0.012 0.844
#> GSM1105496     3  0.2249      0.900 0.000 0.000 0.896 0.008 0.096
#> GSM1105505     3  0.2481      0.782 0.056 0.004 0.908 0.008 0.024
#> GSM1105509     1  0.0324      0.877 0.992 0.000 0.004 0.004 0.000
#> GSM1105448     2  0.1205      0.903 0.000 0.956 0.000 0.004 0.040
#> GSM1105521     1  0.0000      0.876 1.000 0.000 0.000 0.000 0.000
#> GSM1105528     5  0.3154      0.920 0.000 0.148 0.004 0.012 0.836
#> GSM1105529     5  0.3111      0.923 0.000 0.144 0.004 0.012 0.840
#> GSM1105533     1  0.4031      0.854 0.788 0.004 0.160 0.000 0.048
#> GSM1105545     4  0.1205      0.880 0.000 0.004 0.040 0.956 0.000
#> GSM1105548     1  0.2823      0.871 0.880 0.004 0.092 0.004 0.020
#> GSM1105549     1  0.1717      0.875 0.936 0.000 0.052 0.004 0.008
#> GSM1105457     4  0.0290      0.879 0.000 0.008 0.000 0.992 0.000
#> GSM1105460     4  0.0486      0.879 0.000 0.004 0.004 0.988 0.004
#> GSM1105461     2  0.0162      0.923 0.000 0.996 0.000 0.004 0.000
#> GSM1105464     1  0.4019      0.855 0.792 0.004 0.152 0.000 0.052
#> GSM1105466     4  0.0162      0.879 0.000 0.004 0.000 0.996 0.000
#> GSM1105479     4  0.1653      0.871 0.000 0.004 0.028 0.944 0.024
#> GSM1105502     1  0.4060      0.854 0.788 0.004 0.156 0.000 0.052
#> GSM1105515     1  0.0000      0.876 1.000 0.000 0.000 0.000 0.000
#> GSM1105523     1  0.4702      0.816 0.740 0.004 0.196 0.008 0.052
#> GSM1105550     4  0.2124      0.850 0.004 0.000 0.096 0.900 0.000
#> GSM1105450     2  0.0162      0.923 0.000 0.996 0.000 0.004 0.000
#> GSM1105451     2  0.0162      0.923 0.000 0.996 0.000 0.004 0.000
#> GSM1105454     3  0.2193      0.901 0.000 0.000 0.900 0.008 0.092
#> GSM1105468     2  0.0162      0.923 0.000 0.996 0.000 0.004 0.000
#> GSM1105481     3  0.2193      0.901 0.000 0.000 0.900 0.008 0.092
#> GSM1105504     1  0.5594      0.536 0.556 0.004 0.384 0.008 0.048
#> GSM1105517     1  0.1012      0.871 0.968 0.000 0.020 0.012 0.000
#> GSM1105525     1  0.4514      0.828 0.752 0.004 0.188 0.004 0.052
#> GSM1105552     1  0.4454      0.840 0.768 0.004 0.168 0.008 0.052
#> GSM1105452     5  0.2763      0.922 0.000 0.148 0.004 0.000 0.848
#> GSM1105453     2  0.0162      0.923 0.000 0.996 0.000 0.004 0.000
#> GSM1105456     3  0.2193      0.901 0.000 0.000 0.900 0.008 0.092

show/hide code output

cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#>            class entropy silhouette    p1    p2    p3    p4    p5    p6
#> GSM1105438     2  0.0260     0.9076 0.000 0.992 0.000 0.000 0.008 0.000
#> GSM1105486     2  0.0000     0.9106 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1105487     3  0.0508     0.6028 0.012 0.000 0.984 0.000 0.000 0.004
#> GSM1105490     4  0.0363     0.7695 0.012 0.000 0.000 0.988 0.000 0.000
#> GSM1105491     5  0.0260     0.8093 0.000 0.000 0.000 0.000 0.992 0.008
#> GSM1105495     6  0.0000     0.7986 0.000 0.000 0.000 0.000 0.000 1.000
#> GSM1105498     4  0.2969     0.6262 0.000 0.000 0.000 0.776 0.000 0.224
#> GSM1105499     3  0.3515     0.1687 0.324 0.000 0.676 0.000 0.000 0.000
#> GSM1105506     4  0.0363     0.7669 0.012 0.000 0.000 0.988 0.000 0.000
#> GSM1105442     5  0.0260     0.8151 0.000 0.008 0.000 0.000 0.992 0.000
#> GSM1105511     4  0.1643     0.7634 0.068 0.000 0.000 0.924 0.000 0.008
#> GSM1105514     2  0.0146     0.9094 0.000 0.996 0.000 0.000 0.004 0.000
#> GSM1105518     6  0.3482     0.3847 0.000 0.000 0.000 0.316 0.000 0.684
#> GSM1105522     3  0.3565     0.2013 0.304 0.000 0.692 0.004 0.000 0.000
#> GSM1105534     1  0.3547     0.9313 0.668 0.000 0.332 0.000 0.000 0.000
#> GSM1105535     3  0.3499     0.1737 0.320 0.000 0.680 0.000 0.000 0.000
#> GSM1105538     1  0.3547     0.9313 0.668 0.000 0.332 0.000 0.000 0.000
#> GSM1105542     5  0.2491     0.8931 0.000 0.164 0.000 0.000 0.836 0.000
#> GSM1105443     4  0.3368     0.5509 0.012 0.232 0.000 0.756 0.000 0.000
#> GSM1105551     3  0.0405     0.6044 0.008 0.000 0.988 0.000 0.000 0.004
#> GSM1105554     1  0.3547     0.9313 0.668 0.000 0.332 0.000 0.000 0.000
#> GSM1105555     3  0.0146     0.6045 0.000 0.000 0.996 0.000 0.000 0.004
#> GSM1105447     2  0.5634     0.3163 0.012 0.516 0.000 0.372 0.004 0.096
#> GSM1105467     2  0.1556     0.8427 0.000 0.920 0.000 0.080 0.000 0.000
#> GSM1105470     2  0.0000     0.9106 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1105471     4  0.3911     0.3129 0.008 0.000 0.000 0.624 0.000 0.368
#> GSM1105474     2  0.0000     0.9106 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1105475     2  0.3659     0.5032 0.000 0.636 0.000 0.364 0.000 0.000
#> GSM1105440     3  0.3636     0.1726 0.320 0.000 0.676 0.004 0.000 0.000
#> GSM1105488     5  0.2527     0.8927 0.000 0.168 0.000 0.000 0.832 0.000
#> GSM1105489     3  0.3850     0.0230 0.340 0.000 0.652 0.000 0.004 0.004
#> GSM1105492     1  0.3592     0.9182 0.656 0.000 0.344 0.000 0.000 0.000
#> GSM1105493     3  0.5743    -0.4361 0.404 0.000 0.428 0.000 0.168 0.000
#> GSM1105497     5  0.0260     0.8093 0.000 0.000 0.000 0.000 0.992 0.008
#> GSM1105500     4  0.4903     0.6544 0.068 0.020 0.208 0.696 0.000 0.008
#> GSM1105501     4  0.2562     0.7416 0.172 0.000 0.000 0.828 0.000 0.000
#> GSM1105508     3  0.3672     0.1984 0.304 0.000 0.688 0.008 0.000 0.000
#> GSM1105444     2  0.0260     0.9076 0.000 0.992 0.000 0.000 0.008 0.000
#> GSM1105513     4  0.0363     0.7669 0.012 0.000 0.000 0.988 0.000 0.000
#> GSM1105516     4  0.4422     0.6047 0.068 0.000 0.252 0.680 0.000 0.000
#> GSM1105520     6  0.0865     0.7871 0.000 0.000 0.000 0.036 0.000 0.964
#> GSM1105524     3  0.3499     0.1737 0.320 0.000 0.680 0.000 0.000 0.000
#> GSM1105536     4  0.3446     0.6774 0.308 0.000 0.000 0.692 0.000 0.000
#> GSM1105537     3  0.3499     0.1737 0.320 0.000 0.680 0.000 0.000 0.000
#> GSM1105540     4  0.4388     0.5728 0.056 0.000 0.276 0.668 0.000 0.000
#> GSM1105544     4  0.4448     0.6516 0.068 0.000 0.216 0.708 0.000 0.008
#> GSM1105445     4  0.3852     0.3885 0.012 0.000 0.000 0.664 0.000 0.324
#> GSM1105553     6  0.0632     0.8001 0.000 0.000 0.024 0.000 0.000 0.976
#> GSM1105556     1  0.3547     0.9313 0.668 0.000 0.332 0.000 0.000 0.000
#> GSM1105557     4  0.0363     0.7695 0.012 0.000 0.000 0.988 0.000 0.000
#> GSM1105449     2  0.1655     0.8667 0.012 0.936 0.000 0.044 0.004 0.004
#> GSM1105469     4  0.4222     0.5908 0.032 0.000 0.268 0.692 0.000 0.008
#> GSM1105472     2  0.0000     0.9106 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1105473     3  0.4180    -0.0360 0.348 0.000 0.628 0.000 0.024 0.000
#> GSM1105476     2  0.0363     0.9036 0.000 0.988 0.000 0.012 0.000 0.000
#> GSM1105477     4  0.3446     0.6774 0.308 0.000 0.000 0.692 0.000 0.000
#> GSM1105478     4  0.0508     0.7662 0.012 0.000 0.000 0.984 0.000 0.004
#> GSM1105510     5  0.2664     0.8846 0.000 0.184 0.000 0.000 0.816 0.000
#> GSM1105530     3  0.0291     0.6050 0.004 0.000 0.992 0.000 0.000 0.004
#> GSM1105539     3  0.0146     0.6045 0.000 0.000 0.996 0.000 0.000 0.004
#> GSM1105480     4  0.0146     0.7690 0.004 0.000 0.000 0.996 0.000 0.000
#> GSM1105512     1  0.3547     0.9313 0.668 0.000 0.332 0.000 0.000 0.000
#> GSM1105532     3  0.0291     0.6050 0.004 0.000 0.992 0.000 0.000 0.004
#> GSM1105541     3  0.0405     0.6043 0.008 0.000 0.988 0.000 0.000 0.004
#> GSM1105439     4  0.2170     0.7034 0.012 0.100 0.000 0.888 0.000 0.000
#> GSM1105463     3  0.3695     0.3176 0.000 0.000 0.624 0.000 0.000 0.376
#> GSM1105482     1  0.3927     0.9070 0.644 0.000 0.344 0.000 0.012 0.000
#> GSM1105483     4  0.2760     0.7567 0.068 0.000 0.052 0.872 0.000 0.008
#> GSM1105494     4  0.0993     0.7590 0.012 0.000 0.000 0.964 0.000 0.024
#> GSM1105503     6  0.0713     0.7988 0.000 0.000 0.028 0.000 0.000 0.972
#> GSM1105507     4  0.4360     0.5960 0.060 0.000 0.260 0.680 0.000 0.000
#> GSM1105446     2  0.1663     0.8277 0.000 0.912 0.000 0.000 0.088 0.000
#> GSM1105519     1  0.3620     0.9101 0.648 0.000 0.352 0.000 0.000 0.000
#> GSM1105526     4  0.3446     0.6774 0.308 0.000 0.000 0.692 0.000 0.000
#> GSM1105527     4  0.0508     0.7695 0.012 0.000 0.000 0.984 0.000 0.004
#> GSM1105531     6  0.3288     0.5827 0.000 0.000 0.276 0.000 0.000 0.724
#> GSM1105543     2  0.0146     0.9094 0.000 0.996 0.000 0.000 0.004 0.000
#> GSM1105546     1  0.3563     0.9280 0.664 0.000 0.336 0.000 0.000 0.000
#> GSM1105547     1  0.3883     0.9210 0.656 0.000 0.332 0.000 0.012 0.000
#> GSM1105455     2  0.4101     0.4217 0.012 0.580 0.000 0.408 0.000 0.000
#> GSM1105458     6  0.6311     0.1742 0.012 0.256 0.000 0.316 0.000 0.416
#> GSM1105459     2  0.0000     0.9106 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1105462     6  0.6277     0.1005 0.008 0.000 0.332 0.268 0.000 0.392
#> GSM1105441     2  0.0146     0.9090 0.000 0.996 0.000 0.004 0.000 0.000
#> GSM1105465     5  0.0260     0.8093 0.000 0.000 0.000 0.000 0.992 0.008
#> GSM1105484     5  0.2491     0.8931 0.000 0.164 0.000 0.000 0.836 0.000
#> GSM1105485     5  0.2527     0.8927 0.000 0.168 0.000 0.000 0.832 0.000
#> GSM1105496     6  0.0632     0.8001 0.000 0.000 0.024 0.000 0.000 0.976
#> GSM1105505     6  0.2300     0.7275 0.000 0.000 0.144 0.000 0.000 0.856
#> GSM1105509     1  0.3975     0.6707 0.544 0.000 0.452 0.004 0.000 0.000
#> GSM1105448     2  0.0146     0.9094 0.000 0.996 0.000 0.000 0.004 0.000
#> GSM1105521     1  0.3547     0.9313 0.668 0.000 0.332 0.000 0.000 0.000
#> GSM1105528     5  0.3446     0.7062 0.000 0.308 0.000 0.000 0.692 0.000
#> GSM1105529     5  0.2697     0.8817 0.000 0.188 0.000 0.000 0.812 0.000
#> GSM1105533     3  0.0146     0.6045 0.000 0.000 0.996 0.000 0.000 0.004
#> GSM1105545     4  0.3446     0.6774 0.308 0.000 0.000 0.692 0.000 0.000
#> GSM1105548     3  0.5737    -0.4030 0.392 0.000 0.440 0.000 0.168 0.000
#> GSM1105549     1  0.6024     0.4460 0.404 0.000 0.348 0.000 0.248 0.000
#> GSM1105457     4  0.0363     0.7669 0.012 0.000 0.000 0.988 0.000 0.000
#> GSM1105460     4  0.1297     0.7489 0.012 0.040 0.000 0.948 0.000 0.000
#> GSM1105461     2  0.0000     0.9106 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1105464     3  0.1958     0.5194 0.100 0.000 0.896 0.000 0.000 0.004
#> GSM1105466     4  0.0363     0.7669 0.012 0.000 0.000 0.988 0.000 0.000
#> GSM1105479     4  0.3625     0.6386 0.012 0.052 0.000 0.804 0.000 0.132
#> GSM1105502     3  0.0508     0.6028 0.012 0.000 0.984 0.000 0.000 0.004
#> GSM1105515     1  0.3547     0.9313 0.668 0.000 0.332 0.000 0.000 0.000
#> GSM1105523     3  0.2980     0.4189 0.000 0.000 0.808 0.180 0.000 0.012
#> GSM1105550     4  0.4366     0.6635 0.068 0.000 0.204 0.720 0.000 0.008
#> GSM1105450     2  0.0000     0.9106 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1105451     2  0.0000     0.9106 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1105454     6  0.0000     0.7986 0.000 0.000 0.000 0.000 0.000 1.000
#> GSM1105468     2  0.0000     0.9106 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1105481     6  0.0000     0.7986 0.000 0.000 0.000 0.000 0.000 1.000
#> GSM1105504     3  0.3847     0.0969 0.000 0.000 0.544 0.000 0.000 0.456
#> GSM1105517     4  0.5925     0.1934 0.256 0.000 0.280 0.464 0.000 0.000
#> GSM1105525     3  0.0146     0.6045 0.000 0.000 0.996 0.000 0.000 0.004
#> GSM1105552     3  0.5020     0.0151 0.312 0.000 0.616 0.000 0.044 0.028
#> GSM1105452     5  0.2762     0.8739 0.000 0.196 0.000 0.000 0.804 0.000
#> GSM1105453     2  0.0000     0.9106 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1105456     6  0.0000     0.7986 0.000 0.000 0.000 0.000 0.000 1.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) other(p) time(p) individual(p) k
#> SD:mclust  87    0.935    0.246   1.000       0.02902 2
#> SD:mclust 103    0.318    0.588   0.694       0.01332 3
#> SD:mclust  89    0.603    0.628   0.639       0.02117 4
#> SD:mclust 116    0.562    0.758   0.588       0.00264 5
#> SD:mclust  96    0.662    0.162   0.709       0.01769 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 44956 rows and 120 columns.
#>   Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'SD' method.
#>   Subgroups are detected by 'NMF' method.
#>   Performed in total 1250 partitions by row resampling.
#>   Best k for subgroups seems to be 2.
#> 
#> Following methods can be applied to this 'ConsensusPartition' object:
#>  [1] "cola_report"             "collect_classes"         "collect_plots"          
#>  [4] "collect_stats"           "colnames"                "compare_signatures"     
#>  [7] "consensus_heatmap"       "dimension_reduction"     "functional_enrichment"  
#> [10] "get_anno_col"            "get_anno"                "get_classes"            
#> [13] "get_consensus"           "get_matrix"              "get_membership"         
#> [16] "get_param"               "get_signatures"          "get_stats"              
#> [19] "is_best_k"               "is_stable_k"             "membership_heatmap"     
#> [22] "ncol"                    "nrow"                    "plot_ecdf"              
#> [25] "rownames"                "select_partition_number" "show"                   
#> [28] "suggest_best_k"          "test_to_known_factors"

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

collect_plots(res)

plot of chunk SD-NMF-collect-plots

The plots are:

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

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

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

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

select_partition_number(res)

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

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

get_stats(res)
#>   k 1-PAC mean_silhouette concordance area_increased  Rand Jaccard
#> 2 2 0.867           0.921       0.967         0.4956 0.505   0.505
#> 3 3 0.509           0.529       0.749         0.3071 0.804   0.622
#> 4 4 0.703           0.755       0.886         0.1053 0.760   0.442
#> 5 5 0.601           0.581       0.775         0.0840 0.852   0.551
#> 6 6 0.554           0.355       0.596         0.0486 0.879   0.538

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
#> GSM1105438     2  0.0000     0.9640 0.000 1.000
#> GSM1105486     2  0.0000     0.9640 0.000 1.000
#> GSM1105487     1  0.0000     0.9653 1.000 0.000
#> GSM1105490     2  0.0000     0.9640 0.000 1.000
#> GSM1105491     2  0.5408     0.8541 0.124 0.876
#> GSM1105495     2  0.7219     0.7643 0.200 0.800
#> GSM1105498     2  0.9248     0.5163 0.340 0.660
#> GSM1105499     1  0.0000     0.9653 1.000 0.000
#> GSM1105506     2  0.0000     0.9640 0.000 1.000
#> GSM1105442     2  0.0000     0.9640 0.000 1.000
#> GSM1105511     2  0.0000     0.9640 0.000 1.000
#> GSM1105514     2  0.0000     0.9640 0.000 1.000
#> GSM1105518     2  0.2043     0.9402 0.032 0.968
#> GSM1105522     1  0.0000     0.9653 1.000 0.000
#> GSM1105534     1  0.0000     0.9653 1.000 0.000
#> GSM1105535     1  0.0000     0.9653 1.000 0.000
#> GSM1105538     1  0.0000     0.9653 1.000 0.000
#> GSM1105542     2  0.0000     0.9640 0.000 1.000
#> GSM1105443     2  0.0000     0.9640 0.000 1.000
#> GSM1105551     1  0.0000     0.9653 1.000 0.000
#> GSM1105554     1  0.0000     0.9653 1.000 0.000
#> GSM1105555     1  0.0000     0.9653 1.000 0.000
#> GSM1105447     2  0.0000     0.9640 0.000 1.000
#> GSM1105467     2  0.0000     0.9640 0.000 1.000
#> GSM1105470     2  0.0000     0.9640 0.000 1.000
#> GSM1105471     2  0.2778     0.9269 0.048 0.952
#> GSM1105474     2  0.0000     0.9640 0.000 1.000
#> GSM1105475     2  0.0000     0.9640 0.000 1.000
#> GSM1105440     1  0.0000     0.9653 1.000 0.000
#> GSM1105488     2  0.0000     0.9640 0.000 1.000
#> GSM1105489     1  0.0000     0.9653 1.000 0.000
#> GSM1105492     1  0.0000     0.9653 1.000 0.000
#> GSM1105493     1  0.0000     0.9653 1.000 0.000
#> GSM1105497     2  0.0000     0.9640 0.000 1.000
#> GSM1105500     2  0.0000     0.9640 0.000 1.000
#> GSM1105501     2  0.0000     0.9640 0.000 1.000
#> GSM1105508     1  0.0000     0.9653 1.000 0.000
#> GSM1105444     2  0.0000     0.9640 0.000 1.000
#> GSM1105513     2  0.0000     0.9640 0.000 1.000
#> GSM1105516     1  0.9866     0.2564 0.568 0.432
#> GSM1105520     2  0.9170     0.5339 0.332 0.668
#> GSM1105524     1  0.0000     0.9653 1.000 0.000
#> GSM1105536     2  0.0000     0.9640 0.000 1.000
#> GSM1105537     1  0.0000     0.9653 1.000 0.000
#> GSM1105540     1  0.0000     0.9653 1.000 0.000
#> GSM1105544     2  0.8499     0.6322 0.276 0.724
#> GSM1105445     2  0.0000     0.9640 0.000 1.000
#> GSM1105553     1  0.9988     0.0145 0.520 0.480
#> GSM1105556     1  0.0000     0.9653 1.000 0.000
#> GSM1105557     2  0.0000     0.9640 0.000 1.000
#> GSM1105449     2  0.0000     0.9640 0.000 1.000
#> GSM1105469     1  0.3584     0.9007 0.932 0.068
#> GSM1105472     2  0.0000     0.9640 0.000 1.000
#> GSM1105473     1  0.0000     0.9653 1.000 0.000
#> GSM1105476     2  0.0000     0.9640 0.000 1.000
#> GSM1105477     2  0.0000     0.9640 0.000 1.000
#> GSM1105478     2  0.7219     0.7643 0.200 0.800
#> GSM1105510     2  0.0000     0.9640 0.000 1.000
#> GSM1105530     1  0.0000     0.9653 1.000 0.000
#> GSM1105539     1  0.0000     0.9653 1.000 0.000
#> GSM1105480     2  0.0000     0.9640 0.000 1.000
#> GSM1105512     1  0.0000     0.9653 1.000 0.000
#> GSM1105532     1  0.0000     0.9653 1.000 0.000
#> GSM1105541     1  0.0000     0.9653 1.000 0.000
#> GSM1105439     2  0.0000     0.9640 0.000 1.000
#> GSM1105463     1  0.0000     0.9653 1.000 0.000
#> GSM1105482     1  0.0000     0.9653 1.000 0.000
#> GSM1105483     2  0.4939     0.8642 0.108 0.892
#> GSM1105494     2  0.0000     0.9640 0.000 1.000
#> GSM1105503     1  0.9775     0.2595 0.588 0.412
#> GSM1105507     1  0.6973     0.7534 0.812 0.188
#> GSM1105446     2  0.0000     0.9640 0.000 1.000
#> GSM1105519     1  0.0000     0.9653 1.000 0.000
#> GSM1105526     2  0.0000     0.9640 0.000 1.000
#> GSM1105527     2  0.0672     0.9582 0.008 0.992
#> GSM1105531     1  0.0000     0.9653 1.000 0.000
#> GSM1105543     2  0.0000     0.9640 0.000 1.000
#> GSM1105546     1  0.0000     0.9653 1.000 0.000
#> GSM1105547     1  0.0000     0.9653 1.000 0.000
#> GSM1105455     2  0.0000     0.9640 0.000 1.000
#> GSM1105458     2  0.0000     0.9640 0.000 1.000
#> GSM1105459     2  0.0000     0.9640 0.000 1.000
#> GSM1105462     1  0.2603     0.9256 0.956 0.044
#> GSM1105441     2  0.0000     0.9640 0.000 1.000
#> GSM1105465     2  0.1633     0.9466 0.024 0.976
#> GSM1105484     2  0.0000     0.9640 0.000 1.000
#> GSM1105485     2  0.0000     0.9640 0.000 1.000
#> GSM1105496     1  0.2603     0.9256 0.956 0.044
#> GSM1105505     1  0.0000     0.9653 1.000 0.000
#> GSM1105509     1  0.0000     0.9653 1.000 0.000
#> GSM1105448     2  0.0000     0.9640 0.000 1.000
#> GSM1105521     1  0.0000     0.9653 1.000 0.000
#> GSM1105528     2  0.0000     0.9640 0.000 1.000
#> GSM1105529     2  0.0000     0.9640 0.000 1.000
#> GSM1105533     1  0.0000     0.9653 1.000 0.000
#> GSM1105545     2  0.0000     0.9640 0.000 1.000
#> GSM1105548     1  0.0000     0.9653 1.000 0.000
#> GSM1105549     1  0.0000     0.9653 1.000 0.000
#> GSM1105457     2  0.0000     0.9640 0.000 1.000
#> GSM1105460     2  0.0000     0.9640 0.000 1.000
#> GSM1105461     2  0.0000     0.9640 0.000 1.000
#> GSM1105464     1  0.0000     0.9653 1.000 0.000
#> GSM1105466     2  0.0000     0.9640 0.000 1.000
#> GSM1105479     2  0.0000     0.9640 0.000 1.000
#> GSM1105502     1  0.0000     0.9653 1.000 0.000
#> GSM1105515     1  0.0000     0.9653 1.000 0.000
#> GSM1105523     1  0.0000     0.9653 1.000 0.000
#> GSM1105550     1  0.0000     0.9653 1.000 0.000
#> GSM1105450     2  0.0000     0.9640 0.000 1.000
#> GSM1105451     2  0.0000     0.9640 0.000 1.000
#> GSM1105454     2  0.7219     0.7643 0.200 0.800
#> GSM1105468     2  0.0000     0.9640 0.000 1.000
#> GSM1105481     2  0.7219     0.7643 0.200 0.800
#> GSM1105504     1  0.0000     0.9653 1.000 0.000
#> GSM1105517     1  0.0000     0.9653 1.000 0.000
#> GSM1105525     1  0.0000     0.9653 1.000 0.000
#> GSM1105552     1  0.0000     0.9653 1.000 0.000
#> GSM1105452     2  0.0000     0.9640 0.000 1.000
#> GSM1105453     2  0.0000     0.9640 0.000 1.000
#> GSM1105456     2  0.7219     0.7643 0.200 0.800

show/hide code output

cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#>            class entropy silhouette    p1    p2    p3
#> GSM1105438     2  0.4887    0.43626 0.000 0.772 0.228
#> GSM1105486     2  0.6260    0.00202 0.000 0.552 0.448
#> GSM1105487     1  0.4346    0.78334 0.816 0.000 0.184
#> GSM1105490     3  0.5988    0.58093 0.000 0.368 0.632
#> GSM1105491     2  0.4978    0.35314 0.004 0.780 0.216
#> GSM1105495     2  0.6126    0.23365 0.000 0.600 0.400
#> GSM1105498     3  0.1751    0.45177 0.028 0.012 0.960
#> GSM1105499     1  0.0000    0.82157 1.000 0.000 0.000
#> GSM1105506     3  0.7095    0.59997 0.048 0.292 0.660
#> GSM1105442     2  0.0747    0.53847 0.000 0.984 0.016
#> GSM1105511     3  0.7190    0.59269 0.044 0.320 0.636
#> GSM1105514     2  0.4235    0.48462 0.000 0.824 0.176
#> GSM1105518     3  0.3879    0.54606 0.000 0.152 0.848
#> GSM1105522     1  0.2261    0.79657 0.932 0.000 0.068
#> GSM1105534     1  0.0237    0.82115 0.996 0.004 0.000
#> GSM1105535     1  0.0000    0.82157 1.000 0.000 0.000
#> GSM1105538     1  0.0747    0.81806 0.984 0.016 0.000
#> GSM1105542     2  0.0000    0.54821 0.000 1.000 0.000
#> GSM1105443     3  0.5882    0.60615 0.000 0.348 0.652
#> GSM1105551     1  0.5810    0.71484 0.664 0.000 0.336
#> GSM1105554     1  0.0000    0.82157 1.000 0.000 0.000
#> GSM1105555     1  0.4702    0.77290 0.788 0.000 0.212
#> GSM1105447     3  0.5988    0.58090 0.000 0.368 0.632
#> GSM1105467     2  0.6267   -0.01797 0.000 0.548 0.452
#> GSM1105470     2  0.6286   -0.07899 0.000 0.536 0.464
#> GSM1105471     3  0.5815    0.60936 0.004 0.304 0.692
#> GSM1105474     2  0.6062    0.22736 0.000 0.616 0.384
#> GSM1105475     3  0.6302    0.28596 0.000 0.480 0.520
#> GSM1105440     1  0.0000    0.82157 1.000 0.000 0.000
#> GSM1105488     2  0.0000    0.54821 0.000 1.000 0.000
#> GSM1105489     1  0.4702    0.77290 0.788 0.000 0.212
#> GSM1105492     1  0.0000    0.82157 1.000 0.000 0.000
#> GSM1105493     1  0.9673    0.42967 0.400 0.388 0.212
#> GSM1105497     2  0.1163    0.52975 0.000 0.972 0.028
#> GSM1105500     2  0.3116    0.52588 0.000 0.892 0.108
#> GSM1105501     3  0.8390    0.45895 0.100 0.340 0.560
#> GSM1105508     1  0.0747    0.81802 0.984 0.000 0.016
#> GSM1105444     2  0.5988    0.25367 0.000 0.632 0.368
#> GSM1105513     3  0.5859    0.60970 0.000 0.344 0.656
#> GSM1105516     2  0.6521   -0.33233 0.496 0.500 0.004
#> GSM1105520     3  0.0747    0.45160 0.016 0.000 0.984
#> GSM1105524     1  0.0000    0.82157 1.000 0.000 0.000
#> GSM1105536     2  0.5948    0.26871 0.000 0.640 0.360
#> GSM1105537     1  0.0000    0.82157 1.000 0.000 0.000
#> GSM1105540     1  0.0237    0.82088 0.996 0.000 0.004
#> GSM1105544     2  0.9824   -0.03268 0.328 0.416 0.256
#> GSM1105445     3  0.4399    0.56677 0.000 0.188 0.812
#> GSM1105553     3  0.3340    0.35749 0.120 0.000 0.880
#> GSM1105556     1  0.4555    0.71426 0.800 0.200 0.000
#> GSM1105557     3  0.5882    0.60625 0.000 0.348 0.652
#> GSM1105449     3  0.6309    0.22199 0.000 0.496 0.504
#> GSM1105469     1  0.5216    0.61465 0.740 0.000 0.260
#> GSM1105472     2  0.6062    0.22736 0.000 0.616 0.384
#> GSM1105473     1  0.9263    0.49637 0.476 0.360 0.164
#> GSM1105476     2  0.6079    0.21779 0.000 0.612 0.388
#> GSM1105477     2  0.1964    0.54326 0.000 0.944 0.056
#> GSM1105478     3  0.5493    0.58808 0.012 0.232 0.756
#> GSM1105510     2  0.0000    0.54821 0.000 1.000 0.000
#> GSM1105530     1  0.0000    0.82157 1.000 0.000 0.000
#> GSM1105539     1  0.5859    0.71079 0.656 0.000 0.344
#> GSM1105480     3  0.5835    0.61257 0.000 0.340 0.660
#> GSM1105512     1  0.0000    0.82157 1.000 0.000 0.000
#> GSM1105532     1  0.1289    0.81294 0.968 0.000 0.032
#> GSM1105541     1  0.5291    0.75121 0.732 0.000 0.268
#> GSM1105439     3  0.5968    0.58651 0.000 0.364 0.636
#> GSM1105463     1  0.5859    0.71007 0.656 0.000 0.344
#> GSM1105482     1  0.5315    0.69902 0.772 0.216 0.012
#> GSM1105483     3  0.6647    0.30355 0.396 0.012 0.592
#> GSM1105494     3  0.5835    0.61257 0.000 0.340 0.660
#> GSM1105503     3  0.3192    0.36515 0.112 0.000 0.888
#> GSM1105507     1  0.0237    0.82021 0.996 0.000 0.004
#> GSM1105446     2  0.2066    0.54251 0.000 0.940 0.060
#> GSM1105519     1  0.0000    0.82157 1.000 0.000 0.000
#> GSM1105526     2  0.6095    0.20756 0.000 0.608 0.392
#> GSM1105527     3  0.6935    0.37807 0.312 0.036 0.652
#> GSM1105531     1  0.6244    0.63934 0.560 0.000 0.440
#> GSM1105543     2  0.3686    0.50889 0.000 0.860 0.140
#> GSM1105546     1  0.0000    0.82157 1.000 0.000 0.000
#> GSM1105547     1  0.6264    0.51744 0.616 0.380 0.004
#> GSM1105455     3  0.6095    0.53454 0.000 0.392 0.608
#> GSM1105458     3  0.6299    0.29684 0.000 0.476 0.524
#> GSM1105459     2  0.6140    0.17399 0.000 0.596 0.404
#> GSM1105462     1  0.6260    0.62379 0.552 0.000 0.448
#> GSM1105441     3  0.6309    0.22199 0.000 0.496 0.504
#> GSM1105465     2  0.4235    0.39424 0.000 0.824 0.176
#> GSM1105484     2  0.0000    0.54821 0.000 1.000 0.000
#> GSM1105485     2  0.0424    0.54353 0.008 0.992 0.000
#> GSM1105496     1  0.6168    0.66500 0.588 0.000 0.412
#> GSM1105505     1  0.6126    0.67543 0.600 0.000 0.400
#> GSM1105509     1  0.0000    0.82157 1.000 0.000 0.000
#> GSM1105448     2  0.6062    0.22736 0.000 0.616 0.384
#> GSM1105521     1  0.0237    0.82115 0.996 0.004 0.000
#> GSM1105528     2  0.0000    0.54821 0.000 1.000 0.000
#> GSM1105529     2  0.0000    0.54821 0.000 1.000 0.000
#> GSM1105533     1  0.5098    0.75972 0.752 0.000 0.248
#> GSM1105545     3  0.7674    0.19909 0.044 0.472 0.484
#> GSM1105548     1  0.9485    0.54643 0.484 0.304 0.212
#> GSM1105549     1  0.7987    0.39544 0.492 0.448 0.060
#> GSM1105457     3  0.5835    0.61257 0.000 0.340 0.660
#> GSM1105460     3  0.6045    0.55925 0.000 0.380 0.620
#> GSM1105461     2  0.6192    0.11951 0.000 0.580 0.420
#> GSM1105464     1  0.0000    0.82157 1.000 0.000 0.000
#> GSM1105466     3  0.5835    0.61257 0.000 0.340 0.660
#> GSM1105479     3  0.5835    0.61257 0.000 0.340 0.660
#> GSM1105502     1  0.4399    0.78169 0.812 0.000 0.188
#> GSM1105515     1  0.1753    0.80791 0.952 0.048 0.000
#> GSM1105523     1  0.6126    0.56528 0.600 0.000 0.400
#> GSM1105550     1  0.4654    0.68321 0.792 0.000 0.208
#> GSM1105450     2  0.6235    0.05698 0.000 0.564 0.436
#> GSM1105451     2  0.6267   -0.01747 0.000 0.548 0.452
#> GSM1105454     3  0.0237    0.46002 0.004 0.000 0.996
#> GSM1105468     2  0.6225    0.07383 0.000 0.568 0.432
#> GSM1105481     3  0.0237    0.46002 0.004 0.000 0.996
#> GSM1105504     1  0.6045    0.68991 0.620 0.000 0.380
#> GSM1105517     1  0.0000    0.82157 1.000 0.000 0.000
#> GSM1105525     1  0.5905    0.64062 0.648 0.000 0.352
#> GSM1105552     1  0.9985    0.44147 0.360 0.324 0.316
#> GSM1105452     2  0.0000    0.54821 0.000 1.000 0.000
#> GSM1105453     2  0.6140    0.17399 0.000 0.596 0.404
#> GSM1105456     3  0.0237    0.46002 0.004 0.000 0.996

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>            class entropy silhouette    p1    p2    p3    p4
#> GSM1105438     4  0.4855     0.2571 0.000 0.400 0.000 0.600
#> GSM1105486     2  0.2814     0.8190 0.000 0.868 0.000 0.132
#> GSM1105487     1  0.1716     0.8669 0.936 0.000 0.064 0.000
#> GSM1105490     2  0.0000     0.8646 0.000 1.000 0.000 0.000
#> GSM1105491     4  0.0000     0.7738 0.000 0.000 0.000 1.000
#> GSM1105495     3  0.0188     0.8830 0.000 0.000 0.996 0.004
#> GSM1105498     2  0.3257     0.7267 0.004 0.844 0.152 0.000
#> GSM1105499     1  0.0188     0.8961 0.996 0.000 0.000 0.004
#> GSM1105506     2  0.0592     0.8591 0.016 0.984 0.000 0.000
#> GSM1105442     4  0.0188     0.7746 0.000 0.004 0.000 0.996
#> GSM1105511     2  0.0469     0.8610 0.012 0.988 0.000 0.000
#> GSM1105514     4  0.4331     0.5368 0.000 0.288 0.000 0.712
#> GSM1105518     2  0.2401     0.8200 0.000 0.904 0.092 0.004
#> GSM1105522     1  0.0376     0.8941 0.992 0.004 0.004 0.000
#> GSM1105534     1  0.1118     0.8864 0.964 0.000 0.000 0.036
#> GSM1105535     1  0.0188     0.8961 0.996 0.000 0.000 0.004
#> GSM1105538     1  0.0921     0.8902 0.972 0.000 0.000 0.028
#> GSM1105542     4  0.0188     0.7746 0.000 0.004 0.000 0.996
#> GSM1105443     2  0.0188     0.8652 0.000 0.996 0.000 0.004
#> GSM1105551     1  0.3801     0.7155 0.780 0.000 0.220 0.000
#> GSM1105554     1  0.0592     0.8943 0.984 0.000 0.000 0.016
#> GSM1105555     1  0.3791     0.7362 0.796 0.000 0.200 0.004
#> GSM1105447     2  0.0895     0.8649 0.000 0.976 0.004 0.020
#> GSM1105467     2  0.1792     0.8528 0.000 0.932 0.000 0.068
#> GSM1105470     2  0.1211     0.8615 0.000 0.960 0.000 0.040
#> GSM1105471     2  0.0376     0.8653 0.000 0.992 0.004 0.004
#> GSM1105474     2  0.4431     0.6191 0.000 0.696 0.000 0.304
#> GSM1105475     2  0.0592     0.8651 0.000 0.984 0.000 0.016
#> GSM1105440     1  0.0000     0.8957 1.000 0.000 0.000 0.000
#> GSM1105488     4  0.0188     0.7746 0.000 0.004 0.000 0.996
#> GSM1105489     1  0.5423     0.4913 0.640 0.000 0.332 0.028
#> GSM1105492     1  0.0336     0.8958 0.992 0.000 0.000 0.008
#> GSM1105493     4  0.4237     0.6396 0.152 0.000 0.040 0.808
#> GSM1105497     4  0.0376     0.7740 0.000 0.004 0.004 0.992
#> GSM1105500     4  0.5013     0.4078 0.004 0.348 0.004 0.644
#> GSM1105501     2  0.1452     0.8499 0.036 0.956 0.000 0.008
#> GSM1105508     1  0.0188     0.8946 0.996 0.004 0.000 0.000
#> GSM1105444     2  0.5050     0.3912 0.000 0.588 0.004 0.408
#> GSM1105513     2  0.0000     0.8646 0.000 1.000 0.000 0.000
#> GSM1105516     4  0.4040     0.5823 0.248 0.000 0.000 0.752
#> GSM1105520     2  0.4972     0.0964 0.000 0.544 0.456 0.000
#> GSM1105524     1  0.0000     0.8957 1.000 0.000 0.000 0.000
#> GSM1105536     2  0.4936     0.4734 0.004 0.624 0.000 0.372
#> GSM1105537     1  0.0000     0.8957 1.000 0.000 0.000 0.000
#> GSM1105540     1  0.0000     0.8957 1.000 0.000 0.000 0.000
#> GSM1105544     2  0.6668     0.3057 0.380 0.528 0.000 0.092
#> GSM1105445     2  0.0469     0.8626 0.000 0.988 0.012 0.000
#> GSM1105553     3  0.0000     0.8847 0.000 0.000 1.000 0.000
#> GSM1105556     1  0.3569     0.7510 0.804 0.000 0.000 0.196
#> GSM1105557     2  0.0188     0.8637 0.004 0.996 0.000 0.000
#> GSM1105449     2  0.1661     0.8583 0.000 0.944 0.004 0.052
#> GSM1105469     1  0.3444     0.7123 0.816 0.184 0.000 0.000
#> GSM1105472     2  0.4277     0.6558 0.000 0.720 0.000 0.280
#> GSM1105473     4  0.4472     0.5958 0.220 0.000 0.020 0.760
#> GSM1105476     2  0.3356     0.7807 0.000 0.824 0.000 0.176
#> GSM1105477     4  0.4252     0.5980 0.004 0.252 0.000 0.744
#> GSM1105478     2  0.0592     0.8591 0.016 0.984 0.000 0.000
#> GSM1105510     4  0.0817     0.7713 0.000 0.024 0.000 0.976
#> GSM1105530     1  0.0336     0.8946 0.992 0.000 0.008 0.000
#> GSM1105539     3  0.4746     0.3335 0.368 0.000 0.632 0.000
#> GSM1105480     2  0.0336     0.8624 0.008 0.992 0.000 0.000
#> GSM1105512     1  0.0469     0.8952 0.988 0.000 0.000 0.012
#> GSM1105532     1  0.0592     0.8933 0.984 0.000 0.016 0.000
#> GSM1105541     1  0.3982     0.7178 0.776 0.000 0.220 0.004
#> GSM1105439     2  0.0000     0.8646 0.000 1.000 0.000 0.000
#> GSM1105463     3  0.0188     0.8837 0.004 0.000 0.996 0.000
#> GSM1105482     1  0.4761     0.4480 0.628 0.000 0.000 0.372
#> GSM1105483     1  0.4804     0.3832 0.616 0.384 0.000 0.000
#> GSM1105494     2  0.0188     0.8649 0.000 0.996 0.004 0.000
#> GSM1105503     3  0.4250     0.6180 0.000 0.276 0.724 0.000
#> GSM1105507     1  0.0000     0.8957 1.000 0.000 0.000 0.000
#> GSM1105446     4  0.3942     0.6197 0.000 0.236 0.000 0.764
#> GSM1105519     1  0.0336     0.8958 0.992 0.000 0.000 0.008
#> GSM1105526     2  0.3870     0.7461 0.004 0.788 0.000 0.208
#> GSM1105527     2  0.4331     0.5190 0.288 0.712 0.000 0.000
#> GSM1105531     3  0.0188     0.8837 0.004 0.000 0.996 0.000
#> GSM1105543     4  0.4585     0.4472 0.000 0.332 0.000 0.668
#> GSM1105546     1  0.0336     0.8958 0.992 0.000 0.000 0.008
#> GSM1105547     4  0.4713     0.3540 0.360 0.000 0.000 0.640
#> GSM1105455     2  0.0188     0.8652 0.000 0.996 0.000 0.004
#> GSM1105458     2  0.1807     0.8580 0.000 0.940 0.008 0.052
#> GSM1105459     2  0.3688     0.7497 0.000 0.792 0.000 0.208
#> GSM1105462     3  0.7536     0.3548 0.284 0.228 0.488 0.000
#> GSM1105441     2  0.1398     0.8614 0.000 0.956 0.004 0.040
#> GSM1105465     4  0.0000     0.7738 0.000 0.000 0.000 1.000
#> GSM1105484     4  0.1474     0.7626 0.000 0.052 0.000 0.948
#> GSM1105485     4  0.0000     0.7738 0.000 0.000 0.000 1.000
#> GSM1105496     3  0.0000     0.8847 0.000 0.000 1.000 0.000
#> GSM1105505     3  0.0000     0.8847 0.000 0.000 1.000 0.000
#> GSM1105509     1  0.0188     0.8961 0.996 0.000 0.000 0.004
#> GSM1105448     2  0.5004     0.4329 0.000 0.604 0.004 0.392
#> GSM1105521     1  0.0817     0.8914 0.976 0.000 0.000 0.024
#> GSM1105528     4  0.2149     0.7467 0.000 0.088 0.000 0.912
#> GSM1105529     4  0.0000     0.7738 0.000 0.000 0.000 1.000
#> GSM1105533     1  0.4632     0.5744 0.688 0.000 0.308 0.004
#> GSM1105545     2  0.2363     0.8418 0.056 0.920 0.000 0.024
#> GSM1105548     4  0.6855     0.3693 0.292 0.000 0.136 0.572
#> GSM1105549     4  0.2216     0.7168 0.092 0.000 0.000 0.908
#> GSM1105457     2  0.0188     0.8637 0.004 0.996 0.000 0.000
#> GSM1105460     2  0.0336     0.8654 0.000 0.992 0.000 0.008
#> GSM1105461     2  0.2921     0.8124 0.000 0.860 0.000 0.140
#> GSM1105464     1  0.0672     0.8955 0.984 0.000 0.008 0.008
#> GSM1105466     2  0.0188     0.8637 0.004 0.996 0.000 0.000
#> GSM1105479     2  0.0188     0.8652 0.000 0.996 0.000 0.004
#> GSM1105502     1  0.3208     0.7940 0.848 0.000 0.148 0.004
#> GSM1105515     1  0.1637     0.8716 0.940 0.000 0.000 0.060
#> GSM1105523     1  0.3529     0.7492 0.836 0.152 0.012 0.000
#> GSM1105550     1  0.2266     0.8322 0.912 0.084 0.004 0.000
#> GSM1105450     2  0.2704     0.8241 0.000 0.876 0.000 0.124
#> GSM1105451     2  0.2334     0.8430 0.000 0.908 0.004 0.088
#> GSM1105454     3  0.0188     0.8830 0.000 0.000 0.996 0.004
#> GSM1105468     2  0.2704     0.8240 0.000 0.876 0.000 0.124
#> GSM1105481     3  0.0188     0.8830 0.000 0.000 0.996 0.004
#> GSM1105504     3  0.0188     0.8837 0.004 0.000 0.996 0.000
#> GSM1105517     1  0.0188     0.8961 0.996 0.000 0.000 0.004
#> GSM1105525     1  0.1767     0.8662 0.944 0.044 0.012 0.000
#> GSM1105552     4  0.6497     0.3647 0.100 0.000 0.304 0.596
#> GSM1105452     4  0.0336     0.7742 0.000 0.008 0.000 0.992
#> GSM1105453     2  0.4103     0.6926 0.000 0.744 0.000 0.256
#> GSM1105456     3  0.0000     0.8847 0.000 0.000 1.000 0.000

show/hide code output

cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#>            class entropy silhouette    p1    p2    p3    p4    p5
#> GSM1105438     2  0.4294     0.3291 0.000 0.532 0.000 0.000 0.468
#> GSM1105486     2  0.4547     0.6759 0.000 0.704 0.000 0.044 0.252
#> GSM1105487     1  0.3184     0.6379 0.852 0.000 0.048 0.100 0.000
#> GSM1105490     2  0.2209     0.7557 0.056 0.912 0.000 0.032 0.000
#> GSM1105491     5  0.0992     0.7876 0.024 0.000 0.008 0.000 0.968
#> GSM1105495     3  0.0671     0.8498 0.000 0.000 0.980 0.004 0.016
#> GSM1105498     2  0.4924     0.5887 0.052 0.740 0.176 0.032 0.000
#> GSM1105499     4  0.4305    -0.0876 0.488 0.000 0.000 0.512 0.000
#> GSM1105506     2  0.4517     0.3453 0.008 0.556 0.000 0.436 0.000
#> GSM1105442     5  0.1012     0.7892 0.020 0.012 0.000 0.000 0.968
#> GSM1105511     2  0.3400     0.7280 0.036 0.828 0.000 0.136 0.000
#> GSM1105514     5  0.3741     0.4888 0.004 0.264 0.000 0.000 0.732
#> GSM1105518     2  0.3433     0.6971 0.008 0.832 0.136 0.024 0.000
#> GSM1105522     4  0.4300     0.0332 0.476 0.000 0.000 0.524 0.000
#> GSM1105534     1  0.3081     0.6424 0.832 0.000 0.000 0.156 0.012
#> GSM1105535     1  0.4249     0.2290 0.568 0.000 0.000 0.432 0.000
#> GSM1105538     1  0.3224     0.6375 0.824 0.000 0.000 0.160 0.016
#> GSM1105542     5  0.1168     0.7896 0.032 0.008 0.000 0.000 0.960
#> GSM1105443     2  0.0609     0.7715 0.000 0.980 0.000 0.020 0.000
#> GSM1105551     1  0.2136     0.6215 0.904 0.000 0.088 0.008 0.000
#> GSM1105554     1  0.4151     0.4377 0.652 0.000 0.000 0.344 0.004
#> GSM1105555     1  0.2349     0.6388 0.900 0.000 0.084 0.012 0.004
#> GSM1105447     2  0.2138     0.7609 0.032 0.928 0.024 0.012 0.004
#> GSM1105467     2  0.4944     0.6934 0.000 0.700 0.000 0.092 0.208
#> GSM1105470     2  0.5060     0.6915 0.000 0.692 0.000 0.104 0.204
#> GSM1105471     2  0.7083     0.4084 0.000 0.504 0.128 0.308 0.060
#> GSM1105474     2  0.3944     0.6621 0.004 0.720 0.000 0.004 0.272
#> GSM1105475     2  0.2344     0.7707 0.000 0.904 0.000 0.064 0.032
#> GSM1105440     1  0.1341     0.6538 0.944 0.000 0.000 0.056 0.000
#> GSM1105488     5  0.1648     0.7894 0.040 0.020 0.000 0.000 0.940
#> GSM1105489     1  0.2700     0.6400 0.884 0.000 0.088 0.024 0.004
#> GSM1105492     1  0.2969     0.6513 0.852 0.000 0.000 0.128 0.020
#> GSM1105493     5  0.4833     0.5243 0.284 0.000 0.016 0.024 0.676
#> GSM1105497     5  0.6985     0.4581 0.336 0.132 0.024 0.012 0.496
#> GSM1105500     1  0.5703    -0.0436 0.516 0.424 0.004 0.012 0.044
#> GSM1105501     4  0.5189     0.2513 0.012 0.300 0.000 0.644 0.044
#> GSM1105508     1  0.4315     0.4881 0.700 0.024 0.000 0.276 0.000
#> GSM1105444     2  0.4632     0.5134 0.004 0.608 0.000 0.012 0.376
#> GSM1105513     2  0.1106     0.7679 0.012 0.964 0.000 0.024 0.000
#> GSM1105516     5  0.5341     0.3794 0.300 0.000 0.000 0.080 0.620
#> GSM1105520     3  0.4316     0.7625 0.008 0.080 0.784 0.128 0.000
#> GSM1105524     1  0.4283     0.1563 0.544 0.000 0.000 0.456 0.000
#> GSM1105536     5  0.3970     0.5419 0.000 0.236 0.000 0.020 0.744
#> GSM1105537     1  0.4273     0.1817 0.552 0.000 0.000 0.448 0.000
#> GSM1105540     1  0.4640     0.2514 0.584 0.016 0.000 0.400 0.000
#> GSM1105544     1  0.3545     0.5180 0.832 0.132 0.008 0.024 0.004
#> GSM1105445     2  0.1597     0.7668 0.008 0.948 0.024 0.020 0.000
#> GSM1105553     1  0.6739    -0.0306 0.440 0.388 0.156 0.016 0.000
#> GSM1105556     1  0.4335     0.6212 0.760 0.000 0.000 0.168 0.072
#> GSM1105557     2  0.1992     0.7601 0.044 0.924 0.000 0.032 0.000
#> GSM1105449     2  0.1153     0.7723 0.000 0.964 0.004 0.008 0.024
#> GSM1105469     4  0.3355     0.6006 0.132 0.036 0.000 0.832 0.000
#> GSM1105472     2  0.4718     0.3822 0.000 0.540 0.000 0.016 0.444
#> GSM1105473     5  0.3970     0.6945 0.016 0.000 0.080 0.084 0.820
#> GSM1105476     2  0.3934     0.6917 0.000 0.740 0.000 0.016 0.244
#> GSM1105477     5  0.2127     0.7395 0.000 0.108 0.000 0.000 0.892
#> GSM1105478     2  0.4613     0.4755 0.020 0.620 0.000 0.360 0.000
#> GSM1105510     5  0.0771     0.7856 0.004 0.020 0.000 0.000 0.976
#> GSM1105530     4  0.2681     0.6122 0.108 0.000 0.012 0.876 0.004
#> GSM1105539     3  0.3844     0.6275 0.004 0.000 0.736 0.256 0.004
#> GSM1105480     2  0.2595     0.7522 0.080 0.888 0.000 0.032 0.000
#> GSM1105512     4  0.4893     0.1479 0.404 0.000 0.000 0.568 0.028
#> GSM1105532     4  0.2595     0.6240 0.080 0.000 0.032 0.888 0.000
#> GSM1105541     4  0.5343     0.4187 0.076 0.000 0.280 0.640 0.004
#> GSM1105439     2  0.0703     0.7717 0.000 0.976 0.000 0.024 0.000
#> GSM1105463     3  0.0771     0.8509 0.000 0.000 0.976 0.020 0.004
#> GSM1105482     1  0.3471     0.6395 0.836 0.000 0.000 0.072 0.092
#> GSM1105483     4  0.3336     0.5784 0.060 0.096 0.000 0.844 0.000
#> GSM1105494     2  0.3182     0.7312 0.092 0.864 0.016 0.028 0.000
#> GSM1105503     3  0.4617     0.7078 0.012 0.184 0.748 0.056 0.000
#> GSM1105507     1  0.4410     0.2178 0.556 0.000 0.000 0.440 0.004
#> GSM1105446     2  0.5055     0.6465 0.072 0.708 0.000 0.012 0.208
#> GSM1105519     4  0.4748    -0.1390 0.492 0.000 0.000 0.492 0.016
#> GSM1105526     5  0.7031    -0.0567 0.008 0.292 0.000 0.328 0.372
#> GSM1105527     4  0.5037     0.2537 0.048 0.336 0.000 0.616 0.000
#> GSM1105531     3  0.1282     0.8490 0.000 0.000 0.952 0.044 0.004
#> GSM1105543     2  0.4557     0.5910 0.012 0.656 0.000 0.008 0.324
#> GSM1105546     1  0.1670     0.6572 0.936 0.000 0.000 0.052 0.012
#> GSM1105547     1  0.3745     0.5688 0.780 0.000 0.000 0.024 0.196
#> GSM1105455     2  0.0693     0.7697 0.008 0.980 0.000 0.012 0.000
#> GSM1105458     2  0.1875     0.7738 0.008 0.940 0.008 0.016 0.028
#> GSM1105459     2  0.4152     0.6357 0.000 0.692 0.000 0.012 0.296
#> GSM1105462     4  0.5787     0.3222 0.016 0.036 0.224 0.676 0.048
#> GSM1105441     2  0.1082     0.7735 0.000 0.964 0.000 0.008 0.028
#> GSM1105465     5  0.2054     0.7823 0.072 0.004 0.008 0.000 0.916
#> GSM1105484     5  0.1197     0.7768 0.000 0.048 0.000 0.000 0.952
#> GSM1105485     5  0.0771     0.7883 0.020 0.004 0.000 0.000 0.976
#> GSM1105496     3  0.6284     0.4355 0.316 0.128 0.544 0.012 0.000
#> GSM1105505     3  0.1043     0.8507 0.000 0.000 0.960 0.040 0.000
#> GSM1105509     4  0.3607     0.4720 0.244 0.000 0.000 0.752 0.004
#> GSM1105448     2  0.4567     0.5443 0.004 0.628 0.000 0.012 0.356
#> GSM1105521     4  0.5940     0.3335 0.140 0.000 0.000 0.568 0.292
#> GSM1105528     5  0.1571     0.7711 0.000 0.060 0.000 0.004 0.936
#> GSM1105529     5  0.1484     0.7893 0.048 0.008 0.000 0.000 0.944
#> GSM1105533     1  0.6031     0.3380 0.520 0.000 0.352 0.128 0.000
#> GSM1105545     2  0.7031     0.3720 0.028 0.420 0.000 0.384 0.168
#> GSM1105548     1  0.2459     0.6198 0.904 0.000 0.052 0.004 0.040
#> GSM1105549     5  0.3916     0.5866 0.256 0.000 0.000 0.012 0.732
#> GSM1105457     2  0.2723     0.7443 0.012 0.864 0.000 0.124 0.000
#> GSM1105460     2  0.5064     0.6672 0.000 0.680 0.000 0.232 0.088
#> GSM1105461     2  0.3819     0.6977 0.000 0.756 0.000 0.016 0.228
#> GSM1105464     4  0.3326     0.6194 0.080 0.000 0.044 0.860 0.016
#> GSM1105466     2  0.3819     0.6669 0.016 0.756 0.000 0.228 0.000
#> GSM1105479     2  0.3093     0.7250 0.000 0.824 0.000 0.168 0.008
#> GSM1105502     4  0.6158     0.0213 0.416 0.000 0.132 0.452 0.000
#> GSM1105515     1  0.3106     0.6496 0.844 0.000 0.000 0.132 0.024
#> GSM1105523     4  0.2980     0.6058 0.024 0.036 0.056 0.884 0.000
#> GSM1105550     4  0.1310     0.6177 0.020 0.024 0.000 0.956 0.000
#> GSM1105450     2  0.3154     0.7449 0.004 0.836 0.000 0.012 0.148
#> GSM1105451     2  0.1525     0.7713 0.004 0.948 0.000 0.012 0.036
#> GSM1105454     3  0.1638     0.8274 0.004 0.064 0.932 0.000 0.000
#> GSM1105468     2  0.3812     0.7133 0.000 0.772 0.000 0.024 0.204
#> GSM1105481     3  0.3798     0.8065 0.000 0.032 0.836 0.088 0.044
#> GSM1105504     3  0.2228     0.8276 0.004 0.000 0.900 0.092 0.004
#> GSM1105517     4  0.2233     0.6191 0.104 0.000 0.000 0.892 0.004
#> GSM1105525     4  0.3134     0.6203 0.120 0.000 0.032 0.848 0.000
#> GSM1105552     5  0.4952     0.5183 0.008 0.000 0.252 0.052 0.688
#> GSM1105452     5  0.3146     0.7461 0.128 0.028 0.000 0.000 0.844
#> GSM1105453     2  0.2464     0.7638 0.004 0.892 0.000 0.012 0.092
#> GSM1105456     3  0.0162     0.8466 0.004 0.000 0.996 0.000 0.000

show/hide code output

cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#>            class entropy silhouette    p1    p2    p3    p4    p5    p6
#> GSM1105438     2  0.5052     0.4454 0.012 0.656 0.000 0.108 0.224 0.000
#> GSM1105486     4  0.5677     0.1477 0.000 0.344 0.004 0.504 0.148 0.000
#> GSM1105487     1  0.2865     0.5314 0.848 0.004 0.128 0.016 0.000 0.004
#> GSM1105490     2  0.3149     0.5165 0.044 0.824 0.000 0.132 0.000 0.000
#> GSM1105491     5  0.1936     0.5892 0.000 0.012 0.016 0.008 0.928 0.036
#> GSM1105495     6  0.3164     0.6059 0.004 0.000 0.000 0.140 0.032 0.824
#> GSM1105498     4  0.7596     0.0889 0.212 0.288 0.008 0.360 0.000 0.132
#> GSM1105499     3  0.4061     0.2662 0.316 0.000 0.664 0.008 0.012 0.000
#> GSM1105506     4  0.5993     0.1992 0.000 0.376 0.232 0.392 0.000 0.000
#> GSM1105442     5  0.4211     0.6502 0.024 0.024 0.000 0.232 0.720 0.000
#> GSM1105511     2  0.5608     0.0638 0.008 0.520 0.124 0.348 0.000 0.000
#> GSM1105514     5  0.5061     0.4391 0.004 0.240 0.000 0.120 0.636 0.000
#> GSM1105518     2  0.5505     0.3054 0.012 0.624 0.000 0.188 0.004 0.172
#> GSM1105522     3  0.5379     0.2681 0.336 0.000 0.536 0.128 0.000 0.000
#> GSM1105534     1  0.4366     0.2194 0.540 0.000 0.440 0.004 0.016 0.000
#> GSM1105535     3  0.4032     0.0715 0.420 0.000 0.572 0.008 0.000 0.000
#> GSM1105538     1  0.4303     0.3609 0.616 0.000 0.360 0.016 0.008 0.000
#> GSM1105542     5  0.3930     0.6558 0.032 0.004 0.000 0.236 0.728 0.000
#> GSM1105443     2  0.1155     0.5828 0.004 0.956 0.004 0.036 0.000 0.000
#> GSM1105551     1  0.2236     0.5105 0.912 0.008 0.036 0.036 0.000 0.008
#> GSM1105554     3  0.4727     0.1288 0.376 0.000 0.580 0.012 0.032 0.000
#> GSM1105555     1  0.5130     0.4938 0.708 0.008 0.172 0.020 0.012 0.080
#> GSM1105447     2  0.1857     0.5847 0.044 0.924 0.000 0.028 0.004 0.000
#> GSM1105467     4  0.4843     0.2539 0.000 0.300 0.000 0.616 0.084 0.000
#> GSM1105470     4  0.5401     0.0554 0.004 0.408 0.012 0.508 0.068 0.000
#> GSM1105471     4  0.5815     0.2881 0.000 0.100 0.064 0.612 0.000 0.224
#> GSM1105474     2  0.6048    -0.0411 0.004 0.416 0.000 0.368 0.212 0.000
#> GSM1105475     4  0.3872     0.1507 0.000 0.392 0.000 0.604 0.004 0.000
#> GSM1105440     1  0.3731     0.4996 0.736 0.004 0.240 0.020 0.000 0.000
#> GSM1105488     5  0.2806     0.6566 0.008 0.008 0.000 0.144 0.840 0.000
#> GSM1105489     1  0.2798     0.5426 0.860 0.000 0.108 0.000 0.012 0.020
#> GSM1105492     1  0.5515     0.3900 0.616 0.000 0.260 0.080 0.044 0.000
#> GSM1105493     5  0.4740     0.3961 0.104 0.000 0.112 0.008 0.744 0.032
#> GSM1105497     5  0.6885     0.2917 0.368 0.052 0.004 0.152 0.416 0.008
#> GSM1105500     2  0.6282     0.1207 0.420 0.420 0.000 0.104 0.056 0.000
#> GSM1105501     2  0.6477     0.1206 0.008 0.500 0.308 0.140 0.044 0.000
#> GSM1105508     1  0.4394     0.0660 0.496 0.004 0.484 0.016 0.000 0.000
#> GSM1105444     2  0.5358     0.3618 0.008 0.616 0.000 0.220 0.156 0.000
#> GSM1105513     2  0.3558     0.4233 0.016 0.736 0.000 0.248 0.000 0.000
#> GSM1105516     5  0.6371    -0.1155 0.096 0.012 0.296 0.060 0.536 0.000
#> GSM1105520     6  0.7327     0.2961 0.004 0.176 0.128 0.236 0.004 0.452
#> GSM1105524     3  0.4168     0.1306 0.400 0.000 0.584 0.016 0.000 0.000
#> GSM1105536     4  0.6396    -0.2362 0.000 0.220 0.020 0.396 0.364 0.000
#> GSM1105537     3  0.4109     0.0972 0.412 0.000 0.576 0.012 0.000 0.000
#> GSM1105540     1  0.6057     0.0943 0.436 0.008 0.192 0.364 0.000 0.000
#> GSM1105544     1  0.3756     0.3953 0.776 0.024 0.004 0.184 0.012 0.000
#> GSM1105445     2  0.2934     0.5491 0.024 0.868 0.000 0.064 0.000 0.044
#> GSM1105553     1  0.6288     0.0522 0.548 0.248 0.000 0.140 0.000 0.064
#> GSM1105556     3  0.6190     0.0391 0.296 0.000 0.440 0.008 0.256 0.000
#> GSM1105557     2  0.3663     0.4805 0.040 0.776 0.004 0.180 0.000 0.000
#> GSM1105449     2  0.1578     0.5900 0.004 0.936 0.000 0.048 0.012 0.000
#> GSM1105469     4  0.5930     0.0248 0.080 0.044 0.428 0.448 0.000 0.000
#> GSM1105472     5  0.6251     0.0575 0.004 0.320 0.000 0.336 0.340 0.000
#> GSM1105473     5  0.6079     0.5397 0.024 0.000 0.068 0.120 0.644 0.144
#> GSM1105476     4  0.5726     0.1801 0.000 0.360 0.000 0.468 0.172 0.000
#> GSM1105477     5  0.5440     0.5300 0.004 0.132 0.004 0.268 0.592 0.000
#> GSM1105478     4  0.5824     0.2086 0.012 0.384 0.104 0.492 0.000 0.008
#> GSM1105510     5  0.2082     0.5924 0.000 0.052 0.020 0.008 0.916 0.004
#> GSM1105530     3  0.2945     0.4709 0.016 0.000 0.864 0.072 0.000 0.048
#> GSM1105539     6  0.4228     0.3918 0.020 0.000 0.316 0.008 0.000 0.656
#> GSM1105480     4  0.6091     0.0558 0.196 0.396 0.008 0.400 0.000 0.000
#> GSM1105512     3  0.5889     0.2753 0.184 0.000 0.560 0.020 0.236 0.000
#> GSM1105532     3  0.3505     0.4574 0.008 0.000 0.812 0.124 0.000 0.056
#> GSM1105541     3  0.4886     0.3625 0.056 0.000 0.660 0.016 0.004 0.264
#> GSM1105439     2  0.1152     0.5823 0.000 0.952 0.004 0.044 0.000 0.000
#> GSM1105463     6  0.0767     0.7051 0.012 0.000 0.008 0.004 0.000 0.976
#> GSM1105482     1  0.5666     0.3966 0.584 0.000 0.236 0.008 0.168 0.004
#> GSM1105483     4  0.5539     0.1575 0.016 0.084 0.436 0.464 0.000 0.000
#> GSM1105494     2  0.6234    -0.0414 0.232 0.404 0.000 0.356 0.004 0.004
#> GSM1105503     6  0.6691     0.3522 0.016 0.168 0.044 0.264 0.000 0.508
#> GSM1105507     3  0.7373     0.2615 0.224 0.028 0.480 0.160 0.108 0.000
#> GSM1105446     2  0.4227     0.5396 0.016 0.764 0.000 0.108 0.112 0.000
#> GSM1105519     3  0.6818     0.3260 0.256 0.000 0.516 0.124 0.092 0.012
#> GSM1105526     4  0.5659     0.3943 0.008 0.096 0.140 0.672 0.084 0.000
#> GSM1105527     4  0.5847     0.3109 0.016 0.132 0.352 0.500 0.000 0.000
#> GSM1105531     6  0.0777     0.7067 0.000 0.000 0.024 0.004 0.000 0.972
#> GSM1105543     2  0.6223     0.1006 0.020 0.444 0.000 0.356 0.180 0.000
#> GSM1105546     1  0.2737     0.5369 0.832 0.000 0.160 0.004 0.004 0.000
#> GSM1105547     1  0.6101     0.2142 0.416 0.000 0.200 0.008 0.376 0.000
#> GSM1105455     2  0.1225     0.5815 0.012 0.952 0.000 0.036 0.000 0.000
#> GSM1105458     2  0.3065     0.5781 0.024 0.852 0.004 0.108 0.008 0.004
#> GSM1105459     2  0.4391     0.4768 0.004 0.720 0.000 0.188 0.088 0.000
#> GSM1105462     4  0.6145     0.0468 0.000 0.000 0.288 0.456 0.008 0.248
#> GSM1105441     2  0.1931     0.5863 0.004 0.916 0.004 0.068 0.008 0.000
#> GSM1105465     5  0.5324     0.6255 0.132 0.004 0.000 0.272 0.592 0.000
#> GSM1105484     5  0.4822     0.5834 0.004 0.072 0.000 0.296 0.628 0.000
#> GSM1105485     5  0.3122     0.6575 0.020 0.000 0.000 0.176 0.804 0.000
#> GSM1105496     6  0.7083     0.3637 0.308 0.180 0.000 0.076 0.008 0.428
#> GSM1105505     6  0.1080     0.7085 0.000 0.004 0.032 0.000 0.004 0.960
#> GSM1105509     3  0.4720     0.4516 0.076 0.000 0.744 0.072 0.108 0.000
#> GSM1105448     2  0.4828     0.4354 0.004 0.676 0.000 0.196 0.124 0.000
#> GSM1105521     3  0.5529     0.3970 0.108 0.000 0.656 0.044 0.188 0.004
#> GSM1105528     5  0.4702     0.6001 0.004 0.076 0.000 0.260 0.660 0.000
#> GSM1105529     5  0.5528     0.5943 0.084 0.024 0.000 0.336 0.556 0.000
#> GSM1105533     1  0.6108     0.0566 0.408 0.000 0.356 0.004 0.000 0.232
#> GSM1105545     4  0.5735     0.4009 0.004 0.172 0.136 0.640 0.048 0.000
#> GSM1105548     1  0.2483     0.5029 0.904 0.000 0.016 0.024 0.036 0.020
#> GSM1105549     5  0.3668     0.4668 0.084 0.000 0.088 0.016 0.812 0.000
#> GSM1105457     2  0.3062     0.5041 0.000 0.816 0.024 0.160 0.000 0.000
#> GSM1105460     2  0.4728     0.5046 0.004 0.724 0.080 0.168 0.024 0.000
#> GSM1105461     2  0.3794     0.5384 0.004 0.788 0.004 0.144 0.060 0.000
#> GSM1105464     3  0.3076     0.4690 0.024 0.000 0.872 0.032 0.020 0.052
#> GSM1105466     2  0.5466    -0.1704 0.000 0.472 0.124 0.404 0.000 0.000
#> GSM1105479     2  0.4758    -0.1419 0.000 0.476 0.048 0.476 0.000 0.000
#> GSM1105502     3  0.5411     0.2828 0.256 0.000 0.588 0.004 0.000 0.152
#> GSM1105515     1  0.4715     0.2485 0.544 0.000 0.416 0.008 0.032 0.000
#> GSM1105523     3  0.5577    -0.0995 0.004 0.008 0.460 0.436 0.000 0.092
#> GSM1105550     3  0.4487     0.2977 0.020 0.028 0.692 0.256 0.000 0.004
#> GSM1105450     2  0.4596     0.3166 0.008 0.616 0.000 0.340 0.036 0.000
#> GSM1105451     2  0.1346     0.5912 0.008 0.952 0.000 0.024 0.016 0.000
#> GSM1105454     6  0.4087     0.5380 0.028 0.276 0.000 0.004 0.000 0.692
#> GSM1105468     2  0.5190     0.1586 0.004 0.524 0.000 0.392 0.080 0.000
#> GSM1105481     6  0.4453     0.4801 0.000 0.000 0.032 0.296 0.012 0.660
#> GSM1105504     6  0.2848     0.6482 0.000 0.000 0.160 0.008 0.004 0.828
#> GSM1105517     3  0.3802     0.4378 0.036 0.000 0.772 0.180 0.012 0.000
#> GSM1105525     3  0.5920     0.1632 0.060 0.000 0.516 0.356 0.000 0.068
#> GSM1105552     5  0.7620     0.4529 0.060 0.004 0.048 0.228 0.444 0.216
#> GSM1105452     5  0.5768     0.6066 0.060 0.064 0.000 0.316 0.560 0.000
#> GSM1105453     2  0.2796     0.5804 0.008 0.868 0.000 0.044 0.080 0.000
#> GSM1105456     6  0.1707     0.6984 0.012 0.056 0.000 0.004 0.000 0.928

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) other(p) time(p) individual(p) k
#> SD:NMF 117   0.8612  0.46773   0.650       0.00544 2
#> SD:NMF  78   0.6435  0.61261   0.170       0.01662 3
#> SD:NMF 104   0.0845  0.28835   0.162       0.01009 4
#> SD:NMF  88   0.2919  0.00571   0.121       0.00789 5
#> SD:NMF  40   0.2531  0.22150   0.524       0.02183 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 44956 rows and 120 columns.
#>   Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'CV' method.
#>   Subgroups are detected by 'hclust' method.
#>   Performed in total 1250 partitions by row resampling.
#>   Best k for subgroups seems to be 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-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.553           0.820       0.909         0.4646 0.519   0.519
#> 3 3 0.453           0.627       0.800         0.3476 0.839   0.696
#> 4 4 0.505           0.554       0.768         0.1049 0.882   0.699
#> 5 5 0.539           0.494       0.706         0.0965 0.854   0.558
#> 6 6 0.626           0.481       0.714         0.0528 0.887   0.581

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
#> GSM1105438     2  0.0000     0.9209 0.000 1.000
#> GSM1105486     2  0.0000     0.9209 0.000 1.000
#> GSM1105487     1  0.2948     0.8801 0.948 0.052
#> GSM1105490     2  0.1184     0.9187 0.016 0.984
#> GSM1105491     1  0.4690     0.8439 0.900 0.100
#> GSM1105495     2  0.4431     0.8791 0.092 0.908
#> GSM1105498     2  0.9248     0.4764 0.340 0.660
#> GSM1105499     1  0.3114     0.8804 0.944 0.056
#> GSM1105506     2  0.4815     0.8624 0.104 0.896
#> GSM1105442     2  0.0938     0.9206 0.012 0.988
#> GSM1105511     2  0.1184     0.9187 0.016 0.984
#> GSM1105514     2  0.0000     0.9209 0.000 1.000
#> GSM1105518     2  0.6623     0.8200 0.172 0.828
#> GSM1105522     1  0.3114     0.8804 0.944 0.056
#> GSM1105534     1  0.3114     0.8804 0.944 0.056
#> GSM1105535     1  0.3114     0.8804 0.944 0.056
#> GSM1105538     1  0.8144     0.7241 0.748 0.252
#> GSM1105542     2  0.0938     0.9206 0.012 0.988
#> GSM1105443     2  0.0938     0.9208 0.012 0.988
#> GSM1105551     1  1.0000     0.0343 0.500 0.500
#> GSM1105554     1  0.3114     0.8804 0.944 0.056
#> GSM1105555     1  0.2948     0.8801 0.948 0.052
#> GSM1105447     2  0.0938     0.9208 0.012 0.988
#> GSM1105467     2  0.0938     0.9208 0.012 0.988
#> GSM1105470     2  0.0000     0.9209 0.000 1.000
#> GSM1105471     2  0.4815     0.8763 0.104 0.896
#> GSM1105474     2  0.0000     0.9209 0.000 1.000
#> GSM1105475     2  0.0376     0.9212 0.004 0.996
#> GSM1105440     1  0.3114     0.8804 0.944 0.056
#> GSM1105488     2  0.0938     0.9206 0.012 0.988
#> GSM1105489     1  0.2948     0.8801 0.948 0.052
#> GSM1105492     1  0.3114     0.8804 0.944 0.056
#> GSM1105493     1  0.4562     0.8463 0.904 0.096
#> GSM1105497     2  0.4939     0.8718 0.108 0.892
#> GSM1105500     2  0.9248     0.4764 0.340 0.660
#> GSM1105501     2  0.3274     0.8972 0.060 0.940
#> GSM1105508     2  0.8081     0.6687 0.248 0.752
#> GSM1105444     2  0.0000     0.9209 0.000 1.000
#> GSM1105513     2  0.1184     0.9187 0.016 0.984
#> GSM1105516     2  0.9552     0.3085 0.376 0.624
#> GSM1105520     2  0.6623     0.8200 0.172 0.828
#> GSM1105524     1  0.3114     0.8804 0.944 0.056
#> GSM1105536     2  0.6438     0.7878 0.164 0.836
#> GSM1105537     1  0.3114     0.8804 0.944 0.056
#> GSM1105540     1  0.8144     0.7241 0.748 0.252
#> GSM1105544     2  0.9866     0.1706 0.432 0.568
#> GSM1105445     2  0.0938     0.9208 0.012 0.988
#> GSM1105553     1  1.0000     0.0343 0.500 0.500
#> GSM1105556     1  0.3114     0.8804 0.944 0.056
#> GSM1105557     2  0.1184     0.9187 0.016 0.984
#> GSM1105449     2  0.0938     0.9208 0.012 0.988
#> GSM1105469     2  0.5519     0.8387 0.128 0.872
#> GSM1105472     2  0.0000     0.9209 0.000 1.000
#> GSM1105473     1  0.4815     0.8299 0.896 0.104
#> GSM1105476     2  0.0000     0.9209 0.000 1.000
#> GSM1105477     2  0.0376     0.9212 0.004 0.996
#> GSM1105478     2  0.3879     0.8892 0.076 0.924
#> GSM1105510     2  0.1184     0.9189 0.016 0.984
#> GSM1105530     1  0.0376     0.8595 0.996 0.004
#> GSM1105539     1  0.0000     0.8589 1.000 0.000
#> GSM1105480     2  0.3879     0.8892 0.076 0.924
#> GSM1105512     1  0.3114     0.8804 0.944 0.056
#> GSM1105532     1  0.0376     0.8595 0.996 0.004
#> GSM1105541     1  0.0000     0.8589 1.000 0.000
#> GSM1105439     2  0.0000     0.9209 0.000 1.000
#> GSM1105463     1  0.1184     0.8616 0.984 0.016
#> GSM1105482     1  0.2948     0.8801 0.948 0.052
#> GSM1105483     2  0.5519     0.8387 0.128 0.872
#> GSM1105494     2  0.9286     0.4804 0.344 0.656
#> GSM1105503     2  0.7453     0.7734 0.212 0.788
#> GSM1105507     1  0.8861     0.6514 0.696 0.304
#> GSM1105446     2  0.0000     0.9209 0.000 1.000
#> GSM1105519     1  0.7299     0.7769 0.796 0.204
#> GSM1105526     2  0.0376     0.9212 0.004 0.996
#> GSM1105527     2  0.5519     0.8387 0.128 0.872
#> GSM1105531     1  0.1414     0.8627 0.980 0.020
#> GSM1105543     2  0.0376     0.9212 0.004 0.996
#> GSM1105546     1  0.2948     0.8801 0.948 0.052
#> GSM1105547     1  0.3274     0.8795 0.940 0.060
#> GSM1105455     2  0.0000     0.9209 0.000 1.000
#> GSM1105458     2  0.0672     0.9211 0.008 0.992
#> GSM1105459     2  0.0000     0.9209 0.000 1.000
#> GSM1105462     1  0.0672     0.8620 0.992 0.008
#> GSM1105441     2  0.0000     0.9209 0.000 1.000
#> GSM1105465     2  0.1184     0.9198 0.016 0.984
#> GSM1105484     2  0.0000     0.9209 0.000 1.000
#> GSM1105485     2  0.0938     0.9206 0.012 0.988
#> GSM1105496     2  0.9286     0.4804 0.344 0.656
#> GSM1105505     2  0.7453     0.7734 0.212 0.788
#> GSM1105509     1  0.8861     0.6514 0.696 0.304
#> GSM1105448     2  0.0000     0.9209 0.000 1.000
#> GSM1105521     1  0.7299     0.7769 0.796 0.204
#> GSM1105528     2  0.0376     0.9212 0.004 0.996
#> GSM1105529     2  0.0938     0.9206 0.012 0.988
#> GSM1105533     1  0.0000     0.8589 1.000 0.000
#> GSM1105545     2  0.5629     0.8214 0.132 0.868
#> GSM1105548     1  0.2948     0.8801 0.948 0.052
#> GSM1105549     1  0.3274     0.8795 0.940 0.060
#> GSM1105457     2  0.0000     0.9209 0.000 1.000
#> GSM1105460     2  0.0672     0.9211 0.008 0.992
#> GSM1105461     2  0.0000     0.9209 0.000 1.000
#> GSM1105464     1  0.0672     0.8620 0.992 0.008
#> GSM1105466     2  0.3114     0.8972 0.056 0.944
#> GSM1105479     2  0.3584     0.8904 0.068 0.932
#> GSM1105502     1  0.3114     0.8507 0.944 0.056
#> GSM1105515     1  0.3114     0.8804 0.944 0.056
#> GSM1105523     1  0.9998    -0.0517 0.508 0.492
#> GSM1105550     1  0.8555     0.6753 0.720 0.280
#> GSM1105450     2  0.0000     0.9209 0.000 1.000
#> GSM1105451     2  0.0000     0.9209 0.000 1.000
#> GSM1105454     2  0.3879     0.8843 0.076 0.924
#> GSM1105468     2  0.0000     0.9209 0.000 1.000
#> GSM1105481     2  0.3733     0.8872 0.072 0.928
#> GSM1105504     1  0.3114     0.8507 0.944 0.056
#> GSM1105517     1  0.7453     0.7684 0.788 0.212
#> GSM1105525     1  0.9998    -0.0517 0.508 0.492
#> GSM1105552     1  0.8555     0.6753 0.720 0.280
#> GSM1105452     2  0.0376     0.9208 0.004 0.996
#> GSM1105453     2  0.0000     0.9209 0.000 1.000
#> GSM1105456     2  0.3879     0.8843 0.076 0.924

show/hide code output

cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#>            class entropy silhouette    p1    p2    p3
#> GSM1105438     2  0.0000    0.75944 0.000 1.000 0.000
#> GSM1105486     2  0.0000    0.75944 0.000 1.000 0.000
#> GSM1105487     1  0.1411    0.83202 0.964 0.000 0.036
#> GSM1105490     2  0.5497    0.55876 0.000 0.708 0.292
#> GSM1105491     1  0.5536    0.76175 0.752 0.012 0.236
#> GSM1105495     2  0.5882    0.34229 0.000 0.652 0.348
#> GSM1105498     3  0.8853    0.63294 0.252 0.176 0.572
#> GSM1105499     1  0.1289    0.83075 0.968 0.000 0.032
#> GSM1105506     2  0.8518   -0.07280 0.092 0.472 0.436
#> GSM1105442     2  0.3846    0.68685 0.016 0.876 0.108
#> GSM1105511     2  0.5497    0.55876 0.000 0.708 0.292
#> GSM1105514     2  0.0000    0.75944 0.000 1.000 0.000
#> GSM1105518     3  0.4953    0.56012 0.016 0.176 0.808
#> GSM1105522     1  0.1289    0.83075 0.968 0.000 0.032
#> GSM1105534     1  0.1289    0.83075 0.968 0.000 0.032
#> GSM1105535     1  0.1289    0.83075 0.968 0.000 0.032
#> GSM1105538     1  0.7360    0.55918 0.692 0.096 0.212
#> GSM1105542     2  0.2492    0.73627 0.016 0.936 0.048
#> GSM1105443     2  0.5536    0.62796 0.012 0.752 0.236
#> GSM1105551     3  0.6298    0.28205 0.388 0.004 0.608
#> GSM1105554     1  0.1289    0.83075 0.968 0.000 0.032
#> GSM1105555     1  0.1411    0.83202 0.964 0.000 0.036
#> GSM1105447     2  0.5450    0.63713 0.012 0.760 0.228
#> GSM1105467     2  0.1015    0.75742 0.008 0.980 0.012
#> GSM1105470     2  0.0000    0.75944 0.000 1.000 0.000
#> GSM1105471     3  0.6935    0.27202 0.024 0.372 0.604
#> GSM1105474     2  0.0000    0.75944 0.000 1.000 0.000
#> GSM1105475     2  0.3686    0.70598 0.000 0.860 0.140
#> GSM1105440     1  0.1289    0.83075 0.968 0.000 0.032
#> GSM1105488     2  0.2492    0.73627 0.016 0.936 0.048
#> GSM1105489     1  0.1411    0.83202 0.964 0.000 0.036
#> GSM1105492     1  0.1289    0.83075 0.968 0.000 0.032
#> GSM1105493     1  0.5378    0.76564 0.756 0.008 0.236
#> GSM1105497     2  0.6381    0.33447 0.012 0.648 0.340
#> GSM1105500     3  0.8853    0.63294 0.252 0.176 0.572
#> GSM1105501     2  0.6798    0.54627 0.048 0.696 0.256
#> GSM1105508     3  0.9211    0.47436 0.176 0.312 0.512
#> GSM1105444     2  0.1964    0.73041 0.000 0.944 0.056
#> GSM1105513     2  0.5497    0.55876 0.000 0.708 0.292
#> GSM1105516     2  0.9613   -0.19345 0.308 0.464 0.228
#> GSM1105520     3  0.4953    0.56012 0.016 0.176 0.808
#> GSM1105524     1  0.1289    0.83075 0.968 0.000 0.032
#> GSM1105536     2  0.7703    0.43025 0.104 0.664 0.232
#> GSM1105537     1  0.1289    0.83075 0.968 0.000 0.032
#> GSM1105540     1  0.7360    0.55918 0.692 0.096 0.212
#> GSM1105544     3  0.9870    0.42527 0.364 0.256 0.380
#> GSM1105445     2  0.5536    0.62796 0.012 0.752 0.236
#> GSM1105553     3  0.6298    0.28205 0.388 0.004 0.608
#> GSM1105556     1  0.1289    0.83075 0.968 0.000 0.032
#> GSM1105557     2  0.5497    0.55876 0.000 0.708 0.292
#> GSM1105449     2  0.5012    0.66122 0.008 0.788 0.204
#> GSM1105469     3  0.8549    0.32261 0.100 0.384 0.516
#> GSM1105472     2  0.0000    0.75944 0.000 1.000 0.000
#> GSM1105473     1  0.5692    0.73147 0.724 0.008 0.268
#> GSM1105476     2  0.0000    0.75944 0.000 1.000 0.000
#> GSM1105477     2  0.3686    0.70598 0.000 0.860 0.140
#> GSM1105478     2  0.7909    0.00118 0.056 0.496 0.448
#> GSM1105510     2  0.2116    0.74094 0.012 0.948 0.040
#> GSM1105530     1  0.4399    0.79681 0.812 0.000 0.188
#> GSM1105539     1  0.4346    0.79912 0.816 0.000 0.184
#> GSM1105480     2  0.7909    0.00118 0.056 0.496 0.448
#> GSM1105512     1  0.1289    0.83075 0.968 0.000 0.032
#> GSM1105532     1  0.4399    0.79681 0.812 0.000 0.188
#> GSM1105541     1  0.4346    0.79912 0.816 0.000 0.184
#> GSM1105439     2  0.4750    0.65295 0.000 0.784 0.216
#> GSM1105463     1  0.4555    0.79147 0.800 0.000 0.200
#> GSM1105482     1  0.1529    0.83131 0.960 0.000 0.040
#> GSM1105483     3  0.8549    0.32261 0.100 0.384 0.516
#> GSM1105494     3  0.8748    0.63694 0.244 0.172 0.584
#> GSM1105503     3  0.5466    0.58434 0.040 0.160 0.800
#> GSM1105507     1  0.8266    0.42430 0.624 0.136 0.240
#> GSM1105446     2  0.0424    0.75755 0.000 0.992 0.008
#> GSM1105519     1  0.5894    0.65725 0.752 0.028 0.220
#> GSM1105526     2  0.0592    0.75797 0.000 0.988 0.012
#> GSM1105527     3  0.8549    0.32261 0.100 0.384 0.516
#> GSM1105531     1  0.4605    0.79047 0.796 0.000 0.204
#> GSM1105543     2  0.0592    0.75820 0.000 0.988 0.012
#> GSM1105546     1  0.1529    0.83200 0.960 0.000 0.040
#> GSM1105547     1  0.1399    0.83184 0.968 0.004 0.028
#> GSM1105455     2  0.4974    0.63555 0.000 0.764 0.236
#> GSM1105458     2  0.5450    0.63467 0.012 0.760 0.228
#> GSM1105459     2  0.0000    0.75944 0.000 1.000 0.000
#> GSM1105462     1  0.4291    0.80111 0.820 0.000 0.180
#> GSM1105441     2  0.4750    0.65295 0.000 0.784 0.216
#> GSM1105465     2  0.4068    0.67440 0.016 0.864 0.120
#> GSM1105484     2  0.2682    0.71912 0.004 0.920 0.076
#> GSM1105485     2  0.2492    0.73627 0.016 0.936 0.048
#> GSM1105496     3  0.8748    0.63694 0.244 0.172 0.584
#> GSM1105505     3  0.5466    0.58434 0.040 0.160 0.800
#> GSM1105509     1  0.8266    0.42430 0.624 0.136 0.240
#> GSM1105448     2  0.0000    0.75944 0.000 1.000 0.000
#> GSM1105521     1  0.5894    0.65725 0.752 0.028 0.220
#> GSM1105528     2  0.0592    0.75797 0.000 0.988 0.012
#> GSM1105529     2  0.2492    0.73627 0.016 0.936 0.048
#> GSM1105533     1  0.3340    0.81055 0.880 0.000 0.120
#> GSM1105545     2  0.7011    0.53316 0.092 0.720 0.188
#> GSM1105548     1  0.1529    0.83200 0.960 0.000 0.040
#> GSM1105549     1  0.1399    0.83184 0.968 0.004 0.028
#> GSM1105457     2  0.4974    0.63555 0.000 0.764 0.236
#> GSM1105460     2  0.5450    0.63467 0.012 0.760 0.228
#> GSM1105461     2  0.0000    0.75944 0.000 1.000 0.000
#> GSM1105464     1  0.4291    0.80111 0.820 0.000 0.180
#> GSM1105466     2  0.7223    0.17051 0.028 0.548 0.424
#> GSM1105479     2  0.6168    0.22826 0.000 0.588 0.412
#> GSM1105502     1  0.5325    0.75468 0.748 0.004 0.248
#> GSM1105515     1  0.1289    0.83075 0.968 0.000 0.032
#> GSM1105523     3  0.5754    0.40818 0.296 0.004 0.700
#> GSM1105550     1  0.8104    0.46328 0.616 0.104 0.280
#> GSM1105450     2  0.0000    0.75944 0.000 1.000 0.000
#> GSM1105451     2  0.0000    0.75944 0.000 1.000 0.000
#> GSM1105454     3  0.6168    0.11938 0.000 0.412 0.588
#> GSM1105468     2  0.0000    0.75944 0.000 1.000 0.000
#> GSM1105481     2  0.6180    0.21801 0.000 0.584 0.416
#> GSM1105504     1  0.5325    0.75468 0.748 0.004 0.248
#> GSM1105517     1  0.5982    0.64731 0.744 0.028 0.228
#> GSM1105525     3  0.5754    0.40818 0.296 0.004 0.700
#> GSM1105552     1  0.8104    0.46328 0.616 0.104 0.280
#> GSM1105452     2  0.1529    0.74469 0.000 0.960 0.040
#> GSM1105453     2  0.0000    0.75944 0.000 1.000 0.000
#> GSM1105456     3  0.6168    0.11938 0.000 0.412 0.588

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>            class entropy silhouette    p1    p2    p3    p4
#> GSM1105438     2  0.0000     0.7633 0.000 1.000 0.000 0.000
#> GSM1105486     2  0.0000     0.7633 0.000 1.000 0.000 0.000
#> GSM1105487     1  0.3907     0.6264 0.768 0.000 0.232 0.000
#> GSM1105490     2  0.4837     0.4473 0.000 0.648 0.004 0.348
#> GSM1105491     3  0.1743     0.7831 0.000 0.004 0.940 0.056
#> GSM1105495     2  0.6711     0.1530 0.000 0.576 0.116 0.308
#> GSM1105498     4  0.8354     0.4997 0.092 0.152 0.204 0.552
#> GSM1105499     1  0.0188     0.7395 0.996 0.000 0.004 0.000
#> GSM1105506     4  0.6931     0.2137 0.076 0.412 0.012 0.500
#> GSM1105442     2  0.3734     0.6540 0.000 0.848 0.044 0.108
#> GSM1105511     2  0.4837     0.4473 0.000 0.648 0.004 0.348
#> GSM1105514     2  0.0000     0.7633 0.000 1.000 0.000 0.000
#> GSM1105518     4  0.3947     0.4818 0.004 0.072 0.076 0.848
#> GSM1105522     1  0.0000     0.7397 1.000 0.000 0.000 0.000
#> GSM1105534     1  0.0000     0.7397 1.000 0.000 0.000 0.000
#> GSM1105535     1  0.0000     0.7397 1.000 0.000 0.000 0.000
#> GSM1105538     1  0.9137    -0.0227 0.364 0.092 0.360 0.184
#> GSM1105542     2  0.2313     0.7282 0.000 0.924 0.044 0.032
#> GSM1105443     2  0.4923     0.5344 0.008 0.684 0.004 0.304
#> GSM1105551     4  0.6876     0.1025 0.116 0.000 0.352 0.532
#> GSM1105554     1  0.0188     0.7395 0.996 0.000 0.004 0.000
#> GSM1105555     1  0.3907     0.6264 0.768 0.000 0.232 0.000
#> GSM1105447     2  0.4899     0.5450 0.008 0.688 0.004 0.300
#> GSM1105467     2  0.1109     0.7585 0.004 0.968 0.000 0.028
#> GSM1105470     2  0.0000     0.7633 0.000 1.000 0.000 0.000
#> GSM1105471     4  0.5759     0.4240 0.000 0.268 0.064 0.668
#> GSM1105474     2  0.0000     0.7633 0.000 1.000 0.000 0.000
#> GSM1105475     2  0.3311     0.6719 0.000 0.828 0.000 0.172
#> GSM1105440     1  0.0000     0.7397 1.000 0.000 0.000 0.000
#> GSM1105488     2  0.2313     0.7282 0.000 0.924 0.044 0.032
#> GSM1105489     1  0.3907     0.6264 0.768 0.000 0.232 0.000
#> GSM1105492     1  0.0188     0.7392 0.996 0.000 0.000 0.004
#> GSM1105493     3  0.1743     0.7866 0.004 0.000 0.940 0.056
#> GSM1105497     2  0.6813     0.1525 0.000 0.576 0.132 0.292
#> GSM1105500     4  0.8354     0.4997 0.092 0.152 0.204 0.552
#> GSM1105501     2  0.6141     0.4728 0.040 0.656 0.024 0.280
#> GSM1105508     4  0.8500     0.4637 0.096 0.296 0.112 0.496
#> GSM1105444     2  0.1867     0.7169 0.000 0.928 0.000 0.072
#> GSM1105513     2  0.4837     0.4473 0.000 0.648 0.004 0.348
#> GSM1105516     2  0.9206    -0.1122 0.156 0.464 0.176 0.204
#> GSM1105520     4  0.3947     0.4818 0.004 0.072 0.076 0.848
#> GSM1105524     1  0.0000     0.7397 1.000 0.000 0.000 0.000
#> GSM1105536     2  0.6570     0.4090 0.016 0.652 0.096 0.236
#> GSM1105537     1  0.0000     0.7397 1.000 0.000 0.000 0.000
#> GSM1105540     1  0.9137    -0.0227 0.364 0.092 0.360 0.184
#> GSM1105544     4  0.9627     0.3164 0.132 0.248 0.272 0.348
#> GSM1105445     2  0.4923     0.5344 0.008 0.684 0.004 0.304
#> GSM1105553     4  0.6876     0.1025 0.116 0.000 0.352 0.532
#> GSM1105556     1  0.0188     0.7395 0.996 0.000 0.004 0.000
#> GSM1105557     2  0.4837     0.4473 0.000 0.648 0.004 0.348
#> GSM1105449     2  0.4551     0.5875 0.004 0.724 0.004 0.268
#> GSM1105469     4  0.6490     0.4136 0.080 0.324 0.004 0.592
#> GSM1105472     2  0.0000     0.7633 0.000 1.000 0.000 0.000
#> GSM1105473     3  0.4569     0.7706 0.052 0.004 0.800 0.144
#> GSM1105476     2  0.0000     0.7633 0.000 1.000 0.000 0.000
#> GSM1105477     2  0.3311     0.6719 0.000 0.828 0.000 0.172
#> GSM1105478     4  0.6194     0.2076 0.036 0.428 0.008 0.528
#> GSM1105510     2  0.1722     0.7398 0.000 0.944 0.048 0.008
#> GSM1105530     3  0.2521     0.8481 0.064 0.000 0.912 0.024
#> GSM1105539     3  0.2376     0.8451 0.068 0.000 0.916 0.016
#> GSM1105480     4  0.6194     0.2076 0.036 0.428 0.008 0.528
#> GSM1105512     1  0.0188     0.7395 0.996 0.000 0.004 0.000
#> GSM1105532     3  0.2521     0.8481 0.064 0.000 0.912 0.024
#> GSM1105541     3  0.2376     0.8451 0.068 0.000 0.916 0.016
#> GSM1105439     2  0.4428     0.5741 0.000 0.720 0.004 0.276
#> GSM1105463     3  0.2644     0.8469 0.060 0.000 0.908 0.032
#> GSM1105482     1  0.1867     0.7203 0.928 0.000 0.072 0.000
#> GSM1105483     4  0.6490     0.4136 0.080 0.324 0.004 0.592
#> GSM1105494     4  0.8234     0.5013 0.088 0.148 0.200 0.564
#> GSM1105503     4  0.4734     0.4714 0.004 0.072 0.128 0.796
#> GSM1105507     1  0.9419     0.0946 0.404 0.132 0.268 0.196
#> GSM1105446     2  0.0672     0.7628 0.000 0.984 0.008 0.008
#> GSM1105519     1  0.8012     0.2031 0.500 0.028 0.300 0.172
#> GSM1105526     2  0.0469     0.7615 0.000 0.988 0.000 0.012
#> GSM1105527     4  0.6490     0.4136 0.080 0.324 0.004 0.592
#> GSM1105531     3  0.2660     0.8461 0.056 0.000 0.908 0.036
#> GSM1105543     2  0.0707     0.7604 0.000 0.980 0.000 0.020
#> GSM1105546     1  0.3975     0.6199 0.760 0.000 0.240 0.000
#> GSM1105547     1  0.2773     0.7052 0.880 0.000 0.116 0.004
#> GSM1105455     2  0.4560     0.5498 0.000 0.700 0.004 0.296
#> GSM1105458     2  0.4875     0.5442 0.008 0.692 0.004 0.296
#> GSM1105459     2  0.0188     0.7633 0.000 0.996 0.004 0.000
#> GSM1105462     3  0.2773     0.8461 0.072 0.000 0.900 0.028
#> GSM1105441     2  0.4428     0.5741 0.000 0.720 0.004 0.276
#> GSM1105465     2  0.3934     0.6387 0.000 0.836 0.048 0.116
#> GSM1105484     2  0.2775     0.6975 0.000 0.896 0.020 0.084
#> GSM1105485     2  0.2313     0.7282 0.000 0.924 0.044 0.032
#> GSM1105496     4  0.8234     0.5013 0.088 0.148 0.200 0.564
#> GSM1105505     4  0.4734     0.4714 0.004 0.072 0.128 0.796
#> GSM1105509     1  0.9419     0.0946 0.404 0.132 0.268 0.196
#> GSM1105448     2  0.0000     0.7633 0.000 1.000 0.000 0.000
#> GSM1105521     1  0.8012     0.2031 0.500 0.028 0.300 0.172
#> GSM1105528     2  0.0469     0.7615 0.000 0.988 0.000 0.012
#> GSM1105529     2  0.2313     0.7282 0.000 0.924 0.044 0.032
#> GSM1105533     1  0.4872     0.4337 0.640 0.000 0.356 0.004
#> GSM1105545     2  0.5911     0.5173 0.008 0.708 0.092 0.192
#> GSM1105548     1  0.3975     0.6199 0.760 0.000 0.240 0.000
#> GSM1105549     1  0.2773     0.7052 0.880 0.000 0.116 0.004
#> GSM1105457     2  0.4560     0.5498 0.000 0.700 0.004 0.296
#> GSM1105460     2  0.4875     0.5442 0.008 0.692 0.004 0.296
#> GSM1105461     2  0.0188     0.7633 0.000 0.996 0.004 0.000
#> GSM1105464     3  0.2773     0.8461 0.072 0.000 0.900 0.028
#> GSM1105466     4  0.5607     0.0453 0.020 0.484 0.000 0.496
#> GSM1105479     4  0.5937     0.0514 0.000 0.472 0.036 0.492
#> GSM1105502     3  0.3966     0.8102 0.072 0.000 0.840 0.088
#> GSM1105515     1  0.0000     0.7397 1.000 0.000 0.000 0.000
#> GSM1105523     4  0.6440     0.1654 0.080 0.000 0.356 0.564
#> GSM1105550     3  0.9322     0.0802 0.292 0.100 0.384 0.224
#> GSM1105450     2  0.0000     0.7633 0.000 1.000 0.000 0.000
#> GSM1105451     2  0.0000     0.7633 0.000 1.000 0.000 0.000
#> GSM1105454     4  0.5312     0.3756 0.000 0.268 0.040 0.692
#> GSM1105468     2  0.0188     0.7633 0.000 0.996 0.000 0.004
#> GSM1105481     4  0.5935     0.0603 0.000 0.468 0.036 0.496
#> GSM1105504     3  0.3966     0.8102 0.072 0.000 0.840 0.088
#> GSM1105517     1  0.8099     0.1730 0.484 0.028 0.308 0.180
#> GSM1105525     4  0.6440     0.1654 0.080 0.000 0.356 0.564
#> GSM1105552     3  0.9322     0.0802 0.292 0.100 0.384 0.224
#> GSM1105452     2  0.1452     0.7445 0.000 0.956 0.036 0.008
#> GSM1105453     2  0.0000     0.7633 0.000 1.000 0.000 0.000
#> GSM1105456     4  0.5312     0.3756 0.000 0.268 0.040 0.692

show/hide code output

cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#>            class entropy silhouette    p1    p2    p3    p4    p5
#> GSM1105438     2  0.0000     0.7824 0.000 1.000 0.000 0.000 0.000
#> GSM1105486     2  0.0162     0.7814 0.000 0.996 0.000 0.004 0.000
#> GSM1105487     1  0.4328     0.6116 0.724 0.000 0.248 0.020 0.008
#> GSM1105490     4  0.4537     0.4109 0.000 0.396 0.000 0.592 0.012
#> GSM1105491     3  0.3814     0.6788 0.000 0.004 0.816 0.116 0.064
#> GSM1105495     5  0.6019     0.1677 0.000 0.440 0.064 0.020 0.476
#> GSM1105498     4  0.7424     0.1149 0.024 0.068 0.104 0.536 0.268
#> GSM1105499     1  0.0162     0.7585 0.996 0.000 0.000 0.004 0.000
#> GSM1105506     4  0.4986     0.4239 0.024 0.180 0.000 0.732 0.064
#> GSM1105442     2  0.4450     0.5782 0.000 0.736 0.004 0.044 0.216
#> GSM1105511     4  0.4537     0.4109 0.000 0.396 0.000 0.592 0.012
#> GSM1105514     2  0.0162     0.7812 0.000 0.996 0.000 0.004 0.000
#> GSM1105518     5  0.5162     0.4519 0.000 0.032 0.020 0.300 0.648
#> GSM1105522     1  0.0000     0.7593 1.000 0.000 0.000 0.000 0.000
#> GSM1105534     1  0.0000     0.7593 1.000 0.000 0.000 0.000 0.000
#> GSM1105535     1  0.0000     0.7593 1.000 0.000 0.000 0.000 0.000
#> GSM1105538     3  0.8650     0.0911 0.304 0.032 0.308 0.276 0.080
#> GSM1105542     2  0.3960     0.6771 0.000 0.800 0.004 0.056 0.140
#> GSM1105443     4  0.5271     0.3262 0.000 0.432 0.000 0.520 0.048
#> GSM1105551     4  0.7596    -0.1173 0.044 0.000 0.276 0.376 0.304
#> GSM1105554     1  0.0162     0.7585 0.996 0.000 0.000 0.004 0.000
#> GSM1105555     1  0.4328     0.6116 0.724 0.000 0.248 0.020 0.008
#> GSM1105447     4  0.5341     0.3054 0.000 0.444 0.000 0.504 0.052
#> GSM1105467     2  0.1956     0.7442 0.000 0.916 0.000 0.076 0.008
#> GSM1105470     2  0.0000     0.7824 0.000 1.000 0.000 0.000 0.000
#> GSM1105471     5  0.6814     0.5002 0.000 0.148 0.052 0.232 0.568
#> GSM1105474     2  0.0000     0.7824 0.000 1.000 0.000 0.000 0.000
#> GSM1105475     2  0.4251     0.3395 0.000 0.672 0.000 0.316 0.012
#> GSM1105440     1  0.0000     0.7593 1.000 0.000 0.000 0.000 0.000
#> GSM1105488     2  0.3960     0.6771 0.000 0.800 0.004 0.056 0.140
#> GSM1105489     1  0.4328     0.6116 0.724 0.000 0.248 0.020 0.008
#> GSM1105492     1  0.0162     0.7584 0.996 0.000 0.000 0.004 0.000
#> GSM1105493     3  0.3814     0.6808 0.004 0.000 0.816 0.116 0.064
#> GSM1105497     5  0.6262     0.1644 0.000 0.436 0.072 0.028 0.464
#> GSM1105500     4  0.7424     0.1149 0.024 0.068 0.104 0.536 0.268
#> GSM1105501     4  0.5278     0.3617 0.016 0.408 0.000 0.552 0.024
#> GSM1105508     4  0.6860     0.3334 0.040 0.108 0.060 0.644 0.148
#> GSM1105444     2  0.1608     0.7406 0.000 0.928 0.000 0.000 0.072
#> GSM1105513     4  0.4537     0.4109 0.000 0.396 0.000 0.592 0.012
#> GSM1105516     4  0.9240     0.2700 0.144 0.292 0.152 0.336 0.076
#> GSM1105520     5  0.5162     0.4519 0.000 0.032 0.020 0.300 0.648
#> GSM1105524     1  0.0000     0.7593 1.000 0.000 0.000 0.000 0.000
#> GSM1105536     2  0.6758     0.0283 0.004 0.520 0.100 0.336 0.040
#> GSM1105537     1  0.0000     0.7593 1.000 0.000 0.000 0.000 0.000
#> GSM1105540     3  0.8650     0.0911 0.304 0.032 0.308 0.276 0.080
#> GSM1105544     4  0.9219     0.0963 0.072 0.152 0.212 0.380 0.184
#> GSM1105445     4  0.5271     0.3262 0.000 0.432 0.000 0.520 0.048
#> GSM1105553     4  0.7596    -0.1173 0.044 0.000 0.276 0.376 0.304
#> GSM1105556     1  0.0162     0.7585 0.996 0.000 0.000 0.004 0.000
#> GSM1105557     4  0.4537     0.4109 0.000 0.396 0.000 0.592 0.012
#> GSM1105449     2  0.5195    -0.0101 0.000 0.564 0.000 0.388 0.048
#> GSM1105469     4  0.4577     0.4021 0.024 0.112 0.000 0.780 0.084
#> GSM1105472     2  0.0000     0.7824 0.000 1.000 0.000 0.000 0.000
#> GSM1105473     3  0.3303     0.6690 0.012 0.004 0.840 0.008 0.136
#> GSM1105476     2  0.0000     0.7824 0.000 1.000 0.000 0.000 0.000
#> GSM1105477     2  0.4251     0.3395 0.000 0.672 0.000 0.316 0.012
#> GSM1105478     4  0.5633     0.4349 0.008 0.212 0.004 0.664 0.112
#> GSM1105510     2  0.3822     0.6986 0.000 0.816 0.012 0.040 0.132
#> GSM1105530     3  0.0451     0.7586 0.008 0.000 0.988 0.000 0.004
#> GSM1105539     3  0.0566     0.7578 0.012 0.000 0.984 0.000 0.004
#> GSM1105480     4  0.5633     0.4349 0.008 0.212 0.004 0.664 0.112
#> GSM1105512     1  0.0162     0.7585 0.996 0.000 0.000 0.004 0.000
#> GSM1105532     3  0.0451     0.7586 0.008 0.000 0.988 0.000 0.004
#> GSM1105541     3  0.0566     0.7578 0.012 0.000 0.984 0.000 0.004
#> GSM1105439     2  0.5151    -0.0511 0.000 0.560 0.000 0.396 0.044
#> GSM1105463     3  0.0898     0.7555 0.008 0.000 0.972 0.000 0.020
#> GSM1105482     1  0.2199     0.7349 0.916 0.000 0.060 0.016 0.008
#> GSM1105483     4  0.4577     0.4021 0.024 0.112 0.000 0.780 0.084
#> GSM1105494     4  0.7418     0.1015 0.020 0.068 0.108 0.528 0.276
#> GSM1105503     5  0.6022     0.4302 0.000 0.032 0.072 0.300 0.596
#> GSM1105507     1  0.8947    -0.0602 0.332 0.060 0.256 0.272 0.080
#> GSM1105446     2  0.2408     0.7538 0.000 0.892 0.000 0.016 0.092
#> GSM1105519     1  0.7928     0.0930 0.444 0.008 0.268 0.200 0.080
#> GSM1105526     2  0.3141     0.7227 0.000 0.852 0.000 0.108 0.040
#> GSM1105527     4  0.4577     0.4021 0.024 0.112 0.000 0.780 0.084
#> GSM1105531     3  0.0833     0.7562 0.004 0.000 0.976 0.004 0.016
#> GSM1105543     2  0.3844     0.6976 0.000 0.804 0.000 0.132 0.064
#> GSM1105546     1  0.4380     0.6030 0.716 0.000 0.256 0.020 0.008
#> GSM1105547     1  0.2756     0.7211 0.880 0.000 0.092 0.024 0.004
#> GSM1105455     4  0.5232     0.2876 0.000 0.456 0.000 0.500 0.044
#> GSM1105458     4  0.5238     0.2463 0.000 0.472 0.000 0.484 0.044
#> GSM1105459     2  0.1357     0.7554 0.000 0.948 0.000 0.048 0.004
#> GSM1105462     3  0.0968     0.7601 0.012 0.000 0.972 0.012 0.004
#> GSM1105441     2  0.5151    -0.0511 0.000 0.560 0.000 0.396 0.044
#> GSM1105465     2  0.4538     0.5598 0.000 0.724 0.004 0.044 0.228
#> GSM1105484     2  0.3438     0.6654 0.000 0.808 0.000 0.020 0.172
#> GSM1105485     2  0.3960     0.6771 0.000 0.800 0.004 0.056 0.140
#> GSM1105496     4  0.7418     0.1015 0.020 0.068 0.108 0.528 0.276
#> GSM1105505     5  0.6022     0.4302 0.000 0.032 0.072 0.300 0.596
#> GSM1105509     1  0.8947    -0.0602 0.332 0.060 0.256 0.272 0.080
#> GSM1105448     2  0.0000     0.7824 0.000 1.000 0.000 0.000 0.000
#> GSM1105521     1  0.7928     0.0930 0.444 0.008 0.268 0.200 0.080
#> GSM1105528     2  0.3141     0.7227 0.000 0.852 0.000 0.108 0.040
#> GSM1105529     2  0.3960     0.6771 0.000 0.800 0.004 0.056 0.140
#> GSM1105533     1  0.4341     0.3926 0.592 0.000 0.404 0.000 0.004
#> GSM1105545     2  0.6382     0.2250 0.000 0.580 0.096 0.284 0.040
#> GSM1105548     1  0.4380     0.6030 0.716 0.000 0.256 0.020 0.008
#> GSM1105549     1  0.2756     0.7211 0.880 0.000 0.092 0.024 0.004
#> GSM1105457     4  0.5232     0.2876 0.000 0.456 0.000 0.500 0.044
#> GSM1105460     4  0.5238     0.2463 0.000 0.472 0.000 0.484 0.044
#> GSM1105461     2  0.1357     0.7554 0.000 0.948 0.000 0.048 0.004
#> GSM1105464     3  0.0968     0.7601 0.012 0.000 0.972 0.012 0.004
#> GSM1105466     4  0.5203     0.4652 0.000 0.272 0.000 0.648 0.080
#> GSM1105479     5  0.5580     0.5127 0.000 0.320 0.012 0.064 0.604
#> GSM1105502     3  0.3160     0.7099 0.024 0.000 0.872 0.032 0.072
#> GSM1105515     1  0.0000     0.7593 1.000 0.000 0.000 0.000 0.000
#> GSM1105523     4  0.6906    -0.0874 0.008 0.000 0.356 0.404 0.232
#> GSM1105550     3  0.8743     0.1927 0.232 0.036 0.328 0.312 0.092
#> GSM1105450     2  0.0000     0.7824 0.000 1.000 0.000 0.000 0.000
#> GSM1105451     2  0.0000     0.7824 0.000 1.000 0.000 0.000 0.000
#> GSM1105454     5  0.5183     0.5241 0.000 0.112 0.016 0.152 0.720
#> GSM1105468     2  0.0794     0.7733 0.000 0.972 0.000 0.028 0.000
#> GSM1105481     5  0.5618     0.5152 0.000 0.320 0.016 0.060 0.604
#> GSM1105504     3  0.3160     0.7099 0.024 0.000 0.872 0.032 0.072
#> GSM1105517     1  0.7989     0.0582 0.428 0.008 0.276 0.208 0.080
#> GSM1105525     4  0.6906    -0.0874 0.008 0.000 0.356 0.404 0.232
#> GSM1105552     3  0.8743     0.1927 0.232 0.036 0.328 0.312 0.092
#> GSM1105452     2  0.3433     0.7043 0.000 0.832 0.004 0.032 0.132
#> GSM1105453     2  0.0000     0.7824 0.000 1.000 0.000 0.000 0.000
#> GSM1105456     5  0.5183     0.5241 0.000 0.112 0.016 0.152 0.720

show/hide code output

cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#>            class entropy silhouette    p1    p2    p3    p4    p5    p6
#> GSM1105438     2  0.3126     0.7581 0.000 0.752 0.000 0.248 0.000 0.000
#> GSM1105486     2  0.3265     0.7574 0.000 0.748 0.000 0.248 0.004 0.000
#> GSM1105487     1  0.4889     0.5232 0.672 0.000 0.140 0.000 0.184 0.004
#> GSM1105490     4  0.4249     0.6589 0.000 0.116 0.000 0.776 0.048 0.060
#> GSM1105491     3  0.4418     0.6866 0.000 0.044 0.712 0.004 0.228 0.012
#> GSM1105495     2  0.5713     0.1115 0.000 0.564 0.052 0.000 0.068 0.316
#> GSM1105498     6  0.6557     0.2396 0.000 0.020 0.032 0.156 0.276 0.516
#> GSM1105499     1  0.0146     0.6590 0.996 0.000 0.000 0.004 0.000 0.000
#> GSM1105506     4  0.5190     0.3549 0.012 0.000 0.000 0.648 0.204 0.136
#> GSM1105442     2  0.2488     0.6235 0.000 0.880 0.000 0.000 0.044 0.076
#> GSM1105511     4  0.4249     0.6589 0.000 0.116 0.000 0.776 0.048 0.060
#> GSM1105514     2  0.3151     0.7559 0.000 0.748 0.000 0.252 0.000 0.000
#> GSM1105518     6  0.1333     0.4692 0.000 0.000 0.008 0.048 0.000 0.944
#> GSM1105522     1  0.0865     0.6625 0.964 0.000 0.000 0.000 0.036 0.000
#> GSM1105534     1  0.0000     0.6595 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM1105535     1  0.0865     0.6625 0.964 0.000 0.000 0.000 0.036 0.000
#> GSM1105538     1  0.8708    -0.8299 0.288 0.020 0.212 0.060 0.288 0.132
#> GSM1105542     2  0.1141     0.6729 0.000 0.948 0.000 0.000 0.052 0.000
#> GSM1105443     4  0.1895     0.6514 0.000 0.072 0.000 0.912 0.000 0.016
#> GSM1105551     6  0.6248     0.0949 0.004 0.000 0.136 0.028 0.376 0.456
#> GSM1105554     1  0.0146     0.6590 0.996 0.000 0.000 0.004 0.000 0.000
#> GSM1105555     1  0.4889     0.5232 0.672 0.000 0.140 0.000 0.184 0.004
#> GSM1105447     4  0.2199     0.6473 0.000 0.088 0.000 0.892 0.000 0.020
#> GSM1105467     2  0.4015     0.6301 0.000 0.616 0.000 0.372 0.000 0.012
#> GSM1105470     2  0.3126     0.7581 0.000 0.752 0.000 0.248 0.000 0.000
#> GSM1105471     6  0.7177     0.3679 0.000 0.076 0.048 0.208 0.144 0.524
#> GSM1105474     2  0.3126     0.7581 0.000 0.752 0.000 0.248 0.000 0.000
#> GSM1105475     4  0.4680     0.1280 0.000 0.384 0.000 0.576 0.028 0.012
#> GSM1105440     1  0.0865     0.6625 0.964 0.000 0.000 0.000 0.036 0.000
#> GSM1105488     2  0.1141     0.6729 0.000 0.948 0.000 0.000 0.052 0.000
#> GSM1105489     1  0.4889     0.5232 0.672 0.000 0.140 0.000 0.184 0.004
#> GSM1105492     1  0.0937     0.6623 0.960 0.000 0.000 0.000 0.040 0.000
#> GSM1105493     3  0.4380     0.6873 0.000 0.040 0.712 0.004 0.232 0.012
#> GSM1105497     2  0.5803     0.1165 0.000 0.568 0.056 0.000 0.076 0.300
#> GSM1105500     6  0.6557     0.2396 0.000 0.020 0.032 0.156 0.276 0.516
#> GSM1105501     4  0.4493     0.5911 0.008 0.076 0.000 0.772 0.048 0.096
#> GSM1105508     4  0.7343    -0.1411 0.028 0.000 0.052 0.396 0.220 0.304
#> GSM1105444     2  0.4588     0.7324 0.000 0.676 0.000 0.248 0.004 0.072
#> GSM1105513     4  0.4249     0.6589 0.000 0.116 0.000 0.776 0.048 0.060
#> GSM1105516     4  0.9382    -0.2245 0.140 0.124 0.148 0.352 0.088 0.148
#> GSM1105520     6  0.1333     0.4692 0.000 0.000 0.008 0.048 0.000 0.944
#> GSM1105524     1  0.0865     0.6625 0.964 0.000 0.000 0.000 0.036 0.000
#> GSM1105536     4  0.7570     0.2499 0.000 0.328 0.096 0.416 0.064 0.096
#> GSM1105537     1  0.0865     0.6625 0.964 0.000 0.000 0.000 0.036 0.000
#> GSM1105540     1  0.8708    -0.8299 0.288 0.020 0.212 0.060 0.288 0.132
#> GSM1105544     6  0.9207    -0.3144 0.052 0.116 0.132 0.128 0.276 0.296
#> GSM1105445     4  0.1895     0.6514 0.000 0.072 0.000 0.912 0.000 0.016
#> GSM1105553     6  0.6248     0.0949 0.004 0.000 0.136 0.028 0.376 0.456
#> GSM1105556     1  0.0146     0.6590 0.996 0.000 0.000 0.004 0.000 0.000
#> GSM1105557     4  0.4249     0.6589 0.000 0.116 0.000 0.776 0.048 0.060
#> GSM1105449     4  0.3617     0.4679 0.000 0.244 0.000 0.736 0.000 0.020
#> GSM1105469     4  0.5637     0.2366 0.012 0.000 0.000 0.584 0.176 0.228
#> GSM1105472     2  0.3126     0.7581 0.000 0.752 0.000 0.248 0.000 0.000
#> GSM1105473     3  0.3149     0.7661 0.008 0.004 0.832 0.004 0.012 0.140
#> GSM1105476     2  0.3126     0.7581 0.000 0.752 0.000 0.248 0.000 0.000
#> GSM1105477     4  0.4680     0.1280 0.000 0.384 0.000 0.576 0.028 0.012
#> GSM1105478     4  0.5261     0.3934 0.000 0.032 0.000 0.656 0.096 0.216
#> GSM1105510     2  0.1788     0.6867 0.000 0.928 0.004 0.028 0.040 0.000
#> GSM1105530     3  0.0146     0.8864 0.004 0.000 0.996 0.000 0.000 0.000
#> GSM1105539     3  0.0935     0.8777 0.004 0.000 0.964 0.000 0.032 0.000
#> GSM1105480     4  0.5261     0.3934 0.000 0.032 0.000 0.656 0.096 0.216
#> GSM1105512     1  0.0146     0.6590 0.996 0.000 0.000 0.004 0.000 0.000
#> GSM1105532     3  0.0146     0.8864 0.004 0.000 0.996 0.000 0.000 0.000
#> GSM1105541     3  0.0935     0.8777 0.004 0.000 0.964 0.000 0.032 0.000
#> GSM1105439     4  0.3337     0.4712 0.000 0.260 0.000 0.736 0.000 0.004
#> GSM1105463     3  0.0665     0.8861 0.004 0.000 0.980 0.000 0.008 0.008
#> GSM1105482     1  0.2046     0.6427 0.908 0.000 0.032 0.000 0.060 0.000
#> GSM1105483     4  0.5637     0.2366 0.012 0.000 0.000 0.584 0.176 0.228
#> GSM1105494     6  0.6590     0.2506 0.000 0.020 0.036 0.156 0.268 0.520
#> GSM1105503     6  0.2442     0.4619 0.000 0.000 0.068 0.048 0.000 0.884
#> GSM1105507     1  0.8751    -0.6775 0.316 0.000 0.192 0.144 0.184 0.164
#> GSM1105446     2  0.2668     0.7410 0.000 0.828 0.000 0.168 0.004 0.000
#> GSM1105519     1  0.7668    -0.5453 0.436 0.000 0.200 0.024 0.188 0.152
#> GSM1105526     2  0.4214     0.6126 0.000 0.652 0.000 0.320 0.024 0.004
#> GSM1105527     4  0.5637     0.2366 0.012 0.000 0.000 0.584 0.176 0.228
#> GSM1105531     3  0.0508     0.8855 0.000 0.000 0.984 0.000 0.004 0.012
#> GSM1105543     2  0.4196     0.5680 0.000 0.640 0.000 0.332 0.028 0.000
#> GSM1105546     1  0.4910     0.5120 0.668 0.000 0.136 0.000 0.192 0.004
#> GSM1105547     1  0.2649     0.6296 0.876 0.000 0.052 0.004 0.068 0.000
#> GSM1105455     4  0.2100     0.6384 0.000 0.112 0.000 0.884 0.000 0.004
#> GSM1105458     4  0.2613     0.6143 0.000 0.140 0.000 0.848 0.000 0.012
#> GSM1105459     2  0.3446     0.7017 0.000 0.692 0.000 0.308 0.000 0.000
#> GSM1105462     3  0.0767     0.8843 0.008 0.000 0.976 0.004 0.012 0.000
#> GSM1105441     4  0.3337     0.4712 0.000 0.260 0.000 0.736 0.000 0.004
#> GSM1105465     2  0.2672     0.6132 0.000 0.868 0.000 0.000 0.052 0.080
#> GSM1105484     2  0.2889     0.6774 0.000 0.868 0.000 0.048 0.016 0.068
#> GSM1105485     2  0.1141     0.6729 0.000 0.948 0.000 0.000 0.052 0.000
#> GSM1105496     6  0.6590     0.2506 0.000 0.020 0.036 0.156 0.268 0.520
#> GSM1105505     6  0.2442     0.4619 0.000 0.000 0.068 0.048 0.000 0.884
#> GSM1105509     1  0.8751    -0.6775 0.316 0.000 0.192 0.144 0.184 0.164
#> GSM1105448     2  0.3126     0.7581 0.000 0.752 0.000 0.248 0.000 0.000
#> GSM1105521     1  0.7668    -0.5453 0.436 0.000 0.200 0.024 0.188 0.152
#> GSM1105528     2  0.4214     0.6126 0.000 0.652 0.000 0.320 0.024 0.004
#> GSM1105529     2  0.1141     0.6729 0.000 0.948 0.000 0.000 0.052 0.000
#> GSM1105533     1  0.4911     0.3278 0.548 0.000 0.384 0.000 0.068 0.000
#> GSM1105545     4  0.7057     0.1498 0.000 0.364 0.092 0.436 0.052 0.056
#> GSM1105548     1  0.4910     0.5120 0.668 0.000 0.136 0.000 0.192 0.004
#> GSM1105549     1  0.2649     0.6296 0.876 0.000 0.052 0.004 0.068 0.000
#> GSM1105457     4  0.2100     0.6384 0.000 0.112 0.000 0.884 0.000 0.004
#> GSM1105460     4  0.2613     0.6143 0.000 0.140 0.000 0.848 0.000 0.012
#> GSM1105461     2  0.3446     0.7017 0.000 0.692 0.000 0.308 0.000 0.000
#> GSM1105464     3  0.0767     0.8843 0.008 0.000 0.976 0.004 0.012 0.000
#> GSM1105466     4  0.5799     0.5129 0.000 0.116 0.000 0.628 0.068 0.188
#> GSM1105479     6  0.6890     0.2450 0.000 0.248 0.000 0.084 0.204 0.464
#> GSM1105502     3  0.2698     0.7971 0.020 0.000 0.872 0.000 0.016 0.092
#> GSM1105515     1  0.0000     0.6595 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM1105523     6  0.6537     0.1060 0.000 0.000 0.348 0.028 0.228 0.396
#> GSM1105550     5  0.8944     1.0000 0.216 0.024 0.252 0.068 0.276 0.164
#> GSM1105450     2  0.3126     0.7581 0.000 0.752 0.000 0.248 0.000 0.000
#> GSM1105451     2  0.3126     0.7581 0.000 0.752 0.000 0.248 0.000 0.000
#> GSM1105454     6  0.5090     0.3898 0.000 0.000 0.004 0.096 0.296 0.604
#> GSM1105468     2  0.3390     0.7226 0.000 0.704 0.000 0.296 0.000 0.000
#> GSM1105481     6  0.6979     0.2482 0.000 0.248 0.004 0.080 0.204 0.464
#> GSM1105504     3  0.2698     0.7971 0.020 0.000 0.872 0.000 0.016 0.092
#> GSM1105517     1  0.7742    -0.5826 0.420 0.000 0.208 0.024 0.192 0.156
#> GSM1105525     6  0.6537     0.1060 0.000 0.000 0.348 0.028 0.228 0.396
#> GSM1105552     5  0.8944     1.0000 0.216 0.024 0.252 0.068 0.276 0.164
#> GSM1105452     2  0.1418     0.6942 0.000 0.944 0.000 0.024 0.032 0.000
#> GSM1105453     2  0.3126     0.7581 0.000 0.752 0.000 0.248 0.000 0.000
#> GSM1105456     6  0.5090     0.3898 0.000 0.000 0.004 0.096 0.296 0.604

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) other(p) time(p) individual(p) k
#> CV:hclust 110    1.000  0.59679   1.000      1.59e-03 2
#> CV:hclust  94    0.740  0.18731   0.977      9.02e-06 3
#> CV:hclust  77    0.136  0.03494   0.984      3.20e-06 4
#> CV:hclust  67    0.153  0.00442   0.987      1.81e-04 5
#> CV:hclust  77    0.224  0.00529   0.999      9.91e-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.


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

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

collect_plots(res)

plot of chunk CV-kmeans-collect-plots

The plots are:

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

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

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

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

select_partition_number(res)

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

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

get_stats(res)
#>   k 1-PAC mean_silhouette concordance area_increased  Rand Jaccard
#> 2 2 0.868           0.936       0.972         0.4894 0.513   0.513
#> 3 3 0.548           0.633       0.795         0.3391 0.775   0.585
#> 4 4 0.516           0.509       0.681         0.1223 0.815   0.534
#> 5 5 0.622           0.577       0.716         0.0739 0.836   0.480
#> 6 6 0.713           0.663       0.755         0.0449 0.943   0.740

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
#> GSM1105438     2  0.0000      0.968 0.000 1.000
#> GSM1105486     2  0.0000      0.968 0.000 1.000
#> GSM1105487     1  0.0000      0.974 1.000 0.000
#> GSM1105490     2  0.0000      0.968 0.000 1.000
#> GSM1105491     2  0.6623      0.804 0.172 0.828
#> GSM1105495     2  0.6623      0.804 0.172 0.828
#> GSM1105498     2  0.6887      0.790 0.184 0.816
#> GSM1105499     1  0.0000      0.974 1.000 0.000
#> GSM1105506     2  0.0000      0.968 0.000 1.000
#> GSM1105442     2  0.0000      0.968 0.000 1.000
#> GSM1105511     2  0.0000      0.968 0.000 1.000
#> GSM1105514     2  0.0000      0.968 0.000 1.000
#> GSM1105518     2  0.0672      0.962 0.008 0.992
#> GSM1105522     1  0.0000      0.974 1.000 0.000
#> GSM1105534     1  0.0000      0.974 1.000 0.000
#> GSM1105535     1  0.0000      0.974 1.000 0.000
#> GSM1105538     1  0.0000      0.974 1.000 0.000
#> GSM1105542     2  0.0000      0.968 0.000 1.000
#> GSM1105443     2  0.0000      0.968 0.000 1.000
#> GSM1105551     1  0.0000      0.974 1.000 0.000
#> GSM1105554     1  0.0000      0.974 1.000 0.000
#> GSM1105555     1  0.0000      0.974 1.000 0.000
#> GSM1105447     2  0.0000      0.968 0.000 1.000
#> GSM1105467     2  0.0000      0.968 0.000 1.000
#> GSM1105470     2  0.0000      0.968 0.000 1.000
#> GSM1105471     2  0.0000      0.968 0.000 1.000
#> GSM1105474     2  0.0000      0.968 0.000 1.000
#> GSM1105475     2  0.0000      0.968 0.000 1.000
#> GSM1105440     1  0.0000      0.974 1.000 0.000
#> GSM1105488     2  0.0000      0.968 0.000 1.000
#> GSM1105489     1  0.0000      0.974 1.000 0.000
#> GSM1105492     1  0.0000      0.974 1.000 0.000
#> GSM1105493     1  0.0000      0.974 1.000 0.000
#> GSM1105497     2  0.0000      0.968 0.000 1.000
#> GSM1105500     2  0.0000      0.968 0.000 1.000
#> GSM1105501     2  0.0000      0.968 0.000 1.000
#> GSM1105508     1  0.0000      0.974 1.000 0.000
#> GSM1105444     2  0.0000      0.968 0.000 1.000
#> GSM1105513     2  0.0000      0.968 0.000 1.000
#> GSM1105516     1  0.9922      0.214 0.552 0.448
#> GSM1105520     2  0.7056      0.779 0.192 0.808
#> GSM1105524     1  0.0000      0.974 1.000 0.000
#> GSM1105536     2  0.0000      0.968 0.000 1.000
#> GSM1105537     1  0.0000      0.974 1.000 0.000
#> GSM1105540     1  0.0000      0.974 1.000 0.000
#> GSM1105544     2  0.0000      0.968 0.000 1.000
#> GSM1105445     2  0.0000      0.968 0.000 1.000
#> GSM1105553     2  0.6801      0.795 0.180 0.820
#> GSM1105556     1  0.0000      0.974 1.000 0.000
#> GSM1105557     2  0.0000      0.968 0.000 1.000
#> GSM1105449     2  0.0000      0.968 0.000 1.000
#> GSM1105469     1  0.6712      0.777 0.824 0.176
#> GSM1105472     2  0.0000      0.968 0.000 1.000
#> GSM1105473     1  0.0000      0.974 1.000 0.000
#> GSM1105476     2  0.0000      0.968 0.000 1.000
#> GSM1105477     2  0.0000      0.968 0.000 1.000
#> GSM1105478     2  0.0000      0.968 0.000 1.000
#> GSM1105510     2  0.0000      0.968 0.000 1.000
#> GSM1105530     1  0.0000      0.974 1.000 0.000
#> GSM1105539     1  0.0000      0.974 1.000 0.000
#> GSM1105480     2  0.0000      0.968 0.000 1.000
#> GSM1105512     1  0.0000      0.974 1.000 0.000
#> GSM1105532     1  0.0000      0.974 1.000 0.000
#> GSM1105541     1  0.0000      0.974 1.000 0.000
#> GSM1105439     2  0.0000      0.968 0.000 1.000
#> GSM1105463     1  0.0000      0.974 1.000 0.000
#> GSM1105482     1  0.0000      0.974 1.000 0.000
#> GSM1105483     2  0.0000      0.968 0.000 1.000
#> GSM1105494     2  0.0000      0.968 0.000 1.000
#> GSM1105503     2  0.9358      0.497 0.352 0.648
#> GSM1105507     1  0.6531      0.787 0.832 0.168
#> GSM1105446     2  0.0000      0.968 0.000 1.000
#> GSM1105519     1  0.0000      0.974 1.000 0.000
#> GSM1105526     2  0.0000      0.968 0.000 1.000
#> GSM1105527     2  0.0000      0.968 0.000 1.000
#> GSM1105531     1  0.0000      0.974 1.000 0.000
#> GSM1105543     2  0.0000      0.968 0.000 1.000
#> GSM1105546     1  0.0000      0.974 1.000 0.000
#> GSM1105547     1  0.0000      0.974 1.000 0.000
#> GSM1105455     2  0.0000      0.968 0.000 1.000
#> GSM1105458     2  0.0000      0.968 0.000 1.000
#> GSM1105459     2  0.0000      0.968 0.000 1.000
#> GSM1105462     1  0.9661      0.307 0.608 0.392
#> GSM1105441     2  0.0000      0.968 0.000 1.000
#> GSM1105465     2  0.0376      0.965 0.004 0.996
#> GSM1105484     2  0.0000      0.968 0.000 1.000
#> GSM1105485     2  0.0000      0.968 0.000 1.000
#> GSM1105496     2  0.9460      0.470 0.364 0.636
#> GSM1105505     1  0.0000      0.974 1.000 0.000
#> GSM1105509     1  0.0000      0.974 1.000 0.000
#> GSM1105448     2  0.0000      0.968 0.000 1.000
#> GSM1105521     1  0.0000      0.974 1.000 0.000
#> GSM1105528     2  0.0000      0.968 0.000 1.000
#> GSM1105529     2  0.0000      0.968 0.000 1.000
#> GSM1105533     1  0.0000      0.974 1.000 0.000
#> GSM1105545     2  0.0000      0.968 0.000 1.000
#> GSM1105548     1  0.0000      0.974 1.000 0.000
#> GSM1105549     1  0.0000      0.974 1.000 0.000
#> GSM1105457     2  0.0000      0.968 0.000 1.000
#> GSM1105460     2  0.0000      0.968 0.000 1.000
#> GSM1105461     2  0.0000      0.968 0.000 1.000
#> GSM1105464     1  0.0000      0.974 1.000 0.000
#> GSM1105466     2  0.0000      0.968 0.000 1.000
#> GSM1105479     2  0.0000      0.968 0.000 1.000
#> GSM1105502     1  0.0000      0.974 1.000 0.000
#> GSM1105515     1  0.0000      0.974 1.000 0.000
#> GSM1105523     1  0.0000      0.974 1.000 0.000
#> GSM1105550     1  0.0000      0.974 1.000 0.000
#> GSM1105450     2  0.0000      0.968 0.000 1.000
#> GSM1105451     2  0.0000      0.968 0.000 1.000
#> GSM1105454     2  0.6623      0.804 0.172 0.828
#> GSM1105468     2  0.0000      0.968 0.000 1.000
#> GSM1105481     2  0.6712      0.800 0.176 0.824
#> GSM1105504     1  0.0000      0.974 1.000 0.000
#> GSM1105517     1  0.0000      0.974 1.000 0.000
#> GSM1105525     1  0.0000      0.974 1.000 0.000
#> GSM1105552     1  0.0000      0.974 1.000 0.000
#> GSM1105452     2  0.0000      0.968 0.000 1.000
#> GSM1105453     2  0.0000      0.968 0.000 1.000
#> GSM1105456     2  0.6623      0.804 0.172 0.828

show/hide code output

cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#>            class entropy silhouette    p1    p2    p3
#> GSM1105438     2  0.1529     0.6974 0.000 0.960 0.040
#> GSM1105486     2  0.0000     0.7115 0.000 1.000 0.000
#> GSM1105487     1  0.0237     0.9262 0.996 0.000 0.004
#> GSM1105490     2  0.5465     0.5482 0.000 0.712 0.288
#> GSM1105491     3  0.6169     0.2840 0.004 0.360 0.636
#> GSM1105495     3  0.5621     0.3627 0.000 0.308 0.692
#> GSM1105498     3  0.2165     0.6361 0.000 0.064 0.936
#> GSM1105499     1  0.0237     0.9262 0.996 0.000 0.004
#> GSM1105506     2  0.5835     0.4788 0.000 0.660 0.340
#> GSM1105442     2  0.6309     0.0173 0.000 0.504 0.496
#> GSM1105511     2  0.5810     0.4994 0.000 0.664 0.336
#> GSM1105514     2  0.1289     0.7002 0.000 0.968 0.032
#> GSM1105518     3  0.4452     0.5945 0.000 0.192 0.808
#> GSM1105522     1  0.1163     0.9212 0.972 0.000 0.028
#> GSM1105534     1  0.0000     0.9266 1.000 0.000 0.000
#> GSM1105535     1  0.0237     0.9262 0.996 0.000 0.004
#> GSM1105538     1  0.0000     0.9266 1.000 0.000 0.000
#> GSM1105542     2  0.5327     0.5157 0.000 0.728 0.272
#> GSM1105443     2  0.4796     0.6081 0.000 0.780 0.220
#> GSM1105551     1  0.1289     0.9204 0.968 0.000 0.032
#> GSM1105554     1  0.0000     0.9266 1.000 0.000 0.000
#> GSM1105555     1  0.2796     0.8885 0.908 0.000 0.092
#> GSM1105447     2  0.4842     0.6063 0.000 0.776 0.224
#> GSM1105467     2  0.0000     0.7115 0.000 1.000 0.000
#> GSM1105470     2  0.0000     0.7115 0.000 1.000 0.000
#> GSM1105471     3  0.5810     0.4407 0.000 0.336 0.664
#> GSM1105474     2  0.0000     0.7115 0.000 1.000 0.000
#> GSM1105475     2  0.2261     0.6946 0.000 0.932 0.068
#> GSM1105440     1  0.0237     0.9262 0.996 0.000 0.004
#> GSM1105488     2  0.5327     0.5157 0.000 0.728 0.272
#> GSM1105489     1  0.1163     0.9207 0.972 0.000 0.028
#> GSM1105492     1  0.0000     0.9266 1.000 0.000 0.000
#> GSM1105493     1  0.2796     0.8885 0.908 0.000 0.092
#> GSM1105497     3  0.6280     0.0649 0.000 0.460 0.540
#> GSM1105500     3  0.6260    -0.2524 0.000 0.448 0.552
#> GSM1105501     2  0.5591     0.5411 0.000 0.696 0.304
#> GSM1105508     1  0.1860     0.9095 0.948 0.000 0.052
#> GSM1105444     2  0.1529     0.6974 0.000 0.960 0.040
#> GSM1105513     2  0.5810     0.4844 0.000 0.664 0.336
#> GSM1105516     2  0.9816     0.0119 0.356 0.400 0.244
#> GSM1105520     3  0.3896     0.6270 0.008 0.128 0.864
#> GSM1105524     1  0.0237     0.9262 0.996 0.000 0.004
#> GSM1105536     2  0.4842     0.6338 0.000 0.776 0.224
#> GSM1105537     1  0.0237     0.9262 0.996 0.000 0.004
#> GSM1105540     3  0.6308     0.0452 0.492 0.000 0.508
#> GSM1105544     3  0.5692     0.3016 0.008 0.268 0.724
#> GSM1105445     3  0.5810     0.4185 0.000 0.336 0.664
#> GSM1105553     3  0.2096     0.6331 0.004 0.052 0.944
#> GSM1105556     1  0.0000     0.9266 1.000 0.000 0.000
#> GSM1105557     2  0.5678     0.5138 0.000 0.684 0.316
#> GSM1105449     2  0.0000     0.7115 0.000 1.000 0.000
#> GSM1105469     3  0.9870     0.2728 0.364 0.256 0.380
#> GSM1105472     2  0.0747     0.7062 0.000 0.984 0.016
#> GSM1105473     1  0.4887     0.7595 0.772 0.000 0.228
#> GSM1105476     2  0.0424     0.7103 0.000 0.992 0.008
#> GSM1105477     2  0.5138     0.6128 0.000 0.748 0.252
#> GSM1105478     3  0.6062     0.2950 0.000 0.384 0.616
#> GSM1105510     2  0.5327     0.5157 0.000 0.728 0.272
#> GSM1105530     1  0.3412     0.8785 0.876 0.000 0.124
#> GSM1105539     1  0.3412     0.8785 0.876 0.000 0.124
#> GSM1105480     2  0.6291     0.1759 0.000 0.532 0.468
#> GSM1105512     1  0.0000     0.9266 1.000 0.000 0.000
#> GSM1105532     1  0.3412     0.8785 0.876 0.000 0.124
#> GSM1105541     1  0.3412     0.8785 0.876 0.000 0.124
#> GSM1105439     2  0.4750     0.6148 0.000 0.784 0.216
#> GSM1105463     3  0.6180     0.0529 0.416 0.000 0.584
#> GSM1105482     1  0.0000     0.9266 1.000 0.000 0.000
#> GSM1105483     2  0.6008     0.4420 0.000 0.628 0.372
#> GSM1105494     3  0.6079     0.2713 0.000 0.388 0.612
#> GSM1105503     3  0.4353     0.6129 0.008 0.156 0.836
#> GSM1105507     1  0.3607     0.8466 0.880 0.008 0.112
#> GSM1105446     2  0.3340     0.6520 0.000 0.880 0.120
#> GSM1105519     1  0.0892     0.9226 0.980 0.000 0.020
#> GSM1105526     2  0.6204     0.4479 0.000 0.576 0.424
#> GSM1105527     2  0.5968     0.4451 0.000 0.636 0.364
#> GSM1105531     3  0.3340     0.6268 0.120 0.000 0.880
#> GSM1105543     2  0.2959     0.6658 0.000 0.900 0.100
#> GSM1105546     1  0.0000     0.9266 1.000 0.000 0.000
#> GSM1105547     1  0.0000     0.9266 1.000 0.000 0.000
#> GSM1105455     2  0.4750     0.6148 0.000 0.784 0.216
#> GSM1105458     2  0.6026     0.3328 0.000 0.624 0.376
#> GSM1105459     2  0.0000     0.7115 0.000 1.000 0.000
#> GSM1105462     3  0.2743     0.6409 0.052 0.020 0.928
#> GSM1105441     2  0.0000     0.7115 0.000 1.000 0.000
#> GSM1105465     3  0.5988     0.2743 0.000 0.368 0.632
#> GSM1105484     2  0.5291     0.5193 0.000 0.732 0.268
#> GSM1105485     2  0.5553     0.5113 0.004 0.724 0.272
#> GSM1105496     3  0.1315     0.6318 0.008 0.020 0.972
#> GSM1105505     3  0.2356     0.6369 0.072 0.000 0.928
#> GSM1105509     1  0.1753     0.9104 0.952 0.000 0.048
#> GSM1105448     2  0.1529     0.6974 0.000 0.960 0.040
#> GSM1105521     1  0.0892     0.9226 0.980 0.000 0.020
#> GSM1105528     2  0.5178     0.5341 0.000 0.744 0.256
#> GSM1105529     2  0.5327     0.5157 0.000 0.728 0.272
#> GSM1105533     1  0.2959     0.8854 0.900 0.000 0.100
#> GSM1105545     2  0.5497     0.5587 0.000 0.708 0.292
#> GSM1105548     1  0.0000     0.9266 1.000 0.000 0.000
#> GSM1105549     1  0.0000     0.9266 1.000 0.000 0.000
#> GSM1105457     2  0.5810     0.4844 0.000 0.664 0.336
#> GSM1105460     2  0.4504     0.6255 0.000 0.804 0.196
#> GSM1105461     2  0.0000     0.7115 0.000 1.000 0.000
#> GSM1105464     1  0.3340     0.8787 0.880 0.000 0.120
#> GSM1105466     2  0.5810     0.4844 0.000 0.664 0.336
#> GSM1105479     2  0.5810     0.4685 0.000 0.664 0.336
#> GSM1105502     1  0.3412     0.8785 0.876 0.000 0.124
#> GSM1105515     1  0.0000     0.9266 1.000 0.000 0.000
#> GSM1105523     3  0.5216     0.4993 0.260 0.000 0.740
#> GSM1105550     3  0.7876     0.2577 0.424 0.056 0.520
#> GSM1105450     2  0.0000     0.7115 0.000 1.000 0.000
#> GSM1105451     2  0.0000     0.7115 0.000 1.000 0.000
#> GSM1105454     3  0.4796     0.5808 0.000 0.220 0.780
#> GSM1105468     2  0.0000     0.7115 0.000 1.000 0.000
#> GSM1105481     3  0.3267     0.6221 0.000 0.116 0.884
#> GSM1105504     3  0.3412     0.6265 0.124 0.000 0.876
#> GSM1105517     1  0.4121     0.7933 0.832 0.000 0.168
#> GSM1105525     1  0.5905     0.5030 0.648 0.000 0.352
#> GSM1105552     1  0.6307     0.2098 0.512 0.000 0.488
#> GSM1105452     2  0.5178     0.5341 0.000 0.744 0.256
#> GSM1105453     2  0.0000     0.7115 0.000 1.000 0.000
#> GSM1105456     3  0.4796     0.5808 0.000 0.220 0.780

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>            class entropy silhouette    p1    p2    p3    p4
#> GSM1105438     2  0.3172     0.6473 0.000 0.840 0.000 0.160
#> GSM1105486     2  0.4164     0.6323 0.000 0.736 0.000 0.264
#> GSM1105487     1  0.3428     0.7800 0.844 0.000 0.144 0.012
#> GSM1105490     4  0.3764     0.5337 0.000 0.216 0.000 0.784
#> GSM1105491     3  0.7335     0.2069 0.000 0.400 0.444 0.156
#> GSM1105495     3  0.6796     0.4327 0.000 0.252 0.596 0.152
#> GSM1105498     4  0.5174    -0.2406 0.000 0.012 0.368 0.620
#> GSM1105499     1  0.1557     0.8014 0.944 0.000 0.056 0.000
#> GSM1105506     4  0.3311     0.5683 0.000 0.172 0.000 0.828
#> GSM1105442     2  0.6563     0.3212 0.000 0.632 0.208 0.160
#> GSM1105511     4  0.4804     0.5784 0.000 0.160 0.064 0.776
#> GSM1105514     2  0.3219     0.6474 0.000 0.836 0.000 0.164
#> GSM1105518     4  0.5570    -0.4674 0.000 0.020 0.440 0.540
#> GSM1105522     1  0.4690     0.7026 0.724 0.000 0.260 0.016
#> GSM1105534     1  0.0000     0.8016 1.000 0.000 0.000 0.000
#> GSM1105535     1  0.1716     0.8003 0.936 0.000 0.064 0.000
#> GSM1105538     1  0.0000     0.8016 1.000 0.000 0.000 0.000
#> GSM1105542     2  0.3790     0.5437 0.000 0.820 0.164 0.016
#> GSM1105443     4  0.5161    -0.0111 0.000 0.476 0.004 0.520
#> GSM1105551     1  0.3377     0.7797 0.848 0.000 0.140 0.012
#> GSM1105554     1  0.0000     0.8016 1.000 0.000 0.000 0.000
#> GSM1105555     1  0.3529     0.7614 0.836 0.000 0.152 0.012
#> GSM1105447     4  0.5080    -0.0406 0.000 0.420 0.004 0.576
#> GSM1105467     2  0.4164     0.6323 0.000 0.736 0.000 0.264
#> GSM1105470     2  0.4164     0.6323 0.000 0.736 0.000 0.264
#> GSM1105471     4  0.6182     0.0127 0.000 0.088 0.276 0.636
#> GSM1105474     2  0.4164     0.6323 0.000 0.736 0.000 0.264
#> GSM1105475     2  0.4933     0.2523 0.000 0.568 0.000 0.432
#> GSM1105440     1  0.1722     0.8018 0.944 0.000 0.048 0.008
#> GSM1105488     2  0.3790     0.5437 0.000 0.820 0.164 0.016
#> GSM1105489     1  0.2928     0.7822 0.880 0.000 0.108 0.012
#> GSM1105492     1  0.0336     0.8013 0.992 0.000 0.008 0.000
#> GSM1105493     1  0.3400     0.7391 0.820 0.000 0.180 0.000
#> GSM1105497     2  0.7304    -0.0175 0.000 0.492 0.344 0.164
#> GSM1105500     4  0.7268     0.3663 0.000 0.372 0.152 0.476
#> GSM1105501     4  0.4820     0.5740 0.000 0.168 0.060 0.772
#> GSM1105508     1  0.7357     0.4317 0.524 0.000 0.260 0.216
#> GSM1105444     2  0.3123     0.6467 0.000 0.844 0.000 0.156
#> GSM1105513     4  0.3583     0.5625 0.000 0.180 0.004 0.816
#> GSM1105516     4  0.9595     0.2155 0.176 0.248 0.184 0.392
#> GSM1105520     3  0.5353     0.5767 0.000 0.012 0.556 0.432
#> GSM1105524     1  0.1716     0.8003 0.936 0.000 0.064 0.000
#> GSM1105536     4  0.6773     0.4118 0.000 0.348 0.108 0.544
#> GSM1105537     1  0.1716     0.8003 0.936 0.000 0.064 0.000
#> GSM1105540     4  0.7704    -0.0283 0.244 0.004 0.264 0.488
#> GSM1105544     4  0.8264     0.2388 0.056 0.244 0.172 0.528
#> GSM1105445     4  0.5907     0.0937 0.000 0.080 0.252 0.668
#> GSM1105553     3  0.6495     0.5556 0.000 0.072 0.492 0.436
#> GSM1105556     1  0.0000     0.8016 1.000 0.000 0.000 0.000
#> GSM1105557     4  0.3444     0.5622 0.000 0.184 0.000 0.816
#> GSM1105449     2  0.4697     0.5232 0.000 0.644 0.000 0.356
#> GSM1105469     4  0.6792     0.2400 0.176 0.004 0.196 0.624
#> GSM1105472     2  0.4134     0.6334 0.000 0.740 0.000 0.260
#> GSM1105473     1  0.5070     0.5500 0.580 0.000 0.416 0.004
#> GSM1105476     2  0.4164     0.6323 0.000 0.736 0.000 0.264
#> GSM1105477     4  0.6867     0.3733 0.000 0.384 0.108 0.508
#> GSM1105478     4  0.2813     0.3964 0.000 0.024 0.080 0.896
#> GSM1105510     2  0.3790     0.5437 0.000 0.820 0.164 0.016
#> GSM1105530     1  0.5143     0.5575 0.540 0.000 0.456 0.004
#> GSM1105539     1  0.5097     0.5842 0.568 0.000 0.428 0.004
#> GSM1105480     4  0.4843     0.5131 0.000 0.112 0.104 0.784
#> GSM1105512     1  0.1489     0.7986 0.952 0.000 0.044 0.004
#> GSM1105532     1  0.5143     0.5575 0.540 0.000 0.456 0.004
#> GSM1105541     1  0.5097     0.5842 0.568 0.000 0.428 0.004
#> GSM1105439     4  0.4999    -0.0505 0.000 0.492 0.000 0.508
#> GSM1105463     3  0.4375     0.5333 0.144 0.008 0.812 0.036
#> GSM1105482     1  0.0469     0.8030 0.988 0.000 0.012 0.000
#> GSM1105483     4  0.5990     0.5387 0.004 0.156 0.136 0.704
#> GSM1105494     4  0.3497     0.3204 0.000 0.024 0.124 0.852
#> GSM1105503     3  0.5112     0.5976 0.000 0.008 0.608 0.384
#> GSM1105507     1  0.7613     0.1827 0.448 0.000 0.212 0.340
#> GSM1105446     2  0.2227     0.6080 0.000 0.928 0.036 0.036
#> GSM1105519     1  0.3208     0.7540 0.848 0.000 0.148 0.004
#> GSM1105526     4  0.6616     0.4721 0.000 0.308 0.108 0.584
#> GSM1105527     4  0.4696     0.5847 0.004 0.148 0.056 0.792
#> GSM1105531     3  0.3727     0.6508 0.004 0.008 0.824 0.164
#> GSM1105543     2  0.2224     0.6060 0.000 0.928 0.040 0.032
#> GSM1105546     1  0.0524     0.8021 0.988 0.000 0.008 0.004
#> GSM1105547     1  0.0000     0.8016 1.000 0.000 0.000 0.000
#> GSM1105455     4  0.4999    -0.0505 0.000 0.492 0.000 0.508
#> GSM1105458     4  0.6023     0.1269 0.000 0.344 0.056 0.600
#> GSM1105459     2  0.4164     0.6323 0.000 0.736 0.000 0.264
#> GSM1105462     3  0.4011     0.6386 0.000 0.008 0.784 0.208
#> GSM1105441     2  0.4431     0.5721 0.000 0.696 0.000 0.304
#> GSM1105465     2  0.7349    -0.0876 0.000 0.472 0.364 0.164
#> GSM1105484     2  0.4532     0.5227 0.000 0.792 0.156 0.052
#> GSM1105485     2  0.4359     0.5302 0.016 0.804 0.164 0.016
#> GSM1105496     3  0.6290     0.5916 0.000 0.068 0.568 0.364
#> GSM1105505     3  0.3681     0.6512 0.000 0.008 0.816 0.176
#> GSM1105509     1  0.6745     0.5085 0.612 0.000 0.212 0.176
#> GSM1105448     2  0.3219     0.6473 0.000 0.836 0.000 0.164
#> GSM1105521     1  0.2999     0.7634 0.864 0.000 0.132 0.004
#> GSM1105528     2  0.3743     0.5454 0.000 0.824 0.160 0.016
#> GSM1105529     2  0.3790     0.5437 0.000 0.820 0.164 0.016
#> GSM1105533     1  0.4576     0.7031 0.728 0.000 0.260 0.012
#> GSM1105545     4  0.5318     0.5493 0.000 0.196 0.072 0.732
#> GSM1105548     1  0.1284     0.8029 0.964 0.000 0.024 0.012
#> GSM1105549     1  0.0592     0.8027 0.984 0.000 0.016 0.000
#> GSM1105457     4  0.3400     0.5629 0.000 0.180 0.000 0.820
#> GSM1105460     4  0.4981     0.0319 0.000 0.464 0.000 0.536
#> GSM1105461     2  0.4164     0.6323 0.000 0.736 0.000 0.264
#> GSM1105464     1  0.5105     0.5686 0.564 0.000 0.432 0.004
#> GSM1105466     4  0.3311     0.5683 0.000 0.172 0.000 0.828
#> GSM1105479     4  0.4956     0.3688 0.000 0.232 0.036 0.732
#> GSM1105502     1  0.5183     0.6166 0.584 0.000 0.408 0.008
#> GSM1105515     1  0.0000     0.8016 1.000 0.000 0.000 0.000
#> GSM1105523     3  0.3942     0.5946 0.000 0.000 0.764 0.236
#> GSM1105550     4  0.7199     0.0520 0.148 0.004 0.304 0.544
#> GSM1105450     2  0.4164     0.6323 0.000 0.736 0.000 0.264
#> GSM1105451     2  0.4164     0.6323 0.000 0.736 0.000 0.264
#> GSM1105454     3  0.6755     0.4200 0.000 0.092 0.460 0.448
#> GSM1105468     2  0.4164     0.6323 0.000 0.736 0.000 0.264
#> GSM1105481     3  0.6170     0.5293 0.000 0.052 0.528 0.420
#> GSM1105504     3  0.3591     0.6513 0.000 0.008 0.824 0.168
#> GSM1105517     1  0.7955     0.0943 0.408 0.004 0.256 0.332
#> GSM1105525     3  0.6655     0.3454 0.184 0.000 0.624 0.192
#> GSM1105552     3  0.5553     0.2974 0.252 0.012 0.700 0.036
#> GSM1105452     2  0.3743     0.5454 0.000 0.824 0.160 0.016
#> GSM1105453     2  0.4164     0.6323 0.000 0.736 0.000 0.264
#> GSM1105456     3  0.6755     0.4200 0.000 0.092 0.460 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
#> GSM1105438     2  0.1478     0.7200 0.000 0.936 0.000 0.000 0.064
#> GSM1105486     2  0.0000     0.7852 0.000 1.000 0.000 0.000 0.000
#> GSM1105487     1  0.4650     0.7761 0.760 0.000 0.164 0.024 0.052
#> GSM1105490     4  0.4059     0.6746 0.000 0.172 0.000 0.776 0.052
#> GSM1105491     5  0.3479     0.4897 0.000 0.076 0.056 0.016 0.852
#> GSM1105495     5  0.6861    -0.1543 0.000 0.056 0.360 0.096 0.488
#> GSM1105498     4  0.4171     0.5114 0.000 0.000 0.104 0.784 0.112
#> GSM1105499     1  0.2408     0.8390 0.892 0.000 0.096 0.004 0.008
#> GSM1105506     4  0.3893     0.6832 0.000 0.140 0.004 0.804 0.052
#> GSM1105442     5  0.4088     0.6352 0.000 0.304 0.000 0.008 0.688
#> GSM1105511     4  0.3250     0.6963 0.000 0.128 0.020 0.844 0.008
#> GSM1105514     2  0.0963     0.7486 0.000 0.964 0.000 0.000 0.036
#> GSM1105518     3  0.7052     0.2972 0.000 0.008 0.356 0.320 0.316
#> GSM1105522     1  0.5618     0.5111 0.600 0.000 0.328 0.052 0.020
#> GSM1105534     1  0.0000     0.8496 1.000 0.000 0.000 0.000 0.000
#> GSM1105535     1  0.2674     0.8311 0.888 0.000 0.084 0.008 0.020
#> GSM1105538     1  0.0162     0.8494 0.996 0.000 0.000 0.000 0.004
#> GSM1105542     5  0.4242     0.6381 0.000 0.428 0.000 0.000 0.572
#> GSM1105443     2  0.4905     0.5674 0.000 0.696 0.000 0.224 0.080
#> GSM1105551     1  0.4761     0.7751 0.756 0.000 0.160 0.028 0.056
#> GSM1105554     1  0.0671     0.8478 0.980 0.000 0.016 0.004 0.000
#> GSM1105555     1  0.4393     0.7567 0.780 0.000 0.152 0.024 0.044
#> GSM1105447     2  0.6616     0.2482 0.000 0.456 0.000 0.292 0.252
#> GSM1105467     2  0.0671     0.7792 0.000 0.980 0.000 0.004 0.016
#> GSM1105470     2  0.0000     0.7852 0.000 1.000 0.000 0.000 0.000
#> GSM1105471     4  0.8325     0.0313 0.000 0.172 0.200 0.376 0.252
#> GSM1105474     2  0.0000     0.7852 0.000 1.000 0.000 0.000 0.000
#> GSM1105475     2  0.3565     0.6660 0.000 0.816 0.000 0.144 0.040
#> GSM1105440     1  0.3011     0.8317 0.876 0.000 0.076 0.012 0.036
#> GSM1105488     5  0.4242     0.6381 0.000 0.428 0.000 0.000 0.572
#> GSM1105489     1  0.3513     0.8169 0.852 0.000 0.080 0.024 0.044
#> GSM1105492     1  0.1059     0.8498 0.968 0.000 0.004 0.008 0.020
#> GSM1105493     1  0.4509     0.6467 0.728 0.000 0.232 0.016 0.024
#> GSM1105497     5  0.3605     0.5626 0.000 0.120 0.036 0.012 0.832
#> GSM1105500     4  0.4825     0.6005 0.000 0.028 0.024 0.708 0.240
#> GSM1105501     4  0.3554     0.6959 0.000 0.136 0.020 0.828 0.016
#> GSM1105508     4  0.6928     0.3477 0.216 0.000 0.240 0.516 0.028
#> GSM1105444     2  0.1671     0.7022 0.000 0.924 0.000 0.000 0.076
#> GSM1105513     4  0.4409     0.6663 0.000 0.148 0.004 0.768 0.080
#> GSM1105516     4  0.7866     0.5083 0.168 0.056 0.100 0.560 0.116
#> GSM1105520     3  0.6796     0.3229 0.000 0.000 0.380 0.312 0.308
#> GSM1105524     1  0.2674     0.8311 0.888 0.000 0.084 0.008 0.020
#> GSM1105536     4  0.5693     0.6319 0.000 0.160 0.028 0.684 0.128
#> GSM1105537     1  0.2674     0.8311 0.888 0.000 0.084 0.008 0.020
#> GSM1105540     4  0.5549     0.5555 0.088 0.000 0.188 0.692 0.032
#> GSM1105544     4  0.4699     0.6149 0.004 0.012 0.032 0.724 0.228
#> GSM1105445     4  0.8129     0.0811 0.000 0.140 0.200 0.412 0.248
#> GSM1105553     5  0.6813    -0.3891 0.000 0.000 0.340 0.304 0.356
#> GSM1105556     1  0.0960     0.8455 0.972 0.000 0.016 0.004 0.008
#> GSM1105557     4  0.4019     0.6836 0.000 0.152 0.004 0.792 0.052
#> GSM1105449     2  0.3035     0.7163 0.000 0.856 0.000 0.032 0.112
#> GSM1105469     4  0.4205     0.6585 0.056 0.028 0.088 0.820 0.008
#> GSM1105472     2  0.0000     0.7852 0.000 1.000 0.000 0.000 0.000
#> GSM1105473     3  0.5827     0.0728 0.396 0.000 0.532 0.024 0.048
#> GSM1105476     2  0.0000     0.7852 0.000 1.000 0.000 0.000 0.000
#> GSM1105477     4  0.5818     0.6114 0.000 0.152 0.028 0.672 0.148
#> GSM1105478     4  0.3593     0.6370 0.000 0.052 0.012 0.840 0.096
#> GSM1105510     5  0.4490     0.6467 0.000 0.404 0.004 0.004 0.588
#> GSM1105530     3  0.4063     0.2659 0.280 0.000 0.708 0.012 0.000
#> GSM1105539     3  0.4240     0.2231 0.304 0.000 0.684 0.004 0.008
#> GSM1105480     4  0.2713     0.6790 0.000 0.072 0.004 0.888 0.036
#> GSM1105512     1  0.2796     0.7822 0.868 0.000 0.116 0.008 0.008
#> GSM1105532     3  0.4063     0.2659 0.280 0.000 0.708 0.012 0.000
#> GSM1105541     3  0.4260     0.2137 0.308 0.000 0.680 0.004 0.008
#> GSM1105439     2  0.4905     0.5652 0.000 0.696 0.000 0.224 0.080
#> GSM1105463     3  0.3427     0.5516 0.012 0.000 0.844 0.032 0.112
#> GSM1105482     1  0.1997     0.8444 0.932 0.000 0.024 0.016 0.028
#> GSM1105483     4  0.3955     0.6876 0.004 0.100 0.068 0.820 0.008
#> GSM1105494     4  0.5227     0.4466 0.000 0.024 0.052 0.688 0.236
#> GSM1105503     3  0.6536     0.3657 0.000 0.000 0.468 0.312 0.220
#> GSM1105507     4  0.6714     0.3831 0.280 0.000 0.156 0.536 0.028
#> GSM1105446     2  0.3534     0.3173 0.000 0.744 0.000 0.000 0.256
#> GSM1105519     1  0.3864     0.6881 0.784 0.000 0.188 0.020 0.008
#> GSM1105526     4  0.5420     0.6488 0.000 0.132 0.028 0.712 0.128
#> GSM1105527     4  0.3120     0.6954 0.000 0.116 0.016 0.856 0.012
#> GSM1105531     3  0.3752     0.5440 0.000 0.000 0.812 0.064 0.124
#> GSM1105543     2  0.3561     0.3072 0.000 0.740 0.000 0.000 0.260
#> GSM1105546     1  0.1772     0.8482 0.940 0.000 0.008 0.020 0.032
#> GSM1105547     1  0.1524     0.8465 0.952 0.000 0.016 0.016 0.016
#> GSM1105455     2  0.4847     0.5782 0.000 0.704 0.000 0.216 0.080
#> GSM1105458     2  0.6463     0.3316 0.000 0.496 0.000 0.228 0.276
#> GSM1105459     2  0.0000     0.7852 0.000 1.000 0.000 0.000 0.000
#> GSM1105462     3  0.4169     0.5307 0.000 0.000 0.784 0.116 0.100
#> GSM1105441     2  0.2208     0.7394 0.000 0.908 0.000 0.020 0.072
#> GSM1105465     5  0.3837     0.6041 0.000 0.164 0.024 0.012 0.800
#> GSM1105484     5  0.4383     0.6306 0.000 0.424 0.000 0.004 0.572
#> GSM1105485     5  0.4201     0.6440 0.000 0.408 0.000 0.000 0.592
#> GSM1105496     3  0.6783     0.3364 0.000 0.000 0.372 0.280 0.348
#> GSM1105505     3  0.4054     0.5402 0.000 0.000 0.788 0.072 0.140
#> GSM1105509     4  0.7087     0.1542 0.360 0.000 0.212 0.408 0.020
#> GSM1105448     2  0.1410     0.7227 0.000 0.940 0.000 0.000 0.060
#> GSM1105521     1  0.3805     0.6878 0.784 0.000 0.192 0.016 0.008
#> GSM1105528     5  0.4256     0.6275 0.000 0.436 0.000 0.000 0.564
#> GSM1105529     5  0.4235     0.6407 0.000 0.424 0.000 0.000 0.576
#> GSM1105533     1  0.5214     0.3631 0.540 0.000 0.424 0.012 0.024
#> GSM1105545     4  0.4886     0.6815 0.000 0.160 0.028 0.748 0.064
#> GSM1105548     1  0.2653     0.8395 0.900 0.000 0.020 0.028 0.052
#> GSM1105549     1  0.2082     0.8432 0.928 0.000 0.024 0.016 0.032
#> GSM1105457     4  0.4450     0.6665 0.000 0.152 0.004 0.764 0.080
#> GSM1105460     2  0.5275     0.4598 0.000 0.640 0.000 0.276 0.084
#> GSM1105461     2  0.0000     0.7852 0.000 1.000 0.000 0.000 0.000
#> GSM1105464     3  0.4665     0.2411 0.304 0.000 0.668 0.016 0.012
#> GSM1105466     4  0.4088     0.6799 0.000 0.140 0.004 0.792 0.064
#> GSM1105479     4  0.6911    -0.0187 0.000 0.364 0.008 0.396 0.232
#> GSM1105502     3  0.4135     0.1686 0.340 0.000 0.656 0.004 0.000
#> GSM1105515     1  0.0671     0.8478 0.980 0.000 0.016 0.004 0.000
#> GSM1105523     3  0.3366     0.5061 0.000 0.000 0.828 0.140 0.032
#> GSM1105550     4  0.5377     0.4899 0.044 0.004 0.288 0.648 0.016
#> GSM1105450     2  0.0000     0.7852 0.000 1.000 0.000 0.000 0.000
#> GSM1105451     2  0.0000     0.7852 0.000 1.000 0.000 0.000 0.000
#> GSM1105454     3  0.7636     0.3226 0.000 0.048 0.368 0.260 0.324
#> GSM1105468     2  0.0000     0.7852 0.000 1.000 0.000 0.000 0.000
#> GSM1105481     3  0.7134     0.3668 0.000 0.028 0.444 0.200 0.328
#> GSM1105504     3  0.3359     0.5520 0.000 0.000 0.840 0.052 0.108
#> GSM1105517     4  0.6998     0.3434 0.200 0.000 0.260 0.508 0.032
#> GSM1105525     3  0.3130     0.5132 0.048 0.000 0.856 0.096 0.000
#> GSM1105552     3  0.6652     0.3781 0.228 0.000 0.592 0.060 0.120
#> GSM1105452     5  0.4256     0.6285 0.000 0.436 0.000 0.000 0.564
#> GSM1105453     2  0.0000     0.7852 0.000 1.000 0.000 0.000 0.000
#> GSM1105456     3  0.7636     0.3226 0.000 0.048 0.368 0.260 0.324

show/hide code output

cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#>            class entropy silhouette    p1    p2    p3    p4    p5    p6
#> GSM1105438     2  0.0909     0.8173 0.000 0.968 0.000 0.000 0.020 0.012
#> GSM1105486     2  0.0146     0.8303 0.000 0.996 0.000 0.004 0.000 0.000
#> GSM1105487     1  0.6409     0.6158 0.564 0.000 0.240 0.008 0.100 0.088
#> GSM1105490     4  0.4239     0.6437 0.000 0.032 0.008 0.780 0.052 0.128
#> GSM1105491     5  0.3911     0.7090 0.000 0.044 0.004 0.008 0.772 0.172
#> GSM1105495     6  0.5313     0.5298 0.000 0.024 0.112 0.008 0.184 0.672
#> GSM1105498     4  0.5524     0.1737 0.000 0.000 0.064 0.532 0.032 0.372
#> GSM1105499     1  0.3342     0.7435 0.820 0.000 0.140 0.008 0.004 0.028
#> GSM1105506     4  0.4284     0.6373 0.000 0.028 0.008 0.772 0.052 0.140
#> GSM1105442     5  0.3963     0.8433 0.000 0.164 0.000 0.000 0.756 0.080
#> GSM1105511     4  0.0837     0.7370 0.000 0.020 0.004 0.972 0.000 0.004
#> GSM1105514     2  0.0458     0.8192 0.000 0.984 0.000 0.000 0.016 0.000
#> GSM1105518     6  0.3960     0.6956 0.000 0.000 0.104 0.100 0.012 0.784
#> GSM1105522     3  0.6429    -0.1676 0.404 0.000 0.456 0.044 0.040 0.056
#> GSM1105534     1  0.0291     0.7999 0.992 0.000 0.000 0.004 0.004 0.000
#> GSM1105535     1  0.4764     0.7176 0.728 0.000 0.172 0.008 0.036 0.056
#> GSM1105538     1  0.0653     0.7981 0.980 0.000 0.004 0.004 0.012 0.000
#> GSM1105542     5  0.3288     0.8880 0.000 0.276 0.000 0.000 0.724 0.000
#> GSM1105443     2  0.6014     0.5240 0.000 0.612 0.000 0.140 0.080 0.168
#> GSM1105551     1  0.6538     0.6020 0.548 0.000 0.244 0.008 0.112 0.088
#> GSM1105554     1  0.0291     0.7985 0.992 0.000 0.004 0.004 0.000 0.000
#> GSM1105555     1  0.5625     0.6290 0.648 0.000 0.200 0.004 0.088 0.060
#> GSM1105447     6  0.6735     0.1387 0.000 0.344 0.000 0.124 0.092 0.440
#> GSM1105467     2  0.1829     0.8058 0.000 0.928 0.000 0.008 0.028 0.036
#> GSM1105470     2  0.0146     0.8303 0.000 0.996 0.000 0.004 0.000 0.000
#> GSM1105471     6  0.5616     0.5596 0.000 0.080 0.012 0.176 0.064 0.668
#> GSM1105474     2  0.0146     0.8298 0.000 0.996 0.004 0.000 0.000 0.000
#> GSM1105475     2  0.3527     0.7383 0.000 0.828 0.004 0.104 0.040 0.024
#> GSM1105440     1  0.5307     0.7152 0.700 0.000 0.152 0.012 0.052 0.084
#> GSM1105488     5  0.3288     0.8880 0.000 0.276 0.000 0.000 0.724 0.000
#> GSM1105489     1  0.4850     0.7412 0.740 0.000 0.100 0.004 0.096 0.060
#> GSM1105492     1  0.2372     0.7973 0.908 0.000 0.024 0.008 0.024 0.036
#> GSM1105493     1  0.4368     0.5348 0.712 0.000 0.224 0.004 0.056 0.004
#> GSM1105497     5  0.3835     0.7350 0.000 0.060 0.000 0.004 0.772 0.164
#> GSM1105500     4  0.3735     0.7020 0.000 0.004 0.024 0.800 0.144 0.028
#> GSM1105501     4  0.1003     0.7396 0.000 0.028 0.004 0.964 0.004 0.000
#> GSM1105508     4  0.6170     0.4479 0.072 0.000 0.252 0.592 0.024 0.060
#> GSM1105444     2  0.1074     0.8111 0.000 0.960 0.000 0.000 0.028 0.012
#> GSM1105513     4  0.5586     0.4273 0.000 0.032 0.008 0.616 0.080 0.264
#> GSM1105516     4  0.4393     0.6951 0.080 0.004 0.052 0.788 0.068 0.008
#> GSM1105520     6  0.4180     0.6916 0.000 0.000 0.116 0.100 0.016 0.768
#> GSM1105524     1  0.4764     0.7176 0.728 0.000 0.172 0.008 0.036 0.056
#> GSM1105536     4  0.3233     0.7220 0.000 0.036 0.020 0.848 0.092 0.004
#> GSM1105537     1  0.4764     0.7176 0.728 0.000 0.172 0.008 0.036 0.056
#> GSM1105540     4  0.3792     0.7050 0.016 0.000 0.108 0.816 0.040 0.020
#> GSM1105544     4  0.3767     0.7059 0.000 0.004 0.028 0.804 0.132 0.032
#> GSM1105445     6  0.5525     0.5579 0.000 0.056 0.012 0.172 0.084 0.676
#> GSM1105553     6  0.4218     0.6761 0.000 0.000 0.108 0.064 0.048 0.780
#> GSM1105556     1  0.0551     0.7966 0.984 0.000 0.004 0.004 0.008 0.000
#> GSM1105557     4  0.4166     0.6462 0.000 0.028 0.008 0.784 0.052 0.128
#> GSM1105449     2  0.3466     0.7443 0.000 0.816 0.000 0.004 0.084 0.096
#> GSM1105469     4  0.1067     0.7395 0.004 0.004 0.024 0.964 0.000 0.004
#> GSM1105472     2  0.0000     0.8308 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1105473     3  0.5819     0.3832 0.360 0.000 0.524 0.024 0.084 0.008
#> GSM1105476     2  0.0146     0.8298 0.000 0.996 0.004 0.000 0.000 0.000
#> GSM1105477     4  0.3728     0.7086 0.000 0.040 0.024 0.816 0.112 0.008
#> GSM1105478     4  0.5729     0.1743 0.000 0.016 0.008 0.520 0.088 0.368
#> GSM1105510     5  0.3368     0.8824 0.000 0.232 0.000 0.012 0.756 0.000
#> GSM1105530     3  0.2726     0.6809 0.136 0.000 0.848 0.008 0.000 0.008
#> GSM1105539     3  0.2624     0.6760 0.148 0.000 0.844 0.000 0.004 0.004
#> GSM1105480     4  0.4172     0.6385 0.000 0.012 0.008 0.764 0.052 0.164
#> GSM1105512     1  0.2214     0.7454 0.892 0.000 0.092 0.004 0.012 0.000
#> GSM1105532     3  0.2726     0.6809 0.136 0.000 0.848 0.008 0.000 0.008
#> GSM1105541     3  0.2624     0.6760 0.148 0.000 0.844 0.000 0.004 0.004
#> GSM1105439     2  0.5879     0.5452 0.000 0.628 0.000 0.152 0.076 0.144
#> GSM1105463     3  0.4153     0.5406 0.000 0.000 0.712 0.020 0.020 0.248
#> GSM1105482     1  0.1668     0.7909 0.928 0.000 0.008 0.000 0.060 0.004
#> GSM1105483     4  0.1148     0.7390 0.000 0.016 0.020 0.960 0.000 0.004
#> GSM1105494     6  0.5702     0.1971 0.000 0.008 0.012 0.376 0.092 0.512
#> GSM1105503     6  0.4829     0.6206 0.000 0.000 0.196 0.096 0.016 0.692
#> GSM1105507     4  0.4542     0.6708 0.092 0.000 0.104 0.764 0.028 0.012
#> GSM1105446     2  0.2964     0.5499 0.000 0.792 0.004 0.000 0.204 0.000
#> GSM1105519     1  0.3920     0.6326 0.784 0.000 0.148 0.040 0.028 0.000
#> GSM1105526     4  0.2544     0.7341 0.000 0.016 0.016 0.888 0.076 0.004
#> GSM1105527     4  0.2878     0.7026 0.000 0.020 0.008 0.876 0.028 0.068
#> GSM1105531     3  0.4513     0.4636 0.000 0.000 0.652 0.020 0.024 0.304
#> GSM1105543     2  0.2964     0.5503 0.000 0.792 0.004 0.000 0.204 0.000
#> GSM1105546     1  0.3332     0.7877 0.848 0.000 0.036 0.004 0.076 0.036
#> GSM1105547     1  0.1349     0.7933 0.940 0.000 0.004 0.000 0.056 0.000
#> GSM1105455     2  0.5711     0.5638 0.000 0.648 0.000 0.144 0.076 0.132
#> GSM1105458     2  0.6597    -0.0215 0.000 0.408 0.000 0.092 0.100 0.400
#> GSM1105459     2  0.0000     0.8308 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1105462     3  0.4927     0.5833 0.000 0.000 0.700 0.100 0.028 0.172
#> GSM1105441     2  0.3264     0.7567 0.000 0.840 0.000 0.012 0.072 0.076
#> GSM1105465     5  0.4008     0.7866 0.000 0.100 0.000 0.004 0.768 0.128
#> GSM1105484     5  0.3426     0.8864 0.000 0.276 0.000 0.000 0.720 0.004
#> GSM1105485     5  0.3394     0.8814 0.000 0.236 0.000 0.012 0.752 0.000
#> GSM1105496     6  0.4739     0.6613 0.000 0.000 0.120 0.076 0.064 0.740
#> GSM1105505     3  0.4843     0.3780 0.000 0.000 0.592 0.028 0.024 0.356
#> GSM1105509     4  0.5914     0.4497 0.204 0.000 0.172 0.592 0.028 0.004
#> GSM1105448     2  0.0458     0.8192 0.000 0.984 0.000 0.000 0.016 0.000
#> GSM1105521     1  0.3783     0.6347 0.788 0.000 0.156 0.028 0.028 0.000
#> GSM1105528     5  0.3309     0.8848 0.000 0.280 0.000 0.000 0.720 0.000
#> GSM1105529     5  0.3288     0.8880 0.000 0.276 0.000 0.000 0.724 0.000
#> GSM1105533     3  0.5556     0.2602 0.296 0.000 0.596 0.004 0.040 0.064
#> GSM1105545     4  0.2100     0.7403 0.000 0.032 0.016 0.916 0.036 0.000
#> GSM1105548     1  0.4524     0.7621 0.764 0.000 0.060 0.004 0.112 0.060
#> GSM1105549     1  0.2094     0.7848 0.908 0.000 0.024 0.000 0.064 0.004
#> GSM1105457     4  0.5055     0.5667 0.000 0.032 0.008 0.700 0.076 0.184
#> GSM1105460     2  0.6134     0.4980 0.000 0.596 0.000 0.176 0.080 0.148
#> GSM1105461     2  0.0000     0.8308 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1105464     3  0.3122     0.6756 0.160 0.000 0.816 0.020 0.004 0.000
#> GSM1105466     4  0.4827     0.5897 0.000 0.028 0.008 0.724 0.076 0.164
#> GSM1105479     6  0.6661     0.4284 0.000 0.196 0.004 0.188 0.080 0.532
#> GSM1105502     3  0.2967     0.6569 0.136 0.000 0.840 0.008 0.004 0.012
#> GSM1105515     1  0.0551     0.7966 0.984 0.000 0.004 0.004 0.008 0.000
#> GSM1105523     3  0.4384     0.5934 0.000 0.000 0.744 0.112 0.012 0.132
#> GSM1105550     4  0.3627     0.6352 0.000 0.004 0.216 0.760 0.016 0.004
#> GSM1105450     2  0.0000     0.8308 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1105451     2  0.0000     0.8308 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1105454     6  0.4473     0.6945 0.000 0.020 0.108 0.064 0.032 0.776
#> GSM1105468     2  0.0000     0.8308 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1105481     6  0.4509     0.6271 0.000 0.004 0.168 0.040 0.044 0.744
#> GSM1105504     3  0.4125     0.5564 0.000 0.000 0.724 0.028 0.016 0.232
#> GSM1105517     4  0.5169     0.5564 0.084 0.000 0.212 0.672 0.028 0.004
#> GSM1105525     3  0.2658     0.6644 0.004 0.000 0.888 0.052 0.016 0.040
#> GSM1105552     3  0.6418     0.5994 0.112 0.000 0.632 0.128 0.068 0.060
#> GSM1105452     5  0.3309     0.8848 0.000 0.280 0.000 0.000 0.720 0.000
#> GSM1105453     2  0.0000     0.8308 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1105456     6  0.4473     0.6945 0.000 0.020 0.108 0.064 0.032 0.776

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) other(p) time(p) individual(p) k
#> CV:kmeans 116  0.99217 0.372704   0.705       0.00698 2
#> CV:kmeans  91  0.17880 0.409088   0.996       0.00766 3
#> CV:kmeans  85  0.05088 0.940400   0.988       0.02754 4
#> CV:kmeans  87  0.00942 0.274096   0.377       0.01277 5
#> CV:kmeans 105  0.53843 0.000411   0.577       0.00156 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 44956 rows and 120 columns.
#>   Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'CV' method.
#>   Subgroups are detected by 'skmeans' method.
#>   Performed in total 1250 partitions by row resampling.
#>   Best k for subgroups seems to be 2.
#> 
#> Following methods can be applied to this 'ConsensusPartition' object:
#>  [1] "cola_report"             "collect_classes"         "collect_plots"          
#>  [4] "collect_stats"           "colnames"                "compare_signatures"     
#>  [7] "consensus_heatmap"       "dimension_reduction"     "functional_enrichment"  
#> [10] "get_anno_col"            "get_anno"                "get_classes"            
#> [13] "get_consensus"           "get_matrix"              "get_membership"         
#> [16] "get_param"               "get_signatures"          "get_stats"              
#> [19] "is_best_k"               "is_stable_k"             "membership_heatmap"     
#> [22] "ncol"                    "nrow"                    "plot_ecdf"              
#> [25] "rownames"                "select_partition_number" "show"                   
#> [28] "suggest_best_k"          "test_to_known_factors"

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

collect_plots(res)

plot of chunk CV-skmeans-collect-plots

The plots are:

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

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

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

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

select_partition_number(res)

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

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

get_stats(res)
#>   k 1-PAC mean_silhouette concordance area_increased  Rand Jaccard
#> 2 2 0.884           0.921       0.968         0.4996 0.501   0.501
#> 3 3 0.703           0.798       0.889         0.3114 0.792   0.603
#> 4 4 0.710           0.729       0.873         0.1141 0.863   0.633
#> 5 5 0.737           0.714       0.831         0.0701 0.904   0.677
#> 6 6 0.797           0.775       0.874         0.0501 0.922   0.684

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

suggest_best_k(res)
#> [1] 2

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

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

show/hide code output

cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#>            class entropy silhouette    p1    p2
#> GSM1105438     2  0.0000     0.9663 0.000 1.000
#> GSM1105486     2  0.0000     0.9663 0.000 1.000
#> GSM1105487     1  0.0000     0.9638 1.000 0.000
#> GSM1105490     2  0.0000     0.9663 0.000 1.000
#> GSM1105491     1  0.9998    -0.0152 0.508 0.492
#> GSM1105495     2  0.7219     0.7517 0.200 0.800
#> GSM1105498     2  0.9710     0.3543 0.400 0.600
#> GSM1105499     1  0.0000     0.9638 1.000 0.000
#> GSM1105506     2  0.0000     0.9663 0.000 1.000
#> GSM1105442     2  0.0000     0.9663 0.000 1.000
#> GSM1105511     2  0.0000     0.9663 0.000 1.000
#> GSM1105514     2  0.0000     0.9663 0.000 1.000
#> GSM1105518     2  0.2948     0.9218 0.052 0.948
#> GSM1105522     1  0.0000     0.9638 1.000 0.000
#> GSM1105534     1  0.0000     0.9638 1.000 0.000
#> GSM1105535     1  0.0000     0.9638 1.000 0.000
#> GSM1105538     1  0.0000     0.9638 1.000 0.000
#> GSM1105542     2  0.0000     0.9663 0.000 1.000
#> GSM1105443     2  0.0000     0.9663 0.000 1.000
#> GSM1105551     1  0.0000     0.9638 1.000 0.000
#> GSM1105554     1  0.0000     0.9638 1.000 0.000
#> GSM1105555     1  0.0000     0.9638 1.000 0.000
#> GSM1105447     2  0.0000     0.9663 0.000 1.000
#> GSM1105467     2  0.0000     0.9663 0.000 1.000
#> GSM1105470     2  0.0000     0.9663 0.000 1.000
#> GSM1105471     2  0.0000     0.9663 0.000 1.000
#> GSM1105474     2  0.0000     0.9663 0.000 1.000
#> GSM1105475     2  0.0000     0.9663 0.000 1.000
#> GSM1105440     1  0.0000     0.9638 1.000 0.000
#> GSM1105488     2  0.0000     0.9663 0.000 1.000
#> GSM1105489     1  0.0000     0.9638 1.000 0.000
#> GSM1105492     1  0.0000     0.9638 1.000 0.000
#> GSM1105493     1  0.0000     0.9638 1.000 0.000
#> GSM1105497     2  0.0672     0.9600 0.008 0.992
#> GSM1105500     2  0.0000     0.9663 0.000 1.000
#> GSM1105501     2  0.0000     0.9663 0.000 1.000
#> GSM1105508     1  0.0000     0.9638 1.000 0.000
#> GSM1105444     2  0.0000     0.9663 0.000 1.000
#> GSM1105513     2  0.0000     0.9663 0.000 1.000
#> GSM1105516     1  0.7219     0.7447 0.800 0.200
#> GSM1105520     2  0.9286     0.4943 0.344 0.656
#> GSM1105524     1  0.0000     0.9638 1.000 0.000
#> GSM1105536     2  0.0000     0.9663 0.000 1.000
#> GSM1105537     1  0.0000     0.9638 1.000 0.000
#> GSM1105540     1  0.0000     0.9638 1.000 0.000
#> GSM1105544     1  0.8144     0.6682 0.748 0.252
#> GSM1105445     2  0.0000     0.9663 0.000 1.000
#> GSM1105553     1  0.8499     0.6050 0.724 0.276
#> GSM1105556     1  0.0000     0.9638 1.000 0.000
#> GSM1105557     2  0.0000     0.9663 0.000 1.000
#> GSM1105449     2  0.0000     0.9663 0.000 1.000
#> GSM1105469     1  0.7219     0.7447 0.800 0.200
#> GSM1105472     2  0.0000     0.9663 0.000 1.000
#> GSM1105473     1  0.0000     0.9638 1.000 0.000
#> GSM1105476     2  0.0000     0.9663 0.000 1.000
#> GSM1105477     2  0.0000     0.9663 0.000 1.000
#> GSM1105478     2  0.0000     0.9663 0.000 1.000
#> GSM1105510     2  0.0000     0.9663 0.000 1.000
#> GSM1105530     1  0.0000     0.9638 1.000 0.000
#> GSM1105539     1  0.0000     0.9638 1.000 0.000
#> GSM1105480     2  0.0000     0.9663 0.000 1.000
#> GSM1105512     1  0.0000     0.9638 1.000 0.000
#> GSM1105532     1  0.0000     0.9638 1.000 0.000
#> GSM1105541     1  0.0000     0.9638 1.000 0.000
#> GSM1105439     2  0.0000     0.9663 0.000 1.000
#> GSM1105463     1  0.0000     0.9638 1.000 0.000
#> GSM1105482     1  0.0000     0.9638 1.000 0.000
#> GSM1105483     2  0.9552     0.3718 0.376 0.624
#> GSM1105494     2  0.0000     0.9663 0.000 1.000
#> GSM1105503     1  0.9170     0.4881 0.668 0.332
#> GSM1105507     1  0.2948     0.9169 0.948 0.052
#> GSM1105446     2  0.0000     0.9663 0.000 1.000
#> GSM1105519     1  0.0000     0.9638 1.000 0.000
#> GSM1105526     2  0.0000     0.9663 0.000 1.000
#> GSM1105527     2  0.0000     0.9663 0.000 1.000
#> GSM1105531     1  0.0000     0.9638 1.000 0.000
#> GSM1105543     2  0.0000     0.9663 0.000 1.000
#> GSM1105546     1  0.0000     0.9638 1.000 0.000
#> GSM1105547     1  0.0000     0.9638 1.000 0.000
#> GSM1105455     2  0.0000     0.9663 0.000 1.000
#> GSM1105458     2  0.0000     0.9663 0.000 1.000
#> GSM1105459     2  0.0000     0.9663 0.000 1.000
#> GSM1105462     1  0.0000     0.9638 1.000 0.000
#> GSM1105441     2  0.0000     0.9663 0.000 1.000
#> GSM1105465     2  0.3274     0.9141 0.060 0.940
#> GSM1105484     2  0.0000     0.9663 0.000 1.000
#> GSM1105485     2  0.1843     0.9423 0.028 0.972
#> GSM1105496     1  0.0000     0.9638 1.000 0.000
#> GSM1105505     1  0.0000     0.9638 1.000 0.000
#> GSM1105509     1  0.0000     0.9638 1.000 0.000
#> GSM1105448     2  0.0000     0.9663 0.000 1.000
#> GSM1105521     1  0.0000     0.9638 1.000 0.000
#> GSM1105528     2  0.0000     0.9663 0.000 1.000
#> GSM1105529     2  0.0000     0.9663 0.000 1.000
#> GSM1105533     1  0.0000     0.9638 1.000 0.000
#> GSM1105545     2  0.0000     0.9663 0.000 1.000
#> GSM1105548     1  0.0000     0.9638 1.000 0.000
#> GSM1105549     1  0.0000     0.9638 1.000 0.000
#> GSM1105457     2  0.0000     0.9663 0.000 1.000
#> GSM1105460     2  0.0000     0.9663 0.000 1.000
#> GSM1105461     2  0.0000     0.9663 0.000 1.000
#> GSM1105464     1  0.0000     0.9638 1.000 0.000
#> GSM1105466     2  0.0000     0.9663 0.000 1.000
#> GSM1105479     2  0.0000     0.9663 0.000 1.000
#> GSM1105502     1  0.0000     0.9638 1.000 0.000
#> GSM1105515     1  0.0000     0.9638 1.000 0.000
#> GSM1105523     1  0.0000     0.9638 1.000 0.000
#> GSM1105550     1  0.0000     0.9638 1.000 0.000
#> GSM1105450     2  0.0000     0.9663 0.000 1.000
#> GSM1105451     2  0.0000     0.9663 0.000 1.000
#> GSM1105454     2  0.7219     0.7517 0.200 0.800
#> GSM1105468     2  0.0000     0.9663 0.000 1.000
#> GSM1105481     2  0.7219     0.7517 0.200 0.800
#> GSM1105504     1  0.0000     0.9638 1.000 0.000
#> GSM1105517     1  0.0000     0.9638 1.000 0.000
#> GSM1105525     1  0.0000     0.9638 1.000 0.000
#> GSM1105552     1  0.0000     0.9638 1.000 0.000
#> GSM1105452     2  0.0000     0.9663 0.000 1.000
#> GSM1105453     2  0.0000     0.9663 0.000 1.000
#> GSM1105456     2  0.7219     0.7517 0.200 0.800

show/hide code output

cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#>            class entropy silhouette    p1    p2    p3
#> GSM1105438     2  0.0000     0.9213 0.000 1.000 0.000
#> GSM1105486     2  0.0000     0.9213 0.000 1.000 0.000
#> GSM1105487     1  0.0000     0.9130 1.000 0.000 0.000
#> GSM1105490     3  0.6126     0.6290 0.000 0.400 0.600
#> GSM1105491     2  0.6126     0.3556 0.000 0.600 0.400
#> GSM1105495     2  0.6140     0.3494 0.000 0.596 0.404
#> GSM1105498     3  0.0237     0.7017 0.000 0.004 0.996
#> GSM1105499     1  0.0000     0.9130 1.000 0.000 0.000
#> GSM1105506     3  0.6126     0.6290 0.000 0.400 0.600
#> GSM1105442     2  0.5216     0.5818 0.000 0.740 0.260
#> GSM1105511     3  0.6126     0.6290 0.000 0.400 0.600
#> GSM1105514     2  0.0000     0.9213 0.000 1.000 0.000
#> GSM1105518     3  0.0237     0.7017 0.000 0.004 0.996
#> GSM1105522     1  0.0000     0.9130 1.000 0.000 0.000
#> GSM1105534     1  0.0000     0.9130 1.000 0.000 0.000
#> GSM1105535     1  0.0000     0.9130 1.000 0.000 0.000
#> GSM1105538     1  0.0000     0.9130 1.000 0.000 0.000
#> GSM1105542     2  0.0237     0.9203 0.000 0.996 0.004
#> GSM1105443     3  0.6126     0.6290 0.000 0.400 0.600
#> GSM1105551     1  0.2959     0.8862 0.900 0.000 0.100
#> GSM1105554     1  0.0000     0.9130 1.000 0.000 0.000
#> GSM1105555     1  0.3551     0.8746 0.868 0.000 0.132
#> GSM1105447     3  0.6079     0.6353 0.000 0.388 0.612
#> GSM1105467     2  0.0000     0.9213 0.000 1.000 0.000
#> GSM1105470     2  0.0000     0.9213 0.000 1.000 0.000
#> GSM1105471     3  0.0237     0.7017 0.000 0.004 0.996
#> GSM1105474     2  0.0000     0.9213 0.000 1.000 0.000
#> GSM1105475     2  0.0424     0.9145 0.000 0.992 0.008
#> GSM1105440     1  0.0000     0.9130 1.000 0.000 0.000
#> GSM1105488     2  0.0237     0.9203 0.000 0.996 0.004
#> GSM1105489     1  0.2959     0.8862 0.900 0.000 0.100
#> GSM1105492     1  0.0000     0.9130 1.000 0.000 0.000
#> GSM1105493     1  0.3551     0.8746 0.868 0.000 0.132
#> GSM1105497     2  0.6126     0.3556 0.000 0.600 0.400
#> GSM1105500     2  0.0237     0.9203 0.000 0.996 0.004
#> GSM1105501     2  0.4291     0.6351 0.000 0.820 0.180
#> GSM1105508     1  0.0000     0.9130 1.000 0.000 0.000
#> GSM1105444     2  0.0000     0.9213 0.000 1.000 0.000
#> GSM1105513     3  0.6126     0.6290 0.000 0.400 0.600
#> GSM1105516     1  0.2625     0.8440 0.916 0.084 0.000
#> GSM1105520     3  0.0237     0.7017 0.000 0.004 0.996
#> GSM1105524     1  0.0000     0.9130 1.000 0.000 0.000
#> GSM1105536     2  0.0000     0.9213 0.000 1.000 0.000
#> GSM1105537     1  0.0000     0.9130 1.000 0.000 0.000
#> GSM1105540     1  0.0000     0.9130 1.000 0.000 0.000
#> GSM1105544     1  0.5276     0.7488 0.820 0.052 0.128
#> GSM1105445     3  0.0237     0.7017 0.000 0.004 0.996
#> GSM1105553     3  0.0000     0.6997 0.000 0.000 1.000
#> GSM1105556     1  0.0000     0.9130 1.000 0.000 0.000
#> GSM1105557     3  0.6126     0.6290 0.000 0.400 0.600
#> GSM1105449     2  0.0892     0.9024 0.000 0.980 0.020
#> GSM1105469     3  0.6154     0.3165 0.408 0.000 0.592
#> GSM1105472     2  0.0000     0.9213 0.000 1.000 0.000
#> GSM1105473     1  0.3551     0.8746 0.868 0.000 0.132
#> GSM1105476     2  0.0000     0.9213 0.000 1.000 0.000
#> GSM1105477     2  0.0237     0.9203 0.000 0.996 0.004
#> GSM1105478     3  0.0592     0.7021 0.000 0.012 0.988
#> GSM1105510     2  0.0237     0.9203 0.000 0.996 0.004
#> GSM1105530     1  0.3551     0.8746 0.868 0.000 0.132
#> GSM1105539     1  0.3551     0.8746 0.868 0.000 0.132
#> GSM1105480     3  0.5650     0.6638 0.000 0.312 0.688
#> GSM1105512     1  0.0000     0.9130 1.000 0.000 0.000
#> GSM1105532     1  0.3551     0.8746 0.868 0.000 0.132
#> GSM1105541     1  0.3551     0.8746 0.868 0.000 0.132
#> GSM1105439     3  0.6126     0.6290 0.000 0.400 0.600
#> GSM1105463     1  0.6111     0.5853 0.604 0.000 0.396
#> GSM1105482     1  0.0000     0.9130 1.000 0.000 0.000
#> GSM1105483     3  0.7462     0.6340 0.048 0.352 0.600
#> GSM1105494     3  0.3619     0.6905 0.000 0.136 0.864
#> GSM1105503     3  0.0237     0.7017 0.000 0.004 0.996
#> GSM1105507     1  0.0000     0.9130 1.000 0.000 0.000
#> GSM1105446     2  0.0237     0.9203 0.000 0.996 0.004
#> GSM1105519     1  0.0000     0.9130 1.000 0.000 0.000
#> GSM1105526     2  0.0000     0.9213 0.000 1.000 0.000
#> GSM1105527     3  0.6126     0.6290 0.000 0.400 0.600
#> GSM1105531     1  0.6111     0.5853 0.604 0.000 0.396
#> GSM1105543     2  0.0237     0.9203 0.000 0.996 0.004
#> GSM1105546     1  0.0000     0.9130 1.000 0.000 0.000
#> GSM1105547     1  0.0000     0.9130 1.000 0.000 0.000
#> GSM1105455     3  0.6126     0.6290 0.000 0.400 0.600
#> GSM1105458     2  0.3267     0.8007 0.000 0.884 0.116
#> GSM1105459     2  0.0000     0.9213 0.000 1.000 0.000
#> GSM1105462     1  0.6111     0.5853 0.604 0.000 0.396
#> GSM1105441     2  0.0592     0.9107 0.000 0.988 0.012
#> GSM1105465     2  0.6126     0.3556 0.000 0.600 0.400
#> GSM1105484     2  0.0237     0.9203 0.000 0.996 0.004
#> GSM1105485     2  0.0237     0.9203 0.000 0.996 0.004
#> GSM1105496     3  0.0424     0.6959 0.008 0.000 0.992
#> GSM1105505     1  0.6111     0.5853 0.604 0.000 0.396
#> GSM1105509     1  0.0000     0.9130 1.000 0.000 0.000
#> GSM1105448     2  0.0000     0.9213 0.000 1.000 0.000
#> GSM1105521     1  0.0000     0.9130 1.000 0.000 0.000
#> GSM1105528     2  0.0237     0.9203 0.000 0.996 0.004
#> GSM1105529     2  0.0237     0.9203 0.000 0.996 0.004
#> GSM1105533     1  0.3551     0.8746 0.868 0.000 0.132
#> GSM1105545     2  0.0000     0.9213 0.000 1.000 0.000
#> GSM1105548     1  0.0000     0.9130 1.000 0.000 0.000
#> GSM1105549     1  0.0000     0.9130 1.000 0.000 0.000
#> GSM1105457     3  0.6126     0.6290 0.000 0.400 0.600
#> GSM1105460     2  0.1031     0.8979 0.000 0.976 0.024
#> GSM1105461     2  0.0000     0.9213 0.000 1.000 0.000
#> GSM1105464     1  0.3551     0.8746 0.868 0.000 0.132
#> GSM1105466     3  0.6126     0.6290 0.000 0.400 0.600
#> GSM1105479     3  0.5835     0.6534 0.000 0.340 0.660
#> GSM1105502     1  0.3551     0.8746 0.868 0.000 0.132
#> GSM1105515     1  0.0000     0.9130 1.000 0.000 0.000
#> GSM1105523     3  0.4002     0.5260 0.160 0.000 0.840
#> GSM1105550     1  0.0000     0.9130 1.000 0.000 0.000
#> GSM1105450     2  0.0000     0.9213 0.000 1.000 0.000
#> GSM1105451     2  0.0000     0.9213 0.000 1.000 0.000
#> GSM1105454     3  0.0237     0.7017 0.000 0.004 0.996
#> GSM1105468     2  0.0000     0.9213 0.000 1.000 0.000
#> GSM1105481     3  0.6252    -0.0081 0.000 0.444 0.556
#> GSM1105504     1  0.6111     0.5853 0.604 0.000 0.396
#> GSM1105517     1  0.0000     0.9130 1.000 0.000 0.000
#> GSM1105525     1  0.3551     0.8746 0.868 0.000 0.132
#> GSM1105552     1  0.3551     0.8746 0.868 0.000 0.132
#> GSM1105452     2  0.0237     0.9203 0.000 0.996 0.004
#> GSM1105453     2  0.0000     0.9213 0.000 1.000 0.000
#> GSM1105456     3  0.0237     0.7017 0.000 0.004 0.996

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>            class entropy silhouette    p1    p2    p3    p4
#> GSM1105438     2  0.3074     0.6509 0.000 0.848 0.000 0.152
#> GSM1105486     2  0.4877     0.4567 0.000 0.592 0.000 0.408
#> GSM1105487     1  0.0336     0.9428 0.992 0.000 0.008 0.000
#> GSM1105490     4  0.0927     0.7951 0.000 0.008 0.016 0.976
#> GSM1105491     2  0.5244    -0.0661 0.000 0.556 0.436 0.008
#> GSM1105495     3  0.1151     0.9344 0.000 0.024 0.968 0.008
#> GSM1105498     3  0.1022     0.9360 0.000 0.000 0.968 0.032
#> GSM1105499     1  0.0000     0.9443 1.000 0.000 0.000 0.000
#> GSM1105506     4  0.0927     0.7951 0.000 0.008 0.016 0.976
#> GSM1105442     2  0.0524     0.6693 0.000 0.988 0.004 0.008
#> GSM1105511     4  0.0927     0.7951 0.000 0.008 0.016 0.976
#> GSM1105514     2  0.2973     0.6543 0.000 0.856 0.000 0.144
#> GSM1105518     3  0.0707     0.9432 0.000 0.000 0.980 0.020
#> GSM1105522     1  0.0000     0.9443 1.000 0.000 0.000 0.000
#> GSM1105534     1  0.0000     0.9443 1.000 0.000 0.000 0.000
#> GSM1105535     1  0.0000     0.9443 1.000 0.000 0.000 0.000
#> GSM1105538     1  0.0000     0.9443 1.000 0.000 0.000 0.000
#> GSM1105542     2  0.0188     0.6726 0.000 0.996 0.004 0.000
#> GSM1105443     4  0.3610     0.6122 0.000 0.200 0.000 0.800
#> GSM1105551     1  0.0707     0.9388 0.980 0.000 0.020 0.000
#> GSM1105554     1  0.0000     0.9443 1.000 0.000 0.000 0.000
#> GSM1105555     1  0.2814     0.8766 0.868 0.000 0.132 0.000
#> GSM1105447     4  0.4817     0.1464 0.000 0.388 0.000 0.612
#> GSM1105467     2  0.4888     0.4486 0.000 0.588 0.000 0.412
#> GSM1105470     2  0.4877     0.4567 0.000 0.592 0.000 0.408
#> GSM1105471     4  0.4866     0.3760 0.000 0.000 0.404 0.596
#> GSM1105474     2  0.4843     0.4772 0.000 0.604 0.000 0.396
#> GSM1105475     4  0.4500     0.3582 0.000 0.316 0.000 0.684
#> GSM1105440     1  0.0000     0.9443 1.000 0.000 0.000 0.000
#> GSM1105488     2  0.0188     0.6726 0.000 0.996 0.004 0.000
#> GSM1105489     1  0.0469     0.9418 0.988 0.000 0.012 0.000
#> GSM1105492     1  0.0000     0.9443 1.000 0.000 0.000 0.000
#> GSM1105493     1  0.2814     0.8766 0.868 0.000 0.132 0.000
#> GSM1105497     2  0.3351     0.5706 0.000 0.844 0.148 0.008
#> GSM1105500     2  0.2944     0.5872 0.000 0.868 0.004 0.128
#> GSM1105501     4  0.0895     0.7874 0.000 0.020 0.004 0.976
#> GSM1105508     1  0.0188     0.9426 0.996 0.000 0.000 0.004
#> GSM1105444     2  0.2921     0.6557 0.000 0.860 0.000 0.140
#> GSM1105513     4  0.1182     0.7941 0.000 0.016 0.016 0.968
#> GSM1105516     1  0.3978     0.7782 0.796 0.012 0.000 0.192
#> GSM1105520     3  0.0592     0.9449 0.000 0.000 0.984 0.016
#> GSM1105524     1  0.0000     0.9443 1.000 0.000 0.000 0.000
#> GSM1105536     2  0.4713     0.4033 0.000 0.640 0.000 0.360
#> GSM1105537     1  0.0000     0.9443 1.000 0.000 0.000 0.000
#> GSM1105540     1  0.0000     0.9443 1.000 0.000 0.000 0.000
#> GSM1105544     2  0.7996     0.0161 0.320 0.400 0.004 0.276
#> GSM1105445     4  0.4431     0.5588 0.000 0.000 0.304 0.696
#> GSM1105553     3  0.0779     0.9438 0.000 0.004 0.980 0.016
#> GSM1105556     1  0.0000     0.9443 1.000 0.000 0.000 0.000
#> GSM1105557     4  0.0927     0.7951 0.000 0.008 0.016 0.976
#> GSM1105449     2  0.4989     0.3169 0.000 0.528 0.000 0.472
#> GSM1105469     4  0.3969     0.5919 0.180 0.000 0.016 0.804
#> GSM1105472     2  0.4843     0.4772 0.000 0.604 0.000 0.396
#> GSM1105473     1  0.2868     0.8744 0.864 0.000 0.136 0.000
#> GSM1105476     2  0.4843     0.4772 0.000 0.604 0.000 0.396
#> GSM1105477     2  0.3219     0.5712 0.000 0.836 0.000 0.164
#> GSM1105478     4  0.2081     0.7611 0.000 0.000 0.084 0.916
#> GSM1105510     2  0.0188     0.6726 0.000 0.996 0.004 0.000
#> GSM1105530     1  0.2973     0.8693 0.856 0.000 0.144 0.000
#> GSM1105539     1  0.3024     0.8656 0.852 0.000 0.148 0.000
#> GSM1105480     4  0.1545     0.7834 0.000 0.008 0.040 0.952
#> GSM1105512     1  0.0000     0.9443 1.000 0.000 0.000 0.000
#> GSM1105532     1  0.2973     0.8693 0.856 0.000 0.144 0.000
#> GSM1105541     1  0.2973     0.8693 0.856 0.000 0.144 0.000
#> GSM1105439     4  0.0592     0.7894 0.000 0.016 0.000 0.984
#> GSM1105463     3  0.0707     0.9401 0.020 0.000 0.980 0.000
#> GSM1105482     1  0.0336     0.9428 0.992 0.000 0.008 0.000
#> GSM1105483     4  0.0927     0.7914 0.008 0.000 0.016 0.976
#> GSM1105494     4  0.3219     0.7026 0.000 0.000 0.164 0.836
#> GSM1105503     3  0.0592     0.9442 0.000 0.000 0.984 0.016
#> GSM1105507     1  0.2408     0.8699 0.896 0.000 0.000 0.104
#> GSM1105446     2  0.0376     0.6730 0.000 0.992 0.004 0.004
#> GSM1105519     1  0.0000     0.9443 1.000 0.000 0.000 0.000
#> GSM1105526     4  0.5155    -0.0801 0.000 0.468 0.004 0.528
#> GSM1105527     4  0.0967     0.7936 0.004 0.004 0.016 0.976
#> GSM1105531     3  0.0707     0.9401 0.020 0.000 0.980 0.000
#> GSM1105543     2  0.0188     0.6729 0.000 0.996 0.000 0.004
#> GSM1105546     1  0.0000     0.9443 1.000 0.000 0.000 0.000
#> GSM1105547     1  0.0000     0.9443 1.000 0.000 0.000 0.000
#> GSM1105455     4  0.0592     0.7894 0.000 0.016 0.000 0.984
#> GSM1105458     4  0.5510    -0.2413 0.000 0.480 0.016 0.504
#> GSM1105459     2  0.4843     0.4772 0.000 0.604 0.000 0.396
#> GSM1105462     3  0.0707     0.9401 0.020 0.000 0.980 0.000
#> GSM1105441     2  0.4981     0.3204 0.000 0.536 0.000 0.464
#> GSM1105465     2  0.3933     0.5174 0.000 0.792 0.200 0.008
#> GSM1105484     2  0.0524     0.6693 0.000 0.988 0.004 0.008
#> GSM1105485     2  0.0188     0.6726 0.000 0.996 0.004 0.000
#> GSM1105496     3  0.0524     0.9444 0.000 0.004 0.988 0.008
#> GSM1105505     3  0.0707     0.9401 0.020 0.000 0.980 0.000
#> GSM1105509     1  0.0188     0.9426 0.996 0.000 0.000 0.004
#> GSM1105448     2  0.2921     0.6557 0.000 0.860 0.000 0.140
#> GSM1105521     1  0.0000     0.9443 1.000 0.000 0.000 0.000
#> GSM1105528     2  0.0000     0.6729 0.000 1.000 0.000 0.000
#> GSM1105529     2  0.0188     0.6726 0.000 0.996 0.004 0.000
#> GSM1105533     1  0.2973     0.8693 0.856 0.000 0.144 0.000
#> GSM1105545     4  0.2216     0.7281 0.000 0.092 0.000 0.908
#> GSM1105548     1  0.0336     0.9428 0.992 0.000 0.008 0.000
#> GSM1105549     1  0.0336     0.9428 0.992 0.000 0.008 0.000
#> GSM1105457     4  0.0927     0.7951 0.000 0.008 0.016 0.976
#> GSM1105460     4  0.4222     0.4912 0.000 0.272 0.000 0.728
#> GSM1105461     2  0.4843     0.4772 0.000 0.604 0.000 0.396
#> GSM1105464     1  0.2973     0.8693 0.856 0.000 0.144 0.000
#> GSM1105466     4  0.0927     0.7951 0.000 0.008 0.016 0.976
#> GSM1105479     4  0.4244     0.6450 0.000 0.160 0.036 0.804
#> GSM1105502     1  0.2973     0.8693 0.856 0.000 0.144 0.000
#> GSM1105515     1  0.0000     0.9443 1.000 0.000 0.000 0.000
#> GSM1105523     3  0.0188     0.9445 0.000 0.000 0.996 0.004
#> GSM1105550     1  0.3032     0.8353 0.868 0.000 0.008 0.124
#> GSM1105450     2  0.4877     0.4567 0.000 0.592 0.000 0.408
#> GSM1105451     2  0.4855     0.4708 0.000 0.600 0.000 0.400
#> GSM1105454     3  0.0817     0.9436 0.000 0.000 0.976 0.024
#> GSM1105468     2  0.4843     0.4772 0.000 0.604 0.000 0.396
#> GSM1105481     3  0.0895     0.9401 0.000 0.004 0.976 0.020
#> GSM1105504     3  0.0707     0.9401 0.020 0.000 0.980 0.000
#> GSM1105517     1  0.0188     0.9435 0.996 0.000 0.004 0.000
#> GSM1105525     3  0.4933     0.1158 0.432 0.000 0.568 0.000
#> GSM1105552     1  0.3172     0.8537 0.840 0.000 0.160 0.000
#> GSM1105452     2  0.0188     0.6726 0.000 0.996 0.004 0.000
#> GSM1105453     2  0.4843     0.4772 0.000 0.604 0.000 0.396
#> GSM1105456     3  0.0817     0.9436 0.000 0.000 0.976 0.024

show/hide code output

cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#>            class entropy silhouette    p1    p2    p3    p4    p5
#> GSM1105438     2  0.0510     0.7675 0.000 0.984 0.000 0.000 0.016
#> GSM1105486     2  0.0162     0.7783 0.000 0.996 0.000 0.004 0.000
#> GSM1105487     1  0.2179     0.8428 0.896 0.000 0.100 0.000 0.004
#> GSM1105490     4  0.1608     0.8670 0.000 0.072 0.000 0.928 0.000
#> GSM1105491     5  0.1364     0.6519 0.000 0.012 0.036 0.000 0.952
#> GSM1105495     3  0.4624     0.7146 0.000 0.000 0.636 0.024 0.340
#> GSM1105498     3  0.6441     0.6114 0.000 0.000 0.504 0.256 0.240
#> GSM1105499     1  0.0162     0.8616 0.996 0.000 0.000 0.004 0.000
#> GSM1105506     4  0.1478     0.8682 0.000 0.064 0.000 0.936 0.000
#> GSM1105442     5  0.2377     0.7899 0.000 0.128 0.000 0.000 0.872
#> GSM1105511     4  0.1478     0.8682 0.000 0.064 0.000 0.936 0.000
#> GSM1105514     2  0.0566     0.7721 0.000 0.984 0.000 0.004 0.012
#> GSM1105518     3  0.5635     0.7437 0.000 0.004 0.636 0.120 0.240
#> GSM1105522     1  0.1356     0.8545 0.956 0.000 0.012 0.028 0.004
#> GSM1105534     1  0.0000     0.8616 1.000 0.000 0.000 0.000 0.000
#> GSM1105535     1  0.0162     0.8617 0.996 0.000 0.000 0.000 0.004
#> GSM1105538     1  0.0000     0.8616 1.000 0.000 0.000 0.000 0.000
#> GSM1105542     5  0.3612     0.8559 0.000 0.268 0.000 0.000 0.732
#> GSM1105443     2  0.3992     0.5363 0.000 0.720 0.000 0.268 0.012
#> GSM1105551     1  0.2411     0.8386 0.884 0.000 0.108 0.000 0.008
#> GSM1105554     1  0.0000     0.8616 1.000 0.000 0.000 0.000 0.000
#> GSM1105555     1  0.3300     0.7911 0.792 0.000 0.204 0.000 0.004
#> GSM1105447     2  0.4680     0.6135 0.000 0.740 0.000 0.128 0.132
#> GSM1105467     2  0.0000     0.7778 0.000 1.000 0.000 0.000 0.000
#> GSM1105470     2  0.0162     0.7783 0.000 0.996 0.000 0.004 0.000
#> GSM1105471     2  0.8141     0.0903 0.000 0.420 0.164 0.180 0.236
#> GSM1105474     2  0.0162     0.7783 0.000 0.996 0.000 0.004 0.000
#> GSM1105475     2  0.1043     0.7653 0.000 0.960 0.000 0.040 0.000
#> GSM1105440     1  0.0162     0.8617 0.996 0.000 0.000 0.000 0.004
#> GSM1105488     5  0.3612     0.8559 0.000 0.268 0.000 0.000 0.732
#> GSM1105489     1  0.2358     0.8403 0.888 0.000 0.104 0.000 0.008
#> GSM1105492     1  0.0000     0.8616 1.000 0.000 0.000 0.000 0.000
#> GSM1105493     1  0.3534     0.7575 0.744 0.000 0.256 0.000 0.000
#> GSM1105497     5  0.1205     0.6996 0.000 0.040 0.004 0.000 0.956
#> GSM1105500     5  0.4141     0.8417 0.000 0.236 0.000 0.028 0.736
#> GSM1105501     4  0.3274     0.7307 0.000 0.220 0.000 0.780 0.000
#> GSM1105508     1  0.0960     0.8594 0.972 0.000 0.008 0.016 0.004
#> GSM1105444     2  0.0794     0.7570 0.000 0.972 0.000 0.000 0.028
#> GSM1105513     4  0.2920     0.8221 0.000 0.132 0.000 0.852 0.016
#> GSM1105516     1  0.3689     0.6615 0.740 0.004 0.000 0.256 0.000
#> GSM1105520     3  0.5484     0.7451 0.000 0.000 0.640 0.120 0.240
#> GSM1105524     1  0.0324     0.8618 0.992 0.000 0.000 0.004 0.004
#> GSM1105536     2  0.6187     0.3210 0.000 0.552 0.000 0.248 0.200
#> GSM1105537     1  0.0162     0.8617 0.996 0.000 0.000 0.000 0.004
#> GSM1105540     1  0.1682     0.8490 0.944 0.000 0.012 0.032 0.012
#> GSM1105544     5  0.5076     0.5706 0.200 0.000 0.000 0.108 0.692
#> GSM1105445     2  0.8369    -0.0794 0.000 0.312 0.144 0.304 0.240
#> GSM1105553     3  0.5531     0.7422 0.000 0.000 0.632 0.120 0.248
#> GSM1105556     1  0.0000     0.8616 1.000 0.000 0.000 0.000 0.000
#> GSM1105557     4  0.1478     0.8682 0.000 0.064 0.000 0.936 0.000
#> GSM1105449     2  0.0798     0.7730 0.000 0.976 0.000 0.008 0.016
#> GSM1105469     4  0.1530     0.8208 0.028 0.008 0.004 0.952 0.008
#> GSM1105472     2  0.0000     0.7778 0.000 1.000 0.000 0.000 0.000
#> GSM1105473     1  0.3730     0.7348 0.712 0.000 0.288 0.000 0.000
#> GSM1105476     2  0.0162     0.7783 0.000 0.996 0.000 0.004 0.000
#> GSM1105477     2  0.5857    -0.3146 0.000 0.460 0.000 0.096 0.444
#> GSM1105478     4  0.3448     0.7511 0.000 0.028 0.036 0.856 0.080
#> GSM1105510     5  0.3612     0.8559 0.000 0.268 0.000 0.000 0.732
#> GSM1105530     1  0.4995     0.6289 0.584 0.000 0.384 0.028 0.004
#> GSM1105539     1  0.5005     0.6233 0.580 0.000 0.388 0.028 0.004
#> GSM1105480     4  0.1195     0.8445 0.000 0.028 0.000 0.960 0.012
#> GSM1105512     1  0.0000     0.8616 1.000 0.000 0.000 0.000 0.000
#> GSM1105532     1  0.4995     0.6289 0.584 0.000 0.384 0.028 0.004
#> GSM1105541     1  0.4995     0.6289 0.584 0.000 0.384 0.028 0.004
#> GSM1105439     2  0.4354     0.3262 0.000 0.624 0.000 0.368 0.008
#> GSM1105463     3  0.0162     0.7239 0.004 0.000 0.996 0.000 0.000
#> GSM1105482     1  0.1478     0.8530 0.936 0.000 0.064 0.000 0.000
#> GSM1105483     4  0.1251     0.8489 0.000 0.036 0.000 0.956 0.008
#> GSM1105494     4  0.5865     0.3537 0.000 0.016 0.112 0.632 0.240
#> GSM1105503     3  0.4411     0.7525 0.000 0.000 0.764 0.120 0.116
#> GSM1105507     1  0.2732     0.7645 0.840 0.000 0.000 0.160 0.000
#> GSM1105446     2  0.4294    -0.3082 0.000 0.532 0.000 0.000 0.468
#> GSM1105519     1  0.0000     0.8616 1.000 0.000 0.000 0.000 0.000
#> GSM1105526     4  0.5475     0.4872 0.000 0.308 0.000 0.604 0.088
#> GSM1105527     4  0.1197     0.8610 0.000 0.048 0.000 0.952 0.000
#> GSM1105531     3  0.0162     0.7271 0.000 0.000 0.996 0.000 0.004
#> GSM1105543     2  0.4161    -0.0488 0.000 0.608 0.000 0.000 0.392
#> GSM1105546     1  0.0162     0.8617 0.996 0.000 0.000 0.000 0.004
#> GSM1105547     1  0.0000     0.8616 1.000 0.000 0.000 0.000 0.000
#> GSM1105455     2  0.4446     0.2599 0.000 0.592 0.000 0.400 0.008
#> GSM1105458     2  0.4083     0.5972 0.000 0.744 0.000 0.028 0.228
#> GSM1105459     2  0.0000     0.7778 0.000 1.000 0.000 0.000 0.000
#> GSM1105462     3  0.0794     0.7118 0.000 0.000 0.972 0.028 0.000
#> GSM1105441     2  0.0693     0.7740 0.000 0.980 0.000 0.008 0.012
#> GSM1105465     5  0.1670     0.7138 0.000 0.052 0.012 0.000 0.936
#> GSM1105484     5  0.3612     0.8559 0.000 0.268 0.000 0.000 0.732
#> GSM1105485     5  0.3612     0.8559 0.000 0.268 0.000 0.000 0.732
#> GSM1105496     3  0.4787     0.7269 0.000 0.000 0.640 0.036 0.324
#> GSM1105505     3  0.0566     0.7303 0.000 0.000 0.984 0.004 0.012
#> GSM1105509     1  0.0404     0.8607 0.988 0.000 0.000 0.012 0.000
#> GSM1105448     2  0.0510     0.7675 0.000 0.984 0.000 0.000 0.016
#> GSM1105521     1  0.0162     0.8616 0.996 0.000 0.000 0.004 0.000
#> GSM1105528     5  0.3612     0.8559 0.000 0.268 0.000 0.000 0.732
#> GSM1105529     5  0.3612     0.8559 0.000 0.268 0.000 0.000 0.732
#> GSM1105533     1  0.4029     0.7126 0.680 0.000 0.316 0.000 0.004
#> GSM1105545     4  0.4327     0.4959 0.000 0.360 0.000 0.632 0.008
#> GSM1105548     1  0.1956     0.8494 0.916 0.000 0.076 0.000 0.008
#> GSM1105549     1  0.1671     0.8508 0.924 0.000 0.076 0.000 0.000
#> GSM1105457     4  0.1830     0.8669 0.000 0.068 0.000 0.924 0.008
#> GSM1105460     2  0.2248     0.7306 0.000 0.900 0.000 0.088 0.012
#> GSM1105461     2  0.0000     0.7778 0.000 1.000 0.000 0.000 0.000
#> GSM1105464     1  0.4846     0.6299 0.588 0.000 0.384 0.028 0.000
#> GSM1105466     4  0.1764     0.8675 0.000 0.064 0.000 0.928 0.008
#> GSM1105479     2  0.6267     0.3279 0.000 0.540 0.000 0.224 0.236
#> GSM1105502     1  0.4530     0.6544 0.612 0.000 0.376 0.008 0.004
#> GSM1105515     1  0.0000     0.8616 1.000 0.000 0.000 0.000 0.000
#> GSM1105523     3  0.2077     0.6808 0.000 0.000 0.908 0.084 0.008
#> GSM1105550     1  0.6609     0.4880 0.520 0.000 0.280 0.188 0.012
#> GSM1105450     2  0.0000     0.7778 0.000 1.000 0.000 0.000 0.000
#> GSM1105451     2  0.0162     0.7783 0.000 0.996 0.000 0.004 0.000
#> GSM1105454     3  0.5709     0.7441 0.000 0.008 0.636 0.116 0.240
#> GSM1105468     2  0.0000     0.7778 0.000 1.000 0.000 0.000 0.000
#> GSM1105481     3  0.4403     0.7623 0.000 0.004 0.724 0.032 0.240
#> GSM1105504     3  0.0000     0.7257 0.000 0.000 1.000 0.000 0.000
#> GSM1105517     1  0.3023     0.8162 0.868 0.000 0.096 0.028 0.008
#> GSM1105525     3  0.4584     0.4757 0.160 0.000 0.752 0.084 0.004
#> GSM1105552     1  0.4264     0.6572 0.620 0.000 0.376 0.000 0.004
#> GSM1105452     5  0.3612     0.8559 0.000 0.268 0.000 0.000 0.732
#> GSM1105453     2  0.0162     0.7783 0.000 0.996 0.000 0.004 0.000
#> GSM1105456     3  0.5709     0.7441 0.000 0.008 0.636 0.116 0.240

show/hide code output

cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#>            class entropy silhouette    p1    p2    p3    p4    p5    p6
#> GSM1105438     2  0.0000     0.8782 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1105486     2  0.0146     0.8776 0.000 0.996 0.000 0.000 0.004 0.000
#> GSM1105487     1  0.3172     0.8069 0.820 0.000 0.152 0.000 0.016 0.012
#> GSM1105490     4  0.0291     0.8913 0.000 0.004 0.000 0.992 0.000 0.004
#> GSM1105491     5  0.1615     0.9083 0.000 0.004 0.004 0.000 0.928 0.064
#> GSM1105495     6  0.1049     0.8309 0.000 0.000 0.008 0.000 0.032 0.960
#> GSM1105498     6  0.3232     0.7260 0.000 0.000 0.020 0.160 0.008 0.812
#> GSM1105499     1  0.1327     0.8637 0.936 0.000 0.064 0.000 0.000 0.000
#> GSM1105506     4  0.0146     0.8909 0.000 0.000 0.000 0.996 0.000 0.004
#> GSM1105442     5  0.1434     0.9204 0.000 0.012 0.000 0.000 0.940 0.048
#> GSM1105511     4  0.0603     0.8869 0.000 0.000 0.016 0.980 0.004 0.000
#> GSM1105514     2  0.0146     0.8776 0.000 0.996 0.000 0.000 0.004 0.000
#> GSM1105518     6  0.0665     0.8431 0.000 0.004 0.008 0.008 0.000 0.980
#> GSM1105522     1  0.2982     0.7985 0.828 0.000 0.152 0.000 0.012 0.008
#> GSM1105534     1  0.0363     0.8682 0.988 0.000 0.012 0.000 0.000 0.000
#> GSM1105535     1  0.2002     0.8551 0.908 0.000 0.076 0.000 0.012 0.004
#> GSM1105538     1  0.0363     0.8680 0.988 0.000 0.000 0.000 0.012 0.000
#> GSM1105542     5  0.1204     0.9429 0.000 0.056 0.000 0.000 0.944 0.000
#> GSM1105443     2  0.3010     0.7741 0.000 0.836 0.004 0.132 0.028 0.000
#> GSM1105551     1  0.3352     0.7953 0.800 0.000 0.172 0.000 0.016 0.012
#> GSM1105554     1  0.0458     0.8676 0.984 0.000 0.016 0.000 0.000 0.000
#> GSM1105555     1  0.3394     0.6745 0.752 0.000 0.236 0.000 0.000 0.012
#> GSM1105447     2  0.3960     0.7135 0.000 0.784 0.004 0.032 0.028 0.152
#> GSM1105467     2  0.0146     0.8772 0.000 0.996 0.000 0.000 0.004 0.000
#> GSM1105470     2  0.0000     0.8782 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1105471     6  0.5406     0.2788 0.000 0.384 0.012 0.084 0.000 0.520
#> GSM1105474     2  0.0146     0.8776 0.000 0.996 0.000 0.000 0.004 0.000
#> GSM1105475     2  0.0291     0.8774 0.000 0.992 0.000 0.004 0.004 0.000
#> GSM1105440     1  0.1858     0.8590 0.924 0.000 0.052 0.000 0.012 0.012
#> GSM1105488     5  0.1204     0.9429 0.000 0.056 0.000 0.000 0.944 0.000
#> GSM1105489     1  0.2758     0.8189 0.860 0.000 0.112 0.000 0.016 0.012
#> GSM1105492     1  0.0146     0.8683 0.996 0.000 0.000 0.000 0.000 0.004
#> GSM1105493     1  0.3717     0.3054 0.616 0.000 0.384 0.000 0.000 0.000
#> GSM1105497     5  0.1349     0.9147 0.000 0.004 0.000 0.000 0.940 0.056
#> GSM1105500     5  0.3116     0.8918 0.000 0.060 0.020 0.032 0.868 0.020
#> GSM1105501     4  0.2789     0.8207 0.000 0.088 0.044 0.864 0.004 0.000
#> GSM1105508     1  0.2326     0.8466 0.888 0.000 0.092 0.000 0.012 0.008
#> GSM1105444     2  0.0146     0.8774 0.000 0.996 0.004 0.000 0.000 0.000
#> GSM1105513     4  0.3934     0.7149 0.000 0.136 0.000 0.788 0.028 0.048
#> GSM1105516     1  0.4424     0.6506 0.720 0.004 0.060 0.208 0.008 0.000
#> GSM1105520     6  0.0603     0.8410 0.000 0.000 0.016 0.004 0.000 0.980
#> GSM1105524     1  0.2002     0.8551 0.908 0.000 0.076 0.000 0.012 0.004
#> GSM1105536     2  0.6695     0.2799 0.000 0.504 0.100 0.256 0.140 0.000
#> GSM1105537     1  0.2002     0.8551 0.908 0.000 0.076 0.000 0.012 0.004
#> GSM1105540     1  0.4634     0.6652 0.696 0.000 0.244 0.016 0.024 0.020
#> GSM1105544     5  0.6255     0.5980 0.136 0.000 0.088 0.100 0.640 0.036
#> GSM1105445     6  0.5583     0.5625 0.000 0.172 0.004 0.156 0.028 0.640
#> GSM1105553     6  0.1036     0.8285 0.008 0.000 0.024 0.000 0.004 0.964
#> GSM1105556     1  0.0458     0.8676 0.984 0.000 0.016 0.000 0.000 0.000
#> GSM1105557     4  0.0291     0.8913 0.000 0.004 0.000 0.992 0.000 0.004
#> GSM1105449     2  0.1003     0.8633 0.000 0.964 0.004 0.004 0.028 0.000
#> GSM1105469     4  0.0508     0.8881 0.000 0.000 0.012 0.984 0.004 0.000
#> GSM1105472     2  0.0000     0.8782 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1105473     3  0.3847     0.2703 0.456 0.000 0.544 0.000 0.000 0.000
#> GSM1105476     2  0.0146     0.8776 0.000 0.996 0.000 0.000 0.004 0.000
#> GSM1105477     2  0.6993    -0.0309 0.000 0.404 0.100 0.156 0.340 0.000
#> GSM1105478     4  0.4045     0.6166 0.000 0.004 0.008 0.740 0.032 0.216
#> GSM1105510     5  0.1204     0.9429 0.000 0.056 0.000 0.000 0.944 0.000
#> GSM1105530     3  0.2178     0.7974 0.132 0.000 0.868 0.000 0.000 0.000
#> GSM1105539     3  0.2191     0.8004 0.120 0.000 0.876 0.000 0.000 0.004
#> GSM1105480     4  0.2118     0.8538 0.000 0.004 0.012 0.916 0.020 0.048
#> GSM1105512     1  0.0935     0.8676 0.964 0.000 0.032 0.000 0.004 0.000
#> GSM1105532     3  0.2178     0.7974 0.132 0.000 0.868 0.000 0.000 0.000
#> GSM1105541     3  0.2135     0.7980 0.128 0.000 0.872 0.000 0.000 0.000
#> GSM1105439     2  0.3280     0.7457 0.000 0.808 0.004 0.160 0.028 0.000
#> GSM1105463     3  0.3288     0.6683 0.000 0.000 0.724 0.000 0.000 0.276
#> GSM1105482     1  0.1714     0.8419 0.908 0.000 0.092 0.000 0.000 0.000
#> GSM1105483     4  0.0603     0.8869 0.000 0.000 0.016 0.980 0.004 0.000
#> GSM1105494     6  0.4517     0.4011 0.000 0.004 0.020 0.360 0.008 0.608
#> GSM1105503     6  0.1411     0.8043 0.000 0.000 0.060 0.004 0.000 0.936
#> GSM1105507     1  0.3959     0.7152 0.760 0.000 0.064 0.172 0.004 0.000
#> GSM1105446     2  0.3717     0.3436 0.000 0.616 0.000 0.000 0.384 0.000
#> GSM1105519     1  0.0935     0.8676 0.964 0.000 0.032 0.000 0.004 0.000
#> GSM1105526     4  0.4653     0.7191 0.000 0.136 0.080 0.740 0.044 0.000
#> GSM1105527     4  0.0000     0.8909 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1105531     3  0.3351     0.6563 0.000 0.000 0.712 0.000 0.000 0.288
#> GSM1105543     2  0.3428     0.5152 0.000 0.696 0.000 0.000 0.304 0.000
#> GSM1105546     1  0.1180     0.8651 0.960 0.000 0.016 0.000 0.012 0.012
#> GSM1105547     1  0.0547     0.8675 0.980 0.000 0.020 0.000 0.000 0.000
#> GSM1105455     2  0.2730     0.7352 0.000 0.808 0.000 0.192 0.000 0.000
#> GSM1105458     2  0.2375     0.8184 0.000 0.896 0.004 0.004 0.028 0.068
#> GSM1105459     2  0.0000     0.8782 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1105462     3  0.2854     0.7149 0.000 0.000 0.792 0.000 0.000 0.208
#> GSM1105441     2  0.1003     0.8633 0.000 0.964 0.004 0.004 0.028 0.000
#> GSM1105465     5  0.1349     0.9147 0.000 0.004 0.000 0.000 0.940 0.056
#> GSM1105484     5  0.1204     0.9429 0.000 0.056 0.000 0.000 0.944 0.000
#> GSM1105485     5  0.1204     0.9429 0.000 0.056 0.000 0.000 0.944 0.000
#> GSM1105496     6  0.0547     0.8395 0.000 0.000 0.020 0.000 0.000 0.980
#> GSM1105505     3  0.3843     0.3894 0.000 0.000 0.548 0.000 0.000 0.452
#> GSM1105509     1  0.1843     0.8546 0.912 0.000 0.080 0.004 0.004 0.000
#> GSM1105448     2  0.0146     0.8776 0.000 0.996 0.000 0.000 0.004 0.000
#> GSM1105521     1  0.0935     0.8676 0.964 0.000 0.032 0.000 0.004 0.000
#> GSM1105528     5  0.1387     0.9342 0.000 0.068 0.000 0.000 0.932 0.000
#> GSM1105529     5  0.1204     0.9429 0.000 0.056 0.000 0.000 0.944 0.000
#> GSM1105533     3  0.3741     0.5663 0.320 0.000 0.672 0.000 0.000 0.008
#> GSM1105545     4  0.4584     0.6672 0.000 0.196 0.100 0.700 0.004 0.000
#> GSM1105548     1  0.2518     0.8339 0.880 0.000 0.092 0.000 0.016 0.012
#> GSM1105549     1  0.1765     0.8393 0.904 0.000 0.096 0.000 0.000 0.000
#> GSM1105457     4  0.0405     0.8905 0.000 0.004 0.000 0.988 0.000 0.008
#> GSM1105460     2  0.1116     0.8615 0.000 0.960 0.004 0.008 0.028 0.000
#> GSM1105461     2  0.0000     0.8782 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1105464     3  0.2219     0.7967 0.136 0.000 0.864 0.000 0.000 0.000
#> GSM1105466     4  0.0820     0.8841 0.000 0.016 0.000 0.972 0.012 0.000
#> GSM1105479     2  0.6105    -0.1401 0.000 0.432 0.004 0.112 0.028 0.424
#> GSM1105502     3  0.2697     0.7623 0.188 0.000 0.812 0.000 0.000 0.000
#> GSM1105515     1  0.0458     0.8676 0.984 0.000 0.016 0.000 0.000 0.000
#> GSM1105523     3  0.2981     0.7318 0.000 0.000 0.820 0.020 0.000 0.160
#> GSM1105550     3  0.2558     0.7018 0.104 0.000 0.868 0.028 0.000 0.000
#> GSM1105450     2  0.0000     0.8782 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1105451     2  0.0000     0.8782 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1105454     6  0.0653     0.8429 0.000 0.004 0.012 0.004 0.000 0.980
#> GSM1105468     2  0.0000     0.8782 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1105481     6  0.0937     0.8272 0.000 0.000 0.040 0.000 0.000 0.960
#> GSM1105504     3  0.3198     0.6818 0.000 0.000 0.740 0.000 0.000 0.260
#> GSM1105517     1  0.4222     0.1857 0.516 0.000 0.472 0.008 0.004 0.000
#> GSM1105525     3  0.3346     0.7725 0.056 0.000 0.840 0.024 0.000 0.080
#> GSM1105552     3  0.2454     0.7742 0.160 0.000 0.840 0.000 0.000 0.000
#> GSM1105452     5  0.1204     0.9429 0.000 0.056 0.000 0.000 0.944 0.000
#> GSM1105453     2  0.0146     0.8776 0.000 0.996 0.000 0.000 0.004 0.000
#> GSM1105456     6  0.0653     0.8429 0.000 0.004 0.012 0.004 0.000 0.980

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) other(p) time(p) individual(p) k
#> CV:skmeans 115    1.000  0.73912   0.495      1.08e-02 2
#> CV:skmeans 114    0.923  0.53385   0.117      1.78e-03 3
#> CV:skmeans  96    0.249  0.48482   0.467      1.51e-02 4
#> CV:skmeans 106    0.231  0.81010   0.471      3.98e-03 5
#> CV:skmeans 110    0.262  0.00037   0.524      9.72e-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: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 44956 rows and 120 columns.
#>   Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'CV' method.
#>   Subgroups are detected by 'pam' method.
#>   Performed in total 1250 partitions by row resampling.
#>   Best k for subgroups seems to be 2.
#> 
#> Following methods can be applied to this 'ConsensusPartition' object:
#>  [1] "cola_report"             "collect_classes"         "collect_plots"          
#>  [4] "collect_stats"           "colnames"                "compare_signatures"     
#>  [7] "consensus_heatmap"       "dimension_reduction"     "functional_enrichment"  
#> [10] "get_anno_col"            "get_anno"                "get_classes"            
#> [13] "get_consensus"           "get_matrix"              "get_membership"         
#> [16] "get_param"               "get_signatures"          "get_stats"              
#> [19] "is_best_k"               "is_stable_k"             "membership_heatmap"     
#> [22] "ncol"                    "nrow"                    "plot_ecdf"              
#> [25] "rownames"                "select_partition_number" "show"                   
#> [28] "suggest_best_k"          "test_to_known_factors"

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

collect_plots(res)

plot of chunk CV-pam-collect-plots

The plots are:

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

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

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

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

select_partition_number(res)

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

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

get_stats(res)
#>   k 1-PAC mean_silhouette concordance area_increased  Rand Jaccard
#> 2 2 0.897           0.896       0.962         0.4728 0.523   0.523
#> 3 3 0.703           0.822       0.921         0.3112 0.811   0.655
#> 4 4 0.628           0.715       0.812         0.1607 0.834   0.586
#> 5 5 0.674           0.711       0.803         0.0801 0.925   0.724
#> 6 6 0.715           0.692       0.779         0.0537 0.913   0.637

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
#> GSM1105438     2   0.000     0.9681 0.000 1.000
#> GSM1105486     2   0.000     0.9681 0.000 1.000
#> GSM1105487     1   0.000     0.9421 1.000 0.000
#> GSM1105490     2   0.000     0.9681 0.000 1.000
#> GSM1105491     2   1.000    -0.0778 0.500 0.500
#> GSM1105495     2   0.000     0.9681 0.000 1.000
#> GSM1105498     2   0.000     0.9681 0.000 1.000
#> GSM1105499     1   0.000     0.9421 1.000 0.000
#> GSM1105506     2   0.000     0.9681 0.000 1.000
#> GSM1105442     2   0.000     0.9681 0.000 1.000
#> GSM1105511     2   0.000     0.9681 0.000 1.000
#> GSM1105514     2   0.000     0.9681 0.000 1.000
#> GSM1105518     2   0.000     0.9681 0.000 1.000
#> GSM1105522     1   0.000     0.9421 1.000 0.000
#> GSM1105534     1   0.000     0.9421 1.000 0.000
#> GSM1105535     1   0.000     0.9421 1.000 0.000
#> GSM1105538     1   0.000     0.9421 1.000 0.000
#> GSM1105542     2   0.000     0.9681 0.000 1.000
#> GSM1105443     2   0.000     0.9681 0.000 1.000
#> GSM1105551     1   0.000     0.9421 1.000 0.000
#> GSM1105554     1   0.000     0.9421 1.000 0.000
#> GSM1105555     1   0.000     0.9421 1.000 0.000
#> GSM1105447     2   0.000     0.9681 0.000 1.000
#> GSM1105467     2   0.000     0.9681 0.000 1.000
#> GSM1105470     2   0.000     0.9681 0.000 1.000
#> GSM1105471     2   0.000     0.9681 0.000 1.000
#> GSM1105474     2   0.000     0.9681 0.000 1.000
#> GSM1105475     2   0.000     0.9681 0.000 1.000
#> GSM1105440     1   0.000     0.9421 1.000 0.000
#> GSM1105488     2   0.000     0.9681 0.000 1.000
#> GSM1105489     1   0.000     0.9421 1.000 0.000
#> GSM1105492     1   0.000     0.9421 1.000 0.000
#> GSM1105493     1   0.000     0.9421 1.000 0.000
#> GSM1105497     2   0.000     0.9681 0.000 1.000
#> GSM1105500     2   0.343     0.9014 0.064 0.936
#> GSM1105501     2   0.000     0.9681 0.000 1.000
#> GSM1105508     1   0.000     0.9421 1.000 0.000
#> GSM1105444     2   0.000     0.9681 0.000 1.000
#> GSM1105513     2   0.000     0.9681 0.000 1.000
#> GSM1105516     1   0.881     0.5831 0.700 0.300
#> GSM1105520     2   0.000     0.9681 0.000 1.000
#> GSM1105524     1   0.000     0.9421 1.000 0.000
#> GSM1105536     2   0.000     0.9681 0.000 1.000
#> GSM1105537     1   0.000     0.9421 1.000 0.000
#> GSM1105540     2   1.000    -0.0778 0.500 0.500
#> GSM1105544     2   1.000    -0.0778 0.500 0.500
#> GSM1105445     2   0.000     0.9681 0.000 1.000
#> GSM1105553     2   0.680     0.7489 0.180 0.820
#> GSM1105556     1   0.000     0.9421 1.000 0.000
#> GSM1105557     2   0.000     0.9681 0.000 1.000
#> GSM1105449     2   0.000     0.9681 0.000 1.000
#> GSM1105469     2   0.000     0.9681 0.000 1.000
#> GSM1105472     2   0.000     0.9681 0.000 1.000
#> GSM1105473     1   0.000     0.9421 1.000 0.000
#> GSM1105476     2   0.000     0.9681 0.000 1.000
#> GSM1105477     2   0.000     0.9681 0.000 1.000
#> GSM1105478     2   0.000     0.9681 0.000 1.000
#> GSM1105510     2   0.000     0.9681 0.000 1.000
#> GSM1105530     1   0.000     0.9421 1.000 0.000
#> GSM1105539     1   0.000     0.9421 1.000 0.000
#> GSM1105480     2   0.000     0.9681 0.000 1.000
#> GSM1105512     1   0.000     0.9421 1.000 0.000
#> GSM1105532     1   0.000     0.9421 1.000 0.000
#> GSM1105541     1   0.000     0.9421 1.000 0.000
#> GSM1105439     2   0.000     0.9681 0.000 1.000
#> GSM1105463     1   0.000     0.9421 1.000 0.000
#> GSM1105482     1   0.000     0.9421 1.000 0.000
#> GSM1105483     2   0.000     0.9681 0.000 1.000
#> GSM1105494     2   0.000     0.9681 0.000 1.000
#> GSM1105503     2   0.000     0.9681 0.000 1.000
#> GSM1105507     1   0.242     0.9097 0.960 0.040
#> GSM1105446     2   0.000     0.9681 0.000 1.000
#> GSM1105519     1   0.000     0.9421 1.000 0.000
#> GSM1105526     2   0.000     0.9681 0.000 1.000
#> GSM1105527     2   0.000     0.9681 0.000 1.000
#> GSM1105531     1   0.929     0.5003 0.656 0.344
#> GSM1105543     2   0.000     0.9681 0.000 1.000
#> GSM1105546     1   0.000     0.9421 1.000 0.000
#> GSM1105547     1   0.000     0.9421 1.000 0.000
#> GSM1105455     2   0.000     0.9681 0.000 1.000
#> GSM1105458     2   0.000     0.9681 0.000 1.000
#> GSM1105459     2   0.000     0.9681 0.000 1.000
#> GSM1105462     2   0.000     0.9681 0.000 1.000
#> GSM1105441     2   0.000     0.9681 0.000 1.000
#> GSM1105465     2   0.000     0.9681 0.000 1.000
#> GSM1105484     2   0.000     0.9681 0.000 1.000
#> GSM1105485     2   0.000     0.9681 0.000 1.000
#> GSM1105496     1   1.000     0.0443 0.500 0.500
#> GSM1105505     1   0.981     0.3114 0.580 0.420
#> GSM1105509     1   0.000     0.9421 1.000 0.000
#> GSM1105448     2   0.000     0.9681 0.000 1.000
#> GSM1105521     1   0.000     0.9421 1.000 0.000
#> GSM1105528     2   0.000     0.9681 0.000 1.000
#> GSM1105529     2   0.000     0.9681 0.000 1.000
#> GSM1105533     1   0.000     0.9421 1.000 0.000
#> GSM1105545     2   0.000     0.9681 0.000 1.000
#> GSM1105548     1   0.000     0.9421 1.000 0.000
#> GSM1105549     1   0.000     0.9421 1.000 0.000
#> GSM1105457     2   0.000     0.9681 0.000 1.000
#> GSM1105460     2   0.000     0.9681 0.000 1.000
#> GSM1105461     2   0.000     0.9681 0.000 1.000
#> GSM1105464     1   0.000     0.9421 1.000 0.000
#> GSM1105466     2   0.000     0.9681 0.000 1.000
#> GSM1105479     2   0.000     0.9681 0.000 1.000
#> GSM1105502     1   0.000     0.9421 1.000 0.000
#> GSM1105515     1   0.000     0.9421 1.000 0.000
#> GSM1105523     1   0.932     0.4919 0.652 0.348
#> GSM1105550     2   0.955     0.3459 0.376 0.624
#> GSM1105450     2   0.000     0.9681 0.000 1.000
#> GSM1105451     2   0.000     0.9681 0.000 1.000
#> GSM1105454     2   0.000     0.9681 0.000 1.000
#> GSM1105468     2   0.000     0.9681 0.000 1.000
#> GSM1105481     2   0.000     0.9681 0.000 1.000
#> GSM1105504     1   0.714     0.7432 0.804 0.196
#> GSM1105517     1   0.886     0.5774 0.696 0.304
#> GSM1105525     1   0.000     0.9421 1.000 0.000
#> GSM1105552     1   0.000     0.9421 1.000 0.000
#> GSM1105452     2   0.000     0.9681 0.000 1.000
#> GSM1105453     2   0.000     0.9681 0.000 1.000
#> GSM1105456     2   0.000     0.9681 0.000 1.000

show/hide code output

cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#>            class entropy silhouette    p1    p2    p3
#> GSM1105438     2  0.0424    0.92696 0.000 0.992 0.008
#> GSM1105486     2  0.0000    0.92750 0.000 1.000 0.000
#> GSM1105487     1  0.0000    0.91828 1.000 0.000 0.000
#> GSM1105490     2  0.0424    0.92696 0.000 0.992 0.008
#> GSM1105491     3  0.0424    0.83082 0.008 0.000 0.992
#> GSM1105495     3  0.4887    0.65711 0.000 0.228 0.772
#> GSM1105498     3  0.2537    0.79591 0.000 0.080 0.920
#> GSM1105499     1  0.0000    0.91828 1.000 0.000 0.000
#> GSM1105506     2  0.0000    0.92750 0.000 1.000 0.000
#> GSM1105442     2  0.0592    0.92512 0.000 0.988 0.012
#> GSM1105511     2  0.0000    0.92750 0.000 1.000 0.000
#> GSM1105514     2  0.0000    0.92750 0.000 1.000 0.000
#> GSM1105518     2  0.5098    0.64661 0.000 0.752 0.248
#> GSM1105522     1  0.5591    0.49634 0.696 0.000 0.304
#> GSM1105534     1  0.0000    0.91828 1.000 0.000 0.000
#> GSM1105535     1  0.0000    0.91828 1.000 0.000 0.000
#> GSM1105538     1  0.0000    0.91828 1.000 0.000 0.000
#> GSM1105542     2  0.0000    0.92750 0.000 1.000 0.000
#> GSM1105443     2  0.0424    0.92696 0.000 0.992 0.008
#> GSM1105551     1  0.0237    0.91614 0.996 0.000 0.004
#> GSM1105554     1  0.0000    0.91828 1.000 0.000 0.000
#> GSM1105555     1  0.0237    0.91614 0.996 0.000 0.004
#> GSM1105447     2  0.0424    0.92696 0.000 0.992 0.008
#> GSM1105467     2  0.0000    0.92750 0.000 1.000 0.000
#> GSM1105470     2  0.0000    0.92750 0.000 1.000 0.000
#> GSM1105471     2  0.4452    0.77917 0.000 0.808 0.192
#> GSM1105474     2  0.0000    0.92750 0.000 1.000 0.000
#> GSM1105475     2  0.0000    0.92750 0.000 1.000 0.000
#> GSM1105440     1  0.0000    0.91828 1.000 0.000 0.000
#> GSM1105488     2  0.0000    0.92750 0.000 1.000 0.000
#> GSM1105489     1  0.0237    0.91614 0.996 0.000 0.004
#> GSM1105492     1  0.0000    0.91828 1.000 0.000 0.000
#> GSM1105493     1  0.3816    0.77049 0.852 0.000 0.148
#> GSM1105497     2  0.4654    0.70456 0.000 0.792 0.208
#> GSM1105500     2  0.3038    0.83813 0.000 0.896 0.104
#> GSM1105501     2  0.0000    0.92750 0.000 1.000 0.000
#> GSM1105508     1  0.1163    0.89708 0.972 0.000 0.028
#> GSM1105444     2  0.0424    0.92696 0.000 0.992 0.008
#> GSM1105513     2  0.0424    0.92696 0.000 0.992 0.008
#> GSM1105516     1  0.9795   -0.00795 0.428 0.316 0.256
#> GSM1105520     3  0.0424    0.82902 0.000 0.008 0.992
#> GSM1105524     1  0.0000    0.91828 1.000 0.000 0.000
#> GSM1105536     2  0.4452    0.77917 0.000 0.808 0.192
#> GSM1105537     1  0.0000    0.91828 1.000 0.000 0.000
#> GSM1105540     3  0.5247    0.66650 0.008 0.224 0.768
#> GSM1105544     2  0.5420    0.71048 0.008 0.752 0.240
#> GSM1105445     2  0.0424    0.92696 0.000 0.992 0.008
#> GSM1105553     2  0.5178    0.63173 0.000 0.744 0.256
#> GSM1105556     1  0.0000    0.91828 1.000 0.000 0.000
#> GSM1105557     2  0.0424    0.92696 0.000 0.992 0.008
#> GSM1105449     2  0.0424    0.92696 0.000 0.992 0.008
#> GSM1105469     2  0.4452    0.77917 0.000 0.808 0.192
#> GSM1105472     2  0.0000    0.92750 0.000 1.000 0.000
#> GSM1105473     3  0.6140    0.31396 0.404 0.000 0.596
#> GSM1105476     2  0.0000    0.92750 0.000 1.000 0.000
#> GSM1105477     2  0.4452    0.77917 0.000 0.808 0.192
#> GSM1105478     2  0.3941    0.81303 0.000 0.844 0.156
#> GSM1105510     2  0.0000    0.92750 0.000 1.000 0.000
#> GSM1105530     3  0.0592    0.83019 0.012 0.000 0.988
#> GSM1105539     3  0.0592    0.83019 0.012 0.000 0.988
#> GSM1105480     2  0.4452    0.77917 0.000 0.808 0.192
#> GSM1105512     1  0.0000    0.91828 1.000 0.000 0.000
#> GSM1105532     3  0.0592    0.83019 0.012 0.000 0.988
#> GSM1105541     1  0.6267    0.15703 0.548 0.000 0.452
#> GSM1105439     2  0.0424    0.92696 0.000 0.992 0.008
#> GSM1105463     3  0.0424    0.83082 0.008 0.000 0.992
#> GSM1105482     1  0.0000    0.91828 1.000 0.000 0.000
#> GSM1105483     2  0.4452    0.77917 0.000 0.808 0.192
#> GSM1105494     2  0.0237    0.92622 0.000 0.996 0.004
#> GSM1105503     3  0.0000    0.82881 0.000 0.000 1.000
#> GSM1105507     1  0.7424    0.21846 0.572 0.040 0.388
#> GSM1105446     2  0.0424    0.92696 0.000 0.992 0.008
#> GSM1105519     1  0.1031    0.89889 0.976 0.000 0.024
#> GSM1105526     2  0.4452    0.77917 0.000 0.808 0.192
#> GSM1105527     2  0.4452    0.77917 0.000 0.808 0.192
#> GSM1105531     3  0.0424    0.83082 0.008 0.000 0.992
#> GSM1105543     2  0.0000    0.92750 0.000 1.000 0.000
#> GSM1105546     1  0.0000    0.91828 1.000 0.000 0.000
#> GSM1105547     1  0.0000    0.91828 1.000 0.000 0.000
#> GSM1105455     2  0.0424    0.92696 0.000 0.992 0.008
#> GSM1105458     2  0.0424    0.92696 0.000 0.992 0.008
#> GSM1105459     2  0.0424    0.92696 0.000 0.992 0.008
#> GSM1105462     3  0.5098    0.62715 0.000 0.248 0.752
#> GSM1105441     2  0.0424    0.92696 0.000 0.992 0.008
#> GSM1105465     2  0.5529    0.63155 0.000 0.704 0.296
#> GSM1105484     2  0.0000    0.92750 0.000 1.000 0.000
#> GSM1105485     2  0.4452    0.77917 0.000 0.808 0.192
#> GSM1105496     3  0.1529    0.81101 0.000 0.040 0.960
#> GSM1105505     3  0.0424    0.83082 0.008 0.000 0.992
#> GSM1105509     3  0.6244    0.21914 0.440 0.000 0.560
#> GSM1105448     2  0.0424    0.92696 0.000 0.992 0.008
#> GSM1105521     1  0.0000    0.91828 1.000 0.000 0.000
#> GSM1105528     2  0.0000    0.92750 0.000 1.000 0.000
#> GSM1105529     2  0.4452    0.77917 0.000 0.808 0.192
#> GSM1105533     1  0.0237    0.91604 0.996 0.000 0.004
#> GSM1105545     2  0.4452    0.77917 0.000 0.808 0.192
#> GSM1105548     1  0.2261    0.85979 0.932 0.000 0.068
#> GSM1105549     1  0.0000    0.91828 1.000 0.000 0.000
#> GSM1105457     2  0.0424    0.92696 0.000 0.992 0.008
#> GSM1105460     2  0.0424    0.92696 0.000 0.992 0.008
#> GSM1105461     2  0.0424    0.92696 0.000 0.992 0.008
#> GSM1105464     3  0.1643    0.81386 0.044 0.000 0.956
#> GSM1105466     2  0.0000    0.92750 0.000 1.000 0.000
#> GSM1105479     2  0.0000    0.92750 0.000 1.000 0.000
#> GSM1105502     3  0.6168    0.21971 0.412 0.000 0.588
#> GSM1105515     1  0.0000    0.91828 1.000 0.000 0.000
#> GSM1105523     3  0.0424    0.83082 0.008 0.000 0.992
#> GSM1105550     3  0.6129    0.47054 0.008 0.324 0.668
#> GSM1105450     2  0.0000    0.92750 0.000 1.000 0.000
#> GSM1105451     2  0.0424    0.92696 0.000 0.992 0.008
#> GSM1105454     3  0.5733    0.54431 0.000 0.324 0.676
#> GSM1105468     2  0.0000    0.92750 0.000 1.000 0.000
#> GSM1105481     3  0.0424    0.82902 0.000 0.008 0.992
#> GSM1105504     3  0.0424    0.83082 0.008 0.000 0.992
#> GSM1105517     3  0.8199    0.57138 0.200 0.160 0.640
#> GSM1105525     3  0.3482    0.75049 0.128 0.000 0.872
#> GSM1105552     3  0.0592    0.83019 0.012 0.000 0.988
#> GSM1105452     2  0.0000    0.92750 0.000 1.000 0.000
#> GSM1105453     2  0.0424    0.92696 0.000 0.992 0.008
#> GSM1105456     3  0.4452    0.68031 0.000 0.192 0.808

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>            class entropy silhouette    p1    p2    p3    p4
#> GSM1105438     2  0.4679     0.8711 0.000 0.648 0.000 0.352
#> GSM1105486     4  0.0000     0.9105 0.000 0.000 0.000 1.000
#> GSM1105487     1  0.0000     0.8274 1.000 0.000 0.000 0.000
#> GSM1105490     2  0.4955     0.3495 0.000 0.556 0.000 0.444
#> GSM1105491     3  0.1637     0.6865 0.000 0.060 0.940 0.000
#> GSM1105495     2  0.4730     0.2194 0.000 0.636 0.364 0.000
#> GSM1105498     3  0.7050     0.4807 0.000 0.156 0.552 0.292
#> GSM1105499     1  0.0188     0.8269 0.996 0.004 0.000 0.000
#> GSM1105506     4  0.2973     0.7945 0.000 0.144 0.000 0.856
#> GSM1105442     2  0.4855     0.8680 0.000 0.644 0.004 0.352
#> GSM1105511     4  0.2973     0.7945 0.000 0.144 0.000 0.856
#> GSM1105514     4  0.0000     0.9105 0.000 0.000 0.000 1.000
#> GSM1105518     2  0.6049     0.7726 0.000 0.652 0.084 0.264
#> GSM1105522     1  0.7197     0.2468 0.468 0.140 0.392 0.000
#> GSM1105534     1  0.0000     0.8274 1.000 0.000 0.000 0.000
#> GSM1105535     1  0.0000     0.8274 1.000 0.000 0.000 0.000
#> GSM1105538     1  0.6517     0.4626 0.604 0.108 0.288 0.000
#> GSM1105542     4  0.0000     0.9105 0.000 0.000 0.000 1.000
#> GSM1105443     2  0.4643     0.8686 0.000 0.656 0.000 0.344
#> GSM1105551     1  0.0921     0.8139 0.972 0.028 0.000 0.000
#> GSM1105554     1  0.0188     0.8269 0.996 0.004 0.000 0.000
#> GSM1105555     1  0.2844     0.7824 0.900 0.052 0.048 0.000
#> GSM1105447     2  0.4679     0.8711 0.000 0.648 0.000 0.352
#> GSM1105467     4  0.0000     0.9105 0.000 0.000 0.000 1.000
#> GSM1105470     4  0.0000     0.9105 0.000 0.000 0.000 1.000
#> GSM1105471     4  0.0000     0.9105 0.000 0.000 0.000 1.000
#> GSM1105474     4  0.0000     0.9105 0.000 0.000 0.000 1.000
#> GSM1105475     4  0.0000     0.9105 0.000 0.000 0.000 1.000
#> GSM1105440     1  0.0000     0.8274 1.000 0.000 0.000 0.000
#> GSM1105488     4  0.1211     0.8641 0.000 0.040 0.000 0.960
#> GSM1105489     1  0.1474     0.7978 0.948 0.052 0.000 0.000
#> GSM1105492     1  0.6956     0.4184 0.564 0.148 0.288 0.000
#> GSM1105493     1  0.2530     0.7379 0.888 0.000 0.112 0.000
#> GSM1105497     2  0.4456     0.8228 0.000 0.716 0.004 0.280
#> GSM1105500     4  0.3474     0.8123 0.000 0.068 0.064 0.868
#> GSM1105501     4  0.2973     0.7945 0.000 0.144 0.000 0.856
#> GSM1105508     1  0.2921     0.7197 0.860 0.140 0.000 0.000
#> GSM1105444     2  0.4679     0.8711 0.000 0.648 0.000 0.352
#> GSM1105513     2  0.4543     0.6359 0.000 0.676 0.000 0.324
#> GSM1105516     3  0.9385     0.2500 0.208 0.284 0.392 0.116
#> GSM1105520     3  0.6423     0.5516 0.000 0.156 0.648 0.196
#> GSM1105524     1  0.0000     0.8274 1.000 0.000 0.000 0.000
#> GSM1105536     4  0.2281     0.8383 0.000 0.096 0.000 0.904
#> GSM1105537     1  0.0000     0.8274 1.000 0.000 0.000 0.000
#> GSM1105540     3  0.6275     0.5568 0.000 0.136 0.660 0.204
#> GSM1105544     4  0.7101    -0.0161 0.000 0.136 0.360 0.504
#> GSM1105445     2  0.4643     0.8686 0.000 0.656 0.000 0.344
#> GSM1105553     2  0.4304     0.8256 0.000 0.716 0.000 0.284
#> GSM1105556     1  0.0188     0.8269 0.996 0.004 0.000 0.000
#> GSM1105557     4  0.4994    -0.1010 0.000 0.480 0.000 0.520
#> GSM1105449     2  0.4679     0.8711 0.000 0.648 0.000 0.352
#> GSM1105469     4  0.2868     0.8002 0.000 0.136 0.000 0.864
#> GSM1105472     4  0.0000     0.9105 0.000 0.000 0.000 1.000
#> GSM1105473     3  0.6534     0.4371 0.220 0.148 0.632 0.000
#> GSM1105476     4  0.0000     0.9105 0.000 0.000 0.000 1.000
#> GSM1105477     4  0.0188     0.9091 0.000 0.004 0.000 0.996
#> GSM1105478     4  0.0336     0.9059 0.000 0.008 0.000 0.992
#> GSM1105510     4  0.0188     0.9084 0.000 0.004 0.000 0.996
#> GSM1105530     3  0.0000     0.6833 0.000 0.000 1.000 0.000
#> GSM1105539     3  0.4331     0.4390 0.288 0.000 0.712 0.000
#> GSM1105480     4  0.0336     0.9059 0.000 0.008 0.000 0.992
#> GSM1105512     1  0.4983     0.5730 0.704 0.024 0.272 0.000
#> GSM1105532     3  0.0000     0.6833 0.000 0.000 1.000 0.000
#> GSM1105541     1  0.4907     0.2558 0.580 0.000 0.420 0.000
#> GSM1105439     2  0.4679     0.8711 0.000 0.648 0.000 0.352
#> GSM1105463     3  0.1637     0.6865 0.000 0.060 0.940 0.000
#> GSM1105482     1  0.0000     0.8274 1.000 0.000 0.000 0.000
#> GSM1105483     4  0.2868     0.8002 0.000 0.136 0.000 0.864
#> GSM1105494     4  0.1792     0.8436 0.000 0.068 0.000 0.932
#> GSM1105503     3  0.4679     0.4353 0.000 0.352 0.648 0.000
#> GSM1105507     3  0.8316     0.1102 0.296 0.292 0.396 0.016
#> GSM1105446     2  0.4679     0.8711 0.000 0.648 0.000 0.352
#> GSM1105519     1  0.6975     0.4109 0.560 0.148 0.292 0.000
#> GSM1105526     4  0.0817     0.8965 0.000 0.024 0.000 0.976
#> GSM1105527     4  0.2868     0.8002 0.000 0.136 0.000 0.864
#> GSM1105531     3  0.1637     0.6865 0.000 0.060 0.940 0.000
#> GSM1105543     4  0.0000     0.9105 0.000 0.000 0.000 1.000
#> GSM1105546     1  0.0000     0.8274 1.000 0.000 0.000 0.000
#> GSM1105547     1  0.0188     0.8269 0.996 0.004 0.000 0.000
#> GSM1105455     2  0.4643     0.8686 0.000 0.656 0.000 0.344
#> GSM1105458     2  0.4661     0.8701 0.000 0.652 0.000 0.348
#> GSM1105459     2  0.4877     0.7961 0.000 0.592 0.000 0.408
#> GSM1105462     3  0.4855     0.3516 0.000 0.000 0.600 0.400
#> GSM1105441     2  0.4679     0.8711 0.000 0.648 0.000 0.352
#> GSM1105465     4  0.3280     0.7513 0.000 0.016 0.124 0.860
#> GSM1105484     4  0.0000     0.9105 0.000 0.000 0.000 1.000
#> GSM1105485     4  0.0000     0.9105 0.000 0.000 0.000 1.000
#> GSM1105496     3  0.4564     0.4686 0.000 0.328 0.672 0.000
#> GSM1105505     3  0.1637     0.6865 0.000 0.060 0.940 0.000
#> GSM1105509     3  0.6856     0.4692 0.140 0.284 0.576 0.000
#> GSM1105448     2  0.4679     0.8711 0.000 0.648 0.000 0.352
#> GSM1105521     1  0.6956     0.4184 0.564 0.148 0.288 0.000
#> GSM1105528     4  0.0000     0.9105 0.000 0.000 0.000 1.000
#> GSM1105529     4  0.0000     0.9105 0.000 0.000 0.000 1.000
#> GSM1105533     1  0.1211     0.8089 0.960 0.000 0.040 0.000
#> GSM1105545     4  0.0188     0.9091 0.000 0.004 0.000 0.996
#> GSM1105548     1  0.7591     0.1462 0.432 0.200 0.368 0.000
#> GSM1105549     1  0.0188     0.8269 0.996 0.004 0.000 0.000
#> GSM1105457     2  0.3688     0.7467 0.000 0.792 0.000 0.208
#> GSM1105460     2  0.4679     0.8711 0.000 0.648 0.000 0.352
#> GSM1105461     2  0.4679     0.8711 0.000 0.648 0.000 0.352
#> GSM1105464     3  0.3975     0.5045 0.240 0.000 0.760 0.000
#> GSM1105466     4  0.0000     0.9105 0.000 0.000 0.000 1.000
#> GSM1105479     4  0.0000     0.9105 0.000 0.000 0.000 1.000
#> GSM1105502     3  0.4643     0.2023 0.344 0.000 0.656 0.000
#> GSM1105515     1  0.0000     0.8274 1.000 0.000 0.000 0.000
#> GSM1105523     3  0.3123     0.6445 0.000 0.156 0.844 0.000
#> GSM1105550     3  0.4543     0.4024 0.000 0.000 0.676 0.324
#> GSM1105450     4  0.0000     0.9105 0.000 0.000 0.000 1.000
#> GSM1105451     2  0.4679     0.8711 0.000 0.648 0.000 0.352
#> GSM1105454     2  0.4304     0.3664 0.000 0.716 0.284 0.000
#> GSM1105468     4  0.0000     0.9105 0.000 0.000 0.000 1.000
#> GSM1105481     3  0.5745     0.5304 0.000 0.056 0.656 0.288
#> GSM1105504     3  0.0188     0.6837 0.000 0.004 0.996 0.000
#> GSM1105517     3  0.6751     0.5518 0.060 0.276 0.628 0.036
#> GSM1105525     3  0.4890     0.5895 0.080 0.144 0.776 0.000
#> GSM1105552     3  0.1837     0.6825 0.028 0.028 0.944 0.000
#> GSM1105452     4  0.0000     0.9105 0.000 0.000 0.000 1.000
#> GSM1105453     2  0.4679     0.8711 0.000 0.648 0.000 0.352
#> GSM1105456     2  0.4356     0.3585 0.000 0.708 0.292 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
#> GSM1105438     2  0.3177     0.8691 0.000 0.792 0.000 0.208 0.000
#> GSM1105486     4  0.0162     0.8344 0.000 0.004 0.000 0.996 0.000
#> GSM1105487     1  0.0510     0.8839 0.984 0.016 0.000 0.000 0.000
#> GSM1105490     4  0.7618     0.1088 0.000 0.348 0.052 0.372 0.228
#> GSM1105491     3  0.3305     0.6667 0.000 0.000 0.776 0.000 0.224
#> GSM1105495     3  0.3684     0.5247 0.000 0.280 0.720 0.000 0.000
#> GSM1105498     3  0.4109     0.6215 0.000 0.012 0.764 0.020 0.204
#> GSM1105499     1  0.0324     0.8871 0.992 0.004 0.000 0.000 0.004
#> GSM1105506     4  0.4898     0.6666 0.000 0.012 0.052 0.708 0.228
#> GSM1105442     2  0.6434     0.6900 0.000 0.588 0.024 0.216 0.172
#> GSM1105511     4  0.4898     0.6666 0.000 0.012 0.052 0.708 0.228
#> GSM1105514     4  0.0404     0.8329 0.000 0.012 0.000 0.988 0.000
#> GSM1105518     2  0.4058     0.6630 0.000 0.740 0.236 0.024 0.000
#> GSM1105522     5  0.6593     0.6087 0.092 0.152 0.128 0.000 0.628
#> GSM1105534     1  0.0000     0.8880 1.000 0.000 0.000 0.000 0.000
#> GSM1105535     1  0.0162     0.8876 0.996 0.004 0.000 0.000 0.000
#> GSM1105538     5  0.4610     0.4326 0.432 0.012 0.000 0.000 0.556
#> GSM1105542     4  0.3527     0.7488 0.000 0.000 0.024 0.804 0.172
#> GSM1105443     2  0.3039     0.8656 0.000 0.808 0.000 0.192 0.000
#> GSM1105551     1  0.1809     0.8424 0.928 0.012 0.060 0.000 0.000
#> GSM1105554     1  0.0324     0.8871 0.992 0.004 0.000 0.000 0.004
#> GSM1105555     1  0.4348     0.7162 0.788 0.016 0.128 0.000 0.068
#> GSM1105447     2  0.3210     0.8684 0.000 0.788 0.000 0.212 0.000
#> GSM1105467     4  0.0162     0.8344 0.000 0.004 0.000 0.996 0.000
#> GSM1105470     4  0.0162     0.8344 0.000 0.004 0.000 0.996 0.000
#> GSM1105471     4  0.0162     0.8346 0.000 0.000 0.004 0.996 0.000
#> GSM1105474     4  0.0162     0.8344 0.000 0.004 0.000 0.996 0.000
#> GSM1105475     4  0.0000     0.8349 0.000 0.000 0.000 1.000 0.000
#> GSM1105440     1  0.0000     0.8880 1.000 0.000 0.000 0.000 0.000
#> GSM1105488     4  0.4015     0.7374 0.000 0.016 0.024 0.788 0.172
#> GSM1105489     1  0.3039     0.7428 0.836 0.012 0.152 0.000 0.000
#> GSM1105492     5  0.4192     0.4981 0.404 0.000 0.000 0.000 0.596
#> GSM1105493     1  0.0798     0.8803 0.976 0.008 0.016 0.000 0.000
#> GSM1105497     2  0.6065     0.5140 0.000 0.616 0.200 0.012 0.172
#> GSM1105500     4  0.6383     0.5609 0.000 0.012 0.156 0.552 0.280
#> GSM1105501     4  0.5673     0.5590 0.000 0.012 0.056 0.544 0.388
#> GSM1105508     1  0.4192     0.6055 0.736 0.000 0.032 0.000 0.232
#> GSM1105444     2  0.3210     0.8684 0.000 0.788 0.000 0.212 0.000
#> GSM1105513     2  0.7459     0.2415 0.000 0.456 0.052 0.264 0.228
#> GSM1105516     5  0.0451     0.5681 0.000 0.004 0.008 0.000 0.988
#> GSM1105520     3  0.0912     0.7313 0.000 0.012 0.972 0.016 0.000
#> GSM1105524     1  0.0000     0.8880 1.000 0.000 0.000 0.000 0.000
#> GSM1105536     4  0.2583     0.7790 0.000 0.000 0.004 0.864 0.132
#> GSM1105537     1  0.0000     0.8880 1.000 0.000 0.000 0.000 0.000
#> GSM1105540     5  0.6265     0.4824 0.000 0.012 0.212 0.188 0.588
#> GSM1105544     5  0.5987     0.4837 0.000 0.012 0.144 0.224 0.620
#> GSM1105445     2  0.3109     0.8666 0.000 0.800 0.000 0.200 0.000
#> GSM1105553     2  0.3720     0.6541 0.000 0.760 0.228 0.012 0.000
#> GSM1105556     1  0.0324     0.8871 0.992 0.004 0.000 0.000 0.004
#> GSM1105557     4  0.7497     0.3098 0.000 0.276 0.052 0.444 0.228
#> GSM1105449     2  0.3210     0.8684 0.000 0.788 0.000 0.212 0.000
#> GSM1105469     4  0.3491     0.7091 0.000 0.000 0.004 0.768 0.228
#> GSM1105472     4  0.0162     0.8344 0.000 0.004 0.000 0.996 0.000
#> GSM1105473     5  0.6049     0.6114 0.188 0.004 0.212 0.000 0.596
#> GSM1105476     4  0.0290     0.8340 0.000 0.008 0.000 0.992 0.000
#> GSM1105477     4  0.3455     0.7472 0.000 0.000 0.008 0.784 0.208
#> GSM1105478     4  0.1670     0.8142 0.000 0.012 0.052 0.936 0.000
#> GSM1105510     4  0.3421     0.7479 0.000 0.000 0.008 0.788 0.204
#> GSM1105530     3  0.4486     0.6807 0.000 0.172 0.748 0.000 0.080
#> GSM1105539     3  0.4585     0.6803 0.076 0.172 0.748 0.000 0.004
#> GSM1105480     4  0.1670     0.8142 0.000 0.012 0.052 0.936 0.000
#> GSM1105512     1  0.4288     0.0837 0.612 0.004 0.000 0.000 0.384
#> GSM1105532     3  0.4698     0.6685 0.000 0.172 0.732 0.000 0.096
#> GSM1105541     1  0.6550    -0.1322 0.436 0.172 0.388 0.000 0.004
#> GSM1105439     2  0.3143     0.8692 0.000 0.796 0.000 0.204 0.000
#> GSM1105463     3  0.1410     0.7317 0.000 0.000 0.940 0.000 0.060
#> GSM1105482     1  0.0404     0.8846 0.988 0.012 0.000 0.000 0.000
#> GSM1105483     4  0.3491     0.7091 0.000 0.000 0.004 0.768 0.228
#> GSM1105494     4  0.3720     0.6698 0.000 0.012 0.228 0.760 0.000
#> GSM1105503     3  0.1124     0.7261 0.000 0.036 0.960 0.004 0.000
#> GSM1105507     5  0.0162     0.5762 0.004 0.000 0.000 0.000 0.996
#> GSM1105446     2  0.3143     0.8692 0.000 0.796 0.000 0.204 0.000
#> GSM1105519     5  0.4666     0.5164 0.388 0.004 0.012 0.000 0.596
#> GSM1105526     4  0.0963     0.8307 0.000 0.000 0.000 0.964 0.036
#> GSM1105527     4  0.3336     0.7092 0.000 0.000 0.000 0.772 0.228
#> GSM1105531     3  0.1671     0.7258 0.000 0.000 0.924 0.000 0.076
#> GSM1105543     4  0.0290     0.8340 0.000 0.008 0.000 0.992 0.000
#> GSM1105546     1  0.0404     0.8846 0.988 0.012 0.000 0.000 0.000
#> GSM1105547     1  0.0324     0.8871 0.992 0.004 0.000 0.000 0.004
#> GSM1105455     2  0.3196     0.8648 0.000 0.804 0.004 0.192 0.000
#> GSM1105458     2  0.3143     0.8681 0.000 0.796 0.000 0.204 0.000
#> GSM1105459     2  0.4182     0.5674 0.000 0.600 0.000 0.400 0.000
#> GSM1105462     4  0.4425     0.3482 0.000 0.008 0.392 0.600 0.000
#> GSM1105441     2  0.3210     0.8684 0.000 0.788 0.000 0.212 0.000
#> GSM1105465     4  0.4313     0.7313 0.000 0.000 0.068 0.760 0.172
#> GSM1105484     4  0.0162     0.8348 0.000 0.000 0.000 0.996 0.004
#> GSM1105485     4  0.3527     0.7488 0.000 0.000 0.024 0.804 0.172
#> GSM1105496     3  0.2852     0.6571 0.000 0.000 0.828 0.000 0.172
#> GSM1105505     3  0.3305     0.6806 0.000 0.000 0.776 0.000 0.224
#> GSM1105509     5  0.0162     0.5762 0.004 0.000 0.000 0.000 0.996
#> GSM1105448     2  0.3143     0.8692 0.000 0.796 0.000 0.204 0.000
#> GSM1105521     5  0.4331     0.4982 0.400 0.004 0.000 0.000 0.596
#> GSM1105528     4  0.3093     0.7596 0.000 0.000 0.008 0.824 0.168
#> GSM1105529     4  0.1211     0.8277 0.000 0.000 0.016 0.960 0.024
#> GSM1105533     1  0.2439     0.7938 0.876 0.120 0.000 0.000 0.004
#> GSM1105545     4  0.0451     0.8349 0.000 0.000 0.004 0.988 0.008
#> GSM1105548     5  0.6252     0.5664 0.224 0.012 0.176 0.000 0.588
#> GSM1105549     1  0.0324     0.8871 0.992 0.004 0.000 0.000 0.004
#> GSM1105457     2  0.4778     0.6469 0.000 0.740 0.052 0.020 0.188
#> GSM1105460     2  0.3210     0.8684 0.000 0.788 0.000 0.212 0.000
#> GSM1105461     2  0.3177     0.8683 0.000 0.792 0.000 0.208 0.000
#> GSM1105464     3  0.5078     0.6623 0.096 0.172 0.720 0.000 0.012
#> GSM1105466     4  0.0000     0.8349 0.000 0.000 0.000 1.000 0.000
#> GSM1105479     4  0.0000     0.8349 0.000 0.000 0.000 1.000 0.000
#> GSM1105502     3  0.7182     0.4893 0.216 0.172 0.540 0.000 0.072
#> GSM1105515     1  0.0000     0.8880 1.000 0.000 0.000 0.000 0.000
#> GSM1105523     5  0.5778     0.5029 0.000 0.132 0.272 0.000 0.596
#> GSM1105550     3  0.5486     0.3173 0.000 0.000 0.572 0.352 0.076
#> GSM1105450     4  0.0162     0.8344 0.000 0.004 0.000 0.996 0.000
#> GSM1105451     2  0.3143     0.8692 0.000 0.796 0.000 0.204 0.000
#> GSM1105454     2  0.3109     0.6697 0.000 0.800 0.200 0.000 0.000
#> GSM1105468     4  0.0162     0.8344 0.000 0.004 0.000 0.996 0.000
#> GSM1105481     3  0.1671     0.7238 0.000 0.000 0.924 0.076 0.000
#> GSM1105504     3  0.4372     0.6855 0.000 0.172 0.756 0.000 0.072
#> GSM1105517     5  0.3563     0.5777 0.012 0.000 0.208 0.000 0.780
#> GSM1105525     5  0.6190     0.5197 0.012 0.168 0.224 0.000 0.596
#> GSM1105552     3  0.3517     0.6961 0.084 0.004 0.840 0.000 0.072
#> GSM1105452     4  0.0671     0.8316 0.000 0.000 0.016 0.980 0.004
#> GSM1105453     2  0.3143     0.8692 0.000 0.796 0.000 0.204 0.000
#> GSM1105456     2  0.3177     0.6662 0.000 0.792 0.208 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
#> GSM1105438     2  0.1863     0.8460 0.000 0.896 0.000 0.000 0.104 0.000
#> GSM1105486     5  0.0000     0.8614 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM1105487     1  0.1320     0.9206 0.948 0.036 0.016 0.000 0.000 0.000
#> GSM1105490     4  0.0603     0.7473 0.000 0.016 0.000 0.980 0.004 0.000
#> GSM1105491     6  0.1802     0.4769 0.000 0.000 0.072 0.012 0.000 0.916
#> GSM1105495     6  0.1918     0.4658 0.000 0.088 0.000 0.008 0.000 0.904
#> GSM1105498     4  0.2762     0.6913 0.000 0.000 0.000 0.804 0.000 0.196
#> GSM1105499     1  0.0260     0.9288 0.992 0.000 0.008 0.000 0.000 0.000
#> GSM1105506     4  0.0547     0.7505 0.000 0.000 0.000 0.980 0.020 0.000
#> GSM1105442     2  0.6083     0.5106 0.000 0.480 0.000 0.012 0.200 0.308
#> GSM1105511     4  0.0547     0.7505 0.000 0.000 0.000 0.980 0.020 0.000
#> GSM1105514     5  0.2416     0.7542 0.000 0.156 0.000 0.000 0.844 0.000
#> GSM1105518     4  0.5237     0.6292 0.000 0.144 0.000 0.652 0.016 0.188
#> GSM1105522     3  0.4091     0.5960 0.040 0.036 0.812 0.036 0.000 0.076
#> GSM1105534     1  0.0146     0.9294 0.996 0.004 0.000 0.000 0.000 0.000
#> GSM1105535     1  0.1010     0.9251 0.960 0.036 0.004 0.000 0.000 0.000
#> GSM1105538     3  0.3808     0.6484 0.228 0.036 0.736 0.000 0.000 0.000
#> GSM1105542     5  0.3784     0.6505 0.000 0.000 0.000 0.012 0.680 0.308
#> GSM1105443     2  0.1863     0.8460 0.000 0.896 0.000 0.000 0.104 0.000
#> GSM1105551     1  0.1745     0.8821 0.920 0.000 0.012 0.000 0.000 0.068
#> GSM1105554     1  0.0260     0.9288 0.992 0.000 0.008 0.000 0.000 0.000
#> GSM1105555     1  0.3947     0.7284 0.764 0.000 0.100 0.000 0.000 0.136
#> GSM1105447     2  0.2793     0.8419 0.000 0.800 0.000 0.000 0.200 0.000
#> GSM1105467     5  0.0000     0.8614 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM1105470     5  0.0000     0.8614 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM1105471     5  0.0000     0.8614 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM1105474     5  0.0146     0.8606 0.000 0.004 0.000 0.000 0.996 0.000
#> GSM1105475     5  0.0000     0.8614 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM1105440     1  0.0865     0.9245 0.964 0.036 0.000 0.000 0.000 0.000
#> GSM1105488     5  0.3784     0.6505 0.000 0.000 0.000 0.012 0.680 0.308
#> GSM1105489     1  0.2768     0.7771 0.832 0.000 0.012 0.000 0.000 0.156
#> GSM1105492     3  0.3543     0.6722 0.200 0.032 0.768 0.000 0.000 0.000
#> GSM1105493     1  0.0725     0.9254 0.976 0.000 0.012 0.000 0.000 0.012
#> GSM1105497     6  0.5475    -0.3016 0.000 0.428 0.012 0.064 0.008 0.488
#> GSM1105500     4  0.2219     0.7110 0.000 0.000 0.000 0.864 0.136 0.000
#> GSM1105501     4  0.0547     0.7505 0.000 0.000 0.000 0.980 0.020 0.000
#> GSM1105508     1  0.4194     0.5631 0.664 0.020 0.000 0.308 0.000 0.008
#> GSM1105444     2  0.2562     0.8488 0.000 0.828 0.000 0.000 0.172 0.000
#> GSM1105513     4  0.0725     0.7515 0.000 0.012 0.000 0.976 0.012 0.000
#> GSM1105516     3  0.3547     0.5654 0.000 0.000 0.668 0.332 0.000 0.000
#> GSM1105520     4  0.4562     0.4367 0.000 0.000 0.032 0.576 0.004 0.388
#> GSM1105524     1  0.0865     0.9245 0.964 0.036 0.000 0.000 0.000 0.000
#> GSM1105536     5  0.2178     0.7660 0.000 0.000 0.000 0.132 0.868 0.000
#> GSM1105537     1  0.0865     0.9245 0.964 0.036 0.000 0.000 0.000 0.000
#> GSM1105540     3  0.3056     0.5663 0.000 0.004 0.804 0.000 0.184 0.008
#> GSM1105544     3  0.3261     0.5527 0.000 0.000 0.780 0.000 0.204 0.016
#> GSM1105445     2  0.2793     0.8419 0.000 0.800 0.000 0.000 0.200 0.000
#> GSM1105553     4  0.5193     0.6249 0.000 0.156 0.012 0.652 0.000 0.180
#> GSM1105556     1  0.0260     0.9288 0.992 0.000 0.008 0.000 0.000 0.000
#> GSM1105557     4  0.0622     0.7508 0.000 0.008 0.000 0.980 0.012 0.000
#> GSM1105449     2  0.2793     0.8419 0.000 0.800 0.000 0.000 0.200 0.000
#> GSM1105469     5  0.3531     0.5398 0.000 0.000 0.000 0.328 0.672 0.000
#> GSM1105472     5  0.0000     0.8614 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM1105473     3  0.3014     0.6737 0.184 0.000 0.804 0.000 0.000 0.012
#> GSM1105476     5  0.0632     0.8546 0.000 0.024 0.000 0.000 0.976 0.000
#> GSM1105477     5  0.0937     0.8514 0.000 0.000 0.000 0.040 0.960 0.000
#> GSM1105478     4  0.3607     0.5284 0.000 0.000 0.000 0.652 0.348 0.000
#> GSM1105510     5  0.1080     0.8530 0.004 0.000 0.004 0.032 0.960 0.000
#> GSM1105530     6  0.4097     0.4191 0.000 0.000 0.492 0.008 0.000 0.500
#> GSM1105539     6  0.5980     0.4531 0.276 0.000 0.216 0.008 0.000 0.500
#> GSM1105480     4  0.3607     0.5284 0.000 0.000 0.000 0.652 0.348 0.000
#> GSM1105512     3  0.3833     0.4109 0.444 0.000 0.556 0.000 0.000 0.000
#> GSM1105532     6  0.4097     0.4191 0.000 0.000 0.492 0.008 0.000 0.500
#> GSM1105541     6  0.6009     0.3074 0.356 0.000 0.184 0.008 0.000 0.452
#> GSM1105439     2  0.2454     0.8500 0.000 0.840 0.000 0.000 0.160 0.000
#> GSM1105463     6  0.1714     0.4901 0.000 0.000 0.092 0.000 0.000 0.908
#> GSM1105482     1  0.0458     0.9277 0.984 0.000 0.016 0.000 0.000 0.000
#> GSM1105483     5  0.3531     0.5398 0.000 0.000 0.000 0.328 0.672 0.000
#> GSM1105494     4  0.4952     0.6345 0.000 0.000 0.000 0.652 0.168 0.180
#> GSM1105503     4  0.4323     0.5608 0.000 0.004 0.032 0.652 0.000 0.312
#> GSM1105507     3  0.3531     0.5673 0.000 0.000 0.672 0.328 0.000 0.000
#> GSM1105446     2  0.1007     0.8223 0.000 0.956 0.000 0.000 0.044 0.000
#> GSM1105519     3  0.2996     0.6697 0.228 0.000 0.772 0.000 0.000 0.000
#> GSM1105526     5  0.1204     0.8387 0.000 0.000 0.000 0.056 0.944 0.000
#> GSM1105527     5  0.3531     0.5398 0.000 0.000 0.000 0.328 0.672 0.000
#> GSM1105531     6  0.3288     0.4716 0.000 0.000 0.276 0.000 0.000 0.724
#> GSM1105543     5  0.0865     0.8484 0.000 0.036 0.000 0.000 0.964 0.000
#> GSM1105546     1  0.0909     0.9268 0.968 0.020 0.012 0.000 0.000 0.000
#> GSM1105547     1  0.0260     0.9288 0.992 0.000 0.008 0.000 0.000 0.000
#> GSM1105455     2  0.3773     0.6145 0.000 0.752 0.000 0.204 0.044 0.000
#> GSM1105458     2  0.2793     0.8419 0.000 0.800 0.000 0.000 0.200 0.000
#> GSM1105459     2  0.3563     0.6090 0.000 0.664 0.000 0.000 0.336 0.000
#> GSM1105462     5  0.3555     0.6547 0.000 0.000 0.040 0.000 0.776 0.184
#> GSM1105441     2  0.2793     0.8419 0.000 0.800 0.000 0.000 0.200 0.000
#> GSM1105465     5  0.3954     0.6053 0.000 0.000 0.000 0.012 0.636 0.352
#> GSM1105484     5  0.0000     0.8614 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM1105485     5  0.3784     0.6505 0.000 0.000 0.000 0.012 0.680 0.308
#> GSM1105496     6  0.4332     0.1150 0.000 0.000 0.032 0.352 0.000 0.616
#> GSM1105505     6  0.3841     0.3740 0.000 0.000 0.380 0.004 0.000 0.616
#> GSM1105509     3  0.3136     0.6364 0.004 0.000 0.768 0.228 0.000 0.000
#> GSM1105448     2  0.1007     0.8223 0.000 0.956 0.000 0.000 0.044 0.000
#> GSM1105521     3  0.2996     0.6697 0.228 0.000 0.772 0.000 0.000 0.000
#> GSM1105528     5  0.0146     0.8604 0.000 0.000 0.000 0.004 0.996 0.000
#> GSM1105529     5  0.3690     0.6535 0.000 0.000 0.000 0.008 0.684 0.308
#> GSM1105533     1  0.2346     0.8342 0.868 0.000 0.124 0.008 0.000 0.000
#> GSM1105545     5  0.0458     0.8583 0.000 0.000 0.000 0.016 0.984 0.000
#> GSM1105548     3  0.3551     0.5679 0.036 0.000 0.772 0.000 0.000 0.192
#> GSM1105549     1  0.0260     0.9288 0.992 0.000 0.008 0.000 0.000 0.000
#> GSM1105457     4  0.2121     0.7314 0.000 0.096 0.000 0.892 0.012 0.000
#> GSM1105460     2  0.2793     0.8419 0.000 0.800 0.000 0.000 0.200 0.000
#> GSM1105461     2  0.1141     0.8233 0.000 0.948 0.000 0.000 0.052 0.000
#> GSM1105464     6  0.5950     0.4727 0.232 0.000 0.248 0.008 0.000 0.512
#> GSM1105466     5  0.0000     0.8614 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM1105479     5  0.0000     0.8614 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM1105502     6  0.5116     0.4262 0.060 0.000 0.432 0.008 0.000 0.500
#> GSM1105515     1  0.0146     0.9290 0.996 0.000 0.004 0.000 0.000 0.000
#> GSM1105523     3  0.1471     0.6006 0.000 0.000 0.932 0.004 0.000 0.064
#> GSM1105550     3  0.6195    -0.0528 0.004 0.000 0.380 0.000 0.348 0.268
#> GSM1105450     5  0.0000     0.8614 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM1105451     2  0.1007     0.8223 0.000 0.956 0.000 0.000 0.044 0.000
#> GSM1105454     2  0.2730     0.6929 0.000 0.808 0.000 0.000 0.000 0.192
#> GSM1105468     5  0.0000     0.8614 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM1105481     6  0.4332     0.3416 0.000 0.000 0.032 0.000 0.352 0.616
#> GSM1105504     6  0.4183     0.4216 0.000 0.000 0.480 0.012 0.000 0.508
#> GSM1105517     3  0.3231     0.6490 0.012 0.000 0.800 0.180 0.000 0.008
#> GSM1105525     3  0.2009     0.5345 0.008 0.000 0.904 0.004 0.000 0.084
#> GSM1105552     6  0.5093     0.3071 0.084 0.000 0.388 0.000 0.000 0.528
#> GSM1105452     5  0.3690     0.6535 0.000 0.000 0.000 0.008 0.684 0.308
#> GSM1105453     2  0.1007     0.8223 0.000 0.956 0.000 0.000 0.044 0.000
#> GSM1105456     2  0.2730     0.6929 0.000 0.808 0.000 0.000 0.000 0.192

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) other(p) time(p) individual(p) k
#> CV:pam 113   0.9110 0.517169   0.645      1.38e-02 2
#> CV:pam 112   0.0897 0.000928   0.971      5.53e-03 3
#> CV:pam  96   0.1319 0.004025   0.581      5.52e-04 4
#> CV:pam 107   0.1769 0.160458   0.944      4.25e-05 5
#> CV:pam 101   0.0444 0.631253   0.674      3.95e-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: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 44956 rows and 120 columns.
#>   Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'CV' method.
#>   Subgroups are detected by 'mclust' method.
#>   Performed in total 1250 partitions by row resampling.
#>   Best k for subgroups seems to be 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 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.346           0.815       0.801         0.3753 0.532   0.532
#> 3 3 0.542           0.788       0.846         0.5700 0.763   0.605
#> 4 4 0.495           0.662       0.771         0.1710 0.841   0.651
#> 5 5 0.751           0.791       0.871         0.1040 0.871   0.629
#> 6 6 0.727           0.532       0.752         0.0462 0.854   0.491

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

suggest_best_k(res)
#> [1] 5

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
#> GSM1105438     2  0.0376     0.7981 0.004 0.996
#> GSM1105486     2  0.9170     0.5443 0.332 0.668
#> GSM1105487     1  0.9170     0.9918 0.668 0.332
#> GSM1105490     2  0.0000     0.8000 0.000 1.000
#> GSM1105491     2  0.6343     0.7176 0.160 0.840
#> GSM1105495     2  0.6343     0.7176 0.160 0.840
#> GSM1105498     2  0.6343     0.7176 0.160 0.840
#> GSM1105499     1  0.9170     0.9918 0.668 0.332
#> GSM1105506     2  0.6343     0.7176 0.160 0.840
#> GSM1105442     2  0.6343     0.7176 0.160 0.840
#> GSM1105511     2  0.2948     0.7825 0.052 0.948
#> GSM1105514     2  0.2603     0.7739 0.044 0.956
#> GSM1105518     2  0.6343     0.7176 0.160 0.840
#> GSM1105522     1  0.9170     0.9918 0.668 0.332
#> GSM1105534     1  0.9170     0.9918 0.668 0.332
#> GSM1105535     1  0.9170     0.9918 0.668 0.332
#> GSM1105538     1  0.9170     0.9918 0.668 0.332
#> GSM1105542     2  0.0000     0.8000 0.000 1.000
#> GSM1105443     2  0.0000     0.8000 0.000 1.000
#> GSM1105551     1  0.9170     0.9918 0.668 0.332
#> GSM1105554     1  0.9170     0.9918 0.668 0.332
#> GSM1105555     1  0.9170     0.9918 0.668 0.332
#> GSM1105447     2  0.0000     0.8000 0.000 1.000
#> GSM1105467     2  0.8386     0.5871 0.268 0.732
#> GSM1105470     2  0.9170     0.5443 0.332 0.668
#> GSM1105471     2  0.6343     0.7176 0.160 0.840
#> GSM1105474     2  0.9170     0.5443 0.332 0.668
#> GSM1105475     2  0.2043     0.7824 0.032 0.968
#> GSM1105440     1  0.9170     0.9918 0.668 0.332
#> GSM1105488     2  0.0000     0.8000 0.000 1.000
#> GSM1105489     1  0.9170     0.9918 0.668 0.332
#> GSM1105492     1  0.9170     0.9918 0.668 0.332
#> GSM1105493     1  0.9170     0.9918 0.668 0.332
#> GSM1105497     2  0.6343     0.7176 0.160 0.840
#> GSM1105500     2  0.2778     0.7843 0.048 0.952
#> GSM1105501     2  0.0000     0.8000 0.000 1.000
#> GSM1105508     1  0.9170     0.9918 0.668 0.332
#> GSM1105444     2  0.0000     0.8000 0.000 1.000
#> GSM1105513     2  0.0000     0.8000 0.000 1.000
#> GSM1105516     2  0.6343     0.7176 0.160 0.840
#> GSM1105520     2  0.6343     0.7176 0.160 0.840
#> GSM1105524     1  0.9170     0.9918 0.668 0.332
#> GSM1105536     2  0.0000     0.8000 0.000 1.000
#> GSM1105537     1  0.9170     0.9918 0.668 0.332
#> GSM1105540     1  0.9977     0.6898 0.528 0.472
#> GSM1105544     2  0.6343     0.7176 0.160 0.840
#> GSM1105445     2  0.6343     0.7176 0.160 0.840
#> GSM1105553     2  0.6343     0.7176 0.160 0.840
#> GSM1105556     1  0.9170     0.9918 0.668 0.332
#> GSM1105557     2  0.0000     0.8000 0.000 1.000
#> GSM1105449     2  0.0000     0.8000 0.000 1.000
#> GSM1105469     2  0.6438     0.7106 0.164 0.836
#> GSM1105472     2  0.9170     0.5443 0.332 0.668
#> GSM1105473     1  0.9170     0.9918 0.668 0.332
#> GSM1105476     2  0.2423     0.7768 0.040 0.960
#> GSM1105477     2  0.0000     0.8000 0.000 1.000
#> GSM1105478     2  0.6343     0.7176 0.160 0.840
#> GSM1105510     2  0.0000     0.8000 0.000 1.000
#> GSM1105530     1  0.9170     0.9918 0.668 0.332
#> GSM1105539     1  0.9170     0.9918 0.668 0.332
#> GSM1105480     2  0.6343     0.7176 0.160 0.840
#> GSM1105512     1  0.9170     0.9918 0.668 0.332
#> GSM1105532     1  0.9170     0.9918 0.668 0.332
#> GSM1105541     1  0.9170     0.9918 0.668 0.332
#> GSM1105439     2  0.0000     0.8000 0.000 1.000
#> GSM1105463     1  0.9170     0.9918 0.668 0.332
#> GSM1105482     1  0.9170     0.9918 0.668 0.332
#> GSM1105483     2  0.6343     0.7176 0.160 0.840
#> GSM1105494     2  0.6343     0.7176 0.160 0.840
#> GSM1105503     2  0.6343     0.7176 0.160 0.840
#> GSM1105507     1  0.9170     0.9918 0.668 0.332
#> GSM1105446     2  0.2043     0.7823 0.032 0.968
#> GSM1105519     1  0.9170     0.9918 0.668 0.332
#> GSM1105526     2  0.0000     0.8000 0.000 1.000
#> GSM1105527     2  0.6343     0.7176 0.160 0.840
#> GSM1105531     1  0.9209     0.9855 0.664 0.336
#> GSM1105543     2  0.2603     0.7739 0.044 0.956
#> GSM1105546     1  0.9170     0.9918 0.668 0.332
#> GSM1105547     1  0.9170     0.9918 0.668 0.332
#> GSM1105455     2  0.0000     0.8000 0.000 1.000
#> GSM1105458     2  0.6148     0.7233 0.152 0.848
#> GSM1105459     2  0.9170     0.5443 0.332 0.668
#> GSM1105462     2  0.6343     0.7176 0.160 0.840
#> GSM1105441     2  0.7674     0.6238 0.224 0.776
#> GSM1105465     2  0.6343     0.7176 0.160 0.840
#> GSM1105484     2  0.0000     0.8000 0.000 1.000
#> GSM1105485     2  0.4161     0.7661 0.084 0.916
#> GSM1105496     2  0.6438     0.7106 0.164 0.836
#> GSM1105505     2  0.9427     0.0161 0.360 0.640
#> GSM1105509     1  0.9170     0.9918 0.668 0.332
#> GSM1105448     2  0.2043     0.7823 0.032 0.968
#> GSM1105521     1  0.9170     0.9918 0.668 0.332
#> GSM1105528     2  0.0000     0.8000 0.000 1.000
#> GSM1105529     2  0.0000     0.8000 0.000 1.000
#> GSM1105533     1  0.9170     0.9918 0.668 0.332
#> GSM1105545     2  0.0000     0.8000 0.000 1.000
#> GSM1105548     1  0.9170     0.9918 0.668 0.332
#> GSM1105549     1  0.9170     0.9918 0.668 0.332
#> GSM1105457     2  0.0000     0.8000 0.000 1.000
#> GSM1105460     2  0.0000     0.8000 0.000 1.000
#> GSM1105461     2  0.9170     0.5443 0.332 0.668
#> GSM1105464     1  0.9170     0.9918 0.668 0.332
#> GSM1105466     2  0.2043     0.7904 0.032 0.968
#> GSM1105479     2  0.0376     0.7991 0.004 0.996
#> GSM1105502     1  0.9170     0.9918 0.668 0.332
#> GSM1105515     1  0.9170     0.9918 0.668 0.332
#> GSM1105523     1  0.9170     0.9918 0.668 0.332
#> GSM1105550     2  0.6343     0.7176 0.160 0.840
#> GSM1105450     2  0.9170     0.5443 0.332 0.668
#> GSM1105451     2  0.9170     0.5443 0.332 0.668
#> GSM1105454     2  0.6343     0.7176 0.160 0.840
#> GSM1105468     2  0.9170     0.5443 0.332 0.668
#> GSM1105481     2  0.6343     0.7176 0.160 0.840
#> GSM1105504     1  0.9661     0.8836 0.608 0.392
#> GSM1105517     1  0.9170     0.9918 0.668 0.332
#> GSM1105525     1  0.9170     0.9918 0.668 0.332
#> GSM1105552     1  0.9170     0.9918 0.668 0.332
#> GSM1105452     2  0.0000     0.8000 0.000 1.000
#> GSM1105453     2  0.9170     0.5443 0.332 0.668
#> GSM1105456     2  0.6343     0.7176 0.160 0.840

show/hide code output

cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#>            class entropy silhouette    p1    p2    p3
#> GSM1105438     2  0.6192     -0.319 0.000 0.580 0.420
#> GSM1105486     3  0.5529      0.966 0.000 0.296 0.704
#> GSM1105487     1  0.0237      0.917 0.996 0.000 0.004
#> GSM1105490     2  0.0000      0.793 0.000 1.000 0.000
#> GSM1105491     2  0.6473      0.682 0.020 0.668 0.312
#> GSM1105495     2  0.6326      0.689 0.020 0.688 0.292
#> GSM1105498     2  0.3987      0.768 0.020 0.872 0.108
#> GSM1105499     1  0.0000      0.918 1.000 0.000 0.000
#> GSM1105506     2  0.0000      0.793 0.000 1.000 0.000
#> GSM1105442     2  0.4063      0.769 0.020 0.868 0.112
#> GSM1105511     2  0.0000      0.793 0.000 1.000 0.000
#> GSM1105514     3  0.5529      0.966 0.000 0.296 0.704
#> GSM1105518     2  0.5036      0.736 0.020 0.808 0.172
#> GSM1105522     1  0.0000      0.918 1.000 0.000 0.000
#> GSM1105534     1  0.0000      0.918 1.000 0.000 0.000
#> GSM1105535     1  0.0000      0.918 1.000 0.000 0.000
#> GSM1105538     1  0.0000      0.918 1.000 0.000 0.000
#> GSM1105542     2  0.3425      0.761 0.004 0.884 0.112
#> GSM1105443     2  0.1643      0.773 0.000 0.956 0.044
#> GSM1105551     1  0.4062      0.859 0.836 0.000 0.164
#> GSM1105554     1  0.0000      0.918 1.000 0.000 0.000
#> GSM1105555     1  0.4235      0.853 0.824 0.000 0.176
#> GSM1105447     2  0.0747      0.790 0.000 0.984 0.016
#> GSM1105467     2  0.5529      0.262 0.000 0.704 0.296
#> GSM1105470     3  0.5529      0.966 0.000 0.296 0.704
#> GSM1105471     2  0.5147      0.732 0.020 0.800 0.180
#> GSM1105474     3  0.5529      0.966 0.000 0.296 0.704
#> GSM1105475     2  0.4842      0.455 0.000 0.776 0.224
#> GSM1105440     1  0.0000      0.918 1.000 0.000 0.000
#> GSM1105488     2  0.3267      0.759 0.000 0.884 0.116
#> GSM1105489     1  0.4002      0.861 0.840 0.000 0.160
#> GSM1105492     1  0.0000      0.918 1.000 0.000 0.000
#> GSM1105493     1  0.4235      0.853 0.824 0.000 0.176
#> GSM1105497     2  0.4063      0.769 0.020 0.868 0.112
#> GSM1105500     2  0.0747      0.795 0.016 0.984 0.000
#> GSM1105501     2  0.0000      0.793 0.000 1.000 0.000
#> GSM1105508     1  0.0000      0.918 1.000 0.000 0.000
#> GSM1105444     2  0.3340      0.729 0.000 0.880 0.120
#> GSM1105513     2  0.0848      0.794 0.008 0.984 0.008
#> GSM1105516     2  0.2165      0.783 0.064 0.936 0.000
#> GSM1105520     2  0.5899      0.697 0.020 0.736 0.244
#> GSM1105524     1  0.0000      0.918 1.000 0.000 0.000
#> GSM1105536     2  0.1643      0.776 0.000 0.956 0.044
#> GSM1105537     1  0.0000      0.918 1.000 0.000 0.000
#> GSM1105540     2  0.5882      0.551 0.348 0.652 0.000
#> GSM1105544     2  0.0747      0.795 0.016 0.984 0.000
#> GSM1105445     2  0.1482      0.797 0.020 0.968 0.012
#> GSM1105553     2  0.5899      0.697 0.020 0.736 0.244
#> GSM1105556     1  0.0000      0.918 1.000 0.000 0.000
#> GSM1105557     2  0.0000      0.793 0.000 1.000 0.000
#> GSM1105449     2  0.2959      0.733 0.000 0.900 0.100
#> GSM1105469     2  0.4062      0.712 0.164 0.836 0.000
#> GSM1105472     3  0.5529      0.966 0.000 0.296 0.704
#> GSM1105473     1  0.8307      0.601 0.632 0.192 0.176
#> GSM1105476     3  0.6008      0.877 0.000 0.372 0.628
#> GSM1105477     2  0.2066      0.768 0.000 0.940 0.060
#> GSM1105478     2  0.0892      0.796 0.020 0.980 0.000
#> GSM1105510     2  0.2446      0.775 0.012 0.936 0.052
#> GSM1105530     1  0.4178      0.856 0.828 0.000 0.172
#> GSM1105539     1  0.4291      0.850 0.820 0.000 0.180
#> GSM1105480     2  0.0424      0.795 0.008 0.992 0.000
#> GSM1105512     1  0.0000      0.918 1.000 0.000 0.000
#> GSM1105532     1  0.4235      0.853 0.824 0.000 0.176
#> GSM1105541     1  0.4235      0.853 0.824 0.000 0.176
#> GSM1105439     2  0.1860      0.766 0.000 0.948 0.052
#> GSM1105463     2  0.8460      0.592 0.148 0.608 0.244
#> GSM1105482     1  0.0000      0.918 1.000 0.000 0.000
#> GSM1105483     2  0.0000      0.793 0.000 1.000 0.000
#> GSM1105494     2  0.0747      0.795 0.016 0.984 0.000
#> GSM1105503     2  0.5899      0.697 0.020 0.736 0.244
#> GSM1105507     2  0.5948      0.539 0.360 0.640 0.000
#> GSM1105446     2  0.3941      0.655 0.000 0.844 0.156
#> GSM1105519     1  0.0000      0.918 1.000 0.000 0.000
#> GSM1105526     2  0.0000      0.793 0.000 1.000 0.000
#> GSM1105527     2  0.0000      0.793 0.000 1.000 0.000
#> GSM1105531     2  0.7944      0.631 0.112 0.644 0.244
#> GSM1105543     3  0.6008      0.873 0.000 0.372 0.628
#> GSM1105546     1  0.0000      0.918 1.000 0.000 0.000
#> GSM1105547     1  0.0000      0.918 1.000 0.000 0.000
#> GSM1105455     2  0.1964      0.762 0.000 0.944 0.056
#> GSM1105458     2  0.0747      0.795 0.016 0.984 0.000
#> GSM1105459     3  0.5529      0.966 0.000 0.296 0.704
#> GSM1105462     2  0.5687      0.709 0.020 0.756 0.224
#> GSM1105441     3  0.5560      0.963 0.000 0.300 0.700
#> GSM1105465     2  0.6387      0.690 0.020 0.680 0.300
#> GSM1105484     2  0.3267      0.759 0.000 0.884 0.116
#> GSM1105485     2  0.3690      0.768 0.016 0.884 0.100
#> GSM1105496     2  0.5899      0.697 0.020 0.736 0.244
#> GSM1105505     2  0.7381      0.653 0.080 0.676 0.244
#> GSM1105509     1  0.0000      0.918 1.000 0.000 0.000
#> GSM1105448     3  0.6215      0.733 0.000 0.428 0.572
#> GSM1105521     1  0.0000      0.918 1.000 0.000 0.000
#> GSM1105528     2  0.3267      0.759 0.000 0.884 0.116
#> GSM1105529     2  0.3267      0.759 0.000 0.884 0.116
#> GSM1105533     1  0.4235      0.853 0.824 0.000 0.176
#> GSM1105545     2  0.0000      0.793 0.000 1.000 0.000
#> GSM1105548     1  0.0237      0.917 0.996 0.000 0.004
#> GSM1105549     1  0.0237      0.917 0.996 0.000 0.004
#> GSM1105457     2  0.0000      0.793 0.000 1.000 0.000
#> GSM1105460     2  0.0747      0.790 0.000 0.984 0.016
#> GSM1105461     3  0.5529      0.966 0.000 0.296 0.704
#> GSM1105464     1  0.4178      0.856 0.828 0.000 0.172
#> GSM1105466     2  0.0000      0.793 0.000 1.000 0.000
#> GSM1105479     2  0.0747      0.795 0.016 0.984 0.000
#> GSM1105502     1  0.4235      0.853 0.824 0.000 0.176
#> GSM1105515     1  0.0000      0.918 1.000 0.000 0.000
#> GSM1105523     2  0.7633      0.644 0.132 0.684 0.184
#> GSM1105550     2  0.4504      0.698 0.196 0.804 0.000
#> GSM1105450     3  0.5529      0.966 0.000 0.296 0.704
#> GSM1105451     3  0.5529      0.966 0.000 0.296 0.704
#> GSM1105454     2  0.5899      0.697 0.020 0.736 0.244
#> GSM1105468     3  0.5529      0.966 0.000 0.296 0.704
#> GSM1105481     2  0.5899      0.697 0.020 0.736 0.244
#> GSM1105504     2  0.7880      0.634 0.108 0.648 0.244
#> GSM1105517     2  0.5948      0.539 0.360 0.640 0.000
#> GSM1105525     1  0.8792      0.484 0.580 0.244 0.176
#> GSM1105552     2  0.8263      0.598 0.188 0.636 0.176
#> GSM1105452     2  0.3267      0.759 0.000 0.884 0.116
#> GSM1105453     3  0.5529      0.966 0.000 0.296 0.704
#> GSM1105456     2  0.5899      0.697 0.020 0.736 0.244

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>            class entropy silhouette    p1    p2    p3    p4
#> GSM1105438     2  0.3688     0.8494 0.000 0.792 0.208 0.000
#> GSM1105486     2  0.2868     0.9212 0.000 0.864 0.136 0.000
#> GSM1105487     1  0.5136     0.8245 0.780 0.012 0.128 0.080
#> GSM1105490     3  0.5213     0.6193 0.000 0.020 0.652 0.328
#> GSM1105491     4  0.5526     0.7175 0.000 0.020 0.416 0.564
#> GSM1105495     3  0.4568     0.4361 0.000 0.124 0.800 0.076
#> GSM1105498     3  0.2480     0.6164 0.000 0.008 0.904 0.088
#> GSM1105499     1  0.0000     0.8342 1.000 0.000 0.000 0.000
#> GSM1105506     3  0.5213     0.6193 0.000 0.020 0.652 0.328
#> GSM1105442     4  0.5592     0.7325 0.000 0.024 0.404 0.572
#> GSM1105511     3  0.5213     0.6193 0.000 0.020 0.652 0.328
#> GSM1105514     2  0.2999     0.9169 0.000 0.864 0.132 0.004
#> GSM1105518     3  0.1743     0.5387 0.000 0.004 0.940 0.056
#> GSM1105522     1  0.2466     0.8371 0.900 0.000 0.096 0.004
#> GSM1105534     1  0.0000     0.8342 1.000 0.000 0.000 0.000
#> GSM1105535     1  0.0000     0.8342 1.000 0.000 0.000 0.000
#> GSM1105538     1  0.0000     0.8342 1.000 0.000 0.000 0.000
#> GSM1105542     4  0.7138     0.8075 0.000 0.164 0.296 0.540
#> GSM1105443     3  0.6407     0.5733 0.000 0.148 0.648 0.204
#> GSM1105551     1  0.5431     0.8177 0.756 0.012 0.152 0.080
#> GSM1105554     1  0.0000     0.8342 1.000 0.000 0.000 0.000
#> GSM1105555     1  0.5431     0.8177 0.756 0.012 0.152 0.080
#> GSM1105447     3  0.3351     0.5123 0.000 0.148 0.844 0.008
#> GSM1105467     2  0.4804     0.7189 0.000 0.708 0.276 0.016
#> GSM1105470     2  0.2868     0.9212 0.000 0.864 0.136 0.000
#> GSM1105471     3  0.2973     0.5817 0.000 0.000 0.856 0.144
#> GSM1105474     2  0.2868     0.9212 0.000 0.864 0.136 0.000
#> GSM1105475     3  0.7485     0.1997 0.000 0.336 0.472 0.192
#> GSM1105440     1  0.0000     0.8342 1.000 0.000 0.000 0.000
#> GSM1105488     4  0.7138     0.8075 0.000 0.164 0.296 0.540
#> GSM1105489     1  0.5366     0.8185 0.760 0.012 0.152 0.076
#> GSM1105492     1  0.0000     0.8342 1.000 0.000 0.000 0.000
#> GSM1105493     1  0.5166     0.8004 0.756 0.012 0.188 0.044
#> GSM1105497     4  0.5691     0.7417 0.000 0.024 0.468 0.508
#> GSM1105500     3  0.3523     0.5874 0.000 0.032 0.856 0.112
#> GSM1105501     3  0.5193     0.6204 0.000 0.020 0.656 0.324
#> GSM1105508     1  0.1474     0.8342 0.948 0.000 0.052 0.000
#> GSM1105444     2  0.5396     0.2373 0.000 0.524 0.464 0.012
#> GSM1105513     3  0.6327     0.5841 0.000 0.132 0.652 0.216
#> GSM1105516     3  0.3902     0.5889 0.012 0.020 0.840 0.128
#> GSM1105520     3  0.4499     0.4395 0.000 0.124 0.804 0.072
#> GSM1105524     1  0.0000     0.8342 1.000 0.000 0.000 0.000
#> GSM1105536     3  0.3763     0.5956 0.000 0.024 0.832 0.144
#> GSM1105537     1  0.0000     0.8342 1.000 0.000 0.000 0.000
#> GSM1105540     3  0.3982     0.3794 0.220 0.000 0.776 0.004
#> GSM1105544     3  0.2563     0.5910 0.000 0.020 0.908 0.072
#> GSM1105445     3  0.4284     0.6269 0.000 0.020 0.780 0.200
#> GSM1105553     3  0.4568     0.4361 0.000 0.124 0.800 0.076
#> GSM1105556     1  0.0000     0.8342 1.000 0.000 0.000 0.000
#> GSM1105557     3  0.5213     0.6193 0.000 0.020 0.652 0.328
#> GSM1105449     3  0.4948    -0.0687 0.000 0.440 0.560 0.000
#> GSM1105469     3  0.5377     0.6236 0.024 0.008 0.684 0.284
#> GSM1105472     2  0.2868     0.9212 0.000 0.864 0.136 0.000
#> GSM1105473     1  0.5931     0.6821 0.660 0.012 0.284 0.044
#> GSM1105476     2  0.3583     0.8826 0.000 0.816 0.180 0.004
#> GSM1105477     3  0.4030     0.5682 0.000 0.072 0.836 0.092
#> GSM1105478     3  0.4323     0.6297 0.000 0.020 0.776 0.204
#> GSM1105510     3  0.7362    -0.6050 0.000 0.164 0.464 0.372
#> GSM1105530     1  0.5431     0.8177 0.756 0.012 0.152 0.080
#> GSM1105539     1  0.5431     0.8177 0.756 0.012 0.152 0.080
#> GSM1105480     3  0.5213     0.6193 0.000 0.020 0.652 0.328
#> GSM1105512     1  0.0000     0.8342 1.000 0.000 0.000 0.000
#> GSM1105532     1  0.5431     0.8177 0.756 0.012 0.152 0.080
#> GSM1105541     1  0.5431     0.8177 0.756 0.012 0.152 0.080
#> GSM1105439     3  0.6386     0.5781 0.000 0.140 0.648 0.212
#> GSM1105463     1  0.8428     0.1866 0.408 0.132 0.400 0.060
#> GSM1105482     1  0.3032     0.8359 0.868 0.000 0.124 0.008
#> GSM1105483     3  0.5193     0.6204 0.000 0.020 0.656 0.324
#> GSM1105494     3  0.4323     0.6297 0.000 0.020 0.776 0.204
#> GSM1105503     3  0.4552     0.4358 0.000 0.128 0.800 0.072
#> GSM1105507     1  0.5432     0.6787 0.740 0.000 0.136 0.124
#> GSM1105446     2  0.6967     0.5155 0.000 0.580 0.244 0.176
#> GSM1105519     1  0.0921     0.8344 0.972 0.000 0.028 0.000
#> GSM1105526     3  0.4121     0.6134 0.000 0.020 0.796 0.184
#> GSM1105527     3  0.5213     0.6193 0.000 0.020 0.652 0.328
#> GSM1105531     3  0.4586     0.4304 0.000 0.136 0.796 0.068
#> GSM1105543     2  0.2868     0.9212 0.000 0.864 0.136 0.000
#> GSM1105546     1  0.0000     0.8342 1.000 0.000 0.000 0.000
#> GSM1105547     1  0.1474     0.8416 0.948 0.000 0.052 0.000
#> GSM1105455     3  0.6407     0.5733 0.000 0.148 0.648 0.204
#> GSM1105458     3  0.0921     0.5635 0.000 0.028 0.972 0.000
#> GSM1105459     2  0.2868     0.9212 0.000 0.864 0.136 0.000
#> GSM1105462     3  0.3934     0.4650 0.000 0.116 0.836 0.048
#> GSM1105441     2  0.3400     0.8851 0.000 0.820 0.180 0.000
#> GSM1105465     4  0.5517     0.7206 0.000 0.020 0.412 0.568
#> GSM1105484     4  0.7272     0.8077 0.000 0.160 0.344 0.496
#> GSM1105485     4  0.7245     0.8153 0.000 0.164 0.324 0.512
#> GSM1105496     3  0.4568     0.4361 0.000 0.124 0.800 0.076
#> GSM1105505     3  0.4514     0.4345 0.000 0.136 0.800 0.064
#> GSM1105509     1  0.1302     0.8327 0.956 0.000 0.044 0.000
#> GSM1105448     2  0.3052     0.9152 0.000 0.860 0.136 0.004
#> GSM1105521     1  0.0188     0.8350 0.996 0.000 0.004 0.000
#> GSM1105528     3  0.7423    -0.6624 0.000 0.168 0.428 0.404
#> GSM1105529     4  0.7314     0.7928 0.000 0.164 0.348 0.488
#> GSM1105533     1  0.5431     0.8177 0.756 0.012 0.152 0.080
#> GSM1105545     3  0.4988     0.6255 0.000 0.020 0.692 0.288
#> GSM1105548     1  0.4462     0.8141 0.792 0.000 0.164 0.044
#> GSM1105549     1  0.4507     0.8120 0.788 0.000 0.168 0.044
#> GSM1105457     3  0.5213     0.6193 0.000 0.020 0.652 0.328
#> GSM1105460     3  0.6440     0.5736 0.000 0.148 0.644 0.208
#> GSM1105461     2  0.2868     0.9212 0.000 0.864 0.136 0.000
#> GSM1105464     1  0.5206     0.8027 0.756 0.012 0.184 0.048
#> GSM1105466     3  0.5213     0.6193 0.000 0.020 0.652 0.328
#> GSM1105479     3  0.4459     0.6306 0.000 0.032 0.780 0.188
#> GSM1105502     1  0.5431     0.8177 0.756 0.012 0.152 0.080
#> GSM1105515     1  0.0000     0.8342 1.000 0.000 0.000 0.000
#> GSM1105523     3  0.5096     0.4214 0.076 0.072 0.804 0.048
#> GSM1105550     3  0.2131     0.5880 0.032 0.000 0.932 0.036
#> GSM1105450     2  0.2868     0.9212 0.000 0.864 0.136 0.000
#> GSM1105451     2  0.2868     0.9212 0.000 0.864 0.136 0.000
#> GSM1105454     3  0.4568     0.4361 0.000 0.124 0.800 0.076
#> GSM1105468     2  0.2868     0.9212 0.000 0.864 0.136 0.000
#> GSM1105481     3  0.4568     0.4361 0.000 0.124 0.800 0.076
#> GSM1105504     3  0.4514     0.4345 0.000 0.136 0.800 0.064
#> GSM1105517     3  0.4776     0.2383 0.376 0.000 0.624 0.000
#> GSM1105525     1  0.6274     0.5950 0.604 0.012 0.336 0.048
#> GSM1105552     1  0.6457     0.3851 0.516 0.012 0.428 0.044
#> GSM1105452     4  0.7138     0.8075 0.000 0.164 0.296 0.540
#> GSM1105453     2  0.2868     0.9212 0.000 0.864 0.136 0.000
#> GSM1105456     3  0.4568     0.4361 0.000 0.124 0.800 0.076

show/hide code output

cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#>            class entropy silhouette    p1    p2    p3    p4    p5
#> GSM1105438     2  0.0566      0.932 0.000 0.984 0.000 0.004 0.012
#> GSM1105486     2  0.0162      0.939 0.000 0.996 0.000 0.004 0.000
#> GSM1105487     1  0.3231      0.825 0.800 0.004 0.196 0.000 0.000
#> GSM1105490     4  0.0000      0.830 0.000 0.000 0.000 1.000 0.000
#> GSM1105491     5  0.0955      0.721 0.000 0.004 0.028 0.000 0.968
#> GSM1105495     3  0.2966      0.807 0.000 0.000 0.816 0.000 0.184
#> GSM1105498     4  0.2648      0.789 0.000 0.000 0.152 0.848 0.000
#> GSM1105499     1  0.0000      0.863 1.000 0.000 0.000 0.000 0.000
#> GSM1105506     4  0.0000      0.830 0.000 0.000 0.000 1.000 0.000
#> GSM1105442     5  0.1357      0.794 0.000 0.048 0.004 0.000 0.948
#> GSM1105511     4  0.1341      0.831 0.000 0.000 0.056 0.944 0.000
#> GSM1105514     2  0.0162      0.939 0.000 0.996 0.000 0.004 0.000
#> GSM1105518     4  0.6416      0.167 0.000 0.000 0.356 0.464 0.180
#> GSM1105522     1  0.0162      0.864 0.996 0.000 0.004 0.000 0.000
#> GSM1105534     1  0.0000      0.863 1.000 0.000 0.000 0.000 0.000
#> GSM1105535     1  0.0162      0.863 0.996 0.000 0.000 0.000 0.004
#> GSM1105538     1  0.0000      0.863 1.000 0.000 0.000 0.000 0.000
#> GSM1105542     5  0.3160      0.885 0.000 0.188 0.004 0.000 0.808
#> GSM1105443     4  0.3398      0.704 0.000 0.216 0.000 0.780 0.004
#> GSM1105551     1  0.3398      0.818 0.780 0.004 0.216 0.000 0.000
#> GSM1105554     1  0.0000      0.863 1.000 0.000 0.000 0.000 0.000
#> GSM1105555     1  0.3366      0.820 0.784 0.004 0.212 0.000 0.000
#> GSM1105447     4  0.5614      0.680 0.000 0.216 0.112 0.660 0.012
#> GSM1105467     2  0.4182      0.367 0.000 0.644 0.000 0.352 0.004
#> GSM1105470     2  0.0162      0.939 0.000 0.996 0.000 0.004 0.000
#> GSM1105471     4  0.5841      0.391 0.000 0.000 0.212 0.608 0.180
#> GSM1105474     2  0.0162      0.939 0.000 0.996 0.000 0.004 0.000
#> GSM1105475     4  0.3274      0.704 0.000 0.220 0.000 0.780 0.000
#> GSM1105440     1  0.0000      0.863 1.000 0.000 0.000 0.000 0.000
#> GSM1105488     5  0.3160      0.885 0.000 0.188 0.004 0.000 0.808
#> GSM1105489     1  0.3300      0.823 0.792 0.004 0.204 0.000 0.000
#> GSM1105492     1  0.0000      0.863 1.000 0.000 0.000 0.000 0.000
#> GSM1105493     1  0.3366      0.820 0.784 0.004 0.212 0.000 0.000
#> GSM1105497     5  0.0451      0.749 0.000 0.008 0.004 0.000 0.988
#> GSM1105500     4  0.2516      0.795 0.000 0.000 0.140 0.860 0.000
#> GSM1105501     4  0.1121      0.832 0.000 0.000 0.044 0.956 0.000
#> GSM1105508     1  0.0324      0.864 0.992 0.000 0.004 0.004 0.000
#> GSM1105444     2  0.0671      0.925 0.000 0.980 0.004 0.000 0.016
#> GSM1105513     4  0.0162      0.831 0.000 0.004 0.000 0.996 0.000
#> GSM1105516     1  0.5771      0.409 0.572 0.000 0.112 0.316 0.000
#> GSM1105520     3  0.4444      0.751 0.000 0.000 0.748 0.072 0.180
#> GSM1105524     1  0.0162      0.863 0.996 0.000 0.000 0.000 0.004
#> GSM1105536     4  0.2230      0.810 0.000 0.000 0.116 0.884 0.000
#> GSM1105537     1  0.0162      0.863 0.996 0.000 0.000 0.000 0.004
#> GSM1105540     1  0.5644      0.529 0.628 0.000 0.144 0.228 0.000
#> GSM1105544     4  0.2953      0.787 0.012 0.000 0.144 0.844 0.000
#> GSM1105445     4  0.5136      0.621 0.000 0.000 0.128 0.692 0.180
#> GSM1105553     3  0.2929      0.807 0.000 0.000 0.820 0.000 0.180
#> GSM1105556     1  0.0000      0.863 1.000 0.000 0.000 0.000 0.000
#> GSM1105557     4  0.0000      0.830 0.000 0.000 0.000 1.000 0.000
#> GSM1105449     2  0.3618      0.666 0.000 0.788 0.004 0.196 0.012
#> GSM1105469     4  0.2230      0.810 0.000 0.000 0.116 0.884 0.000
#> GSM1105472     2  0.0162      0.939 0.000 0.996 0.000 0.004 0.000
#> GSM1105473     1  0.3366      0.820 0.784 0.004 0.212 0.000 0.000
#> GSM1105476     2  0.0290      0.936 0.000 0.992 0.000 0.008 0.000
#> GSM1105477     4  0.4679      0.754 0.000 0.124 0.136 0.740 0.000
#> GSM1105478     4  0.0290      0.831 0.000 0.000 0.008 0.992 0.000
#> GSM1105510     5  0.3317      0.882 0.000 0.188 0.004 0.004 0.804
#> GSM1105530     1  0.3366      0.820 0.784 0.004 0.212 0.000 0.000
#> GSM1105539     1  0.3398      0.818 0.780 0.004 0.216 0.000 0.000
#> GSM1105480     4  0.0510      0.833 0.000 0.000 0.016 0.984 0.000
#> GSM1105512     1  0.0000      0.863 1.000 0.000 0.000 0.000 0.000
#> GSM1105532     1  0.3398      0.818 0.780 0.004 0.216 0.000 0.000
#> GSM1105541     1  0.3398      0.818 0.780 0.004 0.216 0.000 0.000
#> GSM1105439     4  0.3109      0.725 0.000 0.200 0.000 0.800 0.000
#> GSM1105463     1  0.4321      0.602 0.600 0.004 0.396 0.000 0.000
#> GSM1105482     1  0.0162      0.864 0.996 0.000 0.004 0.000 0.000
#> GSM1105483     4  0.1851      0.822 0.000 0.000 0.088 0.912 0.000
#> GSM1105494     4  0.0324      0.831 0.000 0.000 0.004 0.992 0.004
#> GSM1105503     3  0.2970      0.805 0.000 0.000 0.828 0.004 0.168
#> GSM1105507     1  0.3671      0.694 0.756 0.000 0.008 0.236 0.000
#> GSM1105446     2  0.3300      0.651 0.000 0.792 0.000 0.004 0.204
#> GSM1105519     1  0.0162      0.864 0.996 0.000 0.004 0.000 0.000
#> GSM1105526     4  0.2074      0.816 0.000 0.000 0.104 0.896 0.000
#> GSM1105527     4  0.0794      0.833 0.000 0.000 0.028 0.972 0.000
#> GSM1105531     3  0.0000      0.700 0.000 0.000 1.000 0.000 0.000
#> GSM1105543     2  0.0162      0.939 0.000 0.996 0.000 0.004 0.000
#> GSM1105546     1  0.0000      0.863 1.000 0.000 0.000 0.000 0.000
#> GSM1105547     1  0.0162      0.864 0.996 0.000 0.004 0.000 0.000
#> GSM1105455     4  0.3274      0.704 0.000 0.220 0.000 0.780 0.000
#> GSM1105458     4  0.6308      0.626 0.000 0.044 0.144 0.632 0.180
#> GSM1105459     2  0.0162      0.939 0.000 0.996 0.000 0.004 0.000
#> GSM1105462     3  0.8114      0.342 0.168 0.004 0.432 0.260 0.136
#> GSM1105441     2  0.0566      0.932 0.000 0.984 0.000 0.004 0.012
#> GSM1105465     5  0.0865      0.725 0.000 0.004 0.024 0.000 0.972
#> GSM1105484     5  0.3366      0.863 0.000 0.212 0.004 0.000 0.784
#> GSM1105485     5  0.3160      0.885 0.000 0.188 0.004 0.000 0.808
#> GSM1105496     3  0.2929      0.807 0.000 0.000 0.820 0.000 0.180
#> GSM1105505     3  0.0671      0.689 0.016 0.004 0.980 0.000 0.000
#> GSM1105509     1  0.0162      0.864 0.996 0.000 0.004 0.000 0.000
#> GSM1105448     2  0.0451      0.934 0.000 0.988 0.000 0.004 0.008
#> GSM1105521     1  0.0000      0.863 1.000 0.000 0.000 0.000 0.000
#> GSM1105528     5  0.3585      0.848 0.000 0.220 0.004 0.004 0.772
#> GSM1105529     5  0.3317      0.882 0.000 0.188 0.004 0.004 0.804
#> GSM1105533     1  0.3398      0.818 0.780 0.004 0.216 0.000 0.000
#> GSM1105545     4  0.1544      0.828 0.000 0.000 0.068 0.932 0.000
#> GSM1105548     1  0.0880      0.861 0.968 0.000 0.032 0.000 0.000
#> GSM1105549     1  0.0794      0.861 0.972 0.000 0.028 0.000 0.000
#> GSM1105457     4  0.0000      0.830 0.000 0.000 0.000 1.000 0.000
#> GSM1105460     4  0.3554      0.703 0.000 0.216 0.004 0.776 0.004
#> GSM1105461     2  0.0162      0.939 0.000 0.996 0.000 0.004 0.000
#> GSM1105464     1  0.3366      0.820 0.784 0.004 0.212 0.000 0.000
#> GSM1105466     4  0.0000      0.830 0.000 0.000 0.000 1.000 0.000
#> GSM1105479     4  0.3474      0.724 0.000 0.192 0.004 0.796 0.008
#> GSM1105502     1  0.3398      0.818 0.780 0.004 0.216 0.000 0.000
#> GSM1105515     1  0.0000      0.863 1.000 0.000 0.000 0.000 0.000
#> GSM1105523     1  0.4299      0.616 0.608 0.004 0.388 0.000 0.000
#> GSM1105550     4  0.2674      0.794 0.004 0.000 0.140 0.856 0.000
#> GSM1105450     2  0.0162      0.939 0.000 0.996 0.000 0.004 0.000
#> GSM1105451     2  0.0162      0.939 0.000 0.996 0.000 0.004 0.000
#> GSM1105454     3  0.2966      0.807 0.000 0.000 0.816 0.000 0.184
#> GSM1105468     2  0.0162      0.939 0.000 0.996 0.000 0.004 0.000
#> GSM1105481     3  0.2966      0.807 0.000 0.000 0.816 0.000 0.184
#> GSM1105504     3  0.4410     -0.272 0.440 0.004 0.556 0.000 0.000
#> GSM1105517     1  0.1892      0.818 0.916 0.000 0.080 0.004 0.000
#> GSM1105525     1  0.4166      0.676 0.648 0.004 0.348 0.000 0.000
#> GSM1105552     1  0.3906      0.749 0.704 0.004 0.292 0.000 0.000
#> GSM1105452     5  0.3160      0.885 0.000 0.188 0.004 0.000 0.808
#> GSM1105453     2  0.0162      0.939 0.000 0.996 0.000 0.004 0.000
#> GSM1105456     3  0.2966      0.807 0.000 0.000 0.816 0.000 0.184

show/hide code output

cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#>            class entropy silhouette    p1    p2    p3    p4    p5    p6
#> GSM1105438     2  0.0000   0.887617 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1105486     2  0.0000   0.887617 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1105487     3  0.0547   0.650818 0.020 0.000 0.980 0.000 0.000 0.000
#> GSM1105490     4  0.3991   0.677500 0.472 0.000 0.000 0.524 0.000 0.004
#> GSM1105491     5  0.0260   0.786169 0.000 0.000 0.008 0.000 0.992 0.000
#> GSM1105495     6  0.0260   0.830570 0.000 0.000 0.008 0.000 0.000 0.992
#> GSM1105498     4  0.5899   0.553880 0.264 0.000 0.008 0.520 0.000 0.208
#> GSM1105499     3  0.3804   0.223711 0.424 0.000 0.576 0.000 0.000 0.000
#> GSM1105506     4  0.4093   0.674700 0.476 0.000 0.000 0.516 0.000 0.008
#> GSM1105442     5  0.0000   0.791422 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM1105511     4  0.3023   0.685746 0.232 0.000 0.000 0.768 0.000 0.000
#> GSM1105514     2  0.0000   0.887617 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1105518     6  0.2446   0.700646 0.012 0.000 0.000 0.124 0.000 0.864
#> GSM1105522     3  0.3706   0.288480 0.380 0.000 0.620 0.000 0.000 0.000
#> GSM1105534     1  0.3868  -0.094487 0.508 0.000 0.492 0.000 0.000 0.000
#> GSM1105535     3  0.3804   0.223711 0.424 0.000 0.576 0.000 0.000 0.000
#> GSM1105538     1  0.3868  -0.094487 0.508 0.000 0.492 0.000 0.000 0.000
#> GSM1105542     5  0.2527   0.879241 0.000 0.168 0.000 0.000 0.832 0.000
#> GSM1105443     1  0.5128  -0.425590 0.476 0.456 0.000 0.060 0.000 0.008
#> GSM1105551     3  0.0458   0.647247 0.016 0.000 0.984 0.000 0.000 0.000
#> GSM1105554     1  0.3868  -0.094487 0.508 0.000 0.492 0.000 0.000 0.000
#> GSM1105555     3  0.0146   0.653040 0.004 0.000 0.996 0.000 0.000 0.000
#> GSM1105447     2  0.5935   0.342908 0.376 0.488 0.000 0.032 0.000 0.104
#> GSM1105467     2  0.0551   0.876535 0.004 0.984 0.000 0.004 0.000 0.008
#> GSM1105470     2  0.0000   0.887617 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1105471     1  0.5508  -0.362946 0.440 0.000 0.000 0.128 0.000 0.432
#> GSM1105474     2  0.0000   0.887617 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1105475     2  0.3993   0.547115 0.300 0.676 0.000 0.024 0.000 0.000
#> GSM1105440     3  0.3804   0.223711 0.424 0.000 0.576 0.000 0.000 0.000
#> GSM1105488     5  0.2562   0.879283 0.000 0.172 0.000 0.000 0.828 0.000
#> GSM1105489     3  0.2135   0.610846 0.128 0.000 0.872 0.000 0.000 0.000
#> GSM1105492     3  0.3868   0.038756 0.496 0.000 0.504 0.000 0.000 0.000
#> GSM1105493     3  0.3671   0.542412 0.208 0.000 0.756 0.000 0.036 0.000
#> GSM1105497     5  0.0000   0.791422 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM1105500     4  0.2595   0.629206 0.004 0.000 0.160 0.836 0.000 0.000
#> GSM1105501     4  0.2092   0.663969 0.124 0.000 0.000 0.876 0.000 0.000
#> GSM1105508     3  0.5173   0.323588 0.224 0.000 0.616 0.160 0.000 0.000
#> GSM1105444     2  0.0000   0.887617 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1105513     4  0.4093   0.674700 0.476 0.000 0.000 0.516 0.000 0.008
#> GSM1105516     4  0.3151   0.562469 0.000 0.000 0.252 0.748 0.000 0.000
#> GSM1105520     6  0.0806   0.821952 0.000 0.000 0.008 0.020 0.000 0.972
#> GSM1105524     3  0.3804   0.223711 0.424 0.000 0.576 0.000 0.000 0.000
#> GSM1105536     4  0.0000   0.615331 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1105537     3  0.3804   0.223711 0.424 0.000 0.576 0.000 0.000 0.000
#> GSM1105540     4  0.3266   0.540831 0.000 0.000 0.272 0.728 0.000 0.000
#> GSM1105544     4  0.3050   0.584106 0.000 0.000 0.236 0.764 0.000 0.000
#> GSM1105445     1  0.5537  -0.375671 0.476 0.000 0.000 0.136 0.000 0.388
#> GSM1105553     6  0.0458   0.829944 0.000 0.000 0.016 0.000 0.000 0.984
#> GSM1105556     1  0.3868  -0.094487 0.508 0.000 0.492 0.000 0.000 0.000
#> GSM1105557     4  0.3857   0.679686 0.468 0.000 0.000 0.532 0.000 0.000
#> GSM1105449     2  0.0665   0.873394 0.008 0.980 0.000 0.004 0.000 0.008
#> GSM1105469     4  0.3758   0.466364 0.008 0.000 0.324 0.668 0.000 0.000
#> GSM1105472     2  0.0000   0.887617 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1105473     3  0.2048   0.614672 0.120 0.000 0.880 0.000 0.000 0.000
#> GSM1105476     2  0.0000   0.887617 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1105477     4  0.0865   0.596408 0.000 0.036 0.000 0.964 0.000 0.000
#> GSM1105478     4  0.4093   0.674700 0.476 0.000 0.000 0.516 0.000 0.008
#> GSM1105510     5  0.2562   0.879283 0.000 0.172 0.000 0.000 0.828 0.000
#> GSM1105530     3  0.0000   0.652986 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM1105539     3  0.0000   0.652986 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM1105480     4  0.3857   0.679686 0.468 0.000 0.000 0.532 0.000 0.000
#> GSM1105512     1  0.3868  -0.094487 0.508 0.000 0.492 0.000 0.000 0.000
#> GSM1105532     3  0.0000   0.652986 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM1105541     3  0.0458   0.647247 0.016 0.000 0.984 0.000 0.000 0.000
#> GSM1105439     2  0.4932   0.294784 0.472 0.476 0.000 0.044 0.000 0.008
#> GSM1105463     3  0.1814   0.602932 0.000 0.000 0.900 0.000 0.000 0.100
#> GSM1105482     1  0.3868  -0.094487 0.508 0.000 0.492 0.000 0.000 0.000
#> GSM1105483     4  0.3221   0.688611 0.264 0.000 0.000 0.736 0.000 0.000
#> GSM1105494     4  0.4093   0.674700 0.476 0.000 0.000 0.516 0.000 0.008
#> GSM1105503     6  0.0508   0.830300 0.000 0.000 0.012 0.004 0.000 0.984
#> GSM1105507     4  0.3499   0.469512 0.000 0.000 0.320 0.680 0.000 0.000
#> GSM1105446     2  0.2178   0.741225 0.000 0.868 0.000 0.000 0.132 0.000
#> GSM1105519     3  0.3864   0.087397 0.480 0.000 0.520 0.000 0.000 0.000
#> GSM1105526     4  0.0000   0.615331 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1105527     4  0.3857   0.679686 0.468 0.000 0.000 0.532 0.000 0.000
#> GSM1105531     6  0.3695   0.535418 0.000 0.000 0.376 0.000 0.000 0.624
#> GSM1105543     2  0.0000   0.887617 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1105546     1  0.3868  -0.094487 0.508 0.000 0.492 0.000 0.000 0.000
#> GSM1105547     1  0.3868  -0.094487 0.508 0.000 0.492 0.000 0.000 0.000
#> GSM1105455     2  0.4634   0.338007 0.472 0.496 0.000 0.024 0.000 0.008
#> GSM1105458     6  0.6552   0.000214 0.212 0.364 0.000 0.032 0.000 0.392
#> GSM1105459     2  0.0000   0.887617 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1105462     3  0.5336  -0.008185 0.000 0.000 0.544 0.124 0.000 0.332
#> GSM1105441     2  0.0000   0.887617 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1105465     5  0.0000   0.791422 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM1105484     5  0.2527   0.879241 0.000 0.168 0.000 0.000 0.832 0.000
#> GSM1105485     5  0.2562   0.879283 0.000 0.172 0.000 0.000 0.828 0.000
#> GSM1105496     6  0.0713   0.825432 0.000 0.000 0.028 0.000 0.000 0.972
#> GSM1105505     6  0.3727   0.519968 0.000 0.000 0.388 0.000 0.000 0.612
#> GSM1105509     3  0.3930   0.225122 0.420 0.000 0.576 0.004 0.000 0.000
#> GSM1105448     2  0.0000   0.887617 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1105521     1  0.3868  -0.094487 0.508 0.000 0.492 0.000 0.000 0.000
#> GSM1105528     5  0.3706   0.531467 0.000 0.380 0.000 0.000 0.620 0.000
#> GSM1105529     5  0.2762   0.860730 0.000 0.196 0.000 0.000 0.804 0.000
#> GSM1105533     3  0.0146   0.653040 0.004 0.000 0.996 0.000 0.000 0.000
#> GSM1105545     4  0.0000   0.615331 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1105548     3  0.3847   0.394798 0.348 0.000 0.644 0.000 0.008 0.000
#> GSM1105549     3  0.5132   0.163509 0.416 0.000 0.500 0.000 0.084 0.000
#> GSM1105457     4  0.4093   0.674700 0.476 0.000 0.000 0.516 0.000 0.008
#> GSM1105460     1  0.5711  -0.335505 0.472 0.392 0.000 0.128 0.000 0.008
#> GSM1105461     2  0.0000   0.887617 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1105464     3  0.0000   0.652986 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM1105466     4  0.4093   0.674700 0.476 0.000 0.000 0.516 0.000 0.008
#> GSM1105479     1  0.5886  -0.318453 0.476 0.376 0.000 0.132 0.000 0.016
#> GSM1105502     3  0.0458   0.647247 0.016 0.000 0.984 0.000 0.000 0.000
#> GSM1105515     1  0.3868  -0.094487 0.508 0.000 0.492 0.000 0.000 0.000
#> GSM1105523     3  0.2070   0.578985 0.000 0.000 0.896 0.092 0.000 0.012
#> GSM1105550     4  0.3240   0.578390 0.004 0.000 0.244 0.752 0.000 0.000
#> GSM1105450     2  0.0000   0.887617 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1105451     2  0.0000   0.887617 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1105454     6  0.0260   0.830570 0.000 0.000 0.008 0.000 0.000 0.992
#> GSM1105468     2  0.0000   0.887617 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1105481     6  0.0260   0.830570 0.000 0.000 0.008 0.000 0.000 0.992
#> GSM1105504     3  0.3672   0.120466 0.000 0.000 0.632 0.000 0.000 0.368
#> GSM1105517     4  0.5578   0.196096 0.184 0.000 0.276 0.540 0.000 0.000
#> GSM1105525     3  0.0000   0.652986 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM1105552     3  0.1610   0.624719 0.084 0.000 0.916 0.000 0.000 0.000
#> GSM1105452     5  0.2793   0.856530 0.000 0.200 0.000 0.000 0.800 0.000
#> GSM1105453     2  0.0000   0.887617 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1105456     6  0.0260   0.830570 0.000 0.000 0.008 0.000 0.000 0.992

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) other(p) time(p) individual(p) k
#> CV:mclust 119    1.000    0.386   0.795       0.00708 2
#> CV:mclust 116    0.148    0.867   0.941       0.00797 3
#> CV:mclust  98    0.586    0.769   0.374       0.03796 4
#> CV:mclust 114    0.556    0.802   0.617       0.00323 5
#> CV:mclust  84    0.594    0.200   0.778       0.02460 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 44956 rows and 120 columns.
#>   Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'CV' method.
#>   Subgroups are detected by 'NMF' method.
#>   Performed in total 1250 partitions by row resampling.
#>   Best k for subgroups seems to be 2.
#> 
#> Following methods can be applied to this 'ConsensusPartition' object:
#>  [1] "cola_report"             "collect_classes"         "collect_plots"          
#>  [4] "collect_stats"           "colnames"                "compare_signatures"     
#>  [7] "consensus_heatmap"       "dimension_reduction"     "functional_enrichment"  
#> [10] "get_anno_col"            "get_anno"                "get_classes"            
#> [13] "get_consensus"           "get_matrix"              "get_membership"         
#> [16] "get_param"               "get_signatures"          "get_stats"              
#> [19] "is_best_k"               "is_stable_k"             "membership_heatmap"     
#> [22] "ncol"                    "nrow"                    "plot_ecdf"              
#> [25] "rownames"                "select_partition_number" "show"                   
#> [28] "suggest_best_k"          "test_to_known_factors"

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

collect_plots(res)

plot of chunk CV-NMF-collect-plots

The plots are:

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

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

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

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

select_partition_number(res)

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

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

get_stats(res)
#>   k 1-PAC mean_silhouette concordance area_increased  Rand Jaccard
#> 2 2 0.882           0.923       0.968         0.4950 0.507   0.507
#> 3 3 0.511           0.482       0.672         0.3030 0.816   0.654
#> 4 4 0.698           0.764       0.887         0.1064 0.748   0.448
#> 5 5 0.646           0.704       0.828         0.0813 0.845   0.540
#> 6 6 0.564           0.400       0.651         0.0536 0.926   0.712

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
#> GSM1105438     2  0.0000      0.961 0.000 1.000
#> GSM1105486     2  0.0000      0.961 0.000 1.000
#> GSM1105487     1  0.0000      0.972 1.000 0.000
#> GSM1105490     2  0.0000      0.961 0.000 1.000
#> GSM1105491     2  0.9248      0.527 0.340 0.660
#> GSM1105495     2  0.7219      0.761 0.200 0.800
#> GSM1105498     2  0.8909      0.589 0.308 0.692
#> GSM1105499     1  0.0000      0.972 1.000 0.000
#> GSM1105506     2  0.0000      0.961 0.000 1.000
#> GSM1105442     2  0.0000      0.961 0.000 1.000
#> GSM1105511     2  0.0000      0.961 0.000 1.000
#> GSM1105514     2  0.0000      0.961 0.000 1.000
#> GSM1105518     2  0.0672      0.955 0.008 0.992
#> GSM1105522     1  0.0000      0.972 1.000 0.000
#> GSM1105534     1  0.0000      0.972 1.000 0.000
#> GSM1105535     1  0.0000      0.972 1.000 0.000
#> GSM1105538     1  0.0000      0.972 1.000 0.000
#> GSM1105542     2  0.0000      0.961 0.000 1.000
#> GSM1105443     2  0.0000      0.961 0.000 1.000
#> GSM1105551     1  0.0000      0.972 1.000 0.000
#> GSM1105554     1  0.0000      0.972 1.000 0.000
#> GSM1105555     1  0.0000      0.972 1.000 0.000
#> GSM1105447     2  0.0000      0.961 0.000 1.000
#> GSM1105467     2  0.0000      0.961 0.000 1.000
#> GSM1105470     2  0.0000      0.961 0.000 1.000
#> GSM1105471     2  0.0376      0.958 0.004 0.996
#> GSM1105474     2  0.0000      0.961 0.000 1.000
#> GSM1105475     2  0.0000      0.961 0.000 1.000
#> GSM1105440     1  0.0000      0.972 1.000 0.000
#> GSM1105488     2  0.0000      0.961 0.000 1.000
#> GSM1105489     1  0.0000      0.972 1.000 0.000
#> GSM1105492     1  0.0000      0.972 1.000 0.000
#> GSM1105493     1  0.0000      0.972 1.000 0.000
#> GSM1105497     2  0.1184      0.949 0.016 0.984
#> GSM1105500     2  0.0000      0.961 0.000 1.000
#> GSM1105501     2  0.0000      0.961 0.000 1.000
#> GSM1105508     1  0.0000      0.972 1.000 0.000
#> GSM1105444     2  0.0000      0.961 0.000 1.000
#> GSM1105513     2  0.0000      0.961 0.000 1.000
#> GSM1105516     1  0.9866      0.251 0.568 0.432
#> GSM1105520     2  0.8813      0.604 0.300 0.700
#> GSM1105524     1  0.0000      0.972 1.000 0.000
#> GSM1105536     2  0.0000      0.961 0.000 1.000
#> GSM1105537     1  0.0000      0.972 1.000 0.000
#> GSM1105540     1  0.0000      0.972 1.000 0.000
#> GSM1105544     2  0.7528      0.727 0.216 0.784
#> GSM1105445     2  0.0000      0.961 0.000 1.000
#> GSM1105553     1  0.9850      0.188 0.572 0.428
#> GSM1105556     1  0.0000      0.972 1.000 0.000
#> GSM1105557     2  0.0000      0.961 0.000 1.000
#> GSM1105449     2  0.0000      0.961 0.000 1.000
#> GSM1105469     1  0.7602      0.712 0.780 0.220
#> GSM1105472     2  0.0000      0.961 0.000 1.000
#> GSM1105473     1  0.0000      0.972 1.000 0.000
#> GSM1105476     2  0.0000      0.961 0.000 1.000
#> GSM1105477     2  0.0000      0.961 0.000 1.000
#> GSM1105478     2  0.2603      0.927 0.044 0.956
#> GSM1105510     2  0.0000      0.961 0.000 1.000
#> GSM1105530     1  0.0000      0.972 1.000 0.000
#> GSM1105539     1  0.0000      0.972 1.000 0.000
#> GSM1105480     2  0.0000      0.961 0.000 1.000
#> GSM1105512     1  0.0000      0.972 1.000 0.000
#> GSM1105532     1  0.0000      0.972 1.000 0.000
#> GSM1105541     1  0.0000      0.972 1.000 0.000
#> GSM1105439     2  0.0000      0.961 0.000 1.000
#> GSM1105463     1  0.0000      0.972 1.000 0.000
#> GSM1105482     1  0.0000      0.972 1.000 0.000
#> GSM1105483     2  0.0000      0.961 0.000 1.000
#> GSM1105494     2  0.0000      0.961 0.000 1.000
#> GSM1105503     2  0.9850      0.301 0.428 0.572
#> GSM1105507     1  0.6343      0.794 0.840 0.160
#> GSM1105446     2  0.0000      0.961 0.000 1.000
#> GSM1105519     1  0.0000      0.972 1.000 0.000
#> GSM1105526     2  0.0000      0.961 0.000 1.000
#> GSM1105527     2  0.0000      0.961 0.000 1.000
#> GSM1105531     1  0.0000      0.972 1.000 0.000
#> GSM1105543     2  0.0000      0.961 0.000 1.000
#> GSM1105546     1  0.0000      0.972 1.000 0.000
#> GSM1105547     1  0.0000      0.972 1.000 0.000
#> GSM1105455     2  0.0000      0.961 0.000 1.000
#> GSM1105458     2  0.0000      0.961 0.000 1.000
#> GSM1105459     2  0.0000      0.961 0.000 1.000
#> GSM1105462     1  0.3274      0.914 0.940 0.060
#> GSM1105441     2  0.0000      0.961 0.000 1.000
#> GSM1105465     2  0.3733      0.902 0.072 0.928
#> GSM1105484     2  0.0000      0.961 0.000 1.000
#> GSM1105485     2  0.2043      0.935 0.032 0.968
#> GSM1105496     1  0.1414      0.954 0.980 0.020
#> GSM1105505     1  0.0000      0.972 1.000 0.000
#> GSM1105509     1  0.0000      0.972 1.000 0.000
#> GSM1105448     2  0.0000      0.961 0.000 1.000
#> GSM1105521     1  0.0000      0.972 1.000 0.000
#> GSM1105528     2  0.0000      0.961 0.000 1.000
#> GSM1105529     2  0.0000      0.961 0.000 1.000
#> GSM1105533     1  0.0000      0.972 1.000 0.000
#> GSM1105545     2  0.0000      0.961 0.000 1.000
#> GSM1105548     1  0.0000      0.972 1.000 0.000
#> GSM1105549     1  0.0000      0.972 1.000 0.000
#> GSM1105457     2  0.0000      0.961 0.000 1.000
#> GSM1105460     2  0.0000      0.961 0.000 1.000
#> GSM1105461     2  0.0000      0.961 0.000 1.000
#> GSM1105464     1  0.0000      0.972 1.000 0.000
#> GSM1105466     2  0.0000      0.961 0.000 1.000
#> GSM1105479     2  0.0000      0.961 0.000 1.000
#> GSM1105502     1  0.0000      0.972 1.000 0.000
#> GSM1105515     1  0.0000      0.972 1.000 0.000
#> GSM1105523     1  0.0000      0.972 1.000 0.000
#> GSM1105550     1  0.0938      0.962 0.988 0.012
#> GSM1105450     2  0.0000      0.961 0.000 1.000
#> GSM1105451     2  0.0000      0.961 0.000 1.000
#> GSM1105454     2  0.7219      0.761 0.200 0.800
#> GSM1105468     2  0.0000      0.961 0.000 1.000
#> GSM1105481     2  0.7219      0.761 0.200 0.800
#> GSM1105504     1  0.0000      0.972 1.000 0.000
#> GSM1105517     1  0.0000      0.972 1.000 0.000
#> GSM1105525     1  0.0000      0.972 1.000 0.000
#> GSM1105552     1  0.0000      0.972 1.000 0.000
#> GSM1105452     2  0.0000      0.961 0.000 1.000
#> GSM1105453     2  0.0000      0.961 0.000 1.000
#> GSM1105456     2  0.7219      0.761 0.200 0.800

show/hide code output

cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#>            class entropy silhouette    p1    p2    p3
#> GSM1105438     2  0.4121     0.7126 0.168 0.832 0.000
#> GSM1105486     2  0.0000     0.7586 0.000 1.000 0.000
#> GSM1105487     1  0.6299     0.5475 0.524 0.000 0.476
#> GSM1105490     2  0.3941     0.7157 0.000 0.844 0.156
#> GSM1105491     1  0.9514    -0.2781 0.468 0.328 0.204
#> GSM1105495     2  0.9589     0.2069 0.200 0.424 0.376
#> GSM1105498     3  0.6062     0.0648 0.000 0.384 0.616
#> GSM1105499     1  0.6168     0.6518 0.588 0.000 0.412
#> GSM1105506     2  0.4931     0.6636 0.000 0.768 0.232
#> GSM1105442     2  0.6168     0.5701 0.412 0.588 0.000
#> GSM1105511     2  0.4473     0.7089 0.008 0.828 0.164
#> GSM1105514     2  0.4931     0.6836 0.232 0.768 0.000
#> GSM1105518     2  0.6215     0.3814 0.000 0.572 0.428
#> GSM1105522     3  0.6260    -0.3683 0.448 0.000 0.552
#> GSM1105534     1  0.6026     0.6422 0.624 0.000 0.376
#> GSM1105535     1  0.6168     0.6518 0.588 0.000 0.412
#> GSM1105538     1  0.5926     0.6304 0.644 0.000 0.356
#> GSM1105542     2  0.6168     0.5701 0.412 0.588 0.000
#> GSM1105443     2  0.4235     0.7041 0.000 0.824 0.176
#> GSM1105551     3  0.4504     0.2558 0.196 0.000 0.804
#> GSM1105554     1  0.6168     0.6518 0.588 0.000 0.412
#> GSM1105555     3  0.6180    -0.3109 0.416 0.000 0.584
#> GSM1105447     2  0.3816     0.7202 0.000 0.852 0.148
#> GSM1105467     2  0.0592     0.7580 0.000 0.988 0.012
#> GSM1105470     2  0.0592     0.7580 0.000 0.988 0.012
#> GSM1105471     2  0.5216     0.6384 0.000 0.740 0.260
#> GSM1105474     2  0.1753     0.7549 0.048 0.952 0.000
#> GSM1105475     2  0.2066     0.7508 0.000 0.940 0.060
#> GSM1105440     1  0.6168     0.6518 0.588 0.000 0.412
#> GSM1105488     2  0.6168     0.5701 0.412 0.588 0.000
#> GSM1105489     3  0.6126    -0.2633 0.400 0.000 0.600
#> GSM1105492     1  0.6168     0.6518 0.588 0.000 0.412
#> GSM1105493     1  0.4605     0.2408 0.796 0.000 0.204
#> GSM1105497     2  0.6553     0.5646 0.412 0.580 0.008
#> GSM1105500     2  0.5363     0.6602 0.276 0.724 0.000
#> GSM1105501     2  0.2939     0.7467 0.012 0.916 0.072
#> GSM1105508     3  0.6299    -0.4382 0.476 0.000 0.524
#> GSM1105444     2  0.2356     0.7490 0.072 0.928 0.000
#> GSM1105513     2  0.4750     0.6763 0.000 0.784 0.216
#> GSM1105516     1  0.2200     0.2829 0.940 0.056 0.004
#> GSM1105520     3  0.6140     0.0115 0.000 0.404 0.596
#> GSM1105524     1  0.6168     0.6518 0.588 0.000 0.412
#> GSM1105536     2  0.4931     0.6841 0.232 0.768 0.000
#> GSM1105537     1  0.6168     0.6518 0.588 0.000 0.412
#> GSM1105540     1  0.6168     0.6518 0.588 0.000 0.412
#> GSM1105544     2  0.8556     0.3502 0.232 0.604 0.164
#> GSM1105445     2  0.5926     0.5120 0.000 0.644 0.356
#> GSM1105553     3  0.3816     0.3966 0.000 0.148 0.852
#> GSM1105556     1  0.4974     0.5343 0.764 0.000 0.236
#> GSM1105557     2  0.4605     0.6853 0.000 0.796 0.204
#> GSM1105449     2  0.1860     0.7523 0.000 0.948 0.052
#> GSM1105469     3  0.7607    -0.0651 0.364 0.052 0.584
#> GSM1105472     2  0.1860     0.7540 0.052 0.948 0.000
#> GSM1105473     1  0.3619     0.4095 0.864 0.000 0.136
#> GSM1105476     2  0.1753     0.7549 0.048 0.952 0.000
#> GSM1105477     2  0.6126     0.5797 0.400 0.600 0.000
#> GSM1105478     2  0.5397     0.6156 0.000 0.720 0.280
#> GSM1105510     2  0.6168     0.5701 0.412 0.588 0.000
#> GSM1105530     1  0.6267     0.5803 0.548 0.000 0.452
#> GSM1105539     3  0.4605     0.2430 0.204 0.000 0.796
#> GSM1105480     2  0.4931     0.6636 0.000 0.768 0.232
#> GSM1105512     1  0.6079     0.6473 0.612 0.000 0.388
#> GSM1105532     3  0.6286    -0.4265 0.464 0.000 0.536
#> GSM1105541     3  0.4842     0.2027 0.224 0.000 0.776
#> GSM1105439     2  0.3941     0.7157 0.000 0.844 0.156
#> GSM1105463     3  0.4605     0.2430 0.204 0.000 0.796
#> GSM1105482     1  0.5465     0.5775 0.712 0.000 0.288
#> GSM1105483     2  0.8868     0.3927 0.196 0.576 0.228
#> GSM1105494     2  0.4931     0.6636 0.000 0.768 0.232
#> GSM1105503     3  0.5733     0.1982 0.000 0.324 0.676
#> GSM1105507     1  0.6168     0.6518 0.588 0.000 0.412
#> GSM1105446     2  0.6095     0.5854 0.392 0.608 0.000
#> GSM1105519     1  0.6168     0.6518 0.588 0.000 0.412
#> GSM1105526     2  0.1753     0.7549 0.048 0.952 0.000
#> GSM1105527     2  0.8683     0.4270 0.172 0.592 0.236
#> GSM1105531     3  0.2066     0.3933 0.060 0.000 0.940
#> GSM1105543     2  0.5431     0.6545 0.284 0.716 0.000
#> GSM1105546     1  0.6168     0.6518 0.588 0.000 0.412
#> GSM1105547     1  0.2165     0.3913 0.936 0.000 0.064
#> GSM1105455     2  0.3551     0.7268 0.000 0.868 0.132
#> GSM1105458     2  0.2066     0.7508 0.000 0.940 0.060
#> GSM1105459     2  0.1163     0.7575 0.028 0.972 0.000
#> GSM1105462     3  0.2280     0.3996 0.052 0.008 0.940
#> GSM1105441     2  0.1529     0.7545 0.000 0.960 0.040
#> GSM1105465     1  0.9464    -0.4023 0.412 0.408 0.180
#> GSM1105484     2  0.6062     0.5906 0.384 0.616 0.000
#> GSM1105485     2  0.6280     0.5215 0.460 0.540 0.000
#> GSM1105496     3  0.3213     0.3812 0.092 0.008 0.900
#> GSM1105505     3  0.3686     0.3311 0.140 0.000 0.860
#> GSM1105509     1  0.6168     0.6518 0.588 0.000 0.412
#> GSM1105448     2  0.2165     0.7512 0.064 0.936 0.000
#> GSM1105521     1  0.6111     0.6495 0.604 0.000 0.396
#> GSM1105528     2  0.6111     0.5825 0.396 0.604 0.000
#> GSM1105529     2  0.6168     0.5701 0.412 0.588 0.000
#> GSM1105533     3  0.5859    -0.1162 0.344 0.000 0.656
#> GSM1105545     2  0.0424     0.7587 0.008 0.992 0.000
#> GSM1105548     1  0.6168     0.3046 0.588 0.000 0.412
#> GSM1105549     1  0.1031     0.3561 0.976 0.000 0.024
#> GSM1105457     2  0.4931     0.6636 0.000 0.768 0.232
#> GSM1105460     2  0.3267     0.7331 0.000 0.884 0.116
#> GSM1105461     2  0.1163     0.7575 0.028 0.972 0.000
#> GSM1105464     1  0.6168     0.6518 0.588 0.000 0.412
#> GSM1105466     2  0.4887     0.6669 0.000 0.772 0.228
#> GSM1105479     2  0.4842     0.6704 0.000 0.776 0.224
#> GSM1105502     3  0.6062    -0.2262 0.384 0.000 0.616
#> GSM1105515     1  0.5948     0.6332 0.640 0.000 0.360
#> GSM1105523     3  0.2793     0.3925 0.044 0.028 0.928
#> GSM1105550     3  0.6648    -0.1617 0.364 0.016 0.620
#> GSM1105450     2  0.0424     0.7587 0.008 0.992 0.000
#> GSM1105451     2  0.0237     0.7587 0.004 0.996 0.000
#> GSM1105454     3  0.6168    -0.0104 0.000 0.412 0.588
#> GSM1105468     2  0.0747     0.7584 0.016 0.984 0.000
#> GSM1105481     3  0.6168    -0.0104 0.000 0.412 0.588
#> GSM1105504     3  0.3482     0.3440 0.128 0.000 0.872
#> GSM1105517     1  0.6168     0.6518 0.588 0.000 0.412
#> GSM1105525     3  0.2537     0.3799 0.080 0.000 0.920
#> GSM1105552     1  0.6260     0.1056 0.552 0.000 0.448
#> GSM1105452     2  0.6168     0.5701 0.412 0.588 0.000
#> GSM1105453     2  0.1643     0.7555 0.044 0.956 0.000
#> GSM1105456     3  0.6168    -0.0104 0.000 0.412 0.588

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>            class entropy silhouette    p1    p2    p3    p4
#> GSM1105438     4  0.5000    -0.0745 0.000 0.496 0.000 0.504
#> GSM1105486     2  0.2469     0.8627 0.000 0.892 0.000 0.108
#> GSM1105487     1  0.1109     0.8867 0.968 0.000 0.028 0.004
#> GSM1105490     2  0.0376     0.8794 0.004 0.992 0.000 0.004
#> GSM1105491     4  0.0188     0.7506 0.004 0.000 0.000 0.996
#> GSM1105495     3  0.0000     0.9069 0.000 0.000 1.000 0.000
#> GSM1105498     2  0.3355     0.7301 0.000 0.836 0.160 0.004
#> GSM1105499     1  0.0188     0.8901 0.996 0.000 0.000 0.004
#> GSM1105506     2  0.0376     0.8794 0.004 0.992 0.000 0.004
#> GSM1105442     4  0.0336     0.7522 0.000 0.008 0.000 0.992
#> GSM1105511     2  0.0524     0.8774 0.008 0.988 0.000 0.004
#> GSM1105514     4  0.4855     0.2761 0.000 0.400 0.000 0.600
#> GSM1105518     2  0.1792     0.8568 0.000 0.932 0.068 0.000
#> GSM1105522     1  0.1305     0.8730 0.960 0.036 0.000 0.004
#> GSM1105534     1  0.1474     0.8814 0.948 0.000 0.000 0.052
#> GSM1105535     1  0.0188     0.8901 0.996 0.000 0.000 0.004
#> GSM1105538     1  0.1867     0.8719 0.928 0.000 0.000 0.072
#> GSM1105542     4  0.0336     0.7522 0.000 0.008 0.000 0.992
#> GSM1105443     2  0.0469     0.8838 0.000 0.988 0.000 0.012
#> GSM1105551     1  0.3791     0.7539 0.796 0.000 0.200 0.004
#> GSM1105554     1  0.1211     0.8850 0.960 0.000 0.000 0.040
#> GSM1105555     1  0.4019     0.7502 0.792 0.000 0.196 0.012
#> GSM1105447     2  0.1661     0.8837 0.000 0.944 0.004 0.052
#> GSM1105467     2  0.1940     0.8767 0.000 0.924 0.000 0.076
#> GSM1105470     2  0.1716     0.8806 0.000 0.936 0.000 0.064
#> GSM1105471     2  0.0592     0.8794 0.000 0.984 0.016 0.000
#> GSM1105474     2  0.3837     0.7452 0.000 0.776 0.000 0.224
#> GSM1105475     2  0.1302     0.8840 0.000 0.956 0.000 0.044
#> GSM1105440     1  0.0188     0.8901 0.996 0.000 0.000 0.004
#> GSM1105488     4  0.0336     0.7522 0.000 0.008 0.000 0.992
#> GSM1105489     1  0.5062     0.6197 0.692 0.000 0.284 0.024
#> GSM1105492     1  0.0336     0.8902 0.992 0.000 0.000 0.008
#> GSM1105493     4  0.4010     0.6330 0.156 0.000 0.028 0.816
#> GSM1105497     4  0.0188     0.7517 0.000 0.004 0.000 0.996
#> GSM1105500     4  0.4994    -0.0119 0.000 0.480 0.000 0.520
#> GSM1105501     2  0.0000     0.8818 0.000 1.000 0.000 0.000
#> GSM1105508     1  0.1109     0.8777 0.968 0.028 0.000 0.004
#> GSM1105444     2  0.4477     0.6003 0.000 0.688 0.000 0.312
#> GSM1105513     2  0.0000     0.8818 0.000 1.000 0.000 0.000
#> GSM1105516     4  0.4372     0.5557 0.268 0.004 0.000 0.728
#> GSM1105520     2  0.4981     0.0538 0.000 0.536 0.464 0.000
#> GSM1105524     1  0.0000     0.8897 1.000 0.000 0.000 0.000
#> GSM1105536     2  0.4804     0.4340 0.000 0.616 0.000 0.384
#> GSM1105537     1  0.0000     0.8897 1.000 0.000 0.000 0.000
#> GSM1105540     1  0.0188     0.8888 0.996 0.000 0.000 0.004
#> GSM1105544     2  0.7113     0.3163 0.276 0.552 0.000 0.172
#> GSM1105445     2  0.0707     0.8773 0.000 0.980 0.020 0.000
#> GSM1105553     3  0.0000     0.9069 0.000 0.000 1.000 0.000
#> GSM1105556     1  0.3024     0.8162 0.852 0.000 0.000 0.148
#> GSM1105557     2  0.0376     0.8794 0.004 0.992 0.000 0.004
#> GSM1105449     2  0.1792     0.8797 0.000 0.932 0.000 0.068
#> GSM1105469     1  0.3306     0.7563 0.840 0.156 0.000 0.004
#> GSM1105472     2  0.3649     0.7697 0.000 0.796 0.000 0.204
#> GSM1105473     4  0.4466     0.6173 0.180 0.000 0.036 0.784
#> GSM1105476     2  0.2589     0.8567 0.000 0.884 0.000 0.116
#> GSM1105477     4  0.3726     0.6453 0.000 0.212 0.000 0.788
#> GSM1105478     2  0.0524     0.8779 0.000 0.988 0.008 0.004
#> GSM1105510     4  0.1022     0.7489 0.000 0.032 0.000 0.968
#> GSM1105530     1  0.0657     0.8895 0.984 0.000 0.012 0.004
#> GSM1105539     3  0.4252     0.5808 0.252 0.000 0.744 0.004
#> GSM1105480     2  0.0376     0.8794 0.004 0.992 0.000 0.004
#> GSM1105512     1  0.1389     0.8832 0.952 0.000 0.000 0.048
#> GSM1105532     1  0.1109     0.8869 0.968 0.000 0.028 0.004
#> GSM1105541     1  0.4584     0.6134 0.696 0.000 0.300 0.004
#> GSM1105439     2  0.0188     0.8826 0.000 0.996 0.000 0.004
#> GSM1105463     3  0.0000     0.9069 0.000 0.000 1.000 0.000
#> GSM1105482     1  0.4661     0.5183 0.652 0.000 0.000 0.348
#> GSM1105483     1  0.5088     0.3088 0.572 0.424 0.000 0.004
#> GSM1105494     2  0.0188     0.8809 0.000 0.996 0.004 0.000
#> GSM1105503     3  0.4103     0.6655 0.000 0.256 0.744 0.000
#> GSM1105507     1  0.0188     0.8888 0.996 0.000 0.000 0.004
#> GSM1105446     4  0.3569     0.6644 0.000 0.196 0.000 0.804
#> GSM1105519     1  0.0707     0.8893 0.980 0.000 0.000 0.020
#> GSM1105526     2  0.2868     0.8409 0.000 0.864 0.000 0.136
#> GSM1105527     2  0.3831     0.6541 0.204 0.792 0.000 0.004
#> GSM1105531     3  0.0000     0.9069 0.000 0.000 1.000 0.000
#> GSM1105543     4  0.4817     0.3114 0.000 0.388 0.000 0.612
#> GSM1105546     1  0.0469     0.8901 0.988 0.000 0.000 0.012
#> GSM1105547     4  0.4585     0.4010 0.332 0.000 0.000 0.668
#> GSM1105455     2  0.0592     0.8842 0.000 0.984 0.000 0.016
#> GSM1105458     2  0.1978     0.8805 0.000 0.928 0.004 0.068
#> GSM1105459     2  0.2704     0.8508 0.000 0.876 0.000 0.124
#> GSM1105462     3  0.6851     0.4786 0.132 0.300 0.568 0.000
#> GSM1105441     2  0.1637     0.8816 0.000 0.940 0.000 0.060
#> GSM1105465     4  0.0188     0.7506 0.004 0.000 0.000 0.996
#> GSM1105484     4  0.2281     0.7250 0.000 0.096 0.000 0.904
#> GSM1105485     4  0.0188     0.7506 0.004 0.000 0.000 0.996
#> GSM1105496     3  0.0000     0.9069 0.000 0.000 1.000 0.000
#> GSM1105505     3  0.0000     0.9069 0.000 0.000 1.000 0.000
#> GSM1105509     1  0.0336     0.8902 0.992 0.000 0.000 0.008
#> GSM1105448     2  0.4454     0.6079 0.000 0.692 0.000 0.308
#> GSM1105521     1  0.1389     0.8826 0.952 0.000 0.000 0.048
#> GSM1105528     4  0.2973     0.7015 0.000 0.144 0.000 0.856
#> GSM1105529     4  0.0817     0.7509 0.000 0.024 0.000 0.976
#> GSM1105533     1  0.4889     0.4960 0.636 0.000 0.360 0.004
#> GSM1105545     2  0.1722     0.8844 0.008 0.944 0.000 0.048
#> GSM1105548     4  0.6933     0.3442 0.300 0.000 0.140 0.560
#> GSM1105549     4  0.2589     0.6802 0.116 0.000 0.000 0.884
#> GSM1105457     2  0.0376     0.8794 0.004 0.992 0.000 0.004
#> GSM1105460     2  0.1118     0.8845 0.000 0.964 0.000 0.036
#> GSM1105461     2  0.2530     0.8594 0.000 0.888 0.000 0.112
#> GSM1105464     1  0.2300     0.8731 0.924 0.000 0.048 0.028
#> GSM1105466     2  0.0376     0.8794 0.004 0.992 0.000 0.004
#> GSM1105479     2  0.0376     0.8822 0.000 0.992 0.004 0.004
#> GSM1105502     1  0.3355     0.7925 0.836 0.000 0.160 0.004
#> GSM1105515     1  0.1867     0.8714 0.928 0.000 0.000 0.072
#> GSM1105523     1  0.4232     0.7339 0.804 0.168 0.024 0.004
#> GSM1105550     1  0.2197     0.8423 0.916 0.080 0.000 0.004
#> GSM1105450     2  0.2345     0.8664 0.000 0.900 0.000 0.100
#> GSM1105451     2  0.2281     0.8682 0.000 0.904 0.000 0.096
#> GSM1105454     3  0.0000     0.9069 0.000 0.000 1.000 0.000
#> GSM1105468     2  0.2408     0.8640 0.000 0.896 0.000 0.104
#> GSM1105481     3  0.0000     0.9069 0.000 0.000 1.000 0.000
#> GSM1105504     3  0.0000     0.9069 0.000 0.000 1.000 0.000
#> GSM1105517     1  0.0000     0.8897 1.000 0.000 0.000 0.000
#> GSM1105525     1  0.2310     0.8482 0.920 0.068 0.008 0.004
#> GSM1105552     4  0.6295     0.4772 0.132 0.000 0.212 0.656
#> GSM1105452     4  0.0469     0.7520 0.000 0.012 0.000 0.988
#> GSM1105453     2  0.3649     0.7726 0.000 0.796 0.000 0.204
#> GSM1105456     3  0.0000     0.9069 0.000 0.000 1.000 0.000

show/hide code output

cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#>            class entropy silhouette    p1    p2    p3    p4    p5
#> GSM1105438     2  0.3790     0.6818 0.004 0.724 0.000 0.000 0.272
#> GSM1105486     2  0.3242     0.8256 0.000 0.844 0.000 0.040 0.116
#> GSM1105487     1  0.1399     0.8018 0.952 0.000 0.020 0.028 0.000
#> GSM1105490     2  0.1041     0.8334 0.004 0.964 0.000 0.032 0.000
#> GSM1105491     5  0.0693     0.8223 0.012 0.000 0.008 0.000 0.980
#> GSM1105495     3  0.0566     0.8798 0.000 0.000 0.984 0.004 0.012
#> GSM1105498     2  0.4438     0.6476 0.012 0.748 0.204 0.036 0.000
#> GSM1105499     1  0.4341     0.5412 0.592 0.000 0.000 0.404 0.004
#> GSM1105506     4  0.4283     0.0619 0.000 0.456 0.000 0.544 0.000
#> GSM1105442     5  0.0671     0.8265 0.016 0.004 0.000 0.000 0.980
#> GSM1105511     2  0.3305     0.7073 0.000 0.776 0.000 0.224 0.000
#> GSM1105514     5  0.4126     0.2831 0.000 0.380 0.000 0.000 0.620
#> GSM1105518     2  0.3921     0.7106 0.000 0.784 0.172 0.044 0.000
#> GSM1105522     1  0.4294     0.3761 0.532 0.000 0.000 0.468 0.000
#> GSM1105534     1  0.2236     0.8052 0.908 0.000 0.000 0.068 0.024
#> GSM1105535     1  0.3586     0.7223 0.736 0.000 0.000 0.264 0.000
#> GSM1105538     1  0.1830     0.8000 0.932 0.000 0.000 0.028 0.040
#> GSM1105542     5  0.1041     0.8233 0.032 0.004 0.000 0.000 0.964
#> GSM1105443     2  0.0703     0.8353 0.000 0.976 0.000 0.024 0.000
#> GSM1105551     1  0.1626     0.7849 0.940 0.000 0.044 0.016 0.000
#> GSM1105554     1  0.3318     0.7723 0.800 0.000 0.000 0.192 0.008
#> GSM1105555     1  0.1818     0.7874 0.932 0.000 0.044 0.000 0.024
#> GSM1105447     2  0.1569     0.8353 0.000 0.948 0.012 0.032 0.008
#> GSM1105467     2  0.3301     0.8249 0.000 0.848 0.000 0.072 0.080
#> GSM1105470     2  0.3421     0.8217 0.000 0.840 0.000 0.080 0.080
#> GSM1105471     2  0.6420     0.4653 0.000 0.584 0.124 0.260 0.032
#> GSM1105474     2  0.2561     0.8156 0.000 0.856 0.000 0.000 0.144
#> GSM1105475     2  0.2291     0.8345 0.000 0.908 0.000 0.056 0.036
#> GSM1105440     1  0.0609     0.8006 0.980 0.000 0.000 0.020 0.000
#> GSM1105488     5  0.0579     0.8260 0.008 0.008 0.000 0.000 0.984
#> GSM1105489     1  0.1725     0.7858 0.936 0.000 0.044 0.000 0.020
#> GSM1105492     1  0.2522     0.7997 0.880 0.000 0.000 0.108 0.012
#> GSM1105493     5  0.4421     0.6492 0.220 0.000 0.016 0.024 0.740
#> GSM1105497     5  0.6794     0.5819 0.244 0.164 0.024 0.008 0.560
#> GSM1105500     2  0.5607     0.3661 0.384 0.552 0.000 0.012 0.052
#> GSM1105501     4  0.3970     0.5507 0.000 0.236 0.000 0.744 0.020
#> GSM1105508     1  0.3163     0.7757 0.824 0.012 0.000 0.164 0.000
#> GSM1105444     2  0.3579     0.7179 0.000 0.756 0.000 0.004 0.240
#> GSM1105513     2  0.1121     0.8340 0.000 0.956 0.000 0.044 0.000
#> GSM1105516     5  0.4096     0.6574 0.200 0.000 0.000 0.040 0.760
#> GSM1105520     3  0.4413     0.6658 0.000 0.044 0.724 0.232 0.000
#> GSM1105524     1  0.3796     0.6834 0.700 0.000 0.000 0.300 0.000
#> GSM1105536     5  0.3534     0.6038 0.000 0.256 0.000 0.000 0.744
#> GSM1105537     1  0.3636     0.7124 0.728 0.000 0.000 0.272 0.000
#> GSM1105540     1  0.2694     0.7902 0.864 0.004 0.004 0.128 0.000
#> GSM1105544     1  0.3573     0.6477 0.836 0.124 0.004 0.020 0.016
#> GSM1105445     2  0.0992     0.8347 0.000 0.968 0.008 0.024 0.000
#> GSM1105553     2  0.6741     0.1690 0.396 0.456 0.116 0.032 0.000
#> GSM1105556     1  0.3702     0.7880 0.820 0.000 0.000 0.096 0.084
#> GSM1105557     2  0.0992     0.8338 0.008 0.968 0.000 0.024 0.000
#> GSM1105449     2  0.0865     0.8422 0.000 0.972 0.000 0.004 0.024
#> GSM1105469     4  0.3110     0.6717 0.080 0.060 0.000 0.860 0.000
#> GSM1105472     2  0.4464     0.6574 0.000 0.684 0.000 0.028 0.288
#> GSM1105473     5  0.3733     0.7384 0.016 0.000 0.080 0.068 0.836
#> GSM1105476     2  0.2482     0.8373 0.000 0.892 0.000 0.024 0.084
#> GSM1105477     5  0.1851     0.7970 0.000 0.088 0.000 0.000 0.912
#> GSM1105478     2  0.3612     0.6422 0.000 0.732 0.000 0.268 0.000
#> GSM1105510     5  0.0955     0.8209 0.004 0.028 0.000 0.000 0.968
#> GSM1105530     4  0.3008     0.6646 0.092 0.000 0.036 0.868 0.004
#> GSM1105539     3  0.3550     0.7496 0.020 0.000 0.796 0.184 0.000
#> GSM1105480     2  0.1568     0.8340 0.020 0.944 0.000 0.036 0.000
#> GSM1105512     4  0.5508    -0.3244 0.460 0.000 0.000 0.476 0.064
#> GSM1105532     4  0.3051     0.6655 0.076 0.000 0.060 0.864 0.000
#> GSM1105541     4  0.5717     0.3544 0.096 0.000 0.308 0.592 0.004
#> GSM1105439     2  0.0880     0.8351 0.000 0.968 0.000 0.032 0.000
#> GSM1105463     3  0.0510     0.8814 0.000 0.000 0.984 0.016 0.000
#> GSM1105482     1  0.2482     0.7852 0.892 0.000 0.000 0.024 0.084
#> GSM1105483     4  0.2795     0.6594 0.028 0.100 0.000 0.872 0.000
#> GSM1105494     2  0.1750     0.8268 0.028 0.936 0.000 0.036 0.000
#> GSM1105503     3  0.3110     0.8197 0.000 0.080 0.860 0.060 0.000
#> GSM1105507     1  0.4182     0.6346 0.644 0.000 0.000 0.352 0.004
#> GSM1105446     2  0.3843     0.7648 0.016 0.788 0.000 0.012 0.184
#> GSM1105519     1  0.4470     0.5788 0.616 0.000 0.000 0.372 0.012
#> GSM1105526     4  0.6599     0.2024 0.000 0.272 0.000 0.464 0.264
#> GSM1105527     4  0.3636     0.5183 0.000 0.272 0.000 0.728 0.000
#> GSM1105531     3  0.1043     0.8802 0.000 0.000 0.960 0.040 0.000
#> GSM1105543     2  0.3243     0.7793 0.004 0.812 0.000 0.004 0.180
#> GSM1105546     1  0.0693     0.7978 0.980 0.000 0.000 0.012 0.008
#> GSM1105547     1  0.2771     0.7612 0.860 0.000 0.000 0.012 0.128
#> GSM1105455     2  0.0703     0.8345 0.000 0.976 0.000 0.024 0.000
#> GSM1105458     2  0.1243     0.8426 0.000 0.960 0.008 0.004 0.028
#> GSM1105459     2  0.3284     0.8072 0.000 0.828 0.000 0.024 0.148
#> GSM1105462     4  0.5113     0.4258 0.004 0.028 0.248 0.692 0.028
#> GSM1105441     2  0.1041     0.8420 0.000 0.964 0.000 0.004 0.032
#> GSM1105465     5  0.2331     0.8160 0.064 0.004 0.024 0.000 0.908
#> GSM1105484     5  0.1732     0.8031 0.000 0.080 0.000 0.000 0.920
#> GSM1105485     5  0.0703     0.8211 0.024 0.000 0.000 0.000 0.976
#> GSM1105496     3  0.4756     0.7173 0.152 0.072 0.756 0.020 0.000
#> GSM1105505     3  0.0880     0.8814 0.000 0.000 0.968 0.032 0.000
#> GSM1105509     4  0.3280     0.5435 0.176 0.000 0.000 0.812 0.012
#> GSM1105448     2  0.3398     0.7444 0.000 0.780 0.000 0.004 0.216
#> GSM1105521     4  0.6114     0.1977 0.132 0.000 0.000 0.492 0.376
#> GSM1105528     5  0.1732     0.8015 0.000 0.080 0.000 0.000 0.920
#> GSM1105529     5  0.2376     0.8222 0.052 0.044 0.000 0.000 0.904
#> GSM1105533     1  0.4927     0.5648 0.652 0.000 0.296 0.052 0.000
#> GSM1105545     2  0.5706     0.3922 0.004 0.556 0.000 0.360 0.080
#> GSM1105548     1  0.1471     0.7789 0.952 0.000 0.020 0.004 0.024
#> GSM1105549     5  0.3209     0.7158 0.180 0.000 0.000 0.008 0.812
#> GSM1105457     2  0.1851     0.8197 0.000 0.912 0.000 0.088 0.000
#> GSM1105460     2  0.3994     0.7402 0.000 0.772 0.000 0.188 0.040
#> GSM1105461     2  0.2574     0.8286 0.000 0.876 0.000 0.012 0.112
#> GSM1105464     4  0.3997     0.6524 0.092 0.000 0.068 0.820 0.020
#> GSM1105466     2  0.2773     0.7711 0.000 0.836 0.000 0.164 0.000
#> GSM1105479     2  0.2304     0.8120 0.000 0.892 0.000 0.100 0.008
#> GSM1105502     1  0.6706     0.2850 0.456 0.000 0.224 0.316 0.004
#> GSM1105515     1  0.2077     0.8021 0.920 0.000 0.000 0.040 0.040
#> GSM1105523     4  0.2889     0.6491 0.016 0.020 0.084 0.880 0.000
#> GSM1105550     4  0.0992     0.6797 0.024 0.008 0.000 0.968 0.000
#> GSM1105450     2  0.1774     0.8422 0.000 0.932 0.000 0.016 0.052
#> GSM1105451     2  0.1251     0.8418 0.000 0.956 0.000 0.008 0.036
#> GSM1105454     3  0.1357     0.8613 0.000 0.048 0.948 0.004 0.000
#> GSM1105468     2  0.2540     0.8368 0.000 0.888 0.000 0.024 0.088
#> GSM1105481     3  0.3444     0.8281 0.000 0.024 0.848 0.104 0.024
#> GSM1105504     3  0.2295     0.8563 0.008 0.000 0.900 0.088 0.004
#> GSM1105517     4  0.1502     0.6800 0.056 0.000 0.000 0.940 0.004
#> GSM1105525     4  0.3012     0.6734 0.060 0.008 0.056 0.876 0.000
#> GSM1105552     5  0.5019     0.5028 0.012 0.000 0.280 0.040 0.668
#> GSM1105452     5  0.2522     0.8220 0.052 0.052 0.000 0.000 0.896
#> GSM1105453     2  0.2017     0.8386 0.000 0.912 0.000 0.008 0.080
#> GSM1105456     3  0.0000     0.8774 0.000 0.000 1.000 0.000 0.000

show/hide code output

cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#>            class entropy silhouette    p1    p2    p3    p4    p5    p6
#> GSM1105438     2  0.3703   0.656313 0.000 0.788 0.108 0.000 0.104 0.000
#> GSM1105486     2  0.5847   0.564831 0.000 0.612 0.048 0.184 0.156 0.000
#> GSM1105487     1  0.2149   0.487438 0.888 0.000 0.104 0.004 0.000 0.004
#> GSM1105490     2  0.3361   0.603139 0.000 0.816 0.076 0.108 0.000 0.000
#> GSM1105491     5  0.3731   0.585974 0.000 0.024 0.212 0.000 0.756 0.008
#> GSM1105495     6  0.1951   0.697555 0.000 0.000 0.016 0.000 0.076 0.908
#> GSM1105498     4  0.8197   0.121359 0.040 0.240 0.292 0.316 0.008 0.104
#> GSM1105499     1  0.5861  -0.004559 0.444 0.000 0.356 0.200 0.000 0.000
#> GSM1105506     4  0.4400   0.186436 0.000 0.376 0.032 0.592 0.000 0.000
#> GSM1105442     5  0.2046   0.710697 0.008 0.032 0.044 0.000 0.916 0.000
#> GSM1105511     4  0.4844  -0.010260 0.000 0.440 0.056 0.504 0.000 0.000
#> GSM1105514     5  0.5482   0.438810 0.000 0.292 0.160 0.000 0.548 0.000
#> GSM1105518     2  0.6462   0.301039 0.000 0.560 0.104 0.152 0.000 0.184
#> GSM1105522     4  0.5788  -0.192549 0.276 0.000 0.224 0.500 0.000 0.000
#> GSM1105534     1  0.4053   0.458780 0.744 0.000 0.204 0.040 0.012 0.000
#> GSM1105535     1  0.5328   0.261061 0.560 0.000 0.308 0.132 0.000 0.000
#> GSM1105538     1  0.2876   0.507660 0.844 0.000 0.132 0.008 0.016 0.000
#> GSM1105542     5  0.1167   0.705116 0.012 0.008 0.020 0.000 0.960 0.000
#> GSM1105443     2  0.0806   0.676344 0.000 0.972 0.020 0.008 0.000 0.000
#> GSM1105551     1  0.3144   0.436307 0.808 0.000 0.172 0.004 0.000 0.016
#> GSM1105554     1  0.5182   0.236306 0.556 0.000 0.340 0.104 0.000 0.000
#> GSM1105555     1  0.3370   0.486602 0.828 0.000 0.092 0.008 0.000 0.072
#> GSM1105447     2  0.1285   0.674436 0.000 0.944 0.052 0.004 0.000 0.000
#> GSM1105467     2  0.6783   0.431984 0.000 0.472 0.072 0.252 0.204 0.000
#> GSM1105470     2  0.6136   0.529886 0.000 0.568 0.048 0.208 0.176 0.000
#> GSM1105471     4  0.8293   0.142702 0.000 0.192 0.088 0.384 0.124 0.212
#> GSM1105474     2  0.6142   0.555570 0.000 0.584 0.084 0.112 0.220 0.000
#> GSM1105475     2  0.6206   0.502634 0.000 0.552 0.056 0.252 0.140 0.000
#> GSM1105440     1  0.1625   0.513615 0.928 0.000 0.060 0.012 0.000 0.000
#> GSM1105488     5  0.1594   0.696448 0.000 0.016 0.052 0.000 0.932 0.000
#> GSM1105489     1  0.1644   0.496282 0.932 0.000 0.052 0.000 0.004 0.012
#> GSM1105492     1  0.4067   0.472010 0.756 0.000 0.172 0.064 0.008 0.000
#> GSM1105493     5  0.5817   0.299369 0.144 0.000 0.236 0.000 0.588 0.032
#> GSM1105497     5  0.7137   0.282360 0.312 0.044 0.244 0.000 0.384 0.016
#> GSM1105500     2  0.7083   0.192389 0.252 0.432 0.252 0.016 0.048 0.000
#> GSM1105501     2  0.5555   0.084495 0.000 0.500 0.124 0.372 0.004 0.000
#> GSM1105508     1  0.5470   0.289963 0.584 0.004 0.244 0.168 0.000 0.000
#> GSM1105444     2  0.4065   0.595423 0.000 0.724 0.056 0.000 0.220 0.000
#> GSM1105513     2  0.4223   0.559306 0.000 0.720 0.076 0.204 0.000 0.000
#> GSM1105516     3  0.7015   0.031664 0.148 0.020 0.396 0.056 0.380 0.000
#> GSM1105520     6  0.6590   0.127817 0.000 0.144 0.060 0.384 0.000 0.412
#> GSM1105524     1  0.5536   0.220438 0.540 0.000 0.292 0.168 0.000 0.000
#> GSM1105536     5  0.5740   0.252592 0.000 0.292 0.044 0.088 0.576 0.000
#> GSM1105537     1  0.5351   0.269516 0.568 0.000 0.288 0.144 0.000 0.000
#> GSM1105540     1  0.6853   0.163186 0.424 0.004 0.316 0.204 0.052 0.000
#> GSM1105544     1  0.5201   0.301394 0.644 0.024 0.264 0.008 0.060 0.000
#> GSM1105445     2  0.1620   0.670570 0.000 0.940 0.024 0.024 0.000 0.012
#> GSM1105553     1  0.6667   0.135015 0.484 0.156 0.300 0.008 0.000 0.052
#> GSM1105556     1  0.5322   0.146849 0.520 0.000 0.400 0.020 0.060 0.000
#> GSM1105557     2  0.4023   0.559651 0.000 0.756 0.100 0.144 0.000 0.000
#> GSM1105449     2  0.0405   0.680760 0.000 0.988 0.008 0.000 0.004 0.000
#> GSM1105469     4  0.2825   0.402017 0.028 0.056 0.040 0.876 0.000 0.000
#> GSM1105472     2  0.6223   0.323592 0.000 0.464 0.048 0.112 0.376 0.000
#> GSM1105473     5  0.5066   0.568255 0.036 0.000 0.096 0.016 0.724 0.128
#> GSM1105476     2  0.6370   0.502861 0.000 0.548 0.064 0.204 0.184 0.000
#> GSM1105477     5  0.2443   0.695759 0.000 0.096 0.020 0.004 0.880 0.000
#> GSM1105478     4  0.5278  -0.055249 0.000 0.412 0.100 0.488 0.000 0.000
#> GSM1105510     5  0.3858   0.590332 0.000 0.044 0.216 0.000 0.740 0.000
#> GSM1105530     4  0.5711  -0.125741 0.072 0.000 0.360 0.528 0.000 0.040
#> GSM1105539     6  0.5291   0.442197 0.076 0.000 0.164 0.076 0.000 0.684
#> GSM1105480     2  0.7522   0.129016 0.100 0.376 0.272 0.240 0.012 0.000
#> GSM1105512     3  0.6810   0.166406 0.340 0.000 0.432 0.136 0.092 0.000
#> GSM1105532     4  0.5357  -0.000951 0.032 0.000 0.312 0.592 0.000 0.064
#> GSM1105541     3  0.7575   0.145426 0.152 0.000 0.296 0.280 0.000 0.272
#> GSM1105439     2  0.0993   0.676777 0.000 0.964 0.012 0.024 0.000 0.000
#> GSM1105463     6  0.0146   0.715745 0.000 0.000 0.004 0.000 0.000 0.996
#> GSM1105482     1  0.4374   0.425453 0.732 0.000 0.172 0.008 0.088 0.000
#> GSM1105483     4  0.2964   0.421340 0.004 0.108 0.040 0.848 0.000 0.000
#> GSM1105494     2  0.7517   0.212476 0.104 0.400 0.300 0.180 0.012 0.004
#> GSM1105503     6  0.5773   0.376219 0.000 0.096 0.036 0.312 0.000 0.556
#> GSM1105507     4  0.6600  -0.405320 0.300 0.016 0.328 0.352 0.004 0.000
#> GSM1105446     2  0.3932   0.656115 0.000 0.776 0.108 0.004 0.112 0.000
#> GSM1105519     1  0.6993  -0.188500 0.380 0.000 0.304 0.252 0.064 0.000
#> GSM1105526     4  0.6512   0.201664 0.000 0.120 0.092 0.520 0.268 0.000
#> GSM1105527     4  0.3555   0.420704 0.000 0.176 0.044 0.780 0.000 0.000
#> GSM1105531     6  0.0717   0.716622 0.000 0.000 0.016 0.008 0.000 0.976
#> GSM1105543     2  0.5867   0.472192 0.000 0.556 0.132 0.028 0.284 0.000
#> GSM1105546     1  0.0777   0.504564 0.972 0.000 0.024 0.000 0.004 0.000
#> GSM1105547     1  0.5134   0.267729 0.620 0.000 0.228 0.000 0.152 0.000
#> GSM1105455     2  0.1320   0.671336 0.000 0.948 0.036 0.016 0.000 0.000
#> GSM1105458     2  0.3096   0.681544 0.000 0.860 0.040 0.020 0.076 0.004
#> GSM1105459     2  0.2612   0.680658 0.000 0.868 0.016 0.008 0.108 0.000
#> GSM1105462     4  0.6500  -0.012605 0.000 0.008 0.084 0.504 0.084 0.320
#> GSM1105441     2  0.1074   0.684206 0.000 0.960 0.012 0.000 0.028 0.000
#> GSM1105465     5  0.3388   0.694643 0.048 0.008 0.068 0.000 0.848 0.028
#> GSM1105484     5  0.3233   0.681981 0.000 0.104 0.060 0.004 0.832 0.000
#> GSM1105485     5  0.1285   0.685952 0.004 0.000 0.052 0.000 0.944 0.000
#> GSM1105496     6  0.7102   0.424688 0.188 0.112 0.204 0.008 0.000 0.488
#> GSM1105505     6  0.1334   0.717165 0.000 0.000 0.032 0.020 0.000 0.948
#> GSM1105509     4  0.6443  -0.361696 0.164 0.000 0.324 0.468 0.044 0.000
#> GSM1105448     2  0.4002   0.621864 0.000 0.744 0.068 0.000 0.188 0.000
#> GSM1105521     3  0.7755   0.368474 0.220 0.000 0.312 0.272 0.192 0.004
#> GSM1105528     5  0.3645   0.669179 0.000 0.128 0.056 0.012 0.804 0.000
#> GSM1105529     5  0.3586   0.689508 0.036 0.048 0.080 0.004 0.832 0.000
#> GSM1105533     1  0.5909   0.145732 0.520 0.000 0.156 0.016 0.000 0.308
#> GSM1105545     4  0.6980   0.062090 0.004 0.228 0.088 0.476 0.204 0.000
#> GSM1105548     1  0.3497   0.426206 0.800 0.000 0.156 0.000 0.036 0.008
#> GSM1105549     5  0.5034   0.347277 0.132 0.000 0.240 0.000 0.628 0.000
#> GSM1105457     2  0.2843   0.625916 0.000 0.848 0.036 0.116 0.000 0.000
#> GSM1105460     2  0.4579   0.647046 0.000 0.756 0.076 0.068 0.100 0.000
#> GSM1105461     2  0.2255   0.682934 0.000 0.892 0.016 0.004 0.088 0.000
#> GSM1105464     4  0.6665  -0.222186 0.116 0.000 0.352 0.452 0.004 0.076
#> GSM1105466     2  0.5044   0.314167 0.000 0.548 0.052 0.388 0.012 0.000
#> GSM1105479     2  0.5232   0.499224 0.000 0.636 0.052 0.272 0.036 0.004
#> GSM1105502     1  0.7425  -0.213775 0.348 0.000 0.312 0.148 0.000 0.192
#> GSM1105515     1  0.3844   0.472194 0.764 0.000 0.192 0.028 0.016 0.000
#> GSM1105523     4  0.3846   0.364732 0.000 0.020 0.100 0.800 0.000 0.080
#> GSM1105550     4  0.5098   0.210829 0.028 0.032 0.264 0.660 0.008 0.008
#> GSM1105450     2  0.4961   0.636306 0.000 0.708 0.064 0.060 0.168 0.000
#> GSM1105451     2  0.0865   0.678230 0.000 0.964 0.036 0.000 0.000 0.000
#> GSM1105454     6  0.3454   0.603318 0.000 0.208 0.024 0.000 0.000 0.768
#> GSM1105468     2  0.5684   0.585110 0.000 0.632 0.060 0.104 0.204 0.000
#> GSM1105481     6  0.5566   0.512646 0.000 0.012 0.044 0.156 0.116 0.672
#> GSM1105504     6  0.2595   0.681397 0.000 0.000 0.084 0.044 0.000 0.872
#> GSM1105517     4  0.4693   0.159647 0.032 0.000 0.280 0.660 0.028 0.000
#> GSM1105525     4  0.4265   0.284185 0.020 0.000 0.140 0.760 0.000 0.080
#> GSM1105552     5  0.5702   0.448904 0.096 0.000 0.072 0.000 0.636 0.196
#> GSM1105452     5  0.4370   0.669893 0.072 0.060 0.096 0.000 0.772 0.000
#> GSM1105453     2  0.2579   0.665465 0.000 0.872 0.088 0.000 0.040 0.000
#> GSM1105456     6  0.1434   0.713243 0.000 0.048 0.012 0.000 0.000 0.940

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) other(p) time(p) individual(p) k
#> CV:NMF 117   0.8612  0.46773  0.6504       0.00544 2
#> CV:NMF  79   0.8419  1.00000  1.0000       0.04613 3
#> CV:NMF 107   0.1579  0.19337  0.1647       0.01597 4
#> CV:NMF 107   0.0893  0.00871  0.0579       0.00554 5
#> CV:NMF  52   0.2010  0.10430  0.5076       0.05302 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 44956 rows and 120 columns.
#>   Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'MAD' method.
#>   Subgroups are detected by 'hclust' method.
#>   Performed in total 1250 partitions by row resampling.
#>   Best k for subgroups seems to be 2.
#> 
#> Following methods can be applied to this 'ConsensusPartition' object:
#>  [1] "cola_report"             "collect_classes"         "collect_plots"          
#>  [4] "collect_stats"           "colnames"                "compare_signatures"     
#>  [7] "consensus_heatmap"       "dimension_reduction"     "functional_enrichment"  
#> [10] "get_anno_col"            "get_anno"                "get_classes"            
#> [13] "get_consensus"           "get_matrix"              "get_membership"         
#> [16] "get_param"               "get_signatures"          "get_stats"              
#> [19] "is_best_k"               "is_stable_k"             "membership_heatmap"     
#> [22] "ncol"                    "nrow"                    "plot_ecdf"              
#> [25] "rownames"                "select_partition_number" "show"                   
#> [28] "suggest_best_k"          "test_to_known_factors"

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

collect_plots(res)

plot of chunk MAD-hclust-collect-plots

The plots are:

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

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

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

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

select_partition_number(res)

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

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

get_stats(res)
#>   k 1-PAC mean_silhouette concordance area_increased  Rand Jaccard
#> 2 2 0.618           0.832       0.920         0.4687 0.541   0.541
#> 3 3 0.506           0.429       0.717         0.3508 0.921   0.858
#> 4 4 0.477           0.472       0.648         0.1159 0.739   0.496
#> 5 5 0.569           0.471       0.707         0.0891 0.850   0.544
#> 6 6 0.628           0.498       0.685         0.0424 0.932   0.722

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
#> GSM1105438     2  0.0000      0.899 0.000 1.000
#> GSM1105486     2  0.0000      0.899 0.000 1.000
#> GSM1105487     1  0.0376      0.938 0.996 0.004
#> GSM1105490     2  0.2423      0.890 0.040 0.960
#> GSM1105491     2  0.9993      0.106 0.484 0.516
#> GSM1105495     2  0.0672      0.899 0.008 0.992
#> GSM1105498     2  0.7745      0.743 0.228 0.772
#> GSM1105499     1  0.0000      0.937 1.000 0.000
#> GSM1105506     2  0.5519      0.839 0.128 0.872
#> GSM1105442     2  0.1843      0.895 0.028 0.972
#> GSM1105511     2  0.2423      0.890 0.040 0.960
#> GSM1105514     2  0.0000      0.899 0.000 1.000
#> GSM1105518     2  0.4161      0.868 0.084 0.916
#> GSM1105522     1  0.0000      0.937 1.000 0.000
#> GSM1105534     1  0.0000      0.937 1.000 0.000
#> GSM1105535     1  0.0000      0.937 1.000 0.000
#> GSM1105538     1  0.5059      0.865 0.888 0.112
#> GSM1105542     2  0.1843      0.895 0.028 0.972
#> GSM1105443     2  0.0376      0.900 0.004 0.996
#> GSM1105551     2  1.0000      0.174 0.496 0.504
#> GSM1105554     1  0.0000      0.937 1.000 0.000
#> GSM1105555     1  0.0376      0.938 0.996 0.004
#> GSM1105447     2  0.0376      0.900 0.004 0.996
#> GSM1105467     2  0.0000      0.899 0.000 1.000
#> GSM1105470     2  0.0000      0.899 0.000 1.000
#> GSM1105471     2  0.0938      0.899 0.012 0.988
#> GSM1105474     2  0.0000      0.899 0.000 1.000
#> GSM1105475     2  0.0376      0.900 0.004 0.996
#> GSM1105440     1  0.0000      0.937 1.000 0.000
#> GSM1105488     2  0.1843      0.895 0.028 0.972
#> GSM1105489     1  0.0376      0.938 0.996 0.004
#> GSM1105492     1  0.0000      0.937 1.000 0.000
#> GSM1105493     1  0.2423      0.928 0.960 0.040
#> GSM1105497     2  0.2236      0.893 0.036 0.964
#> GSM1105500     2  0.7745      0.743 0.228 0.772
#> GSM1105501     2  0.4431      0.863 0.092 0.908
#> GSM1105508     2  0.9970      0.234 0.468 0.532
#> GSM1105444     2  0.0000      0.899 0.000 1.000
#> GSM1105513     2  0.2423      0.890 0.040 0.960
#> GSM1105516     2  0.9686      0.426 0.396 0.604
#> GSM1105520     2  0.4161      0.868 0.084 0.916
#> GSM1105524     1  0.0000      0.937 1.000 0.000
#> GSM1105536     2  0.7815      0.720 0.232 0.768
#> GSM1105537     1  0.0000      0.937 1.000 0.000
#> GSM1105540     1  0.5059      0.865 0.888 0.112
#> GSM1105544     2  0.9686      0.440 0.396 0.604
#> GSM1105445     2  0.0376      0.900 0.004 0.996
#> GSM1105553     2  1.0000      0.174 0.496 0.504
#> GSM1105556     1  0.0000      0.937 1.000 0.000
#> GSM1105557     2  0.2423      0.890 0.040 0.960
#> GSM1105449     2  0.0376      0.900 0.004 0.996
#> GSM1105469     2  0.7528      0.758 0.216 0.784
#> GSM1105472     2  0.0000      0.899 0.000 1.000
#> GSM1105473     1  0.2603      0.926 0.956 0.044
#> GSM1105476     2  0.0000      0.899 0.000 1.000
#> GSM1105477     2  0.0376      0.900 0.004 0.996
#> GSM1105478     2  0.5408      0.841 0.124 0.876
#> GSM1105510     2  0.2236      0.893 0.036 0.964
#> GSM1105530     1  0.0938      0.938 0.988 0.012
#> GSM1105539     1  0.0672      0.938 0.992 0.008
#> GSM1105480     2  0.5408      0.841 0.124 0.876
#> GSM1105512     1  0.0000      0.937 1.000 0.000
#> GSM1105532     1  0.0938      0.938 0.988 0.012
#> GSM1105541     1  0.0672      0.938 0.992 0.008
#> GSM1105439     2  0.0376      0.900 0.004 0.996
#> GSM1105463     1  0.2423      0.927 0.960 0.040
#> GSM1105482     1  0.1184      0.937 0.984 0.016
#> GSM1105483     2  0.7528      0.758 0.216 0.784
#> GSM1105494     2  0.7745      0.743 0.228 0.772
#> GSM1105503     2  0.6048      0.822 0.148 0.852
#> GSM1105507     1  0.9732      0.263 0.596 0.404
#> GSM1105446     2  0.0000      0.899 0.000 1.000
#> GSM1105519     1  0.2043      0.932 0.968 0.032
#> GSM1105526     2  0.0376      0.899 0.004 0.996
#> GSM1105527     2  0.7528      0.758 0.216 0.784
#> GSM1105531     1  0.4161      0.891 0.916 0.084
#> GSM1105543     2  0.0000      0.899 0.000 1.000
#> GSM1105546     1  0.0376      0.938 0.996 0.004
#> GSM1105547     1  0.1633      0.935 0.976 0.024
#> GSM1105455     2  0.0376      0.900 0.004 0.996
#> GSM1105458     2  0.0376      0.900 0.004 0.996
#> GSM1105459     2  0.0000      0.899 0.000 1.000
#> GSM1105462     1  0.2236      0.930 0.964 0.036
#> GSM1105441     2  0.0376      0.900 0.004 0.996
#> GSM1105465     2  0.1843      0.895 0.028 0.972
#> GSM1105484     2  0.0000      0.899 0.000 1.000
#> GSM1105485     2  0.1843      0.895 0.028 0.972
#> GSM1105496     2  0.7745      0.743 0.228 0.772
#> GSM1105505     2  0.6048      0.822 0.148 0.852
#> GSM1105509     1  0.9732      0.263 0.596 0.404
#> GSM1105448     2  0.0000      0.899 0.000 1.000
#> GSM1105521     1  0.2043      0.932 0.968 0.032
#> GSM1105528     2  0.0376      0.899 0.004 0.996
#> GSM1105529     2  0.1843      0.895 0.028 0.972
#> GSM1105533     1  0.0000      0.937 1.000 0.000
#> GSM1105545     2  0.7815      0.720 0.232 0.768
#> GSM1105548     1  0.0376      0.938 0.996 0.004
#> GSM1105549     1  0.1633      0.935 0.976 0.024
#> GSM1105457     2  0.0376      0.900 0.004 0.996
#> GSM1105460     2  0.0376      0.900 0.004 0.996
#> GSM1105461     2  0.0000      0.899 0.000 1.000
#> GSM1105464     1  0.2236      0.930 0.964 0.036
#> GSM1105466     2  0.6148      0.819 0.152 0.848
#> GSM1105479     2  0.0672      0.899 0.008 0.992
#> GSM1105502     1  0.2948      0.916 0.948 0.052
#> GSM1105515     1  0.0000      0.937 1.000 0.000
#> GSM1105523     2  1.0000      0.172 0.496 0.504
#> GSM1105550     1  0.8144      0.653 0.748 0.252
#> GSM1105450     2  0.0000      0.899 0.000 1.000
#> GSM1105451     2  0.0000      0.899 0.000 1.000
#> GSM1105454     2  0.0672      0.899 0.008 0.992
#> GSM1105468     2  0.0000      0.899 0.000 1.000
#> GSM1105481     2  0.0672      0.899 0.008 0.992
#> GSM1105504     1  0.2948      0.916 0.948 0.052
#> GSM1105517     1  0.6712      0.777 0.824 0.176
#> GSM1105525     2  1.0000      0.172 0.496 0.504
#> GSM1105552     1  0.8081      0.660 0.752 0.248
#> GSM1105452     2  0.1633      0.896 0.024 0.976
#> GSM1105453     2  0.0000      0.899 0.000 1.000
#> GSM1105456     2  0.0672      0.899 0.008 0.992

show/hide code output

cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#>            class entropy silhouette    p1    p2    p3
#> GSM1105438     2  0.6008     0.4721 0.000 0.628 0.372
#> GSM1105486     2  0.5988     0.4729 0.000 0.632 0.368
#> GSM1105487     1  0.0747     0.8448 0.984 0.000 0.016
#> GSM1105490     2  0.3295     0.3746 0.008 0.896 0.096
#> GSM1105491     1  0.9692    -0.0871 0.432 0.224 0.344
#> GSM1105495     2  0.6295     0.2962 0.000 0.528 0.472
#> GSM1105498     2  0.8574    -0.1972 0.096 0.472 0.432
#> GSM1105499     1  0.0424     0.8468 0.992 0.000 0.008
#> GSM1105506     2  0.6710     0.1836 0.072 0.732 0.196
#> GSM1105442     2  0.6460     0.4311 0.004 0.556 0.440
#> GSM1105511     2  0.3295     0.3746 0.008 0.896 0.096
#> GSM1105514     2  0.5988     0.4729 0.000 0.632 0.368
#> GSM1105518     2  0.7289    -0.0733 0.028 0.504 0.468
#> GSM1105522     1  0.0424     0.8468 0.992 0.000 0.008
#> GSM1105534     1  0.0424     0.8468 0.992 0.000 0.008
#> GSM1105535     1  0.0424     0.8468 0.992 0.000 0.008
#> GSM1105538     1  0.5585     0.7021 0.812 0.096 0.092
#> GSM1105542     2  0.6398     0.4467 0.004 0.580 0.416
#> GSM1105443     2  0.1964     0.4130 0.000 0.944 0.056
#> GSM1105551     1  0.9956    -0.4587 0.360 0.288 0.352
#> GSM1105554     1  0.0424     0.8468 0.992 0.000 0.008
#> GSM1105555     1  0.0747     0.8448 0.984 0.000 0.016
#> GSM1105447     2  0.1964     0.4173 0.000 0.944 0.056
#> GSM1105467     2  0.6079     0.4675 0.000 0.612 0.388
#> GSM1105470     2  0.5988     0.4729 0.000 0.632 0.368
#> GSM1105471     2  0.6102     0.2809 0.008 0.672 0.320
#> GSM1105474     2  0.5988     0.4729 0.000 0.632 0.368
#> GSM1105475     2  0.5098     0.4594 0.000 0.752 0.248
#> GSM1105440     1  0.0424     0.8468 0.992 0.000 0.008
#> GSM1105488     2  0.6398     0.4467 0.004 0.580 0.416
#> GSM1105489     1  0.0747     0.8448 0.984 0.000 0.016
#> GSM1105492     1  0.0424     0.8468 0.992 0.000 0.008
#> GSM1105493     1  0.2945     0.8153 0.908 0.004 0.088
#> GSM1105497     3  0.6799    -0.5489 0.012 0.456 0.532
#> GSM1105500     2  0.8574    -0.1972 0.096 0.472 0.432
#> GSM1105501     2  0.5634     0.3347 0.056 0.800 0.144
#> GSM1105508     2  0.9827    -0.3698 0.372 0.384 0.244
#> GSM1105444     2  0.6062     0.4669 0.000 0.616 0.384
#> GSM1105513     2  0.3295     0.3746 0.008 0.896 0.096
#> GSM1105516     2  0.9423    -0.1782 0.304 0.492 0.204
#> GSM1105520     2  0.7289    -0.0733 0.028 0.504 0.468
#> GSM1105524     1  0.0424     0.8468 0.992 0.000 0.008
#> GSM1105536     2  0.8556     0.2341 0.164 0.604 0.232
#> GSM1105537     1  0.0424     0.8468 0.992 0.000 0.008
#> GSM1105540     1  0.5585     0.7021 0.812 0.096 0.092
#> GSM1105544     2  0.9901    -0.2730 0.296 0.404 0.300
#> GSM1105445     2  0.1964     0.4130 0.000 0.944 0.056
#> GSM1105553     1  0.9956    -0.4587 0.360 0.288 0.352
#> GSM1105556     1  0.0424     0.8468 0.992 0.000 0.008
#> GSM1105557     2  0.3295     0.3746 0.008 0.896 0.096
#> GSM1105449     2  0.1964     0.4202 0.000 0.944 0.056
#> GSM1105469     2  0.8202    -0.0639 0.092 0.580 0.328
#> GSM1105472     2  0.5988     0.4729 0.000 0.632 0.368
#> GSM1105473     1  0.2947     0.8340 0.920 0.020 0.060
#> GSM1105476     2  0.5988     0.4729 0.000 0.632 0.368
#> GSM1105477     2  0.5098     0.4594 0.000 0.752 0.248
#> GSM1105478     2  0.7104     0.0466 0.032 0.608 0.360
#> GSM1105510     2  0.6745     0.4393 0.012 0.560 0.428
#> GSM1105530     1  0.2096     0.8395 0.944 0.004 0.052
#> GSM1105539     1  0.1989     0.8400 0.948 0.004 0.048
#> GSM1105480     2  0.7104     0.0466 0.032 0.608 0.360
#> GSM1105512     1  0.0424     0.8468 0.992 0.000 0.008
#> GSM1105532     1  0.2096     0.8395 0.944 0.004 0.052
#> GSM1105541     1  0.1989     0.8400 0.948 0.004 0.048
#> GSM1105439     2  0.1031     0.4323 0.000 0.976 0.024
#> GSM1105463     1  0.2772     0.8299 0.916 0.004 0.080
#> GSM1105482     1  0.1129     0.8468 0.976 0.004 0.020
#> GSM1105483     2  0.8202    -0.0639 0.092 0.580 0.328
#> GSM1105494     2  0.8574    -0.1972 0.096 0.472 0.432
#> GSM1105503     2  0.8474    -0.1443 0.092 0.504 0.404
#> GSM1105507     1  0.9277    -0.0372 0.496 0.328 0.176
#> GSM1105446     2  0.5968     0.4734 0.000 0.636 0.364
#> GSM1105519     1  0.2492     0.8309 0.936 0.016 0.048
#> GSM1105526     2  0.6126     0.4724 0.004 0.644 0.352
#> GSM1105527     2  0.8202    -0.0639 0.092 0.580 0.328
#> GSM1105531     1  0.4232     0.7969 0.872 0.044 0.084
#> GSM1105543     2  0.5968     0.4734 0.000 0.636 0.364
#> GSM1105546     1  0.1031     0.8465 0.976 0.000 0.024
#> GSM1105547     1  0.2496     0.8266 0.928 0.004 0.068
#> GSM1105455     2  0.0592     0.4266 0.000 0.988 0.012
#> GSM1105458     2  0.1964     0.4169 0.000 0.944 0.056
#> GSM1105459     2  0.5988     0.4729 0.000 0.632 0.368
#> GSM1105462     1  0.2846     0.8350 0.924 0.020 0.056
#> GSM1105441     2  0.1031     0.4323 0.000 0.976 0.024
#> GSM1105465     2  0.6460     0.4311 0.004 0.556 0.440
#> GSM1105484     2  0.6126     0.4605 0.000 0.600 0.400
#> GSM1105485     2  0.6398     0.4467 0.004 0.580 0.416
#> GSM1105496     2  0.8574    -0.1972 0.096 0.472 0.432
#> GSM1105505     2  0.8474    -0.1443 0.092 0.504 0.404
#> GSM1105509     1  0.9277    -0.0372 0.496 0.328 0.176
#> GSM1105448     2  0.5988     0.4729 0.000 0.632 0.368
#> GSM1105521     1  0.2492     0.8309 0.936 0.016 0.048
#> GSM1105528     2  0.6126     0.4724 0.004 0.644 0.352
#> GSM1105529     2  0.6398     0.4467 0.004 0.580 0.416
#> GSM1105533     1  0.0592     0.8442 0.988 0.000 0.012
#> GSM1105545     2  0.8556     0.2341 0.164 0.604 0.232
#> GSM1105548     1  0.1031     0.8465 0.976 0.000 0.024
#> GSM1105549     1  0.2496     0.8266 0.928 0.004 0.068
#> GSM1105457     2  0.0592     0.4266 0.000 0.988 0.012
#> GSM1105460     2  0.1964     0.4169 0.000 0.944 0.056
#> GSM1105461     2  0.5988     0.4729 0.000 0.632 0.368
#> GSM1105464     1  0.2846     0.8350 0.924 0.020 0.056
#> GSM1105466     2  0.7394     0.0705 0.064 0.652 0.284
#> GSM1105479     2  0.6111     0.3182 0.000 0.604 0.396
#> GSM1105502     1  0.4094     0.7955 0.872 0.028 0.100
#> GSM1105515     1  0.0424     0.8468 0.992 0.000 0.008
#> GSM1105523     3  0.9948     0.3086 0.352 0.284 0.364
#> GSM1105550     1  0.8072     0.4384 0.652 0.184 0.164
#> GSM1105450     2  0.5988     0.4729 0.000 0.632 0.368
#> GSM1105451     2  0.5988     0.4729 0.000 0.632 0.368
#> GSM1105454     2  0.6095     0.1085 0.000 0.608 0.392
#> GSM1105468     2  0.5988     0.4729 0.000 0.632 0.368
#> GSM1105481     2  0.6286     0.2460 0.000 0.536 0.464
#> GSM1105504     1  0.4094     0.7955 0.872 0.028 0.100
#> GSM1105517     1  0.7042     0.5827 0.728 0.132 0.140
#> GSM1105525     3  0.9948     0.3086 0.352 0.284 0.364
#> GSM1105552     1  0.8026     0.4464 0.656 0.180 0.164
#> GSM1105452     2  0.6126     0.4565 0.000 0.600 0.400
#> GSM1105453     2  0.5988     0.4729 0.000 0.632 0.368
#> GSM1105456     2  0.6095     0.1085 0.000 0.608 0.392

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>            class entropy silhouette    p1    p2    p3    p4
#> GSM1105438     2  0.0524    0.70964 0.000 0.988 0.004 0.008
#> GSM1105486     2  0.0188    0.70932 0.000 0.996 0.000 0.004
#> GSM1105487     1  0.4605   -0.07449 0.664 0.000 0.336 0.000
#> GSM1105490     4  0.5576    0.26671 0.000 0.444 0.020 0.536
#> GSM1105491     1  0.8120    0.11634 0.440 0.324 0.220 0.016
#> GSM1105495     2  0.7407    0.13233 0.012 0.440 0.116 0.432
#> GSM1105498     4  0.5975    0.65742 0.048 0.096 0.108 0.748
#> GSM1105499     3  0.4804    0.94187 0.384 0.000 0.616 0.000
#> GSM1105506     4  0.6822    0.53718 0.016 0.284 0.092 0.608
#> GSM1105442     2  0.4579    0.60501 0.000 0.768 0.200 0.032
#> GSM1105511     4  0.5576    0.26671 0.000 0.444 0.020 0.536
#> GSM1105514     2  0.0188    0.70864 0.000 0.996 0.004 0.000
#> GSM1105518     4  0.4991    0.61423 0.016 0.100 0.088 0.796
#> GSM1105522     3  0.4790    0.94042 0.380 0.000 0.620 0.000
#> GSM1105534     3  0.4804    0.94187 0.384 0.000 0.616 0.000
#> GSM1105535     3  0.4790    0.94042 0.380 0.000 0.620 0.000
#> GSM1105538     1  0.7189    0.28649 0.596 0.064 0.288 0.052
#> GSM1105542     2  0.4019    0.62051 0.000 0.792 0.196 0.012
#> GSM1105443     2  0.6204   -0.03535 0.000 0.500 0.052 0.448
#> GSM1105551     4  0.6845    0.33789 0.308 0.000 0.128 0.564
#> GSM1105554     3  0.4804    0.94187 0.384 0.000 0.616 0.000
#> GSM1105555     1  0.4605   -0.07449 0.664 0.000 0.336 0.000
#> GSM1105447     2  0.6125    0.00359 0.000 0.516 0.048 0.436
#> GSM1105467     2  0.1022    0.70171 0.000 0.968 0.000 0.032
#> GSM1105470     2  0.0188    0.70932 0.000 0.996 0.000 0.004
#> GSM1105471     4  0.6661    0.31702 0.016 0.376 0.056 0.552
#> GSM1105474     2  0.0336    0.70865 0.000 0.992 0.000 0.008
#> GSM1105475     2  0.4466    0.55240 0.000 0.784 0.036 0.180
#> GSM1105440     3  0.4817    0.92210 0.388 0.000 0.612 0.000
#> GSM1105488     2  0.4019    0.62051 0.000 0.792 0.196 0.012
#> GSM1105489     1  0.4605   -0.07449 0.664 0.000 0.336 0.000
#> GSM1105492     3  0.4790    0.94042 0.380 0.000 0.620 0.000
#> GSM1105493     1  0.4059    0.40458 0.788 0.000 0.200 0.012
#> GSM1105497     2  0.6894    0.48634 0.008 0.624 0.188 0.180
#> GSM1105500     4  0.5975    0.65742 0.048 0.096 0.108 0.748
#> GSM1105501     4  0.6911    0.30316 0.000 0.412 0.108 0.480
#> GSM1105508     4  0.9286    0.37229 0.284 0.152 0.144 0.420
#> GSM1105444     2  0.0927    0.70577 0.000 0.976 0.008 0.016
#> GSM1105513     4  0.5576    0.26671 0.000 0.444 0.020 0.536
#> GSM1105516     4  0.9592    0.39195 0.248 0.256 0.132 0.364
#> GSM1105520     4  0.4991    0.61423 0.016 0.100 0.088 0.796
#> GSM1105524     3  0.4790    0.94042 0.380 0.000 0.620 0.000
#> GSM1105536     2  0.8437    0.08594 0.152 0.520 0.076 0.252
#> GSM1105537     3  0.4790    0.94042 0.380 0.000 0.620 0.000
#> GSM1105540     1  0.7189    0.28649 0.596 0.064 0.288 0.052
#> GSM1105544     4  0.9450    0.41596 0.224 0.216 0.144 0.416
#> GSM1105445     2  0.6204   -0.03535 0.000 0.500 0.052 0.448
#> GSM1105553     4  0.6845    0.33789 0.308 0.000 0.128 0.564
#> GSM1105556     3  0.4804    0.94187 0.384 0.000 0.616 0.000
#> GSM1105557     4  0.5576    0.26671 0.000 0.444 0.020 0.536
#> GSM1105449     2  0.6114    0.02839 0.000 0.524 0.048 0.428
#> GSM1105469     4  0.6273    0.63812 0.020 0.156 0.120 0.704
#> GSM1105472     2  0.0188    0.70932 0.000 0.996 0.000 0.004
#> GSM1105473     1  0.1975    0.53063 0.944 0.012 0.028 0.016
#> GSM1105476     2  0.0336    0.70865 0.000 0.992 0.000 0.008
#> GSM1105477     2  0.4466    0.55240 0.000 0.784 0.036 0.180
#> GSM1105478     4  0.4803    0.63475 0.016 0.176 0.028 0.780
#> GSM1105510     2  0.4875    0.61344 0.008 0.772 0.180 0.040
#> GSM1105530     1  0.0000    0.52791 1.000 0.000 0.000 0.000
#> GSM1105539     1  0.0592    0.52322 0.984 0.000 0.016 0.000
#> GSM1105480     4  0.4803    0.63475 0.016 0.176 0.028 0.780
#> GSM1105512     3  0.4804    0.94187 0.384 0.000 0.616 0.000
#> GSM1105532     1  0.0000    0.52791 1.000 0.000 0.000 0.000
#> GSM1105541     1  0.0592    0.52322 0.984 0.000 0.016 0.000
#> GSM1105439     2  0.6090    0.10988 0.000 0.564 0.052 0.384
#> GSM1105463     1  0.0921    0.52924 0.972 0.000 0.000 0.028
#> GSM1105482     1  0.5119   -0.48585 0.556 0.000 0.440 0.004
#> GSM1105483     4  0.6273    0.63812 0.020 0.156 0.120 0.704
#> GSM1105494     4  0.5975    0.65742 0.048 0.096 0.108 0.748
#> GSM1105503     4  0.6372    0.62634 0.084 0.100 0.088 0.728
#> GSM1105507     1  0.9743   -0.07472 0.312 0.144 0.268 0.276
#> GSM1105446     2  0.1576    0.70009 0.000 0.948 0.048 0.004
#> GSM1105519     3  0.5592    0.60366 0.488 0.008 0.496 0.008
#> GSM1105526     2  0.1833    0.69694 0.000 0.944 0.032 0.024
#> GSM1105527     4  0.6273    0.63812 0.020 0.156 0.120 0.704
#> GSM1105531     1  0.2156    0.51933 0.928 0.008 0.004 0.060
#> GSM1105543     2  0.1576    0.70009 0.000 0.948 0.048 0.004
#> GSM1105546     1  0.4820    0.10976 0.692 0.000 0.296 0.012
#> GSM1105547     1  0.4452    0.31244 0.732 0.000 0.260 0.008
#> GSM1105455     2  0.6139    0.05394 0.000 0.544 0.052 0.404
#> GSM1105458     2  0.6197   -0.00899 0.000 0.508 0.052 0.440
#> GSM1105459     2  0.0804    0.70809 0.000 0.980 0.008 0.012
#> GSM1105462     1  0.1526    0.53120 0.960 0.016 0.012 0.012
#> GSM1105441     2  0.6090    0.10988 0.000 0.564 0.052 0.384
#> GSM1105465     2  0.4579    0.60501 0.000 0.768 0.200 0.032
#> GSM1105484     2  0.3711    0.64878 0.000 0.836 0.140 0.024
#> GSM1105485     2  0.4019    0.62051 0.000 0.792 0.196 0.012
#> GSM1105496     4  0.5975    0.65742 0.048 0.096 0.108 0.748
#> GSM1105505     4  0.6372    0.62634 0.084 0.100 0.088 0.728
#> GSM1105509     1  0.9743   -0.07472 0.312 0.144 0.268 0.276
#> GSM1105448     2  0.0336    0.70828 0.000 0.992 0.008 0.000
#> GSM1105521     3  0.5592    0.60366 0.488 0.008 0.496 0.008
#> GSM1105528     2  0.1833    0.69694 0.000 0.944 0.032 0.024
#> GSM1105529     2  0.4019    0.62051 0.000 0.792 0.196 0.012
#> GSM1105533     1  0.4746   -0.23338 0.632 0.000 0.368 0.000
#> GSM1105545     2  0.8437    0.08594 0.152 0.520 0.076 0.252
#> GSM1105548     1  0.4820    0.10976 0.692 0.000 0.296 0.012
#> GSM1105549     1  0.4452    0.31244 0.732 0.000 0.260 0.008
#> GSM1105457     2  0.6139    0.05394 0.000 0.544 0.052 0.404
#> GSM1105460     2  0.6197   -0.00899 0.000 0.508 0.052 0.440
#> GSM1105461     2  0.0804    0.70809 0.000 0.980 0.008 0.012
#> GSM1105464     1  0.1526    0.53120 0.960 0.016 0.012 0.012
#> GSM1105466     4  0.5843    0.61658 0.016 0.200 0.068 0.716
#> GSM1105479     2  0.6603   -0.04202 0.012 0.500 0.052 0.436
#> GSM1105502     1  0.3004    0.51786 0.892 0.000 0.048 0.060
#> GSM1105515     3  0.4804    0.94187 0.384 0.000 0.616 0.000
#> GSM1105523     4  0.6500    0.34926 0.328 0.000 0.092 0.580
#> GSM1105550     1  0.7798    0.36218 0.596 0.068 0.128 0.208
#> GSM1105450     2  0.0188    0.70932 0.000 0.996 0.000 0.004
#> GSM1105451     2  0.0376    0.70949 0.000 0.992 0.004 0.004
#> GSM1105454     4  0.5710    0.51683 0.012 0.184 0.076 0.728
#> GSM1105468     2  0.0188    0.70932 0.000 0.996 0.000 0.004
#> GSM1105481     4  0.6598    0.10252 0.012 0.432 0.052 0.504
#> GSM1105504     1  0.3004    0.51786 0.892 0.000 0.048 0.060
#> GSM1105517     1  0.7985    0.17299 0.492 0.028 0.320 0.160
#> GSM1105525     4  0.6500    0.34926 0.328 0.000 0.092 0.580
#> GSM1105552     1  0.7734    0.36395 0.600 0.064 0.128 0.208
#> GSM1105452     2  0.3583    0.63317 0.000 0.816 0.180 0.004
#> GSM1105453     2  0.0376    0.70949 0.000 0.992 0.004 0.004
#> GSM1105456     4  0.5710    0.51683 0.012 0.184 0.076 0.728

show/hide code output

cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#>            class entropy silhouette    p1    p2    p3    p4    p5
#> GSM1105438     2  0.0671    0.75821 0.000 0.980 0.000 0.016 0.004
#> GSM1105486     2  0.0671    0.75535 0.000 0.980 0.000 0.016 0.004
#> GSM1105487     1  0.4663    0.41212 0.604 0.000 0.376 0.000 0.020
#> GSM1105490     4  0.4218    0.28069 0.000 0.332 0.000 0.660 0.008
#> GSM1105491     3  0.6891    0.14800 0.004 0.320 0.500 0.024 0.152
#> GSM1105495     2  0.7348   -0.11285 0.000 0.408 0.044 0.184 0.364
#> GSM1105498     4  0.6504    0.01111 0.004 0.040 0.072 0.524 0.360
#> GSM1105499     1  0.0000    0.80540 1.000 0.000 0.000 0.000 0.000
#> GSM1105506     4  0.4479    0.29211 0.052 0.128 0.016 0.792 0.012
#> GSM1105442     2  0.5177    0.62792 0.000 0.720 0.052 0.040 0.188
#> GSM1105511     4  0.4218    0.28069 0.000 0.332 0.000 0.660 0.008
#> GSM1105514     2  0.0162    0.75679 0.000 0.996 0.000 0.004 0.000
#> GSM1105518     5  0.4990    0.54258 0.000 0.056 0.008 0.248 0.688
#> GSM1105522     1  0.0162    0.80500 0.996 0.000 0.000 0.000 0.004
#> GSM1105534     1  0.0000    0.80540 1.000 0.000 0.000 0.000 0.000
#> GSM1105535     1  0.0162    0.80500 0.996 0.000 0.000 0.000 0.004
#> GSM1105538     3  0.7126    0.44258 0.288 0.008 0.528 0.124 0.052
#> GSM1105542     2  0.4813    0.64357 0.000 0.744 0.048 0.028 0.180
#> GSM1105443     4  0.5851    0.17159 0.000 0.340 0.000 0.548 0.112
#> GSM1105551     4  0.7425    0.00973 0.028 0.000 0.312 0.340 0.320
#> GSM1105554     1  0.0000    0.80540 1.000 0.000 0.000 0.000 0.000
#> GSM1105555     1  0.4663    0.41212 0.604 0.000 0.376 0.000 0.020
#> GSM1105447     4  0.5894    0.16469 0.000 0.356 0.000 0.532 0.112
#> GSM1105467     2  0.2723    0.67177 0.000 0.864 0.000 0.124 0.012
#> GSM1105470     2  0.0510    0.75637 0.000 0.984 0.000 0.016 0.000
#> GSM1105471     5  0.7076    0.39133 0.000 0.260 0.012 0.356 0.372
#> GSM1105474     2  0.0510    0.75645 0.000 0.984 0.000 0.016 0.000
#> GSM1105475     2  0.4455    0.44030 0.000 0.692 0.016 0.284 0.008
#> GSM1105440     1  0.0798    0.79819 0.976 0.000 0.016 0.000 0.008
#> GSM1105488     2  0.4813    0.64357 0.000 0.744 0.048 0.028 0.180
#> GSM1105489     1  0.4663    0.41212 0.604 0.000 0.376 0.000 0.020
#> GSM1105492     1  0.0162    0.80500 0.996 0.000 0.000 0.000 0.004
#> GSM1105493     3  0.5102    0.46168 0.288 0.000 0.660 0.020 0.032
#> GSM1105497     2  0.6244    0.46864 0.000 0.584 0.052 0.064 0.300
#> GSM1105500     4  0.6504    0.01111 0.004 0.040 0.072 0.524 0.360
#> GSM1105501     4  0.5542    0.27599 0.044 0.260 0.016 0.664 0.016
#> GSM1105508     4  0.6892    0.23941 0.096 0.008 0.260 0.572 0.064
#> GSM1105444     2  0.1281    0.74898 0.000 0.956 0.000 0.012 0.032
#> GSM1105513     4  0.4218    0.28069 0.000 0.332 0.000 0.660 0.008
#> GSM1105516     4  0.8290    0.24794 0.060 0.140 0.252 0.476 0.072
#> GSM1105520     5  0.4990    0.54258 0.000 0.056 0.008 0.248 0.688
#> GSM1105524     1  0.0162    0.80500 0.996 0.000 0.000 0.000 0.004
#> GSM1105536     2  0.7705   -0.12929 0.004 0.412 0.172 0.344 0.068
#> GSM1105537     1  0.0162    0.80500 0.996 0.000 0.000 0.000 0.004
#> GSM1105540     3  0.7126    0.44258 0.288 0.008 0.528 0.124 0.052
#> GSM1105544     4  0.9004    0.16403 0.064 0.128 0.236 0.400 0.172
#> GSM1105445     4  0.5851    0.17159 0.000 0.340 0.000 0.548 0.112
#> GSM1105553     4  0.7425    0.00973 0.028 0.000 0.312 0.340 0.320
#> GSM1105556     1  0.0000    0.80540 1.000 0.000 0.000 0.000 0.000
#> GSM1105557     4  0.4218    0.28069 0.000 0.332 0.000 0.660 0.008
#> GSM1105449     4  0.5913    0.15920 0.000 0.364 0.000 0.524 0.112
#> GSM1105469     4  0.4461    0.29262 0.052 0.008 0.024 0.796 0.120
#> GSM1105472     2  0.0510    0.75637 0.000 0.984 0.000 0.016 0.000
#> GSM1105473     3  0.3325    0.71990 0.112 0.004 0.852 0.020 0.012
#> GSM1105476     2  0.0510    0.75645 0.000 0.984 0.000 0.016 0.000
#> GSM1105477     2  0.4455    0.44030 0.000 0.692 0.016 0.284 0.008
#> GSM1105478     4  0.4156    0.20637 0.008 0.040 0.016 0.808 0.128
#> GSM1105510     2  0.5042    0.64108 0.000 0.736 0.048 0.044 0.172
#> GSM1105530     3  0.2127    0.71836 0.108 0.000 0.892 0.000 0.000
#> GSM1105539     3  0.2329    0.71668 0.124 0.000 0.876 0.000 0.000
#> GSM1105480     4  0.4156    0.20637 0.008 0.040 0.016 0.808 0.128
#> GSM1105512     1  0.0000    0.80540 1.000 0.000 0.000 0.000 0.000
#> GSM1105532     3  0.2127    0.71836 0.108 0.000 0.892 0.000 0.000
#> GSM1105541     3  0.2329    0.71668 0.124 0.000 0.876 0.000 0.000
#> GSM1105439     2  0.5857   -0.19527 0.000 0.460 0.000 0.444 0.096
#> GSM1105463     3  0.2685    0.71737 0.092 0.000 0.880 0.000 0.028
#> GSM1105482     1  0.3509    0.66767 0.792 0.000 0.196 0.008 0.004
#> GSM1105483     4  0.4461    0.29262 0.052 0.008 0.024 0.796 0.120
#> GSM1105494     4  0.6494    0.01074 0.004 0.040 0.072 0.528 0.356
#> GSM1105503     5  0.6192    0.49993 0.000 0.056 0.084 0.228 0.632
#> GSM1105507     4  0.7961    0.02684 0.208 0.008 0.300 0.412 0.072
#> GSM1105446     2  0.1569    0.75232 0.000 0.948 0.008 0.012 0.032
#> GSM1105519     1  0.3716    0.66961 0.800 0.000 0.172 0.020 0.008
#> GSM1105526     2  0.2507    0.72885 0.000 0.900 0.016 0.072 0.012
#> GSM1105527     4  0.4461    0.29262 0.052 0.008 0.024 0.796 0.120
#> GSM1105531     3  0.3383    0.70184 0.068 0.000 0.860 0.020 0.052
#> GSM1105543     2  0.1885    0.74927 0.000 0.936 0.012 0.020 0.032
#> GSM1105546     1  0.5055    0.20200 0.544 0.000 0.428 0.012 0.016
#> GSM1105547     3  0.5215    0.31049 0.380 0.000 0.580 0.016 0.024
#> GSM1105455     4  0.5847    0.16373 0.000 0.424 0.000 0.480 0.096
#> GSM1105458     4  0.5873    0.16897 0.000 0.348 0.000 0.540 0.112
#> GSM1105459     2  0.0794    0.75225 0.000 0.972 0.000 0.028 0.000
#> GSM1105462     3  0.3106    0.72170 0.116 0.000 0.856 0.020 0.008
#> GSM1105441     2  0.5857   -0.19527 0.000 0.460 0.000 0.444 0.096
#> GSM1105465     2  0.5177    0.62792 0.000 0.720 0.052 0.040 0.188
#> GSM1105484     2  0.4191    0.67884 0.000 0.792 0.040 0.020 0.148
#> GSM1105485     2  0.4813    0.64357 0.000 0.744 0.048 0.028 0.180
#> GSM1105496     4  0.6504    0.01111 0.004 0.040 0.072 0.524 0.360
#> GSM1105505     5  0.6192    0.49993 0.000 0.056 0.084 0.228 0.632
#> GSM1105509     4  0.7961    0.02684 0.208 0.008 0.300 0.412 0.072
#> GSM1105448     2  0.0000    0.75667 0.000 1.000 0.000 0.000 0.000
#> GSM1105521     1  0.3716    0.66961 0.800 0.000 0.172 0.020 0.008
#> GSM1105528     2  0.2507    0.72885 0.000 0.900 0.016 0.072 0.012
#> GSM1105529     2  0.4813    0.64357 0.000 0.744 0.048 0.028 0.180
#> GSM1105533     1  0.3814    0.56390 0.720 0.000 0.276 0.000 0.004
#> GSM1105545     2  0.7695   -0.10906 0.004 0.420 0.172 0.336 0.068
#> GSM1105548     1  0.5055    0.20200 0.544 0.000 0.428 0.012 0.016
#> GSM1105549     3  0.5215    0.31049 0.380 0.000 0.580 0.016 0.024
#> GSM1105457     4  0.5847    0.16373 0.000 0.424 0.000 0.480 0.096
#> GSM1105460     4  0.5873    0.16897 0.000 0.348 0.000 0.540 0.112
#> GSM1105461     2  0.0794    0.75225 0.000 0.972 0.000 0.028 0.000
#> GSM1105464     3  0.3106    0.72170 0.116 0.000 0.856 0.020 0.008
#> GSM1105466     4  0.3305    0.29704 0.036 0.052 0.012 0.876 0.024
#> GSM1105479     5  0.6742    0.40252 0.000 0.388 0.004 0.212 0.396
#> GSM1105502     3  0.4605    0.69013 0.124 0.000 0.780 0.036 0.060
#> GSM1105515     1  0.0000    0.80540 1.000 0.000 0.000 0.000 0.000
#> GSM1105523     4  0.7504    0.07481 0.048 0.000 0.316 0.416 0.220
#> GSM1105550     3  0.7532    0.47779 0.092 0.040 0.568 0.212 0.088
#> GSM1105450     2  0.0404    0.75653 0.000 0.988 0.000 0.012 0.000
#> GSM1105451     2  0.0290    0.75765 0.000 0.992 0.000 0.008 0.000
#> GSM1105454     5  0.5633    0.56455 0.000 0.144 0.004 0.204 0.648
#> GSM1105468     2  0.0794    0.75200 0.000 0.972 0.000 0.028 0.000
#> GSM1105481     5  0.6363    0.44539 0.000 0.384 0.004 0.144 0.468
#> GSM1105504     3  0.4605    0.69013 0.124 0.000 0.780 0.036 0.060
#> GSM1105517     3  0.7827    0.34588 0.304 0.008 0.444 0.164 0.080
#> GSM1105525     4  0.7504    0.07481 0.048 0.000 0.316 0.416 0.220
#> GSM1105552     3  0.7552    0.48450 0.096 0.040 0.568 0.208 0.088
#> GSM1105452     2  0.4118    0.66832 0.000 0.788 0.040 0.012 0.160
#> GSM1105453     2  0.0290    0.75765 0.000 0.992 0.000 0.008 0.000
#> GSM1105456     5  0.5633    0.56455 0.000 0.144 0.004 0.204 0.648

show/hide code output

cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#>            class entropy silhouette    p1    p2    p3    p4    p5    p6
#> GSM1105438     2  0.0820     0.7613 0.000 0.972 0.000 0.016 0.012 0.000
#> GSM1105486     2  0.1296     0.7530 0.000 0.952 0.000 0.032 0.012 0.004
#> GSM1105487     1  0.6137     0.5165 0.572 0.000 0.256 0.004 0.108 0.060
#> GSM1105490     4  0.3426     0.5376 0.000 0.276 0.000 0.720 0.004 0.000
#> GSM1105491     3  0.6789     0.0257 0.004 0.316 0.348 0.004 0.308 0.020
#> GSM1105495     6  0.7123     0.1662 0.000 0.324 0.000 0.104 0.180 0.392
#> GSM1105498     5  0.6510     0.7412 0.000 0.020 0.008 0.364 0.416 0.192
#> GSM1105499     1  0.0508     0.8162 0.984 0.000 0.000 0.000 0.004 0.012
#> GSM1105506     4  0.4507     0.4409 0.044 0.120 0.004 0.768 0.060 0.004
#> GSM1105442     2  0.3965     0.5521 0.000 0.604 0.000 0.000 0.388 0.008
#> GSM1105511     4  0.3426     0.5376 0.000 0.276 0.000 0.720 0.004 0.000
#> GSM1105514     2  0.0291     0.7599 0.000 0.992 0.000 0.004 0.004 0.000
#> GSM1105518     6  0.5136     0.2932 0.000 0.008 0.004 0.180 0.144 0.664
#> GSM1105522     1  0.0146     0.8163 0.996 0.000 0.000 0.000 0.004 0.000
#> GSM1105534     1  0.0508     0.8162 0.984 0.000 0.000 0.000 0.004 0.012
#> GSM1105535     1  0.0146     0.8163 0.996 0.000 0.000 0.000 0.004 0.000
#> GSM1105538     3  0.7363     0.3819 0.244 0.000 0.468 0.108 0.156 0.024
#> GSM1105542     2  0.3684     0.5723 0.000 0.628 0.000 0.000 0.372 0.000
#> GSM1105443     4  0.5284     0.4966 0.000 0.268 0.000 0.612 0.012 0.108
#> GSM1105551     5  0.6979     0.6086 0.000 0.000 0.120 0.200 0.480 0.200
#> GSM1105554     1  0.0508     0.8162 0.984 0.000 0.000 0.000 0.004 0.012
#> GSM1105555     1  0.6137     0.5165 0.572 0.000 0.256 0.004 0.108 0.060
#> GSM1105447     4  0.5354     0.4930 0.000 0.284 0.000 0.596 0.012 0.108
#> GSM1105467     2  0.3141     0.6575 0.000 0.828 0.000 0.140 0.012 0.020
#> GSM1105470     2  0.1151     0.7526 0.000 0.956 0.000 0.032 0.012 0.000
#> GSM1105471     6  0.6385     0.3125 0.000 0.212 0.004 0.328 0.016 0.440
#> GSM1105474     2  0.0603     0.7600 0.000 0.980 0.000 0.016 0.004 0.000
#> GSM1105475     2  0.4468     0.2632 0.000 0.640 0.000 0.316 0.040 0.004
#> GSM1105440     1  0.0922     0.8080 0.968 0.000 0.004 0.000 0.024 0.004
#> GSM1105488     2  0.3672     0.5766 0.000 0.632 0.000 0.000 0.368 0.000
#> GSM1105489     1  0.6137     0.5165 0.572 0.000 0.256 0.004 0.108 0.060
#> GSM1105492     1  0.0146     0.8163 0.996 0.000 0.000 0.000 0.004 0.000
#> GSM1105493     3  0.6199     0.4247 0.176 0.000 0.576 0.004 0.196 0.048
#> GSM1105497     2  0.6214     0.3960 0.000 0.504 0.000 0.040 0.316 0.140
#> GSM1105500     5  0.6510     0.7412 0.000 0.020 0.008 0.364 0.416 0.192
#> GSM1105501     4  0.5173     0.5031 0.036 0.228 0.000 0.660 0.076 0.000
#> GSM1105508     4  0.7047    -0.1753 0.068 0.000 0.224 0.532 0.128 0.048
#> GSM1105444     2  0.2588     0.7359 0.000 0.876 0.000 0.024 0.092 0.008
#> GSM1105513     4  0.3426     0.5376 0.000 0.276 0.000 0.720 0.004 0.000
#> GSM1105516     4  0.8005     0.0227 0.052 0.112 0.232 0.452 0.136 0.016
#> GSM1105520     6  0.5136     0.2932 0.000 0.008 0.004 0.180 0.144 0.664
#> GSM1105524     1  0.0146     0.8163 0.996 0.000 0.000 0.000 0.004 0.000
#> GSM1105536     4  0.7497     0.2392 0.004 0.356 0.148 0.364 0.116 0.012
#> GSM1105537     1  0.0146     0.8163 0.996 0.000 0.000 0.000 0.004 0.000
#> GSM1105540     3  0.7363     0.3819 0.244 0.000 0.468 0.108 0.156 0.024
#> GSM1105544     5  0.9009     0.3496 0.056 0.100 0.188 0.292 0.292 0.072
#> GSM1105445     4  0.5284     0.4966 0.000 0.268 0.000 0.612 0.012 0.108
#> GSM1105553     5  0.6979     0.6086 0.000 0.000 0.120 0.200 0.480 0.200
#> GSM1105556     1  0.0508     0.8162 0.984 0.000 0.000 0.000 0.004 0.012
#> GSM1105557     4  0.3426     0.5376 0.000 0.276 0.000 0.720 0.004 0.000
#> GSM1105449     4  0.5387     0.4882 0.000 0.292 0.000 0.588 0.012 0.108
#> GSM1105469     4  0.4856    -0.0574 0.044 0.000 0.008 0.732 0.148 0.068
#> GSM1105472     2  0.1151     0.7526 0.000 0.956 0.000 0.032 0.012 0.000
#> GSM1105473     3  0.3396     0.6362 0.040 0.004 0.856 0.016 0.060 0.024
#> GSM1105476     2  0.0603     0.7600 0.000 0.980 0.000 0.016 0.004 0.000
#> GSM1105477     2  0.4468     0.2632 0.000 0.640 0.000 0.316 0.040 0.004
#> GSM1105478     4  0.4657    -0.0292 0.004 0.020 0.004 0.724 0.192 0.056
#> GSM1105510     2  0.4536     0.5884 0.000 0.652 0.000 0.036 0.300 0.012
#> GSM1105530     3  0.0632     0.6494 0.024 0.000 0.976 0.000 0.000 0.000
#> GSM1105539     3  0.0937     0.6487 0.040 0.000 0.960 0.000 0.000 0.000
#> GSM1105480     4  0.4657    -0.0292 0.004 0.020 0.004 0.724 0.192 0.056
#> GSM1105512     1  0.0508     0.8162 0.984 0.000 0.000 0.000 0.004 0.012
#> GSM1105532     3  0.0632     0.6494 0.024 0.000 0.976 0.000 0.000 0.000
#> GSM1105541     3  0.0937     0.6487 0.040 0.000 0.960 0.000 0.000 0.000
#> GSM1105439     4  0.5539     0.4597 0.000 0.392 0.000 0.504 0.016 0.088
#> GSM1105463     3  0.1313     0.6452 0.016 0.000 0.952 0.000 0.004 0.028
#> GSM1105482     1  0.4231     0.7118 0.776 0.000 0.128 0.004 0.064 0.028
#> GSM1105483     4  0.4856    -0.0574 0.044 0.000 0.008 0.732 0.148 0.068
#> GSM1105494     5  0.6495     0.7374 0.000 0.020 0.008 0.368 0.416 0.188
#> GSM1105503     6  0.6255     0.2308 0.000 0.008 0.080 0.164 0.144 0.604
#> GSM1105507     4  0.7663    -0.1755 0.196 0.000 0.268 0.388 0.132 0.016
#> GSM1105446     2  0.1549     0.7552 0.000 0.936 0.000 0.020 0.044 0.000
#> GSM1105519     1  0.4257     0.6871 0.780 0.000 0.128 0.020 0.056 0.016
#> GSM1105526     2  0.2939     0.7194 0.000 0.860 0.000 0.072 0.060 0.008
#> GSM1105527     4  0.4856    -0.0574 0.044 0.000 0.008 0.732 0.148 0.068
#> GSM1105531     3  0.1531     0.6270 0.000 0.000 0.928 0.004 0.000 0.068
#> GSM1105543     2  0.2006     0.7448 0.000 0.904 0.000 0.016 0.080 0.000
#> GSM1105546     1  0.5924     0.2959 0.512 0.000 0.368 0.008 0.080 0.032
#> GSM1105547     3  0.6540     0.2905 0.268 0.000 0.504 0.004 0.176 0.048
#> GSM1105455     4  0.5472     0.4880 0.000 0.356 0.000 0.540 0.016 0.088
#> GSM1105458     4  0.5320     0.4948 0.000 0.276 0.000 0.604 0.012 0.108
#> GSM1105459     2  0.1594     0.7392 0.000 0.932 0.000 0.052 0.016 0.000
#> GSM1105462     3  0.2554     0.6459 0.032 0.000 0.900 0.024 0.032 0.012
#> GSM1105441     4  0.5539     0.4597 0.000 0.392 0.000 0.504 0.016 0.088
#> GSM1105465     2  0.3965     0.5521 0.000 0.604 0.000 0.000 0.388 0.008
#> GSM1105484     2  0.3653     0.6193 0.000 0.692 0.000 0.000 0.300 0.008
#> GSM1105485     2  0.3672     0.5746 0.000 0.632 0.000 0.000 0.368 0.000
#> GSM1105496     5  0.6510     0.7412 0.000 0.020 0.008 0.364 0.416 0.192
#> GSM1105505     6  0.6255     0.2308 0.000 0.008 0.080 0.164 0.144 0.604
#> GSM1105509     4  0.7663    -0.1755 0.196 0.000 0.268 0.388 0.132 0.016
#> GSM1105448     2  0.0993     0.7546 0.000 0.964 0.000 0.024 0.012 0.000
#> GSM1105521     1  0.4257     0.6871 0.780 0.000 0.128 0.020 0.056 0.016
#> GSM1105528     2  0.2939     0.7194 0.000 0.860 0.000 0.072 0.060 0.008
#> GSM1105529     2  0.3672     0.5746 0.000 0.632 0.000 0.000 0.368 0.000
#> GSM1105533     1  0.3547     0.5839 0.696 0.000 0.300 0.000 0.004 0.000
#> GSM1105545     2  0.7497    -0.2906 0.004 0.364 0.148 0.356 0.116 0.012
#> GSM1105548     1  0.5924     0.2959 0.512 0.000 0.368 0.008 0.080 0.032
#> GSM1105549     3  0.6540     0.2905 0.268 0.000 0.504 0.004 0.176 0.048
#> GSM1105457     4  0.5472     0.4880 0.000 0.356 0.000 0.540 0.016 0.088
#> GSM1105460     4  0.5320     0.4948 0.000 0.276 0.000 0.604 0.012 0.108
#> GSM1105461     2  0.1594     0.7392 0.000 0.932 0.000 0.052 0.016 0.000
#> GSM1105464     3  0.2554     0.6459 0.032 0.000 0.900 0.024 0.032 0.012
#> GSM1105466     4  0.3643     0.2636 0.028 0.036 0.004 0.836 0.084 0.012
#> GSM1105479     6  0.6049     0.3750 0.000 0.340 0.000 0.180 0.012 0.468
#> GSM1105502     3  0.3864     0.6028 0.032 0.000 0.828 0.036 0.060 0.044
#> GSM1105515     1  0.0508     0.8162 0.984 0.000 0.000 0.000 0.004 0.012
#> GSM1105523     3  0.7855    -0.4643 0.032 0.000 0.300 0.300 0.276 0.092
#> GSM1105550     3  0.7280     0.3386 0.060 0.020 0.528 0.188 0.176 0.028
#> GSM1105450     2  0.1245     0.7539 0.000 0.952 0.000 0.032 0.016 0.000
#> GSM1105451     2  0.0405     0.7606 0.000 0.988 0.000 0.008 0.004 0.000
#> GSM1105454     6  0.3248     0.4989 0.000 0.052 0.000 0.116 0.004 0.828
#> GSM1105468     2  0.1594     0.7438 0.000 0.932 0.000 0.052 0.016 0.000
#> GSM1105481     6  0.5542     0.4372 0.000 0.340 0.000 0.108 0.012 0.540
#> GSM1105504     3  0.3864     0.6028 0.032 0.000 0.828 0.036 0.060 0.044
#> GSM1105517     3  0.7673     0.2562 0.276 0.004 0.408 0.144 0.152 0.016
#> GSM1105525     3  0.7855    -0.4643 0.032 0.000 0.300 0.300 0.276 0.092
#> GSM1105552     3  0.7256     0.3432 0.060 0.020 0.532 0.184 0.176 0.028
#> GSM1105452     2  0.3198     0.6404 0.000 0.740 0.000 0.000 0.260 0.000
#> GSM1105453     2  0.0405     0.7606 0.000 0.988 0.000 0.008 0.004 0.000
#> GSM1105456     6  0.3248     0.4989 0.000 0.052 0.000 0.116 0.004 0.828

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) other(p) time(p) individual(p) k
#> MAD:hclust 110   0.8710   0.3949   1.000      0.002368 2
#> MAD:hclust  38       NA       NA      NA            NA 3
#> MAD:hclust  73   0.2185   0.0910   0.958      0.000050 4
#> MAD:hclust  60   0.4597   0.0537   0.996      0.000253 5
#> MAD:hclust  70   0.0741   0.0171   0.988      0.000045 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 44956 rows and 120 columns.
#>   Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'MAD' method.
#>   Subgroups are detected by 'kmeans' method.
#>   Performed in total 1250 partitions by row resampling.
#>   Best k for subgroups seems to be 2.
#> 
#> Following methods can be applied to this 'ConsensusPartition' object:
#>  [1] "cola_report"             "collect_classes"         "collect_plots"          
#>  [4] "collect_stats"           "colnames"                "compare_signatures"     
#>  [7] "consensus_heatmap"       "dimension_reduction"     "functional_enrichment"  
#> [10] "get_anno_col"            "get_anno"                "get_classes"            
#> [13] "get_consensus"           "get_matrix"              "get_membership"         
#> [16] "get_param"               "get_signatures"          "get_stats"              
#> [19] "is_best_k"               "is_stable_k"             "membership_heatmap"     
#> [22] "ncol"                    "nrow"                    "plot_ecdf"              
#> [25] "rownames"                "select_partition_number" "show"                   
#> [28] "suggest_best_k"          "test_to_known_factors"

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

collect_plots(res)

plot of chunk MAD-kmeans-collect-plots

The plots are:

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

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

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

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

select_partition_number(res)

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

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

get_stats(res)
#>   k 1-PAC mean_silhouette concordance area_increased  Rand Jaccard
#> 2 2 1.000           0.970       0.987         0.4880 0.513   0.513
#> 3 3 0.574           0.674       0.810         0.3458 0.736   0.525
#> 4 4 0.551           0.550       0.733         0.1246 0.909   0.741
#> 5 5 0.614           0.487       0.684         0.0704 0.829   0.479
#> 6 6 0.701           0.586       0.760         0.0450 0.905   0.596

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
#> GSM1105438     2  0.0000      0.987 0.000 1.000
#> GSM1105486     2  0.0000      0.987 0.000 1.000
#> GSM1105487     1  0.0000      0.986 1.000 0.000
#> GSM1105490     2  0.0000      0.987 0.000 1.000
#> GSM1105491     2  0.2043      0.961 0.032 0.968
#> GSM1105495     2  0.2043      0.961 0.032 0.968
#> GSM1105498     2  0.2948      0.942 0.052 0.948
#> GSM1105499     1  0.0000      0.986 1.000 0.000
#> GSM1105506     2  0.0000      0.987 0.000 1.000
#> GSM1105442     2  0.0000      0.987 0.000 1.000
#> GSM1105511     2  0.0000      0.987 0.000 1.000
#> GSM1105514     2  0.0000      0.987 0.000 1.000
#> GSM1105518     2  0.0000      0.987 0.000 1.000
#> GSM1105522     1  0.0000      0.986 1.000 0.000
#> GSM1105534     1  0.0000      0.986 1.000 0.000
#> GSM1105535     1  0.0000      0.986 1.000 0.000
#> GSM1105538     1  0.0000      0.986 1.000 0.000
#> GSM1105542     2  0.0000      0.987 0.000 1.000
#> GSM1105443     2  0.0000      0.987 0.000 1.000
#> GSM1105551     1  0.0000      0.986 1.000 0.000
#> GSM1105554     1  0.0000      0.986 1.000 0.000
#> GSM1105555     1  0.0000      0.986 1.000 0.000
#> GSM1105447     2  0.0000      0.987 0.000 1.000
#> GSM1105467     2  0.0000      0.987 0.000 1.000
#> GSM1105470     2  0.0000      0.987 0.000 1.000
#> GSM1105471     2  0.0000      0.987 0.000 1.000
#> GSM1105474     2  0.0000      0.987 0.000 1.000
#> GSM1105475     2  0.0000      0.987 0.000 1.000
#> GSM1105440     1  0.0000      0.986 1.000 0.000
#> GSM1105488     2  0.0000      0.987 0.000 1.000
#> GSM1105489     1  0.0000      0.986 1.000 0.000
#> GSM1105492     1  0.0000      0.986 1.000 0.000
#> GSM1105493     1  0.0000      0.986 1.000 0.000
#> GSM1105497     2  0.0000      0.987 0.000 1.000
#> GSM1105500     2  0.0000      0.987 0.000 1.000
#> GSM1105501     2  0.0000      0.987 0.000 1.000
#> GSM1105508     1  0.0000      0.986 1.000 0.000
#> GSM1105444     2  0.0000      0.987 0.000 1.000
#> GSM1105513     2  0.0000      0.987 0.000 1.000
#> GSM1105516     1  0.9710      0.341 0.600 0.400
#> GSM1105520     2  0.5842      0.841 0.140 0.860
#> GSM1105524     1  0.0000      0.986 1.000 0.000
#> GSM1105536     2  0.0000      0.987 0.000 1.000
#> GSM1105537     1  0.0000      0.986 1.000 0.000
#> GSM1105540     1  0.0000      0.986 1.000 0.000
#> GSM1105544     2  0.0000      0.987 0.000 1.000
#> GSM1105445     2  0.0000      0.987 0.000 1.000
#> GSM1105553     2  0.2778      0.946 0.048 0.952
#> GSM1105556     1  0.0000      0.986 1.000 0.000
#> GSM1105557     2  0.0000      0.987 0.000 1.000
#> GSM1105449     2  0.0000      0.987 0.000 1.000
#> GSM1105469     1  0.0938      0.975 0.988 0.012
#> GSM1105472     2  0.0000      0.987 0.000 1.000
#> GSM1105473     1  0.0000      0.986 1.000 0.000
#> GSM1105476     2  0.0000      0.987 0.000 1.000
#> GSM1105477     2  0.0000      0.987 0.000 1.000
#> GSM1105478     2  0.0000      0.987 0.000 1.000
#> GSM1105510     2  0.0000      0.987 0.000 1.000
#> GSM1105530     1  0.0000      0.986 1.000 0.000
#> GSM1105539     1  0.0000      0.986 1.000 0.000
#> GSM1105480     2  0.0000      0.987 0.000 1.000
#> GSM1105512     1  0.0000      0.986 1.000 0.000
#> GSM1105532     1  0.0000      0.986 1.000 0.000
#> GSM1105541     1  0.0000      0.986 1.000 0.000
#> GSM1105439     2  0.0000      0.987 0.000 1.000
#> GSM1105463     1  0.0000      0.986 1.000 0.000
#> GSM1105482     1  0.0000      0.986 1.000 0.000
#> GSM1105483     2  0.0000      0.987 0.000 1.000
#> GSM1105494     2  0.0000      0.987 0.000 1.000
#> GSM1105503     2  0.8386      0.644 0.268 0.732
#> GSM1105507     1  0.0376      0.982 0.996 0.004
#> GSM1105446     2  0.0000      0.987 0.000 1.000
#> GSM1105519     1  0.0000      0.986 1.000 0.000
#> GSM1105526     2  0.0000      0.987 0.000 1.000
#> GSM1105527     2  0.0000      0.987 0.000 1.000
#> GSM1105531     1  0.0000      0.986 1.000 0.000
#> GSM1105543     2  0.0000      0.987 0.000 1.000
#> GSM1105546     1  0.0000      0.986 1.000 0.000
#> GSM1105547     1  0.0000      0.986 1.000 0.000
#> GSM1105455     2  0.0000      0.987 0.000 1.000
#> GSM1105458     2  0.0000      0.987 0.000 1.000
#> GSM1105459     2  0.0000      0.987 0.000 1.000
#> GSM1105462     1  0.8016      0.668 0.756 0.244
#> GSM1105441     2  0.0000      0.987 0.000 1.000
#> GSM1105465     2  0.0000      0.987 0.000 1.000
#> GSM1105484     2  0.0000      0.987 0.000 1.000
#> GSM1105485     2  0.0000      0.987 0.000 1.000
#> GSM1105496     2  0.8016      0.687 0.244 0.756
#> GSM1105505     1  0.0000      0.986 1.000 0.000
#> GSM1105509     1  0.0000      0.986 1.000 0.000
#> GSM1105448     2  0.0000      0.987 0.000 1.000
#> GSM1105521     1  0.0000      0.986 1.000 0.000
#> GSM1105528     2  0.0000      0.987 0.000 1.000
#> GSM1105529     2  0.0000      0.987 0.000 1.000
#> GSM1105533     1  0.0000      0.986 1.000 0.000
#> GSM1105545     2  0.0000      0.987 0.000 1.000
#> GSM1105548     1  0.0000      0.986 1.000 0.000
#> GSM1105549     1  0.0000      0.986 1.000 0.000
#> GSM1105457     2  0.0000      0.987 0.000 1.000
#> GSM1105460     2  0.0000      0.987 0.000 1.000
#> GSM1105461     2  0.0000      0.987 0.000 1.000
#> GSM1105464     1  0.0000      0.986 1.000 0.000
#> GSM1105466     2  0.0000      0.987 0.000 1.000
#> GSM1105479     2  0.0000      0.987 0.000 1.000
#> GSM1105502     1  0.0000      0.986 1.000 0.000
#> GSM1105515     1  0.0000      0.986 1.000 0.000
#> GSM1105523     1  0.0000      0.986 1.000 0.000
#> GSM1105550     1  0.0000      0.986 1.000 0.000
#> GSM1105450     2  0.0000      0.987 0.000 1.000
#> GSM1105451     2  0.0000      0.987 0.000 1.000
#> GSM1105454     2  0.0672      0.981 0.008 0.992
#> GSM1105468     2  0.0000      0.987 0.000 1.000
#> GSM1105481     2  0.2043      0.961 0.032 0.968
#> GSM1105504     1  0.0000      0.986 1.000 0.000
#> GSM1105517     1  0.0000      0.986 1.000 0.000
#> GSM1105525     1  0.0000      0.986 1.000 0.000
#> GSM1105552     1  0.0000      0.986 1.000 0.000
#> GSM1105452     2  0.0000      0.987 0.000 1.000
#> GSM1105453     2  0.0000      0.987 0.000 1.000
#> GSM1105456     2  0.2043      0.961 0.032 0.968

show/hide code output

cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#>            class entropy silhouette    p1    p2    p3
#> GSM1105438     2  0.6154      0.739 0.000 0.592 0.408
#> GSM1105486     2  0.6307      0.707 0.000 0.512 0.488
#> GSM1105487     1  0.0747      0.932 0.984 0.016 0.000
#> GSM1105490     3  0.0237      0.639 0.000 0.004 0.996
#> GSM1105491     2  0.1647      0.487 0.004 0.960 0.036
#> GSM1105495     2  0.2066      0.467 0.000 0.940 0.060
#> GSM1105498     3  0.5948      0.600 0.000 0.360 0.640
#> GSM1105499     1  0.0424      0.931 0.992 0.008 0.000
#> GSM1105506     3  0.0237      0.644 0.000 0.004 0.996
#> GSM1105442     2  0.4002      0.624 0.000 0.840 0.160
#> GSM1105511     3  0.0424      0.644 0.000 0.008 0.992
#> GSM1105514     2  0.6180      0.737 0.000 0.584 0.416
#> GSM1105518     3  0.5591      0.627 0.000 0.304 0.696
#> GSM1105522     1  0.1411      0.929 0.964 0.036 0.000
#> GSM1105534     1  0.0237      0.931 0.996 0.004 0.000
#> GSM1105535     1  0.0424      0.931 0.992 0.008 0.000
#> GSM1105538     1  0.0237      0.931 0.996 0.004 0.000
#> GSM1105542     2  0.5363      0.724 0.000 0.724 0.276
#> GSM1105443     3  0.0747      0.632 0.000 0.016 0.984
#> GSM1105551     1  0.2537      0.918 0.920 0.080 0.000
#> GSM1105554     1  0.0237      0.931 0.996 0.004 0.000
#> GSM1105555     1  0.2796      0.914 0.908 0.092 0.000
#> GSM1105447     3  0.3267      0.654 0.000 0.116 0.884
#> GSM1105467     2  0.6307      0.707 0.000 0.512 0.488
#> GSM1105470     2  0.6309      0.699 0.000 0.504 0.496
#> GSM1105471     3  0.5363      0.636 0.000 0.276 0.724
#> GSM1105474     2  0.6307      0.707 0.000 0.512 0.488
#> GSM1105475     3  0.4291      0.292 0.000 0.180 0.820
#> GSM1105440     1  0.0424      0.931 0.992 0.008 0.000
#> GSM1105488     2  0.5363      0.724 0.000 0.724 0.276
#> GSM1105489     1  0.2448      0.920 0.924 0.076 0.000
#> GSM1105492     1  0.0424      0.931 0.992 0.008 0.000
#> GSM1105493     1  0.3192      0.904 0.888 0.112 0.000
#> GSM1105497     2  0.3116      0.568 0.000 0.892 0.108
#> GSM1105500     3  0.3941      0.609 0.000 0.156 0.844
#> GSM1105501     3  0.0747      0.638 0.000 0.016 0.984
#> GSM1105508     1  0.1647      0.928 0.960 0.036 0.004
#> GSM1105444     2  0.6154      0.739 0.000 0.592 0.408
#> GSM1105513     3  0.0000      0.642 0.000 0.000 1.000
#> GSM1105516     1  0.8355      0.479 0.616 0.140 0.244
#> GSM1105520     3  0.6404      0.607 0.012 0.344 0.644
#> GSM1105524     1  0.0424      0.931 0.992 0.008 0.000
#> GSM1105536     3  0.4702      0.310 0.000 0.212 0.788
#> GSM1105537     1  0.0424      0.931 0.992 0.008 0.000
#> GSM1105540     3  0.8463      0.170 0.444 0.088 0.468
#> GSM1105544     3  0.5939      0.624 0.028 0.224 0.748
#> GSM1105445     3  0.4887      0.649 0.000 0.228 0.772
#> GSM1105553     3  0.6111      0.576 0.000 0.396 0.604
#> GSM1105556     1  0.0237      0.931 0.996 0.004 0.000
#> GSM1105557     3  0.0000      0.642 0.000 0.000 1.000
#> GSM1105449     3  0.6309     -0.707 0.000 0.500 0.500
#> GSM1105469     3  0.7251      0.438 0.348 0.040 0.612
#> GSM1105472     2  0.6260      0.727 0.000 0.552 0.448
#> GSM1105473     1  0.4605      0.845 0.796 0.204 0.000
#> GSM1105476     3  0.6309     -0.706 0.000 0.496 0.504
#> GSM1105477     3  0.5254      0.243 0.000 0.264 0.736
#> GSM1105478     3  0.4702      0.653 0.000 0.212 0.788
#> GSM1105510     2  0.5363      0.724 0.000 0.724 0.276
#> GSM1105530     1  0.3267      0.911 0.884 0.116 0.000
#> GSM1105539     1  0.3340      0.909 0.880 0.120 0.000
#> GSM1105480     3  0.2537      0.665 0.000 0.080 0.920
#> GSM1105512     1  0.0592      0.932 0.988 0.012 0.000
#> GSM1105532     1  0.3267      0.911 0.884 0.116 0.000
#> GSM1105541     1  0.3340      0.909 0.880 0.120 0.000
#> GSM1105439     3  0.0592      0.633 0.000 0.012 0.988
#> GSM1105463     1  0.6079      0.618 0.612 0.388 0.000
#> GSM1105482     1  0.0237      0.931 0.996 0.004 0.000
#> GSM1105483     3  0.3764      0.640 0.068 0.040 0.892
#> GSM1105494     3  0.4346      0.657 0.000 0.184 0.816
#> GSM1105503     3  0.6677      0.608 0.024 0.324 0.652
#> GSM1105507     1  0.2176      0.921 0.948 0.032 0.020
#> GSM1105446     2  0.6045      0.741 0.000 0.620 0.380
#> GSM1105519     1  0.1163      0.930 0.972 0.028 0.000
#> GSM1105526     3  0.3038      0.588 0.000 0.104 0.896
#> GSM1105527     3  0.2918      0.645 0.044 0.032 0.924
#> GSM1105531     2  0.9919     -0.330 0.292 0.396 0.312
#> GSM1105543     2  0.6045      0.741 0.000 0.620 0.380
#> GSM1105546     1  0.0237      0.931 0.996 0.004 0.000
#> GSM1105547     1  0.0237      0.931 0.996 0.004 0.000
#> GSM1105455     3  0.0747      0.629 0.000 0.016 0.984
#> GSM1105458     3  0.3879      0.653 0.000 0.152 0.848
#> GSM1105459     2  0.6307      0.707 0.000 0.512 0.488
#> GSM1105462     3  0.8384      0.518 0.088 0.392 0.520
#> GSM1105441     2  0.6309      0.697 0.000 0.504 0.496
#> GSM1105465     2  0.1643      0.495 0.000 0.956 0.044
#> GSM1105484     2  0.5363      0.724 0.000 0.724 0.276
#> GSM1105485     2  0.5656      0.716 0.008 0.728 0.264
#> GSM1105496     3  0.6798      0.566 0.016 0.400 0.584
#> GSM1105505     3  0.9043      0.465 0.136 0.396 0.468
#> GSM1105509     1  0.1163      0.929 0.972 0.028 0.000
#> GSM1105448     2  0.6154      0.739 0.000 0.592 0.408
#> GSM1105521     1  0.1163      0.930 0.972 0.028 0.000
#> GSM1105528     2  0.5363      0.724 0.000 0.724 0.276
#> GSM1105529     2  0.5363      0.724 0.000 0.724 0.276
#> GSM1105533     1  0.2796      0.913 0.908 0.092 0.000
#> GSM1105545     3  0.1163      0.627 0.000 0.028 0.972
#> GSM1105548     1  0.1860      0.927 0.948 0.052 0.000
#> GSM1105549     1  0.2625      0.913 0.916 0.084 0.000
#> GSM1105457     3  0.0000      0.642 0.000 0.000 1.000
#> GSM1105460     3  0.0892      0.628 0.000 0.020 0.980
#> GSM1105461     2  0.6307      0.707 0.000 0.512 0.488
#> GSM1105464     1  0.3116      0.911 0.892 0.108 0.000
#> GSM1105466     3  0.0000      0.642 0.000 0.000 1.000
#> GSM1105479     3  0.1163      0.637 0.000 0.028 0.972
#> GSM1105502     1  0.3267      0.911 0.884 0.116 0.000
#> GSM1105515     1  0.0237      0.931 0.996 0.004 0.000
#> GSM1105523     3  0.9311      0.222 0.364 0.168 0.468
#> GSM1105550     3  0.8445      0.220 0.424 0.088 0.488
#> GSM1105450     2  0.6307      0.707 0.000 0.512 0.488
#> GSM1105451     2  0.6307      0.707 0.000 0.512 0.488
#> GSM1105454     3  0.5678      0.622 0.000 0.316 0.684
#> GSM1105468     2  0.6307      0.707 0.000 0.512 0.488
#> GSM1105481     3  0.6111      0.578 0.000 0.396 0.604
#> GSM1105504     2  0.9912     -0.338 0.284 0.396 0.320
#> GSM1105517     1  0.1989      0.922 0.948 0.048 0.004
#> GSM1105525     1  0.4636      0.885 0.848 0.116 0.036
#> GSM1105552     1  0.6062      0.625 0.616 0.384 0.000
#> GSM1105452     2  0.5529      0.728 0.000 0.704 0.296
#> GSM1105453     2  0.6307      0.707 0.000 0.512 0.488
#> GSM1105456     3  0.5706      0.621 0.000 0.320 0.680

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>            class entropy silhouette    p1    p2    p3    p4
#> GSM1105438     2  0.1661     0.7809 0.000 0.944 0.004 0.052
#> GSM1105486     2  0.3172     0.7642 0.000 0.840 0.000 0.160
#> GSM1105487     1  0.3498     0.7860 0.832 0.000 0.160 0.008
#> GSM1105490     4  0.2868     0.5921 0.000 0.136 0.000 0.864
#> GSM1105491     3  0.6895    -0.0464 0.004 0.412 0.492 0.092
#> GSM1105495     3  0.6649     0.1202 0.000 0.340 0.560 0.100
#> GSM1105498     4  0.4991     0.1004 0.000 0.004 0.388 0.608
#> GSM1105499     1  0.2675     0.7971 0.892 0.000 0.100 0.008
#> GSM1105506     4  0.2469     0.5947 0.000 0.108 0.000 0.892
#> GSM1105442     2  0.5464     0.6136 0.000 0.708 0.228 0.064
#> GSM1105511     4  0.4274     0.5782 0.000 0.108 0.072 0.820
#> GSM1105514     2  0.1978     0.7805 0.000 0.928 0.004 0.068
#> GSM1105518     4  0.4978     0.1038 0.000 0.004 0.384 0.612
#> GSM1105522     1  0.4957     0.6950 0.684 0.000 0.300 0.016
#> GSM1105534     1  0.0000     0.8040 1.000 0.000 0.000 0.000
#> GSM1105535     1  0.2737     0.7960 0.888 0.000 0.104 0.008
#> GSM1105538     1  0.0000     0.8040 1.000 0.000 0.000 0.000
#> GSM1105542     2  0.3688     0.7028 0.000 0.792 0.208 0.000
#> GSM1105443     4  0.4830     0.3347 0.000 0.392 0.000 0.608
#> GSM1105551     1  0.3852     0.7727 0.800 0.000 0.192 0.008
#> GSM1105554     1  0.0188     0.8047 0.996 0.000 0.004 0.000
#> GSM1105555     1  0.2647     0.7887 0.880 0.000 0.120 0.000
#> GSM1105447     4  0.6602     0.1061 0.000 0.436 0.080 0.484
#> GSM1105467     2  0.3172     0.7642 0.000 0.840 0.000 0.160
#> GSM1105470     2  0.3172     0.7642 0.000 0.840 0.000 0.160
#> GSM1105471     4  0.5785     0.3103 0.000 0.064 0.272 0.664
#> GSM1105474     2  0.3123     0.7677 0.000 0.844 0.000 0.156
#> GSM1105475     4  0.4977     0.1667 0.000 0.460 0.000 0.540
#> GSM1105440     1  0.2412     0.8010 0.908 0.000 0.084 0.008
#> GSM1105488     2  0.3688     0.7028 0.000 0.792 0.208 0.000
#> GSM1105489     1  0.1940     0.8038 0.924 0.000 0.076 0.000
#> GSM1105492     1  0.0657     0.8042 0.984 0.000 0.012 0.004
#> GSM1105493     1  0.2530     0.7833 0.888 0.000 0.112 0.000
#> GSM1105497     2  0.6751     0.2347 0.000 0.508 0.396 0.096
#> GSM1105500     4  0.6449     0.4479 0.000 0.140 0.220 0.640
#> GSM1105501     4  0.4344     0.5769 0.000 0.108 0.076 0.816
#> GSM1105508     1  0.6951     0.4911 0.556 0.000 0.304 0.140
#> GSM1105444     2  0.1305     0.7797 0.000 0.960 0.004 0.036
#> GSM1105513     4  0.2011     0.5870 0.000 0.080 0.000 0.920
#> GSM1105516     4  0.8494    -0.0206 0.316 0.032 0.232 0.420
#> GSM1105520     4  0.4989    -0.1181 0.000 0.000 0.472 0.528
#> GSM1105524     1  0.2737     0.7960 0.888 0.000 0.104 0.008
#> GSM1105536     4  0.5850     0.5282 0.000 0.184 0.116 0.700
#> GSM1105537     1  0.2737     0.7960 0.888 0.000 0.104 0.008
#> GSM1105540     4  0.6708     0.1636 0.128 0.000 0.280 0.592
#> GSM1105544     4  0.6521     0.3708 0.044 0.060 0.220 0.676
#> GSM1105445     4  0.5292     0.3974 0.000 0.060 0.216 0.724
#> GSM1105553     4  0.5992    -0.1097 0.000 0.040 0.444 0.516
#> GSM1105556     1  0.0000     0.8040 1.000 0.000 0.000 0.000
#> GSM1105557     4  0.2469     0.5947 0.000 0.108 0.000 0.892
#> GSM1105449     2  0.4103     0.6644 0.000 0.744 0.000 0.256
#> GSM1105469     4  0.5486     0.3858 0.080 0.000 0.200 0.720
#> GSM1105472     2  0.3123     0.7677 0.000 0.844 0.000 0.156
#> GSM1105473     1  0.4776     0.5682 0.624 0.000 0.376 0.000
#> GSM1105476     2  0.3123     0.7677 0.000 0.844 0.000 0.156
#> GSM1105477     4  0.6050     0.5116 0.000 0.212 0.112 0.676
#> GSM1105478     4  0.1807     0.5317 0.000 0.008 0.052 0.940
#> GSM1105510     2  0.3982     0.6907 0.000 0.776 0.220 0.004
#> GSM1105530     1  0.5080     0.6185 0.576 0.000 0.420 0.004
#> GSM1105539     1  0.4964     0.6532 0.616 0.000 0.380 0.004
#> GSM1105480     4  0.2222     0.5398 0.000 0.016 0.060 0.924
#> GSM1105512     1  0.1637     0.7997 0.940 0.000 0.060 0.000
#> GSM1105532     1  0.5080     0.6185 0.576 0.000 0.420 0.004
#> GSM1105541     1  0.4950     0.6559 0.620 0.000 0.376 0.004
#> GSM1105439     4  0.4746     0.3780 0.000 0.368 0.000 0.632
#> GSM1105463     3  0.4881     0.4761 0.196 0.000 0.756 0.048
#> GSM1105482     1  0.1022     0.8055 0.968 0.000 0.032 0.000
#> GSM1105483     4  0.5719     0.4789 0.040 0.052 0.160 0.748
#> GSM1105494     4  0.3157     0.4639 0.000 0.004 0.144 0.852
#> GSM1105503     4  0.4981    -0.1032 0.000 0.000 0.464 0.536
#> GSM1105507     1  0.7606     0.1222 0.468 0.000 0.228 0.304
#> GSM1105446     2  0.1661     0.7667 0.000 0.944 0.052 0.004
#> GSM1105519     1  0.2921     0.7605 0.860 0.000 0.140 0.000
#> GSM1105526     4  0.5515     0.5475 0.000 0.152 0.116 0.732
#> GSM1105527     4  0.4387     0.5651 0.032 0.060 0.068 0.840
#> GSM1105531     3  0.4319     0.5494 0.012 0.000 0.760 0.228
#> GSM1105543     2  0.1743     0.7659 0.000 0.940 0.056 0.004
#> GSM1105546     1  0.0188     0.8047 0.996 0.000 0.004 0.000
#> GSM1105547     1  0.0000     0.8040 1.000 0.000 0.000 0.000
#> GSM1105455     4  0.4843     0.3263 0.000 0.396 0.000 0.604
#> GSM1105458     4  0.7253     0.2448 0.000 0.364 0.152 0.484
#> GSM1105459     2  0.3123     0.7677 0.000 0.844 0.000 0.156
#> GSM1105462     3  0.4647     0.4882 0.008 0.000 0.704 0.288
#> GSM1105441     2  0.3873     0.6789 0.000 0.772 0.000 0.228
#> GSM1105465     2  0.6613     0.3535 0.000 0.560 0.344 0.096
#> GSM1105484     2  0.3831     0.7029 0.000 0.792 0.204 0.004
#> GSM1105485     2  0.4599     0.6729 0.028 0.760 0.212 0.000
#> GSM1105496     3  0.5912     0.1697 0.000 0.036 0.524 0.440
#> GSM1105505     3  0.4482     0.5137 0.008 0.000 0.728 0.264
#> GSM1105509     1  0.5494     0.6205 0.716 0.000 0.208 0.076
#> GSM1105448     2  0.1398     0.7801 0.000 0.956 0.004 0.040
#> GSM1105521     1  0.2814     0.7663 0.868 0.000 0.132 0.000
#> GSM1105528     2  0.3649     0.7049 0.000 0.796 0.204 0.000
#> GSM1105529     2  0.3688     0.7028 0.000 0.792 0.208 0.000
#> GSM1105533     1  0.3982     0.7531 0.776 0.000 0.220 0.004
#> GSM1105545     4  0.4817     0.5712 0.000 0.128 0.088 0.784
#> GSM1105548     1  0.1557     0.8044 0.944 0.000 0.056 0.000
#> GSM1105549     1  0.1211     0.8047 0.960 0.000 0.040 0.000
#> GSM1105457     4  0.2814     0.5924 0.000 0.132 0.000 0.868
#> GSM1105460     4  0.4730     0.3847 0.000 0.364 0.000 0.636
#> GSM1105461     2  0.3123     0.7677 0.000 0.844 0.000 0.156
#> GSM1105464     1  0.4905     0.6367 0.632 0.000 0.364 0.004
#> GSM1105466     4  0.2469     0.5947 0.000 0.108 0.000 0.892
#> GSM1105479     4  0.3984     0.5582 0.000 0.132 0.040 0.828
#> GSM1105502     1  0.4964     0.6648 0.616 0.000 0.380 0.004
#> GSM1105515     1  0.0000     0.8040 1.000 0.000 0.000 0.000
#> GSM1105523     3  0.5712     0.4146 0.048 0.000 0.644 0.308
#> GSM1105550     4  0.6634     0.1637 0.116 0.000 0.292 0.592
#> GSM1105450     2  0.3123     0.7677 0.000 0.844 0.000 0.156
#> GSM1105451     2  0.3123     0.7677 0.000 0.844 0.000 0.156
#> GSM1105454     4  0.6435     0.0848 0.000 0.072 0.396 0.532
#> GSM1105468     2  0.3123     0.7677 0.000 0.844 0.000 0.156
#> GSM1105481     4  0.6003    -0.0407 0.000 0.040 0.456 0.504
#> GSM1105504     3  0.4319     0.5494 0.012 0.000 0.760 0.228
#> GSM1105517     1  0.7654     0.0800 0.464 0.000 0.252 0.284
#> GSM1105525     3  0.7416     0.0150 0.312 0.000 0.496 0.192
#> GSM1105552     3  0.5282     0.3748 0.276 0.000 0.688 0.036
#> GSM1105452     2  0.3610     0.7070 0.000 0.800 0.200 0.000
#> GSM1105453     2  0.3123     0.7677 0.000 0.844 0.000 0.156
#> GSM1105456     4  0.6435     0.0848 0.000 0.072 0.396 0.532

show/hide code output

cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#>            class entropy silhouette    p1    p2    p3    p4    p5
#> GSM1105438     2  0.1671     0.6659 0.000 0.924 0.000 0.000 0.076
#> GSM1105486     2  0.0000     0.7411 0.000 1.000 0.000 0.000 0.000
#> GSM1105487     1  0.5278     0.6165 0.672 0.000 0.252 0.016 0.060
#> GSM1105490     4  0.3055     0.6409 0.000 0.144 0.000 0.840 0.016
#> GSM1105491     5  0.3319     0.4897 0.000 0.100 0.040 0.008 0.852
#> GSM1105495     5  0.6341     0.3000 0.000 0.084 0.208 0.076 0.632
#> GSM1105498     4  0.6592     0.2983 0.000 0.008 0.204 0.512 0.276
#> GSM1105499     1  0.3815     0.7151 0.804 0.000 0.156 0.008 0.032
#> GSM1105506     4  0.3061     0.6444 0.000 0.136 0.000 0.844 0.020
#> GSM1105442     5  0.4387     0.5027 0.000 0.336 0.008 0.004 0.652
#> GSM1105511     4  0.4205     0.6416 0.000 0.124 0.084 0.788 0.004
#> GSM1105514     2  0.1544     0.6747 0.000 0.932 0.000 0.000 0.068
#> GSM1105518     4  0.7159     0.0914 0.000 0.016 0.264 0.380 0.340
#> GSM1105522     1  0.6118     0.2688 0.508 0.000 0.404 0.040 0.048
#> GSM1105534     1  0.0000     0.7770 1.000 0.000 0.000 0.000 0.000
#> GSM1105535     1  0.4178     0.7067 0.788 0.000 0.156 0.016 0.040
#> GSM1105538     1  0.0162     0.7768 0.996 0.000 0.000 0.004 0.000
#> GSM1105542     5  0.4249     0.4771 0.000 0.432 0.000 0.000 0.568
#> GSM1105443     2  0.5352     0.2120 0.000 0.536 0.000 0.408 0.056
#> GSM1105551     1  0.5302     0.6144 0.668 0.000 0.256 0.016 0.060
#> GSM1105554     1  0.0162     0.7768 0.996 0.000 0.004 0.000 0.000
#> GSM1105555     1  0.3799     0.6947 0.812 0.000 0.144 0.012 0.032
#> GSM1105447     2  0.6887     0.1136 0.000 0.432 0.008 0.320 0.240
#> GSM1105467     2  0.0290     0.7382 0.000 0.992 0.000 0.000 0.008
#> GSM1105470     2  0.0000     0.7411 0.000 1.000 0.000 0.000 0.000
#> GSM1105471     4  0.8106     0.2258 0.000 0.144 0.180 0.412 0.264
#> GSM1105474     2  0.0000     0.7411 0.000 1.000 0.000 0.000 0.000
#> GSM1105475     2  0.4130     0.4866 0.000 0.696 0.000 0.292 0.012
#> GSM1105440     1  0.4362     0.7160 0.788 0.000 0.132 0.020 0.060
#> GSM1105488     5  0.4249     0.4771 0.000 0.432 0.000 0.000 0.568
#> GSM1105489     1  0.3154     0.7343 0.860 0.000 0.104 0.012 0.024
#> GSM1105492     1  0.1074     0.7769 0.968 0.000 0.004 0.016 0.012
#> GSM1105493     1  0.3010     0.6735 0.824 0.000 0.172 0.000 0.004
#> GSM1105497     5  0.3556     0.5100 0.000 0.132 0.032 0.008 0.828
#> GSM1105500     4  0.5520     0.5452 0.000 0.024 0.104 0.692 0.180
#> GSM1105501     4  0.4503     0.6387 0.000 0.140 0.084 0.768 0.008
#> GSM1105508     3  0.7668     0.1601 0.264 0.000 0.384 0.300 0.052
#> GSM1105444     2  0.1965     0.6405 0.000 0.904 0.000 0.000 0.096
#> GSM1105513     4  0.3855     0.6242 0.000 0.120 0.008 0.816 0.056
#> GSM1105516     4  0.7417     0.2249 0.216 0.020 0.232 0.504 0.028
#> GSM1105520     4  0.6788     0.0747 0.000 0.000 0.284 0.372 0.344
#> GSM1105524     1  0.4178     0.7067 0.788 0.000 0.156 0.016 0.040
#> GSM1105536     4  0.5546     0.6027 0.000 0.188 0.108 0.684 0.020
#> GSM1105537     1  0.4178     0.7067 0.788 0.000 0.156 0.016 0.040
#> GSM1105540     4  0.5764     0.3942 0.060 0.000 0.296 0.616 0.028
#> GSM1105544     4  0.4899     0.5514 0.016 0.000 0.148 0.744 0.092
#> GSM1105445     4  0.7868     0.2680 0.000 0.116 0.196 0.456 0.232
#> GSM1105553     5  0.6749    -0.1198 0.000 0.000 0.264 0.348 0.388
#> GSM1105556     1  0.0162     0.7768 0.996 0.000 0.004 0.000 0.000
#> GSM1105557     4  0.2966     0.6453 0.000 0.136 0.000 0.848 0.016
#> GSM1105449     2  0.3055     0.6638 0.000 0.864 0.000 0.072 0.064
#> GSM1105469     4  0.4566     0.5603 0.024 0.024 0.196 0.752 0.004
#> GSM1105472     2  0.0000     0.7411 0.000 1.000 0.000 0.000 0.000
#> GSM1105473     3  0.4870     0.1523 0.448 0.000 0.532 0.004 0.016
#> GSM1105476     2  0.0000     0.7411 0.000 1.000 0.000 0.000 0.000
#> GSM1105477     4  0.5822     0.5951 0.000 0.172 0.116 0.676 0.036
#> GSM1105478     4  0.3596     0.6104 0.000 0.052 0.036 0.852 0.060
#> GSM1105510     5  0.4565     0.4847 0.000 0.408 0.012 0.000 0.580
#> GSM1105530     3  0.4474     0.2596 0.332 0.000 0.652 0.004 0.012
#> GSM1105539     3  0.4457     0.1867 0.368 0.000 0.620 0.000 0.012
#> GSM1105480     4  0.1710     0.6363 0.000 0.040 0.004 0.940 0.016
#> GSM1105512     1  0.3129     0.6570 0.832 0.000 0.156 0.008 0.004
#> GSM1105532     3  0.4474     0.2596 0.332 0.000 0.652 0.004 0.012
#> GSM1105541     3  0.4457     0.1867 0.368 0.000 0.620 0.000 0.012
#> GSM1105439     2  0.5256     0.1795 0.000 0.532 0.000 0.420 0.048
#> GSM1105463     3  0.4345     0.4794 0.020 0.000 0.780 0.044 0.156
#> GSM1105482     1  0.0880     0.7733 0.968 0.000 0.032 0.000 0.000
#> GSM1105483     4  0.4565     0.5892 0.008 0.064 0.176 0.752 0.000
#> GSM1105494     4  0.5800     0.4393 0.000 0.020 0.120 0.656 0.204
#> GSM1105503     4  0.6792     0.0900 0.000 0.000 0.324 0.380 0.296
#> GSM1105507     4  0.7147     0.0806 0.264 0.000 0.260 0.452 0.024
#> GSM1105446     2  0.3210     0.4487 0.000 0.788 0.000 0.000 0.212
#> GSM1105519     1  0.3783     0.5609 0.768 0.000 0.216 0.012 0.004
#> GSM1105526     4  0.5304     0.6192 0.000 0.160 0.108 0.712 0.020
#> GSM1105527     4  0.3187     0.6503 0.008 0.096 0.036 0.860 0.000
#> GSM1105531     3  0.4504     0.4390 0.000 0.000 0.748 0.084 0.168
#> GSM1105543     2  0.3242     0.4400 0.000 0.784 0.000 0.000 0.216
#> GSM1105546     1  0.0579     0.7774 0.984 0.000 0.000 0.008 0.008
#> GSM1105547     1  0.0290     0.7764 0.992 0.000 0.008 0.000 0.000
#> GSM1105455     2  0.5165     0.2884 0.000 0.576 0.000 0.376 0.048
#> GSM1105458     2  0.7147     0.1205 0.000 0.432 0.020 0.276 0.272
#> GSM1105459     2  0.0000     0.7411 0.000 1.000 0.000 0.000 0.000
#> GSM1105462     3  0.4316     0.4379 0.000 0.000 0.772 0.120 0.108
#> GSM1105441     2  0.2376     0.6890 0.000 0.904 0.000 0.052 0.044
#> GSM1105465     5  0.4317     0.5157 0.000 0.212 0.032 0.008 0.748
#> GSM1105484     5  0.4256     0.4720 0.000 0.436 0.000 0.000 0.564
#> GSM1105485     5  0.4722     0.4841 0.004 0.412 0.012 0.000 0.572
#> GSM1105496     5  0.6791    -0.1038 0.000 0.000 0.304 0.312 0.384
#> GSM1105505     3  0.4886     0.3961 0.000 0.000 0.712 0.100 0.188
#> GSM1105509     1  0.6477     0.0452 0.516 0.000 0.308 0.168 0.008
#> GSM1105448     2  0.1908     0.6459 0.000 0.908 0.000 0.000 0.092
#> GSM1105521     1  0.3628     0.5639 0.772 0.000 0.216 0.012 0.000
#> GSM1105528     5  0.4249     0.4771 0.000 0.432 0.000 0.000 0.568
#> GSM1105529     5  0.4249     0.4771 0.000 0.432 0.000 0.000 0.568
#> GSM1105533     1  0.5355     0.4362 0.588 0.000 0.360 0.012 0.040
#> GSM1105545     4  0.4863     0.6274 0.000 0.136 0.116 0.740 0.008
#> GSM1105548     1  0.2606     0.7592 0.900 0.000 0.056 0.012 0.032
#> GSM1105549     1  0.1628     0.7603 0.936 0.000 0.056 0.000 0.008
#> GSM1105457     4  0.3752     0.6243 0.000 0.148 0.000 0.804 0.048
#> GSM1105460     2  0.5320     0.1590 0.000 0.524 0.000 0.424 0.052
#> GSM1105461     2  0.0000     0.7411 0.000 1.000 0.000 0.000 0.000
#> GSM1105464     3  0.4251     0.2546 0.372 0.000 0.624 0.004 0.000
#> GSM1105466     4  0.3238     0.6418 0.000 0.136 0.000 0.836 0.028
#> GSM1105479     4  0.7042     0.1343 0.000 0.336 0.028 0.456 0.180
#> GSM1105502     3  0.5302     0.0571 0.392 0.000 0.564 0.012 0.032
#> GSM1105515     1  0.0162     0.7768 0.996 0.000 0.004 0.000 0.000
#> GSM1105523     3  0.3793     0.4554 0.016 0.000 0.800 0.168 0.016
#> GSM1105550     4  0.5041     0.2708 0.028 0.000 0.404 0.564 0.004
#> GSM1105450     2  0.0000     0.7411 0.000 1.000 0.000 0.000 0.000
#> GSM1105451     2  0.0000     0.7411 0.000 1.000 0.000 0.000 0.000
#> GSM1105454     5  0.7946    -0.0824 0.000 0.076 0.268 0.308 0.348
#> GSM1105468     2  0.0000     0.7411 0.000 1.000 0.000 0.000 0.000
#> GSM1105481     3  0.7587    -0.0626 0.000 0.044 0.356 0.256 0.344
#> GSM1105504     3  0.4159     0.4508 0.000 0.000 0.776 0.068 0.156
#> GSM1105517     3  0.6830     0.0760 0.240 0.000 0.396 0.360 0.004
#> GSM1105525     3  0.5610     0.4416 0.144 0.000 0.700 0.120 0.036
#> GSM1105552     3  0.5601     0.4838 0.196 0.000 0.680 0.024 0.100
#> GSM1105452     5  0.4256     0.4700 0.000 0.436 0.000 0.000 0.564
#> GSM1105453     2  0.0000     0.7411 0.000 1.000 0.000 0.000 0.000
#> GSM1105456     5  0.7946    -0.0824 0.000 0.076 0.268 0.308 0.348

show/hide code output

cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#>            class entropy silhouette    p1    p2    p3    p4    p5    p6
#> GSM1105438     2  0.0858     0.8125 0.000 0.968 0.004 0.000 0.028 0.000
#> GSM1105486     2  0.0146     0.8304 0.000 0.996 0.004 0.000 0.000 0.000
#> GSM1105487     1  0.6293     0.2558 0.440 0.000 0.412 0.008 0.096 0.044
#> GSM1105490     4  0.6030     0.5323 0.000 0.036 0.080 0.656 0.076 0.152
#> GSM1105491     5  0.4244     0.7112 0.000 0.060 0.012 0.012 0.768 0.148
#> GSM1105495     6  0.4641     0.2933 0.000 0.028 0.016 0.004 0.304 0.648
#> GSM1105498     6  0.4885     0.3961 0.000 0.000 0.060 0.300 0.012 0.628
#> GSM1105499     1  0.4091     0.4889 0.684 0.000 0.292 0.004 0.012 0.008
#> GSM1105506     4  0.6059     0.5235 0.000 0.032 0.080 0.648 0.076 0.164
#> GSM1105442     5  0.3781     0.8761 0.000 0.204 0.004 0.000 0.756 0.036
#> GSM1105511     4  0.1223     0.7203 0.000 0.012 0.004 0.960 0.008 0.016
#> GSM1105514     2  0.0777     0.8121 0.000 0.972 0.004 0.000 0.024 0.000
#> GSM1105518     6  0.2295     0.6456 0.000 0.008 0.016 0.072 0.004 0.900
#> GSM1105522     3  0.5930     0.1458 0.340 0.000 0.548 0.048 0.032 0.032
#> GSM1105534     1  0.0146     0.7093 0.996 0.000 0.004 0.000 0.000 0.000
#> GSM1105535     1  0.4930     0.4637 0.620 0.000 0.320 0.004 0.028 0.028
#> GSM1105538     1  0.0665     0.7071 0.980 0.000 0.008 0.004 0.008 0.000
#> GSM1105542     5  0.3330     0.9047 0.000 0.284 0.000 0.000 0.716 0.000
#> GSM1105443     2  0.7594     0.3387 0.000 0.512 0.092 0.140 0.108 0.148
#> GSM1105551     1  0.6439     0.2418 0.428 0.000 0.408 0.008 0.108 0.048
#> GSM1105554     1  0.0000     0.7090 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM1105555     1  0.5376     0.5817 0.676 0.000 0.176 0.004 0.096 0.048
#> GSM1105447     6  0.7289     0.2816 0.000 0.292 0.100 0.036 0.108 0.464
#> GSM1105467     2  0.1321     0.8128 0.000 0.952 0.024 0.000 0.020 0.004
#> GSM1105470     2  0.0146     0.8304 0.000 0.996 0.004 0.000 0.000 0.000
#> GSM1105471     6  0.6659     0.5117 0.000 0.076 0.092 0.120 0.096 0.616
#> GSM1105474     2  0.0146     0.8304 0.000 0.996 0.004 0.000 0.000 0.000
#> GSM1105475     2  0.4705     0.6656 0.000 0.756 0.016 0.116 0.076 0.036
#> GSM1105440     1  0.5667     0.4963 0.612 0.000 0.264 0.008 0.076 0.040
#> GSM1105488     5  0.3351     0.9029 0.000 0.288 0.000 0.000 0.712 0.000
#> GSM1105489     1  0.5223     0.5965 0.692 0.000 0.164 0.004 0.096 0.044
#> GSM1105492     1  0.2633     0.6952 0.892 0.000 0.044 0.004 0.032 0.028
#> GSM1105493     1  0.4073     0.6108 0.780 0.000 0.124 0.004 0.080 0.012
#> GSM1105497     5  0.4136     0.7410 0.000 0.080 0.004 0.004 0.760 0.152
#> GSM1105500     4  0.2623     0.6992 0.000 0.004 0.028 0.892 0.048 0.028
#> GSM1105501     4  0.0976     0.7216 0.000 0.016 0.000 0.968 0.008 0.008
#> GSM1105508     4  0.6398     0.0671 0.084 0.000 0.364 0.488 0.032 0.032
#> GSM1105444     2  0.0935     0.8089 0.000 0.964 0.004 0.000 0.032 0.000
#> GSM1105513     4  0.7306     0.1250 0.000 0.032 0.108 0.432 0.100 0.328
#> GSM1105516     4  0.3356     0.6522 0.116 0.004 0.032 0.832 0.016 0.000
#> GSM1105520     6  0.2009     0.6410 0.000 0.000 0.024 0.068 0.000 0.908
#> GSM1105524     1  0.4930     0.4637 0.620 0.000 0.320 0.004 0.028 0.028
#> GSM1105536     4  0.1232     0.7209 0.000 0.024 0.016 0.956 0.004 0.000
#> GSM1105537     1  0.4930     0.4637 0.620 0.000 0.320 0.004 0.028 0.028
#> GSM1105540     4  0.2063     0.7009 0.008 0.000 0.060 0.912 0.020 0.000
#> GSM1105544     4  0.2345     0.7037 0.000 0.000 0.040 0.904 0.028 0.028
#> GSM1105445     6  0.6363     0.5040 0.000 0.036 0.116 0.112 0.104 0.632
#> GSM1105553     6  0.3483     0.6213 0.000 0.000 0.048 0.068 0.048 0.836
#> GSM1105556     1  0.0405     0.7067 0.988 0.000 0.000 0.004 0.008 0.000
#> GSM1105557     4  0.6030     0.5323 0.000 0.036 0.080 0.656 0.076 0.152
#> GSM1105449     2  0.4335     0.6946 0.000 0.768 0.036 0.000 0.108 0.088
#> GSM1105469     4  0.1363     0.7211 0.004 0.000 0.028 0.952 0.004 0.012
#> GSM1105472     2  0.0146     0.8304 0.000 0.996 0.004 0.000 0.000 0.000
#> GSM1105473     1  0.6504    -0.0612 0.472 0.000 0.376 0.052 0.072 0.028
#> GSM1105476     2  0.0146     0.8304 0.000 0.996 0.004 0.000 0.000 0.000
#> GSM1105477     4  0.1448     0.7195 0.000 0.024 0.016 0.948 0.012 0.000
#> GSM1105478     4  0.7168     0.0634 0.000 0.016 0.116 0.412 0.104 0.352
#> GSM1105510     5  0.3445     0.9030 0.000 0.260 0.000 0.008 0.732 0.000
#> GSM1105530     3  0.3757     0.6048 0.180 0.000 0.776 0.024 0.000 0.020
#> GSM1105539     3  0.3708     0.5932 0.188 0.000 0.776 0.012 0.004 0.020
#> GSM1105480     4  0.5804     0.5186 0.000 0.004 0.096 0.640 0.076 0.184
#> GSM1105512     1  0.2425     0.6409 0.880 0.000 0.100 0.012 0.008 0.000
#> GSM1105532     3  0.3757     0.6048 0.180 0.000 0.776 0.024 0.000 0.020
#> GSM1105541     3  0.3739     0.5910 0.192 0.000 0.772 0.012 0.004 0.020
#> GSM1105439     2  0.7269     0.4134 0.000 0.548 0.088 0.160 0.100 0.104
#> GSM1105463     3  0.5535     0.2707 0.008 0.000 0.508 0.052 0.024 0.408
#> GSM1105482     1  0.1477     0.7041 0.940 0.000 0.008 0.004 0.048 0.000
#> GSM1105483     4  0.1282     0.7216 0.000 0.004 0.024 0.956 0.004 0.012
#> GSM1105494     6  0.6652     0.2338 0.000 0.000 0.120 0.300 0.096 0.484
#> GSM1105503     6  0.2830     0.6251 0.000 0.000 0.064 0.068 0.004 0.864
#> GSM1105507     4  0.3878     0.6066 0.128 0.000 0.060 0.792 0.020 0.000
#> GSM1105446     2  0.2442     0.6627 0.000 0.852 0.004 0.000 0.144 0.000
#> GSM1105519     1  0.3549     0.5749 0.812 0.000 0.128 0.044 0.016 0.000
#> GSM1105526     4  0.1148     0.7215 0.000 0.020 0.016 0.960 0.004 0.000
#> GSM1105527     4  0.3269     0.6750 0.000 0.012 0.052 0.852 0.012 0.072
#> GSM1105531     6  0.5338    -0.2536 0.000 0.000 0.456 0.064 0.016 0.464
#> GSM1105543     2  0.2442     0.6609 0.000 0.852 0.004 0.000 0.144 0.000
#> GSM1105546     1  0.3201     0.6921 0.852 0.000 0.044 0.000 0.072 0.032
#> GSM1105547     1  0.1728     0.6991 0.924 0.000 0.008 0.004 0.064 0.000
#> GSM1105455     2  0.6969     0.4550 0.000 0.580 0.072 0.148 0.100 0.100
#> GSM1105458     6  0.7365     0.0901 0.000 0.372 0.092 0.036 0.112 0.388
#> GSM1105459     2  0.0000     0.8301 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1105462     3  0.6111     0.2895 0.000 0.000 0.476 0.164 0.020 0.340
#> GSM1105441     2  0.3861     0.7202 0.000 0.804 0.032 0.000 0.100 0.064
#> GSM1105465     5  0.4172     0.8202 0.000 0.140 0.004 0.004 0.760 0.092
#> GSM1105484     5  0.3351     0.9014 0.000 0.288 0.000 0.000 0.712 0.000
#> GSM1105485     5  0.3360     0.9027 0.000 0.264 0.000 0.004 0.732 0.000
#> GSM1105496     6  0.3224     0.6031 0.000 0.000 0.032 0.084 0.036 0.848
#> GSM1105505     6  0.5613    -0.1490 0.000 0.000 0.392 0.088 0.020 0.500
#> GSM1105509     4  0.5701     0.2150 0.304 0.000 0.140 0.544 0.012 0.000
#> GSM1105448     2  0.0858     0.8094 0.000 0.968 0.004 0.000 0.028 0.000
#> GSM1105521     1  0.3424     0.5780 0.816 0.000 0.136 0.032 0.016 0.000
#> GSM1105528     5  0.3351     0.9014 0.000 0.288 0.000 0.000 0.712 0.000
#> GSM1105529     5  0.3330     0.9047 0.000 0.284 0.000 0.000 0.716 0.000
#> GSM1105533     3  0.5559     0.0365 0.352 0.000 0.548 0.000 0.056 0.044
#> GSM1105545     4  0.1148     0.7215 0.000 0.020 0.016 0.960 0.004 0.000
#> GSM1105548     1  0.4979     0.6458 0.724 0.000 0.092 0.008 0.136 0.040
#> GSM1105549     1  0.3189     0.6679 0.848 0.000 0.060 0.004 0.080 0.008
#> GSM1105457     4  0.6824     0.4137 0.000 0.032 0.096 0.556 0.100 0.216
#> GSM1105460     2  0.7143     0.4392 0.000 0.564 0.080 0.144 0.108 0.104
#> GSM1105461     2  0.0146     0.8301 0.000 0.996 0.000 0.000 0.004 0.000
#> GSM1105464     3  0.4850     0.5401 0.244 0.000 0.680 0.048 0.008 0.020
#> GSM1105466     4  0.6487     0.4764 0.000 0.032 0.096 0.608 0.096 0.168
#> GSM1105479     6  0.8027     0.3586 0.000 0.200 0.112 0.140 0.104 0.444
#> GSM1105502     3  0.3730     0.5363 0.188 0.000 0.772 0.004 0.004 0.032
#> GSM1105515     1  0.0260     0.7077 0.992 0.000 0.000 0.000 0.008 0.000
#> GSM1105523     3  0.4781     0.5243 0.004 0.000 0.696 0.176 0.004 0.120
#> GSM1105550     4  0.3056     0.6113 0.000 0.000 0.160 0.820 0.008 0.012
#> GSM1105450     2  0.0146     0.8304 0.000 0.996 0.004 0.000 0.000 0.000
#> GSM1105451     2  0.0291     0.8294 0.000 0.992 0.004 0.000 0.004 0.000
#> GSM1105454     6  0.2295     0.6418 0.000 0.028 0.008 0.032 0.020 0.912
#> GSM1105468     2  0.0146     0.8304 0.000 0.996 0.004 0.000 0.000 0.000
#> GSM1105481     6  0.3221     0.6015 0.000 0.016 0.048 0.040 0.032 0.864
#> GSM1105504     3  0.5632     0.2409 0.000 0.000 0.484 0.088 0.020 0.408
#> GSM1105517     4  0.5000     0.4808 0.108 0.000 0.168 0.700 0.012 0.012
#> GSM1105525     3  0.4133     0.6006 0.080 0.000 0.796 0.084 0.008 0.032
#> GSM1105552     3  0.8076     0.4109 0.164 0.000 0.432 0.176 0.076 0.152
#> GSM1105452     5  0.3351     0.9029 0.000 0.288 0.000 0.000 0.712 0.000
#> GSM1105453     2  0.0291     0.8294 0.000 0.992 0.004 0.000 0.004 0.000
#> GSM1105456     6  0.2215     0.6414 0.000 0.024 0.008 0.032 0.020 0.916

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) other(p) time(p) individual(p) k
#> MAD:kmeans 119    1.000 0.362757   0.793       0.00587 2
#> MAD:kmeans 104    0.641 0.839454   0.623       0.00761 3
#> MAD:kmeans  82    0.120 0.944858   0.956       0.04430 4
#> MAD:kmeans  64    0.849 0.535632   0.823       0.04491 5
#> MAD:kmeans  87    0.880 0.000436   0.789       0.00279 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 44956 rows and 120 columns.
#>   Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'MAD' method.
#>   Subgroups are detected by 'skmeans' method.
#>   Performed in total 1250 partitions by row resampling.
#>   Best k for subgroups seems to be 2.
#> 
#> Following methods can be applied to this 'ConsensusPartition' object:
#>  [1] "cola_report"             "collect_classes"         "collect_plots"          
#>  [4] "collect_stats"           "colnames"                "compare_signatures"     
#>  [7] "consensus_heatmap"       "dimension_reduction"     "functional_enrichment"  
#> [10] "get_anno_col"            "get_anno"                "get_classes"            
#> [13] "get_consensus"           "get_matrix"              "get_membership"         
#> [16] "get_param"               "get_signatures"          "get_stats"              
#> [19] "is_best_k"               "is_stable_k"             "membership_heatmap"     
#> [22] "ncol"                    "nrow"                    "plot_ecdf"              
#> [25] "rownames"                "select_partition_number" "show"                   
#> [28] "suggest_best_k"          "test_to_known_factors"

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

collect_plots(res)

plot of chunk MAD-skmeans-collect-plots

The plots are:

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

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

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

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

select_partition_number(res)

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

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

get_stats(res)
#>   k 1-PAC mean_silhouette concordance area_increased  Rand Jaccard
#> 2 2 0.915           0.947       0.977         0.4990 0.503   0.503
#> 3 3 0.790           0.887       0.937         0.3168 0.815   0.641
#> 4 4 0.743           0.802       0.880         0.1070 0.887   0.692
#> 5 5 0.710           0.660       0.797         0.0747 0.905   0.684
#> 6 6 0.778           0.750       0.858         0.0506 0.897   0.599

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
#> GSM1105438     2  0.0000      0.971 0.000 1.000
#> GSM1105486     2  0.0000      0.971 0.000 1.000
#> GSM1105487     1  0.0000      0.982 1.000 0.000
#> GSM1105490     2  0.0000      0.971 0.000 1.000
#> GSM1105491     2  0.6973      0.777 0.188 0.812
#> GSM1105495     2  0.6712      0.792 0.176 0.824
#> GSM1105498     2  0.9580      0.428 0.380 0.620
#> GSM1105499     1  0.0000      0.982 1.000 0.000
#> GSM1105506     2  0.0000      0.971 0.000 1.000
#> GSM1105442     2  0.0000      0.971 0.000 1.000
#> GSM1105511     2  0.0000      0.971 0.000 1.000
#> GSM1105514     2  0.0000      0.971 0.000 1.000
#> GSM1105518     2  0.0000      0.971 0.000 1.000
#> GSM1105522     1  0.0000      0.982 1.000 0.000
#> GSM1105534     1  0.0000      0.982 1.000 0.000
#> GSM1105535     1  0.0000      0.982 1.000 0.000
#> GSM1105538     1  0.0000      0.982 1.000 0.000
#> GSM1105542     2  0.0000      0.971 0.000 1.000
#> GSM1105443     2  0.0000      0.971 0.000 1.000
#> GSM1105551     1  0.0000      0.982 1.000 0.000
#> GSM1105554     1  0.0000      0.982 1.000 0.000
#> GSM1105555     1  0.0000      0.982 1.000 0.000
#> GSM1105447     2  0.0000      0.971 0.000 1.000
#> GSM1105467     2  0.0000      0.971 0.000 1.000
#> GSM1105470     2  0.0000      0.971 0.000 1.000
#> GSM1105471     2  0.0000      0.971 0.000 1.000
#> GSM1105474     2  0.0000      0.971 0.000 1.000
#> GSM1105475     2  0.0000      0.971 0.000 1.000
#> GSM1105440     1  0.0000      0.982 1.000 0.000
#> GSM1105488     2  0.0000      0.971 0.000 1.000
#> GSM1105489     1  0.0000      0.982 1.000 0.000
#> GSM1105492     1  0.0000      0.982 1.000 0.000
#> GSM1105493     1  0.0000      0.982 1.000 0.000
#> GSM1105497     2  0.0000      0.971 0.000 1.000
#> GSM1105500     2  0.0000      0.971 0.000 1.000
#> GSM1105501     2  0.0000      0.971 0.000 1.000
#> GSM1105508     1  0.0000      0.982 1.000 0.000
#> GSM1105444     2  0.0000      0.971 0.000 1.000
#> GSM1105513     2  0.0000      0.971 0.000 1.000
#> GSM1105516     1  0.7219      0.749 0.800 0.200
#> GSM1105520     2  0.8267      0.670 0.260 0.740
#> GSM1105524     1  0.0000      0.982 1.000 0.000
#> GSM1105536     2  0.0000      0.971 0.000 1.000
#> GSM1105537     1  0.0000      0.982 1.000 0.000
#> GSM1105540     1  0.0000      0.982 1.000 0.000
#> GSM1105544     1  0.5294      0.855 0.880 0.120
#> GSM1105445     2  0.0000      0.971 0.000 1.000
#> GSM1105553     2  0.9522      0.447 0.372 0.628
#> GSM1105556     1  0.0000      0.982 1.000 0.000
#> GSM1105557     2  0.0000      0.971 0.000 1.000
#> GSM1105449     2  0.0000      0.971 0.000 1.000
#> GSM1105469     1  0.0376      0.978 0.996 0.004
#> GSM1105472     2  0.0000      0.971 0.000 1.000
#> GSM1105473     1  0.0000      0.982 1.000 0.000
#> GSM1105476     2  0.0000      0.971 0.000 1.000
#> GSM1105477     2  0.0000      0.971 0.000 1.000
#> GSM1105478     2  0.0000      0.971 0.000 1.000
#> GSM1105510     2  0.0000      0.971 0.000 1.000
#> GSM1105530     1  0.0000      0.982 1.000 0.000
#> GSM1105539     1  0.0000      0.982 1.000 0.000
#> GSM1105480     2  0.0000      0.971 0.000 1.000
#> GSM1105512     1  0.0000      0.982 1.000 0.000
#> GSM1105532     1  0.0000      0.982 1.000 0.000
#> GSM1105541     1  0.0000      0.982 1.000 0.000
#> GSM1105439     2  0.0000      0.971 0.000 1.000
#> GSM1105463     1  0.0000      0.982 1.000 0.000
#> GSM1105482     1  0.0000      0.982 1.000 0.000
#> GSM1105483     1  0.7299      0.743 0.796 0.204
#> GSM1105494     2  0.0000      0.971 0.000 1.000
#> GSM1105503     1  0.9427      0.402 0.640 0.360
#> GSM1105507     1  0.0000      0.982 1.000 0.000
#> GSM1105446     2  0.0000      0.971 0.000 1.000
#> GSM1105519     1  0.0000      0.982 1.000 0.000
#> GSM1105526     2  0.0000      0.971 0.000 1.000
#> GSM1105527     2  0.4161      0.893 0.084 0.916
#> GSM1105531     1  0.0000      0.982 1.000 0.000
#> GSM1105543     2  0.0000      0.971 0.000 1.000
#> GSM1105546     1  0.0000      0.982 1.000 0.000
#> GSM1105547     1  0.0000      0.982 1.000 0.000
#> GSM1105455     2  0.0000      0.971 0.000 1.000
#> GSM1105458     2  0.0000      0.971 0.000 1.000
#> GSM1105459     2  0.0000      0.971 0.000 1.000
#> GSM1105462     1  0.0000      0.982 1.000 0.000
#> GSM1105441     2  0.0000      0.971 0.000 1.000
#> GSM1105465     2  0.0000      0.971 0.000 1.000
#> GSM1105484     2  0.0000      0.971 0.000 1.000
#> GSM1105485     2  0.0000      0.971 0.000 1.000
#> GSM1105496     1  0.0000      0.982 1.000 0.000
#> GSM1105505     1  0.0000      0.982 1.000 0.000
#> GSM1105509     1  0.0000      0.982 1.000 0.000
#> GSM1105448     2  0.0000      0.971 0.000 1.000
#> GSM1105521     1  0.0000      0.982 1.000 0.000
#> GSM1105528     2  0.0000      0.971 0.000 1.000
#> GSM1105529     2  0.0000      0.971 0.000 1.000
#> GSM1105533     1  0.0000      0.982 1.000 0.000
#> GSM1105545     2  0.0000      0.971 0.000 1.000
#> GSM1105548     1  0.0000      0.982 1.000 0.000
#> GSM1105549     1  0.0000      0.982 1.000 0.000
#> GSM1105457     2  0.0000      0.971 0.000 1.000
#> GSM1105460     2  0.0000      0.971 0.000 1.000
#> GSM1105461     2  0.0000      0.971 0.000 1.000
#> GSM1105464     1  0.0000      0.982 1.000 0.000
#> GSM1105466     2  0.0000      0.971 0.000 1.000
#> GSM1105479     2  0.0000      0.971 0.000 1.000
#> GSM1105502     1  0.0000      0.982 1.000 0.000
#> GSM1105515     1  0.0000      0.982 1.000 0.000
#> GSM1105523     1  0.0000      0.982 1.000 0.000
#> GSM1105550     1  0.0000      0.982 1.000 0.000
#> GSM1105450     2  0.0000      0.971 0.000 1.000
#> GSM1105451     2  0.0000      0.971 0.000 1.000
#> GSM1105454     2  0.0938      0.961 0.012 0.988
#> GSM1105468     2  0.0000      0.971 0.000 1.000
#> GSM1105481     2  0.7139      0.766 0.196 0.804
#> GSM1105504     1  0.0000      0.982 1.000 0.000
#> GSM1105517     1  0.0000      0.982 1.000 0.000
#> GSM1105525     1  0.0000      0.982 1.000 0.000
#> GSM1105552     1  0.0000      0.982 1.000 0.000
#> GSM1105452     2  0.0000      0.971 0.000 1.000
#> GSM1105453     2  0.0000      0.971 0.000 1.000
#> GSM1105456     2  0.6887      0.782 0.184 0.816

show/hide code output

cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#>            class entropy silhouette    p1    p2    p3
#> GSM1105438     2  0.0000     0.9345 0.000 1.000 0.000
#> GSM1105486     2  0.0424     0.9346 0.000 0.992 0.008
#> GSM1105487     1  0.0424     0.9562 0.992 0.000 0.008
#> GSM1105490     3  0.4555     0.8509 0.000 0.200 0.800
#> GSM1105491     2  0.4555     0.7551 0.000 0.800 0.200
#> GSM1105495     2  0.4605     0.7522 0.000 0.796 0.204
#> GSM1105498     3  0.0000     0.8619 0.000 0.000 1.000
#> GSM1105499     1  0.0000     0.9571 1.000 0.000 0.000
#> GSM1105506     3  0.4555     0.8509 0.000 0.200 0.800
#> GSM1105442     2  0.4346     0.7707 0.000 0.816 0.184
#> GSM1105511     3  0.4555     0.8509 0.000 0.200 0.800
#> GSM1105514     2  0.0000     0.9345 0.000 1.000 0.000
#> GSM1105518     3  0.0000     0.8619 0.000 0.000 1.000
#> GSM1105522     1  0.0000     0.9571 1.000 0.000 0.000
#> GSM1105534     1  0.0000     0.9571 1.000 0.000 0.000
#> GSM1105535     1  0.0000     0.9571 1.000 0.000 0.000
#> GSM1105538     1  0.0000     0.9571 1.000 0.000 0.000
#> GSM1105542     2  0.0000     0.9345 0.000 1.000 0.000
#> GSM1105443     3  0.4555     0.8509 0.000 0.200 0.800
#> GSM1105551     1  0.0747     0.9549 0.984 0.000 0.016
#> GSM1105554     1  0.0000     0.9571 1.000 0.000 0.000
#> GSM1105555     1  0.0747     0.9549 0.984 0.000 0.016
#> GSM1105447     3  0.1289     0.8646 0.000 0.032 0.968
#> GSM1105467     2  0.0424     0.9346 0.000 0.992 0.008
#> GSM1105470     2  0.0424     0.9346 0.000 0.992 0.008
#> GSM1105471     3  0.0000     0.8619 0.000 0.000 1.000
#> GSM1105474     2  0.0424     0.9346 0.000 0.992 0.008
#> GSM1105475     2  0.1643     0.9072 0.000 0.956 0.044
#> GSM1105440     1  0.0000     0.9571 1.000 0.000 0.000
#> GSM1105488     2  0.0000     0.9345 0.000 1.000 0.000
#> GSM1105489     1  0.0747     0.9549 0.984 0.000 0.016
#> GSM1105492     1  0.0000     0.9571 1.000 0.000 0.000
#> GSM1105493     1  0.0747     0.9549 0.984 0.000 0.016
#> GSM1105497     2  0.4504     0.7592 0.000 0.804 0.196
#> GSM1105500     2  0.0237     0.9334 0.000 0.996 0.004
#> GSM1105501     2  0.6267    -0.0513 0.000 0.548 0.452
#> GSM1105508     1  0.0000     0.9571 1.000 0.000 0.000
#> GSM1105444     2  0.0000     0.9345 0.000 1.000 0.000
#> GSM1105513     3  0.4555     0.8509 0.000 0.200 0.800
#> GSM1105516     1  0.5397     0.6091 0.720 0.280 0.000
#> GSM1105520     3  0.0000     0.8619 0.000 0.000 1.000
#> GSM1105524     1  0.0000     0.9571 1.000 0.000 0.000
#> GSM1105536     2  0.0424     0.9346 0.000 0.992 0.008
#> GSM1105537     1  0.0000     0.9571 1.000 0.000 0.000
#> GSM1105540     1  0.0000     0.9571 1.000 0.000 0.000
#> GSM1105544     1  0.6200     0.5045 0.676 0.012 0.312
#> GSM1105445     3  0.0000     0.8619 0.000 0.000 1.000
#> GSM1105553     3  0.0424     0.8578 0.000 0.008 0.992
#> GSM1105556     1  0.0000     0.9571 1.000 0.000 0.000
#> GSM1105557     3  0.4555     0.8509 0.000 0.200 0.800
#> GSM1105449     2  0.1529     0.9115 0.000 0.960 0.040
#> GSM1105469     3  0.5216     0.6588 0.260 0.000 0.740
#> GSM1105472     2  0.0424     0.9346 0.000 0.992 0.008
#> GSM1105473     1  0.0747     0.9549 0.984 0.000 0.016
#> GSM1105476     2  0.0424     0.9346 0.000 0.992 0.008
#> GSM1105477     2  0.0000     0.9345 0.000 1.000 0.000
#> GSM1105478     3  0.0000     0.8619 0.000 0.000 1.000
#> GSM1105510     2  0.0000     0.9345 0.000 1.000 0.000
#> GSM1105530     1  0.0747     0.9549 0.984 0.000 0.016
#> GSM1105539     1  0.0747     0.9549 0.984 0.000 0.016
#> GSM1105480     3  0.4504     0.8524 0.000 0.196 0.804
#> GSM1105512     1  0.0000     0.9571 1.000 0.000 0.000
#> GSM1105532     1  0.0747     0.9549 0.984 0.000 0.016
#> GSM1105541     1  0.0747     0.9549 0.984 0.000 0.016
#> GSM1105439     3  0.4555     0.8509 0.000 0.200 0.800
#> GSM1105463     1  0.4555     0.7936 0.800 0.000 0.200
#> GSM1105482     1  0.0000     0.9571 1.000 0.000 0.000
#> GSM1105483     3  0.5200     0.8498 0.020 0.184 0.796
#> GSM1105494     3  0.0747     0.8627 0.000 0.016 0.984
#> GSM1105503     3  0.0000     0.8619 0.000 0.000 1.000
#> GSM1105507     1  0.0000     0.9571 1.000 0.000 0.000
#> GSM1105446     2  0.0000     0.9345 0.000 1.000 0.000
#> GSM1105519     1  0.0000     0.9571 1.000 0.000 0.000
#> GSM1105526     2  0.0424     0.9346 0.000 0.992 0.008
#> GSM1105527     3  0.5062     0.8512 0.016 0.184 0.800
#> GSM1105531     1  0.4555     0.7936 0.800 0.000 0.200
#> GSM1105543     2  0.0000     0.9345 0.000 1.000 0.000
#> GSM1105546     1  0.0000     0.9571 1.000 0.000 0.000
#> GSM1105547     1  0.0000     0.9571 1.000 0.000 0.000
#> GSM1105455     3  0.4555     0.8509 0.000 0.200 0.800
#> GSM1105458     2  0.5560     0.6567 0.000 0.700 0.300
#> GSM1105459     2  0.0424     0.9346 0.000 0.992 0.008
#> GSM1105462     1  0.4555     0.7936 0.800 0.000 0.200
#> GSM1105441     2  0.1163     0.9206 0.000 0.972 0.028
#> GSM1105465     2  0.4555     0.7551 0.000 0.800 0.200
#> GSM1105484     2  0.0000     0.9345 0.000 1.000 0.000
#> GSM1105485     2  0.0000     0.9345 0.000 1.000 0.000
#> GSM1105496     3  0.3213     0.7911 0.092 0.008 0.900
#> GSM1105505     1  0.4555     0.7936 0.800 0.000 0.200
#> GSM1105509     1  0.0000     0.9571 1.000 0.000 0.000
#> GSM1105448     2  0.0000     0.9345 0.000 1.000 0.000
#> GSM1105521     1  0.0000     0.9571 1.000 0.000 0.000
#> GSM1105528     2  0.0000     0.9345 0.000 1.000 0.000
#> GSM1105529     2  0.0000     0.9345 0.000 1.000 0.000
#> GSM1105533     1  0.0747     0.9549 0.984 0.000 0.016
#> GSM1105545     2  0.0424     0.9346 0.000 0.992 0.008
#> GSM1105548     1  0.0747     0.9549 0.984 0.000 0.016
#> GSM1105549     1  0.0424     0.9562 0.992 0.000 0.008
#> GSM1105457     3  0.4555     0.8509 0.000 0.200 0.800
#> GSM1105460     2  0.3482     0.8150 0.000 0.872 0.128
#> GSM1105461     2  0.0424     0.9346 0.000 0.992 0.008
#> GSM1105464     1  0.0747     0.9549 0.984 0.000 0.016
#> GSM1105466     3  0.4555     0.8509 0.000 0.200 0.800
#> GSM1105479     3  0.3482     0.8629 0.000 0.128 0.872
#> GSM1105502     1  0.0747     0.9549 0.984 0.000 0.016
#> GSM1105515     1  0.0000     0.9571 1.000 0.000 0.000
#> GSM1105523     1  0.3816     0.8256 0.852 0.000 0.148
#> GSM1105550     1  0.0000     0.9571 1.000 0.000 0.000
#> GSM1105450     2  0.0424     0.9346 0.000 0.992 0.008
#> GSM1105451     2  0.0424     0.9346 0.000 0.992 0.008
#> GSM1105454     3  0.0000     0.8619 0.000 0.000 1.000
#> GSM1105468     2  0.0424     0.9346 0.000 0.992 0.008
#> GSM1105481     2  0.5397     0.6804 0.000 0.720 0.280
#> GSM1105504     1  0.4555     0.7936 0.800 0.000 0.200
#> GSM1105517     1  0.0000     0.9571 1.000 0.000 0.000
#> GSM1105525     1  0.0747     0.9549 0.984 0.000 0.016
#> GSM1105552     1  0.1031     0.9506 0.976 0.000 0.024
#> GSM1105452     2  0.0000     0.9345 0.000 1.000 0.000
#> GSM1105453     2  0.0424     0.9346 0.000 0.992 0.008
#> GSM1105456     3  0.0000     0.8619 0.000 0.000 1.000

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>            class entropy silhouette    p1    p2    p3    p4
#> GSM1105438     2  0.0707     0.7818 0.000 0.980 0.000 0.020
#> GSM1105486     2  0.3610     0.7405 0.000 0.800 0.000 0.200
#> GSM1105487     1  0.0188     0.9582 0.996 0.000 0.004 0.000
#> GSM1105490     4  0.0336     0.8345 0.000 0.008 0.000 0.992
#> GSM1105491     2  0.5147     0.2644 0.000 0.536 0.460 0.004
#> GSM1105495     3  0.1209     0.7987 0.000 0.032 0.964 0.004
#> GSM1105498     3  0.3024     0.8585 0.000 0.000 0.852 0.148
#> GSM1105499     1  0.0000     0.9589 1.000 0.000 0.000 0.000
#> GSM1105506     4  0.0188     0.8345 0.000 0.004 0.000 0.996
#> GSM1105442     2  0.3105     0.7554 0.000 0.856 0.140 0.004
#> GSM1105511     4  0.0376     0.8339 0.000 0.004 0.004 0.992
#> GSM1105514     2  0.0707     0.7818 0.000 0.980 0.000 0.020
#> GSM1105518     3  0.3024     0.8585 0.000 0.000 0.852 0.148
#> GSM1105522     1  0.0000     0.9589 1.000 0.000 0.000 0.000
#> GSM1105534     1  0.0000     0.9589 1.000 0.000 0.000 0.000
#> GSM1105535     1  0.0000     0.9589 1.000 0.000 0.000 0.000
#> GSM1105538     1  0.0000     0.9589 1.000 0.000 0.000 0.000
#> GSM1105542     2  0.2814     0.7612 0.000 0.868 0.132 0.000
#> GSM1105443     4  0.3311     0.7512 0.000 0.172 0.000 0.828
#> GSM1105551     1  0.0921     0.9503 0.972 0.000 0.028 0.000
#> GSM1105554     1  0.0000     0.9589 1.000 0.000 0.000 0.000
#> GSM1105555     1  0.1022     0.9486 0.968 0.000 0.032 0.000
#> GSM1105447     4  0.5268     0.1003 0.000 0.452 0.008 0.540
#> GSM1105467     2  0.3610     0.7405 0.000 0.800 0.000 0.200
#> GSM1105470     2  0.3610     0.7405 0.000 0.800 0.000 0.200
#> GSM1105471     4  0.6324     0.2732 0.000 0.064 0.400 0.536
#> GSM1105474     2  0.3610     0.7405 0.000 0.800 0.000 0.200
#> GSM1105475     4  0.4955     0.2044 0.000 0.444 0.000 0.556
#> GSM1105440     1  0.0000     0.9589 1.000 0.000 0.000 0.000
#> GSM1105488     2  0.2814     0.7612 0.000 0.868 0.132 0.000
#> GSM1105489     1  0.0707     0.9534 0.980 0.000 0.020 0.000
#> GSM1105492     1  0.0000     0.9589 1.000 0.000 0.000 0.000
#> GSM1105493     1  0.1022     0.9486 0.968 0.000 0.032 0.000
#> GSM1105497     2  0.4535     0.6138 0.000 0.704 0.292 0.004
#> GSM1105500     2  0.2999     0.7598 0.000 0.864 0.132 0.004
#> GSM1105501     4  0.2999     0.7789 0.000 0.132 0.004 0.864
#> GSM1105508     1  0.0000     0.9589 1.000 0.000 0.000 0.000
#> GSM1105444     2  0.0592     0.7817 0.000 0.984 0.000 0.016
#> GSM1105513     4  0.0000     0.8327 0.000 0.000 0.000 1.000
#> GSM1105516     1  0.3829     0.7857 0.828 0.016 0.004 0.152
#> GSM1105520     3  0.3024     0.8585 0.000 0.000 0.852 0.148
#> GSM1105524     1  0.0000     0.9589 1.000 0.000 0.000 0.000
#> GSM1105536     2  0.4936     0.4726 0.000 0.624 0.004 0.372
#> GSM1105537     1  0.0000     0.9589 1.000 0.000 0.000 0.000
#> GSM1105540     1  0.0000     0.9589 1.000 0.000 0.000 0.000
#> GSM1105544     1  0.9316     0.0838 0.420 0.164 0.140 0.276
#> GSM1105445     4  0.4134     0.5666 0.000 0.000 0.260 0.740
#> GSM1105553     3  0.2868     0.8603 0.000 0.000 0.864 0.136
#> GSM1105556     1  0.0000     0.9589 1.000 0.000 0.000 0.000
#> GSM1105557     4  0.0188     0.8345 0.000 0.004 0.000 0.996
#> GSM1105449     2  0.3764     0.7234 0.000 0.784 0.000 0.216
#> GSM1105469     4  0.2401     0.7316 0.092 0.000 0.004 0.904
#> GSM1105472     2  0.3610     0.7405 0.000 0.800 0.000 0.200
#> GSM1105473     1  0.1211     0.9455 0.960 0.000 0.040 0.000
#> GSM1105476     2  0.3610     0.7405 0.000 0.800 0.000 0.200
#> GSM1105477     2  0.2124     0.7809 0.000 0.932 0.040 0.028
#> GSM1105478     4  0.1022     0.8098 0.000 0.000 0.032 0.968
#> GSM1105510     2  0.2814     0.7612 0.000 0.868 0.132 0.000
#> GSM1105530     1  0.1302     0.9432 0.956 0.000 0.044 0.000
#> GSM1105539     1  0.1302     0.9432 0.956 0.000 0.044 0.000
#> GSM1105480     4  0.0707     0.8198 0.000 0.000 0.020 0.980
#> GSM1105512     1  0.0000     0.9589 1.000 0.000 0.000 0.000
#> GSM1105532     1  0.1302     0.9432 0.956 0.000 0.044 0.000
#> GSM1105541     1  0.1302     0.9432 0.956 0.000 0.044 0.000
#> GSM1105439     4  0.2081     0.8149 0.000 0.084 0.000 0.916
#> GSM1105463     3  0.3074     0.8248 0.152 0.000 0.848 0.000
#> GSM1105482     1  0.0188     0.9582 0.996 0.000 0.004 0.000
#> GSM1105483     4  0.0376     0.8325 0.004 0.000 0.004 0.992
#> GSM1105494     4  0.4040     0.5774 0.000 0.000 0.248 0.752
#> GSM1105503     3  0.3024     0.8585 0.000 0.000 0.852 0.148
#> GSM1105507     1  0.3306     0.7968 0.840 0.000 0.004 0.156
#> GSM1105446     2  0.2345     0.7688 0.000 0.900 0.100 0.000
#> GSM1105519     1  0.0000     0.9589 1.000 0.000 0.000 0.000
#> GSM1105526     2  0.5298     0.4564 0.000 0.612 0.016 0.372
#> GSM1105527     4  0.0376     0.8325 0.004 0.000 0.004 0.992
#> GSM1105531     3  0.2999     0.8433 0.132 0.000 0.864 0.004
#> GSM1105543     2  0.1118     0.7783 0.000 0.964 0.036 0.000
#> GSM1105546     1  0.0000     0.9589 1.000 0.000 0.000 0.000
#> GSM1105547     1  0.0000     0.9589 1.000 0.000 0.000 0.000
#> GSM1105455     4  0.2011     0.8169 0.000 0.080 0.000 0.920
#> GSM1105458     2  0.6386     0.5855 0.000 0.640 0.124 0.236
#> GSM1105459     2  0.3610     0.7405 0.000 0.800 0.000 0.200
#> GSM1105462     3  0.2999     0.8433 0.132 0.000 0.864 0.004
#> GSM1105441     2  0.3837     0.7136 0.000 0.776 0.000 0.224
#> GSM1105465     2  0.4535     0.6138 0.000 0.704 0.292 0.004
#> GSM1105484     2  0.2814     0.7612 0.000 0.868 0.132 0.000
#> GSM1105485     2  0.2814     0.7612 0.000 0.868 0.132 0.000
#> GSM1105496     3  0.0921     0.8275 0.000 0.000 0.972 0.028
#> GSM1105505     3  0.2868     0.8406 0.136 0.000 0.864 0.000
#> GSM1105509     1  0.0000     0.9589 1.000 0.000 0.000 0.000
#> GSM1105448     2  0.0707     0.7818 0.000 0.980 0.000 0.020
#> GSM1105521     1  0.0000     0.9589 1.000 0.000 0.000 0.000
#> GSM1105528     2  0.2760     0.7625 0.000 0.872 0.128 0.000
#> GSM1105529     2  0.2814     0.7612 0.000 0.868 0.132 0.000
#> GSM1105533     1  0.1022     0.9486 0.968 0.000 0.032 0.000
#> GSM1105545     4  0.3306     0.7581 0.000 0.156 0.004 0.840
#> GSM1105548     1  0.0188     0.9582 0.996 0.000 0.004 0.000
#> GSM1105549     1  0.0188     0.9582 0.996 0.000 0.004 0.000
#> GSM1105457     4  0.0188     0.8345 0.000 0.004 0.000 0.996
#> GSM1105460     4  0.4406     0.5760 0.000 0.300 0.000 0.700
#> GSM1105461     2  0.3610     0.7405 0.000 0.800 0.000 0.200
#> GSM1105464     1  0.1302     0.9432 0.956 0.000 0.044 0.000
#> GSM1105466     4  0.0188     0.8345 0.000 0.004 0.000 0.996
#> GSM1105479     4  0.4621     0.7526 0.000 0.128 0.076 0.796
#> GSM1105502     1  0.1211     0.9451 0.960 0.000 0.040 0.000
#> GSM1105515     1  0.0000     0.9589 1.000 0.000 0.000 0.000
#> GSM1105523     3  0.5669     0.7228 0.200 0.000 0.708 0.092
#> GSM1105550     1  0.2635     0.8852 0.904 0.000 0.020 0.076
#> GSM1105450     2  0.3610     0.7405 0.000 0.800 0.000 0.200
#> GSM1105451     2  0.3610     0.7405 0.000 0.800 0.000 0.200
#> GSM1105454     3  0.3447     0.8575 0.000 0.020 0.852 0.128
#> GSM1105468     2  0.3610     0.7405 0.000 0.800 0.000 0.200
#> GSM1105481     3  0.3224     0.7985 0.000 0.120 0.864 0.016
#> GSM1105504     3  0.2868     0.8406 0.136 0.000 0.864 0.000
#> GSM1105517     1  0.0469     0.9557 0.988 0.000 0.012 0.000
#> GSM1105525     1  0.3471     0.8583 0.868 0.000 0.060 0.072
#> GSM1105552     1  0.1389     0.9404 0.952 0.000 0.048 0.000
#> GSM1105452     2  0.2814     0.7612 0.000 0.868 0.132 0.000
#> GSM1105453     2  0.3610     0.7405 0.000 0.800 0.000 0.200
#> GSM1105456     3  0.3447     0.8575 0.000 0.020 0.852 0.128

show/hide code output

cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#>            class entropy silhouette    p1    p2    p3    p4    p5
#> GSM1105438     2  0.0963     0.7638 0.000 0.964 0.000 0.000 0.036
#> GSM1105486     2  0.0000     0.7884 0.000 1.000 0.000 0.000 0.000
#> GSM1105487     1  0.3088     0.7994 0.828 0.000 0.164 0.004 0.004
#> GSM1105490     4  0.1952     0.7687 0.000 0.084 0.000 0.912 0.004
#> GSM1105491     5  0.2464     0.7590 0.000 0.096 0.016 0.000 0.888
#> GSM1105495     3  0.5376     0.5268 0.000 0.012 0.520 0.032 0.436
#> GSM1105498     3  0.6667     0.4810 0.000 0.000 0.428 0.328 0.244
#> GSM1105499     1  0.0566     0.8372 0.984 0.000 0.012 0.004 0.000
#> GSM1105506     4  0.1638     0.7677 0.000 0.064 0.000 0.932 0.004
#> GSM1105442     5  0.2929     0.8369 0.000 0.180 0.000 0.000 0.820
#> GSM1105511     4  0.2302     0.7677 0.000 0.080 0.008 0.904 0.008
#> GSM1105514     2  0.0609     0.7759 0.000 0.980 0.000 0.000 0.020
#> GSM1105518     3  0.6641     0.6113 0.000 0.016 0.536 0.204 0.244
#> GSM1105522     1  0.1804     0.8257 0.940 0.000 0.024 0.024 0.012
#> GSM1105534     1  0.0000     0.8358 1.000 0.000 0.000 0.000 0.000
#> GSM1105535     1  0.0613     0.8360 0.984 0.000 0.004 0.008 0.004
#> GSM1105538     1  0.0000     0.8358 1.000 0.000 0.000 0.000 0.000
#> GSM1105542     5  0.3612     0.8762 0.000 0.268 0.000 0.000 0.732
#> GSM1105443     4  0.4451     0.1375 0.000 0.492 0.000 0.504 0.004
#> GSM1105551     1  0.3128     0.7972 0.824 0.000 0.168 0.004 0.004
#> GSM1105554     1  0.0162     0.8364 0.996 0.000 0.004 0.000 0.000
#> GSM1105555     1  0.2891     0.7925 0.824 0.000 0.176 0.000 0.000
#> GSM1105447     2  0.6243     0.2614 0.000 0.544 0.000 0.216 0.240
#> GSM1105467     2  0.0000     0.7884 0.000 1.000 0.000 0.000 0.000
#> GSM1105470     2  0.0000     0.7884 0.000 1.000 0.000 0.000 0.000
#> GSM1105471     2  0.8488    -0.1983 0.000 0.304 0.204 0.296 0.196
#> GSM1105474     2  0.0000     0.7884 0.000 1.000 0.000 0.000 0.000
#> GSM1105475     2  0.2127     0.7107 0.000 0.892 0.000 0.108 0.000
#> GSM1105440     1  0.0486     0.8358 0.988 0.000 0.004 0.004 0.004
#> GSM1105488     5  0.3612     0.8762 0.000 0.268 0.000 0.000 0.732
#> GSM1105489     1  0.2773     0.7979 0.836 0.000 0.164 0.000 0.000
#> GSM1105492     1  0.0324     0.8355 0.992 0.000 0.000 0.004 0.004
#> GSM1105493     1  0.2929     0.7920 0.820 0.000 0.180 0.000 0.000
#> GSM1105497     5  0.2179     0.7644 0.000 0.100 0.004 0.000 0.896
#> GSM1105500     5  0.3398     0.8558 0.000 0.216 0.000 0.004 0.780
#> GSM1105501     4  0.4183     0.5098 0.000 0.324 0.000 0.668 0.008
#> GSM1105508     1  0.0867     0.8350 0.976 0.000 0.008 0.008 0.008
#> GSM1105444     2  0.1121     0.7568 0.000 0.956 0.000 0.000 0.044
#> GSM1105513     4  0.2771     0.7275 0.000 0.128 0.000 0.860 0.012
#> GSM1105516     1  0.2612     0.7782 0.892 0.004 0.004 0.084 0.016
#> GSM1105520     3  0.6166     0.6228 0.000 0.000 0.556 0.200 0.244
#> GSM1105524     1  0.0740     0.8356 0.980 0.000 0.008 0.008 0.004
#> GSM1105536     2  0.3124     0.6815 0.000 0.840 0.008 0.144 0.008
#> GSM1105537     1  0.0740     0.8356 0.980 0.000 0.008 0.008 0.004
#> GSM1105540     1  0.4253     0.7394 0.796 0.000 0.092 0.100 0.012
#> GSM1105544     5  0.5814     0.3997 0.288 0.000 0.000 0.128 0.584
#> GSM1105445     4  0.7673     0.0132 0.000 0.096 0.216 0.480 0.208
#> GSM1105553     3  0.6390     0.6156 0.004 0.000 0.536 0.200 0.260
#> GSM1105556     1  0.0162     0.8364 0.996 0.000 0.004 0.000 0.000
#> GSM1105557     4  0.1768     0.7692 0.000 0.072 0.000 0.924 0.004
#> GSM1105449     2  0.2754     0.7255 0.000 0.880 0.000 0.040 0.080
#> GSM1105469     4  0.2590     0.6999 0.040 0.004 0.028 0.908 0.020
#> GSM1105472     2  0.0000     0.7884 0.000 1.000 0.000 0.000 0.000
#> GSM1105473     1  0.3707     0.7270 0.716 0.000 0.284 0.000 0.000
#> GSM1105476     2  0.0000     0.7884 0.000 1.000 0.000 0.000 0.000
#> GSM1105477     2  0.4801     0.2773 0.000 0.668 0.000 0.048 0.284
#> GSM1105478     4  0.1904     0.7157 0.000 0.020 0.028 0.936 0.016
#> GSM1105510     5  0.3612     0.8762 0.000 0.268 0.000 0.000 0.732
#> GSM1105530     1  0.5255     0.5130 0.496 0.000 0.468 0.024 0.012
#> GSM1105539     1  0.4886     0.5259 0.512 0.000 0.468 0.016 0.004
#> GSM1105480     4  0.0932     0.7396 0.000 0.020 0.004 0.972 0.004
#> GSM1105512     1  0.0451     0.8370 0.988 0.000 0.008 0.004 0.000
#> GSM1105532     1  0.5255     0.5130 0.496 0.000 0.468 0.024 0.012
#> GSM1105541     1  0.4886     0.5259 0.512 0.000 0.468 0.016 0.004
#> GSM1105439     2  0.4449    -0.1565 0.000 0.512 0.000 0.484 0.004
#> GSM1105463     3  0.1082     0.6175 0.028 0.000 0.964 0.000 0.008
#> GSM1105482     1  0.2230     0.8169 0.884 0.000 0.116 0.000 0.000
#> GSM1105483     4  0.2548     0.7334 0.008 0.036 0.024 0.912 0.020
#> GSM1105494     4  0.6131     0.1665 0.000 0.012 0.152 0.600 0.236
#> GSM1105503     3  0.5787     0.6302 0.000 0.000 0.616 0.204 0.180
#> GSM1105507     1  0.1830     0.8106 0.932 0.000 0.004 0.052 0.012
#> GSM1105446     2  0.4030     0.1346 0.000 0.648 0.000 0.000 0.352
#> GSM1105519     1  0.0451     0.8370 0.988 0.000 0.008 0.004 0.000
#> GSM1105526     2  0.5975     0.2544 0.000 0.556 0.008 0.336 0.100
#> GSM1105527     4  0.1892     0.7511 0.004 0.040 0.012 0.936 0.008
#> GSM1105531     3  0.0579     0.6230 0.008 0.000 0.984 0.000 0.008
#> GSM1105543     2  0.3661     0.3678 0.000 0.724 0.000 0.000 0.276
#> GSM1105546     1  0.0000     0.8358 1.000 0.000 0.000 0.000 0.000
#> GSM1105547     1  0.0162     0.8364 0.996 0.000 0.004 0.000 0.000
#> GSM1105455     4  0.4451     0.1396 0.000 0.492 0.000 0.504 0.004
#> GSM1105458     2  0.4462     0.5753 0.000 0.740 0.000 0.064 0.196
#> GSM1105459     2  0.0000     0.7884 0.000 1.000 0.000 0.000 0.000
#> GSM1105462     3  0.1168     0.5993 0.000 0.000 0.960 0.032 0.008
#> GSM1105441     2  0.0955     0.7766 0.000 0.968 0.000 0.028 0.004
#> GSM1105465     5  0.2389     0.7815 0.000 0.116 0.004 0.000 0.880
#> GSM1105484     5  0.3612     0.8762 0.000 0.268 0.000 0.000 0.732
#> GSM1105485     5  0.3612     0.8762 0.000 0.268 0.000 0.000 0.732
#> GSM1105496     3  0.5675     0.6044 0.008 0.000 0.544 0.064 0.384
#> GSM1105505     3  0.1300     0.6285 0.016 0.000 0.956 0.000 0.028
#> GSM1105509     1  0.0451     0.8370 0.988 0.000 0.008 0.004 0.000
#> GSM1105448     2  0.1043     0.7603 0.000 0.960 0.000 0.000 0.040
#> GSM1105521     1  0.0451     0.8370 0.988 0.000 0.008 0.004 0.000
#> GSM1105528     5  0.3612     0.8762 0.000 0.268 0.000 0.000 0.732
#> GSM1105529     5  0.3612     0.8762 0.000 0.268 0.000 0.000 0.732
#> GSM1105533     1  0.3816     0.7109 0.696 0.000 0.304 0.000 0.000
#> GSM1105545     4  0.4990     0.2104 0.000 0.448 0.012 0.528 0.012
#> GSM1105548     1  0.2377     0.8122 0.872 0.000 0.128 0.000 0.000
#> GSM1105549     1  0.2377     0.8139 0.872 0.000 0.128 0.000 0.000
#> GSM1105457     4  0.1831     0.7686 0.000 0.076 0.000 0.920 0.004
#> GSM1105460     2  0.3715     0.4698 0.000 0.736 0.000 0.260 0.004
#> GSM1105461     2  0.0000     0.7884 0.000 1.000 0.000 0.000 0.000
#> GSM1105464     1  0.4886     0.5259 0.512 0.000 0.468 0.016 0.004
#> GSM1105466     4  0.1924     0.7682 0.000 0.064 0.008 0.924 0.004
#> GSM1105479     2  0.6620    -0.0198 0.000 0.452 0.004 0.352 0.192
#> GSM1105502     1  0.4419     0.6773 0.644 0.000 0.344 0.008 0.004
#> GSM1105515     1  0.0162     0.8364 0.996 0.000 0.004 0.000 0.000
#> GSM1105523     3  0.3430     0.5014 0.012 0.000 0.824 0.152 0.012
#> GSM1105550     1  0.6531     0.4005 0.484 0.000 0.360 0.144 0.012
#> GSM1105450     2  0.0000     0.7884 0.000 1.000 0.000 0.000 0.000
#> GSM1105451     2  0.0162     0.7874 0.000 0.996 0.000 0.004 0.000
#> GSM1105454     3  0.6780     0.6145 0.000 0.028 0.540 0.188 0.244
#> GSM1105468     2  0.0000     0.7884 0.000 1.000 0.000 0.000 0.000
#> GSM1105481     3  0.5286     0.6498 0.000 0.036 0.696 0.048 0.220
#> GSM1105504     3  0.0693     0.6217 0.012 0.000 0.980 0.000 0.008
#> GSM1105517     1  0.4622     0.6610 0.700 0.000 0.264 0.024 0.012
#> GSM1105525     3  0.6546    -0.2934 0.352 0.000 0.488 0.148 0.012
#> GSM1105552     1  0.4283     0.5496 0.544 0.000 0.456 0.000 0.000
#> GSM1105452     5  0.3612     0.8762 0.000 0.268 0.000 0.000 0.732
#> GSM1105453     2  0.0000     0.7884 0.000 1.000 0.000 0.000 0.000
#> GSM1105456     3  0.6731     0.6149 0.000 0.024 0.540 0.192 0.244

show/hide code output

cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#>            class entropy silhouette    p1    p2    p3    p4    p5    p6
#> GSM1105438     2  0.0405     0.8697 0.000 0.988 0.008 0.000 0.004 0.000
#> GSM1105486     2  0.0146     0.8709 0.000 0.996 0.000 0.004 0.000 0.000
#> GSM1105487     1  0.4008     0.7310 0.736 0.000 0.228 0.008 0.020 0.008
#> GSM1105490     4  0.0820     0.8334 0.000 0.016 0.000 0.972 0.000 0.012
#> GSM1105491     5  0.1713     0.9063 0.000 0.028 0.000 0.000 0.928 0.044
#> GSM1105495     6  0.3259     0.6404 0.000 0.000 0.012 0.000 0.216 0.772
#> GSM1105498     6  0.2699     0.7581 0.000 0.000 0.012 0.124 0.008 0.856
#> GSM1105499     1  0.1556     0.8485 0.920 0.000 0.080 0.000 0.000 0.000
#> GSM1105506     4  0.0692     0.8320 0.000 0.004 0.000 0.976 0.000 0.020
#> GSM1105442     5  0.1594     0.9255 0.000 0.052 0.000 0.000 0.932 0.016
#> GSM1105511     4  0.0622     0.8330 0.000 0.012 0.000 0.980 0.000 0.008
#> GSM1105514     2  0.0146     0.8703 0.000 0.996 0.000 0.000 0.004 0.000
#> GSM1105518     6  0.0862     0.8181 0.000 0.004 0.008 0.016 0.000 0.972
#> GSM1105522     1  0.3927     0.7048 0.748 0.000 0.216 0.008 0.020 0.008
#> GSM1105534     1  0.0363     0.8550 0.988 0.000 0.012 0.000 0.000 0.000
#> GSM1105535     1  0.2819     0.8271 0.864 0.000 0.104 0.008 0.016 0.008
#> GSM1105538     1  0.0520     0.8563 0.984 0.000 0.008 0.000 0.008 0.000
#> GSM1105542     5  0.1387     0.9318 0.000 0.068 0.000 0.000 0.932 0.000
#> GSM1105443     2  0.5110     0.4581 0.000 0.620 0.016 0.312 0.028 0.024
#> GSM1105551     1  0.4130     0.7310 0.736 0.000 0.220 0.012 0.024 0.008
#> GSM1105554     1  0.0363     0.8550 0.988 0.000 0.012 0.000 0.000 0.000
#> GSM1105555     1  0.3480     0.7268 0.776 0.000 0.200 0.000 0.016 0.008
#> GSM1105447     2  0.5852     0.1324 0.000 0.500 0.016 0.060 0.028 0.396
#> GSM1105467     2  0.0146     0.8709 0.000 0.996 0.000 0.004 0.000 0.000
#> GSM1105470     2  0.0146     0.8709 0.000 0.996 0.000 0.004 0.000 0.000
#> GSM1105471     6  0.5941     0.4711 0.000 0.280 0.016 0.120 0.016 0.568
#> GSM1105474     2  0.0146     0.8709 0.000 0.996 0.000 0.004 0.000 0.000
#> GSM1105475     2  0.0713     0.8607 0.000 0.972 0.000 0.028 0.000 0.000
#> GSM1105440     1  0.2107     0.8461 0.916 0.000 0.052 0.008 0.016 0.008
#> GSM1105488     5  0.1387     0.9318 0.000 0.068 0.000 0.000 0.932 0.000
#> GSM1105489     1  0.3073     0.7729 0.824 0.000 0.152 0.000 0.016 0.008
#> GSM1105492     1  0.1026     0.8548 0.968 0.000 0.008 0.004 0.012 0.008
#> GSM1105493     1  0.3081     0.6940 0.776 0.000 0.220 0.000 0.004 0.000
#> GSM1105497     5  0.1644     0.9068 0.000 0.028 0.000 0.000 0.932 0.040
#> GSM1105500     5  0.2696     0.8921 0.000 0.056 0.012 0.004 0.884 0.044
#> GSM1105501     4  0.2778     0.7232 0.000 0.168 0.008 0.824 0.000 0.000
#> GSM1105508     1  0.2912     0.8223 0.856 0.000 0.112 0.008 0.016 0.008
#> GSM1105444     2  0.0405     0.8697 0.000 0.988 0.008 0.000 0.004 0.000
#> GSM1105513     4  0.5072     0.5728 0.000 0.076 0.008 0.692 0.028 0.196
#> GSM1105516     1  0.3221     0.7109 0.792 0.000 0.020 0.188 0.000 0.000
#> GSM1105520     6  0.0909     0.8163 0.000 0.000 0.020 0.012 0.000 0.968
#> GSM1105524     1  0.2819     0.8271 0.864 0.000 0.104 0.008 0.016 0.008
#> GSM1105536     2  0.4814     0.5826 0.000 0.700 0.052 0.216 0.024 0.008
#> GSM1105537     1  0.2819     0.8271 0.864 0.000 0.104 0.008 0.016 0.008
#> GSM1105540     1  0.5986     0.0904 0.468 0.000 0.424 0.052 0.032 0.024
#> GSM1105544     5  0.7614     0.2202 0.308 0.000 0.080 0.108 0.428 0.076
#> GSM1105445     6  0.4939     0.5972 0.000 0.040 0.016 0.224 0.028 0.692
#> GSM1105553     6  0.1323     0.8088 0.008 0.000 0.008 0.008 0.020 0.956
#> GSM1105556     1  0.0363     0.8550 0.988 0.000 0.012 0.000 0.000 0.000
#> GSM1105557     4  0.0820     0.8333 0.000 0.012 0.000 0.972 0.000 0.016
#> GSM1105449     2  0.1975     0.8431 0.000 0.928 0.012 0.012 0.028 0.020
#> GSM1105469     4  0.1410     0.8091 0.004 0.000 0.044 0.944 0.008 0.000
#> GSM1105472     2  0.0146     0.8709 0.000 0.996 0.000 0.004 0.000 0.000
#> GSM1105473     3  0.3997     0.1590 0.488 0.000 0.508 0.000 0.004 0.000
#> GSM1105476     2  0.0146     0.8709 0.000 0.996 0.000 0.004 0.000 0.000
#> GSM1105477     2  0.5648     0.5522 0.000 0.648 0.044 0.104 0.196 0.008
#> GSM1105478     4  0.4351     0.5496 0.000 0.000 0.020 0.704 0.032 0.244
#> GSM1105510     5  0.1387     0.9318 0.000 0.068 0.000 0.000 0.932 0.000
#> GSM1105530     3  0.1714     0.7870 0.092 0.000 0.908 0.000 0.000 0.000
#> GSM1105539     3  0.1765     0.7859 0.096 0.000 0.904 0.000 0.000 0.000
#> GSM1105480     4  0.3046     0.7622 0.000 0.000 0.024 0.852 0.024 0.100
#> GSM1105512     1  0.1007     0.8551 0.956 0.000 0.044 0.000 0.000 0.000
#> GSM1105532     3  0.1714     0.7870 0.092 0.000 0.908 0.000 0.000 0.000
#> GSM1105541     3  0.1863     0.7857 0.104 0.000 0.896 0.000 0.000 0.000
#> GSM1105439     2  0.5055     0.4111 0.000 0.600 0.016 0.340 0.028 0.016
#> GSM1105463     3  0.3076     0.6577 0.000 0.000 0.760 0.000 0.000 0.240
#> GSM1105482     1  0.2191     0.8062 0.876 0.000 0.120 0.000 0.004 0.000
#> GSM1105483     4  0.1226     0.8155 0.000 0.004 0.040 0.952 0.004 0.000
#> GSM1105494     6  0.4281     0.5751 0.000 0.000 0.024 0.272 0.016 0.688
#> GSM1105503     6  0.1572     0.8099 0.000 0.000 0.028 0.036 0.000 0.936
#> GSM1105507     1  0.3831     0.7865 0.800 0.000 0.068 0.116 0.012 0.004
#> GSM1105446     2  0.3528     0.5469 0.000 0.700 0.004 0.000 0.296 0.000
#> GSM1105519     1  0.1007     0.8551 0.956 0.000 0.044 0.000 0.000 0.000
#> GSM1105526     4  0.5757     0.4227 0.000 0.312 0.028 0.568 0.084 0.008
#> GSM1105527     4  0.0810     0.8298 0.000 0.004 0.008 0.976 0.004 0.008
#> GSM1105531     3  0.3126     0.6484 0.000 0.000 0.752 0.000 0.000 0.248
#> GSM1105543     2  0.2730     0.6994 0.000 0.808 0.000 0.000 0.192 0.000
#> GSM1105546     1  0.0862     0.8552 0.972 0.000 0.004 0.000 0.016 0.008
#> GSM1105547     1  0.0508     0.8547 0.984 0.000 0.012 0.000 0.004 0.000
#> GSM1105455     2  0.4944     0.4438 0.000 0.616 0.016 0.328 0.024 0.016
#> GSM1105458     2  0.3816     0.7261 0.000 0.796 0.016 0.012 0.028 0.148
#> GSM1105459     2  0.0146     0.8707 0.000 0.996 0.004 0.000 0.000 0.000
#> GSM1105462     3  0.2340     0.7129 0.000 0.000 0.852 0.000 0.000 0.148
#> GSM1105441     2  0.1793     0.8462 0.000 0.936 0.012 0.012 0.028 0.012
#> GSM1105465     5  0.1720     0.9102 0.000 0.032 0.000 0.000 0.928 0.040
#> GSM1105484     5  0.1501     0.9267 0.000 0.076 0.000 0.000 0.924 0.000
#> GSM1105485     5  0.1387     0.9318 0.000 0.068 0.000 0.000 0.932 0.000
#> GSM1105496     6  0.1313     0.8072 0.000 0.000 0.016 0.004 0.028 0.952
#> GSM1105505     3  0.3774     0.4124 0.000 0.000 0.592 0.000 0.000 0.408
#> GSM1105509     1  0.1387     0.8514 0.932 0.000 0.068 0.000 0.000 0.000
#> GSM1105448     2  0.0405     0.8697 0.000 0.988 0.008 0.000 0.004 0.000
#> GSM1105521     1  0.1007     0.8551 0.956 0.000 0.044 0.000 0.000 0.000
#> GSM1105528     5  0.1556     0.9232 0.000 0.080 0.000 0.000 0.920 0.000
#> GSM1105529     5  0.1387     0.9318 0.000 0.068 0.000 0.000 0.932 0.000
#> GSM1105533     3  0.3923     0.4194 0.372 0.000 0.620 0.000 0.000 0.008
#> GSM1105545     4  0.5079     0.4610 0.000 0.316 0.052 0.612 0.012 0.008
#> GSM1105548     1  0.3184     0.7828 0.828 0.000 0.140 0.004 0.020 0.008
#> GSM1105549     1  0.2402     0.7890 0.856 0.000 0.140 0.000 0.004 0.000
#> GSM1105457     4  0.1856     0.8209 0.000 0.008 0.008 0.932 0.024 0.028
#> GSM1105460     2  0.2587     0.8183 0.000 0.896 0.016 0.048 0.028 0.012
#> GSM1105461     2  0.0146     0.8707 0.000 0.996 0.004 0.000 0.000 0.000
#> GSM1105464     3  0.2003     0.7826 0.116 0.000 0.884 0.000 0.000 0.000
#> GSM1105466     4  0.1508     0.8277 0.000 0.004 0.012 0.948 0.020 0.016
#> GSM1105479     6  0.6556     0.3186 0.000 0.300 0.008 0.196 0.028 0.468
#> GSM1105502     3  0.3134     0.6923 0.208 0.000 0.784 0.004 0.000 0.004
#> GSM1105515     1  0.0363     0.8550 0.988 0.000 0.012 0.000 0.000 0.000
#> GSM1105523     3  0.2213     0.7415 0.000 0.000 0.904 0.044 0.004 0.048
#> GSM1105550     3  0.3856     0.6738 0.140 0.000 0.792 0.052 0.008 0.008
#> GSM1105450     2  0.0146     0.8709 0.000 0.996 0.000 0.004 0.000 0.000
#> GSM1105451     2  0.0405     0.8693 0.000 0.988 0.008 0.004 0.000 0.000
#> GSM1105454     6  0.0767     0.8184 0.000 0.004 0.008 0.012 0.000 0.976
#> GSM1105468     2  0.0146     0.8709 0.000 0.996 0.000 0.004 0.000 0.000
#> GSM1105481     6  0.1918     0.7704 0.000 0.008 0.088 0.000 0.000 0.904
#> GSM1105504     3  0.3050     0.6598 0.000 0.000 0.764 0.000 0.000 0.236
#> GSM1105517     3  0.4480     0.4044 0.368 0.000 0.604 0.012 0.008 0.008
#> GSM1105525     3  0.2619     0.7651 0.056 0.000 0.884 0.048 0.012 0.000
#> GSM1105552     3  0.3089     0.7396 0.188 0.000 0.800 0.000 0.004 0.008
#> GSM1105452     5  0.1387     0.9318 0.000 0.068 0.000 0.000 0.932 0.000
#> GSM1105453     2  0.0260     0.8701 0.000 0.992 0.008 0.000 0.000 0.000
#> GSM1105456     6  0.0767     0.8184 0.000 0.004 0.008 0.012 0.000 0.976

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) other(p) time(p) individual(p) k
#> MAD:skmeans 117    0.983   0.6725   0.634      1.61e-02 2
#> MAD:skmeans 119    0.842   0.5240   0.241      1.56e-03 3
#> MAD:skmeans 113    0.290   0.6614   0.694      5.87e-03 4
#> MAD:skmeans 102    0.142   0.8212   0.705      1.10e-02 5
#> MAD:skmeans 106    0.259   0.0002   0.797      2.39e-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: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 44956 rows and 120 columns.
#>   Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'MAD' method.
#>   Subgroups are detected by 'pam' method.
#>   Performed in total 1250 partitions by row resampling.
#>   Best k for subgroups seems to be 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.898           0.913       0.965         0.4776 0.510   0.510
#> 3 3 0.563           0.599       0.790         0.3329 0.835   0.690
#> 4 4 0.687           0.758       0.852         0.1485 0.810   0.546
#> 5 5 0.629           0.534       0.744         0.0788 0.898   0.638
#> 6 6 0.762           0.669       0.817         0.0431 0.873   0.499

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
#> GSM1105438     2  0.0000      0.991 0.000 1.000
#> GSM1105486     2  0.0000      0.991 0.000 1.000
#> GSM1105487     1  0.0000      0.921 1.000 0.000
#> GSM1105490     2  0.0000      0.991 0.000 1.000
#> GSM1105491     1  1.0000      0.143 0.504 0.496
#> GSM1105495     2  0.0000      0.991 0.000 1.000
#> GSM1105498     2  0.0376      0.987 0.004 0.996
#> GSM1105499     1  0.0000      0.921 1.000 0.000
#> GSM1105506     2  0.0000      0.991 0.000 1.000
#> GSM1105442     2  0.0000      0.991 0.000 1.000
#> GSM1105511     2  0.0000      0.991 0.000 1.000
#> GSM1105514     2  0.0000      0.991 0.000 1.000
#> GSM1105518     2  0.0000      0.991 0.000 1.000
#> GSM1105522     1  0.0000      0.921 1.000 0.000
#> GSM1105534     1  0.0000      0.921 1.000 0.000
#> GSM1105535     1  0.0000      0.921 1.000 0.000
#> GSM1105538     1  0.0000      0.921 1.000 0.000
#> GSM1105542     2  0.0000      0.991 0.000 1.000
#> GSM1105443     2  0.0000      0.991 0.000 1.000
#> GSM1105551     1  0.0000      0.921 1.000 0.000
#> GSM1105554     1  0.0000      0.921 1.000 0.000
#> GSM1105555     1  0.0000      0.921 1.000 0.000
#> GSM1105447     2  0.0000      0.991 0.000 1.000
#> GSM1105467     2  0.0000      0.991 0.000 1.000
#> GSM1105470     2  0.0000      0.991 0.000 1.000
#> GSM1105471     2  0.0000      0.991 0.000 1.000
#> GSM1105474     2  0.0000      0.991 0.000 1.000
#> GSM1105475     2  0.0000      0.991 0.000 1.000
#> GSM1105440     1  0.0000      0.921 1.000 0.000
#> GSM1105488     2  0.0000      0.991 0.000 1.000
#> GSM1105489     1  0.0000      0.921 1.000 0.000
#> GSM1105492     1  0.0000      0.921 1.000 0.000
#> GSM1105493     1  0.0000      0.921 1.000 0.000
#> GSM1105497     2  0.0000      0.991 0.000 1.000
#> GSM1105500     2  0.7139      0.722 0.196 0.804
#> GSM1105501     2  0.0000      0.991 0.000 1.000
#> GSM1105508     1  0.0000      0.921 1.000 0.000
#> GSM1105444     2  0.0000      0.991 0.000 1.000
#> GSM1105513     2  0.0000      0.991 0.000 1.000
#> GSM1105516     1  0.4690      0.840 0.900 0.100
#> GSM1105520     2  0.0000      0.991 0.000 1.000
#> GSM1105524     1  0.0000      0.921 1.000 0.000
#> GSM1105536     2  0.0000      0.991 0.000 1.000
#> GSM1105537     1  0.0000      0.921 1.000 0.000
#> GSM1105540     1  1.0000      0.143 0.504 0.496
#> GSM1105544     1  1.0000      0.143 0.504 0.496
#> GSM1105445     2  0.0000      0.991 0.000 1.000
#> GSM1105553     2  0.9209      0.418 0.336 0.664
#> GSM1105556     1  0.0000      0.921 1.000 0.000
#> GSM1105557     2  0.0000      0.991 0.000 1.000
#> GSM1105449     2  0.0000      0.991 0.000 1.000
#> GSM1105469     2  0.0000      0.991 0.000 1.000
#> GSM1105472     2  0.0000      0.991 0.000 1.000
#> GSM1105473     1  0.0000      0.921 1.000 0.000
#> GSM1105476     2  0.0000      0.991 0.000 1.000
#> GSM1105477     2  0.0000      0.991 0.000 1.000
#> GSM1105478     2  0.0000      0.991 0.000 1.000
#> GSM1105510     2  0.0000      0.991 0.000 1.000
#> GSM1105530     1  0.0000      0.921 1.000 0.000
#> GSM1105539     1  0.0000      0.921 1.000 0.000
#> GSM1105480     2  0.0000      0.991 0.000 1.000
#> GSM1105512     1  0.0000      0.921 1.000 0.000
#> GSM1105532     1  0.0000      0.921 1.000 0.000
#> GSM1105541     1  0.0000      0.921 1.000 0.000
#> GSM1105439     2  0.0000      0.991 0.000 1.000
#> GSM1105463     1  0.0000      0.921 1.000 0.000
#> GSM1105482     1  0.0000      0.921 1.000 0.000
#> GSM1105483     2  0.0000      0.991 0.000 1.000
#> GSM1105494     2  0.0000      0.991 0.000 1.000
#> GSM1105503     2  0.0000      0.991 0.000 1.000
#> GSM1105507     1  0.0000      0.921 1.000 0.000
#> GSM1105446     2  0.0000      0.991 0.000 1.000
#> GSM1105519     1  0.0000      0.921 1.000 0.000
#> GSM1105526     2  0.0000      0.991 0.000 1.000
#> GSM1105527     2  0.0000      0.991 0.000 1.000
#> GSM1105531     1  0.8763      0.608 0.704 0.296
#> GSM1105543     2  0.0000      0.991 0.000 1.000
#> GSM1105546     1  0.0000      0.921 1.000 0.000
#> GSM1105547     1  0.0000      0.921 1.000 0.000
#> GSM1105455     2  0.0000      0.991 0.000 1.000
#> GSM1105458     2  0.0000      0.991 0.000 1.000
#> GSM1105459     2  0.0000      0.991 0.000 1.000
#> GSM1105462     2  0.0000      0.991 0.000 1.000
#> GSM1105441     2  0.0000      0.991 0.000 1.000
#> GSM1105465     2  0.0000      0.991 0.000 1.000
#> GSM1105484     2  0.0000      0.991 0.000 1.000
#> GSM1105485     2  0.0000      0.991 0.000 1.000
#> GSM1105496     1  1.0000      0.143 0.504 0.496
#> GSM1105505     1  0.8763      0.608 0.704 0.296
#> GSM1105509     1  0.0000      0.921 1.000 0.000
#> GSM1105448     2  0.0000      0.991 0.000 1.000
#> GSM1105521     1  0.0000      0.921 1.000 0.000
#> GSM1105528     2  0.0000      0.991 0.000 1.000
#> GSM1105529     2  0.0000      0.991 0.000 1.000
#> GSM1105533     1  0.0000      0.921 1.000 0.000
#> GSM1105545     2  0.0000      0.991 0.000 1.000
#> GSM1105548     1  0.0000      0.921 1.000 0.000
#> GSM1105549     1  0.0000      0.921 1.000 0.000
#> GSM1105457     2  0.0000      0.991 0.000 1.000
#> GSM1105460     2  0.0000      0.991 0.000 1.000
#> GSM1105461     2  0.0000      0.991 0.000 1.000
#> GSM1105464     1  0.0000      0.921 1.000 0.000
#> GSM1105466     2  0.0000      0.991 0.000 1.000
#> GSM1105479     2  0.0000      0.991 0.000 1.000
#> GSM1105502     1  0.0000      0.921 1.000 0.000
#> GSM1105515     1  0.0000      0.921 1.000 0.000
#> GSM1105523     1  0.8608      0.626 0.716 0.284
#> GSM1105550     1  0.9983      0.206 0.524 0.476
#> GSM1105450     2  0.0000      0.991 0.000 1.000
#> GSM1105451     2  0.0000      0.991 0.000 1.000
#> GSM1105454     2  0.0000      0.991 0.000 1.000
#> GSM1105468     2  0.0000      0.991 0.000 1.000
#> GSM1105481     2  0.0000      0.991 0.000 1.000
#> GSM1105504     1  0.0672      0.916 0.992 0.008
#> GSM1105517     1  0.8267      0.661 0.740 0.260
#> GSM1105525     1  0.0000      0.921 1.000 0.000
#> GSM1105552     1  0.0000      0.921 1.000 0.000
#> GSM1105452     2  0.0000      0.991 0.000 1.000
#> GSM1105453     2  0.0000      0.991 0.000 1.000
#> GSM1105456     2  0.0000      0.991 0.000 1.000

show/hide code output

cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#>            class entropy silhouette    p1    p2    p3
#> GSM1105438     2  0.0000     0.6768 0.000 1.000 0.000
#> GSM1105486     2  0.5706     0.7136 0.000 0.680 0.320
#> GSM1105487     1  0.0000     0.8989 1.000 0.000 0.000
#> GSM1105490     2  0.1411     0.6662 0.000 0.964 0.036
#> GSM1105491     3  0.7308     0.4637 0.296 0.056 0.648
#> GSM1105495     2  0.6307    -0.2488 0.000 0.512 0.488
#> GSM1105498     3  0.0237     0.4376 0.004 0.000 0.996
#> GSM1105499     1  0.0000     0.8989 1.000 0.000 0.000
#> GSM1105506     2  0.5905     0.7070 0.000 0.648 0.352
#> GSM1105442     2  0.0000     0.6768 0.000 1.000 0.000
#> GSM1105511     2  0.5905     0.7070 0.000 0.648 0.352
#> GSM1105514     2  0.5706     0.7136 0.000 0.680 0.320
#> GSM1105518     2  0.4974     0.4061 0.000 0.764 0.236
#> GSM1105522     1  0.0747     0.8874 0.984 0.000 0.016
#> GSM1105534     1  0.0000     0.8989 1.000 0.000 0.000
#> GSM1105535     1  0.0000     0.8989 1.000 0.000 0.000
#> GSM1105538     1  0.0000     0.8989 1.000 0.000 0.000
#> GSM1105542     2  0.5706     0.7136 0.000 0.680 0.320
#> GSM1105443     2  0.1289     0.6639 0.000 0.968 0.032
#> GSM1105551     1  0.1753     0.8617 0.952 0.000 0.048
#> GSM1105554     1  0.0000     0.8989 1.000 0.000 0.000
#> GSM1105555     1  0.0237     0.8964 0.996 0.000 0.004
#> GSM1105447     2  0.1289     0.6639 0.000 0.968 0.032
#> GSM1105467     2  0.5706     0.7136 0.000 0.680 0.320
#> GSM1105470     2  0.5706     0.7136 0.000 0.680 0.320
#> GSM1105471     2  0.6295     0.5841 0.000 0.528 0.472
#> GSM1105474     2  0.5706     0.7136 0.000 0.680 0.320
#> GSM1105475     2  0.5706     0.7136 0.000 0.680 0.320
#> GSM1105440     1  0.0000     0.8989 1.000 0.000 0.000
#> GSM1105488     2  0.3267     0.7007 0.000 0.884 0.116
#> GSM1105489     1  0.1753     0.8620 0.952 0.000 0.048
#> GSM1105492     1  0.0000     0.8989 1.000 0.000 0.000
#> GSM1105493     1  0.0000     0.8989 1.000 0.000 0.000
#> GSM1105497     2  0.5529     0.2784 0.000 0.704 0.296
#> GSM1105500     2  0.7424     0.6778 0.060 0.640 0.300
#> GSM1105501     2  0.5905     0.7070 0.000 0.648 0.352
#> GSM1105508     1  0.0000     0.8989 1.000 0.000 0.000
#> GSM1105444     2  0.0000     0.6768 0.000 1.000 0.000
#> GSM1105513     2  0.1289     0.6639 0.000 0.968 0.032
#> GSM1105516     1  0.4449     0.7185 0.860 0.100 0.040
#> GSM1105520     3  0.0592     0.4374 0.000 0.012 0.988
#> GSM1105524     1  0.0000     0.8989 1.000 0.000 0.000
#> GSM1105536     2  0.6295     0.5841 0.000 0.528 0.472
#> GSM1105537     1  0.0000     0.8989 1.000 0.000 0.000
#> GSM1105540     3  0.9210     0.4403 0.296 0.184 0.520
#> GSM1105544     2  0.9248     0.1353 0.296 0.516 0.188
#> GSM1105445     2  0.1289     0.6639 0.000 0.968 0.032
#> GSM1105553     2  0.4887     0.4172 0.000 0.772 0.228
#> GSM1105556     1  0.0000     0.8989 1.000 0.000 0.000
#> GSM1105557     2  0.3192     0.6897 0.000 0.888 0.112
#> GSM1105449     2  0.0000     0.6768 0.000 1.000 0.000
#> GSM1105469     2  0.6295     0.5841 0.000 0.528 0.472
#> GSM1105472     2  0.5706     0.7136 0.000 0.680 0.320
#> GSM1105473     1  0.5098     0.5589 0.752 0.000 0.248
#> GSM1105476     2  0.5706     0.7136 0.000 0.680 0.320
#> GSM1105477     2  0.6295     0.5841 0.000 0.528 0.472
#> GSM1105478     3  0.6309    -0.5983 0.000 0.496 0.504
#> GSM1105510     2  0.5327     0.7160 0.000 0.728 0.272
#> GSM1105530     3  0.6295     0.1863 0.472 0.000 0.528
#> GSM1105539     3  0.6295     0.1863 0.472 0.000 0.528
#> GSM1105480     3  0.6309    -0.5983 0.000 0.496 0.504
#> GSM1105512     1  0.0000     0.8989 1.000 0.000 0.000
#> GSM1105532     3  0.6295     0.1863 0.472 0.000 0.528
#> GSM1105541     1  0.4121     0.7148 0.832 0.000 0.168
#> GSM1105439     2  0.1289     0.6639 0.000 0.968 0.032
#> GSM1105463     3  0.5905     0.3925 0.352 0.000 0.648
#> GSM1105482     1  0.0000     0.8989 1.000 0.000 0.000
#> GSM1105483     2  0.6295     0.5841 0.000 0.528 0.472
#> GSM1105494     2  0.6295     0.6157 0.000 0.528 0.472
#> GSM1105503     3  0.5706     0.4217 0.000 0.320 0.680
#> GSM1105507     1  0.2261     0.8475 0.932 0.000 0.068
#> GSM1105446     2  0.0000     0.6768 0.000 1.000 0.000
#> GSM1105519     1  0.0000     0.8989 1.000 0.000 0.000
#> GSM1105526     2  0.6295     0.5841 0.000 0.528 0.472
#> GSM1105527     2  0.6299     0.5829 0.000 0.524 0.476
#> GSM1105531     3  0.6714     0.4670 0.296 0.032 0.672
#> GSM1105543     2  0.5706     0.7136 0.000 0.680 0.320
#> GSM1105546     1  0.0000     0.8989 1.000 0.000 0.000
#> GSM1105547     1  0.0000     0.8989 1.000 0.000 0.000
#> GSM1105455     2  0.1289     0.6639 0.000 0.968 0.032
#> GSM1105458     2  0.0747     0.6709 0.000 0.984 0.016
#> GSM1105459     2  0.0000     0.6768 0.000 1.000 0.000
#> GSM1105462     3  0.5859    -0.2863 0.000 0.344 0.656
#> GSM1105441     2  0.0000     0.6768 0.000 1.000 0.000
#> GSM1105465     2  0.6302     0.5771 0.000 0.520 0.480
#> GSM1105484     2  0.5706     0.7136 0.000 0.680 0.320
#> GSM1105485     2  0.6295     0.5841 0.000 0.528 0.472
#> GSM1105496     3  0.6505     0.2369 0.004 0.468 0.528
#> GSM1105505     3  0.6482     0.4541 0.296 0.024 0.680
#> GSM1105509     1  0.1964     0.8531 0.944 0.000 0.056
#> GSM1105448     2  0.0000     0.6768 0.000 1.000 0.000
#> GSM1105521     1  0.0000     0.8989 1.000 0.000 0.000
#> GSM1105528     2  0.5706     0.7136 0.000 0.680 0.320
#> GSM1105529     2  0.6295     0.5841 0.000 0.528 0.472
#> GSM1105533     1  0.0000     0.8989 1.000 0.000 0.000
#> GSM1105545     2  0.6295     0.5841 0.000 0.528 0.472
#> GSM1105548     1  0.3340     0.7792 0.880 0.000 0.120
#> GSM1105549     1  0.0000     0.8989 1.000 0.000 0.000
#> GSM1105457     2  0.1289     0.6639 0.000 0.968 0.032
#> GSM1105460     2  0.0000     0.6768 0.000 1.000 0.000
#> GSM1105461     2  0.0000     0.6768 0.000 1.000 0.000
#> GSM1105464     1  0.6260     0.0196 0.552 0.000 0.448
#> GSM1105466     2  0.6260     0.6096 0.000 0.552 0.448
#> GSM1105479     2  0.5706     0.7136 0.000 0.680 0.320
#> GSM1105502     1  0.5678     0.4328 0.684 0.000 0.316
#> GSM1105515     1  0.0000     0.8989 1.000 0.000 0.000
#> GSM1105523     3  0.5621     0.4547 0.308 0.000 0.692
#> GSM1105550     3  0.8821     0.4475 0.304 0.144 0.552
#> GSM1105450     2  0.5706     0.7136 0.000 0.680 0.320
#> GSM1105451     2  0.0000     0.6768 0.000 1.000 0.000
#> GSM1105454     2  0.6309    -0.2193 0.000 0.504 0.496
#> GSM1105468     2  0.5706     0.7136 0.000 0.680 0.320
#> GSM1105481     3  0.1411     0.4121 0.000 0.036 0.964
#> GSM1105504     3  0.5902     0.4374 0.316 0.004 0.680
#> GSM1105517     1  0.7489    -0.1666 0.496 0.036 0.468
#> GSM1105525     1  0.6291    -0.0551 0.532 0.000 0.468
#> GSM1105552     3  0.6252     0.2472 0.444 0.000 0.556
#> GSM1105452     2  0.5706     0.7136 0.000 0.680 0.320
#> GSM1105453     2  0.0237     0.6755 0.000 0.996 0.004
#> GSM1105456     3  0.6295     0.2307 0.000 0.472 0.528

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>            class entropy silhouette    p1    p2    p3    p4
#> GSM1105438     2  0.3444     0.9042 0.000 0.816 0.000 0.184
#> GSM1105486     4  0.0188     0.9267 0.000 0.004 0.000 0.996
#> GSM1105487     1  0.0336     0.8273 0.992 0.000 0.008 0.000
#> GSM1105490     2  0.4605     0.5688 0.000 0.664 0.000 0.336
#> GSM1105491     3  0.2773     0.7255 0.000 0.116 0.880 0.004
#> GSM1105495     2  0.2976     0.6958 0.000 0.872 0.120 0.008
#> GSM1105498     3  0.7332     0.3784 0.000 0.160 0.468 0.372
#> GSM1105499     1  0.0000     0.8300 1.000 0.000 0.000 0.000
#> GSM1105506     4  0.1867     0.8851 0.000 0.072 0.000 0.928
#> GSM1105442     2  0.3610     0.9005 0.000 0.800 0.000 0.200
#> GSM1105511     4  0.1792     0.8839 0.000 0.068 0.000 0.932
#> GSM1105514     4  0.0592     0.9210 0.000 0.016 0.000 0.984
#> GSM1105518     2  0.2179     0.8043 0.000 0.924 0.012 0.064
#> GSM1105522     1  0.4994     0.4338 0.520 0.000 0.480 0.000
#> GSM1105534     1  0.0000     0.8300 1.000 0.000 0.000 0.000
#> GSM1105535     1  0.0000     0.8300 1.000 0.000 0.000 0.000
#> GSM1105538     1  0.4713     0.5607 0.640 0.000 0.360 0.000
#> GSM1105542     4  0.0000     0.9266 0.000 0.000 0.000 1.000
#> GSM1105443     2  0.3356     0.9027 0.000 0.824 0.000 0.176
#> GSM1105551     1  0.1389     0.8033 0.952 0.048 0.000 0.000
#> GSM1105554     1  0.0000     0.8300 1.000 0.000 0.000 0.000
#> GSM1105555     1  0.0524     0.8275 0.988 0.004 0.008 0.000
#> GSM1105447     2  0.3486     0.9018 0.000 0.812 0.000 0.188
#> GSM1105467     4  0.0188     0.9267 0.000 0.004 0.000 0.996
#> GSM1105470     4  0.0188     0.9267 0.000 0.004 0.000 0.996
#> GSM1105471     4  0.0188     0.9263 0.000 0.000 0.004 0.996
#> GSM1105474     4  0.0188     0.9267 0.000 0.004 0.000 0.996
#> GSM1105475     4  0.0188     0.9267 0.000 0.004 0.000 0.996
#> GSM1105440     1  0.0000     0.8300 1.000 0.000 0.000 0.000
#> GSM1105488     4  0.4643     0.2745 0.000 0.344 0.000 0.656
#> GSM1105489     1  0.1389     0.8035 0.952 0.048 0.000 0.000
#> GSM1105492     1  0.4713     0.5607 0.640 0.000 0.360 0.000
#> GSM1105493     1  0.0000     0.8300 1.000 0.000 0.000 0.000
#> GSM1105497     2  0.1940     0.8111 0.000 0.924 0.000 0.076
#> GSM1105500     4  0.5332     0.6455 0.000 0.080 0.184 0.736
#> GSM1105501     4  0.1792     0.8839 0.000 0.068 0.000 0.932
#> GSM1105508     1  0.1661     0.7997 0.944 0.052 0.004 0.000
#> GSM1105444     2  0.3444     0.9042 0.000 0.816 0.000 0.184
#> GSM1105513     2  0.3123     0.8546 0.000 0.844 0.000 0.156
#> GSM1105516     1  0.7662     0.4162 0.512 0.068 0.360 0.060
#> GSM1105520     3  0.7046     0.4508 0.000 0.136 0.524 0.340
#> GSM1105524     1  0.0000     0.8300 1.000 0.000 0.000 0.000
#> GSM1105536     4  0.0188     0.9263 0.000 0.000 0.004 0.996
#> GSM1105537     1  0.0000     0.8300 1.000 0.000 0.000 0.000
#> GSM1105540     3  0.3024     0.6733 0.000 0.000 0.852 0.148
#> GSM1105544     4  0.5137     0.1145 0.000 0.004 0.452 0.544
#> GSM1105445     2  0.3486     0.9018 0.000 0.812 0.000 0.188
#> GSM1105553     2  0.1867     0.8123 0.000 0.928 0.000 0.072
#> GSM1105556     1  0.0000     0.8300 1.000 0.000 0.000 0.000
#> GSM1105557     4  0.4985     0.0395 0.000 0.468 0.000 0.532
#> GSM1105449     2  0.3569     0.9010 0.000 0.804 0.000 0.196
#> GSM1105469     4  0.1824     0.8878 0.000 0.060 0.004 0.936
#> GSM1105472     4  0.0188     0.9267 0.000 0.004 0.000 0.996
#> GSM1105473     3  0.4008     0.5017 0.244 0.000 0.756 0.000
#> GSM1105476     4  0.0188     0.9267 0.000 0.004 0.000 0.996
#> GSM1105477     4  0.0592     0.9202 0.000 0.016 0.000 0.984
#> GSM1105478     4  0.0524     0.9242 0.000 0.008 0.004 0.988
#> GSM1105510     4  0.3024     0.7460 0.000 0.148 0.000 0.852
#> GSM1105530     3  0.0000     0.7244 0.000 0.000 1.000 0.000
#> GSM1105539     3  0.4679     0.3569 0.352 0.000 0.648 0.000
#> GSM1105480     4  0.0524     0.9242 0.000 0.008 0.004 0.988
#> GSM1105512     1  0.3764     0.7003 0.784 0.000 0.216 0.000
#> GSM1105532     3  0.0000     0.7244 0.000 0.000 1.000 0.000
#> GSM1105541     1  0.3873     0.6418 0.772 0.000 0.228 0.000
#> GSM1105439     2  0.3444     0.9027 0.000 0.816 0.000 0.184
#> GSM1105463     3  0.2589     0.7257 0.000 0.116 0.884 0.000
#> GSM1105482     1  0.0000     0.8300 1.000 0.000 0.000 0.000
#> GSM1105483     4  0.1824     0.8878 0.000 0.060 0.004 0.936
#> GSM1105494     4  0.2760     0.7881 0.000 0.128 0.000 0.872
#> GSM1105503     3  0.4992     0.2235 0.000 0.476 0.524 0.000
#> GSM1105507     1  0.6360     0.4918 0.564 0.060 0.372 0.004
#> GSM1105446     2  0.3444     0.9042 0.000 0.816 0.000 0.184
#> GSM1105519     1  0.4713     0.5607 0.640 0.000 0.360 0.000
#> GSM1105526     4  0.0336     0.9246 0.000 0.008 0.000 0.992
#> GSM1105527     4  0.1824     0.8878 0.000 0.060 0.004 0.936
#> GSM1105531     3  0.2589     0.7257 0.000 0.116 0.884 0.000
#> GSM1105543     4  0.0469     0.9236 0.000 0.012 0.000 0.988
#> GSM1105546     1  0.0000     0.8300 1.000 0.000 0.000 0.000
#> GSM1105547     1  0.0000     0.8300 1.000 0.000 0.000 0.000
#> GSM1105455     2  0.3400     0.9033 0.000 0.820 0.000 0.180
#> GSM1105458     2  0.3528     0.9020 0.000 0.808 0.000 0.192
#> GSM1105459     2  0.3569     0.8993 0.000 0.804 0.000 0.196
#> GSM1105462     3  0.5000     0.1105 0.000 0.000 0.500 0.500
#> GSM1105441     2  0.3444     0.9042 0.000 0.816 0.000 0.184
#> GSM1105465     4  0.0336     0.9231 0.000 0.008 0.000 0.992
#> GSM1105484     4  0.0000     0.9266 0.000 0.000 0.000 1.000
#> GSM1105485     4  0.0000     0.9266 0.000 0.000 0.000 1.000
#> GSM1105496     2  0.5132    -0.0704 0.000 0.548 0.448 0.004
#> GSM1105505     3  0.2773     0.7255 0.000 0.116 0.880 0.004
#> GSM1105509     1  0.6295     0.4957 0.568 0.056 0.372 0.004
#> GSM1105448     2  0.3444     0.9042 0.000 0.816 0.000 0.184
#> GSM1105521     1  0.4713     0.5607 0.640 0.000 0.360 0.000
#> GSM1105528     4  0.0000     0.9266 0.000 0.000 0.000 1.000
#> GSM1105529     4  0.0000     0.9266 0.000 0.000 0.000 1.000
#> GSM1105533     1  0.0336     0.8272 0.992 0.000 0.008 0.000
#> GSM1105545     4  0.0524     0.9245 0.000 0.008 0.004 0.988
#> GSM1105548     1  0.6898     0.4208 0.524 0.116 0.360 0.000
#> GSM1105549     1  0.0000     0.8300 1.000 0.000 0.000 0.000
#> GSM1105457     2  0.2921     0.8616 0.000 0.860 0.000 0.140
#> GSM1105460     2  0.3569     0.9010 0.000 0.804 0.000 0.196
#> GSM1105461     2  0.3569     0.8993 0.000 0.804 0.000 0.196
#> GSM1105464     3  0.4431     0.4343 0.304 0.000 0.696 0.000
#> GSM1105466     4  0.0188     0.9263 0.000 0.000 0.004 0.996
#> GSM1105479     4  0.0188     0.9267 0.000 0.004 0.000 0.996
#> GSM1105502     1  0.4500     0.5749 0.684 0.000 0.316 0.000
#> GSM1105515     1  0.0000     0.8300 1.000 0.000 0.000 0.000
#> GSM1105523     3  0.0000     0.7244 0.000 0.000 1.000 0.000
#> GSM1105550     3  0.2799     0.6981 0.008 0.000 0.884 0.108
#> GSM1105450     4  0.0336     0.9255 0.000 0.008 0.000 0.992
#> GSM1105451     2  0.3444     0.9042 0.000 0.816 0.000 0.184
#> GSM1105454     2  0.1867     0.7371 0.000 0.928 0.072 0.000
#> GSM1105468     4  0.0188     0.9267 0.000 0.004 0.000 0.996
#> GSM1105481     3  0.6898     0.4311 0.000 0.116 0.524 0.360
#> GSM1105504     3  0.0000     0.7244 0.000 0.000 1.000 0.000
#> GSM1105517     3  0.4194     0.6000 0.172 0.028 0.800 0.000
#> GSM1105525     3  0.1792     0.6870 0.068 0.000 0.932 0.000
#> GSM1105552     3  0.3015     0.6932 0.092 0.024 0.884 0.000
#> GSM1105452     4  0.0188     0.9260 0.000 0.004 0.000 0.996
#> GSM1105453     2  0.3444     0.9042 0.000 0.816 0.000 0.184
#> GSM1105456     2  0.1940     0.7342 0.000 0.924 0.076 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
#> GSM1105438     2  0.2179     0.8629 0.000 0.888 0.000 0.000 0.112
#> GSM1105486     5  0.2127     0.7817 0.000 0.108 0.000 0.000 0.892
#> GSM1105487     1  0.0290     0.8437 0.992 0.000 0.008 0.000 0.000
#> GSM1105490     3  0.6896     0.2744 0.000 0.168 0.408 0.404 0.020
#> GSM1105491     3  0.7579    -0.2434 0.000 0.112 0.400 0.380 0.108
#> GSM1105495     2  0.5013     0.5091 0.000 0.700 0.192 0.000 0.108
#> GSM1105498     3  0.6978     0.2630 0.000 0.108 0.524 0.300 0.068
#> GSM1105499     1  0.0000     0.8469 1.000 0.000 0.000 0.000 0.000
#> GSM1105506     3  0.6500     0.2318 0.000 0.000 0.408 0.404 0.188
#> GSM1105442     2  0.6172     0.6643 0.000 0.628 0.068 0.064 0.240
#> GSM1105511     3  0.6519     0.2312 0.000 0.000 0.408 0.400 0.192
#> GSM1105514     5  0.2424     0.7721 0.000 0.132 0.000 0.000 0.868
#> GSM1105518     2  0.4597     0.1497 0.000 0.564 0.424 0.000 0.012
#> GSM1105522     4  0.5799     0.2226 0.324 0.000 0.112 0.564 0.000
#> GSM1105534     1  0.0000     0.8469 1.000 0.000 0.000 0.000 0.000
#> GSM1105535     1  0.0000     0.8469 1.000 0.000 0.000 0.000 0.000
#> GSM1105538     1  0.4210     0.3054 0.588 0.000 0.000 0.412 0.000
#> GSM1105542     5  0.2992     0.7160 0.000 0.000 0.068 0.064 0.868
#> GSM1105443     2  0.2127     0.8627 0.000 0.892 0.000 0.000 0.108
#> GSM1105551     1  0.1331     0.8177 0.952 0.040 0.008 0.000 0.000
#> GSM1105554     1  0.0000     0.8469 1.000 0.000 0.000 0.000 0.000
#> GSM1105555     1  0.0324     0.8443 0.992 0.000 0.004 0.004 0.000
#> GSM1105447     2  0.2424     0.8601 0.000 0.868 0.000 0.000 0.132
#> GSM1105467     5  0.2179     0.7811 0.000 0.112 0.000 0.000 0.888
#> GSM1105470     5  0.2127     0.7817 0.000 0.108 0.000 0.000 0.892
#> GSM1105471     5  0.2608     0.7850 0.000 0.088 0.020 0.004 0.888
#> GSM1105474     5  0.2127     0.7817 0.000 0.108 0.000 0.000 0.892
#> GSM1105475     5  0.2448     0.7699 0.000 0.020 0.088 0.000 0.892
#> GSM1105440     1  0.0000     0.8469 1.000 0.000 0.000 0.000 0.000
#> GSM1105488     5  0.5248     0.5846 0.000 0.128 0.068 0.064 0.740
#> GSM1105489     1  0.1357     0.8146 0.948 0.048 0.004 0.000 0.000
#> GSM1105492     1  0.4210     0.3054 0.588 0.000 0.000 0.412 0.000
#> GSM1105493     1  0.0000     0.8469 1.000 0.000 0.000 0.000 0.000
#> GSM1105497     2  0.5331     0.5669 0.000 0.736 0.080 0.064 0.120
#> GSM1105500     4  0.5505    -0.2876 0.000 0.004 0.412 0.528 0.056
#> GSM1105501     4  0.6121    -0.3082 0.000 0.000 0.408 0.464 0.128
#> GSM1105508     1  0.4150     0.3653 0.612 0.000 0.000 0.388 0.000
#> GSM1105444     2  0.2127     0.8627 0.000 0.892 0.000 0.000 0.108
#> GSM1105513     3  0.6861     0.2730 0.000 0.176 0.408 0.400 0.016
#> GSM1105516     4  0.1124     0.2809 0.036 0.000 0.000 0.960 0.004
#> GSM1105520     3  0.4177     0.2008 0.000 0.116 0.804 0.020 0.060
#> GSM1105524     1  0.0000     0.8469 1.000 0.000 0.000 0.000 0.000
#> GSM1105536     5  0.2519     0.7540 0.000 0.000 0.016 0.100 0.884
#> GSM1105537     1  0.0000     0.8469 1.000 0.000 0.000 0.000 0.000
#> GSM1105540     4  0.6164     0.3662 0.000 0.000 0.328 0.520 0.152
#> GSM1105544     4  0.5598     0.2059 0.000 0.000 0.076 0.524 0.400
#> GSM1105445     2  0.2424     0.8601 0.000 0.868 0.000 0.000 0.132
#> GSM1105553     2  0.4738     0.1482 0.000 0.564 0.420 0.004 0.012
#> GSM1105556     1  0.0000     0.8469 1.000 0.000 0.000 0.000 0.000
#> GSM1105557     3  0.7189     0.2712 0.000 0.136 0.408 0.404 0.052
#> GSM1105449     2  0.2424     0.8601 0.000 0.868 0.000 0.000 0.132
#> GSM1105469     5  0.4450     0.3039 0.000 0.000 0.004 0.488 0.508
#> GSM1105472     5  0.2127     0.7817 0.000 0.108 0.000 0.000 0.892
#> GSM1105473     4  0.6777     0.4011 0.196 0.000 0.288 0.500 0.016
#> GSM1105476     5  0.2127     0.7817 0.000 0.108 0.000 0.000 0.892
#> GSM1105477     5  0.3707     0.6662 0.000 0.000 0.000 0.284 0.716
#> GSM1105478     5  0.4538     0.3566 0.000 0.004 0.428 0.004 0.564
#> GSM1105510     5  0.4686     0.7063 0.000 0.160 0.000 0.104 0.736
#> GSM1105530     3  0.4305    -0.4069 0.000 0.000 0.512 0.488 0.000
#> GSM1105539     3  0.6024    -0.0798 0.364 0.000 0.512 0.124 0.000
#> GSM1105480     5  0.4504     0.3557 0.000 0.000 0.428 0.008 0.564
#> GSM1105512     1  0.2424     0.7400 0.868 0.000 0.000 0.132 0.000
#> GSM1105532     3  0.4307    -0.4155 0.000 0.000 0.500 0.500 0.000
#> GSM1105541     1  0.3562     0.6759 0.788 0.000 0.196 0.016 0.000
#> GSM1105439     2  0.2813     0.8312 0.000 0.832 0.000 0.000 0.168
#> GSM1105463     3  0.7237    -0.2726 0.000 0.108 0.484 0.324 0.084
#> GSM1105482     1  0.0000     0.8469 1.000 0.000 0.000 0.000 0.000
#> GSM1105483     5  0.4305     0.3096 0.000 0.000 0.000 0.488 0.512
#> GSM1105494     5  0.6583     0.1095 0.000 0.112 0.420 0.024 0.444
#> GSM1105503     3  0.3048     0.2170 0.000 0.176 0.820 0.004 0.000
#> GSM1105507     4  0.1117     0.2699 0.020 0.000 0.016 0.964 0.000
#> GSM1105446     2  0.2179     0.8626 0.000 0.888 0.000 0.000 0.112
#> GSM1105519     1  0.4307     0.0837 0.504 0.000 0.000 0.496 0.000
#> GSM1105526     5  0.2732     0.7392 0.000 0.000 0.000 0.160 0.840
#> GSM1105527     5  0.5826     0.2767 0.000 0.000 0.096 0.404 0.500
#> GSM1105531     4  0.6100     0.3255 0.000 0.108 0.416 0.472 0.004
#> GSM1105543     5  0.2329     0.7762 0.000 0.124 0.000 0.000 0.876
#> GSM1105546     1  0.0000     0.8469 1.000 0.000 0.000 0.000 0.000
#> GSM1105547     1  0.0000     0.8469 1.000 0.000 0.000 0.000 0.000
#> GSM1105455     2  0.2848     0.8410 0.000 0.840 0.004 0.000 0.156
#> GSM1105458     2  0.2424     0.8601 0.000 0.868 0.000 0.000 0.132
#> GSM1105459     2  0.2929     0.8207 0.000 0.820 0.000 0.000 0.180
#> GSM1105462     5  0.5861     0.2105 0.000 0.000 0.376 0.104 0.520
#> GSM1105441     2  0.2127     0.8627 0.000 0.892 0.000 0.000 0.108
#> GSM1105465     5  0.3965     0.6947 0.000 0.032 0.076 0.064 0.828
#> GSM1105484     5  0.0162     0.7721 0.000 0.004 0.000 0.000 0.996
#> GSM1105485     5  0.3056     0.7158 0.000 0.000 0.068 0.068 0.864
#> GSM1105496     3  0.4428     0.2303 0.000 0.160 0.756 0.084 0.000
#> GSM1105505     4  0.5865     0.3249 0.000 0.108 0.360 0.532 0.000
#> GSM1105509     4  0.1851     0.2983 0.088 0.000 0.000 0.912 0.000
#> GSM1105448     2  0.2179     0.8626 0.000 0.888 0.000 0.000 0.112
#> GSM1105521     1  0.4307     0.0837 0.504 0.000 0.000 0.496 0.000
#> GSM1105528     5  0.0963     0.7669 0.000 0.000 0.000 0.036 0.964
#> GSM1105529     5  0.1704     0.7471 0.000 0.004 0.068 0.000 0.928
#> GSM1105533     1  0.0290     0.8438 0.992 0.000 0.008 0.000 0.000
#> GSM1105545     5  0.2677     0.7506 0.000 0.000 0.016 0.112 0.872
#> GSM1105548     1  0.6301     0.1066 0.468 0.108 0.012 0.412 0.000
#> GSM1105549     1  0.0000     0.8469 1.000 0.000 0.000 0.000 0.000
#> GSM1105457     3  0.6957     0.2685 0.000 0.220 0.408 0.360 0.012
#> GSM1105460     2  0.2424     0.8601 0.000 0.868 0.000 0.000 0.132
#> GSM1105461     2  0.2891     0.8230 0.000 0.824 0.000 0.000 0.176
#> GSM1105464     3  0.6282    -0.1088 0.340 0.000 0.496 0.164 0.000
#> GSM1105466     5  0.2540     0.7625 0.000 0.000 0.088 0.024 0.888
#> GSM1105479     5  0.2540     0.7697 0.000 0.024 0.088 0.000 0.888
#> GSM1105502     1  0.4490     0.6202 0.724 0.000 0.224 0.052 0.000
#> GSM1105515     1  0.0000     0.8469 1.000 0.000 0.000 0.000 0.000
#> GSM1105523     4  0.4294     0.3692 0.000 0.000 0.468 0.532 0.000
#> GSM1105550     4  0.6234     0.3574 0.008 0.000 0.404 0.476 0.112
#> GSM1105450     5  0.2179     0.7804 0.000 0.112 0.000 0.000 0.888
#> GSM1105451     2  0.2179     0.8626 0.000 0.888 0.000 0.000 0.112
#> GSM1105454     2  0.0703     0.7512 0.000 0.976 0.024 0.000 0.000
#> GSM1105468     5  0.2127     0.7817 0.000 0.108 0.000 0.000 0.892
#> GSM1105481     3  0.7007    -0.0401 0.000 0.192 0.416 0.020 0.372
#> GSM1105504     3  0.4305    -0.4069 0.000 0.000 0.512 0.488 0.000
#> GSM1105517     4  0.5778     0.4268 0.128 0.000 0.280 0.592 0.000
#> GSM1105525     4  0.5447     0.4085 0.064 0.000 0.400 0.536 0.000
#> GSM1105552     4  0.6391     0.3852 0.100 0.020 0.408 0.472 0.000
#> GSM1105452     5  0.2236     0.7385 0.000 0.000 0.068 0.024 0.908
#> GSM1105453     2  0.2179     0.8626 0.000 0.888 0.000 0.000 0.112
#> GSM1105456     2  0.1043     0.7431 0.000 0.960 0.040 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
#> GSM1105438     2  0.1327      0.869 0.000 0.936 0.000 0.000 0.000 0.064
#> GSM1105486     6  0.0260      0.829 0.000 0.008 0.000 0.000 0.000 0.992
#> GSM1105487     1  0.1265      0.852 0.948 0.000 0.008 0.000 0.044 0.000
#> GSM1105490     4  0.0000      0.740 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1105491     5  0.3288      0.369 0.000 0.000 0.276 0.000 0.724 0.000
#> GSM1105495     5  0.3789      0.366 0.000 0.260 0.024 0.000 0.716 0.000
#> GSM1105498     4  0.2848      0.692 0.000 0.000 0.008 0.816 0.176 0.000
#> GSM1105499     1  0.0000      0.871 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM1105506     4  0.0000      0.740 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1105442     5  0.5573      0.413 0.000 0.288 0.000 0.000 0.536 0.176
#> GSM1105511     4  0.0000      0.740 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1105514     6  0.2664      0.647 0.000 0.184 0.000 0.000 0.000 0.816
#> GSM1105518     4  0.5377      0.541 0.000 0.216 0.004 0.604 0.176 0.000
#> GSM1105522     3  0.3534      0.604 0.000 0.000 0.716 0.008 0.276 0.000
#> GSM1105534     1  0.0000      0.871 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM1105535     1  0.0458      0.867 0.984 0.000 0.000 0.000 0.016 0.000
#> GSM1105538     3  0.3828      0.428 0.440 0.000 0.560 0.000 0.000 0.000
#> GSM1105542     5  0.4111      0.572 0.000 0.004 0.004 0.000 0.536 0.456
#> GSM1105443     2  0.0146      0.891 0.000 0.996 0.000 0.000 0.000 0.004
#> GSM1105551     1  0.1814      0.810 0.900 0.000 0.000 0.000 0.100 0.000
#> GSM1105554     1  0.0000      0.871 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM1105555     1  0.0405      0.866 0.988 0.000 0.008 0.000 0.004 0.000
#> GSM1105447     2  0.2597      0.779 0.000 0.824 0.000 0.000 0.000 0.176
#> GSM1105467     6  0.0260      0.829 0.000 0.008 0.000 0.000 0.000 0.992
#> GSM1105470     6  0.0260      0.829 0.000 0.008 0.000 0.000 0.000 0.992
#> GSM1105471     6  0.0260      0.829 0.000 0.008 0.000 0.000 0.000 0.992
#> GSM1105474     6  0.0260      0.829 0.000 0.008 0.000 0.000 0.000 0.992
#> GSM1105475     6  0.0260      0.827 0.000 0.000 0.000 0.008 0.000 0.992
#> GSM1105440     1  0.0547      0.865 0.980 0.000 0.000 0.000 0.020 0.000
#> GSM1105488     5  0.3854      0.567 0.000 0.000 0.000 0.000 0.536 0.464
#> GSM1105489     1  0.1387      0.823 0.932 0.000 0.000 0.000 0.068 0.000
#> GSM1105492     3  0.4051      0.433 0.432 0.000 0.560 0.000 0.008 0.000
#> GSM1105493     1  0.0000      0.871 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM1105497     5  0.3468      0.343 0.000 0.284 0.004 0.000 0.712 0.000
#> GSM1105500     4  0.0260      0.737 0.000 0.000 0.000 0.992 0.008 0.000
#> GSM1105501     4  0.0000      0.740 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1105508     1  0.4593      0.395 0.576 0.000 0.000 0.380 0.044 0.000
#> GSM1105444     2  0.0000      0.890 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1105513     4  0.0000      0.740 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1105516     3  0.4849      0.459 0.028 0.000 0.560 0.396 0.008 0.008
#> GSM1105520     4  0.5449      0.551 0.000 0.000 0.240 0.572 0.188 0.000
#> GSM1105524     1  0.1007      0.856 0.956 0.000 0.000 0.000 0.044 0.000
#> GSM1105536     6  0.0146      0.827 0.000 0.000 0.000 0.004 0.000 0.996
#> GSM1105537     1  0.1007      0.856 0.956 0.000 0.000 0.000 0.044 0.000
#> GSM1105540     3  0.3141      0.505 0.000 0.000 0.788 0.000 0.012 0.200
#> GSM1105544     3  0.4395      0.250 0.000 0.000 0.568 0.028 0.000 0.404
#> GSM1105445     2  0.2597      0.779 0.000 0.824 0.000 0.000 0.000 0.176
#> GSM1105553     4  0.5265      0.539 0.000 0.220 0.000 0.604 0.176 0.000
#> GSM1105556     1  0.0000      0.871 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM1105557     4  0.0000      0.740 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1105449     2  0.2597      0.779 0.000 0.824 0.000 0.000 0.000 0.176
#> GSM1105469     6  0.4379      0.380 0.000 0.000 0.000 0.396 0.028 0.576
#> GSM1105472     6  0.0260      0.829 0.000 0.008 0.000 0.000 0.000 0.992
#> GSM1105473     3  0.3043      0.635 0.200 0.000 0.792 0.000 0.000 0.008
#> GSM1105476     6  0.0260      0.829 0.000 0.008 0.000 0.000 0.000 0.992
#> GSM1105477     6  0.2212      0.738 0.000 0.000 0.000 0.112 0.008 0.880
#> GSM1105478     4  0.3747      0.315 0.000 0.000 0.000 0.604 0.000 0.396
#> GSM1105510     6  0.3147      0.606 0.000 0.160 0.000 0.016 0.008 0.816
#> GSM1105530     3  0.3266      0.603 0.000 0.000 0.728 0.000 0.272 0.000
#> GSM1105539     1  0.5787      0.331 0.504 0.000 0.252 0.000 0.244 0.000
#> GSM1105480     4  0.3747      0.315 0.000 0.000 0.000 0.604 0.000 0.396
#> GSM1105512     1  0.3076      0.493 0.760 0.000 0.240 0.000 0.000 0.000
#> GSM1105532     3  0.3244      0.603 0.000 0.000 0.732 0.000 0.268 0.000
#> GSM1105541     1  0.5565      0.396 0.552 0.000 0.208 0.000 0.240 0.000
#> GSM1105439     2  0.0547      0.889 0.000 0.980 0.000 0.000 0.000 0.020
#> GSM1105463     5  0.3371      0.356 0.000 0.000 0.292 0.000 0.708 0.000
#> GSM1105482     1  0.0000      0.871 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM1105483     6  0.3747      0.412 0.000 0.000 0.000 0.396 0.000 0.604
#> GSM1105494     4  0.5265      0.509 0.000 0.000 0.000 0.604 0.176 0.220
#> GSM1105503     4  0.5265      0.577 0.000 0.000 0.220 0.604 0.176 0.000
#> GSM1105507     3  0.4743      0.453 0.000 0.000 0.560 0.396 0.036 0.008
#> GSM1105446     2  0.0000      0.890 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1105519     3  0.4051      0.440 0.432 0.000 0.560 0.000 0.000 0.008
#> GSM1105526     6  0.1075      0.802 0.000 0.000 0.000 0.048 0.000 0.952
#> GSM1105527     6  0.4093      0.397 0.000 0.000 0.000 0.404 0.012 0.584
#> GSM1105531     3  0.2996      0.556 0.000 0.000 0.772 0.000 0.228 0.000
#> GSM1105543     6  0.1765      0.757 0.000 0.096 0.000 0.000 0.000 0.904
#> GSM1105546     1  0.0000      0.871 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM1105547     1  0.0000      0.871 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM1105455     2  0.0717      0.886 0.000 0.976 0.000 0.008 0.000 0.016
#> GSM1105458     2  0.2597      0.779 0.000 0.824 0.000 0.000 0.000 0.176
#> GSM1105459     2  0.0790      0.884 0.000 0.968 0.000 0.000 0.000 0.032
#> GSM1105462     6  0.3266      0.505 0.000 0.000 0.272 0.000 0.000 0.728
#> GSM1105441     2  0.0146      0.891 0.000 0.996 0.000 0.000 0.000 0.004
#> GSM1105465     5  0.4195      0.577 0.000 0.004 0.008 0.000 0.548 0.440
#> GSM1105484     6  0.0260      0.825 0.000 0.000 0.000 0.000 0.008 0.992
#> GSM1105485     5  0.3854      0.567 0.000 0.000 0.000 0.000 0.536 0.464
#> GSM1105496     4  0.5395      0.565 0.000 0.000 0.220 0.584 0.196 0.000
#> GSM1105505     3  0.3152      0.555 0.000 0.000 0.792 0.004 0.196 0.008
#> GSM1105509     3  0.5239      0.491 0.060 0.000 0.560 0.364 0.008 0.008
#> GSM1105448     2  0.0000      0.890 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1105521     3  0.4051      0.440 0.432 0.000 0.560 0.000 0.000 0.008
#> GSM1105528     6  0.0458      0.821 0.000 0.000 0.000 0.000 0.016 0.984
#> GSM1105529     5  0.3860      0.556 0.000 0.000 0.000 0.000 0.528 0.472
#> GSM1105533     1  0.0260      0.869 0.992 0.000 0.008 0.000 0.000 0.000
#> GSM1105545     6  0.0458      0.822 0.000 0.000 0.000 0.016 0.000 0.984
#> GSM1105548     3  0.5464      0.560 0.260 0.000 0.564 0.000 0.176 0.000
#> GSM1105549     1  0.0000      0.871 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM1105457     4  0.0458      0.737 0.000 0.016 0.000 0.984 0.000 0.000
#> GSM1105460     2  0.2597      0.779 0.000 0.824 0.000 0.000 0.000 0.176
#> GSM1105461     2  0.0632      0.885 0.000 0.976 0.000 0.000 0.000 0.024
#> GSM1105464     3  0.4748     -0.189 0.448 0.000 0.504 0.000 0.048 0.000
#> GSM1105466     6  0.0260      0.827 0.000 0.000 0.000 0.008 0.000 0.992
#> GSM1105479     6  0.0260      0.827 0.000 0.000 0.000 0.008 0.000 0.992
#> GSM1105502     1  0.5963      0.235 0.452 0.000 0.276 0.000 0.272 0.000
#> GSM1105515     1  0.0000      0.871 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM1105523     3  0.3076      0.616 0.000 0.000 0.760 0.000 0.240 0.000
#> GSM1105550     3  0.3691      0.547 0.024 0.000 0.796 0.004 0.020 0.156
#> GSM1105450     6  0.0632      0.822 0.000 0.024 0.000 0.000 0.000 0.976
#> GSM1105451     2  0.0000      0.890 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1105454     2  0.2597      0.763 0.000 0.824 0.000 0.000 0.176 0.000
#> GSM1105468     6  0.0260      0.829 0.000 0.008 0.000 0.000 0.000 0.992
#> GSM1105481     6  0.5702      0.261 0.000 0.008 0.244 0.000 0.188 0.560
#> GSM1105504     3  0.1219      0.612 0.000 0.000 0.948 0.000 0.048 0.004
#> GSM1105517     3  0.3784      0.647 0.124 0.000 0.792 0.076 0.000 0.008
#> GSM1105525     3  0.3288      0.605 0.000 0.000 0.724 0.000 0.276 0.000
#> GSM1105552     3  0.3645      0.634 0.144 0.000 0.796 0.000 0.052 0.008
#> GSM1105452     5  0.3989      0.560 0.000 0.004 0.000 0.000 0.528 0.468
#> GSM1105453     2  0.0000      0.890 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1105456     2  0.2848      0.757 0.000 0.816 0.008 0.000 0.176 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) other(p) time(p) individual(p) k
#> MAD:pam 114   1.0000  0.44991   0.593      1.07e-02 2
#> MAD:pam  89   0.2614  0.76005   0.764      4.25e-02 3
#> MAD:pam 104   0.2579  0.01048   0.885      3.01e-04 4
#> MAD:pam  71   0.1885  0.91734   0.976      2.43e-03 5
#> MAD:pam  95   0.0664  0.00232   0.303      8.05e-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.


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 44956 rows and 120 columns.
#>   Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'MAD' method.
#>   Subgroups are detected by 'mclust' method.
#>   Performed in total 1250 partitions by row resampling.
#>   Best k for subgroups seems to be 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-mclust-collect-plots

The plots are:

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

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

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

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

select_partition_number(res)

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

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

get_stats(res)
#>   k 1-PAC mean_silhouette concordance area_increased  Rand Jaccard
#> 2 2 0.471           0.754       0.700         0.3329 0.507   0.507
#> 3 3 0.586           0.717       0.843         0.7912 0.716   0.539
#> 4 4 0.764           0.843       0.877         0.1792 0.812   0.599
#> 5 5 0.779           0.831       0.898         0.0652 0.890   0.668
#> 6 6 0.744           0.688       0.830         0.0752 0.870   0.535

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
#> GSM1105438     2  0.9970      0.814 0.468 0.532
#> GSM1105486     2  0.0000      0.393 0.000 1.000
#> GSM1105487     1  0.0000      0.914 1.000 0.000
#> GSM1105490     2  0.9983      0.820 0.476 0.524
#> GSM1105491     2  0.9996      0.814 0.488 0.512
#> GSM1105495     2  0.9996      0.814 0.488 0.512
#> GSM1105498     2  0.9996      0.814 0.488 0.512
#> GSM1105499     1  0.0000      0.914 1.000 0.000
#> GSM1105506     2  0.9996      0.814 0.488 0.512
#> GSM1105442     2  0.9996      0.814 0.488 0.512
#> GSM1105511     2  0.9996      0.814 0.488 0.512
#> GSM1105514     2  0.9795      0.755 0.416 0.584
#> GSM1105518     2  0.9996      0.814 0.488 0.512
#> GSM1105522     1  0.0000      0.914 1.000 0.000
#> GSM1105534     1  0.0000      0.914 1.000 0.000
#> GSM1105535     1  0.0000      0.914 1.000 0.000
#> GSM1105538     1  0.0000      0.914 1.000 0.000
#> GSM1105542     2  0.9983      0.820 0.476 0.524
#> GSM1105443     2  0.9983      0.820 0.476 0.524
#> GSM1105551     1  0.0000      0.914 1.000 0.000
#> GSM1105554     1  0.0000      0.914 1.000 0.000
#> GSM1105555     1  0.0000      0.914 1.000 0.000
#> GSM1105447     2  0.9983      0.820 0.476 0.524
#> GSM1105467     2  0.4939      0.446 0.108 0.892
#> GSM1105470     2  0.0376      0.395 0.004 0.996
#> GSM1105471     2  0.9996      0.814 0.488 0.512
#> GSM1105474     2  0.0000      0.393 0.000 1.000
#> GSM1105475     2  0.9954      0.806 0.460 0.540
#> GSM1105440     1  0.0000      0.914 1.000 0.000
#> GSM1105488     2  0.9983      0.820 0.476 0.524
#> GSM1105489     1  0.0000      0.914 1.000 0.000
#> GSM1105492     1  0.0000      0.914 1.000 0.000
#> GSM1105493     1  0.0000      0.914 1.000 0.000
#> GSM1105497     2  0.9996      0.814 0.488 0.512
#> GSM1105500     2  0.9996      0.814 0.488 0.512
#> GSM1105501     2  0.9983      0.820 0.476 0.524
#> GSM1105508     1  0.0000      0.914 1.000 0.000
#> GSM1105444     2  0.9983      0.820 0.476 0.524
#> GSM1105513     2  0.9983      0.820 0.476 0.524
#> GSM1105516     2  0.9996      0.814 0.488 0.512
#> GSM1105520     1  0.9983     -0.742 0.524 0.476
#> GSM1105524     1  0.0000      0.914 1.000 0.000
#> GSM1105536     2  0.9983      0.820 0.476 0.524
#> GSM1105537     1  0.0000      0.914 1.000 0.000
#> GSM1105540     1  0.1414      0.886 0.980 0.020
#> GSM1105544     2  0.9996      0.814 0.488 0.512
#> GSM1105445     2  0.9996      0.814 0.488 0.512
#> GSM1105553     2  0.9996      0.814 0.488 0.512
#> GSM1105556     1  0.0000      0.914 1.000 0.000
#> GSM1105557     2  0.9983      0.820 0.476 0.524
#> GSM1105449     2  0.9983      0.820 0.476 0.524
#> GSM1105469     1  0.4690      0.738 0.900 0.100
#> GSM1105472     2  0.0000      0.393 0.000 1.000
#> GSM1105473     1  0.0000      0.914 1.000 0.000
#> GSM1105476     2  0.9933      0.797 0.452 0.548
#> GSM1105477     2  0.9983      0.820 0.476 0.524
#> GSM1105478     2  0.9996      0.814 0.488 0.512
#> GSM1105510     2  0.9983      0.820 0.476 0.524
#> GSM1105530     1  0.0000      0.914 1.000 0.000
#> GSM1105539     1  0.0000      0.914 1.000 0.000
#> GSM1105480     2  0.9996      0.814 0.488 0.512
#> GSM1105512     1  0.0000      0.914 1.000 0.000
#> GSM1105532     1  0.0000      0.914 1.000 0.000
#> GSM1105541     1  0.0000      0.914 1.000 0.000
#> GSM1105439     2  0.9983      0.820 0.476 0.524
#> GSM1105463     1  0.0000      0.914 1.000 0.000
#> GSM1105482     1  0.0000      0.914 1.000 0.000
#> GSM1105483     2  0.9996      0.814 0.488 0.512
#> GSM1105494     2  0.9996      0.814 0.488 0.512
#> GSM1105503     1  0.9635     -0.469 0.612 0.388
#> GSM1105507     1  0.0000      0.914 1.000 0.000
#> GSM1105446     2  0.9815      0.761 0.420 0.580
#> GSM1105519     1  0.0000      0.914 1.000 0.000
#> GSM1105526     2  0.9983      0.820 0.476 0.524
#> GSM1105527     2  0.9996      0.814 0.488 0.512
#> GSM1105531     1  0.0376      0.909 0.996 0.004
#> GSM1105543     2  0.9754      0.746 0.408 0.592
#> GSM1105546     1  0.0000      0.914 1.000 0.000
#> GSM1105547     1  0.0000      0.914 1.000 0.000
#> GSM1105455     2  0.9983      0.820 0.476 0.524
#> GSM1105458     2  0.9996      0.814 0.488 0.512
#> GSM1105459     2  0.0000      0.393 0.000 1.000
#> GSM1105462     1  0.9635     -0.469 0.612 0.388
#> GSM1105441     2  0.9977      0.817 0.472 0.528
#> GSM1105465     2  0.9996      0.814 0.488 0.512
#> GSM1105484     2  0.9983      0.820 0.476 0.524
#> GSM1105485     2  0.9996      0.814 0.488 0.512
#> GSM1105496     1  0.9635     -0.469 0.612 0.388
#> GSM1105505     1  0.6048      0.612 0.852 0.148
#> GSM1105509     1  0.0000      0.914 1.000 0.000
#> GSM1105448     2  0.9833      0.765 0.424 0.576
#> GSM1105521     1  0.0000      0.914 1.000 0.000
#> GSM1105528     2  0.9983      0.820 0.476 0.524
#> GSM1105529     2  0.9983      0.820 0.476 0.524
#> GSM1105533     1  0.0000      0.914 1.000 0.000
#> GSM1105545     2  0.9983      0.820 0.476 0.524
#> GSM1105548     1  0.0000      0.914 1.000 0.000
#> GSM1105549     1  0.0000      0.914 1.000 0.000
#> GSM1105457     2  0.9983      0.820 0.476 0.524
#> GSM1105460     2  0.9983      0.820 0.476 0.524
#> GSM1105461     2  0.0000      0.393 0.000 1.000
#> GSM1105464     1  0.0000      0.914 1.000 0.000
#> GSM1105466     2  0.9996      0.814 0.488 0.512
#> GSM1105479     2  0.9983      0.820 0.476 0.524
#> GSM1105502     1  0.0000      0.914 1.000 0.000
#> GSM1105515     1  0.0000      0.914 1.000 0.000
#> GSM1105523     1  0.0000      0.914 1.000 0.000
#> GSM1105550     1  0.9460     -0.375 0.636 0.364
#> GSM1105450     2  0.0000      0.393 0.000 1.000
#> GSM1105451     2  0.0000      0.393 0.000 1.000
#> GSM1105454     2  0.9996      0.814 0.488 0.512
#> GSM1105468     2  0.0000      0.393 0.000 1.000
#> GSM1105481     2  0.9996      0.814 0.488 0.512
#> GSM1105504     1  0.2236      0.860 0.964 0.036
#> GSM1105517     1  0.0000      0.914 1.000 0.000
#> GSM1105525     1  0.0000      0.914 1.000 0.000
#> GSM1105552     1  0.0000      0.914 1.000 0.000
#> GSM1105452     2  0.9983      0.820 0.476 0.524
#> GSM1105453     2  0.0000      0.393 0.000 1.000
#> GSM1105456     2  0.9996      0.814 0.488 0.512

show/hide code output

cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#>            class entropy silhouette    p1    p2    p3
#> GSM1105438     2  0.6302    -0.6801 0.000 0.520 0.480
#> GSM1105486     3  0.6079     0.9724 0.000 0.388 0.612
#> GSM1105487     1  0.0237     0.9799 0.996 0.000 0.004
#> GSM1105490     2  0.0000     0.6914 0.000 1.000 0.000
#> GSM1105491     2  0.6307     0.4750 0.000 0.512 0.488
#> GSM1105495     2  0.6302     0.4829 0.000 0.520 0.480
#> GSM1105498     2  0.3619     0.6578 0.000 0.864 0.136
#> GSM1105499     1  0.0000     0.9805 1.000 0.000 0.000
#> GSM1105506     2  0.0000     0.6914 0.000 1.000 0.000
#> GSM1105442     2  0.4346     0.5969 0.000 0.816 0.184
#> GSM1105511     2  0.0000     0.6914 0.000 1.000 0.000
#> GSM1105514     3  0.5785     0.9024 0.000 0.332 0.668
#> GSM1105518     2  0.5138     0.6023 0.000 0.748 0.252
#> GSM1105522     1  0.0000     0.9805 1.000 0.000 0.000
#> GSM1105534     1  0.0000     0.9805 1.000 0.000 0.000
#> GSM1105535     1  0.0000     0.9805 1.000 0.000 0.000
#> GSM1105538     1  0.0000     0.9805 1.000 0.000 0.000
#> GSM1105542     2  0.4121     0.5923 0.000 0.832 0.168
#> GSM1105443     2  0.0000     0.6914 0.000 1.000 0.000
#> GSM1105551     1  0.0237     0.9799 0.996 0.000 0.004
#> GSM1105554     1  0.0000     0.9805 1.000 0.000 0.000
#> GSM1105555     1  0.0237     0.9799 0.996 0.000 0.004
#> GSM1105447     2  0.0237     0.6913 0.000 0.996 0.004
#> GSM1105467     2  0.4974     0.3284 0.000 0.764 0.236
#> GSM1105470     3  0.6062     0.9772 0.000 0.384 0.616
#> GSM1105471     2  0.4605     0.6276 0.000 0.796 0.204
#> GSM1105474     3  0.6062     0.9772 0.000 0.384 0.616
#> GSM1105475     2  0.2448     0.6229 0.000 0.924 0.076
#> GSM1105440     1  0.0000     0.9805 1.000 0.000 0.000
#> GSM1105488     2  0.4121     0.5923 0.000 0.832 0.168
#> GSM1105489     1  0.0237     0.9799 0.996 0.000 0.004
#> GSM1105492     1  0.0000     0.9805 1.000 0.000 0.000
#> GSM1105493     1  0.0237     0.9799 0.996 0.000 0.004
#> GSM1105497     2  0.5465     0.5627 0.000 0.712 0.288
#> GSM1105500     2  0.0000     0.6914 0.000 1.000 0.000
#> GSM1105501     2  0.0000     0.6914 0.000 1.000 0.000
#> GSM1105508     1  0.0000     0.9805 1.000 0.000 0.000
#> GSM1105444     2  0.4887     0.4912 0.000 0.772 0.228
#> GSM1105513     2  0.0000     0.6914 0.000 1.000 0.000
#> GSM1105516     2  0.4047     0.5978 0.148 0.848 0.004
#> GSM1105520     2  0.5733     0.5589 0.000 0.676 0.324
#> GSM1105524     1  0.0000     0.9805 1.000 0.000 0.000
#> GSM1105536     2  0.1964     0.6581 0.000 0.944 0.056
#> GSM1105537     1  0.0000     0.9805 1.000 0.000 0.000
#> GSM1105540     2  0.6295     0.2519 0.472 0.528 0.000
#> GSM1105544     2  0.0000     0.6914 0.000 1.000 0.000
#> GSM1105445     2  0.4504     0.6317 0.000 0.804 0.196
#> GSM1105553     2  0.5733     0.5589 0.000 0.676 0.324
#> GSM1105556     1  0.0000     0.9805 1.000 0.000 0.000
#> GSM1105557     2  0.0000     0.6914 0.000 1.000 0.000
#> GSM1105449     2  0.3816     0.5551 0.000 0.852 0.148
#> GSM1105469     2  0.4555     0.5702 0.200 0.800 0.000
#> GSM1105472     3  0.6045     0.9727 0.000 0.380 0.620
#> GSM1105473     1  0.3918     0.7922 0.856 0.140 0.004
#> GSM1105476     2  0.4178     0.5168 0.000 0.828 0.172
#> GSM1105477     2  0.2537     0.6384 0.000 0.920 0.080
#> GSM1105478     2  0.0000     0.6914 0.000 1.000 0.000
#> GSM1105510     2  0.4121     0.5923 0.000 0.832 0.168
#> GSM1105530     1  0.0237     0.9799 0.996 0.000 0.004
#> GSM1105539     1  0.0237     0.9799 0.996 0.000 0.004
#> GSM1105480     2  0.0000     0.6914 0.000 1.000 0.000
#> GSM1105512     1  0.0000     0.9805 1.000 0.000 0.000
#> GSM1105532     1  0.0237     0.9799 0.996 0.000 0.004
#> GSM1105541     1  0.0237     0.9799 0.996 0.000 0.004
#> GSM1105439     2  0.0747     0.6795 0.000 0.984 0.016
#> GSM1105463     2  0.9355     0.4286 0.188 0.492 0.320
#> GSM1105482     1  0.0000     0.9805 1.000 0.000 0.000
#> GSM1105483     2  0.0000     0.6914 0.000 1.000 0.000
#> GSM1105494     2  0.0000     0.6914 0.000 1.000 0.000
#> GSM1105503     2  0.5733     0.5589 0.000 0.676 0.324
#> GSM1105507     1  0.5810     0.3692 0.664 0.336 0.000
#> GSM1105446     2  0.5988    -0.0417 0.000 0.632 0.368
#> GSM1105519     1  0.0000     0.9805 1.000 0.000 0.000
#> GSM1105526     2  0.0000     0.6914 0.000 1.000 0.000
#> GSM1105527     2  0.0000     0.6914 0.000 1.000 0.000
#> GSM1105531     2  0.9142     0.4529 0.164 0.512 0.324
#> GSM1105543     3  0.6225     0.8598 0.000 0.432 0.568
#> GSM1105546     1  0.0000     0.9805 1.000 0.000 0.000
#> GSM1105547     1  0.0000     0.9805 1.000 0.000 0.000
#> GSM1105455     2  0.1860     0.6438 0.000 0.948 0.052
#> GSM1105458     2  0.0237     0.6913 0.000 0.996 0.004
#> GSM1105459     3  0.6062     0.9772 0.000 0.384 0.616
#> GSM1105462     2  0.4654     0.6255 0.000 0.792 0.208
#> GSM1105441     3  0.6154     0.9464 0.000 0.408 0.592
#> GSM1105465     2  0.6307     0.4750 0.000 0.512 0.488
#> GSM1105484     2  0.4121     0.5923 0.000 0.832 0.168
#> GSM1105485     2  0.4121     0.5923 0.000 0.832 0.168
#> GSM1105496     2  0.5733     0.5589 0.000 0.676 0.324
#> GSM1105505     2  0.7820     0.5193 0.072 0.604 0.324
#> GSM1105509     1  0.0000     0.9805 1.000 0.000 0.000
#> GSM1105448     2  0.6305    -0.5318 0.000 0.516 0.484
#> GSM1105521     1  0.0000     0.9805 1.000 0.000 0.000
#> GSM1105528     2  0.4121     0.5923 0.000 0.832 0.168
#> GSM1105529     2  0.4121     0.5923 0.000 0.832 0.168
#> GSM1105533     1  0.0237     0.9799 0.996 0.000 0.004
#> GSM1105545     2  0.0000     0.6914 0.000 1.000 0.000
#> GSM1105548     1  0.0237     0.9799 0.996 0.000 0.004
#> GSM1105549     1  0.0237     0.9799 0.996 0.000 0.004
#> GSM1105457     2  0.0000     0.6914 0.000 1.000 0.000
#> GSM1105460     2  0.0000     0.6914 0.000 1.000 0.000
#> GSM1105461     3  0.6062     0.9772 0.000 0.384 0.616
#> GSM1105464     1  0.0237     0.9799 0.996 0.000 0.004
#> GSM1105466     2  0.0000     0.6914 0.000 1.000 0.000
#> GSM1105479     2  0.0000     0.6914 0.000 1.000 0.000
#> GSM1105502     1  0.0237     0.9799 0.996 0.000 0.004
#> GSM1105515     1  0.0000     0.9805 1.000 0.000 0.000
#> GSM1105523     2  0.6373     0.3709 0.408 0.588 0.004
#> GSM1105550     2  0.4750     0.5553 0.216 0.784 0.000
#> GSM1105450     3  0.6062     0.9772 0.000 0.384 0.616
#> GSM1105451     3  0.6062     0.9772 0.000 0.384 0.616
#> GSM1105454     2  0.5733     0.5589 0.000 0.676 0.324
#> GSM1105468     3  0.6062     0.9772 0.000 0.384 0.616
#> GSM1105481     2  0.5733     0.5589 0.000 0.676 0.324
#> GSM1105504     2  0.9142     0.4529 0.164 0.512 0.324
#> GSM1105517     2  0.6307     0.2127 0.488 0.512 0.000
#> GSM1105525     1  0.0829     0.9669 0.984 0.012 0.004
#> GSM1105552     2  0.6520     0.2069 0.488 0.508 0.004
#> GSM1105452     2  0.4121     0.5923 0.000 0.832 0.168
#> GSM1105453     3  0.6062     0.9772 0.000 0.384 0.616
#> GSM1105456     2  0.5733     0.5589 0.000 0.676 0.324

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>            class entropy silhouette    p1    p2    p3    p4
#> GSM1105438     2  0.5727      0.941 0.000 0.692 0.080 0.228
#> GSM1105486     2  0.5664      0.946 0.000 0.696 0.076 0.228
#> GSM1105487     1  0.0376      0.972 0.992 0.004 0.000 0.004
#> GSM1105490     3  0.0000      0.805 0.000 0.000 1.000 0.000
#> GSM1105491     4  0.3978      0.736 0.000 0.192 0.012 0.796
#> GSM1105495     3  0.6548      0.685 0.000 0.304 0.592 0.104
#> GSM1105498     3  0.4152      0.782 0.000 0.160 0.808 0.032
#> GSM1105499     1  0.0000      0.972 1.000 0.000 0.000 0.000
#> GSM1105506     3  0.0000      0.805 0.000 0.000 1.000 0.000
#> GSM1105442     4  0.0657      0.902 0.000 0.004 0.012 0.984
#> GSM1105511     3  0.0000      0.805 0.000 0.000 1.000 0.000
#> GSM1105514     2  0.5664      0.946 0.000 0.696 0.076 0.228
#> GSM1105518     3  0.5636      0.733 0.000 0.260 0.680 0.060
#> GSM1105522     1  0.0000      0.972 1.000 0.000 0.000 0.000
#> GSM1105534     1  0.0336      0.971 0.992 0.000 0.000 0.008
#> GSM1105535     1  0.0000      0.972 1.000 0.000 0.000 0.000
#> GSM1105538     1  0.0336      0.971 0.992 0.000 0.000 0.008
#> GSM1105542     4  0.0469      0.904 0.000 0.000 0.012 0.988
#> GSM1105443     3  0.0921      0.801 0.000 0.000 0.972 0.028
#> GSM1105551     1  0.0376      0.972 0.992 0.004 0.000 0.004
#> GSM1105554     1  0.0336      0.971 0.992 0.000 0.000 0.008
#> GSM1105555     1  0.0376      0.972 0.992 0.004 0.000 0.004
#> GSM1105447     3  0.4356      0.643 0.000 0.000 0.708 0.292
#> GSM1105467     2  0.7325      0.687 0.000 0.532 0.236 0.232
#> GSM1105470     2  0.5664      0.946 0.000 0.696 0.076 0.228
#> GSM1105471     3  0.5072      0.758 0.000 0.208 0.740 0.052
#> GSM1105474     2  0.5664      0.946 0.000 0.696 0.076 0.228
#> GSM1105475     3  0.3710      0.688 0.000 0.004 0.804 0.192
#> GSM1105440     1  0.0000      0.972 1.000 0.000 0.000 0.000
#> GSM1105488     4  0.0469      0.904 0.000 0.000 0.012 0.988
#> GSM1105489     1  0.0188      0.972 0.996 0.004 0.000 0.000
#> GSM1105492     1  0.0188      0.972 0.996 0.000 0.000 0.004
#> GSM1105493     1  0.0524      0.969 0.988 0.004 0.008 0.000
#> GSM1105497     4  0.2101      0.862 0.000 0.060 0.012 0.928
#> GSM1105500     3  0.2469      0.791 0.000 0.000 0.892 0.108
#> GSM1105501     3  0.0000      0.805 0.000 0.000 1.000 0.000
#> GSM1105508     1  0.0188      0.972 0.996 0.000 0.004 0.000
#> GSM1105444     2  0.7060      0.568 0.000 0.496 0.128 0.376
#> GSM1105513     3  0.0188      0.806 0.000 0.000 0.996 0.004
#> GSM1105516     3  0.2345      0.793 0.000 0.000 0.900 0.100
#> GSM1105520     3  0.6497      0.687 0.000 0.304 0.596 0.100
#> GSM1105524     1  0.0000      0.972 1.000 0.000 0.000 0.000
#> GSM1105536     3  0.2081      0.797 0.000 0.000 0.916 0.084
#> GSM1105537     1  0.0000      0.972 1.000 0.000 0.000 0.000
#> GSM1105540     3  0.5201      0.449 0.400 0.004 0.592 0.004
#> GSM1105544     3  0.2593      0.792 0.000 0.004 0.892 0.104
#> GSM1105445     3  0.4361      0.767 0.000 0.208 0.772 0.020
#> GSM1105553     3  0.6548      0.685 0.000 0.304 0.592 0.104
#> GSM1105556     1  0.0336      0.971 0.992 0.000 0.000 0.008
#> GSM1105557     3  0.0000      0.805 0.000 0.000 1.000 0.000
#> GSM1105449     3  0.7061      0.332 0.000 0.148 0.540 0.312
#> GSM1105469     3  0.0188      0.805 0.004 0.000 0.996 0.000
#> GSM1105472     2  0.5664      0.946 0.000 0.696 0.076 0.228
#> GSM1105473     1  0.0657      0.965 0.984 0.004 0.012 0.000
#> GSM1105476     2  0.5848      0.929 0.000 0.684 0.088 0.228
#> GSM1105477     3  0.4008      0.700 0.000 0.000 0.756 0.244
#> GSM1105478     3  0.0376      0.807 0.000 0.004 0.992 0.004
#> GSM1105510     4  0.2704      0.749 0.000 0.000 0.124 0.876
#> GSM1105530     1  0.0376      0.972 0.992 0.004 0.000 0.004
#> GSM1105539     1  0.0376      0.972 0.992 0.004 0.000 0.004
#> GSM1105480     3  0.0000      0.805 0.000 0.000 1.000 0.000
#> GSM1105512     1  0.0000      0.972 1.000 0.000 0.000 0.000
#> GSM1105532     1  0.0376      0.972 0.992 0.004 0.000 0.004
#> GSM1105541     1  0.0376      0.972 0.992 0.004 0.000 0.004
#> GSM1105439     3  0.0188      0.805 0.000 0.004 0.996 0.000
#> GSM1105463     1  0.6356      0.494 0.636 0.284 0.012 0.068
#> GSM1105482     1  0.0524      0.971 0.988 0.004 0.000 0.008
#> GSM1105483     3  0.0000      0.805 0.000 0.000 1.000 0.000
#> GSM1105494     3  0.0376      0.807 0.000 0.004 0.992 0.004
#> GSM1105503     3  0.6280      0.695 0.000 0.304 0.612 0.084
#> GSM1105507     1  0.3569      0.753 0.804 0.000 0.196 0.000
#> GSM1105446     2  0.6442      0.625 0.000 0.492 0.068 0.440
#> GSM1105519     1  0.0000      0.972 1.000 0.000 0.000 0.000
#> GSM1105526     3  0.1474      0.801 0.000 0.000 0.948 0.052
#> GSM1105527     3  0.0000      0.805 0.000 0.000 1.000 0.000
#> GSM1105531     3  0.6971      0.674 0.012 0.304 0.580 0.104
#> GSM1105543     2  0.5664      0.946 0.000 0.696 0.076 0.228
#> GSM1105546     1  0.0188      0.972 0.996 0.000 0.000 0.004
#> GSM1105547     1  0.0524      0.971 0.988 0.004 0.000 0.008
#> GSM1105455     3  0.2944      0.745 0.000 0.004 0.868 0.128
#> GSM1105458     3  0.5923      0.735 0.000 0.176 0.696 0.128
#> GSM1105459     2  0.5664      0.946 0.000 0.696 0.076 0.228
#> GSM1105462     3  0.6164      0.721 0.000 0.240 0.656 0.104
#> GSM1105441     2  0.5664      0.946 0.000 0.696 0.076 0.228
#> GSM1105465     4  0.3937      0.738 0.000 0.188 0.012 0.800
#> GSM1105484     4  0.0469      0.904 0.000 0.000 0.012 0.988
#> GSM1105485     4  0.0592      0.903 0.000 0.000 0.016 0.984
#> GSM1105496     3  0.6548      0.685 0.000 0.304 0.592 0.104
#> GSM1105505     3  0.6548      0.685 0.000 0.304 0.592 0.104
#> GSM1105509     1  0.0336      0.970 0.992 0.000 0.008 0.000
#> GSM1105448     2  0.5520      0.922 0.000 0.696 0.060 0.244
#> GSM1105521     1  0.0000      0.972 1.000 0.000 0.000 0.000
#> GSM1105528     4  0.0817      0.896 0.000 0.000 0.024 0.976
#> GSM1105529     4  0.0817      0.896 0.000 0.000 0.024 0.976
#> GSM1105533     1  0.0376      0.972 0.992 0.004 0.000 0.004
#> GSM1105545     3  0.0000      0.805 0.000 0.000 1.000 0.000
#> GSM1105548     1  0.0524      0.969 0.988 0.004 0.008 0.000
#> GSM1105549     1  0.2441      0.894 0.916 0.004 0.012 0.068
#> GSM1105457     3  0.0188      0.806 0.000 0.000 0.996 0.004
#> GSM1105460     3  0.0336      0.806 0.000 0.000 0.992 0.008
#> GSM1105461     2  0.5664      0.946 0.000 0.696 0.076 0.228
#> GSM1105464     1  0.0376      0.971 0.992 0.004 0.004 0.000
#> GSM1105466     3  0.0000      0.805 0.000 0.000 1.000 0.000
#> GSM1105479     3  0.0376      0.807 0.000 0.004 0.992 0.004
#> GSM1105502     1  0.0376      0.972 0.992 0.004 0.000 0.004
#> GSM1105515     1  0.0336      0.971 0.992 0.000 0.000 0.008
#> GSM1105523     3  0.5201      0.449 0.400 0.004 0.592 0.004
#> GSM1105550     3  0.3892      0.690 0.192 0.004 0.800 0.004
#> GSM1105450     2  0.5664      0.946 0.000 0.696 0.076 0.228
#> GSM1105451     2  0.5664      0.946 0.000 0.696 0.076 0.228
#> GSM1105454     3  0.6548      0.685 0.000 0.304 0.592 0.104
#> GSM1105468     2  0.5664      0.946 0.000 0.696 0.076 0.228
#> GSM1105481     3  0.6548      0.685 0.000 0.304 0.592 0.104
#> GSM1105504     3  0.6548      0.685 0.000 0.304 0.592 0.104
#> GSM1105517     1  0.0657      0.965 0.984 0.004 0.012 0.000
#> GSM1105525     1  0.1305      0.940 0.960 0.004 0.036 0.000
#> GSM1105552     1  0.3052      0.847 0.880 0.004 0.012 0.104
#> GSM1105452     4  0.0592      0.903 0.000 0.000 0.016 0.984
#> GSM1105453     2  0.5664      0.946 0.000 0.696 0.076 0.228
#> GSM1105456     3  0.6548      0.685 0.000 0.304 0.592 0.104

show/hide code output

cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#>            class entropy silhouette    p1    p2    p3    p4    p5
#> GSM1105438     2  0.1743     0.8975 0.000 0.940 0.028 0.028 0.004
#> GSM1105486     2  0.0290     0.9430 0.000 0.992 0.000 0.008 0.000
#> GSM1105487     1  0.2027     0.9139 0.928 0.008 0.024 0.000 0.040
#> GSM1105490     4  0.0000     0.8175 0.000 0.000 0.000 1.000 0.000
#> GSM1105491     5  0.1725     0.8956 0.000 0.000 0.044 0.020 0.936
#> GSM1105495     3  0.0703     0.8375 0.000 0.000 0.976 0.024 0.000
#> GSM1105498     4  0.3857     0.6678 0.000 0.000 0.312 0.688 0.000
#> GSM1105499     1  0.0000     0.9194 1.000 0.000 0.000 0.000 0.000
#> GSM1105506     4  0.0000     0.8175 0.000 0.000 0.000 1.000 0.000
#> GSM1105442     5  0.1799     0.9066 0.000 0.012 0.028 0.020 0.940
#> GSM1105511     4  0.2020     0.8343 0.000 0.000 0.100 0.900 0.000
#> GSM1105514     2  0.0290     0.9430 0.000 0.992 0.000 0.008 0.000
#> GSM1105518     3  0.4262    -0.0634 0.000 0.000 0.560 0.440 0.000
#> GSM1105522     1  0.0404     0.9201 0.988 0.000 0.000 0.012 0.000
#> GSM1105534     1  0.0162     0.9189 0.996 0.000 0.004 0.000 0.000
#> GSM1105535     1  0.0000     0.9194 1.000 0.000 0.000 0.000 0.000
#> GSM1105538     1  0.0000     0.9194 1.000 0.000 0.000 0.000 0.000
#> GSM1105542     5  0.1668     0.9071 0.000 0.032 0.028 0.000 0.940
#> GSM1105443     4  0.3351     0.7427 0.000 0.132 0.028 0.836 0.004
#> GSM1105551     1  0.2027     0.9139 0.928 0.008 0.024 0.000 0.040
#> GSM1105554     1  0.0000     0.9194 1.000 0.000 0.000 0.000 0.000
#> GSM1105555     1  0.2027     0.9139 0.928 0.008 0.024 0.000 0.040
#> GSM1105447     4  0.5684     0.6714 0.000 0.156 0.196 0.644 0.004
#> GSM1105467     2  0.4209     0.6544 0.000 0.744 0.028 0.224 0.004
#> GSM1105470     2  0.0290     0.9430 0.000 0.992 0.000 0.008 0.000
#> GSM1105471     4  0.4114     0.3219 0.000 0.000 0.376 0.624 0.000
#> GSM1105474     2  0.0290     0.9430 0.000 0.992 0.000 0.008 0.000
#> GSM1105475     4  0.3305     0.6720 0.000 0.224 0.000 0.776 0.000
#> GSM1105440     1  0.0000     0.9194 1.000 0.000 0.000 0.000 0.000
#> GSM1105488     5  0.2124     0.9137 0.000 0.056 0.028 0.000 0.916
#> GSM1105489     1  0.2036     0.9142 0.928 0.008 0.028 0.000 0.036
#> GSM1105492     1  0.0000     0.9194 1.000 0.000 0.000 0.000 0.000
#> GSM1105493     1  0.2253     0.9058 0.924 0.008 0.036 0.020 0.012
#> GSM1105497     5  0.1648     0.8989 0.000 0.000 0.040 0.020 0.940
#> GSM1105500     4  0.3196     0.7866 0.000 0.000 0.192 0.804 0.004
#> GSM1105501     4  0.2020     0.8343 0.000 0.000 0.100 0.900 0.000
#> GSM1105508     1  0.0609     0.9189 0.980 0.000 0.000 0.020 0.000
#> GSM1105444     2  0.1743     0.8975 0.000 0.940 0.028 0.028 0.004
#> GSM1105513     4  0.1106     0.8208 0.000 0.012 0.024 0.964 0.000
#> GSM1105516     1  0.5253     0.5963 0.676 0.000 0.124 0.200 0.000
#> GSM1105520     3  0.2690     0.7132 0.000 0.000 0.844 0.156 0.000
#> GSM1105524     1  0.0000     0.9194 1.000 0.000 0.000 0.000 0.000
#> GSM1105536     4  0.2719     0.8156 0.000 0.004 0.144 0.852 0.000
#> GSM1105537     1  0.0000     0.9194 1.000 0.000 0.000 0.000 0.000
#> GSM1105540     1  0.4028     0.7381 0.776 0.000 0.176 0.048 0.000
#> GSM1105544     4  0.4238     0.7429 0.052 0.000 0.192 0.756 0.000
#> GSM1105445     4  0.4171     0.4916 0.000 0.000 0.396 0.604 0.000
#> GSM1105553     3  0.0703     0.8375 0.000 0.000 0.976 0.024 0.000
#> GSM1105556     1  0.0162     0.9189 0.996 0.000 0.004 0.000 0.000
#> GSM1105557     4  0.0000     0.8175 0.000 0.000 0.000 1.000 0.000
#> GSM1105449     2  0.3110     0.8162 0.000 0.856 0.028 0.112 0.004
#> GSM1105469     4  0.2798     0.8140 0.008 0.000 0.140 0.852 0.000
#> GSM1105472     2  0.0290     0.9430 0.000 0.992 0.000 0.008 0.000
#> GSM1105473     1  0.2171     0.9061 0.928 0.008 0.032 0.020 0.012
#> GSM1105476     2  0.2074     0.8536 0.000 0.896 0.000 0.104 0.000
#> GSM1105477     4  0.4373     0.7804 0.000 0.080 0.160 0.760 0.000
#> GSM1105478     4  0.1478     0.8323 0.000 0.000 0.064 0.936 0.000
#> GSM1105510     5  0.4044     0.8807 0.000 0.140 0.028 0.028 0.804
#> GSM1105530     1  0.2027     0.9139 0.928 0.008 0.024 0.000 0.040
#> GSM1105539     1  0.2027     0.9139 0.928 0.008 0.024 0.000 0.040
#> GSM1105480     4  0.1908     0.8350 0.000 0.000 0.092 0.908 0.000
#> GSM1105512     1  0.0000     0.9194 1.000 0.000 0.000 0.000 0.000
#> GSM1105532     1  0.2027     0.9139 0.928 0.008 0.024 0.000 0.040
#> GSM1105541     1  0.2027     0.9139 0.928 0.008 0.024 0.000 0.040
#> GSM1105439     4  0.1043     0.8113 0.000 0.040 0.000 0.960 0.000
#> GSM1105463     1  0.5468     0.5260 0.628 0.008 0.312 0.016 0.036
#> GSM1105482     1  0.1012     0.9182 0.968 0.000 0.012 0.020 0.000
#> GSM1105483     4  0.2074     0.8332 0.000 0.000 0.104 0.896 0.000
#> GSM1105494     4  0.2230     0.8320 0.000 0.000 0.116 0.884 0.000
#> GSM1105503     3  0.0703     0.8375 0.000 0.000 0.976 0.024 0.000
#> GSM1105507     1  0.2966     0.7831 0.816 0.000 0.000 0.184 0.000
#> GSM1105446     2  0.3421     0.7000 0.000 0.788 0.000 0.008 0.204
#> GSM1105519     1  0.0510     0.9196 0.984 0.000 0.000 0.016 0.000
#> GSM1105526     4  0.2329     0.8255 0.000 0.000 0.124 0.876 0.000
#> GSM1105527     4  0.1965     0.8348 0.000 0.000 0.096 0.904 0.000
#> GSM1105531     3  0.1498     0.8225 0.000 0.008 0.952 0.024 0.016
#> GSM1105543     2  0.0290     0.9430 0.000 0.992 0.000 0.008 0.000
#> GSM1105546     1  0.0000     0.9194 1.000 0.000 0.000 0.000 0.000
#> GSM1105547     1  0.1399     0.9110 0.952 0.000 0.028 0.020 0.000
#> GSM1105455     4  0.2773     0.7225 0.000 0.164 0.000 0.836 0.000
#> GSM1105458     4  0.4692     0.6387 0.000 0.024 0.320 0.652 0.004
#> GSM1105459     2  0.0290     0.9430 0.000 0.992 0.000 0.008 0.000
#> GSM1105462     3  0.6940     0.2434 0.320 0.008 0.416 0.256 0.000
#> GSM1105441     2  0.0960     0.9297 0.000 0.972 0.008 0.016 0.004
#> GSM1105465     5  0.1648     0.8989 0.000 0.000 0.040 0.020 0.940
#> GSM1105484     5  0.3387     0.9102 0.000 0.100 0.028 0.020 0.852
#> GSM1105485     5  0.2722     0.9180 0.000 0.056 0.028 0.020 0.896
#> GSM1105496     3  0.0703     0.8375 0.000 0.000 0.976 0.024 0.000
#> GSM1105505     3  0.3995     0.6735 0.152 0.008 0.804 0.024 0.012
#> GSM1105509     1  0.0609     0.9189 0.980 0.000 0.000 0.020 0.000
#> GSM1105448     2  0.0451     0.9409 0.000 0.988 0.000 0.008 0.004
#> GSM1105521     1  0.0000     0.9194 1.000 0.000 0.000 0.000 0.000
#> GSM1105528     5  0.4087     0.8769 0.000 0.144 0.028 0.028 0.800
#> GSM1105529     5  0.3824     0.8940 0.000 0.128 0.028 0.024 0.820
#> GSM1105533     1  0.2027     0.9139 0.928 0.008 0.024 0.000 0.040
#> GSM1105545     4  0.2020     0.8343 0.000 0.000 0.100 0.900 0.000
#> GSM1105548     1  0.2058     0.9070 0.932 0.008 0.032 0.020 0.008
#> GSM1105549     1  0.1568     0.9081 0.944 0.000 0.036 0.020 0.000
#> GSM1105457     4  0.0000     0.8175 0.000 0.000 0.000 1.000 0.000
#> GSM1105460     4  0.1943     0.8060 0.000 0.056 0.020 0.924 0.000
#> GSM1105461     2  0.0290     0.9430 0.000 0.992 0.000 0.008 0.000
#> GSM1105464     1  0.2141     0.9148 0.928 0.008 0.020 0.008 0.036
#> GSM1105466     4  0.0000     0.8175 0.000 0.000 0.000 1.000 0.000
#> GSM1105479     4  0.3007     0.7687 0.000 0.104 0.028 0.864 0.004
#> GSM1105502     1  0.2027     0.9139 0.928 0.008 0.024 0.000 0.040
#> GSM1105515     1  0.0162     0.9189 0.996 0.000 0.004 0.000 0.000
#> GSM1105523     1  0.4584     0.7379 0.760 0.008 0.184 0.024 0.024
#> GSM1105550     4  0.4571     0.7314 0.076 0.000 0.188 0.736 0.000
#> GSM1105450     2  0.0290     0.9430 0.000 0.992 0.000 0.008 0.000
#> GSM1105451     2  0.0290     0.9430 0.000 0.992 0.000 0.008 0.000
#> GSM1105454     3  0.0703     0.8375 0.000 0.000 0.976 0.024 0.000
#> GSM1105468     2  0.0290     0.9430 0.000 0.992 0.000 0.008 0.000
#> GSM1105481     3  0.0703     0.8375 0.000 0.000 0.976 0.024 0.000
#> GSM1105504     1  0.5497     0.3392 0.564 0.008 0.388 0.024 0.016
#> GSM1105517     1  0.2813     0.8358 0.868 0.000 0.108 0.024 0.000
#> GSM1105525     1  0.3788     0.8400 0.836 0.008 0.104 0.016 0.036
#> GSM1105552     1  0.3539     0.8348 0.844 0.008 0.112 0.024 0.012
#> GSM1105452     5  0.3283     0.8857 0.000 0.140 0.028 0.000 0.832
#> GSM1105453     2  0.0290     0.9430 0.000 0.992 0.000 0.008 0.000
#> GSM1105456     3  0.0703     0.8375 0.000 0.000 0.976 0.024 0.000

show/hide code output

cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#>            class entropy silhouette    p1    p2    p3    p4    p5    p6
#> GSM1105438     2  0.0260    0.93548 0.000 0.992 0.000 0.000 0.008 0.000
#> GSM1105486     2  0.0000    0.93741 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1105487     3  0.1010    0.64662 0.036 0.000 0.960 0.000 0.000 0.004
#> GSM1105490     4  0.0000    0.78144 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1105491     5  0.0508    0.95329 0.000 0.000 0.004 0.000 0.984 0.012
#> GSM1105495     6  0.0405    0.80808 0.000 0.000 0.008 0.000 0.004 0.988
#> GSM1105498     4  0.3023    0.67124 0.000 0.000 0.004 0.784 0.000 0.212
#> GSM1105499     3  0.3468    0.42230 0.284 0.000 0.712 0.004 0.000 0.000
#> GSM1105506     4  0.0000    0.78144 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1105442     5  0.0508    0.95329 0.000 0.000 0.004 0.000 0.984 0.012
#> GSM1105511     4  0.0865    0.78061 0.036 0.000 0.000 0.964 0.000 0.000
#> GSM1105514     2  0.0146    0.93660 0.000 0.996 0.000 0.000 0.004 0.000
#> GSM1105518     6  0.3988    0.29917 0.012 0.000 0.004 0.324 0.000 0.660
#> GSM1105522     3  0.3240    0.47274 0.244 0.000 0.752 0.004 0.000 0.000
#> GSM1105534     1  0.3126    0.82095 0.752 0.000 0.248 0.000 0.000 0.000
#> GSM1105535     3  0.3448    0.42504 0.280 0.000 0.716 0.000 0.000 0.004
#> GSM1105538     1  0.3175    0.81983 0.744 0.000 0.256 0.000 0.000 0.000
#> GSM1105542     5  0.0146    0.95323 0.000 0.004 0.000 0.000 0.996 0.000
#> GSM1105443     4  0.3795    0.33285 0.000 0.364 0.000 0.632 0.000 0.004
#> GSM1105551     3  0.0146    0.66221 0.000 0.000 0.996 0.000 0.000 0.004
#> GSM1105554     1  0.3126    0.82095 0.752 0.000 0.248 0.000 0.000 0.000
#> GSM1105555     3  0.0520    0.66124 0.008 0.000 0.984 0.000 0.000 0.008
#> GSM1105447     2  0.5909    0.34447 0.012 0.536 0.004 0.292 0.000 0.156
#> GSM1105467     2  0.0790    0.91850 0.000 0.968 0.000 0.032 0.000 0.000
#> GSM1105470     2  0.0146    0.93626 0.000 0.996 0.000 0.004 0.000 0.000
#> GSM1105471     4  0.4226    0.32500 0.012 0.000 0.004 0.580 0.000 0.404
#> GSM1105474     2  0.0000    0.93741 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1105475     2  0.3221    0.67762 0.000 0.736 0.000 0.264 0.000 0.000
#> GSM1105440     3  0.3468    0.42230 0.284 0.000 0.712 0.004 0.000 0.000
#> GSM1105488     5  0.0146    0.95323 0.000 0.004 0.000 0.000 0.996 0.000
#> GSM1105489     3  0.4264   -0.45272 0.488 0.000 0.496 0.000 0.000 0.016
#> GSM1105492     1  0.3851    0.44861 0.540 0.000 0.460 0.000 0.000 0.000
#> GSM1105493     1  0.4293    0.51745 0.536 0.000 0.448 0.000 0.004 0.012
#> GSM1105497     5  0.0508    0.95329 0.000 0.000 0.004 0.000 0.984 0.012
#> GSM1105500     4  0.3319    0.71807 0.036 0.000 0.164 0.800 0.000 0.000
#> GSM1105501     4  0.2520    0.75949 0.152 0.000 0.000 0.844 0.000 0.004
#> GSM1105508     3  0.3448    0.42880 0.280 0.000 0.716 0.004 0.000 0.000
#> GSM1105444     2  0.0665    0.92774 0.000 0.980 0.004 0.000 0.008 0.008
#> GSM1105513     4  0.0146    0.78073 0.000 0.000 0.000 0.996 0.000 0.004
#> GSM1105516     4  0.3892    0.64712 0.048 0.000 0.212 0.740 0.000 0.000
#> GSM1105520     6  0.1265    0.78025 0.000 0.000 0.008 0.044 0.000 0.948
#> GSM1105524     3  0.3448    0.42504 0.280 0.000 0.716 0.000 0.000 0.004
#> GSM1105536     4  0.2933    0.74298 0.200 0.000 0.000 0.796 0.000 0.004
#> GSM1105537     3  0.3448    0.42504 0.280 0.000 0.716 0.000 0.000 0.004
#> GSM1105540     4  0.4132    0.63983 0.044 0.000 0.220 0.728 0.000 0.008
#> GSM1105544     4  0.3562    0.70782 0.036 0.000 0.176 0.784 0.000 0.004
#> GSM1105445     4  0.4009    0.40740 0.008 0.000 0.004 0.632 0.000 0.356
#> GSM1105553     6  0.0405    0.80808 0.000 0.000 0.008 0.000 0.004 0.988
#> GSM1105556     1  0.3126    0.82095 0.752 0.000 0.248 0.000 0.000 0.000
#> GSM1105557     4  0.0000    0.78144 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1105449     2  0.1129    0.91863 0.008 0.964 0.004 0.012 0.000 0.012
#> GSM1105469     4  0.3202    0.71080 0.024 0.000 0.176 0.800 0.000 0.000
#> GSM1105472     2  0.0000    0.93741 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1105473     1  0.4310    0.46202 0.512 0.000 0.472 0.000 0.004 0.012
#> GSM1105476     2  0.0790    0.91955 0.000 0.968 0.000 0.032 0.000 0.000
#> GSM1105477     4  0.3074    0.74240 0.200 0.004 0.000 0.792 0.000 0.004
#> GSM1105478     4  0.0603    0.77832 0.000 0.000 0.004 0.980 0.000 0.016
#> GSM1105510     5  0.0551    0.95516 0.000 0.004 0.004 0.000 0.984 0.008
#> GSM1105530     3  0.0405    0.66158 0.008 0.000 0.988 0.004 0.000 0.000
#> GSM1105539     3  0.0520    0.66124 0.008 0.000 0.984 0.000 0.000 0.008
#> GSM1105480     4  0.0146    0.78181 0.004 0.000 0.000 0.996 0.000 0.000
#> GSM1105512     1  0.3221    0.81488 0.736 0.000 0.264 0.000 0.000 0.000
#> GSM1105532     3  0.0405    0.66158 0.008 0.000 0.988 0.004 0.000 0.000
#> GSM1105541     3  0.1124    0.65574 0.036 0.000 0.956 0.000 0.000 0.008
#> GSM1105439     4  0.3351    0.50363 0.000 0.288 0.000 0.712 0.000 0.000
#> GSM1105463     3  0.4095   -0.00722 0.008 0.000 0.512 0.000 0.000 0.480
#> GSM1105482     1  0.3265    0.81990 0.748 0.000 0.248 0.000 0.004 0.000
#> GSM1105483     4  0.1492    0.78148 0.036 0.000 0.024 0.940 0.000 0.000
#> GSM1105494     4  0.1668    0.75927 0.008 0.000 0.004 0.928 0.000 0.060
#> GSM1105503     6  0.0363    0.80710 0.000 0.000 0.012 0.000 0.000 0.988
#> GSM1105507     4  0.4634    0.28788 0.044 0.000 0.400 0.556 0.000 0.000
#> GSM1105446     2  0.1075    0.90608 0.000 0.952 0.000 0.000 0.048 0.000
#> GSM1105519     1  0.3672    0.66737 0.632 0.000 0.368 0.000 0.000 0.000
#> GSM1105526     4  0.2933    0.74298 0.200 0.000 0.000 0.796 0.000 0.004
#> GSM1105527     4  0.0146    0.78181 0.004 0.000 0.000 0.996 0.000 0.000
#> GSM1105531     6  0.3050    0.64800 0.000 0.000 0.236 0.000 0.000 0.764
#> GSM1105543     2  0.0146    0.93660 0.000 0.996 0.000 0.000 0.004 0.000
#> GSM1105546     1  0.3221    0.81501 0.736 0.000 0.264 0.000 0.000 0.000
#> GSM1105547     1  0.3265    0.81990 0.748 0.000 0.248 0.000 0.004 0.000
#> GSM1105455     2  0.3499    0.59431 0.000 0.680 0.000 0.320 0.000 0.000
#> GSM1105458     6  0.6048    0.16633 0.012 0.360 0.004 0.152 0.000 0.472
#> GSM1105459     2  0.0000    0.93741 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1105462     4  0.6407    0.19652 0.016 0.000 0.316 0.404 0.000 0.264
#> GSM1105441     2  0.0146    0.93626 0.000 0.996 0.000 0.004 0.000 0.000
#> GSM1105465     5  0.0508    0.95329 0.000 0.000 0.004 0.000 0.984 0.012
#> GSM1105484     5  0.0551    0.95516 0.000 0.004 0.004 0.000 0.984 0.008
#> GSM1105485     5  0.0146    0.95323 0.000 0.004 0.000 0.000 0.996 0.000
#> GSM1105496     6  0.0405    0.80808 0.000 0.000 0.008 0.000 0.004 0.988
#> GSM1105505     6  0.3198    0.61160 0.000 0.000 0.260 0.000 0.000 0.740
#> GSM1105509     1  0.3998    0.33696 0.504 0.000 0.492 0.004 0.000 0.000
#> GSM1105448     2  0.0146    0.93660 0.000 0.996 0.000 0.000 0.004 0.000
#> GSM1105521     1  0.3175    0.81983 0.744 0.000 0.256 0.000 0.000 0.000
#> GSM1105528     5  0.2871    0.74992 0.000 0.192 0.000 0.000 0.804 0.004
#> GSM1105529     5  0.0146    0.95323 0.000 0.004 0.000 0.000 0.996 0.000
#> GSM1105533     3  0.0520    0.66124 0.008 0.000 0.984 0.000 0.000 0.008
#> GSM1105545     4  0.2933    0.74298 0.200 0.000 0.000 0.796 0.000 0.004
#> GSM1105548     1  0.4289    0.52462 0.540 0.000 0.444 0.000 0.004 0.012
#> GSM1105549     1  0.5574    0.63946 0.584 0.000 0.256 0.000 0.148 0.012
#> GSM1105457     4  0.0000    0.78144 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1105460     4  0.2462    0.70102 0.000 0.132 0.004 0.860 0.000 0.004
#> GSM1105461     2  0.0000    0.93741 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1105464     3  0.2982    0.45313 0.164 0.000 0.820 0.004 0.000 0.012
#> GSM1105466     4  0.0000    0.78144 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1105479     4  0.4336    0.61560 0.012 0.064 0.004 0.744 0.000 0.176
#> GSM1105502     3  0.1010    0.64662 0.036 0.000 0.960 0.000 0.000 0.004
#> GSM1105515     1  0.3126    0.82095 0.752 0.000 0.248 0.000 0.000 0.000
#> GSM1105523     3  0.3667    0.36369 0.008 0.000 0.740 0.240 0.000 0.012
#> GSM1105550     4  0.3604    0.71252 0.036 0.000 0.168 0.788 0.000 0.008
#> GSM1105450     2  0.0000    0.93741 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1105451     2  0.0000    0.93741 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1105454     6  0.0405    0.80808 0.000 0.000 0.008 0.000 0.004 0.988
#> GSM1105468     2  0.0000    0.93741 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1105481     6  0.0405    0.80808 0.000 0.000 0.008 0.000 0.004 0.988
#> GSM1105504     6  0.3851    0.12310 0.000 0.000 0.460 0.000 0.000 0.540
#> GSM1105517     4  0.5719    0.30821 0.248 0.000 0.232 0.520 0.000 0.000
#> GSM1105525     3  0.0767    0.65721 0.008 0.000 0.976 0.004 0.000 0.012
#> GSM1105552     3  0.4524   -0.40053 0.452 0.000 0.520 0.000 0.004 0.024
#> GSM1105452     5  0.1863    0.86218 0.000 0.104 0.000 0.000 0.896 0.000
#> GSM1105453     2  0.0000    0.93741 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1105456     6  0.0405    0.80808 0.000 0.000 0.008 0.000 0.004 0.988

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) other(p) time(p) individual(p) k
#> MAD:mclust 104    0.951   0.2767   0.808       0.02051 2
#> MAD:mclust 104    0.276   0.5956   0.628       0.01442 3
#> MAD:mclust 116    0.838   0.8813   0.496       0.01823 4
#> MAD:mclust 115    0.582   0.8363   0.504       0.00628 5
#> MAD:mclust  95    0.504   0.0932   0.673       0.00575 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 44956 rows and 120 columns.
#>   Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'MAD' method.
#>   Subgroups are detected by 'NMF' method.
#>   Performed in total 1250 partitions by row resampling.
#>   Best k for subgroups seems to be 2.
#> 
#> Following methods can be applied to this 'ConsensusPartition' object:
#>  [1] "cola_report"             "collect_classes"         "collect_plots"          
#>  [4] "collect_stats"           "colnames"                "compare_signatures"     
#>  [7] "consensus_heatmap"       "dimension_reduction"     "functional_enrichment"  
#> [10] "get_anno_col"            "get_anno"                "get_classes"            
#> [13] "get_consensus"           "get_matrix"              "get_membership"         
#> [16] "get_param"               "get_signatures"          "get_stats"              
#> [19] "is_best_k"               "is_stable_k"             "membership_heatmap"     
#> [22] "ncol"                    "nrow"                    "plot_ecdf"              
#> [25] "rownames"                "select_partition_number" "show"                   
#> [28] "suggest_best_k"          "test_to_known_factors"

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

collect_plots(res)

plot of chunk MAD-NMF-collect-plots

The plots are:

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

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

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

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

select_partition_number(res)

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

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

get_stats(res)
#>   k 1-PAC mean_silhouette concordance area_increased  Rand Jaccard
#> 2 2 0.914           0.939       0.973         0.4950 0.510   0.510
#> 3 3 0.543           0.629       0.810         0.3092 0.788   0.603
#> 4 4 0.753           0.773       0.899         0.1001 0.873   0.665
#> 5 5 0.600           0.596       0.779         0.0869 0.835   0.516
#> 6 6 0.561           0.411       0.656         0.0503 0.881   0.563

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
#> GSM1105438     2  0.0000      0.959 0.000 1.000
#> GSM1105486     2  0.0000      0.959 0.000 1.000
#> GSM1105487     1  0.0000      0.989 1.000 0.000
#> GSM1105490     2  0.0000      0.959 0.000 1.000
#> GSM1105491     2  0.6623      0.800 0.172 0.828
#> GSM1105495     2  0.6973      0.780 0.188 0.812
#> GSM1105498     2  0.8207      0.686 0.256 0.744
#> GSM1105499     1  0.0000      0.989 1.000 0.000
#> GSM1105506     2  0.0000      0.959 0.000 1.000
#> GSM1105442     2  0.0000      0.959 0.000 1.000
#> GSM1105511     2  0.0000      0.959 0.000 1.000
#> GSM1105514     2  0.0000      0.959 0.000 1.000
#> GSM1105518     2  0.0000      0.959 0.000 1.000
#> GSM1105522     1  0.0000      0.989 1.000 0.000
#> GSM1105534     1  0.0000      0.989 1.000 0.000
#> GSM1105535     1  0.0000      0.989 1.000 0.000
#> GSM1105538     1  0.0000      0.989 1.000 0.000
#> GSM1105542     2  0.0000      0.959 0.000 1.000
#> GSM1105443     2  0.0000      0.959 0.000 1.000
#> GSM1105551     1  0.0000      0.989 1.000 0.000
#> GSM1105554     1  0.0000      0.989 1.000 0.000
#> GSM1105555     1  0.0000      0.989 1.000 0.000
#> GSM1105447     2  0.0000      0.959 0.000 1.000
#> GSM1105467     2  0.0000      0.959 0.000 1.000
#> GSM1105470     2  0.0000      0.959 0.000 1.000
#> GSM1105471     2  0.0000      0.959 0.000 1.000
#> GSM1105474     2  0.0000      0.959 0.000 1.000
#> GSM1105475     2  0.0000      0.959 0.000 1.000
#> GSM1105440     1  0.0000      0.989 1.000 0.000
#> GSM1105488     2  0.0000      0.959 0.000 1.000
#> GSM1105489     1  0.0000      0.989 1.000 0.000
#> GSM1105492     1  0.0000      0.989 1.000 0.000
#> GSM1105493     1  0.0000      0.989 1.000 0.000
#> GSM1105497     2  0.0000      0.959 0.000 1.000
#> GSM1105500     2  0.0000      0.959 0.000 1.000
#> GSM1105501     2  0.0000      0.959 0.000 1.000
#> GSM1105508     1  0.0000      0.989 1.000 0.000
#> GSM1105444     2  0.0000      0.959 0.000 1.000
#> GSM1105513     2  0.0000      0.959 0.000 1.000
#> GSM1105516     1  0.9170      0.494 0.668 0.332
#> GSM1105520     2  0.8207      0.686 0.256 0.744
#> GSM1105524     1  0.0000      0.989 1.000 0.000
#> GSM1105536     2  0.0000      0.959 0.000 1.000
#> GSM1105537     1  0.0000      0.989 1.000 0.000
#> GSM1105540     1  0.0000      0.989 1.000 0.000
#> GSM1105544     2  0.9710      0.361 0.400 0.600
#> GSM1105445     2  0.0000      0.959 0.000 1.000
#> GSM1105553     2  0.9286      0.526 0.344 0.656
#> GSM1105556     1  0.0000      0.989 1.000 0.000
#> GSM1105557     2  0.0000      0.959 0.000 1.000
#> GSM1105449     2  0.0000      0.959 0.000 1.000
#> GSM1105469     1  0.3274      0.930 0.940 0.060
#> GSM1105472     2  0.0000      0.959 0.000 1.000
#> GSM1105473     1  0.0000      0.989 1.000 0.000
#> GSM1105476     2  0.0000      0.959 0.000 1.000
#> GSM1105477     2  0.0000      0.959 0.000 1.000
#> GSM1105478     2  0.1633      0.942 0.024 0.976
#> GSM1105510     2  0.0000      0.959 0.000 1.000
#> GSM1105530     1  0.0000      0.989 1.000 0.000
#> GSM1105539     1  0.0000      0.989 1.000 0.000
#> GSM1105480     2  0.0000      0.959 0.000 1.000
#> GSM1105512     1  0.0000      0.989 1.000 0.000
#> GSM1105532     1  0.0000      0.989 1.000 0.000
#> GSM1105541     1  0.0000      0.989 1.000 0.000
#> GSM1105439     2  0.0000      0.959 0.000 1.000
#> GSM1105463     1  0.0000      0.989 1.000 0.000
#> GSM1105482     1  0.0000      0.989 1.000 0.000
#> GSM1105483     2  0.5737      0.834 0.136 0.864
#> GSM1105494     2  0.0000      0.959 0.000 1.000
#> GSM1105503     2  0.9970      0.194 0.468 0.532
#> GSM1105507     1  0.1414      0.971 0.980 0.020
#> GSM1105446     2  0.0000      0.959 0.000 1.000
#> GSM1105519     1  0.0000      0.989 1.000 0.000
#> GSM1105526     2  0.0000      0.959 0.000 1.000
#> GSM1105527     2  0.0938      0.951 0.012 0.988
#> GSM1105531     1  0.0000      0.989 1.000 0.000
#> GSM1105543     2  0.0000      0.959 0.000 1.000
#> GSM1105546     1  0.0000      0.989 1.000 0.000
#> GSM1105547     1  0.0000      0.989 1.000 0.000
#> GSM1105455     2  0.0000      0.959 0.000 1.000
#> GSM1105458     2  0.0000      0.959 0.000 1.000
#> GSM1105459     2  0.0000      0.959 0.000 1.000
#> GSM1105462     1  0.2948      0.938 0.948 0.052
#> GSM1105441     2  0.0000      0.959 0.000 1.000
#> GSM1105465     2  0.0000      0.959 0.000 1.000
#> GSM1105484     2  0.0000      0.959 0.000 1.000
#> GSM1105485     2  0.0376      0.957 0.004 0.996
#> GSM1105496     1  0.2778      0.942 0.952 0.048
#> GSM1105505     1  0.0000      0.989 1.000 0.000
#> GSM1105509     1  0.0000      0.989 1.000 0.000
#> GSM1105448     2  0.0000      0.959 0.000 1.000
#> GSM1105521     1  0.0000      0.989 1.000 0.000
#> GSM1105528     2  0.0000      0.959 0.000 1.000
#> GSM1105529     2  0.0000      0.959 0.000 1.000
#> GSM1105533     1  0.0000      0.989 1.000 0.000
#> GSM1105545     2  0.0000      0.959 0.000 1.000
#> GSM1105548     1  0.0000      0.989 1.000 0.000
#> GSM1105549     1  0.0000      0.989 1.000 0.000
#> GSM1105457     2  0.0000      0.959 0.000 1.000
#> GSM1105460     2  0.0000      0.959 0.000 1.000
#> GSM1105461     2  0.0000      0.959 0.000 1.000
#> GSM1105464     1  0.0000      0.989 1.000 0.000
#> GSM1105466     2  0.0000      0.959 0.000 1.000
#> GSM1105479     2  0.0000      0.959 0.000 1.000
#> GSM1105502     1  0.0000      0.989 1.000 0.000
#> GSM1105515     1  0.0000      0.989 1.000 0.000
#> GSM1105523     1  0.0000      0.989 1.000 0.000
#> GSM1105550     1  0.0000      0.989 1.000 0.000
#> GSM1105450     2  0.0000      0.959 0.000 1.000
#> GSM1105451     2  0.0000      0.959 0.000 1.000
#> GSM1105454     2  0.4161      0.890 0.084 0.916
#> GSM1105468     2  0.0000      0.959 0.000 1.000
#> GSM1105481     2  0.7219      0.765 0.200 0.800
#> GSM1105504     1  0.0000      0.989 1.000 0.000
#> GSM1105517     1  0.0000      0.989 1.000 0.000
#> GSM1105525     1  0.0000      0.989 1.000 0.000
#> GSM1105552     1  0.0000      0.989 1.000 0.000
#> GSM1105452     2  0.0000      0.959 0.000 1.000
#> GSM1105453     2  0.0000      0.959 0.000 1.000
#> GSM1105456     2  0.7139      0.770 0.196 0.804

show/hide code output

cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#>            class entropy silhouette    p1    p2    p3
#> GSM1105438     3  0.5785    -0.0806 0.000 0.332 0.668
#> GSM1105486     2  0.6180     0.6915 0.000 0.584 0.416
#> GSM1105487     1  0.3619     0.8137 0.864 0.136 0.000
#> GSM1105490     2  0.5098     0.7739 0.000 0.752 0.248
#> GSM1105491     3  0.5062     0.5603 0.016 0.184 0.800
#> GSM1105495     3  0.5365     0.5346 0.004 0.252 0.744
#> GSM1105498     2  0.1878     0.5309 0.044 0.952 0.004
#> GSM1105499     1  0.0237     0.8444 0.996 0.000 0.004
#> GSM1105506     2  0.5406     0.7683 0.012 0.764 0.224
#> GSM1105442     3  0.0237     0.6263 0.000 0.004 0.996
#> GSM1105511     2  0.6034     0.7580 0.036 0.752 0.212
#> GSM1105514     3  0.5497     0.0867 0.000 0.292 0.708
#> GSM1105518     2  0.3551     0.7030 0.000 0.868 0.132
#> GSM1105522     1  0.2066     0.8251 0.940 0.060 0.000
#> GSM1105534     1  0.0747     0.8443 0.984 0.000 0.016
#> GSM1105535     1  0.0237     0.8441 0.996 0.004 0.000
#> GSM1105538     1  0.0592     0.8443 0.988 0.000 0.012
#> GSM1105542     3  0.0424     0.6263 0.000 0.008 0.992
#> GSM1105443     2  0.5058     0.7735 0.000 0.756 0.244
#> GSM1105551     1  0.5244     0.7675 0.756 0.240 0.004
#> GSM1105554     1  0.0592     0.8448 0.988 0.000 0.012
#> GSM1105555     1  0.5746     0.7783 0.780 0.180 0.040
#> GSM1105447     2  0.5254     0.7731 0.000 0.736 0.264
#> GSM1105467     2  0.6168     0.6952 0.000 0.588 0.412
#> GSM1105470     2  0.6111     0.7090 0.000 0.604 0.396
#> GSM1105471     2  0.4702     0.7635 0.000 0.788 0.212
#> GSM1105474     2  0.6305     0.5935 0.000 0.516 0.484
#> GSM1105475     2  0.5785     0.7506 0.000 0.668 0.332
#> GSM1105440     1  0.0237     0.8441 0.996 0.004 0.000
#> GSM1105488     3  0.1031     0.6227 0.000 0.024 0.976
#> GSM1105489     1  0.5798     0.7763 0.776 0.184 0.040
#> GSM1105492     1  0.0475     0.8440 0.992 0.004 0.004
#> GSM1105493     3  0.9173     0.1118 0.304 0.176 0.520
#> GSM1105497     3  0.1643     0.6186 0.000 0.044 0.956
#> GSM1105500     3  0.5138     0.2239 0.000 0.252 0.748
#> GSM1105501     2  0.6723     0.7543 0.048 0.704 0.248
#> GSM1105508     1  0.1529     0.8338 0.960 0.040 0.000
#> GSM1105444     3  0.6295    -0.5284 0.000 0.472 0.528
#> GSM1105513     2  0.5016     0.7731 0.000 0.760 0.240
#> GSM1105516     3  0.7129     0.2466 0.392 0.028 0.580
#> GSM1105520     2  0.2339     0.5059 0.048 0.940 0.012
#> GSM1105524     1  0.0237     0.8441 0.996 0.004 0.000
#> GSM1105536     3  0.6286    -0.5051 0.000 0.464 0.536
#> GSM1105537     1  0.0237     0.8441 0.996 0.004 0.000
#> GSM1105540     1  0.0592     0.8437 0.988 0.012 0.000
#> GSM1105544     1  0.9640    -0.0849 0.468 0.252 0.280
#> GSM1105445     2  0.4399     0.7475 0.000 0.812 0.188
#> GSM1105553     2  0.4636     0.3784 0.116 0.848 0.036
#> GSM1105556     1  0.5325     0.6096 0.748 0.004 0.248
#> GSM1105557     2  0.5158     0.7721 0.004 0.764 0.232
#> GSM1105449     2  0.5905     0.7408 0.000 0.648 0.352
#> GSM1105469     1  0.5058     0.6424 0.756 0.244 0.000
#> GSM1105472     2  0.6302     0.6010 0.000 0.520 0.480
#> GSM1105473     3  0.8875     0.0432 0.364 0.128 0.508
#> GSM1105476     2  0.6295     0.6154 0.000 0.528 0.472
#> GSM1105477     3  0.2261     0.5892 0.000 0.068 0.932
#> GSM1105478     2  0.4755     0.7413 0.008 0.808 0.184
#> GSM1105510     3  0.1529     0.6159 0.000 0.040 0.960
#> GSM1105530     1  0.0424     0.8456 0.992 0.008 0.000
#> GSM1105539     1  0.6295     0.7520 0.728 0.236 0.036
#> GSM1105480     2  0.5158     0.7710 0.004 0.764 0.232
#> GSM1105512     1  0.0475     0.8440 0.992 0.004 0.004
#> GSM1105532     1  0.0892     0.8445 0.980 0.020 0.000
#> GSM1105541     1  0.5678     0.7783 0.776 0.192 0.032
#> GSM1105439     2  0.5178     0.7735 0.000 0.744 0.256
#> GSM1105463     1  0.6402     0.7518 0.724 0.236 0.040
#> GSM1105482     1  0.5902     0.5210 0.680 0.004 0.316
#> GSM1105483     2  0.6169     0.3425 0.360 0.636 0.004
#> GSM1105494     2  0.4931     0.7718 0.000 0.768 0.232
#> GSM1105503     2  0.4351     0.3531 0.168 0.828 0.004
#> GSM1105507     1  0.0237     0.8441 0.996 0.004 0.000
#> GSM1105446     3  0.3619     0.4934 0.000 0.136 0.864
#> GSM1105519     1  0.0424     0.8447 0.992 0.000 0.008
#> GSM1105526     2  0.6505     0.6165 0.004 0.528 0.468
#> GSM1105527     2  0.6443     0.5131 0.240 0.720 0.040
#> GSM1105531     1  0.6730     0.7285 0.680 0.284 0.036
#> GSM1105543     3  0.4399     0.3915 0.000 0.188 0.812
#> GSM1105546     1  0.1129     0.8437 0.976 0.004 0.020
#> GSM1105547     3  0.6520    -0.0770 0.488 0.004 0.508
#> GSM1105455     2  0.5254     0.7730 0.000 0.736 0.264
#> GSM1105458     2  0.5905     0.7408 0.000 0.648 0.352
#> GSM1105459     2  0.6267     0.6467 0.000 0.548 0.452
#> GSM1105462     1  0.6823     0.7193 0.668 0.296 0.036
#> GSM1105441     2  0.5905     0.7408 0.000 0.648 0.352
#> GSM1105465     3  0.3619     0.5865 0.000 0.136 0.864
#> GSM1105484     3  0.1529     0.6159 0.000 0.040 0.960
#> GSM1105485     3  0.0848     0.6270 0.008 0.008 0.984
#> GSM1105496     1  0.6852     0.7154 0.664 0.300 0.036
#> GSM1105505     1  0.6452     0.7462 0.712 0.252 0.036
#> GSM1105509     1  0.0475     0.8440 0.992 0.004 0.004
#> GSM1105448     2  0.6308     0.5774 0.000 0.508 0.492
#> GSM1105521     1  0.0747     0.8435 0.984 0.000 0.016
#> GSM1105528     3  0.1529     0.6159 0.000 0.040 0.960
#> GSM1105529     3  0.1411     0.6176 0.000 0.036 0.964
#> GSM1105533     1  0.5798     0.7763 0.776 0.184 0.040
#> GSM1105545     2  0.6696     0.7317 0.020 0.632 0.348
#> GSM1105548     1  0.9488     0.2080 0.424 0.184 0.392
#> GSM1105549     3  0.7250     0.1405 0.396 0.032 0.572
#> GSM1105457     2  0.4931     0.7720 0.000 0.768 0.232
#> GSM1105460     2  0.5254     0.7731 0.000 0.736 0.264
#> GSM1105461     2  0.6225     0.6734 0.000 0.568 0.432
#> GSM1105464     1  0.1647     0.8399 0.960 0.004 0.036
#> GSM1105466     2  0.5201     0.7721 0.004 0.760 0.236
#> GSM1105479     2  0.5016     0.7731 0.000 0.760 0.240
#> GSM1105502     1  0.3983     0.8098 0.852 0.144 0.004
#> GSM1105515     1  0.2165     0.8295 0.936 0.000 0.064
#> GSM1105523     1  0.5327     0.6583 0.728 0.272 0.000
#> GSM1105550     1  0.3879     0.7514 0.848 0.152 0.000
#> GSM1105450     2  0.6204     0.6827 0.000 0.576 0.424
#> GSM1105451     2  0.6180     0.6913 0.000 0.584 0.416
#> GSM1105454     2  0.1015     0.5492 0.008 0.980 0.012
#> GSM1105468     2  0.6235     0.6682 0.000 0.564 0.436
#> GSM1105481     2  0.2339     0.5177 0.012 0.940 0.048
#> GSM1105504     1  0.6375     0.7494 0.720 0.244 0.036
#> GSM1105517     1  0.0475     0.8440 0.992 0.004 0.004
#> GSM1105525     1  0.4555     0.7443 0.800 0.200 0.000
#> GSM1105552     3  0.9364     0.0224 0.332 0.184 0.484
#> GSM1105452     3  0.1529     0.6159 0.000 0.040 0.960
#> GSM1105453     2  0.6267     0.6467 0.000 0.548 0.452
#> GSM1105456     2  0.1482     0.5359 0.012 0.968 0.020

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>            class entropy silhouette    p1    p2    p3    p4
#> GSM1105438     4  0.4985     0.0347 0.000 0.468 0.000 0.532
#> GSM1105486     2  0.2149     0.8662 0.000 0.912 0.000 0.088
#> GSM1105487     1  0.0336     0.9146 0.992 0.000 0.008 0.000
#> GSM1105490     2  0.0000     0.8888 0.000 1.000 0.000 0.000
#> GSM1105491     4  0.0188     0.7852 0.004 0.000 0.000 0.996
#> GSM1105495     3  0.1042     0.8460 0.000 0.008 0.972 0.020
#> GSM1105498     2  0.1970     0.8446 0.008 0.932 0.060 0.000
#> GSM1105499     1  0.0188     0.9153 0.996 0.000 0.000 0.004
#> GSM1105506     2  0.0524     0.8849 0.008 0.988 0.004 0.000
#> GSM1105442     4  0.0188     0.7878 0.000 0.004 0.000 0.996
#> GSM1105511     2  0.0524     0.8849 0.008 0.988 0.004 0.000
#> GSM1105514     4  0.4661     0.4088 0.000 0.348 0.000 0.652
#> GSM1105518     2  0.1398     0.8792 0.000 0.956 0.040 0.004
#> GSM1105522     1  0.0895     0.9051 0.976 0.020 0.004 0.000
#> GSM1105534     1  0.0707     0.9119 0.980 0.000 0.000 0.020
#> GSM1105535     1  0.0188     0.9153 0.996 0.000 0.000 0.004
#> GSM1105538     1  0.0707     0.9119 0.980 0.000 0.000 0.020
#> GSM1105542     4  0.0188     0.7878 0.000 0.004 0.000 0.996
#> GSM1105443     2  0.0336     0.8908 0.000 0.992 0.000 0.008
#> GSM1105551     1  0.3764     0.7199 0.784 0.000 0.216 0.000
#> GSM1105554     1  0.0592     0.9133 0.984 0.000 0.000 0.016
#> GSM1105555     1  0.3768     0.7524 0.808 0.000 0.184 0.008
#> GSM1105447     2  0.0921     0.8907 0.000 0.972 0.000 0.028
#> GSM1105467     2  0.1716     0.8802 0.000 0.936 0.000 0.064
#> GSM1105470     2  0.1022     0.8901 0.000 0.968 0.000 0.032
#> GSM1105471     2  0.0336     0.8908 0.000 0.992 0.000 0.008
#> GSM1105474     2  0.3801     0.7394 0.000 0.780 0.000 0.220
#> GSM1105475     2  0.0817     0.8911 0.000 0.976 0.000 0.024
#> GSM1105440     1  0.0000     0.9152 1.000 0.000 0.000 0.000
#> GSM1105488     4  0.0188     0.7878 0.000 0.004 0.000 0.996
#> GSM1105489     1  0.5228     0.5238 0.664 0.000 0.312 0.024
#> GSM1105492     1  0.0336     0.9152 0.992 0.000 0.000 0.008
#> GSM1105493     4  0.2773     0.7048 0.116 0.000 0.004 0.880
#> GSM1105497     4  0.0188     0.7878 0.000 0.004 0.000 0.996
#> GSM1105500     4  0.4955     0.1309 0.000 0.444 0.000 0.556
#> GSM1105501     2  0.0844     0.8855 0.012 0.980 0.004 0.004
#> GSM1105508     1  0.0592     0.9094 0.984 0.016 0.000 0.000
#> GSM1105444     2  0.4817     0.4181 0.000 0.612 0.000 0.388
#> GSM1105513     2  0.0188     0.8901 0.000 0.996 0.000 0.004
#> GSM1105516     4  0.4543     0.4677 0.324 0.000 0.000 0.676
#> GSM1105520     2  0.4941     0.1549 0.000 0.564 0.436 0.000
#> GSM1105524     1  0.0000     0.9152 1.000 0.000 0.000 0.000
#> GSM1105536     2  0.4866     0.3785 0.000 0.596 0.000 0.404
#> GSM1105537     1  0.0000     0.9152 1.000 0.000 0.000 0.000
#> GSM1105540     1  0.0188     0.9145 0.996 0.000 0.004 0.000
#> GSM1105544     2  0.5744     0.2214 0.436 0.536 0.000 0.028
#> GSM1105445     2  0.0000     0.8888 0.000 1.000 0.000 0.000
#> GSM1105553     3  0.0188     0.8625 0.000 0.004 0.996 0.000
#> GSM1105556     1  0.2345     0.8522 0.900 0.000 0.000 0.100
#> GSM1105557     2  0.0376     0.8867 0.004 0.992 0.004 0.000
#> GSM1105449     2  0.1118     0.8892 0.000 0.964 0.000 0.036
#> GSM1105469     1  0.2944     0.7956 0.868 0.128 0.004 0.000
#> GSM1105472     2  0.3907     0.7224 0.000 0.768 0.000 0.232
#> GSM1105473     4  0.4114     0.6822 0.112 0.000 0.060 0.828
#> GSM1105476     2  0.2973     0.8242 0.000 0.856 0.000 0.144
#> GSM1105477     4  0.2921     0.7099 0.000 0.140 0.000 0.860
#> GSM1105478     2  0.0524     0.8849 0.008 0.988 0.004 0.000
#> GSM1105510     4  0.0188     0.7878 0.000 0.004 0.000 0.996
#> GSM1105530     1  0.0188     0.9145 0.996 0.000 0.004 0.000
#> GSM1105539     3  0.4941     0.1478 0.436 0.000 0.564 0.000
#> GSM1105480     2  0.0336     0.8860 0.008 0.992 0.000 0.000
#> GSM1105512     1  0.0336     0.9152 0.992 0.000 0.000 0.008
#> GSM1105532     1  0.0524     0.9125 0.988 0.004 0.008 0.000
#> GSM1105541     1  0.3837     0.7101 0.776 0.000 0.224 0.000
#> GSM1105439     2  0.0336     0.8908 0.000 0.992 0.000 0.008
#> GSM1105463     3  0.0188     0.8631 0.004 0.000 0.996 0.000
#> GSM1105482     1  0.4790     0.4171 0.620 0.000 0.000 0.380
#> GSM1105483     1  0.4720     0.4713 0.672 0.324 0.004 0.000
#> GSM1105494     2  0.0188     0.8901 0.000 0.996 0.000 0.004
#> GSM1105503     3  0.4643     0.4955 0.000 0.344 0.656 0.000
#> GSM1105507     1  0.0188     0.9145 0.996 0.000 0.004 0.000
#> GSM1105446     4  0.3975     0.6123 0.000 0.240 0.000 0.760
#> GSM1105519     1  0.0336     0.9152 0.992 0.000 0.000 0.008
#> GSM1105526     2  0.3837     0.7352 0.000 0.776 0.000 0.224
#> GSM1105527     2  0.4252     0.5769 0.252 0.744 0.004 0.000
#> GSM1105531     3  0.0188     0.8631 0.004 0.000 0.996 0.000
#> GSM1105543     4  0.4500     0.4814 0.000 0.316 0.000 0.684
#> GSM1105546     1  0.0336     0.9152 0.992 0.000 0.000 0.008
#> GSM1105547     4  0.4624     0.4123 0.340 0.000 0.000 0.660
#> GSM1105455     2  0.0469     0.8911 0.000 0.988 0.000 0.012
#> GSM1105458     2  0.1118     0.8892 0.000 0.964 0.000 0.036
#> GSM1105459     2  0.2868     0.8302 0.000 0.864 0.000 0.136
#> GSM1105462     3  0.7520     0.2791 0.340 0.196 0.464 0.000
#> GSM1105441     2  0.1022     0.8901 0.000 0.968 0.000 0.032
#> GSM1105465     4  0.0000     0.7867 0.000 0.000 0.000 1.000
#> GSM1105484     4  0.0817     0.7814 0.000 0.024 0.000 0.976
#> GSM1105485     4  0.0188     0.7852 0.004 0.000 0.000 0.996
#> GSM1105496     3  0.0188     0.8631 0.004 0.000 0.996 0.000
#> GSM1105505     3  0.0188     0.8631 0.004 0.000 0.996 0.000
#> GSM1105509     1  0.0376     0.9153 0.992 0.000 0.004 0.004
#> GSM1105448     2  0.4624     0.5319 0.000 0.660 0.000 0.340
#> GSM1105521     1  0.0592     0.9133 0.984 0.000 0.000 0.016
#> GSM1105528     4  0.0707     0.7834 0.000 0.020 0.000 0.980
#> GSM1105529     4  0.0000     0.7867 0.000 0.000 0.000 1.000
#> GSM1105533     1  0.3837     0.7048 0.776 0.000 0.224 0.000
#> GSM1105545     2  0.1396     0.8910 0.004 0.960 0.004 0.032
#> GSM1105548     4  0.6488     0.4063 0.292 0.000 0.104 0.604
#> GSM1105549     4  0.1716     0.7482 0.064 0.000 0.000 0.936
#> GSM1105457     2  0.0000     0.8888 0.000 1.000 0.000 0.000
#> GSM1105460     2  0.0817     0.8913 0.000 0.976 0.000 0.024
#> GSM1105461     2  0.2081     0.8687 0.000 0.916 0.000 0.084
#> GSM1105464     1  0.0779     0.9141 0.980 0.000 0.004 0.016
#> GSM1105466     2  0.0376     0.8867 0.004 0.992 0.004 0.000
#> GSM1105479     2  0.0336     0.8908 0.000 0.992 0.000 0.008
#> GSM1105502     1  0.1302     0.8949 0.956 0.000 0.044 0.000
#> GSM1105515     1  0.1389     0.8950 0.952 0.000 0.000 0.048
#> GSM1105523     1  0.2611     0.8314 0.896 0.096 0.008 0.000
#> GSM1105550     1  0.1489     0.8872 0.952 0.044 0.004 0.000
#> GSM1105450     2  0.1940     0.8731 0.000 0.924 0.000 0.076
#> GSM1105451     2  0.1716     0.8790 0.000 0.936 0.000 0.064
#> GSM1105454     3  0.0188     0.8625 0.000 0.004 0.996 0.000
#> GSM1105468     2  0.2345     0.8582 0.000 0.900 0.000 0.100
#> GSM1105481     3  0.1022     0.8444 0.000 0.032 0.968 0.000
#> GSM1105504     3  0.0188     0.8631 0.004 0.000 0.996 0.000
#> GSM1105517     1  0.0524     0.9154 0.988 0.000 0.004 0.008
#> GSM1105525     1  0.1452     0.8922 0.956 0.036 0.008 0.000
#> GSM1105552     4  0.5632     0.5581 0.092 0.000 0.196 0.712
#> GSM1105452     4  0.0336     0.7867 0.000 0.008 0.000 0.992
#> GSM1105453     2  0.2973     0.8235 0.000 0.856 0.000 0.144
#> GSM1105456     3  0.0188     0.8625 0.000 0.004 0.996 0.000

show/hide code output

cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#>            class entropy silhouette    p1    p2    p3    p4    p5
#> GSM1105438     2  0.4448     0.2798 0.000 0.516 0.000 0.004 0.480
#> GSM1105486     2  0.5018     0.6465 0.000 0.664 0.000 0.068 0.268
#> GSM1105487     1  0.3460     0.7052 0.828 0.000 0.044 0.128 0.000
#> GSM1105490     2  0.1741     0.7449 0.024 0.936 0.000 0.040 0.000
#> GSM1105491     5  0.1341     0.7771 0.056 0.000 0.000 0.000 0.944
#> GSM1105495     3  0.2463     0.7552 0.000 0.008 0.888 0.004 0.100
#> GSM1105498     2  0.3016     0.7181 0.040 0.884 0.032 0.044 0.000
#> GSM1105499     1  0.4262     0.4581 0.560 0.000 0.000 0.440 0.000
#> GSM1105506     2  0.4452     0.1018 0.004 0.500 0.000 0.496 0.000
#> GSM1105442     5  0.1168     0.7779 0.032 0.008 0.000 0.000 0.960
#> GSM1105511     2  0.2920     0.7131 0.016 0.852 0.000 0.132 0.000
#> GSM1105514     5  0.4276     0.1303 0.000 0.380 0.000 0.004 0.616
#> GSM1105518     2  0.2512     0.7439 0.004 0.904 0.060 0.028 0.004
#> GSM1105522     1  0.4302     0.3499 0.520 0.000 0.000 0.480 0.000
#> GSM1105534     1  0.2286     0.7207 0.888 0.000 0.000 0.108 0.004
#> GSM1105535     1  0.3796     0.6305 0.700 0.000 0.000 0.300 0.000
#> GSM1105538     1  0.2848     0.7163 0.840 0.000 0.000 0.156 0.004
#> GSM1105542     5  0.1478     0.7747 0.064 0.000 0.000 0.000 0.936
#> GSM1105443     2  0.0609     0.7579 0.000 0.980 0.000 0.020 0.000
#> GSM1105551     1  0.3053     0.6820 0.872 0.008 0.076 0.044 0.000
#> GSM1105554     1  0.3231     0.7022 0.800 0.000 0.000 0.196 0.004
#> GSM1105555     1  0.1251     0.6926 0.956 0.000 0.036 0.008 0.000
#> GSM1105447     2  0.1932     0.7492 0.020 0.936 0.004 0.032 0.008
#> GSM1105467     2  0.5396     0.6532 0.000 0.656 0.000 0.124 0.220
#> GSM1105470     2  0.5345     0.6687 0.000 0.668 0.000 0.136 0.196
#> GSM1105471     2  0.7285     0.2402 0.000 0.444 0.100 0.368 0.088
#> GSM1105474     2  0.3890     0.6737 0.000 0.736 0.000 0.012 0.252
#> GSM1105475     2  0.3416     0.7510 0.000 0.840 0.000 0.088 0.072
#> GSM1105440     1  0.1830     0.7100 0.924 0.008 0.000 0.068 0.000
#> GSM1105488     5  0.1478     0.7744 0.064 0.000 0.000 0.000 0.936
#> GSM1105489     1  0.2270     0.6812 0.916 0.000 0.052 0.012 0.020
#> GSM1105492     1  0.2068     0.7214 0.904 0.000 0.000 0.092 0.004
#> GSM1105493     5  0.4790     0.4966 0.332 0.000 0.012 0.016 0.640
#> GSM1105497     5  0.6662     0.5332 0.252 0.112 0.040 0.008 0.588
#> GSM1105500     1  0.5903    -0.1719 0.472 0.456 0.000 0.028 0.044
#> GSM1105501     4  0.5726     0.0882 0.004 0.368 0.000 0.548 0.080
#> GSM1105508     1  0.4080     0.6617 0.728 0.020 0.000 0.252 0.000
#> GSM1105444     2  0.4288     0.4948 0.000 0.612 0.000 0.004 0.384
#> GSM1105513     2  0.1168     0.7550 0.008 0.960 0.000 0.032 0.000
#> GSM1105516     1  0.4770     0.4314 0.644 0.000 0.000 0.036 0.320
#> GSM1105520     3  0.4487     0.6939 0.000 0.104 0.756 0.140 0.000
#> GSM1105524     1  0.4101     0.5514 0.628 0.000 0.000 0.372 0.000
#> GSM1105536     5  0.3359     0.6797 0.000 0.108 0.000 0.052 0.840
#> GSM1105537     1  0.4088     0.5587 0.632 0.000 0.000 0.368 0.000
#> GSM1105540     1  0.4430     0.4469 0.540 0.004 0.000 0.456 0.000
#> GSM1105544     1  0.4340     0.5311 0.788 0.152 0.008 0.036 0.016
#> GSM1105445     2  0.1455     0.7512 0.008 0.952 0.008 0.032 0.000
#> GSM1105553     2  0.6982     0.2338 0.260 0.544 0.148 0.044 0.004
#> GSM1105556     1  0.2482     0.7157 0.892 0.000 0.000 0.084 0.024
#> GSM1105557     2  0.1549     0.7504 0.016 0.944 0.000 0.040 0.000
#> GSM1105449     2  0.1041     0.7655 0.000 0.964 0.000 0.004 0.032
#> GSM1105469     4  0.4309     0.6242 0.148 0.084 0.000 0.768 0.000
#> GSM1105472     5  0.5112    -0.2730 0.000 0.468 0.000 0.036 0.496
#> GSM1105473     5  0.4146     0.6924 0.048 0.000 0.068 0.064 0.820
#> GSM1105476     2  0.4150     0.7002 0.000 0.748 0.000 0.036 0.216
#> GSM1105477     5  0.1205     0.7560 0.000 0.040 0.000 0.004 0.956
#> GSM1105478     2  0.4443     0.1656 0.004 0.524 0.000 0.472 0.000
#> GSM1105510     5  0.0771     0.7763 0.020 0.004 0.000 0.000 0.976
#> GSM1105530     4  0.2690     0.5874 0.156 0.000 0.000 0.844 0.000
#> GSM1105539     3  0.4873     0.4266 0.044 0.000 0.644 0.312 0.000
#> GSM1105480     2  0.1740     0.7553 0.012 0.932 0.000 0.056 0.000
#> GSM1105512     1  0.4297     0.3899 0.528 0.000 0.000 0.472 0.000
#> GSM1105532     4  0.2439     0.6310 0.120 0.000 0.004 0.876 0.000
#> GSM1105541     4  0.5875     0.4062 0.152 0.000 0.256 0.592 0.000
#> GSM1105439     2  0.1043     0.7593 0.000 0.960 0.000 0.040 0.000
#> GSM1105463     3  0.0290     0.7880 0.000 0.000 0.992 0.008 0.000
#> GSM1105482     1  0.2124     0.6884 0.916 0.000 0.000 0.028 0.056
#> GSM1105483     4  0.4083     0.6277 0.080 0.132 0.000 0.788 0.000
#> GSM1105494     2  0.2193     0.7368 0.028 0.920 0.008 0.044 0.000
#> GSM1105503     3  0.5731     0.5641 0.016 0.240 0.644 0.100 0.000
#> GSM1105507     1  0.3863     0.6675 0.740 0.012 0.000 0.248 0.000
#> GSM1105446     2  0.5213     0.6267 0.072 0.704 0.000 0.020 0.204
#> GSM1105519     1  0.4264     0.5456 0.620 0.000 0.000 0.376 0.004
#> GSM1105526     5  0.5983     0.1983 0.000 0.116 0.000 0.380 0.504
#> GSM1105527     4  0.4183     0.3729 0.008 0.324 0.000 0.668 0.000
#> GSM1105531     3  0.1197     0.7825 0.000 0.000 0.952 0.048 0.000
#> GSM1105543     2  0.4225     0.5363 0.000 0.632 0.000 0.004 0.364
#> GSM1105546     1  0.1341     0.7178 0.944 0.000 0.000 0.056 0.000
#> GSM1105547     1  0.2873     0.6361 0.856 0.000 0.000 0.016 0.128
#> GSM1105455     2  0.0771     0.7571 0.004 0.976 0.000 0.020 0.000
#> GSM1105458     2  0.1914     0.7671 0.000 0.924 0.000 0.016 0.060
#> GSM1105459     2  0.4562     0.6242 0.000 0.676 0.000 0.032 0.292
#> GSM1105462     4  0.5331     0.4677 0.012 0.036 0.128 0.744 0.080
#> GSM1105441     2  0.1408     0.7664 0.000 0.948 0.000 0.008 0.044
#> GSM1105465     5  0.1197     0.7784 0.048 0.000 0.000 0.000 0.952
#> GSM1105484     5  0.0955     0.7585 0.000 0.028 0.000 0.004 0.968
#> GSM1105485     5  0.1952     0.7638 0.084 0.000 0.000 0.004 0.912
#> GSM1105496     3  0.7076     0.4586 0.296 0.168 0.500 0.032 0.004
#> GSM1105505     3  0.0162     0.7876 0.000 0.000 0.996 0.004 0.000
#> GSM1105509     4  0.4114     0.0215 0.376 0.000 0.000 0.624 0.000
#> GSM1105448     2  0.4235     0.5680 0.000 0.656 0.000 0.008 0.336
#> GSM1105521     4  0.6578     0.0381 0.284 0.000 0.000 0.468 0.248
#> GSM1105528     5  0.0955     0.7581 0.000 0.028 0.000 0.004 0.968
#> GSM1105529     5  0.0963     0.7783 0.036 0.000 0.000 0.000 0.964
#> GSM1105533     1  0.5076     0.6236 0.692 0.000 0.200 0.108 0.000
#> GSM1105545     4  0.6653     0.1158 0.016 0.296 0.000 0.516 0.172
#> GSM1105548     1  0.2026     0.6680 0.928 0.000 0.016 0.012 0.044
#> GSM1105549     5  0.4003     0.5710 0.288 0.000 0.000 0.008 0.704
#> GSM1105457     2  0.3053     0.6923 0.008 0.828 0.000 0.164 0.000
#> GSM1105460     2  0.6195     0.3786 0.000 0.488 0.000 0.368 0.144
#> GSM1105461     2  0.3852     0.6956 0.000 0.760 0.000 0.020 0.220
#> GSM1105464     4  0.2677     0.6436 0.112 0.000 0.016 0.872 0.000
#> GSM1105466     2  0.4151     0.4446 0.000 0.652 0.000 0.344 0.004
#> GSM1105479     2  0.4269     0.6229 0.000 0.732 0.000 0.232 0.036
#> GSM1105502     1  0.5752     0.4028 0.500 0.000 0.088 0.412 0.000
#> GSM1105515     1  0.2189     0.7173 0.904 0.000 0.000 0.084 0.012
#> GSM1105523     4  0.3411     0.6657 0.072 0.036 0.032 0.860 0.000
#> GSM1105550     4  0.1444     0.6668 0.040 0.012 0.000 0.948 0.000
#> GSM1105450     2  0.3495     0.7319 0.000 0.812 0.000 0.028 0.160
#> GSM1105451     2  0.1740     0.7649 0.000 0.932 0.000 0.012 0.056
#> GSM1105454     3  0.2497     0.7522 0.004 0.112 0.880 0.004 0.000
#> GSM1105468     2  0.4547     0.6647 0.000 0.704 0.000 0.044 0.252
#> GSM1105481     3  0.5746     0.6293 0.000 0.044 0.692 0.148 0.116
#> GSM1105504     3  0.2513     0.7498 0.008 0.000 0.876 0.116 0.000
#> GSM1105517     4  0.1792     0.6593 0.084 0.000 0.000 0.916 0.000
#> GSM1105525     4  0.3639     0.6158 0.164 0.008 0.020 0.808 0.000
#> GSM1105552     5  0.5047     0.5721 0.028 0.000 0.192 0.056 0.724
#> GSM1105452     5  0.2873     0.7451 0.120 0.020 0.000 0.000 0.860
#> GSM1105453     2  0.2006     0.7620 0.000 0.916 0.000 0.012 0.072
#> GSM1105456     3  0.0162     0.7869 0.004 0.000 0.996 0.000 0.000

show/hide code output

cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#>            class entropy silhouette    p1    p2    p3    p4    p5    p6
#> GSM1105438     2  0.5130    0.51450 0.000 0.664 0.080 0.032 0.224 0.000
#> GSM1105486     2  0.6832    0.02991 0.000 0.372 0.044 0.292 0.292 0.000
#> GSM1105487     1  0.4321    0.19784 0.580 0.000 0.400 0.008 0.000 0.012
#> GSM1105490     2  0.3449    0.57125 0.000 0.808 0.116 0.076 0.000 0.000
#> GSM1105491     5  0.4547    0.63765 0.008 0.032 0.148 0.060 0.752 0.000
#> GSM1105495     6  0.2975    0.57039 0.000 0.004 0.012 0.004 0.148 0.832
#> GSM1105498     3  0.7341    0.01482 0.008 0.328 0.384 0.196 0.004 0.080
#> GSM1105499     1  0.1984    0.60418 0.912 0.000 0.032 0.056 0.000 0.000
#> GSM1105506     4  0.4342    0.35861 0.008 0.308 0.028 0.656 0.000 0.000
#> GSM1105442     5  0.1088    0.73417 0.000 0.024 0.016 0.000 0.960 0.000
#> GSM1105511     2  0.5540    0.11612 0.036 0.504 0.056 0.404 0.000 0.000
#> GSM1105514     5  0.6043    0.46423 0.000 0.260 0.116 0.056 0.568 0.000
#> GSM1105518     2  0.5257    0.43499 0.000 0.688 0.072 0.080 0.000 0.160
#> GSM1105522     1  0.4288    0.51205 0.716 0.000 0.064 0.216 0.000 0.004
#> GSM1105534     1  0.3126    0.49329 0.752 0.000 0.248 0.000 0.000 0.000
#> GSM1105535     1  0.1408    0.60110 0.944 0.000 0.036 0.020 0.000 0.000
#> GSM1105538     1  0.4539    0.37432 0.644 0.000 0.304 0.004 0.048 0.000
#> GSM1105542     5  0.1958    0.72789 0.000 0.004 0.100 0.000 0.896 0.000
#> GSM1105443     2  0.1780    0.62630 0.000 0.924 0.028 0.048 0.000 0.000
#> GSM1105551     3  0.4481    0.06715 0.416 0.004 0.556 0.000 0.000 0.024
#> GSM1105554     1  0.2214    0.58979 0.888 0.000 0.096 0.016 0.000 0.000
#> GSM1105555     1  0.4970    0.17215 0.540 0.000 0.396 0.004 0.000 0.060
#> GSM1105447     2  0.1759    0.62837 0.000 0.924 0.064 0.004 0.004 0.004
#> GSM1105467     4  0.6852    0.14558 0.000 0.284 0.052 0.404 0.260 0.000
#> GSM1105470     4  0.6695    0.00123 0.000 0.364 0.040 0.372 0.224 0.000
#> GSM1105471     4  0.7551    0.41261 0.000 0.140 0.064 0.508 0.136 0.152
#> GSM1105474     2  0.6667    0.20914 0.000 0.448 0.064 0.160 0.328 0.000
#> GSM1105475     2  0.6488   -0.08704 0.000 0.396 0.036 0.388 0.180 0.000
#> GSM1105440     1  0.3742    0.35259 0.648 0.000 0.348 0.004 0.000 0.000
#> GSM1105488     5  0.2666    0.70647 0.000 0.012 0.112 0.012 0.864 0.000
#> GSM1105489     3  0.4932   -0.12543 0.472 0.000 0.476 0.000 0.008 0.044
#> GSM1105492     1  0.4209    0.28843 0.596 0.000 0.384 0.020 0.000 0.000
#> GSM1105493     5  0.6614    0.38249 0.152 0.000 0.240 0.060 0.536 0.012
#> GSM1105497     3  0.6178   -0.30422 0.000 0.076 0.468 0.024 0.404 0.028
#> GSM1105500     3  0.6623    0.14695 0.080 0.420 0.420 0.032 0.048 0.000
#> GSM1105501     2  0.7262    0.11409 0.072 0.444 0.080 0.336 0.068 0.000
#> GSM1105508     1  0.2767    0.59742 0.868 0.004 0.072 0.056 0.000 0.000
#> GSM1105444     2  0.4428    0.46816 0.000 0.640 0.024 0.012 0.324 0.000
#> GSM1105513     2  0.4054    0.52029 0.000 0.740 0.072 0.188 0.000 0.000
#> GSM1105516     1  0.7229    0.25678 0.452 0.008 0.184 0.108 0.248 0.000
#> GSM1105520     6  0.6216    0.31475 0.004 0.156 0.024 0.320 0.000 0.496
#> GSM1105524     1  0.1644    0.60314 0.932 0.000 0.028 0.040 0.000 0.000
#> GSM1105536     5  0.6336    0.41224 0.020 0.140 0.068 0.164 0.608 0.000
#> GSM1105537     1  0.1572    0.60112 0.936 0.000 0.036 0.028 0.000 0.000
#> GSM1105540     4  0.7462    0.10792 0.328 0.008 0.204 0.372 0.080 0.008
#> GSM1105544     3  0.6053    0.34236 0.212 0.044 0.624 0.032 0.088 0.000
#> GSM1105445     2  0.2144    0.62140 0.000 0.908 0.040 0.048 0.000 0.004
#> GSM1105553     3  0.5283    0.25640 0.004 0.336 0.584 0.012 0.004 0.060
#> GSM1105556     1  0.3885    0.56072 0.756 0.000 0.192 0.048 0.004 0.000
#> GSM1105557     2  0.4125    0.52858 0.000 0.748 0.124 0.128 0.000 0.000
#> GSM1105449     2  0.0622    0.63690 0.000 0.980 0.000 0.012 0.008 0.000
#> GSM1105469     4  0.3813    0.46986 0.152 0.036 0.024 0.788 0.000 0.000
#> GSM1105472     5  0.5589    0.24738 0.000 0.284 0.036 0.088 0.592 0.000
#> GSM1105473     5  0.5276    0.63759 0.032 0.000 0.192 0.020 0.688 0.068
#> GSM1105476     2  0.6885   -0.02784 0.000 0.380 0.052 0.312 0.256 0.000
#> GSM1105477     5  0.2901    0.70259 0.008 0.088 0.020 0.016 0.868 0.000
#> GSM1105478     4  0.4699    0.24550 0.000 0.376 0.036 0.580 0.000 0.008
#> GSM1105510     5  0.5100    0.63393 0.004 0.080 0.144 0.060 0.712 0.000
#> GSM1105530     1  0.5536    0.26520 0.524 0.000 0.052 0.388 0.004 0.032
#> GSM1105539     6  0.5571    0.22648 0.348 0.000 0.040 0.052 0.004 0.556
#> GSM1105480     2  0.5988    0.01126 0.000 0.440 0.200 0.356 0.004 0.000
#> GSM1105512     1  0.5156    0.53764 0.696 0.000 0.136 0.120 0.048 0.000
#> GSM1105532     1  0.5703    0.18115 0.476 0.000 0.048 0.428 0.004 0.044
#> GSM1105541     1  0.6615    0.28488 0.512 0.000 0.056 0.228 0.004 0.200
#> GSM1105439     2  0.1950    0.62613 0.000 0.912 0.024 0.064 0.000 0.000
#> GSM1105463     6  0.0653    0.61857 0.004 0.000 0.012 0.004 0.000 0.980
#> GSM1105482     1  0.4747    0.30071 0.584 0.000 0.356 0.000 0.060 0.000
#> GSM1105483     4  0.4042    0.47638 0.112 0.068 0.024 0.792 0.004 0.000
#> GSM1105494     2  0.6476    0.07076 0.000 0.404 0.308 0.272 0.008 0.008
#> GSM1105503     6  0.6891    0.29016 0.000 0.172 0.092 0.276 0.000 0.460
#> GSM1105507     1  0.4706    0.54910 0.720 0.012 0.112 0.152 0.004 0.000
#> GSM1105446     2  0.3882    0.61740 0.000 0.800 0.084 0.024 0.092 0.000
#> GSM1105519     1  0.4076    0.58587 0.776 0.000 0.060 0.140 0.024 0.000
#> GSM1105526     4  0.5847    0.37825 0.024 0.048 0.040 0.572 0.316 0.000
#> GSM1105527     4  0.3428    0.50266 0.028 0.120 0.028 0.824 0.000 0.000
#> GSM1105531     6  0.1053    0.62109 0.000 0.000 0.012 0.020 0.004 0.964
#> GSM1105543     2  0.5754    0.22930 0.000 0.504 0.072 0.040 0.384 0.000
#> GSM1105546     1  0.3804    0.20624 0.576 0.000 0.424 0.000 0.000 0.000
#> GSM1105547     1  0.5855    0.26034 0.496 0.000 0.380 0.036 0.088 0.000
#> GSM1105455     2  0.1794    0.62736 0.000 0.924 0.036 0.040 0.000 0.000
#> GSM1105458     2  0.1938    0.63484 0.000 0.920 0.008 0.020 0.052 0.000
#> GSM1105459     2  0.3754    0.57758 0.000 0.756 0.016 0.016 0.212 0.000
#> GSM1105462     4  0.6394    0.36809 0.048 0.004 0.036 0.620 0.144 0.148
#> GSM1105441     2  0.1528    0.63753 0.000 0.944 0.012 0.016 0.028 0.000
#> GSM1105465     5  0.2857    0.71594 0.004 0.008 0.132 0.004 0.848 0.004
#> GSM1105484     5  0.2932    0.68917 0.000 0.088 0.040 0.012 0.860 0.000
#> GSM1105485     5  0.2196    0.72221 0.004 0.000 0.108 0.004 0.884 0.000
#> GSM1105496     6  0.6207    0.12565 0.004 0.220 0.384 0.004 0.000 0.388
#> GSM1105505     6  0.1783    0.61961 0.008 0.004 0.036 0.008 0.008 0.936
#> GSM1105509     1  0.5083    0.50989 0.644 0.000 0.088 0.252 0.016 0.000
#> GSM1105448     2  0.4479    0.55087 0.000 0.700 0.028 0.032 0.240 0.000
#> GSM1105521     1  0.5609    0.52198 0.680 0.000 0.088 0.108 0.116 0.008
#> GSM1105528     5  0.1194    0.73009 0.000 0.032 0.008 0.004 0.956 0.000
#> GSM1105529     5  0.3239    0.70684 0.000 0.024 0.164 0.004 0.808 0.000
#> GSM1105533     1  0.3660    0.54033 0.780 0.000 0.060 0.000 0.000 0.160
#> GSM1105545     4  0.6635    0.41753 0.016 0.160 0.060 0.548 0.216 0.000
#> GSM1105548     3  0.4868    0.18293 0.332 0.000 0.608 0.000 0.044 0.016
#> GSM1105549     5  0.6119    0.43808 0.148 0.000 0.212 0.060 0.580 0.000
#> GSM1105457     2  0.3543    0.54184 0.000 0.768 0.032 0.200 0.000 0.000
#> GSM1105460     2  0.4938    0.55011 0.000 0.708 0.032 0.136 0.124 0.000
#> GSM1105461     2  0.3707    0.60094 0.000 0.792 0.024 0.028 0.156 0.000
#> GSM1105464     1  0.5643    0.29437 0.540 0.000 0.060 0.360 0.004 0.036
#> GSM1105466     4  0.4658    0.30612 0.000 0.360 0.036 0.596 0.008 0.000
#> GSM1105479     4  0.6280    0.12026 0.000 0.412 0.032 0.440 0.104 0.012
#> GSM1105502     1  0.3315    0.58815 0.832 0.000 0.008 0.068 0.000 0.092
#> GSM1105515     1  0.3629    0.47600 0.724 0.000 0.260 0.000 0.016 0.000
#> GSM1105523     4  0.4542    0.40630 0.120 0.008 0.032 0.760 0.000 0.080
#> GSM1105550     4  0.5982    0.28785 0.316 0.024 0.060 0.568 0.024 0.008
#> GSM1105450     2  0.5567    0.44097 0.000 0.624 0.044 0.096 0.236 0.000
#> GSM1105451     2  0.0767    0.63718 0.000 0.976 0.012 0.008 0.004 0.000
#> GSM1105454     6  0.4570    0.24129 0.000 0.436 0.036 0.000 0.000 0.528
#> GSM1105468     2  0.6434    0.27446 0.000 0.488 0.044 0.176 0.292 0.000
#> GSM1105481     6  0.6474    0.26429 0.000 0.016 0.040 0.232 0.164 0.548
#> GSM1105504     6  0.4712    0.53006 0.172 0.000 0.040 0.048 0.008 0.732
#> GSM1105517     4  0.5355   -0.17580 0.456 0.000 0.060 0.468 0.008 0.008
#> GSM1105525     4  0.5154    0.25244 0.300 0.000 0.052 0.616 0.000 0.032
#> GSM1105552     5  0.5455    0.60107 0.072 0.000 0.092 0.012 0.696 0.128
#> GSM1105452     5  0.3974    0.67096 0.000 0.036 0.216 0.008 0.740 0.000
#> GSM1105453     2  0.2519    0.63043 0.000 0.892 0.048 0.016 0.044 0.000
#> GSM1105456     6  0.2696    0.59441 0.000 0.116 0.028 0.000 0.000 0.856

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) other(p) time(p) individual(p) k
#> MAD:NMF 117    0.861  0.46773   0.650       0.00814 2
#> MAD:NMF 102    0.921  0.58882   0.350       0.01048 3
#> MAD:NMF 104    0.121  0.42601   0.115       0.02852 4
#> MAD:NMF  92    0.146  0.00182   0.104       0.02429 5
#> MAD:NMF  56    0.346  0.65455   0.553       0.10030 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 44956 rows and 120 columns.
#>   Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'ATC' method.
#>   Subgroups are detected by 'hclust' method.
#>   Performed in total 1250 partitions by row resampling.
#>   Best k for subgroups seems to be 3.
#> 
#> Following methods can be applied to this 'ConsensusPartition' object:
#>  [1] "cola_report"             "collect_classes"         "collect_plots"          
#>  [4] "collect_stats"           "colnames"                "compare_signatures"     
#>  [7] "consensus_heatmap"       "dimension_reduction"     "functional_enrichment"  
#> [10] "get_anno_col"            "get_anno"                "get_classes"            
#> [13] "get_consensus"           "get_matrix"              "get_membership"         
#> [16] "get_param"               "get_signatures"          "get_stats"              
#> [19] "is_best_k"               "is_stable_k"             "membership_heatmap"     
#> [22] "ncol"                    "nrow"                    "plot_ecdf"              
#> [25] "rownames"                "select_partition_number" "show"                   
#> [28] "suggest_best_k"          "test_to_known_factors"

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

collect_plots(res)

plot of chunk ATC-hclust-collect-plots

The plots are:

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

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

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

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

select_partition_number(res)

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

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

get_stats(res)
#>   k 1-PAC mean_silhouette concordance area_increased  Rand Jaccard
#> 2 2 0.524           0.860       0.919         0.4357 0.583   0.583
#> 3 3 0.567           0.792       0.885         0.4922 0.727   0.540
#> 4 4 0.617           0.669       0.800         0.1135 0.929   0.788
#> 5 5 0.677           0.631       0.774         0.0692 0.896   0.651
#> 6 6 0.730           0.602       0.779         0.0561 0.876   0.528

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
#> GSM1105438     2  0.0000      0.888 0.000 1.000
#> GSM1105486     2  0.0000      0.888 0.000 1.000
#> GSM1105487     1  0.0000      0.970 1.000 0.000
#> GSM1105490     2  0.0000      0.888 0.000 1.000
#> GSM1105491     2  0.5946      0.857 0.144 0.856
#> GSM1105495     2  0.0000      0.888 0.000 1.000
#> GSM1105498     2  0.6531      0.843 0.168 0.832
#> GSM1105499     1  0.0000      0.970 1.000 0.000
#> GSM1105506     2  0.0000      0.888 0.000 1.000
#> GSM1105442     2  0.5946      0.857 0.144 0.856
#> GSM1105511     2  0.6148      0.853 0.152 0.848
#> GSM1105514     2  0.0000      0.888 0.000 1.000
#> GSM1105518     2  0.5629      0.862 0.132 0.868
#> GSM1105522     1  0.0000      0.970 1.000 0.000
#> GSM1105534     1  0.0000      0.970 1.000 0.000
#> GSM1105535     1  0.0000      0.970 1.000 0.000
#> GSM1105538     1  0.0000      0.970 1.000 0.000
#> GSM1105542     2  0.5946      0.857 0.144 0.856
#> GSM1105443     2  0.0000      0.888 0.000 1.000
#> GSM1105551     1  0.0000      0.970 1.000 0.000
#> GSM1105554     1  0.0000      0.970 1.000 0.000
#> GSM1105555     1  0.0000      0.970 1.000 0.000
#> GSM1105447     2  0.0000      0.888 0.000 1.000
#> GSM1105467     2  0.0000      0.888 0.000 1.000
#> GSM1105470     2  0.0000      0.888 0.000 1.000
#> GSM1105471     2  0.0000      0.888 0.000 1.000
#> GSM1105474     2  0.0000      0.888 0.000 1.000
#> GSM1105475     2  0.0000      0.888 0.000 1.000
#> GSM1105440     1  0.0000      0.970 1.000 0.000
#> GSM1105488     2  0.5946      0.857 0.144 0.856
#> GSM1105489     1  0.0000      0.970 1.000 0.000
#> GSM1105492     1  0.0000      0.970 1.000 0.000
#> GSM1105493     1  0.0000      0.970 1.000 0.000
#> GSM1105497     2  0.5946      0.857 0.144 0.856
#> GSM1105500     2  0.6712      0.837 0.176 0.824
#> GSM1105501     2  0.5946      0.857 0.144 0.856
#> GSM1105508     1  0.7883      0.621 0.764 0.236
#> GSM1105444     2  0.0000      0.888 0.000 1.000
#> GSM1105513     2  0.0000      0.888 0.000 1.000
#> GSM1105516     2  0.9866      0.450 0.432 0.568
#> GSM1105520     2  0.5629      0.862 0.132 0.868
#> GSM1105524     1  0.0000      0.970 1.000 0.000
#> GSM1105536     2  0.7883      0.785 0.236 0.764
#> GSM1105537     1  0.0000      0.970 1.000 0.000
#> GSM1105540     2  0.8016      0.776 0.244 0.756
#> GSM1105544     2  0.7950      0.780 0.240 0.760
#> GSM1105445     2  0.0000      0.888 0.000 1.000
#> GSM1105553     2  0.6712      0.837 0.176 0.824
#> GSM1105556     1  0.0000      0.970 1.000 0.000
#> GSM1105557     2  0.0376      0.887 0.004 0.996
#> GSM1105449     2  0.0000      0.888 0.000 1.000
#> GSM1105469     2  0.6247      0.851 0.156 0.844
#> GSM1105472     2  0.0000      0.888 0.000 1.000
#> GSM1105473     1  0.8713      0.494 0.708 0.292
#> GSM1105476     2  0.0000      0.888 0.000 1.000
#> GSM1105477     2  0.7950      0.780 0.240 0.760
#> GSM1105478     2  0.0000      0.888 0.000 1.000
#> GSM1105510     2  0.5946      0.857 0.144 0.856
#> GSM1105530     1  0.0000      0.970 1.000 0.000
#> GSM1105539     1  0.0000      0.970 1.000 0.000
#> GSM1105480     2  0.0938      0.887 0.012 0.988
#> GSM1105512     1  0.0000      0.970 1.000 0.000
#> GSM1105532     1  0.0000      0.970 1.000 0.000
#> GSM1105541     1  0.0000      0.970 1.000 0.000
#> GSM1105439     2  0.0000      0.888 0.000 1.000
#> GSM1105463     1  0.8713      0.494 0.708 0.292
#> GSM1105482     1  0.0000      0.970 1.000 0.000
#> GSM1105483     2  0.6247      0.851 0.156 0.844
#> GSM1105494     2  0.1184      0.886 0.016 0.984
#> GSM1105503     2  0.5629      0.862 0.132 0.868
#> GSM1105507     2  0.9909      0.420 0.444 0.556
#> GSM1105446     2  0.3274      0.879 0.060 0.940
#> GSM1105519     1  0.0000      0.970 1.000 0.000
#> GSM1105526     2  0.4939      0.869 0.108 0.892
#> GSM1105527     2  0.3733      0.877 0.072 0.928
#> GSM1105531     2  0.8207      0.762 0.256 0.744
#> GSM1105543     2  0.0000      0.888 0.000 1.000
#> GSM1105546     1  0.0000      0.970 1.000 0.000
#> GSM1105547     1  0.0000      0.970 1.000 0.000
#> GSM1105455     2  0.0000      0.888 0.000 1.000
#> GSM1105458     2  0.0000      0.888 0.000 1.000
#> GSM1105459     2  0.0000      0.888 0.000 1.000
#> GSM1105462     2  0.7883      0.785 0.236 0.764
#> GSM1105441     2  0.0000      0.888 0.000 1.000
#> GSM1105465     2  0.5946      0.857 0.144 0.856
#> GSM1105484     2  0.0000      0.888 0.000 1.000
#> GSM1105485     2  0.5946      0.857 0.144 0.856
#> GSM1105496     2  0.6712      0.837 0.176 0.824
#> GSM1105505     2  0.9909      0.420 0.444 0.556
#> GSM1105509     2  0.9909      0.420 0.444 0.556
#> GSM1105448     2  0.0000      0.888 0.000 1.000
#> GSM1105521     1  0.0000      0.970 1.000 0.000
#> GSM1105528     2  0.0000      0.888 0.000 1.000
#> GSM1105529     2  0.5946      0.857 0.144 0.856
#> GSM1105533     1  0.0000      0.970 1.000 0.000
#> GSM1105545     2  0.7883      0.785 0.236 0.764
#> GSM1105548     1  0.0000      0.970 1.000 0.000
#> GSM1105549     1  0.0000      0.970 1.000 0.000
#> GSM1105457     2  0.0000      0.888 0.000 1.000
#> GSM1105460     2  0.0000      0.888 0.000 1.000
#> GSM1105461     2  0.0000      0.888 0.000 1.000
#> GSM1105464     1  0.0938      0.958 0.988 0.012
#> GSM1105466     2  0.0000      0.888 0.000 1.000
#> GSM1105479     2  0.0000      0.888 0.000 1.000
#> GSM1105502     1  0.0000      0.970 1.000 0.000
#> GSM1105515     1  0.0000      0.970 1.000 0.000
#> GSM1105523     2  0.9686      0.535 0.396 0.604
#> GSM1105550     2  0.8081      0.772 0.248 0.752
#> GSM1105450     2  0.0000      0.888 0.000 1.000
#> GSM1105451     2  0.0000      0.888 0.000 1.000
#> GSM1105454     2  0.0000      0.888 0.000 1.000
#> GSM1105468     2  0.0000      0.888 0.000 1.000
#> GSM1105481     2  0.0000      0.888 0.000 1.000
#> GSM1105504     2  0.9909      0.420 0.444 0.556
#> GSM1105517     2  0.8081      0.772 0.248 0.752
#> GSM1105525     2  0.9686      0.535 0.396 0.604
#> GSM1105552     2  0.8144      0.767 0.252 0.748
#> GSM1105452     2  0.5946      0.857 0.144 0.856
#> GSM1105453     2  0.0000      0.888 0.000 1.000
#> GSM1105456     2  0.0000      0.888 0.000 1.000

show/hide code output

cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#>            class entropy silhouette    p1    p2    p3
#> GSM1105438     2  0.2066     0.8731 0.000 0.940 0.060
#> GSM1105486     2  0.4178     0.8431 0.000 0.828 0.172
#> GSM1105487     1  0.0000     0.9146 1.000 0.000 0.000
#> GSM1105490     2  0.4504     0.8172 0.000 0.804 0.196
#> GSM1105491     3  0.2878     0.8174 0.000 0.096 0.904
#> GSM1105495     2  0.5397     0.7243 0.000 0.720 0.280
#> GSM1105498     3  0.2356     0.8229 0.000 0.072 0.928
#> GSM1105499     1  0.0000     0.9146 1.000 0.000 0.000
#> GSM1105506     2  0.3412     0.8656 0.000 0.876 0.124
#> GSM1105442     3  0.2878     0.8174 0.000 0.096 0.904
#> GSM1105511     3  0.4504     0.7386 0.000 0.196 0.804
#> GSM1105514     2  0.2066     0.8731 0.000 0.940 0.060
#> GSM1105518     3  0.5291     0.6435 0.000 0.268 0.732
#> GSM1105522     1  0.5016     0.7695 0.760 0.000 0.240
#> GSM1105534     1  0.0000     0.9146 1.000 0.000 0.000
#> GSM1105535     1  0.0000     0.9146 1.000 0.000 0.000
#> GSM1105538     1  0.0000     0.9146 1.000 0.000 0.000
#> GSM1105542     3  0.2878     0.8174 0.000 0.096 0.904
#> GSM1105443     2  0.0000     0.8721 0.000 1.000 0.000
#> GSM1105551     1  0.1753     0.9048 0.952 0.000 0.048
#> GSM1105554     1  0.0000     0.9146 1.000 0.000 0.000
#> GSM1105555     1  0.1753     0.9048 0.952 0.000 0.048
#> GSM1105447     2  0.4346     0.8291 0.000 0.816 0.184
#> GSM1105467     2  0.4062     0.8479 0.000 0.836 0.164
#> GSM1105470     2  0.0000     0.8721 0.000 1.000 0.000
#> GSM1105471     2  0.3482     0.8628 0.000 0.872 0.128
#> GSM1105474     2  0.4178     0.8431 0.000 0.828 0.172
#> GSM1105475     2  0.3619     0.8604 0.000 0.864 0.136
#> GSM1105440     1  0.1753     0.9048 0.952 0.000 0.048
#> GSM1105488     3  0.2878     0.8174 0.000 0.096 0.904
#> GSM1105489     1  0.0000     0.9146 1.000 0.000 0.000
#> GSM1105492     1  0.0000     0.9146 1.000 0.000 0.000
#> GSM1105493     1  0.0000     0.9146 1.000 0.000 0.000
#> GSM1105497     3  0.2878     0.8174 0.000 0.096 0.904
#> GSM1105500     3  0.2165     0.8236 0.000 0.064 0.936
#> GSM1105501     3  0.4750     0.7152 0.000 0.216 0.784
#> GSM1105508     1  0.6299     0.2414 0.524 0.000 0.476
#> GSM1105444     2  0.0000     0.8721 0.000 1.000 0.000
#> GSM1105513     2  0.4555     0.8142 0.000 0.800 0.200
#> GSM1105516     3  0.4452     0.6526 0.192 0.000 0.808
#> GSM1105520     3  0.5291     0.6435 0.000 0.268 0.732
#> GSM1105524     1  0.0000     0.9146 1.000 0.000 0.000
#> GSM1105536     3  0.0237     0.8198 0.000 0.004 0.996
#> GSM1105537     1  0.0000     0.9146 1.000 0.000 0.000
#> GSM1105540     3  0.0237     0.8183 0.004 0.000 0.996
#> GSM1105544     3  0.0000     0.8186 0.000 0.000 1.000
#> GSM1105445     2  0.2878     0.8723 0.000 0.904 0.096
#> GSM1105553     3  0.2165     0.8236 0.000 0.064 0.936
#> GSM1105556     1  0.0000     0.9146 1.000 0.000 0.000
#> GSM1105557     2  0.5098     0.7536 0.000 0.752 0.248
#> GSM1105449     2  0.0000     0.8721 0.000 1.000 0.000
#> GSM1105469     3  0.4235     0.7601 0.000 0.176 0.824
#> GSM1105472     2  0.0000     0.8721 0.000 1.000 0.000
#> GSM1105473     3  0.6291    -0.0785 0.468 0.000 0.532
#> GSM1105476     2  0.4178     0.8431 0.000 0.828 0.172
#> GSM1105477     3  0.0000     0.8186 0.000 0.000 1.000
#> GSM1105478     2  0.4974     0.7803 0.000 0.764 0.236
#> GSM1105510     3  0.2878     0.8174 0.000 0.096 0.904
#> GSM1105530     1  0.5016     0.7695 0.760 0.000 0.240
#> GSM1105539     1  0.2165     0.8984 0.936 0.000 0.064
#> GSM1105480     2  0.5905     0.5828 0.000 0.648 0.352
#> GSM1105512     1  0.4235     0.8238 0.824 0.000 0.176
#> GSM1105532     1  0.5016     0.7695 0.760 0.000 0.240
#> GSM1105541     1  0.2165     0.8984 0.936 0.000 0.064
#> GSM1105439     2  0.0000     0.8721 0.000 1.000 0.000
#> GSM1105463     3  0.6291    -0.0785 0.468 0.000 0.532
#> GSM1105482     1  0.0000     0.9146 1.000 0.000 0.000
#> GSM1105483     3  0.4235     0.7601 0.000 0.176 0.824
#> GSM1105494     2  0.5785     0.6273 0.000 0.668 0.332
#> GSM1105503     3  0.5291     0.6435 0.000 0.268 0.732
#> GSM1105507     3  0.4605     0.6359 0.204 0.000 0.796
#> GSM1105446     3  0.6215     0.1650 0.000 0.428 0.572
#> GSM1105519     1  0.4931     0.7774 0.768 0.000 0.232
#> GSM1105526     3  0.5138     0.6533 0.000 0.252 0.748
#> GSM1105527     3  0.6140     0.2752 0.000 0.404 0.596
#> GSM1105531     3  0.0747     0.8163 0.016 0.000 0.984
#> GSM1105543     2  0.5058     0.7671 0.000 0.756 0.244
#> GSM1105546     1  0.0000     0.9146 1.000 0.000 0.000
#> GSM1105547     1  0.0000     0.9146 1.000 0.000 0.000
#> GSM1105455     2  0.0000     0.8721 0.000 1.000 0.000
#> GSM1105458     2  0.1643     0.8742 0.000 0.956 0.044
#> GSM1105459     2  0.0000     0.8721 0.000 1.000 0.000
#> GSM1105462     3  0.0237     0.8198 0.000 0.004 0.996
#> GSM1105441     2  0.0000     0.8721 0.000 1.000 0.000
#> GSM1105465     3  0.2878     0.8174 0.000 0.096 0.904
#> GSM1105484     2  0.5058     0.7671 0.000 0.756 0.244
#> GSM1105485     3  0.2878     0.8174 0.000 0.096 0.904
#> GSM1105496     3  0.2165     0.8236 0.000 0.064 0.936
#> GSM1105505     3  0.4605     0.6359 0.204 0.000 0.796
#> GSM1105509     3  0.4605     0.6359 0.204 0.000 0.796
#> GSM1105448     2  0.0000     0.8721 0.000 1.000 0.000
#> GSM1105521     1  0.4931     0.7774 0.768 0.000 0.232
#> GSM1105528     2  0.5397     0.7243 0.000 0.720 0.280
#> GSM1105529     3  0.2878     0.8174 0.000 0.096 0.904
#> GSM1105533     1  0.0000     0.9146 1.000 0.000 0.000
#> GSM1105545     3  0.0237     0.8198 0.000 0.004 0.996
#> GSM1105548     1  0.1753     0.9048 0.952 0.000 0.048
#> GSM1105549     1  0.0000     0.9146 1.000 0.000 0.000
#> GSM1105457     2  0.2878     0.8709 0.000 0.904 0.096
#> GSM1105460     2  0.0000     0.8721 0.000 1.000 0.000
#> GSM1105461     2  0.0000     0.8721 0.000 1.000 0.000
#> GSM1105464     1  0.5138     0.7538 0.748 0.000 0.252
#> GSM1105466     2  0.3482     0.8628 0.000 0.872 0.128
#> GSM1105479     2  0.3482     0.8628 0.000 0.872 0.128
#> GSM1105502     1  0.5016     0.7695 0.760 0.000 0.240
#> GSM1105515     1  0.0000     0.9146 1.000 0.000 0.000
#> GSM1105523     3  0.3941     0.7096 0.156 0.000 0.844
#> GSM1105550     3  0.0424     0.8179 0.008 0.000 0.992
#> GSM1105450     2  0.0000     0.8721 0.000 1.000 0.000
#> GSM1105451     2  0.0000     0.8721 0.000 1.000 0.000
#> GSM1105454     2  0.0000     0.8721 0.000 1.000 0.000
#> GSM1105468     2  0.0000     0.8721 0.000 1.000 0.000
#> GSM1105481     2  0.5397     0.7243 0.000 0.720 0.280
#> GSM1105504     3  0.4605     0.6359 0.204 0.000 0.796
#> GSM1105517     3  0.0424     0.8179 0.008 0.000 0.992
#> GSM1105525     3  0.3941     0.7096 0.156 0.000 0.844
#> GSM1105552     3  0.0592     0.8171 0.012 0.000 0.988
#> GSM1105452     3  0.2878     0.8174 0.000 0.096 0.904
#> GSM1105453     2  0.4654     0.8074 0.000 0.792 0.208
#> GSM1105456     2  0.0000     0.8721 0.000 1.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
#> GSM1105438     2  0.2281     0.8286 0.000 0.904 0.000 0.096
#> GSM1105486     2  0.4669     0.7854 0.000 0.780 0.052 0.168
#> GSM1105487     1  0.0000     0.8682 1.000 0.000 0.000 0.000
#> GSM1105490     2  0.5159     0.7548 0.000 0.756 0.088 0.156
#> GSM1105491     4  0.0592     0.6252 0.000 0.000 0.016 0.984
#> GSM1105495     2  0.4697     0.6074 0.000 0.644 0.000 0.356
#> GSM1105498     4  0.5295     0.1425 0.000 0.008 0.488 0.504
#> GSM1105499     1  0.0000     0.8682 1.000 0.000 0.000 0.000
#> GSM1105506     2  0.3761     0.8187 0.000 0.852 0.068 0.080
#> GSM1105442     4  0.0592     0.6252 0.000 0.000 0.016 0.984
#> GSM1105511     4  0.6961     0.4069 0.000 0.116 0.388 0.496
#> GSM1105514     2  0.2281     0.8286 0.000 0.904 0.000 0.096
#> GSM1105518     4  0.7386     0.4545 0.000 0.184 0.320 0.496
#> GSM1105522     1  0.4916     0.5442 0.576 0.000 0.424 0.000
#> GSM1105534     1  0.0000     0.8682 1.000 0.000 0.000 0.000
#> GSM1105535     1  0.0000     0.8682 1.000 0.000 0.000 0.000
#> GSM1105538     1  0.0000     0.8682 1.000 0.000 0.000 0.000
#> GSM1105542     4  0.0592     0.6252 0.000 0.000 0.016 0.984
#> GSM1105443     2  0.0188     0.8385 0.000 0.996 0.000 0.004
#> GSM1105551     1  0.1637     0.8495 0.940 0.000 0.060 0.000
#> GSM1105554     1  0.0000     0.8682 1.000 0.000 0.000 0.000
#> GSM1105555     1  0.1637     0.8495 0.940 0.000 0.060 0.000
#> GSM1105447     2  0.3975     0.7574 0.000 0.760 0.000 0.240
#> GSM1105467     2  0.4578     0.7910 0.000 0.788 0.052 0.160
#> GSM1105470     2  0.0188     0.8385 0.000 0.996 0.000 0.004
#> GSM1105471     2  0.3840     0.8154 0.000 0.844 0.052 0.104
#> GSM1105474     2  0.4669     0.7854 0.000 0.780 0.052 0.168
#> GSM1105475     2  0.3958     0.8132 0.000 0.836 0.052 0.112
#> GSM1105440     1  0.1637     0.8495 0.940 0.000 0.060 0.000
#> GSM1105488     4  0.0592     0.6252 0.000 0.000 0.016 0.984
#> GSM1105489     1  0.0000     0.8682 1.000 0.000 0.000 0.000
#> GSM1105492     1  0.0000     0.8682 1.000 0.000 0.000 0.000
#> GSM1105493     1  0.0000     0.8682 1.000 0.000 0.000 0.000
#> GSM1105497     4  0.0592     0.6252 0.000 0.000 0.016 0.984
#> GSM1105500     4  0.4998     0.1378 0.000 0.000 0.488 0.512
#> GSM1105501     4  0.7082     0.4286 0.000 0.132 0.368 0.500
#> GSM1105508     3  0.4624     0.0761 0.340 0.000 0.660 0.000
#> GSM1105444     2  0.0188     0.8385 0.000 0.996 0.000 0.004
#> GSM1105513     2  0.5204     0.7519 0.000 0.752 0.088 0.160
#> GSM1105516     3  0.2759     0.6385 0.052 0.000 0.904 0.044
#> GSM1105520     4  0.7386     0.4545 0.000 0.184 0.320 0.496
#> GSM1105524     1  0.0000     0.8682 1.000 0.000 0.000 0.000
#> GSM1105536     3  0.4679     0.4097 0.000 0.000 0.648 0.352
#> GSM1105537     1  0.0000     0.8682 1.000 0.000 0.000 0.000
#> GSM1105540     3  0.4454     0.4852 0.000 0.000 0.692 0.308
#> GSM1105544     3  0.4643     0.4270 0.000 0.000 0.656 0.344
#> GSM1105445     2  0.3333     0.8303 0.000 0.872 0.040 0.088
#> GSM1105553     4  0.4277     0.4671 0.000 0.000 0.280 0.720
#> GSM1105556     1  0.0000     0.8682 1.000 0.000 0.000 0.000
#> GSM1105557     2  0.5681     0.6909 0.000 0.704 0.088 0.208
#> GSM1105449     2  0.0188     0.8385 0.000 0.996 0.000 0.004
#> GSM1105469     4  0.6799     0.3271 0.000 0.096 0.440 0.464
#> GSM1105472     2  0.0188     0.8385 0.000 0.996 0.000 0.004
#> GSM1105473     3  0.5206     0.2237 0.308 0.000 0.668 0.024
#> GSM1105476     2  0.4669     0.7854 0.000 0.780 0.052 0.168
#> GSM1105477     3  0.4679     0.4127 0.000 0.000 0.648 0.352
#> GSM1105478     2  0.5678     0.7151 0.000 0.716 0.112 0.172
#> GSM1105510     4  0.0592     0.6252 0.000 0.000 0.016 0.984
#> GSM1105530     1  0.4916     0.5442 0.576 0.000 0.424 0.000
#> GSM1105539     1  0.3356     0.7857 0.824 0.000 0.176 0.000
#> GSM1105480     2  0.6716     0.4576 0.000 0.568 0.112 0.320
#> GSM1105512     1  0.4661     0.6369 0.652 0.000 0.348 0.000
#> GSM1105532     1  0.4916     0.5442 0.576 0.000 0.424 0.000
#> GSM1105541     1  0.3356     0.7857 0.824 0.000 0.176 0.000
#> GSM1105439     2  0.0188     0.8385 0.000 0.996 0.000 0.004
#> GSM1105463     3  0.5206     0.2237 0.308 0.000 0.668 0.024
#> GSM1105482     1  0.0000     0.8682 1.000 0.000 0.000 0.000
#> GSM1105483     4  0.6799     0.3271 0.000 0.096 0.440 0.464
#> GSM1105494     2  0.6627     0.5074 0.000 0.588 0.112 0.300
#> GSM1105503     4  0.7386     0.4545 0.000 0.184 0.320 0.496
#> GSM1105507     3  0.2660     0.6369 0.056 0.000 0.908 0.036
#> GSM1105446     4  0.4605     0.1979 0.000 0.336 0.000 0.664
#> GSM1105519     1  0.4888     0.5606 0.588 0.000 0.412 0.000
#> GSM1105526     4  0.7048     0.4870 0.000 0.160 0.284 0.556
#> GSM1105527     4  0.7834     0.3419 0.000 0.320 0.276 0.404
#> GSM1105531     3  0.3801     0.5753 0.000 0.000 0.780 0.220
#> GSM1105543     2  0.4522     0.6565 0.000 0.680 0.000 0.320
#> GSM1105546     1  0.0000     0.8682 1.000 0.000 0.000 0.000
#> GSM1105547     1  0.0000     0.8682 1.000 0.000 0.000 0.000
#> GSM1105455     2  0.0188     0.8385 0.000 0.996 0.000 0.004
#> GSM1105458     2  0.1716     0.8364 0.000 0.936 0.000 0.064
#> GSM1105459     2  0.0188     0.8385 0.000 0.996 0.000 0.004
#> GSM1105462     3  0.4624     0.4326 0.000 0.000 0.660 0.340
#> GSM1105441     2  0.0188     0.8385 0.000 0.996 0.000 0.004
#> GSM1105465     4  0.0592     0.6252 0.000 0.000 0.016 0.984
#> GSM1105484     2  0.4522     0.6565 0.000 0.680 0.000 0.320
#> GSM1105485     4  0.0592     0.6252 0.000 0.000 0.016 0.984
#> GSM1105496     4  0.4277     0.4671 0.000 0.000 0.280 0.720
#> GSM1105505     3  0.2660     0.6369 0.056 0.000 0.908 0.036
#> GSM1105509     3  0.2660     0.6369 0.056 0.000 0.908 0.036
#> GSM1105448     2  0.0188     0.8385 0.000 0.996 0.000 0.004
#> GSM1105521     1  0.4888     0.5606 0.588 0.000 0.412 0.000
#> GSM1105528     2  0.4713     0.6004 0.000 0.640 0.000 0.360
#> GSM1105529     4  0.0592     0.6252 0.000 0.000 0.016 0.984
#> GSM1105533     1  0.0000     0.8682 1.000 0.000 0.000 0.000
#> GSM1105545     3  0.4697     0.3999 0.000 0.000 0.644 0.356
#> GSM1105548     1  0.1637     0.8495 0.940 0.000 0.060 0.000
#> GSM1105549     1  0.0000     0.8682 1.000 0.000 0.000 0.000
#> GSM1105457     2  0.3229     0.8274 0.000 0.880 0.048 0.072
#> GSM1105460     2  0.0000     0.8387 0.000 1.000 0.000 0.000
#> GSM1105461     2  0.0188     0.8385 0.000 0.996 0.000 0.004
#> GSM1105464     1  0.5097     0.5271 0.568 0.000 0.428 0.004
#> GSM1105466     2  0.3840     0.8154 0.000 0.844 0.052 0.104
#> GSM1105479     2  0.3840     0.8154 0.000 0.844 0.052 0.104
#> GSM1105502     1  0.4916     0.5442 0.576 0.000 0.424 0.000
#> GSM1105515     1  0.0000     0.8682 1.000 0.000 0.000 0.000
#> GSM1105523     3  0.1389     0.6285 0.000 0.000 0.952 0.048
#> GSM1105550     3  0.4040     0.5547 0.000 0.000 0.752 0.248
#> GSM1105450     2  0.0188     0.8385 0.000 0.996 0.000 0.004
#> GSM1105451     2  0.0188     0.8385 0.000 0.996 0.000 0.004
#> GSM1105454     2  0.0188     0.8389 0.000 0.996 0.000 0.004
#> GSM1105468     2  0.0188     0.8385 0.000 0.996 0.000 0.004
#> GSM1105481     2  0.4697     0.6074 0.000 0.644 0.000 0.356
#> GSM1105504     3  0.2660     0.6369 0.056 0.000 0.908 0.036
#> GSM1105517     3  0.4040     0.5547 0.000 0.000 0.752 0.248
#> GSM1105525     3  0.1389     0.6285 0.000 0.000 0.952 0.048
#> GSM1105552     3  0.3726     0.5800 0.000 0.000 0.788 0.212
#> GSM1105452     4  0.0592     0.6252 0.000 0.000 0.016 0.984
#> GSM1105453     2  0.4193     0.7194 0.000 0.732 0.000 0.268
#> GSM1105456     2  0.0188     0.8389 0.000 0.996 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
#> GSM1105438     2  0.3012     0.7805 0.000 0.860 0.000 0.104 0.036
#> GSM1105486     2  0.4671     0.6909 0.000 0.640 0.000 0.332 0.028
#> GSM1105487     1  0.0000     0.9382 1.000 0.000 0.000 0.000 0.000
#> GSM1105490     2  0.4114     0.6576 0.000 0.624 0.000 0.376 0.000
#> GSM1105491     5  0.0000     0.8628 0.000 0.000 0.000 0.000 1.000
#> GSM1105495     2  0.5895     0.5926 0.000 0.588 0.000 0.152 0.260
#> GSM1105498     4  0.5810     0.5174 0.000 0.000 0.176 0.612 0.212
#> GSM1105499     1  0.0000     0.9382 1.000 0.000 0.000 0.000 0.000
#> GSM1105506     2  0.3684     0.7365 0.000 0.720 0.000 0.280 0.000
#> GSM1105442     5  0.0000     0.8628 0.000 0.000 0.000 0.000 1.000
#> GSM1105511     4  0.3587     0.5269 0.000 0.012 0.024 0.824 0.140
#> GSM1105514     2  0.3012     0.7805 0.000 0.860 0.000 0.104 0.036
#> GSM1105518     4  0.4693     0.4972 0.000 0.084 0.012 0.756 0.148
#> GSM1105522     3  0.3876     0.4479 0.316 0.000 0.684 0.000 0.000
#> GSM1105534     1  0.0000     0.9382 1.000 0.000 0.000 0.000 0.000
#> GSM1105535     1  0.0000     0.9382 1.000 0.000 0.000 0.000 0.000
#> GSM1105538     1  0.0000     0.9382 1.000 0.000 0.000 0.000 0.000
#> GSM1105542     5  0.0000     0.8628 0.000 0.000 0.000 0.000 1.000
#> GSM1105443     2  0.1124     0.7908 0.000 0.960 0.004 0.036 0.000
#> GSM1105551     1  0.2074     0.8623 0.896 0.000 0.104 0.000 0.000
#> GSM1105554     1  0.0000     0.9382 1.000 0.000 0.000 0.000 0.000
#> GSM1105555     1  0.2074     0.8623 0.896 0.000 0.104 0.000 0.000
#> GSM1105447     2  0.5200     0.7193 0.000 0.688 0.000 0.156 0.156
#> GSM1105467     2  0.4638     0.6951 0.000 0.648 0.000 0.324 0.028
#> GSM1105470     2  0.1041     0.7902 0.000 0.964 0.004 0.032 0.000
#> GSM1105471     2  0.3730     0.7242 0.000 0.712 0.000 0.288 0.000
#> GSM1105474     2  0.4671     0.6894 0.000 0.640 0.000 0.332 0.028
#> GSM1105475     2  0.3730     0.7251 0.000 0.712 0.000 0.288 0.000
#> GSM1105440     1  0.2074     0.8623 0.896 0.000 0.104 0.000 0.000
#> GSM1105488     5  0.0000     0.8628 0.000 0.000 0.000 0.000 1.000
#> GSM1105489     1  0.0000     0.9382 1.000 0.000 0.000 0.000 0.000
#> GSM1105492     1  0.0000     0.9382 1.000 0.000 0.000 0.000 0.000
#> GSM1105493     1  0.0162     0.9363 0.996 0.000 0.004 0.000 0.000
#> GSM1105497     5  0.0000     0.8628 0.000 0.000 0.000 0.000 1.000
#> GSM1105500     4  0.6155     0.4807 0.000 0.000 0.176 0.548 0.276
#> GSM1105501     4  0.3732     0.5194 0.000 0.024 0.016 0.816 0.144
#> GSM1105508     3  0.4247     0.5480 0.132 0.000 0.776 0.092 0.000
#> GSM1105444     2  0.1041     0.7902 0.000 0.964 0.004 0.032 0.000
#> GSM1105513     2  0.4126     0.6573 0.000 0.620 0.000 0.380 0.000
#> GSM1105516     3  0.4455     0.3128 0.000 0.000 0.704 0.260 0.036
#> GSM1105520     4  0.4693     0.4972 0.000 0.084 0.012 0.756 0.148
#> GSM1105524     1  0.0000     0.9382 1.000 0.000 0.000 0.000 0.000
#> GSM1105536     4  0.6514     0.4615 0.000 0.000 0.304 0.476 0.220
#> GSM1105537     1  0.0000     0.9382 1.000 0.000 0.000 0.000 0.000
#> GSM1105540     4  0.6418     0.4158 0.000 0.000 0.344 0.472 0.184
#> GSM1105544     4  0.6506     0.4543 0.000 0.000 0.308 0.476 0.216
#> GSM1105445     2  0.3305     0.7652 0.000 0.776 0.000 0.224 0.000
#> GSM1105553     5  0.5795     0.2029 0.000 0.000 0.136 0.268 0.596
#> GSM1105556     1  0.0404     0.9324 0.988 0.000 0.012 0.000 0.000
#> GSM1105557     2  0.4649     0.6041 0.000 0.580 0.000 0.404 0.016
#> GSM1105449     2  0.1041     0.7902 0.000 0.964 0.004 0.032 0.000
#> GSM1105469     4  0.3527     0.5416 0.000 0.000 0.056 0.828 0.116
#> GSM1105472     2  0.1041     0.7902 0.000 0.964 0.004 0.032 0.000
#> GSM1105473     3  0.4374     0.5425 0.112 0.000 0.792 0.076 0.020
#> GSM1105476     2  0.4671     0.6894 0.000 0.640 0.000 0.332 0.028
#> GSM1105477     4  0.6503     0.4593 0.000 0.000 0.300 0.480 0.220
#> GSM1105478     2  0.4273     0.5811 0.000 0.552 0.000 0.448 0.000
#> GSM1105510     5  0.0000     0.8628 0.000 0.000 0.000 0.000 1.000
#> GSM1105530     3  0.3857     0.4519 0.312 0.000 0.688 0.000 0.000
#> GSM1105539     1  0.4138     0.3771 0.616 0.000 0.384 0.000 0.000
#> GSM1105480     4  0.5478    -0.3838 0.000 0.420 0.000 0.516 0.064
#> GSM1105512     3  0.4227     0.2221 0.420 0.000 0.580 0.000 0.000
#> GSM1105532     3  0.3857     0.4519 0.312 0.000 0.688 0.000 0.000
#> GSM1105541     1  0.4138     0.3771 0.616 0.000 0.384 0.000 0.000
#> GSM1105439     2  0.1041     0.7902 0.000 0.964 0.004 0.032 0.000
#> GSM1105463     3  0.4374     0.5425 0.112 0.000 0.792 0.076 0.020
#> GSM1105482     1  0.0000     0.9382 1.000 0.000 0.000 0.000 0.000
#> GSM1105483     4  0.3527     0.5416 0.000 0.000 0.056 0.828 0.116
#> GSM1105494     4  0.5276    -0.4188 0.000 0.436 0.000 0.516 0.048
#> GSM1105503     4  0.4693     0.4972 0.000 0.084 0.012 0.756 0.148
#> GSM1105507     3  0.4378     0.3342 0.000 0.000 0.716 0.248 0.036
#> GSM1105446     5  0.5834     0.2736 0.000 0.276 0.000 0.136 0.588
#> GSM1105519     3  0.3999     0.4102 0.344 0.000 0.656 0.000 0.000
#> GSM1105526     4  0.5450     0.3981 0.000 0.072 0.016 0.660 0.252
#> GSM1105527     4  0.4393     0.3555 0.000 0.168 0.000 0.756 0.076
#> GSM1105531     4  0.6101     0.2920 0.000 0.000 0.432 0.444 0.124
#> GSM1105543     2  0.5690     0.6383 0.000 0.624 0.000 0.152 0.224
#> GSM1105546     1  0.0000     0.9382 1.000 0.000 0.000 0.000 0.000
#> GSM1105547     1  0.0000     0.9382 1.000 0.000 0.000 0.000 0.000
#> GSM1105455     2  0.1124     0.7908 0.000 0.960 0.004 0.036 0.000
#> GSM1105458     2  0.2408     0.7908 0.000 0.892 0.000 0.092 0.016
#> GSM1105459     2  0.1041     0.7902 0.000 0.964 0.004 0.032 0.000
#> GSM1105462     4  0.6487     0.4547 0.000 0.000 0.316 0.476 0.208
#> GSM1105441     2  0.1041     0.7902 0.000 0.964 0.004 0.032 0.000
#> GSM1105465     5  0.0000     0.8628 0.000 0.000 0.000 0.000 1.000
#> GSM1105484     2  0.5690     0.6383 0.000 0.624 0.000 0.152 0.224
#> GSM1105485     5  0.0000     0.8628 0.000 0.000 0.000 0.000 1.000
#> GSM1105496     5  0.5795     0.2029 0.000 0.000 0.136 0.268 0.596
#> GSM1105505     3  0.4378     0.3342 0.000 0.000 0.716 0.248 0.036
#> GSM1105509     3  0.4378     0.3342 0.000 0.000 0.716 0.248 0.036
#> GSM1105448     2  0.1041     0.7902 0.000 0.964 0.004 0.032 0.000
#> GSM1105521     3  0.3999     0.4102 0.344 0.000 0.656 0.000 0.000
#> GSM1105528     2  0.5915     0.5861 0.000 0.584 0.000 0.152 0.264
#> GSM1105529     5  0.0000     0.8628 0.000 0.000 0.000 0.000 1.000
#> GSM1105533     1  0.0000     0.9382 1.000 0.000 0.000 0.000 0.000
#> GSM1105545     4  0.6503     0.4637 0.000 0.000 0.300 0.480 0.220
#> GSM1105548     1  0.2074     0.8623 0.896 0.000 0.104 0.000 0.000
#> GSM1105549     1  0.0404     0.9324 0.988 0.000 0.012 0.000 0.000
#> GSM1105457     2  0.3305     0.7579 0.000 0.776 0.000 0.224 0.000
#> GSM1105460     2  0.0510     0.7941 0.000 0.984 0.000 0.016 0.000
#> GSM1105461     2  0.1041     0.7902 0.000 0.964 0.004 0.032 0.000
#> GSM1105464     3  0.4142     0.4598 0.308 0.000 0.684 0.004 0.004
#> GSM1105466     2  0.3730     0.7242 0.000 0.712 0.000 0.288 0.000
#> GSM1105479     2  0.3707     0.7257 0.000 0.716 0.000 0.284 0.000
#> GSM1105502     3  0.3876     0.4479 0.316 0.000 0.684 0.000 0.000
#> GSM1105515     1  0.0000     0.9382 1.000 0.000 0.000 0.000 0.000
#> GSM1105523     3  0.4171     0.0552 0.000 0.000 0.604 0.396 0.000
#> GSM1105550     4  0.6180     0.3418 0.000 0.000 0.404 0.460 0.136
#> GSM1105450     2  0.1041     0.7902 0.000 0.964 0.004 0.032 0.000
#> GSM1105451     2  0.1041     0.7902 0.000 0.964 0.004 0.032 0.000
#> GSM1105454     2  0.0880     0.7951 0.000 0.968 0.000 0.032 0.000
#> GSM1105468     2  0.1041     0.7902 0.000 0.964 0.004 0.032 0.000
#> GSM1105481     2  0.5895     0.5926 0.000 0.588 0.000 0.152 0.260
#> GSM1105504     3  0.4378     0.3342 0.000 0.000 0.716 0.248 0.036
#> GSM1105517     4  0.6180     0.3418 0.000 0.000 0.404 0.460 0.136
#> GSM1105525     3  0.4171     0.0552 0.000 0.000 0.604 0.396 0.000
#> GSM1105552     3  0.6132    -0.3370 0.000 0.000 0.440 0.432 0.128
#> GSM1105452     5  0.0000     0.8628 0.000 0.000 0.000 0.000 1.000
#> GSM1105453     2  0.5222     0.6850 0.000 0.680 0.000 0.124 0.196
#> GSM1105456     2  0.0880     0.7951 0.000 0.968 0.000 0.032 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
#> GSM1105438     2  0.4531     0.5394 0.000 0.684 0.020 0.264 0.028 0.004
#> GSM1105486     4  0.4486     0.2506 0.000 0.364 0.012 0.604 0.020 0.000
#> GSM1105487     1  0.0000     0.9519 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM1105490     4  0.3563     0.3350 0.000 0.336 0.000 0.664 0.000 0.000
#> GSM1105491     5  0.0363     0.8678 0.000 0.000 0.000 0.000 0.988 0.012
#> GSM1105495     2  0.6568     0.2359 0.000 0.372 0.020 0.368 0.236 0.004
#> GSM1105498     6  0.4787     0.4908 0.000 0.000 0.036 0.236 0.044 0.684
#> GSM1105499     1  0.0000     0.9519 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM1105506     4  0.3864     0.0901 0.000 0.480 0.000 0.520 0.000 0.000
#> GSM1105442     5  0.0363     0.8678 0.000 0.000 0.000 0.000 0.988 0.012
#> GSM1105511     4  0.5303     0.2165 0.000 0.000 0.028 0.568 0.056 0.348
#> GSM1105514     2  0.4531     0.5394 0.000 0.684 0.020 0.264 0.028 0.004
#> GSM1105518     4  0.5525     0.3243 0.000 0.016 0.028 0.616 0.060 0.280
#> GSM1105522     3  0.1753     0.8025 0.084 0.000 0.912 0.000 0.000 0.004
#> GSM1105534     1  0.0000     0.9519 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM1105535     1  0.0000     0.9519 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM1105538     1  0.0632     0.9387 0.976 0.000 0.024 0.000 0.000 0.000
#> GSM1105542     5  0.0363     0.8678 0.000 0.000 0.000 0.000 0.988 0.012
#> GSM1105443     2  0.0260     0.7020 0.000 0.992 0.000 0.008 0.000 0.000
#> GSM1105551     1  0.2491     0.8164 0.836 0.000 0.164 0.000 0.000 0.000
#> GSM1105554     1  0.0000     0.9519 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM1105555     1  0.2491     0.8164 0.836 0.000 0.164 0.000 0.000 0.000
#> GSM1105447     2  0.5621     0.1824 0.000 0.460 0.000 0.392 0.148 0.000
#> GSM1105467     4  0.4436     0.2562 0.000 0.380 0.008 0.592 0.020 0.000
#> GSM1105470     2  0.0000     0.7045 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1105471     4  0.3851     0.1817 0.000 0.460 0.000 0.540 0.000 0.000
#> GSM1105474     4  0.4416     0.2629 0.000 0.372 0.008 0.600 0.020 0.000
#> GSM1105475     4  0.4080     0.1854 0.000 0.456 0.008 0.536 0.000 0.000
#> GSM1105440     1  0.2491     0.8164 0.836 0.000 0.164 0.000 0.000 0.000
#> GSM1105488     5  0.0363     0.8678 0.000 0.000 0.000 0.000 0.988 0.012
#> GSM1105489     1  0.0000     0.9519 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM1105492     1  0.0000     0.9519 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM1105493     1  0.0146     0.9501 0.996 0.000 0.004 0.000 0.000 0.000
#> GSM1105497     5  0.0363     0.8678 0.000 0.000 0.000 0.000 0.988 0.012
#> GSM1105500     6  0.5157     0.4952 0.000 0.000 0.028 0.152 0.140 0.680
#> GSM1105501     4  0.5295     0.2494 0.000 0.000 0.028 0.584 0.060 0.328
#> GSM1105508     3  0.3360     0.4347 0.000 0.000 0.732 0.004 0.000 0.264
#> GSM1105444     2  0.0146     0.7031 0.000 0.996 0.004 0.000 0.000 0.000
#> GSM1105513     4  0.3684     0.3374 0.000 0.332 0.004 0.664 0.000 0.000
#> GSM1105516     6  0.3819     0.5306 0.000 0.000 0.372 0.004 0.000 0.624
#> GSM1105520     4  0.5525     0.3243 0.000 0.016 0.028 0.616 0.060 0.280
#> GSM1105524     1  0.0000     0.9519 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM1105536     6  0.2009     0.7439 0.000 0.000 0.004 0.008 0.084 0.904
#> GSM1105537     1  0.0000     0.9519 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM1105540     6  0.1867     0.7605 0.000 0.000 0.020 0.000 0.064 0.916
#> GSM1105544     6  0.1753     0.7470 0.000 0.000 0.004 0.000 0.084 0.912
#> GSM1105445     2  0.3966     0.1235 0.000 0.552 0.000 0.444 0.004 0.000
#> GSM1105553     5  0.4865     0.0918 0.000 0.000 0.016 0.028 0.488 0.468
#> GSM1105556     1  0.1714     0.8890 0.908 0.000 0.092 0.000 0.000 0.000
#> GSM1105557     4  0.4022     0.3724 0.000 0.300 0.004 0.680 0.012 0.004
#> GSM1105449     2  0.0000     0.7045 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1105469     4  0.5103     0.1666 0.000 0.000 0.032 0.556 0.032 0.380
#> GSM1105472     2  0.0000     0.7045 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1105473     3  0.3351     0.4457 0.000 0.000 0.712 0.000 0.000 0.288
#> GSM1105476     4  0.4416     0.2629 0.000 0.372 0.008 0.600 0.020 0.000
#> GSM1105477     6  0.1949     0.7430 0.000 0.000 0.004 0.004 0.088 0.904
#> GSM1105478     4  0.3126     0.4183 0.000 0.248 0.000 0.752 0.000 0.000
#> GSM1105510     5  0.0363     0.8678 0.000 0.000 0.000 0.000 0.988 0.012
#> GSM1105530     3  0.1700     0.8014 0.080 0.000 0.916 0.000 0.000 0.004
#> GSM1105539     3  0.3774     0.3638 0.408 0.000 0.592 0.000 0.000 0.000
#> GSM1105480     4  0.3401     0.4698 0.000 0.124 0.008 0.828 0.016 0.024
#> GSM1105512     3  0.2762     0.7480 0.196 0.000 0.804 0.000 0.000 0.000
#> GSM1105532     3  0.1700     0.8014 0.080 0.000 0.916 0.000 0.000 0.004
#> GSM1105541     3  0.3774     0.3638 0.408 0.000 0.592 0.000 0.000 0.000
#> GSM1105439     2  0.0000     0.7045 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1105463     3  0.3351     0.4457 0.000 0.000 0.712 0.000 0.000 0.288
#> GSM1105482     1  0.0000     0.9519 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM1105483     4  0.5103     0.1666 0.000 0.000 0.032 0.556 0.032 0.380
#> GSM1105494     4  0.3043     0.4648 0.000 0.132 0.008 0.836 0.000 0.024
#> GSM1105503     4  0.5525     0.3243 0.000 0.016 0.028 0.616 0.060 0.280
#> GSM1105507     6  0.3852     0.5123 0.000 0.000 0.384 0.004 0.000 0.612
#> GSM1105446     5  0.5573     0.3061 0.000 0.072 0.028 0.328 0.568 0.004
#> GSM1105519     3  0.2146     0.7979 0.116 0.000 0.880 0.000 0.000 0.004
#> GSM1105526     4  0.6166     0.2788 0.000 0.008 0.020 0.544 0.188 0.240
#> GSM1105527     4  0.3497     0.4519 0.000 0.000 0.036 0.800 0.008 0.156
#> GSM1105531     6  0.1983     0.7609 0.000 0.000 0.072 0.000 0.020 0.908
#> GSM1105543     2  0.6451     0.2739 0.000 0.408 0.020 0.368 0.200 0.004
#> GSM1105546     1  0.0000     0.9519 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM1105547     1  0.0000     0.9519 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM1105455     2  0.0260     0.7020 0.000 0.992 0.000 0.008 0.000 0.000
#> GSM1105458     2  0.4039     0.5653 0.000 0.720 0.012 0.248 0.016 0.004
#> GSM1105459     2  0.0000     0.7045 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1105462     6  0.1845     0.7510 0.000 0.000 0.004 0.008 0.072 0.916
#> GSM1105441     2  0.0000     0.7045 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1105465     5  0.0363     0.8678 0.000 0.000 0.000 0.000 0.988 0.012
#> GSM1105484     2  0.6451     0.2739 0.000 0.408 0.020 0.368 0.200 0.004
#> GSM1105485     5  0.0363     0.8678 0.000 0.000 0.000 0.000 0.988 0.012
#> GSM1105496     5  0.4865     0.0918 0.000 0.000 0.016 0.028 0.488 0.468
#> GSM1105505     6  0.3852     0.5123 0.000 0.000 0.384 0.004 0.000 0.612
#> GSM1105509     6  0.3852     0.5123 0.000 0.000 0.384 0.004 0.000 0.612
#> GSM1105448     2  0.0146     0.7031 0.000 0.996 0.004 0.000 0.000 0.000
#> GSM1105521     3  0.2146     0.7979 0.116 0.000 0.880 0.000 0.000 0.004
#> GSM1105528     2  0.6578     0.2307 0.000 0.368 0.020 0.368 0.240 0.004
#> GSM1105529     5  0.0363     0.8678 0.000 0.000 0.000 0.000 0.988 0.012
#> GSM1105533     1  0.0000     0.9519 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM1105545     6  0.2110     0.7414 0.000 0.000 0.004 0.012 0.084 0.900
#> GSM1105548     1  0.2491     0.8164 0.836 0.000 0.164 0.000 0.000 0.000
#> GSM1105549     1  0.1714     0.8890 0.908 0.000 0.092 0.000 0.000 0.000
#> GSM1105457     2  0.3843     0.0420 0.000 0.548 0.000 0.452 0.000 0.000
#> GSM1105460     2  0.2631     0.6489 0.000 0.856 0.012 0.128 0.000 0.004
#> GSM1105461     2  0.0000     0.7045 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1105464     3  0.1951     0.7970 0.076 0.000 0.908 0.000 0.000 0.016
#> GSM1105466     4  0.3854     0.1779 0.000 0.464 0.000 0.536 0.000 0.000
#> GSM1105479     4  0.3857     0.1705 0.000 0.468 0.000 0.532 0.000 0.000
#> GSM1105502     3  0.1753     0.8025 0.084 0.000 0.912 0.000 0.000 0.004
#> GSM1105515     1  0.0000     0.9519 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM1105523     6  0.3349     0.6682 0.000 0.000 0.244 0.008 0.000 0.748
#> GSM1105550     6  0.1549     0.7650 0.000 0.000 0.044 0.000 0.020 0.936
#> GSM1105450     2  0.0000     0.7045 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1105451     2  0.0000     0.7045 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1105454     2  0.3705     0.5659 0.000 0.740 0.020 0.236 0.004 0.000
#> GSM1105468     2  0.0000     0.7045 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1105481     2  0.6568     0.2359 0.000 0.372 0.020 0.368 0.236 0.004
#> GSM1105504     6  0.3852     0.5123 0.000 0.000 0.384 0.004 0.000 0.612
#> GSM1105517     6  0.1549     0.7650 0.000 0.000 0.044 0.000 0.020 0.936
#> GSM1105525     6  0.3349     0.6682 0.000 0.000 0.244 0.008 0.000 0.748
#> GSM1105552     6  0.2095     0.7572 0.000 0.000 0.076 0.004 0.016 0.904
#> GSM1105452     5  0.0363     0.8678 0.000 0.000 0.000 0.000 0.988 0.012
#> GSM1105453     2  0.6432     0.3453 0.000 0.456 0.028 0.336 0.176 0.004
#> GSM1105456     2  0.3705     0.5659 0.000 0.740 0.020 0.236 0.004 0.000

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

consensus_heatmap(res, k = 2)

plot of chunk tab-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) other(p) time(p) individual(p) k
#> ATC:hclust 113   0.1582   1.0000   1.000       0.03397 2
#> ATC:hclust 115   0.2921   0.8818   0.222       0.01398 3
#> ATC:hclust  96   0.0124   0.1517   0.509       0.00855 4
#> ATC:hclust  82   0.5341   0.2196   0.819       0.28592 5
#> ATC:hclust  77   0.0958   0.0621   0.500       0.01695 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 44956 rows and 120 columns.
#>   Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'ATC' method.
#>   Subgroups are detected by 'kmeans' method.
#>   Performed in total 1250 partitions by row resampling.
#>   Best k for subgroups seems to be 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 0.982           0.963       0.985         0.4714 0.532   0.532
#> 3 3 1.000           0.998       0.999         0.4115 0.703   0.489
#> 4 4 0.697           0.614       0.759         0.1073 0.885   0.675
#> 5 5 0.727           0.639       0.793         0.0690 0.858   0.530
#> 6 6 0.738           0.633       0.769         0.0419 0.903   0.587

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
#> GSM1105438     2   0.000      0.983 0.000 1.000
#> GSM1105486     2   0.000      0.983 0.000 1.000
#> GSM1105487     1   0.000      0.987 1.000 0.000
#> GSM1105490     2   0.000      0.983 0.000 1.000
#> GSM1105491     2   0.706      0.762 0.192 0.808
#> GSM1105495     2   0.000      0.983 0.000 1.000
#> GSM1105498     2   0.000      0.983 0.000 1.000
#> GSM1105499     1   0.000      0.987 1.000 0.000
#> GSM1105506     2   0.000      0.983 0.000 1.000
#> GSM1105442     2   0.000      0.983 0.000 1.000
#> GSM1105511     2   0.000      0.983 0.000 1.000
#> GSM1105514     2   0.000      0.983 0.000 1.000
#> GSM1105518     2   0.000      0.983 0.000 1.000
#> GSM1105522     1   0.000      0.987 1.000 0.000
#> GSM1105534     1   0.000      0.987 1.000 0.000
#> GSM1105535     1   0.000      0.987 1.000 0.000
#> GSM1105538     1   0.000      0.987 1.000 0.000
#> GSM1105542     2   0.000      0.983 0.000 1.000
#> GSM1105443     2   0.000      0.983 0.000 1.000
#> GSM1105551     1   0.000      0.987 1.000 0.000
#> GSM1105554     1   0.000      0.987 1.000 0.000
#> GSM1105555     1   0.000      0.987 1.000 0.000
#> GSM1105447     2   0.000      0.983 0.000 1.000
#> GSM1105467     2   0.000      0.983 0.000 1.000
#> GSM1105470     2   0.000      0.983 0.000 1.000
#> GSM1105471     2   0.000      0.983 0.000 1.000
#> GSM1105474     2   0.000      0.983 0.000 1.000
#> GSM1105475     2   0.000      0.983 0.000 1.000
#> GSM1105440     1   0.000      0.987 1.000 0.000
#> GSM1105488     2   0.000      0.983 0.000 1.000
#> GSM1105489     1   0.000      0.987 1.000 0.000
#> GSM1105492     1   0.000      0.987 1.000 0.000
#> GSM1105493     1   0.000      0.987 1.000 0.000
#> GSM1105497     2   0.000      0.983 0.000 1.000
#> GSM1105500     2   0.000      0.983 0.000 1.000
#> GSM1105501     2   0.000      0.983 0.000 1.000
#> GSM1105508     1   0.000      0.987 1.000 0.000
#> GSM1105444     2   0.000      0.983 0.000 1.000
#> GSM1105513     2   0.000      0.983 0.000 1.000
#> GSM1105516     1   0.000      0.987 1.000 0.000
#> GSM1105520     2   0.000      0.983 0.000 1.000
#> GSM1105524     1   0.000      0.987 1.000 0.000
#> GSM1105536     2   0.000      0.983 0.000 1.000
#> GSM1105537     1   0.000      0.987 1.000 0.000
#> GSM1105540     2   0.949      0.429 0.368 0.632
#> GSM1105544     2   0.000      0.983 0.000 1.000
#> GSM1105445     2   0.000      0.983 0.000 1.000
#> GSM1105553     2   0.000      0.983 0.000 1.000
#> GSM1105556     1   0.000      0.987 1.000 0.000
#> GSM1105557     2   0.000      0.983 0.000 1.000
#> GSM1105449     2   0.000      0.983 0.000 1.000
#> GSM1105469     2   0.000      0.983 0.000 1.000
#> GSM1105472     2   0.000      0.983 0.000 1.000
#> GSM1105473     1   0.000      0.987 1.000 0.000
#> GSM1105476     2   0.000      0.983 0.000 1.000
#> GSM1105477     2   0.000      0.983 0.000 1.000
#> GSM1105478     2   0.000      0.983 0.000 1.000
#> GSM1105510     2   0.000      0.983 0.000 1.000
#> GSM1105530     1   0.000      0.987 1.000 0.000
#> GSM1105539     1   0.000      0.987 1.000 0.000
#> GSM1105480     2   0.000      0.983 0.000 1.000
#> GSM1105512     1   0.000      0.987 1.000 0.000
#> GSM1105532     1   0.000      0.987 1.000 0.000
#> GSM1105541     1   0.000      0.987 1.000 0.000
#> GSM1105439     2   0.000      0.983 0.000 1.000
#> GSM1105463     1   0.000      0.987 1.000 0.000
#> GSM1105482     1   0.000      0.987 1.000 0.000
#> GSM1105483     2   0.000      0.983 0.000 1.000
#> GSM1105494     2   0.000      0.983 0.000 1.000
#> GSM1105503     2   0.000      0.983 0.000 1.000
#> GSM1105507     1   0.000      0.987 1.000 0.000
#> GSM1105446     2   0.000      0.983 0.000 1.000
#> GSM1105519     1   0.000      0.987 1.000 0.000
#> GSM1105526     2   0.000      0.983 0.000 1.000
#> GSM1105527     2   0.000      0.983 0.000 1.000
#> GSM1105531     1   0.981      0.248 0.580 0.420
#> GSM1105543     2   0.000      0.983 0.000 1.000
#> GSM1105546     1   0.000      0.987 1.000 0.000
#> GSM1105547     1   0.000      0.987 1.000 0.000
#> GSM1105455     2   0.000      0.983 0.000 1.000
#> GSM1105458     2   0.000      0.983 0.000 1.000
#> GSM1105459     2   0.000      0.983 0.000 1.000
#> GSM1105462     2   0.000      0.983 0.000 1.000
#> GSM1105441     2   0.000      0.983 0.000 1.000
#> GSM1105465     2   0.000      0.983 0.000 1.000
#> GSM1105484     2   0.000      0.983 0.000 1.000
#> GSM1105485     2   0.753      0.726 0.216 0.784
#> GSM1105496     2   0.000      0.983 0.000 1.000
#> GSM1105505     1   0.000      0.987 1.000 0.000
#> GSM1105509     1   0.000      0.987 1.000 0.000
#> GSM1105448     2   0.000      0.983 0.000 1.000
#> GSM1105521     1   0.000      0.987 1.000 0.000
#> GSM1105528     2   0.000      0.983 0.000 1.000
#> GSM1105529     2   0.000      0.983 0.000 1.000
#> GSM1105533     1   0.000      0.987 1.000 0.000
#> GSM1105545     2   0.000      0.983 0.000 1.000
#> GSM1105548     1   0.000      0.987 1.000 0.000
#> GSM1105549     1   0.000      0.987 1.000 0.000
#> GSM1105457     2   0.000      0.983 0.000 1.000
#> GSM1105460     2   0.000      0.983 0.000 1.000
#> GSM1105461     2   0.000      0.983 0.000 1.000
#> GSM1105464     1   0.000      0.987 1.000 0.000
#> GSM1105466     2   0.000      0.983 0.000 1.000
#> GSM1105479     2   0.000      0.983 0.000 1.000
#> GSM1105502     1   0.000      0.987 1.000 0.000
#> GSM1105515     1   0.000      0.987 1.000 0.000
#> GSM1105523     2   0.506      0.867 0.112 0.888
#> GSM1105550     2   0.949      0.429 0.368 0.632
#> GSM1105450     2   0.000      0.983 0.000 1.000
#> GSM1105451     2   0.000      0.983 0.000 1.000
#> GSM1105454     2   0.000      0.983 0.000 1.000
#> GSM1105468     2   0.000      0.983 0.000 1.000
#> GSM1105481     2   0.000      0.983 0.000 1.000
#> GSM1105504     1   0.469      0.879 0.900 0.100
#> GSM1105517     1   0.000      0.987 1.000 0.000
#> GSM1105525     1   0.000      0.987 1.000 0.000
#> GSM1105552     1   0.000      0.987 1.000 0.000
#> GSM1105452     2   0.000      0.983 0.000 1.000
#> GSM1105453     2   0.000      0.983 0.000 1.000
#> GSM1105456     2   0.000      0.983 0.000 1.000

show/hide code output

cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#>            class entropy silhouette p1    p2    p3
#> GSM1105438     2    0.00      0.998  0 1.000 0.000
#> GSM1105486     2    0.00      0.998  0 1.000 0.000
#> GSM1105487     1    0.00      1.000  1 0.000 0.000
#> GSM1105490     2    0.00      0.998  0 1.000 0.000
#> GSM1105491     3    0.00      1.000  0 0.000 1.000
#> GSM1105495     2    0.00      0.998  0 1.000 0.000
#> GSM1105498     3    0.00      1.000  0 0.000 1.000
#> GSM1105499     1    0.00      1.000  1 0.000 0.000
#> GSM1105506     2    0.00      0.998  0 1.000 0.000
#> GSM1105442     3    0.00      1.000  0 0.000 1.000
#> GSM1105511     3    0.00      1.000  0 0.000 1.000
#> GSM1105514     2    0.00      0.998  0 1.000 0.000
#> GSM1105518     2    0.00      0.998  0 1.000 0.000
#> GSM1105522     1    0.00      1.000  1 0.000 0.000
#> GSM1105534     1    0.00      1.000  1 0.000 0.000
#> GSM1105535     1    0.00      1.000  1 0.000 0.000
#> GSM1105538     1    0.00      1.000  1 0.000 0.000
#> GSM1105542     3    0.00      1.000  0 0.000 1.000
#> GSM1105443     2    0.00      0.998  0 1.000 0.000
#> GSM1105551     1    0.00      1.000  1 0.000 0.000
#> GSM1105554     1    0.00      1.000  1 0.000 0.000
#> GSM1105555     1    0.00      1.000  1 0.000 0.000
#> GSM1105447     2    0.00      0.998  0 1.000 0.000
#> GSM1105467     2    0.00      0.998  0 1.000 0.000
#> GSM1105470     2    0.00      0.998  0 1.000 0.000
#> GSM1105471     2    0.00      0.998  0 1.000 0.000
#> GSM1105474     2    0.00      0.998  0 1.000 0.000
#> GSM1105475     2    0.00      0.998  0 1.000 0.000
#> GSM1105440     1    0.00      1.000  1 0.000 0.000
#> GSM1105488     3    0.00      1.000  0 0.000 1.000
#> GSM1105489     1    0.00      1.000  1 0.000 0.000
#> GSM1105492     1    0.00      1.000  1 0.000 0.000
#> GSM1105493     1    0.00      1.000  1 0.000 0.000
#> GSM1105497     3    0.00      1.000  0 0.000 1.000
#> GSM1105500     3    0.00      1.000  0 0.000 1.000
#> GSM1105501     3    0.00      1.000  0 0.000 1.000
#> GSM1105508     3    0.00      1.000  0 0.000 1.000
#> GSM1105444     2    0.00      0.998  0 1.000 0.000
#> GSM1105513     2    0.00      0.998  0 1.000 0.000
#> GSM1105516     3    0.00      1.000  0 0.000 1.000
#> GSM1105520     3    0.00      1.000  0 0.000 1.000
#> GSM1105524     1    0.00      1.000  1 0.000 0.000
#> GSM1105536     3    0.00      1.000  0 0.000 1.000
#> GSM1105537     1    0.00      1.000  1 0.000 0.000
#> GSM1105540     3    0.00      1.000  0 0.000 1.000
#> GSM1105544     3    0.00      1.000  0 0.000 1.000
#> GSM1105445     2    0.00      0.998  0 1.000 0.000
#> GSM1105553     3    0.00      1.000  0 0.000 1.000
#> GSM1105556     1    0.00      1.000  1 0.000 0.000
#> GSM1105557     2    0.00      0.998  0 1.000 0.000
#> GSM1105449     2    0.00      0.998  0 1.000 0.000
#> GSM1105469     3    0.00      1.000  0 0.000 1.000
#> GSM1105472     2    0.00      0.998  0 1.000 0.000
#> GSM1105473     3    0.00      1.000  0 0.000 1.000
#> GSM1105476     2    0.00      0.998  0 1.000 0.000
#> GSM1105477     3    0.00      1.000  0 0.000 1.000
#> GSM1105478     2    0.00      0.998  0 1.000 0.000
#> GSM1105510     3    0.00      1.000  0 0.000 1.000
#> GSM1105530     1    0.00      1.000  1 0.000 0.000
#> GSM1105539     1    0.00      1.000  1 0.000 0.000
#> GSM1105480     3    0.00      1.000  0 0.000 1.000
#> GSM1105512     1    0.00      1.000  1 0.000 0.000
#> GSM1105532     1    0.00      1.000  1 0.000 0.000
#> GSM1105541     1    0.00      1.000  1 0.000 0.000
#> GSM1105439     2    0.00      0.998  0 1.000 0.000
#> GSM1105463     3    0.00      1.000  0 0.000 1.000
#> GSM1105482     1    0.00      1.000  1 0.000 0.000
#> GSM1105483     3    0.00      1.000  0 0.000 1.000
#> GSM1105494     2    0.00      0.998  0 1.000 0.000
#> GSM1105503     3    0.00      1.000  0 0.000 1.000
#> GSM1105507     3    0.00      1.000  0 0.000 1.000
#> GSM1105446     2    0.28      0.897  0 0.908 0.092
#> GSM1105519     1    0.00      1.000  1 0.000 0.000
#> GSM1105526     3    0.00      1.000  0 0.000 1.000
#> GSM1105527     2    0.00      0.998  0 1.000 0.000
#> GSM1105531     3    0.00      1.000  0 0.000 1.000
#> GSM1105543     2    0.00      0.998  0 1.000 0.000
#> GSM1105546     1    0.00      1.000  1 0.000 0.000
#> GSM1105547     1    0.00      1.000  1 0.000 0.000
#> GSM1105455     2    0.00      0.998  0 1.000 0.000
#> GSM1105458     2    0.00      0.998  0 1.000 0.000
#> GSM1105459     2    0.00      0.998  0 1.000 0.000
#> GSM1105462     3    0.00      1.000  0 0.000 1.000
#> GSM1105441     2    0.00      0.998  0 1.000 0.000
#> GSM1105465     3    0.00      1.000  0 0.000 1.000
#> GSM1105484     2    0.00      0.998  0 1.000 0.000
#> GSM1105485     3    0.00      1.000  0 0.000 1.000
#> GSM1105496     3    0.00      1.000  0 0.000 1.000
#> GSM1105505     3    0.00      1.000  0 0.000 1.000
#> GSM1105509     3    0.00      1.000  0 0.000 1.000
#> GSM1105448     2    0.00      0.998  0 1.000 0.000
#> GSM1105521     1    0.00      1.000  1 0.000 0.000
#> GSM1105528     2    0.00      0.998  0 1.000 0.000
#> GSM1105529     3    0.00      1.000  0 0.000 1.000
#> GSM1105533     1    0.00      1.000  1 0.000 0.000
#> GSM1105545     3    0.00      1.000  0 0.000 1.000
#> GSM1105548     1    0.00      1.000  1 0.000 0.000
#> GSM1105549     1    0.00      1.000  1 0.000 0.000
#> GSM1105457     2    0.00      0.998  0 1.000 0.000
#> GSM1105460     2    0.00      0.998  0 1.000 0.000
#> GSM1105461     2    0.00      0.998  0 1.000 0.000
#> GSM1105464     1    0.00      1.000  1 0.000 0.000
#> GSM1105466     2    0.00      0.998  0 1.000 0.000
#> GSM1105479     2    0.00      0.998  0 1.000 0.000
#> GSM1105502     1    0.00      1.000  1 0.000 0.000
#> GSM1105515     1    0.00      1.000  1 0.000 0.000
#> GSM1105523     3    0.00      1.000  0 0.000 1.000
#> GSM1105550     3    0.00      1.000  0 0.000 1.000
#> GSM1105450     2    0.00      0.998  0 1.000 0.000
#> GSM1105451     2    0.00      0.998  0 1.000 0.000
#> GSM1105454     2    0.00      0.998  0 1.000 0.000
#> GSM1105468     2    0.00      0.998  0 1.000 0.000
#> GSM1105481     2    0.00      0.998  0 1.000 0.000
#> GSM1105504     3    0.00      1.000  0 0.000 1.000
#> GSM1105517     3    0.00      1.000  0 0.000 1.000
#> GSM1105525     3    0.00      1.000  0 0.000 1.000
#> GSM1105552     3    0.00      1.000  0 0.000 1.000
#> GSM1105452     3    0.00      1.000  0 0.000 1.000
#> GSM1105453     2    0.00      0.998  0 1.000 0.000
#> GSM1105456     2    0.00      0.998  0 1.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
#> GSM1105438     2  0.2081    0.87300 0.000 0.916 0.000 0.084
#> GSM1105486     2  0.2408    0.87316 0.000 0.896 0.000 0.104
#> GSM1105487     1  0.0000    0.93045 1.000 0.000 0.000 0.000
#> GSM1105490     2  0.4679    0.77341 0.000 0.648 0.000 0.352
#> GSM1105491     4  0.4941    0.42960 0.000 0.000 0.436 0.564
#> GSM1105495     4  0.5055    0.00884 0.000 0.368 0.008 0.624
#> GSM1105498     4  0.4967    0.07919 0.000 0.000 0.452 0.548
#> GSM1105499     1  0.0000    0.93045 1.000 0.000 0.000 0.000
#> GSM1105506     2  0.4830    0.73452 0.000 0.608 0.000 0.392
#> GSM1105442     4  0.4877    0.47113 0.000 0.000 0.408 0.592
#> GSM1105511     4  0.4977    0.06727 0.000 0.000 0.460 0.540
#> GSM1105514     2  0.0000    0.86328 0.000 1.000 0.000 0.000
#> GSM1105518     4  0.4992   -0.56686 0.000 0.476 0.000 0.524
#> GSM1105522     3  0.4998   -0.26511 0.488 0.000 0.512 0.000
#> GSM1105534     1  0.0000    0.93045 1.000 0.000 0.000 0.000
#> GSM1105535     1  0.0000    0.93045 1.000 0.000 0.000 0.000
#> GSM1105538     1  0.0188    0.92955 0.996 0.000 0.004 0.000
#> GSM1105542     4  0.4877    0.47113 0.000 0.000 0.408 0.592
#> GSM1105443     2  0.1474    0.86714 0.000 0.948 0.000 0.052
#> GSM1105551     1  0.0188    0.92955 0.996 0.000 0.004 0.000
#> GSM1105554     1  0.0000    0.93045 1.000 0.000 0.000 0.000
#> GSM1105555     1  0.0188    0.92955 0.996 0.000 0.004 0.000
#> GSM1105447     2  0.3764    0.85416 0.000 0.784 0.000 0.216
#> GSM1105467     2  0.2408    0.87316 0.000 0.896 0.000 0.104
#> GSM1105470     2  0.0000    0.86328 0.000 1.000 0.000 0.000
#> GSM1105471     2  0.3400    0.86743 0.000 0.820 0.000 0.180
#> GSM1105474     2  0.2408    0.87316 0.000 0.896 0.000 0.104
#> GSM1105475     2  0.3266    0.87013 0.000 0.832 0.000 0.168
#> GSM1105440     1  0.0188    0.92955 0.996 0.000 0.004 0.000
#> GSM1105488     4  0.4877    0.47113 0.000 0.000 0.408 0.592
#> GSM1105489     1  0.0000    0.93045 1.000 0.000 0.000 0.000
#> GSM1105492     1  0.0000    0.93045 1.000 0.000 0.000 0.000
#> GSM1105493     1  0.0000    0.93045 1.000 0.000 0.000 0.000
#> GSM1105497     4  0.4877    0.47113 0.000 0.000 0.408 0.592
#> GSM1105500     3  0.4761   -0.01345 0.000 0.000 0.628 0.372
#> GSM1105501     4  0.4933    0.10944 0.000 0.000 0.432 0.568
#> GSM1105508     3  0.2737    0.51560 0.104 0.000 0.888 0.008
#> GSM1105444     2  0.0000    0.86328 0.000 1.000 0.000 0.000
#> GSM1105513     2  0.4193    0.83227 0.000 0.732 0.000 0.268
#> GSM1105516     3  0.1389    0.55356 0.000 0.000 0.952 0.048
#> GSM1105520     4  0.4916    0.10549 0.000 0.000 0.424 0.576
#> GSM1105524     1  0.0000    0.93045 1.000 0.000 0.000 0.000
#> GSM1105536     3  0.4961   -0.02535 0.000 0.000 0.552 0.448
#> GSM1105537     1  0.0000    0.93045 1.000 0.000 0.000 0.000
#> GSM1105540     3  0.3907    0.46801 0.000 0.000 0.768 0.232
#> GSM1105544     3  0.4776   -0.01061 0.000 0.000 0.624 0.376
#> GSM1105445     2  0.3801    0.85254 0.000 0.780 0.000 0.220
#> GSM1105553     3  0.4804   -0.04590 0.000 0.000 0.616 0.384
#> GSM1105556     1  0.0000    0.93045 1.000 0.000 0.000 0.000
#> GSM1105557     2  0.4955    0.67356 0.000 0.556 0.000 0.444
#> GSM1105449     2  0.0000    0.86328 0.000 1.000 0.000 0.000
#> GSM1105469     3  0.4564    0.40476 0.000 0.000 0.672 0.328
#> GSM1105472     2  0.0000    0.86328 0.000 1.000 0.000 0.000
#> GSM1105473     3  0.0000    0.55461 0.000 0.000 1.000 0.000
#> GSM1105476     2  0.2408    0.87316 0.000 0.896 0.000 0.104
#> GSM1105477     3  0.4790   -0.00943 0.000 0.000 0.620 0.380
#> GSM1105478     2  0.4830    0.73452 0.000 0.608 0.000 0.392
#> GSM1105510     4  0.4877    0.47113 0.000 0.000 0.408 0.592
#> GSM1105530     1  0.4661    0.60480 0.652 0.000 0.348 0.000
#> GSM1105539     1  0.3266    0.81846 0.832 0.000 0.168 0.000
#> GSM1105480     4  0.4364    0.18718 0.000 0.016 0.220 0.764
#> GSM1105512     1  0.4250    0.70686 0.724 0.000 0.276 0.000
#> GSM1105532     3  0.4998   -0.26511 0.488 0.000 0.512 0.000
#> GSM1105541     1  0.3266    0.81846 0.832 0.000 0.168 0.000
#> GSM1105439     2  0.0817    0.86629 0.000 0.976 0.000 0.024
#> GSM1105463     3  0.0000    0.55461 0.000 0.000 1.000 0.000
#> GSM1105482     1  0.0000    0.93045 1.000 0.000 0.000 0.000
#> GSM1105483     3  0.4790    0.31925 0.000 0.000 0.620 0.380
#> GSM1105494     2  0.4948    0.67884 0.000 0.560 0.000 0.440
#> GSM1105503     4  0.4957    0.16410 0.000 0.016 0.300 0.684
#> GSM1105507     3  0.0524    0.55661 0.008 0.000 0.988 0.004
#> GSM1105446     4  0.5229    0.37832 0.000 0.084 0.168 0.748
#> GSM1105519     1  0.4866    0.50402 0.596 0.000 0.404 0.000
#> GSM1105526     3  0.4999   -0.07486 0.000 0.000 0.508 0.492
#> GSM1105527     2  0.6445    0.56433 0.000 0.488 0.068 0.444
#> GSM1105531     3  0.1867    0.54445 0.000 0.000 0.928 0.072
#> GSM1105543     2  0.3074    0.86591 0.000 0.848 0.000 0.152
#> GSM1105546     1  0.0000    0.93045 1.000 0.000 0.000 0.000
#> GSM1105547     1  0.0000    0.93045 1.000 0.000 0.000 0.000
#> GSM1105455     2  0.1474    0.86714 0.000 0.948 0.000 0.052
#> GSM1105458     2  0.2973    0.87372 0.000 0.856 0.000 0.144
#> GSM1105459     2  0.0000    0.86328 0.000 1.000 0.000 0.000
#> GSM1105462     3  0.4643    0.33601 0.000 0.000 0.656 0.344
#> GSM1105441     2  0.0000    0.86328 0.000 1.000 0.000 0.000
#> GSM1105465     4  0.4877    0.47113 0.000 0.000 0.408 0.592
#> GSM1105484     2  0.4222    0.73501 0.000 0.728 0.000 0.272
#> GSM1105485     4  0.4941    0.42960 0.000 0.000 0.436 0.564
#> GSM1105496     3  0.4804   -0.04590 0.000 0.000 0.616 0.384
#> GSM1105505     3  0.1867    0.54445 0.000 0.000 0.928 0.072
#> GSM1105509     3  0.2530    0.51044 0.112 0.000 0.888 0.000
#> GSM1105448     2  0.0000    0.86328 0.000 1.000 0.000 0.000
#> GSM1105521     1  0.4605    0.62576 0.664 0.000 0.336 0.000
#> GSM1105528     4  0.5244   -0.12015 0.000 0.436 0.008 0.556
#> GSM1105529     4  0.4877    0.47113 0.000 0.000 0.408 0.592
#> GSM1105533     1  0.0000    0.93045 1.000 0.000 0.000 0.000
#> GSM1105545     4  0.4977    0.06727 0.000 0.000 0.460 0.540
#> GSM1105548     1  0.0188    0.92955 0.996 0.000 0.004 0.000
#> GSM1105549     1  0.0469    0.92565 0.988 0.000 0.012 0.000
#> GSM1105457     2  0.4431    0.80993 0.000 0.696 0.000 0.304
#> GSM1105460     2  0.2973    0.87372 0.000 0.856 0.000 0.144
#> GSM1105461     2  0.0000    0.86328 0.000 1.000 0.000 0.000
#> GSM1105464     3  0.4866    0.00270 0.404 0.000 0.596 0.000
#> GSM1105466     2  0.4830    0.73452 0.000 0.608 0.000 0.392
#> GSM1105479     2  0.2868    0.87344 0.000 0.864 0.000 0.136
#> GSM1105502     1  0.3528    0.79769 0.808 0.000 0.192 0.000
#> GSM1105515     1  0.0000    0.93045 1.000 0.000 0.000 0.000
#> GSM1105523     3  0.3486    0.52531 0.000 0.000 0.812 0.188
#> GSM1105550     3  0.3356    0.53290 0.000 0.000 0.824 0.176
#> GSM1105450     2  0.0000    0.86328 0.000 1.000 0.000 0.000
#> GSM1105451     2  0.0000    0.86328 0.000 1.000 0.000 0.000
#> GSM1105454     2  0.3688    0.85731 0.000 0.792 0.000 0.208
#> GSM1105468     2  0.0000    0.86328 0.000 1.000 0.000 0.000
#> GSM1105481     2  0.4500    0.78202 0.000 0.684 0.000 0.316
#> GSM1105504     3  0.1867    0.54445 0.000 0.000 0.928 0.072
#> GSM1105517     3  0.1389    0.55858 0.000 0.000 0.952 0.048
#> GSM1105525     3  0.3032    0.52162 0.008 0.000 0.868 0.124
#> GSM1105552     3  0.0707    0.55717 0.000 0.000 0.980 0.020
#> GSM1105452     4  0.4877    0.47113 0.000 0.000 0.408 0.592
#> GSM1105453     2  0.2530    0.87422 0.000 0.888 0.000 0.112
#> GSM1105456     2  0.3688    0.85731 0.000 0.792 0.000 0.208

show/hide code output

cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#>            class entropy silhouette    p1    p2    p3    p4    p5
#> GSM1105438     2  0.2448     0.8530 0.000 0.892 0.000 0.088 0.020
#> GSM1105486     2  0.2727     0.8489 0.000 0.868 0.000 0.116 0.016
#> GSM1105487     1  0.1124     0.9327 0.960 0.000 0.004 0.036 0.000
#> GSM1105490     4  0.4397    -0.1625 0.000 0.432 0.000 0.564 0.004
#> GSM1105491     5  0.0880     0.7670 0.000 0.000 0.032 0.000 0.968
#> GSM1105495     5  0.3918     0.5686 0.000 0.096 0.000 0.100 0.804
#> GSM1105498     4  0.5728     0.3301 0.000 0.000 0.200 0.624 0.176
#> GSM1105499     1  0.0404     0.9381 0.988 0.000 0.000 0.012 0.000
#> GSM1105506     4  0.4403    -0.1719 0.000 0.436 0.000 0.560 0.004
#> GSM1105442     5  0.0703     0.7709 0.000 0.000 0.024 0.000 0.976
#> GSM1105511     4  0.5759     0.3260 0.000 0.000 0.200 0.620 0.180
#> GSM1105514     2  0.0290     0.8525 0.000 0.992 0.000 0.000 0.008
#> GSM1105518     4  0.2824     0.4842 0.000 0.096 0.000 0.872 0.032
#> GSM1105522     3  0.3214     0.7130 0.120 0.000 0.844 0.036 0.000
#> GSM1105534     1  0.0404     0.9381 0.988 0.000 0.000 0.012 0.000
#> GSM1105535     1  0.0404     0.9381 0.988 0.000 0.000 0.012 0.000
#> GSM1105538     1  0.1845     0.9229 0.928 0.000 0.016 0.056 0.000
#> GSM1105542     5  0.0703     0.7709 0.000 0.000 0.024 0.000 0.976
#> GSM1105443     2  0.1864     0.8429 0.000 0.924 0.004 0.068 0.004
#> GSM1105551     1  0.2012     0.9190 0.920 0.000 0.020 0.060 0.000
#> GSM1105554     1  0.0404     0.9381 0.988 0.000 0.000 0.012 0.000
#> GSM1105555     1  0.1845     0.9229 0.928 0.000 0.016 0.056 0.000
#> GSM1105447     2  0.4314     0.7436 0.000 0.700 0.004 0.280 0.016
#> GSM1105467     2  0.2727     0.8489 0.000 0.868 0.000 0.116 0.016
#> GSM1105470     2  0.0000     0.8523 0.000 1.000 0.000 0.000 0.000
#> GSM1105471     2  0.4065     0.7630 0.000 0.720 0.000 0.264 0.016
#> GSM1105474     2  0.2727     0.8489 0.000 0.868 0.000 0.116 0.016
#> GSM1105475     2  0.3890     0.7778 0.000 0.736 0.000 0.252 0.012
#> GSM1105440     1  0.1845     0.9229 0.928 0.000 0.016 0.056 0.000
#> GSM1105488     5  0.0703     0.7709 0.000 0.000 0.024 0.000 0.976
#> GSM1105489     1  0.0955     0.9337 0.968 0.000 0.004 0.028 0.000
#> GSM1105492     1  0.0955     0.9337 0.968 0.000 0.004 0.028 0.000
#> GSM1105493     1  0.0000     0.9386 1.000 0.000 0.000 0.000 0.000
#> GSM1105497     5  0.0703     0.7709 0.000 0.000 0.024 0.000 0.976
#> GSM1105500     5  0.6348     0.2901 0.000 0.000 0.180 0.324 0.496
#> GSM1105501     4  0.5640     0.3337 0.000 0.000 0.176 0.636 0.188
#> GSM1105508     3  0.0613     0.7642 0.004 0.000 0.984 0.008 0.004
#> GSM1105444     2  0.0162     0.8522 0.000 0.996 0.004 0.000 0.000
#> GSM1105513     4  0.4448    -0.2981 0.000 0.480 0.000 0.516 0.004
#> GSM1105516     3  0.2661     0.7355 0.000 0.000 0.888 0.056 0.056
#> GSM1105520     4  0.4835     0.3846 0.000 0.000 0.120 0.724 0.156
#> GSM1105524     1  0.0404     0.9381 0.988 0.000 0.000 0.012 0.000
#> GSM1105536     4  0.6688    -0.0947 0.000 0.000 0.240 0.404 0.356
#> GSM1105537     1  0.0404     0.9381 0.988 0.000 0.000 0.012 0.000
#> GSM1105540     3  0.5883     0.1734 0.000 0.000 0.524 0.368 0.108
#> GSM1105544     5  0.6706     0.1323 0.000 0.000 0.248 0.348 0.404
#> GSM1105445     2  0.4518     0.6924 0.000 0.660 0.004 0.320 0.016
#> GSM1105553     5  0.6252     0.3002 0.000 0.000 0.164 0.328 0.508
#> GSM1105556     1  0.0000     0.9386 1.000 0.000 0.000 0.000 0.000
#> GSM1105557     4  0.2612     0.4903 0.000 0.124 0.000 0.868 0.008
#> GSM1105449     2  0.0162     0.8522 0.000 0.996 0.004 0.000 0.000
#> GSM1105469     4  0.5613     0.2983 0.000 0.000 0.308 0.592 0.100
#> GSM1105472     2  0.0000     0.8523 0.000 1.000 0.000 0.000 0.000
#> GSM1105473     3  0.0992     0.7609 0.000 0.000 0.968 0.008 0.024
#> GSM1105476     2  0.2727     0.8489 0.000 0.868 0.000 0.116 0.016
#> GSM1105477     5  0.6680     0.1121 0.000 0.000 0.236 0.364 0.400
#> GSM1105478     4  0.4403    -0.1719 0.000 0.436 0.000 0.560 0.004
#> GSM1105510     5  0.0703     0.7709 0.000 0.000 0.024 0.000 0.976
#> GSM1105530     3  0.3772     0.6599 0.172 0.000 0.792 0.036 0.000
#> GSM1105539     1  0.5056     0.3907 0.596 0.000 0.360 0.044 0.000
#> GSM1105480     4  0.2969     0.4278 0.000 0.000 0.020 0.852 0.128
#> GSM1105512     3  0.4734     0.4246 0.312 0.000 0.652 0.036 0.000
#> GSM1105532     3  0.3309     0.7101 0.128 0.000 0.836 0.036 0.000
#> GSM1105541     1  0.5056     0.3907 0.596 0.000 0.360 0.044 0.000
#> GSM1105439     2  0.1285     0.8491 0.000 0.956 0.004 0.036 0.004
#> GSM1105463     3  0.0992     0.7616 0.000 0.000 0.968 0.008 0.024
#> GSM1105482     1  0.0000     0.9386 1.000 0.000 0.000 0.000 0.000
#> GSM1105483     4  0.5640     0.3038 0.000 0.000 0.304 0.592 0.104
#> GSM1105494     4  0.2674     0.4904 0.000 0.120 0.000 0.868 0.012
#> GSM1105503     4  0.3622     0.4238 0.000 0.000 0.056 0.820 0.124
#> GSM1105507     3  0.0992     0.7616 0.000 0.000 0.968 0.008 0.024
#> GSM1105446     5  0.1124     0.7193 0.000 0.004 0.000 0.036 0.960
#> GSM1105519     3  0.3355     0.7041 0.132 0.000 0.832 0.036 0.000
#> GSM1105526     4  0.6615    -0.1116 0.000 0.000 0.216 0.408 0.376
#> GSM1105527     4  0.2116     0.4886 0.000 0.076 0.004 0.912 0.008
#> GSM1105531     3  0.3420     0.7027 0.000 0.000 0.840 0.076 0.084
#> GSM1105543     2  0.3182     0.8432 0.000 0.844 0.000 0.124 0.032
#> GSM1105546     1  0.1124     0.9345 0.960 0.000 0.004 0.036 0.000
#> GSM1105547     1  0.0000     0.9386 1.000 0.000 0.000 0.000 0.000
#> GSM1105455     2  0.1864     0.8429 0.000 0.924 0.004 0.068 0.004
#> GSM1105458     2  0.3795     0.8208 0.000 0.788 0.004 0.184 0.024
#> GSM1105459     2  0.0000     0.8523 0.000 1.000 0.000 0.000 0.000
#> GSM1105462     3  0.6002    -0.0235 0.000 0.000 0.452 0.436 0.112
#> GSM1105441     2  0.0324     0.8516 0.000 0.992 0.004 0.000 0.004
#> GSM1105465     5  0.0703     0.7709 0.000 0.000 0.024 0.000 0.976
#> GSM1105484     2  0.4982     0.6780 0.000 0.700 0.000 0.100 0.200
#> GSM1105485     5  0.0880     0.7670 0.000 0.000 0.032 0.000 0.968
#> GSM1105496     5  0.6241     0.3112 0.000 0.000 0.164 0.324 0.512
#> GSM1105505     3  0.3362     0.7064 0.000 0.000 0.844 0.076 0.080
#> GSM1105509     3  0.1059     0.7616 0.004 0.000 0.968 0.008 0.020
#> GSM1105448     2  0.0162     0.8522 0.000 0.996 0.004 0.000 0.000
#> GSM1105521     3  0.4404     0.5362 0.252 0.000 0.712 0.036 0.000
#> GSM1105528     5  0.4104     0.5436 0.000 0.124 0.000 0.088 0.788
#> GSM1105529     5  0.0703     0.7709 0.000 0.000 0.024 0.000 0.976
#> GSM1105533     1  0.0404     0.9381 0.988 0.000 0.000 0.012 0.000
#> GSM1105545     4  0.5941     0.3004 0.000 0.000 0.228 0.592 0.180
#> GSM1105548     1  0.2012     0.9190 0.920 0.000 0.020 0.060 0.000
#> GSM1105549     1  0.2149     0.8994 0.916 0.000 0.048 0.036 0.000
#> GSM1105457     4  0.4705    -0.3254 0.000 0.484 0.004 0.504 0.008
#> GSM1105460     2  0.3795     0.8208 0.000 0.788 0.004 0.184 0.024
#> GSM1105461     2  0.0162     0.8522 0.000 0.996 0.004 0.000 0.000
#> GSM1105464     3  0.1893     0.7514 0.048 0.000 0.928 0.024 0.000
#> GSM1105466     4  0.4403    -0.1719 0.000 0.436 0.000 0.560 0.004
#> GSM1105479     2  0.3756     0.7765 0.000 0.744 0.000 0.248 0.008
#> GSM1105502     3  0.5096     0.0610 0.444 0.000 0.520 0.036 0.000
#> GSM1105515     1  0.0404     0.9381 0.988 0.000 0.000 0.012 0.000
#> GSM1105523     3  0.5119     0.3097 0.000 0.000 0.592 0.360 0.048
#> GSM1105550     3  0.4689     0.4817 0.000 0.000 0.688 0.264 0.048
#> GSM1105450     2  0.0000     0.8523 0.000 1.000 0.000 0.000 0.000
#> GSM1105451     2  0.0162     0.8522 0.000 0.996 0.004 0.000 0.000
#> GSM1105454     2  0.4314     0.7436 0.000 0.700 0.004 0.280 0.016
#> GSM1105468     2  0.0000     0.8523 0.000 1.000 0.000 0.000 0.000
#> GSM1105481     2  0.5322     0.5029 0.000 0.552 0.000 0.392 0.056
#> GSM1105504     3  0.3420     0.7027 0.000 0.000 0.840 0.076 0.084
#> GSM1105517     3  0.1211     0.7617 0.000 0.000 0.960 0.024 0.016
#> GSM1105525     3  0.0510     0.7625 0.000 0.000 0.984 0.016 0.000
#> GSM1105552     3  0.2149     0.7502 0.000 0.000 0.916 0.048 0.036
#> GSM1105452     5  0.0703     0.7709 0.000 0.000 0.024 0.000 0.976
#> GSM1105453     2  0.2919     0.8517 0.000 0.868 0.004 0.104 0.024
#> GSM1105456     2  0.4314     0.7436 0.000 0.700 0.004 0.280 0.016

show/hide code output

cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#>            class entropy silhouette    p1    p2    p3    p4    p5    p6
#> GSM1105438     2  0.3831    0.65038 0.000 0.780 0.020 0.004 0.024 0.172
#> GSM1105486     2  0.3560    0.63627 0.000 0.772 0.012 0.004 0.008 0.204
#> GSM1105487     1  0.3043    0.87755 0.836 0.000 0.024 0.008 0.000 0.132
#> GSM1105490     6  0.5134    0.64439 0.000 0.228 0.000 0.152 0.000 0.620
#> GSM1105491     5  0.1141    0.90753 0.000 0.000 0.000 0.052 0.948 0.000
#> GSM1105495     5  0.5611    0.57810 0.000 0.132 0.032 0.016 0.664 0.156
#> GSM1105498     4  0.4368    0.59797 0.000 0.000 0.000 0.708 0.088 0.204
#> GSM1105499     1  0.1542    0.89847 0.936 0.000 0.000 0.008 0.004 0.052
#> GSM1105506     6  0.5269    0.64355 0.000 0.248 0.000 0.156 0.000 0.596
#> GSM1105442     5  0.0632    0.91569 0.000 0.000 0.000 0.024 0.976 0.000
#> GSM1105511     4  0.4269    0.60924 0.000 0.000 0.000 0.724 0.092 0.184
#> GSM1105514     2  0.1026    0.71631 0.000 0.968 0.012 0.004 0.008 0.008
#> GSM1105518     6  0.5339    0.50909 0.000 0.040 0.016 0.272 0.036 0.636
#> GSM1105522     3  0.1882    0.76360 0.028 0.000 0.928 0.020 0.000 0.024
#> GSM1105534     1  0.1010    0.90256 0.960 0.000 0.000 0.000 0.004 0.036
#> GSM1105535     1  0.1410    0.90065 0.944 0.000 0.000 0.008 0.004 0.044
#> GSM1105538     1  0.4016    0.84563 0.772 0.000 0.088 0.008 0.000 0.132
#> GSM1105542     5  0.0865    0.91951 0.000 0.000 0.000 0.036 0.964 0.000
#> GSM1105443     2  0.3161    0.57222 0.000 0.776 0.008 0.000 0.000 0.216
#> GSM1105551     1  0.4195    0.83714 0.756 0.000 0.100 0.008 0.000 0.136
#> GSM1105554     1  0.1364    0.90004 0.944 0.000 0.000 0.004 0.004 0.048
#> GSM1105555     1  0.4016    0.84563 0.772 0.000 0.088 0.008 0.000 0.132
#> GSM1105447     6  0.4784   -0.00967 0.000 0.464 0.028 0.000 0.012 0.496
#> GSM1105467     2  0.3560    0.63627 0.000 0.772 0.012 0.004 0.008 0.204
#> GSM1105470     2  0.0000    0.71986 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1105471     2  0.4341    0.39006 0.000 0.620 0.012 0.004 0.008 0.356
#> GSM1105474     2  0.3560    0.63627 0.000 0.772 0.012 0.004 0.008 0.204
#> GSM1105475     2  0.3872    0.31807 0.000 0.604 0.000 0.000 0.004 0.392
#> GSM1105440     1  0.4055    0.84562 0.768 0.000 0.088 0.008 0.000 0.136
#> GSM1105488     5  0.0865    0.91951 0.000 0.000 0.000 0.036 0.964 0.000
#> GSM1105489     1  0.2163    0.89107 0.892 0.000 0.004 0.008 0.000 0.096
#> GSM1105492     1  0.2488    0.88388 0.864 0.000 0.004 0.008 0.000 0.124
#> GSM1105493     1  0.0551    0.90452 0.984 0.000 0.004 0.004 0.000 0.008
#> GSM1105497     5  0.0865    0.91951 0.000 0.000 0.000 0.036 0.964 0.000
#> GSM1105500     4  0.4078    0.50000 0.000 0.000 0.000 0.640 0.340 0.020
#> GSM1105501     4  0.4376    0.60726 0.000 0.000 0.004 0.724 0.092 0.180
#> GSM1105508     3  0.2896    0.73956 0.000 0.000 0.824 0.160 0.000 0.016
#> GSM1105444     2  0.0458    0.71908 0.000 0.984 0.000 0.000 0.000 0.016
#> GSM1105513     6  0.5103    0.60803 0.000 0.276 0.000 0.120 0.000 0.604
#> GSM1105516     3  0.4406    0.28628 0.000 0.000 0.516 0.464 0.008 0.012
#> GSM1105520     4  0.4718    0.56436 0.000 0.000 0.008 0.684 0.088 0.220
#> GSM1105524     1  0.1410    0.90065 0.944 0.000 0.000 0.008 0.004 0.044
#> GSM1105536     4  0.3533    0.63851 0.000 0.000 0.008 0.776 0.196 0.020
#> GSM1105537     1  0.1410    0.90065 0.944 0.000 0.000 0.008 0.004 0.044
#> GSM1105540     4  0.3294    0.54057 0.000 0.000 0.156 0.812 0.020 0.012
#> GSM1105544     4  0.3560    0.59216 0.000 0.000 0.008 0.732 0.256 0.004
#> GSM1105445     6  0.4470    0.20655 0.000 0.408 0.012 0.004 0.008 0.568
#> GSM1105553     4  0.4199    0.45336 0.000 0.000 0.000 0.600 0.380 0.020
#> GSM1105556     1  0.0748    0.90447 0.976 0.000 0.004 0.004 0.000 0.016
#> GSM1105557     6  0.4831    0.57149 0.000 0.072 0.000 0.256 0.012 0.660
#> GSM1105449     2  0.1204    0.70746 0.000 0.944 0.000 0.000 0.000 0.056
#> GSM1105469     4  0.3054    0.64262 0.000 0.000 0.036 0.828 0.000 0.136
#> GSM1105472     2  0.0260    0.71791 0.000 0.992 0.000 0.000 0.000 0.008
#> GSM1105473     3  0.2882    0.73490 0.000 0.000 0.812 0.180 0.000 0.008
#> GSM1105476     2  0.3560    0.63627 0.000 0.772 0.012 0.004 0.008 0.204
#> GSM1105477     4  0.3691    0.59162 0.000 0.000 0.008 0.724 0.260 0.008
#> GSM1105478     6  0.5249    0.64453 0.000 0.244 0.000 0.156 0.000 0.600
#> GSM1105510     5  0.0865    0.91951 0.000 0.000 0.000 0.036 0.964 0.000
#> GSM1105530     3  0.1887    0.75742 0.048 0.000 0.924 0.012 0.000 0.016
#> GSM1105539     3  0.4648    0.34686 0.320 0.000 0.628 0.008 0.000 0.044
#> GSM1105480     4  0.4923    0.33917 0.000 0.000 0.000 0.560 0.072 0.368
#> GSM1105512     3  0.2265    0.73499 0.076 0.000 0.896 0.004 0.000 0.024
#> GSM1105532     3  0.1794    0.76202 0.028 0.000 0.932 0.024 0.000 0.016
#> GSM1105541     3  0.4648    0.34686 0.320 0.000 0.628 0.008 0.000 0.044
#> GSM1105439     2  0.2814    0.62462 0.000 0.820 0.008 0.000 0.000 0.172
#> GSM1105463     3  0.3230    0.71133 0.000 0.000 0.776 0.212 0.000 0.012
#> GSM1105482     1  0.0291    0.90499 0.992 0.000 0.004 0.004 0.000 0.000
#> GSM1105483     4  0.2983    0.64376 0.000 0.000 0.032 0.832 0.000 0.136
#> GSM1105494     6  0.4936    0.52633 0.000 0.068 0.000 0.288 0.012 0.632
#> GSM1105503     4  0.4795    0.42912 0.000 0.000 0.000 0.604 0.072 0.324
#> GSM1105507     3  0.3606    0.66626 0.000 0.000 0.728 0.256 0.000 0.016
#> GSM1105446     5  0.0779    0.89551 0.000 0.000 0.008 0.008 0.976 0.008
#> GSM1105519     3  0.1882    0.76298 0.028 0.000 0.928 0.020 0.000 0.024
#> GSM1105526     4  0.3792    0.64115 0.000 0.000 0.004 0.764 0.188 0.044
#> GSM1105527     6  0.4790    0.33026 0.000 0.036 0.000 0.376 0.012 0.576
#> GSM1105531     4  0.4551   -0.10923 0.000 0.000 0.436 0.536 0.016 0.012
#> GSM1105543     2  0.4321    0.61435 0.000 0.732 0.020 0.008 0.028 0.212
#> GSM1105546     1  0.2261    0.88917 0.884 0.000 0.004 0.008 0.000 0.104
#> GSM1105547     1  0.0291    0.90499 0.992 0.000 0.004 0.004 0.000 0.000
#> GSM1105455     2  0.3161    0.57222 0.000 0.776 0.008 0.000 0.000 0.216
#> GSM1105458     2  0.5160    0.34019 0.000 0.552 0.040 0.004 0.020 0.384
#> GSM1105459     2  0.0000    0.71986 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1105462     4  0.2604    0.60627 0.000 0.000 0.100 0.872 0.020 0.008
#> GSM1105441     2  0.1524    0.70394 0.000 0.932 0.008 0.000 0.000 0.060
#> GSM1105465     5  0.0865    0.91951 0.000 0.000 0.000 0.036 0.964 0.000
#> GSM1105484     2  0.5992    0.40717 0.000 0.588 0.020 0.012 0.204 0.176
#> GSM1105485     5  0.1075    0.91048 0.000 0.000 0.000 0.048 0.952 0.000
#> GSM1105496     4  0.4167    0.45937 0.000 0.000 0.000 0.612 0.368 0.020
#> GSM1105505     4  0.4569   -0.17408 0.000 0.000 0.456 0.516 0.016 0.012
#> GSM1105509     3  0.2402    0.75301 0.000 0.000 0.868 0.120 0.000 0.012
#> GSM1105448     2  0.0458    0.71908 0.000 0.984 0.000 0.000 0.000 0.016
#> GSM1105521     3  0.1951    0.74627 0.060 0.000 0.916 0.004 0.000 0.020
#> GSM1105528     5  0.5201    0.60022 0.000 0.148 0.020 0.012 0.692 0.128
#> GSM1105529     5  0.0865    0.91951 0.000 0.000 0.000 0.036 0.964 0.000
#> GSM1105533     1  0.1410    0.90065 0.944 0.000 0.000 0.008 0.004 0.044
#> GSM1105545     4  0.3150    0.67007 0.000 0.000 0.008 0.844 0.088 0.060
#> GSM1105548     1  0.4111    0.84006 0.764 0.000 0.096 0.008 0.000 0.132
#> GSM1105549     1  0.3329    0.79643 0.792 0.000 0.184 0.004 0.000 0.020
#> GSM1105457     6  0.5152    0.55910 0.000 0.272 0.012 0.072 0.008 0.636
#> GSM1105460     2  0.5160    0.34019 0.000 0.552 0.040 0.004 0.020 0.384
#> GSM1105461     2  0.1075    0.71074 0.000 0.952 0.000 0.000 0.000 0.048
#> GSM1105464     3  0.1913    0.75857 0.000 0.000 0.908 0.080 0.000 0.012
#> GSM1105466     6  0.5269    0.64355 0.000 0.248 0.000 0.156 0.000 0.596
#> GSM1105479     2  0.3717    0.31665 0.000 0.616 0.000 0.000 0.000 0.384
#> GSM1105502     3  0.3194    0.68904 0.132 0.000 0.828 0.008 0.000 0.032
#> GSM1105515     1  0.1155    0.90194 0.956 0.000 0.004 0.000 0.004 0.036
#> GSM1105523     4  0.3341    0.47466 0.000 0.000 0.208 0.776 0.004 0.012
#> GSM1105550     4  0.3608    0.40679 0.000 0.000 0.248 0.736 0.004 0.012
#> GSM1105450     2  0.0000    0.71986 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1105451     2  0.1204    0.70746 0.000 0.944 0.000 0.000 0.000 0.056
#> GSM1105454     6  0.4848   -0.04733 0.000 0.468 0.032 0.000 0.012 0.488
#> GSM1105468     2  0.0000    0.71986 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1105481     2  0.6096   -0.02925 0.000 0.444 0.036 0.024 0.056 0.440
#> GSM1105504     4  0.4551   -0.10923 0.000 0.000 0.436 0.536 0.016 0.012
#> GSM1105517     3  0.4199    0.42025 0.000 0.000 0.568 0.416 0.000 0.016
#> GSM1105525     3  0.2946    0.73367 0.000 0.000 0.812 0.176 0.000 0.012
#> GSM1105552     3  0.4393    0.32983 0.000 0.000 0.532 0.448 0.008 0.012
#> GSM1105452     5  0.0632    0.91569 0.000 0.000 0.000 0.024 0.976 0.000
#> GSM1105453     2  0.4491    0.63243 0.000 0.716 0.032 0.004 0.028 0.220
#> GSM1105456     6  0.4848   -0.04733 0.000 0.468 0.032 0.000 0.012 0.488

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) other(p) time(p) individual(p) k
#> ATC:kmeans 117   0.8941   0.5394  0.4861        0.0231 2
#> ATC:kmeans 120   0.2605   0.9988  0.0571        0.0232 3
#> ATC:kmeans  85   0.0241   0.2719  0.2987        0.0239 4
#> ATC:kmeans  86   0.1538   0.1178  0.3891        0.0124 5
#> ATC:kmeans  94   0.5150   0.0852  0.6426        0.0380 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 44956 rows and 120 columns.
#>   Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'ATC' method.
#>   Subgroups are detected by 'skmeans' method.
#>   Performed in total 1250 partitions by row resampling.
#>   Best k for subgroups seems to be 3.
#> 
#> Following methods can be applied to this 'ConsensusPartition' object:
#>  [1] "cola_report"             "collect_classes"         "collect_plots"          
#>  [4] "collect_stats"           "colnames"                "compare_signatures"     
#>  [7] "consensus_heatmap"       "dimension_reduction"     "functional_enrichment"  
#> [10] "get_anno_col"            "get_anno"                "get_classes"            
#> [13] "get_consensus"           "get_matrix"              "get_membership"         
#> [16] "get_param"               "get_signatures"          "get_stats"              
#> [19] "is_best_k"               "is_stable_k"             "membership_heatmap"     
#> [22] "ncol"                    "nrow"                    "plot_ecdf"              
#> [25] "rownames"                "select_partition_number" "show"                   
#> [28] "suggest_best_k"          "test_to_known_factors"

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

collect_plots(res)

plot of chunk ATC-skmeans-collect-plots

The plots are:

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

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

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

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

select_partition_number(res)

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

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

get_stats(res)
#>   k 1-PAC mean_silhouette concordance area_increased  Rand Jaccard
#> 2 2 1.000           0.980       0.993         0.4994 0.503   0.503
#> 3 3 1.000           0.984       0.993         0.2203 0.872   0.750
#> 4 4 0.868           0.869       0.940         0.1150 0.944   0.857
#> 5 5 0.855           0.836       0.896         0.0650 0.905   0.722
#> 6 6 0.835           0.832       0.912         0.0439 0.974   0.900

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
#> GSM1105438     2   0.000      0.987 0.000 1.000
#> GSM1105486     2   0.000      0.987 0.000 1.000
#> GSM1105487     1   0.000      1.000 1.000 0.000
#> GSM1105490     2   0.000      0.987 0.000 1.000
#> GSM1105491     1   0.000      1.000 1.000 0.000
#> GSM1105495     2   0.000      0.987 0.000 1.000
#> GSM1105498     2   0.000      0.987 0.000 1.000
#> GSM1105499     1   0.000      1.000 1.000 0.000
#> GSM1105506     2   0.000      0.987 0.000 1.000
#> GSM1105442     2   0.000      0.987 0.000 1.000
#> GSM1105511     2   0.000      0.987 0.000 1.000
#> GSM1105514     2   0.000      0.987 0.000 1.000
#> GSM1105518     2   0.000      0.987 0.000 1.000
#> GSM1105522     1   0.000      1.000 1.000 0.000
#> GSM1105534     1   0.000      1.000 1.000 0.000
#> GSM1105535     1   0.000      1.000 1.000 0.000
#> GSM1105538     1   0.000      1.000 1.000 0.000
#> GSM1105542     2   0.000      0.987 0.000 1.000
#> GSM1105443     2   0.000      0.987 0.000 1.000
#> GSM1105551     1   0.000      1.000 1.000 0.000
#> GSM1105554     1   0.000      1.000 1.000 0.000
#> GSM1105555     1   0.000      1.000 1.000 0.000
#> GSM1105447     2   0.000      0.987 0.000 1.000
#> GSM1105467     2   0.000      0.987 0.000 1.000
#> GSM1105470     2   0.000      0.987 0.000 1.000
#> GSM1105471     2   0.000      0.987 0.000 1.000
#> GSM1105474     2   0.000      0.987 0.000 1.000
#> GSM1105475     2   0.000      0.987 0.000 1.000
#> GSM1105440     1   0.000      1.000 1.000 0.000
#> GSM1105488     2   0.000      0.987 0.000 1.000
#> GSM1105489     1   0.000      1.000 1.000 0.000
#> GSM1105492     1   0.000      1.000 1.000 0.000
#> GSM1105493     1   0.000      1.000 1.000 0.000
#> GSM1105497     2   0.000      0.987 0.000 1.000
#> GSM1105500     1   0.000      1.000 1.000 0.000
#> GSM1105501     2   0.000      0.987 0.000 1.000
#> GSM1105508     1   0.000      1.000 1.000 0.000
#> GSM1105444     2   0.000      0.987 0.000 1.000
#> GSM1105513     2   0.000      0.987 0.000 1.000
#> GSM1105516     1   0.000      1.000 1.000 0.000
#> GSM1105520     2   0.000      0.987 0.000 1.000
#> GSM1105524     1   0.000      1.000 1.000 0.000
#> GSM1105536     2   0.000      0.987 0.000 1.000
#> GSM1105537     1   0.000      1.000 1.000 0.000
#> GSM1105540     1   0.000      1.000 1.000 0.000
#> GSM1105544     1   0.000      1.000 1.000 0.000
#> GSM1105445     2   0.000      0.987 0.000 1.000
#> GSM1105553     2   0.998      0.115 0.472 0.528
#> GSM1105556     1   0.000      1.000 1.000 0.000
#> GSM1105557     2   0.000      0.987 0.000 1.000
#> GSM1105449     2   0.000      0.987 0.000 1.000
#> GSM1105469     1   0.000      1.000 1.000 0.000
#> GSM1105472     2   0.000      0.987 0.000 1.000
#> GSM1105473     1   0.000      1.000 1.000 0.000
#> GSM1105476     2   0.000      0.987 0.000 1.000
#> GSM1105477     2   0.000      0.987 0.000 1.000
#> GSM1105478     2   0.000      0.987 0.000 1.000
#> GSM1105510     2   0.000      0.987 0.000 1.000
#> GSM1105530     1   0.000      1.000 1.000 0.000
#> GSM1105539     1   0.000      1.000 1.000 0.000
#> GSM1105480     2   0.000      0.987 0.000 1.000
#> GSM1105512     1   0.000      1.000 1.000 0.000
#> GSM1105532     1   0.000      1.000 1.000 0.000
#> GSM1105541     1   0.000      1.000 1.000 0.000
#> GSM1105439     2   0.000      0.987 0.000 1.000
#> GSM1105463     1   0.000      1.000 1.000 0.000
#> GSM1105482     1   0.000      1.000 1.000 0.000
#> GSM1105483     2   0.000      0.987 0.000 1.000
#> GSM1105494     2   0.000      0.987 0.000 1.000
#> GSM1105503     2   0.000      0.987 0.000 1.000
#> GSM1105507     1   0.000      1.000 1.000 0.000
#> GSM1105446     2   0.000      0.987 0.000 1.000
#> GSM1105519     1   0.000      1.000 1.000 0.000
#> GSM1105526     2   0.000      0.987 0.000 1.000
#> GSM1105527     2   0.000      0.987 0.000 1.000
#> GSM1105531     1   0.000      1.000 1.000 0.000
#> GSM1105543     2   0.000      0.987 0.000 1.000
#> GSM1105546     1   0.000      1.000 1.000 0.000
#> GSM1105547     1   0.000      1.000 1.000 0.000
#> GSM1105455     2   0.000      0.987 0.000 1.000
#> GSM1105458     2   0.000      0.987 0.000 1.000
#> GSM1105459     2   0.000      0.987 0.000 1.000
#> GSM1105462     2   0.971      0.340 0.400 0.600
#> GSM1105441     2   0.000      0.987 0.000 1.000
#> GSM1105465     2   0.000      0.987 0.000 1.000
#> GSM1105484     2   0.000      0.987 0.000 1.000
#> GSM1105485     1   0.000      1.000 1.000 0.000
#> GSM1105496     1   0.000      1.000 1.000 0.000
#> GSM1105505     1   0.000      1.000 1.000 0.000
#> GSM1105509     1   0.000      1.000 1.000 0.000
#> GSM1105448     2   0.000      0.987 0.000 1.000
#> GSM1105521     1   0.000      1.000 1.000 0.000
#> GSM1105528     2   0.000      0.987 0.000 1.000
#> GSM1105529     2   0.000      0.987 0.000 1.000
#> GSM1105533     1   0.000      1.000 1.000 0.000
#> GSM1105545     2   0.000      0.987 0.000 1.000
#> GSM1105548     1   0.000      1.000 1.000 0.000
#> GSM1105549     1   0.000      1.000 1.000 0.000
#> GSM1105457     2   0.000      0.987 0.000 1.000
#> GSM1105460     2   0.000      0.987 0.000 1.000
#> GSM1105461     2   0.000      0.987 0.000 1.000
#> GSM1105464     1   0.000      1.000 1.000 0.000
#> GSM1105466     2   0.000      0.987 0.000 1.000
#> GSM1105479     2   0.000      0.987 0.000 1.000
#> GSM1105502     1   0.000      1.000 1.000 0.000
#> GSM1105515     1   0.000      1.000 1.000 0.000
#> GSM1105523     1   0.000      1.000 1.000 0.000
#> GSM1105550     1   0.000      1.000 1.000 0.000
#> GSM1105450     2   0.000      0.987 0.000 1.000
#> GSM1105451     2   0.000      0.987 0.000 1.000
#> GSM1105454     2   0.000      0.987 0.000 1.000
#> GSM1105468     2   0.000      0.987 0.000 1.000
#> GSM1105481     2   0.000      0.987 0.000 1.000
#> GSM1105504     1   0.000      1.000 1.000 0.000
#> GSM1105517     1   0.000      1.000 1.000 0.000
#> GSM1105525     1   0.000      1.000 1.000 0.000
#> GSM1105552     1   0.000      1.000 1.000 0.000
#> GSM1105452     2   0.000      0.987 0.000 1.000
#> GSM1105453     2   0.000      0.987 0.000 1.000
#> GSM1105456     2   0.000      0.987 0.000 1.000

show/hide code output

cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#>            class entropy silhouette    p1    p2    p3
#> GSM1105438     2  0.0237      0.990 0.000 0.996 0.004
#> GSM1105486     2  0.0237      0.990 0.000 0.996 0.004
#> GSM1105487     1  0.0000      0.997 1.000 0.000 0.000
#> GSM1105490     2  0.0000      0.990 0.000 1.000 0.000
#> GSM1105491     3  0.0237      0.984 0.004 0.000 0.996
#> GSM1105495     2  0.0424      0.987 0.000 0.992 0.008
#> GSM1105498     2  0.0000      0.990 0.000 1.000 0.000
#> GSM1105499     1  0.0000      0.997 1.000 0.000 0.000
#> GSM1105506     2  0.0000      0.990 0.000 1.000 0.000
#> GSM1105442     3  0.0000      0.985 0.000 0.000 1.000
#> GSM1105511     2  0.0000      0.990 0.000 1.000 0.000
#> GSM1105514     2  0.0237      0.990 0.000 0.996 0.004
#> GSM1105518     2  0.0000      0.990 0.000 1.000 0.000
#> GSM1105522     1  0.0000      0.997 1.000 0.000 0.000
#> GSM1105534     1  0.0000      0.997 1.000 0.000 0.000
#> GSM1105535     1  0.0000      0.997 1.000 0.000 0.000
#> GSM1105538     1  0.0000      0.997 1.000 0.000 0.000
#> GSM1105542     3  0.0000      0.985 0.000 0.000 1.000
#> GSM1105443     2  0.0000      0.990 0.000 1.000 0.000
#> GSM1105551     1  0.0000      0.997 1.000 0.000 0.000
#> GSM1105554     1  0.0000      0.997 1.000 0.000 0.000
#> GSM1105555     1  0.0000      0.997 1.000 0.000 0.000
#> GSM1105447     2  0.0237      0.990 0.000 0.996 0.004
#> GSM1105467     2  0.0237      0.990 0.000 0.996 0.004
#> GSM1105470     2  0.0237      0.990 0.000 0.996 0.004
#> GSM1105471     2  0.0000      0.990 0.000 1.000 0.000
#> GSM1105474     2  0.0237      0.990 0.000 0.996 0.004
#> GSM1105475     2  0.0000      0.990 0.000 1.000 0.000
#> GSM1105440     1  0.0000      0.997 1.000 0.000 0.000
#> GSM1105488     3  0.0000      0.985 0.000 0.000 1.000
#> GSM1105489     1  0.0000      0.997 1.000 0.000 0.000
#> GSM1105492     1  0.0000      0.997 1.000 0.000 0.000
#> GSM1105493     1  0.0000      0.997 1.000 0.000 0.000
#> GSM1105497     3  0.0000      0.985 0.000 0.000 1.000
#> GSM1105500     3  0.0237      0.984 0.004 0.000 0.996
#> GSM1105501     2  0.0000      0.990 0.000 1.000 0.000
#> GSM1105508     1  0.0000      0.997 1.000 0.000 0.000
#> GSM1105444     2  0.0237      0.990 0.000 0.996 0.004
#> GSM1105513     2  0.0000      0.990 0.000 1.000 0.000
#> GSM1105516     1  0.0000      0.997 1.000 0.000 0.000
#> GSM1105520     2  0.0000      0.990 0.000 1.000 0.000
#> GSM1105524     1  0.0000      0.997 1.000 0.000 0.000
#> GSM1105536     2  0.1031      0.972 0.000 0.976 0.024
#> GSM1105537     1  0.0000      0.997 1.000 0.000 0.000
#> GSM1105540     1  0.0000      0.997 1.000 0.000 0.000
#> GSM1105544     3  0.0237      0.984 0.004 0.000 0.996
#> GSM1105445     2  0.0000      0.990 0.000 1.000 0.000
#> GSM1105553     3  0.0000      0.985 0.000 0.000 1.000
#> GSM1105556     1  0.0000      0.997 1.000 0.000 0.000
#> GSM1105557     2  0.0000      0.990 0.000 1.000 0.000
#> GSM1105449     2  0.0237      0.990 0.000 0.996 0.004
#> GSM1105469     1  0.2878      0.870 0.904 0.096 0.000
#> GSM1105472     2  0.0237      0.990 0.000 0.996 0.004
#> GSM1105473     1  0.0000      0.997 1.000 0.000 0.000
#> GSM1105476     2  0.0237      0.990 0.000 0.996 0.004
#> GSM1105477     3  0.0000      0.985 0.000 0.000 1.000
#> GSM1105478     2  0.0000      0.990 0.000 1.000 0.000
#> GSM1105510     3  0.0000      0.985 0.000 0.000 1.000
#> GSM1105530     1  0.0000      0.997 1.000 0.000 0.000
#> GSM1105539     1  0.0000      0.997 1.000 0.000 0.000
#> GSM1105480     2  0.0000      0.990 0.000 1.000 0.000
#> GSM1105512     1  0.0000      0.997 1.000 0.000 0.000
#> GSM1105532     1  0.0000      0.997 1.000 0.000 0.000
#> GSM1105541     1  0.0000      0.997 1.000 0.000 0.000
#> GSM1105439     2  0.0000      0.990 0.000 1.000 0.000
#> GSM1105463     1  0.0000      0.997 1.000 0.000 0.000
#> GSM1105482     1  0.0000      0.997 1.000 0.000 0.000
#> GSM1105483     2  0.0000      0.990 0.000 1.000 0.000
#> GSM1105494     2  0.0000      0.990 0.000 1.000 0.000
#> GSM1105503     2  0.0000      0.990 0.000 1.000 0.000
#> GSM1105507     1  0.0000      0.997 1.000 0.000 0.000
#> GSM1105446     3  0.4346      0.773 0.000 0.184 0.816
#> GSM1105519     1  0.0000      0.997 1.000 0.000 0.000
#> GSM1105526     2  0.0237      0.990 0.000 0.996 0.004
#> GSM1105527     2  0.0000      0.990 0.000 1.000 0.000
#> GSM1105531     1  0.0000      0.997 1.000 0.000 0.000
#> GSM1105543     2  0.0237      0.990 0.000 0.996 0.004
#> GSM1105546     1  0.0000      0.997 1.000 0.000 0.000
#> GSM1105547     1  0.0000      0.997 1.000 0.000 0.000
#> GSM1105455     2  0.0000      0.990 0.000 1.000 0.000
#> GSM1105458     2  0.0237      0.990 0.000 0.996 0.004
#> GSM1105459     2  0.0237      0.990 0.000 0.996 0.004
#> GSM1105462     2  0.5905      0.453 0.352 0.648 0.000
#> GSM1105441     2  0.0237      0.990 0.000 0.996 0.004
#> GSM1105465     3  0.0000      0.985 0.000 0.000 1.000
#> GSM1105484     2  0.0237      0.990 0.000 0.996 0.004
#> GSM1105485     3  0.0237      0.984 0.004 0.000 0.996
#> GSM1105496     3  0.0237      0.984 0.004 0.000 0.996
#> GSM1105505     1  0.0000      0.997 1.000 0.000 0.000
#> GSM1105509     1  0.0000      0.997 1.000 0.000 0.000
#> GSM1105448     2  0.0237      0.990 0.000 0.996 0.004
#> GSM1105521     1  0.0000      0.997 1.000 0.000 0.000
#> GSM1105528     2  0.0592      0.983 0.000 0.988 0.012
#> GSM1105529     3  0.0000      0.985 0.000 0.000 1.000
#> GSM1105533     1  0.0000      0.997 1.000 0.000 0.000
#> GSM1105545     2  0.0000      0.990 0.000 1.000 0.000
#> GSM1105548     1  0.0000      0.997 1.000 0.000 0.000
#> GSM1105549     1  0.0000      0.997 1.000 0.000 0.000
#> GSM1105457     2  0.0000      0.990 0.000 1.000 0.000
#> GSM1105460     2  0.0000      0.990 0.000 1.000 0.000
#> GSM1105461     2  0.0237      0.990 0.000 0.996 0.004
#> GSM1105464     1  0.0000      0.997 1.000 0.000 0.000
#> GSM1105466     2  0.0000      0.990 0.000 1.000 0.000
#> GSM1105479     2  0.0000      0.990 0.000 1.000 0.000
#> GSM1105502     1  0.0000      0.997 1.000 0.000 0.000
#> GSM1105515     1  0.0000      0.997 1.000 0.000 0.000
#> GSM1105523     1  0.0237      0.993 0.996 0.004 0.000
#> GSM1105550     1  0.0000      0.997 1.000 0.000 0.000
#> GSM1105450     2  0.0237      0.990 0.000 0.996 0.004
#> GSM1105451     2  0.0237      0.990 0.000 0.996 0.004
#> GSM1105454     2  0.0237      0.990 0.000 0.996 0.004
#> GSM1105468     2  0.0237      0.990 0.000 0.996 0.004
#> GSM1105481     2  0.0237      0.990 0.000 0.996 0.004
#> GSM1105504     1  0.0000      0.997 1.000 0.000 0.000
#> GSM1105517     1  0.0000      0.997 1.000 0.000 0.000
#> GSM1105525     1  0.0000      0.997 1.000 0.000 0.000
#> GSM1105552     1  0.0000      0.997 1.000 0.000 0.000
#> GSM1105452     3  0.0000      0.985 0.000 0.000 1.000
#> GSM1105453     2  0.0237      0.990 0.000 0.996 0.004
#> GSM1105456     2  0.0237      0.990 0.000 0.996 0.004

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>            class entropy silhouette    p1    p2    p3    p4
#> GSM1105438     2  0.0000      0.904 0.000 1.000 0.000 0.000
#> GSM1105486     2  0.0000      0.904 0.000 1.000 0.000 0.000
#> GSM1105487     1  0.0000      0.982 1.000 0.000 0.000 0.000
#> GSM1105490     2  0.2589      0.843 0.000 0.884 0.116 0.000
#> GSM1105491     4  0.0000      0.939 0.000 0.000 0.000 1.000
#> GSM1105495     2  0.0000      0.904 0.000 1.000 0.000 0.000
#> GSM1105498     2  0.4830      0.564 0.000 0.608 0.392 0.000
#> GSM1105499     1  0.0000      0.982 1.000 0.000 0.000 0.000
#> GSM1105506     2  0.4431      0.686 0.000 0.696 0.304 0.000
#> GSM1105442     4  0.0000      0.939 0.000 0.000 0.000 1.000
#> GSM1105511     2  0.4843      0.558 0.000 0.604 0.396 0.000
#> GSM1105514     2  0.0000      0.904 0.000 1.000 0.000 0.000
#> GSM1105518     2  0.3172      0.814 0.000 0.840 0.160 0.000
#> GSM1105522     1  0.0000      0.982 1.000 0.000 0.000 0.000
#> GSM1105534     1  0.0000      0.982 1.000 0.000 0.000 0.000
#> GSM1105535     1  0.0000      0.982 1.000 0.000 0.000 0.000
#> GSM1105538     1  0.0000      0.982 1.000 0.000 0.000 0.000
#> GSM1105542     4  0.0000      0.939 0.000 0.000 0.000 1.000
#> GSM1105443     2  0.0000      0.904 0.000 1.000 0.000 0.000
#> GSM1105551     1  0.0000      0.982 1.000 0.000 0.000 0.000
#> GSM1105554     1  0.0000      0.982 1.000 0.000 0.000 0.000
#> GSM1105555     1  0.0000      0.982 1.000 0.000 0.000 0.000
#> GSM1105447     2  0.0000      0.904 0.000 1.000 0.000 0.000
#> GSM1105467     2  0.0000      0.904 0.000 1.000 0.000 0.000
#> GSM1105470     2  0.0000      0.904 0.000 1.000 0.000 0.000
#> GSM1105471     2  0.0000      0.904 0.000 1.000 0.000 0.000
#> GSM1105474     2  0.0000      0.904 0.000 1.000 0.000 0.000
#> GSM1105475     2  0.0000      0.904 0.000 1.000 0.000 0.000
#> GSM1105440     1  0.0000      0.982 1.000 0.000 0.000 0.000
#> GSM1105488     4  0.0000      0.939 0.000 0.000 0.000 1.000
#> GSM1105489     1  0.0000      0.982 1.000 0.000 0.000 0.000
#> GSM1105492     1  0.0000      0.982 1.000 0.000 0.000 0.000
#> GSM1105493     1  0.0000      0.982 1.000 0.000 0.000 0.000
#> GSM1105497     4  0.0000      0.939 0.000 0.000 0.000 1.000
#> GSM1105500     4  0.0000      0.939 0.000 0.000 0.000 1.000
#> GSM1105501     2  0.2921      0.828 0.000 0.860 0.140 0.000
#> GSM1105508     1  0.0000      0.982 1.000 0.000 0.000 0.000
#> GSM1105444     2  0.0000      0.904 0.000 1.000 0.000 0.000
#> GSM1105513     2  0.2647      0.841 0.000 0.880 0.120 0.000
#> GSM1105516     1  0.0000      0.982 1.000 0.000 0.000 0.000
#> GSM1105520     2  0.4382      0.695 0.000 0.704 0.296 0.000
#> GSM1105524     1  0.0000      0.982 1.000 0.000 0.000 0.000
#> GSM1105536     3  0.4500      0.446 0.000 0.316 0.684 0.000
#> GSM1105537     1  0.0000      0.982 1.000 0.000 0.000 0.000
#> GSM1105540     3  0.4985      0.144 0.468 0.000 0.532 0.000
#> GSM1105544     4  0.2216      0.860 0.000 0.000 0.092 0.908
#> GSM1105445     2  0.0000      0.904 0.000 1.000 0.000 0.000
#> GSM1105553     4  0.0000      0.939 0.000 0.000 0.000 1.000
#> GSM1105556     1  0.0000      0.982 1.000 0.000 0.000 0.000
#> GSM1105557     2  0.4406      0.691 0.000 0.700 0.300 0.000
#> GSM1105449     2  0.0000      0.904 0.000 1.000 0.000 0.000
#> GSM1105469     3  0.0000      0.727 0.000 0.000 1.000 0.000
#> GSM1105472     2  0.0000      0.904 0.000 1.000 0.000 0.000
#> GSM1105473     1  0.0000      0.982 1.000 0.000 0.000 0.000
#> GSM1105476     2  0.0000      0.904 0.000 1.000 0.000 0.000
#> GSM1105477     4  0.4961      0.306 0.000 0.000 0.448 0.552
#> GSM1105478     2  0.4454      0.681 0.000 0.692 0.308 0.000
#> GSM1105510     4  0.0000      0.939 0.000 0.000 0.000 1.000
#> GSM1105530     1  0.0188      0.979 0.996 0.000 0.004 0.000
#> GSM1105539     1  0.0000      0.982 1.000 0.000 0.000 0.000
#> GSM1105480     2  0.4830      0.564 0.000 0.608 0.392 0.000
#> GSM1105512     1  0.0000      0.982 1.000 0.000 0.000 0.000
#> GSM1105532     1  0.0188      0.979 0.996 0.000 0.004 0.000
#> GSM1105541     1  0.0000      0.982 1.000 0.000 0.000 0.000
#> GSM1105439     2  0.0000      0.904 0.000 1.000 0.000 0.000
#> GSM1105463     1  0.0000      0.982 1.000 0.000 0.000 0.000
#> GSM1105482     1  0.0000      0.982 1.000 0.000 0.000 0.000
#> GSM1105483     3  0.0000      0.727 0.000 0.000 1.000 0.000
#> GSM1105494     2  0.4406      0.691 0.000 0.700 0.300 0.000
#> GSM1105503     2  0.4830      0.564 0.000 0.608 0.392 0.000
#> GSM1105507     1  0.0000      0.982 1.000 0.000 0.000 0.000
#> GSM1105446     4  0.3873      0.567 0.000 0.228 0.000 0.772
#> GSM1105519     1  0.0000      0.982 1.000 0.000 0.000 0.000
#> GSM1105526     2  0.2408      0.853 0.000 0.896 0.104 0.000
#> GSM1105527     2  0.4843      0.558 0.000 0.604 0.396 0.000
#> GSM1105531     1  0.0188      0.979 0.996 0.000 0.004 0.000
#> GSM1105543     2  0.0000      0.904 0.000 1.000 0.000 0.000
#> GSM1105546     1  0.0000      0.982 1.000 0.000 0.000 0.000
#> GSM1105547     1  0.0000      0.982 1.000 0.000 0.000 0.000
#> GSM1105455     2  0.0000      0.904 0.000 1.000 0.000 0.000
#> GSM1105458     2  0.0000      0.904 0.000 1.000 0.000 0.000
#> GSM1105459     2  0.0000      0.904 0.000 1.000 0.000 0.000
#> GSM1105462     3  0.0469      0.732 0.012 0.000 0.988 0.000
#> GSM1105441     2  0.0000      0.904 0.000 1.000 0.000 0.000
#> GSM1105465     4  0.0000      0.939 0.000 0.000 0.000 1.000
#> GSM1105484     2  0.0000      0.904 0.000 1.000 0.000 0.000
#> GSM1105485     4  0.0000      0.939 0.000 0.000 0.000 1.000
#> GSM1105496     4  0.0000      0.939 0.000 0.000 0.000 1.000
#> GSM1105505     1  0.0000      0.982 1.000 0.000 0.000 0.000
#> GSM1105509     1  0.0000      0.982 1.000 0.000 0.000 0.000
#> GSM1105448     2  0.0000      0.904 0.000 1.000 0.000 0.000
#> GSM1105521     1  0.0000      0.982 1.000 0.000 0.000 0.000
#> GSM1105528     2  0.0000      0.904 0.000 1.000 0.000 0.000
#> GSM1105529     4  0.0000      0.939 0.000 0.000 0.000 1.000
#> GSM1105533     1  0.0000      0.982 1.000 0.000 0.000 0.000
#> GSM1105545     3  0.1118      0.714 0.000 0.036 0.964 0.000
#> GSM1105548     1  0.0000      0.982 1.000 0.000 0.000 0.000
#> GSM1105549     1  0.0000      0.982 1.000 0.000 0.000 0.000
#> GSM1105457     2  0.3873      0.759 0.000 0.772 0.228 0.000
#> GSM1105460     2  0.0000      0.904 0.000 1.000 0.000 0.000
#> GSM1105461     2  0.0000      0.904 0.000 1.000 0.000 0.000
#> GSM1105464     1  0.0000      0.982 1.000 0.000 0.000 0.000
#> GSM1105466     2  0.4222      0.718 0.000 0.728 0.272 0.000
#> GSM1105479     2  0.0000      0.904 0.000 1.000 0.000 0.000
#> GSM1105502     1  0.0000      0.982 1.000 0.000 0.000 0.000
#> GSM1105515     1  0.0000      0.982 1.000 0.000 0.000 0.000
#> GSM1105523     3  0.0707      0.731 0.020 0.000 0.980 0.000
#> GSM1105550     3  0.4454      0.517 0.308 0.000 0.692 0.000
#> GSM1105450     2  0.0000      0.904 0.000 1.000 0.000 0.000
#> GSM1105451     2  0.0000      0.904 0.000 1.000 0.000 0.000
#> GSM1105454     2  0.0000      0.904 0.000 1.000 0.000 0.000
#> GSM1105468     2  0.0000      0.904 0.000 1.000 0.000 0.000
#> GSM1105481     2  0.0000      0.904 0.000 1.000 0.000 0.000
#> GSM1105504     1  0.0000      0.982 1.000 0.000 0.000 0.000
#> GSM1105517     1  0.3975      0.636 0.760 0.000 0.240 0.000
#> GSM1105525     1  0.4898      0.169 0.584 0.000 0.416 0.000
#> GSM1105552     1  0.0000      0.982 1.000 0.000 0.000 0.000
#> GSM1105452     4  0.0000      0.939 0.000 0.000 0.000 1.000
#> GSM1105453     2  0.0000      0.904 0.000 1.000 0.000 0.000
#> GSM1105456     2  0.0000      0.904 0.000 1.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
#> GSM1105438     2  0.0000     0.9349 0.000 1.000 0.000 0.000 0.000
#> GSM1105486     2  0.0000     0.9349 0.000 1.000 0.000 0.000 0.000
#> GSM1105487     1  0.0000     0.9872 1.000 0.000 0.000 0.000 0.000
#> GSM1105490     4  0.4291     0.7809 0.000 0.464 0.000 0.536 0.000
#> GSM1105491     5  0.0000     0.8255 0.000 0.000 0.000 0.000 1.000
#> GSM1105495     2  0.2230     0.7739 0.000 0.884 0.000 0.000 0.116
#> GSM1105498     4  0.0510     0.1746 0.000 0.000 0.016 0.984 0.000
#> GSM1105499     1  0.0000     0.9872 1.000 0.000 0.000 0.000 0.000
#> GSM1105506     4  0.4276     0.8546 0.000 0.380 0.004 0.616 0.000
#> GSM1105442     5  0.0000     0.8255 0.000 0.000 0.000 0.000 1.000
#> GSM1105511     4  0.4585     0.8501 0.000 0.352 0.020 0.628 0.000
#> GSM1105514     2  0.0000     0.9349 0.000 1.000 0.000 0.000 0.000
#> GSM1105518     4  0.4300     0.7594 0.000 0.476 0.000 0.524 0.000
#> GSM1105522     1  0.0000     0.9872 1.000 0.000 0.000 0.000 0.000
#> GSM1105534     1  0.0000     0.9872 1.000 0.000 0.000 0.000 0.000
#> GSM1105535     1  0.0000     0.9872 1.000 0.000 0.000 0.000 0.000
#> GSM1105538     1  0.0000     0.9872 1.000 0.000 0.000 0.000 0.000
#> GSM1105542     5  0.0000     0.8255 0.000 0.000 0.000 0.000 1.000
#> GSM1105443     2  0.1121     0.8954 0.000 0.956 0.000 0.044 0.000
#> GSM1105551     1  0.0000     0.9872 1.000 0.000 0.000 0.000 0.000
#> GSM1105554     1  0.0000     0.9872 1.000 0.000 0.000 0.000 0.000
#> GSM1105555     1  0.0000     0.9872 1.000 0.000 0.000 0.000 0.000
#> GSM1105447     2  0.1043     0.9005 0.000 0.960 0.000 0.040 0.000
#> GSM1105467     2  0.0000     0.9349 0.000 1.000 0.000 0.000 0.000
#> GSM1105470     2  0.0000     0.9349 0.000 1.000 0.000 0.000 0.000
#> GSM1105471     2  0.0000     0.9349 0.000 1.000 0.000 0.000 0.000
#> GSM1105474     2  0.0000     0.9349 0.000 1.000 0.000 0.000 0.000
#> GSM1105475     2  0.0510     0.9234 0.000 0.984 0.000 0.016 0.000
#> GSM1105440     1  0.0000     0.9872 1.000 0.000 0.000 0.000 0.000
#> GSM1105488     5  0.0000     0.8255 0.000 0.000 0.000 0.000 1.000
#> GSM1105489     1  0.0000     0.9872 1.000 0.000 0.000 0.000 0.000
#> GSM1105492     1  0.0000     0.9872 1.000 0.000 0.000 0.000 0.000
#> GSM1105493     1  0.0000     0.9872 1.000 0.000 0.000 0.000 0.000
#> GSM1105497     5  0.0162     0.8240 0.000 0.000 0.000 0.004 0.996
#> GSM1105500     5  0.4886     0.5951 0.000 0.000 0.032 0.372 0.596
#> GSM1105501     2  0.4171    -0.3927 0.000 0.604 0.000 0.396 0.000
#> GSM1105508     1  0.0000     0.9872 1.000 0.000 0.000 0.000 0.000
#> GSM1105444     2  0.0000     0.9349 0.000 1.000 0.000 0.000 0.000
#> GSM1105513     4  0.4297     0.7674 0.000 0.472 0.000 0.528 0.000
#> GSM1105516     1  0.0000     0.9872 1.000 0.000 0.000 0.000 0.000
#> GSM1105520     4  0.4455     0.8426 0.000 0.404 0.008 0.588 0.000
#> GSM1105524     1  0.0000     0.9872 1.000 0.000 0.000 0.000 0.000
#> GSM1105536     3  0.2470     0.6127 0.000 0.104 0.884 0.000 0.012
#> GSM1105537     1  0.0000     0.9872 1.000 0.000 0.000 0.000 0.000
#> GSM1105540     3  0.5668     0.5288 0.144 0.000 0.624 0.232 0.000
#> GSM1105544     5  0.6612     0.3372 0.000 0.000 0.216 0.372 0.412
#> GSM1105445     2  0.3242     0.4968 0.000 0.784 0.000 0.216 0.000
#> GSM1105553     5  0.4886     0.5951 0.000 0.000 0.032 0.372 0.596
#> GSM1105556     1  0.0000     0.9872 1.000 0.000 0.000 0.000 0.000
#> GSM1105557     4  0.4138     0.8534 0.000 0.384 0.000 0.616 0.000
#> GSM1105449     2  0.0000     0.9349 0.000 1.000 0.000 0.000 0.000
#> GSM1105469     3  0.3508     0.6061 0.000 0.000 0.748 0.252 0.000
#> GSM1105472     2  0.0000     0.9349 0.000 1.000 0.000 0.000 0.000
#> GSM1105473     1  0.0000     0.9872 1.000 0.000 0.000 0.000 0.000
#> GSM1105476     2  0.0000     0.9349 0.000 1.000 0.000 0.000 0.000
#> GSM1105477     3  0.6710    -0.1483 0.000 0.000 0.408 0.252 0.340
#> GSM1105478     4  0.4251     0.8545 0.000 0.372 0.004 0.624 0.000
#> GSM1105510     5  0.0000     0.8255 0.000 0.000 0.000 0.000 1.000
#> GSM1105530     1  0.1478     0.9349 0.936 0.000 0.064 0.000 0.000
#> GSM1105539     1  0.1410     0.9385 0.940 0.000 0.060 0.000 0.000
#> GSM1105480     4  0.4232     0.8241 0.000 0.312 0.012 0.676 0.000
#> GSM1105512     1  0.0000     0.9872 1.000 0.000 0.000 0.000 0.000
#> GSM1105532     1  0.1732     0.9187 0.920 0.000 0.080 0.000 0.000
#> GSM1105541     1  0.1410     0.9385 0.940 0.000 0.060 0.000 0.000
#> GSM1105439     2  0.1043     0.9005 0.000 0.960 0.000 0.040 0.000
#> GSM1105463     1  0.0000     0.9872 1.000 0.000 0.000 0.000 0.000
#> GSM1105482     1  0.0000     0.9872 1.000 0.000 0.000 0.000 0.000
#> GSM1105483     3  0.3395     0.6158 0.000 0.000 0.764 0.236 0.000
#> GSM1105494     4  0.3966     0.8390 0.000 0.336 0.000 0.664 0.000
#> GSM1105503     4  0.3779     0.7229 0.000 0.236 0.012 0.752 0.000
#> GSM1105507     1  0.0000     0.9872 1.000 0.000 0.000 0.000 0.000
#> GSM1105446     5  0.4249     0.1203 0.000 0.432 0.000 0.000 0.568
#> GSM1105519     1  0.0000     0.9872 1.000 0.000 0.000 0.000 0.000
#> GSM1105526     2  0.3827     0.6850 0.000 0.816 0.004 0.068 0.112
#> GSM1105527     4  0.4654     0.8482 0.000 0.348 0.024 0.628 0.000
#> GSM1105531     1  0.1965     0.9004 0.904 0.000 0.096 0.000 0.000
#> GSM1105543     2  0.0000     0.9349 0.000 1.000 0.000 0.000 0.000
#> GSM1105546     1  0.0000     0.9872 1.000 0.000 0.000 0.000 0.000
#> GSM1105547     1  0.0000     0.9872 1.000 0.000 0.000 0.000 0.000
#> GSM1105455     2  0.1197     0.8901 0.000 0.952 0.000 0.048 0.000
#> GSM1105458     2  0.0000     0.9349 0.000 1.000 0.000 0.000 0.000
#> GSM1105459     2  0.0000     0.9349 0.000 1.000 0.000 0.000 0.000
#> GSM1105462     3  0.0992     0.6729 0.008 0.000 0.968 0.024 0.000
#> GSM1105441     2  0.0000     0.9349 0.000 1.000 0.000 0.000 0.000
#> GSM1105465     5  0.0000     0.8255 0.000 0.000 0.000 0.000 1.000
#> GSM1105484     2  0.1792     0.8246 0.000 0.916 0.000 0.000 0.084
#> GSM1105485     5  0.0000     0.8255 0.000 0.000 0.000 0.000 1.000
#> GSM1105496     5  0.4886     0.5951 0.000 0.000 0.032 0.372 0.596
#> GSM1105505     1  0.0162     0.9843 0.996 0.000 0.004 0.000 0.000
#> GSM1105509     1  0.0000     0.9872 1.000 0.000 0.000 0.000 0.000
#> GSM1105448     2  0.0000     0.9349 0.000 1.000 0.000 0.000 0.000
#> GSM1105521     1  0.0000     0.9872 1.000 0.000 0.000 0.000 0.000
#> GSM1105528     2  0.2605     0.7206 0.000 0.852 0.000 0.000 0.148
#> GSM1105529     5  0.0000     0.8255 0.000 0.000 0.000 0.000 1.000
#> GSM1105533     1  0.0000     0.9872 1.000 0.000 0.000 0.000 0.000
#> GSM1105545     3  0.2735     0.6552 0.000 0.036 0.880 0.084 0.000
#> GSM1105548     1  0.0000     0.9872 1.000 0.000 0.000 0.000 0.000
#> GSM1105549     1  0.0000     0.9872 1.000 0.000 0.000 0.000 0.000
#> GSM1105457     4  0.4287     0.7873 0.000 0.460 0.000 0.540 0.000
#> GSM1105460     2  0.0000     0.9349 0.000 1.000 0.000 0.000 0.000
#> GSM1105461     2  0.0000     0.9349 0.000 1.000 0.000 0.000 0.000
#> GSM1105464     1  0.1410     0.9385 0.940 0.000 0.060 0.000 0.000
#> GSM1105466     4  0.4256     0.8155 0.000 0.436 0.000 0.564 0.000
#> GSM1105479     2  0.0963     0.9049 0.000 0.964 0.000 0.036 0.000
#> GSM1105502     1  0.0000     0.9872 1.000 0.000 0.000 0.000 0.000
#> GSM1105515     1  0.0000     0.9872 1.000 0.000 0.000 0.000 0.000
#> GSM1105523     3  0.1195     0.6750 0.012 0.000 0.960 0.028 0.000
#> GSM1105550     3  0.1124     0.6711 0.036 0.000 0.960 0.004 0.000
#> GSM1105450     2  0.0000     0.9349 0.000 1.000 0.000 0.000 0.000
#> GSM1105451     2  0.0000     0.9349 0.000 1.000 0.000 0.000 0.000
#> GSM1105454     2  0.0794     0.9128 0.000 0.972 0.000 0.028 0.000
#> GSM1105468     2  0.0000     0.9349 0.000 1.000 0.000 0.000 0.000
#> GSM1105481     2  0.0000     0.9349 0.000 1.000 0.000 0.000 0.000
#> GSM1105504     1  0.1341     0.9421 0.944 0.000 0.056 0.000 0.000
#> GSM1105517     3  0.4305     0.0886 0.488 0.000 0.512 0.000 0.000
#> GSM1105525     3  0.4331     0.3553 0.400 0.000 0.596 0.004 0.000
#> GSM1105552     1  0.0000     0.9872 1.000 0.000 0.000 0.000 0.000
#> GSM1105452     5  0.0000     0.8255 0.000 0.000 0.000 0.000 1.000
#> GSM1105453     2  0.0000     0.9349 0.000 1.000 0.000 0.000 0.000
#> GSM1105456     2  0.0794     0.9128 0.000 0.972 0.000 0.028 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
#> GSM1105438     2  0.0000     0.9213 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1105486     2  0.0291     0.9217 0.000 0.992 0.000 0.004 0.000 0.004
#> GSM1105487     1  0.0000     0.9557 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM1105490     4  0.3052     0.7986 0.000 0.216 0.000 0.780 0.000 0.004
#> GSM1105491     5  0.0000     1.0000 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM1105495     2  0.1219     0.8896 0.000 0.948 0.000 0.000 0.048 0.004
#> GSM1105498     6  0.3765     0.3654 0.000 0.000 0.000 0.404 0.000 0.596
#> GSM1105499     1  0.0291     0.9537 0.992 0.000 0.000 0.004 0.000 0.004
#> GSM1105506     4  0.1714     0.8355 0.000 0.092 0.000 0.908 0.000 0.000
#> GSM1105442     5  0.0000     1.0000 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM1105511     4  0.1578     0.8035 0.000 0.048 0.004 0.936 0.000 0.012
#> GSM1105514     2  0.0146     0.9206 0.000 0.996 0.000 0.000 0.000 0.004
#> GSM1105518     4  0.3189     0.7767 0.000 0.236 0.000 0.760 0.000 0.004
#> GSM1105522     1  0.0291     0.9536 0.992 0.000 0.000 0.004 0.000 0.004
#> GSM1105534     1  0.0000     0.9557 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM1105535     1  0.0000     0.9557 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM1105538     1  0.0000     0.9557 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM1105542     5  0.0000     1.0000 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM1105443     2  0.2531     0.8301 0.000 0.856 0.000 0.132 0.000 0.012
#> GSM1105551     1  0.0000     0.9557 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM1105554     1  0.0000     0.9557 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM1105555     1  0.0000     0.9557 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM1105447     2  0.2446     0.8386 0.000 0.864 0.000 0.124 0.000 0.012
#> GSM1105467     2  0.0291     0.9217 0.000 0.992 0.000 0.004 0.000 0.004
#> GSM1105470     2  0.0291     0.9217 0.000 0.992 0.000 0.004 0.000 0.004
#> GSM1105471     2  0.0603     0.9195 0.000 0.980 0.000 0.016 0.000 0.004
#> GSM1105474     2  0.0291     0.9217 0.000 0.992 0.000 0.004 0.000 0.004
#> GSM1105475     2  0.1471     0.8916 0.000 0.932 0.000 0.064 0.000 0.004
#> GSM1105440     1  0.0000     0.9557 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM1105488     5  0.0000     1.0000 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM1105489     1  0.0000     0.9557 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM1105492     1  0.0000     0.9557 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM1105493     1  0.0146     0.9548 0.996 0.000 0.000 0.000 0.000 0.004
#> GSM1105497     5  0.0000     1.0000 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM1105500     6  0.2915     0.7060 0.000 0.000 0.000 0.008 0.184 0.808
#> GSM1105501     4  0.4253     0.3040 0.000 0.460 0.000 0.524 0.000 0.016
#> GSM1105508     1  0.0984     0.9392 0.968 0.000 0.012 0.012 0.000 0.008
#> GSM1105444     2  0.0146     0.9213 0.000 0.996 0.000 0.000 0.000 0.004
#> GSM1105513     4  0.2964     0.8090 0.000 0.204 0.000 0.792 0.000 0.004
#> GSM1105516     1  0.0146     0.9548 0.996 0.000 0.000 0.000 0.000 0.004
#> GSM1105520     4  0.2738     0.8185 0.000 0.176 0.000 0.820 0.000 0.004
#> GSM1105524     1  0.0000     0.9557 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM1105536     3  0.4603     0.4223 0.000 0.100 0.740 0.020 0.004 0.136
#> GSM1105537     1  0.0000     0.9557 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM1105540     6  0.5112     0.1011 0.084 0.000 0.400 0.000 0.000 0.516
#> GSM1105544     6  0.1707     0.6785 0.000 0.000 0.012 0.004 0.056 0.928
#> GSM1105445     2  0.3867     0.4510 0.000 0.660 0.000 0.328 0.000 0.012
#> GSM1105553     6  0.2848     0.7114 0.000 0.000 0.000 0.008 0.176 0.816
#> GSM1105556     1  0.0000     0.9557 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM1105557     4  0.1444     0.8318 0.000 0.072 0.000 0.928 0.000 0.000
#> GSM1105449     2  0.0520     0.9205 0.000 0.984 0.000 0.008 0.000 0.008
#> GSM1105469     3  0.3888     0.4035 0.000 0.000 0.672 0.312 0.000 0.016
#> GSM1105472     2  0.0146     0.9206 0.000 0.996 0.000 0.000 0.000 0.004
#> GSM1105473     1  0.0508     0.9502 0.984 0.000 0.000 0.012 0.000 0.004
#> GSM1105476     2  0.0291     0.9217 0.000 0.992 0.000 0.004 0.000 0.004
#> GSM1105477     6  0.5557     0.4411 0.000 0.000 0.276 0.020 0.116 0.588
#> GSM1105478     4  0.1588     0.8308 0.000 0.072 0.000 0.924 0.000 0.004
#> GSM1105510     5  0.0000     1.0000 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM1105530     1  0.3622     0.7769 0.792 0.000 0.164 0.020 0.000 0.024
#> GSM1105539     1  0.3399     0.8054 0.816 0.000 0.140 0.020 0.000 0.024
#> GSM1105480     4  0.1500     0.8130 0.000 0.052 0.000 0.936 0.000 0.012
#> GSM1105512     1  0.0405     0.9521 0.988 0.000 0.000 0.008 0.000 0.004
#> GSM1105532     1  0.3999     0.7083 0.744 0.000 0.212 0.020 0.000 0.024
#> GSM1105541     1  0.3399     0.8054 0.816 0.000 0.140 0.020 0.000 0.024
#> GSM1105439     2  0.2402     0.8430 0.000 0.868 0.000 0.120 0.000 0.012
#> GSM1105463     1  0.1718     0.9191 0.936 0.000 0.020 0.020 0.000 0.024
#> GSM1105482     1  0.0000     0.9557 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM1105483     3  0.3717     0.4360 0.000 0.000 0.708 0.276 0.000 0.016
#> GSM1105494     4  0.1701     0.8307 0.000 0.072 0.000 0.920 0.000 0.008
#> GSM1105503     4  0.1334     0.7842 0.000 0.032 0.000 0.948 0.000 0.020
#> GSM1105507     1  0.0000     0.9557 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM1105446     2  0.3969     0.5257 0.000 0.652 0.000 0.000 0.332 0.016
#> GSM1105519     1  0.0000     0.9557 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM1105526     2  0.4962     0.5647 0.000 0.696 0.004 0.184 0.096 0.020
#> GSM1105527     4  0.1644     0.8083 0.000 0.052 0.004 0.932 0.000 0.012
#> GSM1105531     1  0.4278     0.6801 0.724 0.000 0.220 0.024 0.000 0.032
#> GSM1105543     2  0.0146     0.9206 0.000 0.996 0.000 0.000 0.000 0.004
#> GSM1105546     1  0.0000     0.9557 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM1105547     1  0.0000     0.9557 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM1105455     2  0.2613     0.8208 0.000 0.848 0.000 0.140 0.000 0.012
#> GSM1105458     2  0.0622     0.9197 0.000 0.980 0.000 0.008 0.000 0.012
#> GSM1105459     2  0.0146     0.9219 0.000 0.996 0.000 0.004 0.000 0.000
#> GSM1105462     3  0.0508     0.5486 0.000 0.000 0.984 0.004 0.000 0.012
#> GSM1105441     2  0.0622     0.9197 0.000 0.980 0.000 0.008 0.000 0.012
#> GSM1105465     5  0.0000     1.0000 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM1105484     2  0.0692     0.9095 0.000 0.976 0.000 0.000 0.020 0.004
#> GSM1105485     5  0.0000     1.0000 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM1105496     6  0.2814     0.7127 0.000 0.000 0.000 0.008 0.172 0.820
#> GSM1105505     1  0.1679     0.9183 0.936 0.000 0.028 0.008 0.000 0.028
#> GSM1105509     1  0.0405     0.9521 0.988 0.000 0.000 0.008 0.000 0.004
#> GSM1105448     2  0.0146     0.9213 0.000 0.996 0.000 0.000 0.000 0.004
#> GSM1105521     1  0.0405     0.9521 0.988 0.000 0.000 0.008 0.000 0.004
#> GSM1105528     2  0.2668     0.7632 0.000 0.828 0.000 0.000 0.168 0.004
#> GSM1105529     5  0.0000     1.0000 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM1105533     1  0.0000     0.9557 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM1105545     3  0.4851     0.4593 0.000 0.060 0.728 0.080 0.000 0.132
#> GSM1105548     1  0.0000     0.9557 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM1105549     1  0.0146     0.9548 0.996 0.000 0.000 0.000 0.000 0.004
#> GSM1105457     4  0.3012     0.8137 0.000 0.196 0.000 0.796 0.000 0.008
#> GSM1105460     2  0.0622     0.9197 0.000 0.980 0.000 0.008 0.000 0.012
#> GSM1105461     2  0.0520     0.9205 0.000 0.984 0.000 0.008 0.000 0.008
#> GSM1105464     1  0.3550     0.7868 0.800 0.000 0.156 0.020 0.000 0.024
#> GSM1105466     4  0.2823     0.8043 0.000 0.204 0.000 0.796 0.000 0.000
#> GSM1105479     2  0.2320     0.8372 0.000 0.864 0.000 0.132 0.000 0.004
#> GSM1105502     1  0.0146     0.9547 0.996 0.000 0.000 0.004 0.000 0.000
#> GSM1105515     1  0.0000     0.9557 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM1105523     3  0.1116     0.5436 0.004 0.000 0.960 0.028 0.000 0.008
#> GSM1105550     3  0.1141     0.5403 0.000 0.000 0.948 0.000 0.000 0.052
#> GSM1105450     2  0.0291     0.9217 0.000 0.992 0.000 0.004 0.000 0.004
#> GSM1105451     2  0.0520     0.9205 0.000 0.984 0.000 0.008 0.000 0.008
#> GSM1105454     2  0.2446     0.8386 0.000 0.864 0.000 0.124 0.000 0.012
#> GSM1105468     2  0.0291     0.9217 0.000 0.992 0.000 0.004 0.000 0.004
#> GSM1105481     2  0.0146     0.9206 0.000 0.996 0.000 0.000 0.000 0.004
#> GSM1105504     1  0.3425     0.8173 0.824 0.000 0.120 0.024 0.000 0.032
#> GSM1105517     3  0.4997     0.0154 0.456 0.000 0.492 0.020 0.000 0.032
#> GSM1105525     3  0.4113     0.3192 0.308 0.000 0.668 0.016 0.000 0.008
#> GSM1105552     1  0.0260     0.9521 0.992 0.000 0.000 0.000 0.000 0.008
#> GSM1105452     5  0.0000     1.0000 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM1105453     2  0.0405     0.9206 0.000 0.988 0.000 0.004 0.000 0.008
#> GSM1105456     2  0.2446     0.8386 0.000 0.864 0.000 0.124 0.000 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-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) other(p) time(p) individual(p) k
#> ATC:skmeans 118    0.940    0.714   0.267        0.0191 2
#> ATC:skmeans 119    0.714    0.428   0.132        0.0484 3
#> ATC:skmeans 116    0.305    0.760   0.228        0.0555 4
#> ATC:skmeans 112    0.464    0.984   0.352        0.0285 5
#> ATC:skmeans 109    0.207    0.460   0.075        0.0101 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 44956 rows and 120 columns.
#>   Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'ATC' method.
#>   Subgroups are detected by 'pam' method.
#>   Performed in total 1250 partitions by row resampling.
#>   Best k for subgroups seems to be 6.
#> 
#> Following methods can be applied to this 'ConsensusPartition' object:
#>  [1] "cola_report"             "collect_classes"         "collect_plots"          
#>  [4] "collect_stats"           "colnames"                "compare_signatures"     
#>  [7] "consensus_heatmap"       "dimension_reduction"     "functional_enrichment"  
#> [10] "get_anno_col"            "get_anno"                "get_classes"            
#> [13] "get_consensus"           "get_matrix"              "get_membership"         
#> [16] "get_param"               "get_signatures"          "get_stats"              
#> [19] "is_best_k"               "is_stable_k"             "membership_heatmap"     
#> [22] "ncol"                    "nrow"                    "plot_ecdf"              
#> [25] "rownames"                "select_partition_number" "show"                   
#> [28] "suggest_best_k"          "test_to_known_factors"

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

collect_plots(res)

plot of chunk ATC-pam-collect-plots

The plots are:

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

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

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

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

select_partition_number(res)

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

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

get_stats(res)
#>   k 1-PAC mean_silhouette concordance area_increased  Rand Jaccard
#> 2 2 1.000           0.974       0.989         0.5015 0.501   0.501
#> 3 3 1.000           0.965       0.986         0.3159 0.690   0.460
#> 4 4 0.828           0.777       0.867         0.1006 0.907   0.737
#> 5 5 0.861           0.834       0.926         0.0727 0.909   0.691
#> 6 6 0.915           0.851       0.931         0.0702 0.915   0.639

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

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

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
#> GSM1105438     2  0.0000      0.980 0.000 1.000
#> GSM1105486     2  0.0000      0.980 0.000 1.000
#> GSM1105487     1  0.0000      1.000 1.000 0.000
#> GSM1105490     2  0.0000      0.980 0.000 1.000
#> GSM1105491     1  0.0000      1.000 1.000 0.000
#> GSM1105495     2  0.0000      0.980 0.000 1.000
#> GSM1105498     2  0.0000      0.980 0.000 1.000
#> GSM1105499     1  0.0000      1.000 1.000 0.000
#> GSM1105506     2  0.0000      0.980 0.000 1.000
#> GSM1105442     2  0.0000      0.980 0.000 1.000
#> GSM1105511     2  0.0000      0.980 0.000 1.000
#> GSM1105514     2  0.0000      0.980 0.000 1.000
#> GSM1105518     2  0.0000      0.980 0.000 1.000
#> GSM1105522     1  0.0000      1.000 1.000 0.000
#> GSM1105534     1  0.0000      1.000 1.000 0.000
#> GSM1105535     1  0.0000      1.000 1.000 0.000
#> GSM1105538     1  0.0000      1.000 1.000 0.000
#> GSM1105542     2  0.7056      0.766 0.192 0.808
#> GSM1105443     2  0.0000      0.980 0.000 1.000
#> GSM1105551     1  0.0000      1.000 1.000 0.000
#> GSM1105554     1  0.0000      1.000 1.000 0.000
#> GSM1105555     1  0.0000      1.000 1.000 0.000
#> GSM1105447     2  0.0000      0.980 0.000 1.000
#> GSM1105467     2  0.0000      0.980 0.000 1.000
#> GSM1105470     2  0.0000      0.980 0.000 1.000
#> GSM1105471     2  0.0000      0.980 0.000 1.000
#> GSM1105474     2  0.0000      0.980 0.000 1.000
#> GSM1105475     2  0.0000      0.980 0.000 1.000
#> GSM1105440     1  0.0000      1.000 1.000 0.000
#> GSM1105488     2  0.0000      0.980 0.000 1.000
#> GSM1105489     1  0.0000      1.000 1.000 0.000
#> GSM1105492     1  0.0000      1.000 1.000 0.000
#> GSM1105493     1  0.0000      1.000 1.000 0.000
#> GSM1105497     2  0.9881      0.245 0.436 0.564
#> GSM1105500     1  0.0000      1.000 1.000 0.000
#> GSM1105501     2  0.0000      0.980 0.000 1.000
#> GSM1105508     1  0.0000      1.000 1.000 0.000
#> GSM1105444     2  0.0000      0.980 0.000 1.000
#> GSM1105513     2  0.0000      0.980 0.000 1.000
#> GSM1105516     1  0.0000      1.000 1.000 0.000
#> GSM1105520     2  0.0000      0.980 0.000 1.000
#> GSM1105524     1  0.0000      1.000 1.000 0.000
#> GSM1105536     2  0.0000      0.980 0.000 1.000
#> GSM1105537     1  0.0000      1.000 1.000 0.000
#> GSM1105540     1  0.0000      1.000 1.000 0.000
#> GSM1105544     1  0.0000      1.000 1.000 0.000
#> GSM1105445     2  0.0000      0.980 0.000 1.000
#> GSM1105553     1  0.0000      1.000 1.000 0.000
#> GSM1105556     1  0.0000      1.000 1.000 0.000
#> GSM1105557     2  0.0000      0.980 0.000 1.000
#> GSM1105449     2  0.0000      0.980 0.000 1.000
#> GSM1105469     2  0.6887      0.776 0.184 0.816
#> GSM1105472     2  0.0000      0.980 0.000 1.000
#> GSM1105473     1  0.0000      1.000 1.000 0.000
#> GSM1105476     2  0.0000      0.980 0.000 1.000
#> GSM1105477     1  0.0000      1.000 1.000 0.000
#> GSM1105478     2  0.0000      0.980 0.000 1.000
#> GSM1105510     2  0.4939      0.873 0.108 0.892
#> GSM1105530     1  0.0000      1.000 1.000 0.000
#> GSM1105539     1  0.0000      1.000 1.000 0.000
#> GSM1105480     2  0.0000      0.980 0.000 1.000
#> GSM1105512     1  0.0000      1.000 1.000 0.000
#> GSM1105532     1  0.0000      1.000 1.000 0.000
#> GSM1105541     1  0.0000      1.000 1.000 0.000
#> GSM1105439     2  0.0000      0.980 0.000 1.000
#> GSM1105463     1  0.0000      1.000 1.000 0.000
#> GSM1105482     1  0.0000      1.000 1.000 0.000
#> GSM1105483     2  0.0000      0.980 0.000 1.000
#> GSM1105494     2  0.0000      0.980 0.000 1.000
#> GSM1105503     2  0.0000      0.980 0.000 1.000
#> GSM1105507     1  0.0000      1.000 1.000 0.000
#> GSM1105446     2  0.0000      0.980 0.000 1.000
#> GSM1105519     1  0.0000      1.000 1.000 0.000
#> GSM1105526     2  0.0000      0.980 0.000 1.000
#> GSM1105527     2  0.0000      0.980 0.000 1.000
#> GSM1105531     1  0.0000      1.000 1.000 0.000
#> GSM1105543     2  0.0000      0.980 0.000 1.000
#> GSM1105546     1  0.0000      1.000 1.000 0.000
#> GSM1105547     1  0.0000      1.000 1.000 0.000
#> GSM1105455     2  0.0000      0.980 0.000 1.000
#> GSM1105458     2  0.0000      0.980 0.000 1.000
#> GSM1105459     2  0.0000      0.980 0.000 1.000
#> GSM1105462     2  0.9491      0.437 0.368 0.632
#> GSM1105441     2  0.0000      0.980 0.000 1.000
#> GSM1105465     2  0.0376      0.977 0.004 0.996
#> GSM1105484     2  0.0000      0.980 0.000 1.000
#> GSM1105485     1  0.0000      1.000 1.000 0.000
#> GSM1105496     1  0.0000      1.000 1.000 0.000
#> GSM1105505     1  0.0000      1.000 1.000 0.000
#> GSM1105509     1  0.0000      1.000 1.000 0.000
#> GSM1105448     2  0.0000      0.980 0.000 1.000
#> GSM1105521     1  0.0000      1.000 1.000 0.000
#> GSM1105528     2  0.0000      0.980 0.000 1.000
#> GSM1105529     2  0.0000      0.980 0.000 1.000
#> GSM1105533     1  0.0000      1.000 1.000 0.000
#> GSM1105545     2  0.0000      0.980 0.000 1.000
#> GSM1105548     1  0.0000      1.000 1.000 0.000
#> GSM1105549     1  0.0000      1.000 1.000 0.000
#> GSM1105457     2  0.0000      0.980 0.000 1.000
#> GSM1105460     2  0.0000      0.980 0.000 1.000
#> GSM1105461     2  0.0000      0.980 0.000 1.000
#> GSM1105464     1  0.0000      1.000 1.000 0.000
#> GSM1105466     2  0.0000      0.980 0.000 1.000
#> GSM1105479     2  0.0000      0.980 0.000 1.000
#> GSM1105502     1  0.0000      1.000 1.000 0.000
#> GSM1105515     1  0.0000      1.000 1.000 0.000
#> GSM1105523     1  0.0000      1.000 1.000 0.000
#> GSM1105550     1  0.0000      1.000 1.000 0.000
#> GSM1105450     2  0.0000      0.980 0.000 1.000
#> GSM1105451     2  0.0000      0.980 0.000 1.000
#> GSM1105454     2  0.0000      0.980 0.000 1.000
#> GSM1105468     2  0.0000      0.980 0.000 1.000
#> GSM1105481     2  0.0000      0.980 0.000 1.000
#> GSM1105504     1  0.0000      1.000 1.000 0.000
#> GSM1105517     1  0.0000      1.000 1.000 0.000
#> GSM1105525     1  0.0000      1.000 1.000 0.000
#> GSM1105552     1  0.0000      1.000 1.000 0.000
#> GSM1105452     2  0.0000      0.980 0.000 1.000
#> GSM1105453     2  0.0000      0.980 0.000 1.000
#> GSM1105456     2  0.0000      0.980 0.000 1.000

show/hide code output

cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#>            class entropy silhouette    p1    p2    p3
#> GSM1105438     2  0.0000      0.990 0.000 1.000 0.000
#> GSM1105486     2  0.0000      0.990 0.000 1.000 0.000
#> GSM1105487     1  0.0000      0.967 1.000 0.000 0.000
#> GSM1105490     2  0.0000      0.990 0.000 1.000 0.000
#> GSM1105491     3  0.0000      0.990 0.000 0.000 1.000
#> GSM1105495     2  0.0000      0.990 0.000 1.000 0.000
#> GSM1105498     3  0.0000      0.990 0.000 0.000 1.000
#> GSM1105499     1  0.0000      0.967 1.000 0.000 0.000
#> GSM1105506     2  0.0000      0.990 0.000 1.000 0.000
#> GSM1105442     3  0.2796      0.889 0.000 0.092 0.908
#> GSM1105511     3  0.0000      0.990 0.000 0.000 1.000
#> GSM1105514     2  0.0000      0.990 0.000 1.000 0.000
#> GSM1105518     2  0.5882      0.465 0.000 0.652 0.348
#> GSM1105522     1  0.5397      0.624 0.720 0.000 0.280
#> GSM1105534     1  0.0000      0.967 1.000 0.000 0.000
#> GSM1105535     1  0.0000      0.967 1.000 0.000 0.000
#> GSM1105538     1  0.0000      0.967 1.000 0.000 0.000
#> GSM1105542     3  0.0000      0.990 0.000 0.000 1.000
#> GSM1105443     2  0.0000      0.990 0.000 1.000 0.000
#> GSM1105551     1  0.0000      0.967 1.000 0.000 0.000
#> GSM1105554     1  0.0000      0.967 1.000 0.000 0.000
#> GSM1105555     1  0.0000      0.967 1.000 0.000 0.000
#> GSM1105447     2  0.0000      0.990 0.000 1.000 0.000
#> GSM1105467     2  0.0000      0.990 0.000 1.000 0.000
#> GSM1105470     2  0.0000      0.990 0.000 1.000 0.000
#> GSM1105471     2  0.0000      0.990 0.000 1.000 0.000
#> GSM1105474     2  0.0000      0.990 0.000 1.000 0.000
#> GSM1105475     2  0.0000      0.990 0.000 1.000 0.000
#> GSM1105440     1  0.0000      0.967 1.000 0.000 0.000
#> GSM1105488     3  0.0000      0.990 0.000 0.000 1.000
#> GSM1105489     1  0.0000      0.967 1.000 0.000 0.000
#> GSM1105492     1  0.0000      0.967 1.000 0.000 0.000
#> GSM1105493     1  0.0000      0.967 1.000 0.000 0.000
#> GSM1105497     3  0.0000      0.990 0.000 0.000 1.000
#> GSM1105500     3  0.0000      0.990 0.000 0.000 1.000
#> GSM1105501     3  0.0000      0.990 0.000 0.000 1.000
#> GSM1105508     3  0.1860      0.940 0.052 0.000 0.948
#> GSM1105444     2  0.0000      0.990 0.000 1.000 0.000
#> GSM1105513     2  0.0000      0.990 0.000 1.000 0.000
#> GSM1105516     3  0.0000      0.990 0.000 0.000 1.000
#> GSM1105520     3  0.0000      0.990 0.000 0.000 1.000
#> GSM1105524     1  0.0000      0.967 1.000 0.000 0.000
#> GSM1105536     3  0.0000      0.990 0.000 0.000 1.000
#> GSM1105537     1  0.0000      0.967 1.000 0.000 0.000
#> GSM1105540     3  0.0000      0.990 0.000 0.000 1.000
#> GSM1105544     3  0.0000      0.990 0.000 0.000 1.000
#> GSM1105445     2  0.0000      0.990 0.000 1.000 0.000
#> GSM1105553     3  0.0000      0.990 0.000 0.000 1.000
#> GSM1105556     1  0.0000      0.967 1.000 0.000 0.000
#> GSM1105557     2  0.0000      0.990 0.000 1.000 0.000
#> GSM1105449     2  0.0000      0.990 0.000 1.000 0.000
#> GSM1105469     3  0.0000      0.990 0.000 0.000 1.000
#> GSM1105472     2  0.0000      0.990 0.000 1.000 0.000
#> GSM1105473     3  0.0000      0.990 0.000 0.000 1.000
#> GSM1105476     2  0.0000      0.990 0.000 1.000 0.000
#> GSM1105477     3  0.0000      0.990 0.000 0.000 1.000
#> GSM1105478     2  0.0000      0.990 0.000 1.000 0.000
#> GSM1105510     3  0.0000      0.990 0.000 0.000 1.000
#> GSM1105530     1  0.4702      0.734 0.788 0.000 0.212
#> GSM1105539     1  0.0000      0.967 1.000 0.000 0.000
#> GSM1105480     3  0.0000      0.990 0.000 0.000 1.000
#> GSM1105512     1  0.0000      0.967 1.000 0.000 0.000
#> GSM1105532     3  0.3412      0.852 0.124 0.000 0.876
#> GSM1105541     1  0.0000      0.967 1.000 0.000 0.000
#> GSM1105439     2  0.0000      0.990 0.000 1.000 0.000
#> GSM1105463     3  0.0000      0.990 0.000 0.000 1.000
#> GSM1105482     1  0.0000      0.967 1.000 0.000 0.000
#> GSM1105483     3  0.0000      0.990 0.000 0.000 1.000
#> GSM1105494     2  0.0892      0.969 0.000 0.980 0.020
#> GSM1105503     3  0.0000      0.990 0.000 0.000 1.000
#> GSM1105507     3  0.0000      0.990 0.000 0.000 1.000
#> GSM1105446     2  0.0000      0.990 0.000 1.000 0.000
#> GSM1105519     1  0.6280      0.178 0.540 0.000 0.460
#> GSM1105526     3  0.0000      0.990 0.000 0.000 1.000
#> GSM1105527     3  0.0424      0.983 0.000 0.008 0.992
#> GSM1105531     3  0.0000      0.990 0.000 0.000 1.000
#> GSM1105543     2  0.0000      0.990 0.000 1.000 0.000
#> GSM1105546     1  0.0000      0.967 1.000 0.000 0.000
#> GSM1105547     1  0.0000      0.967 1.000 0.000 0.000
#> GSM1105455     2  0.0000      0.990 0.000 1.000 0.000
#> GSM1105458     2  0.0000      0.990 0.000 1.000 0.000
#> GSM1105459     2  0.0000      0.990 0.000 1.000 0.000
#> GSM1105462     3  0.0000      0.990 0.000 0.000 1.000
#> GSM1105441     2  0.0000      0.990 0.000 1.000 0.000
#> GSM1105465     3  0.0000      0.990 0.000 0.000 1.000
#> GSM1105484     2  0.0000      0.990 0.000 1.000 0.000
#> GSM1105485     3  0.0000      0.990 0.000 0.000 1.000
#> GSM1105496     3  0.0000      0.990 0.000 0.000 1.000
#> GSM1105505     3  0.0000      0.990 0.000 0.000 1.000
#> GSM1105509     3  0.0000      0.990 0.000 0.000 1.000
#> GSM1105448     2  0.0000      0.990 0.000 1.000 0.000
#> GSM1105521     1  0.0000      0.967 1.000 0.000 0.000
#> GSM1105528     2  0.0000      0.990 0.000 1.000 0.000
#> GSM1105529     3  0.0000      0.990 0.000 0.000 1.000
#> GSM1105533     1  0.0000      0.967 1.000 0.000 0.000
#> GSM1105545     3  0.0000      0.990 0.000 0.000 1.000
#> GSM1105548     1  0.0000      0.967 1.000 0.000 0.000
#> GSM1105549     1  0.0000      0.967 1.000 0.000 0.000
#> GSM1105457     2  0.0000      0.990 0.000 1.000 0.000
#> GSM1105460     2  0.0000      0.990 0.000 1.000 0.000
#> GSM1105461     2  0.0000      0.990 0.000 1.000 0.000
#> GSM1105464     3  0.0000      0.990 0.000 0.000 1.000
#> GSM1105466     2  0.0000      0.990 0.000 1.000 0.000
#> GSM1105479     2  0.0000      0.990 0.000 1.000 0.000
#> GSM1105502     1  0.0000      0.967 1.000 0.000 0.000
#> GSM1105515     1  0.0000      0.967 1.000 0.000 0.000
#> GSM1105523     3  0.0000      0.990 0.000 0.000 1.000
#> GSM1105550     3  0.0000      0.990 0.000 0.000 1.000
#> GSM1105450     2  0.0000      0.990 0.000 1.000 0.000
#> GSM1105451     2  0.0000      0.990 0.000 1.000 0.000
#> GSM1105454     2  0.0000      0.990 0.000 1.000 0.000
#> GSM1105468     2  0.0000      0.990 0.000 1.000 0.000
#> GSM1105481     3  0.3192      0.866 0.000 0.112 0.888
#> GSM1105504     3  0.0000      0.990 0.000 0.000 1.000
#> GSM1105517     3  0.0000      0.990 0.000 0.000 1.000
#> GSM1105525     3  0.0000      0.990 0.000 0.000 1.000
#> GSM1105552     3  0.0000      0.990 0.000 0.000 1.000
#> GSM1105452     3  0.0000      0.990 0.000 0.000 1.000
#> GSM1105453     2  0.0000      0.990 0.000 1.000 0.000
#> GSM1105456     2  0.0000      0.990 0.000 1.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
#> GSM1105438     2  0.0000      0.974 0.000 1.000 0.000 0.000
#> GSM1105486     2  0.0000      0.974 0.000 1.000 0.000 0.000
#> GSM1105487     1  0.4843      0.829 0.604 0.000 0.000 0.396
#> GSM1105490     2  0.0000      0.974 0.000 1.000 0.000 0.000
#> GSM1105491     4  0.5414      0.877 0.376 0.000 0.020 0.604
#> GSM1105495     2  0.4977      0.183 0.000 0.540 0.000 0.460
#> GSM1105498     3  0.4843      0.650 0.396 0.000 0.604 0.000
#> GSM1105499     1  0.4843      0.829 0.604 0.000 0.000 0.396
#> GSM1105506     2  0.0000      0.974 0.000 1.000 0.000 0.000
#> GSM1105442     4  0.4843      0.899 0.396 0.000 0.000 0.604
#> GSM1105511     3  0.4843      0.650 0.396 0.000 0.604 0.000
#> GSM1105514     2  0.0000      0.974 0.000 1.000 0.000 0.000
#> GSM1105518     2  0.5070      0.612 0.192 0.748 0.060 0.000
#> GSM1105522     3  0.4585     -0.163 0.332 0.000 0.668 0.000
#> GSM1105534     1  0.4843      0.829 0.604 0.000 0.000 0.396
#> GSM1105535     1  0.4843      0.829 0.604 0.000 0.000 0.396
#> GSM1105538     1  0.4843      0.718 0.604 0.000 0.396 0.000
#> GSM1105542     4  0.4843      0.899 0.396 0.000 0.000 0.604
#> GSM1105443     2  0.0000      0.974 0.000 1.000 0.000 0.000
#> GSM1105551     1  0.4843      0.718 0.604 0.000 0.396 0.000
#> GSM1105554     1  0.4843      0.829 0.604 0.000 0.000 0.396
#> GSM1105555     1  0.4843      0.718 0.604 0.000 0.396 0.000
#> GSM1105447     2  0.0000      0.974 0.000 1.000 0.000 0.000
#> GSM1105467     2  0.0000      0.974 0.000 1.000 0.000 0.000
#> GSM1105470     2  0.0000      0.974 0.000 1.000 0.000 0.000
#> GSM1105471     2  0.0000      0.974 0.000 1.000 0.000 0.000
#> GSM1105474     2  0.0000      0.974 0.000 1.000 0.000 0.000
#> GSM1105475     2  0.0000      0.974 0.000 1.000 0.000 0.000
#> GSM1105440     1  0.4843      0.718 0.604 0.000 0.396 0.000
#> GSM1105488     4  0.4843      0.899 0.396 0.000 0.000 0.604
#> GSM1105489     1  0.4843      0.829 0.604 0.000 0.000 0.396
#> GSM1105492     1  0.4843      0.829 0.604 0.000 0.000 0.396
#> GSM1105493     1  0.4843      0.829 0.604 0.000 0.000 0.396
#> GSM1105497     4  0.4843      0.899 0.396 0.000 0.000 0.604
#> GSM1105500     4  0.7236      0.709 0.396 0.000 0.144 0.460
#> GSM1105501     3  0.4843      0.650 0.396 0.000 0.604 0.000
#> GSM1105508     3  0.1474      0.554 0.052 0.000 0.948 0.000
#> GSM1105444     2  0.0000      0.974 0.000 1.000 0.000 0.000
#> GSM1105513     2  0.0000      0.974 0.000 1.000 0.000 0.000
#> GSM1105516     3  0.0188      0.595 0.004 0.000 0.996 0.000
#> GSM1105520     3  0.4843      0.650 0.396 0.000 0.604 0.000
#> GSM1105524     1  0.4843      0.829 0.604 0.000 0.000 0.396
#> GSM1105536     3  0.4843      0.650 0.396 0.000 0.604 0.000
#> GSM1105537     1  0.4843      0.829 0.604 0.000 0.000 0.396
#> GSM1105540     3  0.4843      0.650 0.396 0.000 0.604 0.000
#> GSM1105544     3  0.4843      0.650 0.396 0.000 0.604 0.000
#> GSM1105445     2  0.0000      0.974 0.000 1.000 0.000 0.000
#> GSM1105553     4  0.6652      0.805 0.396 0.000 0.088 0.516
#> GSM1105556     1  0.4843      0.829 0.604 0.000 0.000 0.396
#> GSM1105557     2  0.0000      0.974 0.000 1.000 0.000 0.000
#> GSM1105449     2  0.0000      0.974 0.000 1.000 0.000 0.000
#> GSM1105469     3  0.4843      0.650 0.396 0.000 0.604 0.000
#> GSM1105472     2  0.0000      0.974 0.000 1.000 0.000 0.000
#> GSM1105473     3  0.0469      0.588 0.000 0.000 0.988 0.012
#> GSM1105476     2  0.0000      0.974 0.000 1.000 0.000 0.000
#> GSM1105477     3  0.4843      0.650 0.396 0.000 0.604 0.000
#> GSM1105478     2  0.0000      0.974 0.000 1.000 0.000 0.000
#> GSM1105510     4  0.4843      0.899 0.396 0.000 0.000 0.604
#> GSM1105530     3  0.4843     -0.351 0.396 0.000 0.604 0.000
#> GSM1105539     1  0.6007      0.740 0.604 0.000 0.340 0.056
#> GSM1105480     3  0.4843      0.650 0.396 0.000 0.604 0.000
#> GSM1105512     1  0.4843      0.718 0.604 0.000 0.396 0.000
#> GSM1105532     3  0.0000      0.594 0.000 0.000 1.000 0.000
#> GSM1105541     1  0.5496      0.728 0.604 0.000 0.372 0.024
#> GSM1105439     2  0.0000      0.974 0.000 1.000 0.000 0.000
#> GSM1105463     3  0.5332      0.582 0.184 0.000 0.736 0.080
#> GSM1105482     1  0.4843      0.829 0.604 0.000 0.000 0.396
#> GSM1105483     3  0.4843      0.650 0.396 0.000 0.604 0.000
#> GSM1105494     2  0.1940      0.888 0.000 0.924 0.076 0.000
#> GSM1105503     3  0.4843      0.650 0.396 0.000 0.604 0.000
#> GSM1105507     3  0.0000      0.594 0.000 0.000 1.000 0.000
#> GSM1105446     2  0.3852      0.701 0.192 0.800 0.000 0.008
#> GSM1105519     3  0.2704      0.438 0.124 0.000 0.876 0.000
#> GSM1105526     3  0.5016      0.645 0.396 0.000 0.600 0.004
#> GSM1105527     3  0.6819      0.497 0.208 0.188 0.604 0.000
#> GSM1105531     3  0.4193      0.643 0.268 0.000 0.732 0.000
#> GSM1105543     2  0.0000      0.974 0.000 1.000 0.000 0.000
#> GSM1105546     1  0.4843      0.829 0.604 0.000 0.000 0.396
#> GSM1105547     1  0.4843      0.829 0.604 0.000 0.000 0.396
#> GSM1105455     2  0.0000      0.974 0.000 1.000 0.000 0.000
#> GSM1105458     2  0.0000      0.974 0.000 1.000 0.000 0.000
#> GSM1105459     2  0.0000      0.974 0.000 1.000 0.000 0.000
#> GSM1105462     3  0.4843      0.650 0.396 0.000 0.604 0.000
#> GSM1105441     2  0.0000      0.974 0.000 1.000 0.000 0.000
#> GSM1105465     4  0.4843      0.899 0.396 0.000 0.000 0.604
#> GSM1105484     2  0.0469      0.963 0.000 0.988 0.000 0.012
#> GSM1105485     4  0.4843      0.899 0.396 0.000 0.000 0.604
#> GSM1105496     4  0.6889      0.777 0.396 0.000 0.108 0.496
#> GSM1105505     3  0.4522      0.648 0.320 0.000 0.680 0.000
#> GSM1105509     3  0.0000      0.594 0.000 0.000 1.000 0.000
#> GSM1105448     2  0.0000      0.974 0.000 1.000 0.000 0.000
#> GSM1105521     1  0.4843      0.718 0.604 0.000 0.396 0.000
#> GSM1105528     4  0.4843      0.198 0.000 0.396 0.000 0.604
#> GSM1105529     4  0.4843      0.899 0.396 0.000 0.000 0.604
#> GSM1105533     1  0.4843      0.829 0.604 0.000 0.000 0.396
#> GSM1105545     3  0.4843      0.650 0.396 0.000 0.604 0.000
#> GSM1105548     1  0.4843      0.718 0.604 0.000 0.396 0.000
#> GSM1105549     1  0.5125      0.722 0.604 0.000 0.388 0.008
#> GSM1105457     2  0.0000      0.974 0.000 1.000 0.000 0.000
#> GSM1105460     2  0.0000      0.974 0.000 1.000 0.000 0.000
#> GSM1105461     2  0.0000      0.974 0.000 1.000 0.000 0.000
#> GSM1105464     3  0.0000      0.594 0.000 0.000 1.000 0.000
#> GSM1105466     2  0.0000      0.974 0.000 1.000 0.000 0.000
#> GSM1105479     2  0.0000      0.974 0.000 1.000 0.000 0.000
#> GSM1105502     1  0.4843      0.718 0.604 0.000 0.396 0.000
#> GSM1105515     1  0.4843      0.829 0.604 0.000 0.000 0.396
#> GSM1105523     3  0.4843      0.650 0.396 0.000 0.604 0.000
#> GSM1105550     3  0.4843      0.650 0.396 0.000 0.604 0.000
#> GSM1105450     2  0.0000      0.974 0.000 1.000 0.000 0.000
#> GSM1105451     2  0.0000      0.974 0.000 1.000 0.000 0.000
#> GSM1105454     2  0.0000      0.974 0.000 1.000 0.000 0.000
#> GSM1105468     2  0.0000      0.974 0.000 1.000 0.000 0.000
#> GSM1105481     3  0.7191      0.316 0.156 0.328 0.516 0.000
#> GSM1105504     3  0.4843      0.650 0.396 0.000 0.604 0.000
#> GSM1105517     3  0.2216      0.616 0.092 0.000 0.908 0.000
#> GSM1105525     3  0.0000      0.594 0.000 0.000 1.000 0.000
#> GSM1105552     3  0.0000      0.594 0.000 0.000 1.000 0.000
#> GSM1105452     4  0.4843      0.899 0.396 0.000 0.000 0.604
#> GSM1105453     2  0.0000      0.974 0.000 1.000 0.000 0.000
#> GSM1105456     2  0.0000      0.974 0.000 1.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
#> GSM1105438     2  0.0000     0.9549 0.000 1.000 0.000 0.000 0.000
#> GSM1105486     2  0.0404     0.9532 0.000 0.988 0.012 0.000 0.000
#> GSM1105487     1  0.0510     0.8690 0.984 0.000 0.016 0.000 0.000
#> GSM1105490     2  0.2813     0.8060 0.000 0.832 0.000 0.168 0.000
#> GSM1105491     5  0.0000     0.9059 0.000 0.000 0.000 0.000 1.000
#> GSM1105495     5  0.3967     0.6034 0.000 0.264 0.012 0.000 0.724
#> GSM1105498     4  0.0290     0.8398 0.000 0.000 0.000 0.992 0.008
#> GSM1105499     1  0.0000     0.8781 1.000 0.000 0.000 0.000 0.000
#> GSM1105506     2  0.0404     0.9532 0.000 0.988 0.012 0.000 0.000
#> GSM1105442     5  0.0000     0.9059 0.000 0.000 0.000 0.000 1.000
#> GSM1105511     4  0.2605     0.7761 0.000 0.000 0.000 0.852 0.148
#> GSM1105514     2  0.0000     0.9549 0.000 1.000 0.000 0.000 0.000
#> GSM1105518     4  0.4242     0.1397 0.000 0.428 0.000 0.572 0.000
#> GSM1105522     3  0.0451     0.9415 0.004 0.000 0.988 0.008 0.000
#> GSM1105534     1  0.0000     0.8781 1.000 0.000 0.000 0.000 0.000
#> GSM1105535     1  0.0000     0.8781 1.000 0.000 0.000 0.000 0.000
#> GSM1105538     3  0.0404     0.9382 0.012 0.000 0.988 0.000 0.000
#> GSM1105542     5  0.0000     0.9059 0.000 0.000 0.000 0.000 1.000
#> GSM1105443     2  0.0000     0.9549 0.000 1.000 0.000 0.000 0.000
#> GSM1105551     1  0.4294     0.2138 0.532 0.000 0.468 0.000 0.000
#> GSM1105554     1  0.0000     0.8781 1.000 0.000 0.000 0.000 0.000
#> GSM1105555     3  0.0404     0.9382 0.012 0.000 0.988 0.000 0.000
#> GSM1105447     2  0.0000     0.9549 0.000 1.000 0.000 0.000 0.000
#> GSM1105467     2  0.0404     0.9532 0.000 0.988 0.012 0.000 0.000
#> GSM1105470     2  0.0404     0.9532 0.000 0.988 0.012 0.000 0.000
#> GSM1105471     2  0.0404     0.9532 0.000 0.988 0.012 0.000 0.000
#> GSM1105474     2  0.0404     0.9532 0.000 0.988 0.012 0.000 0.000
#> GSM1105475     2  0.0404     0.9532 0.000 0.988 0.012 0.000 0.000
#> GSM1105440     3  0.4256     0.0529 0.436 0.000 0.564 0.000 0.000
#> GSM1105488     5  0.0000     0.9059 0.000 0.000 0.000 0.000 1.000
#> GSM1105489     1  0.0000     0.8781 1.000 0.000 0.000 0.000 0.000
#> GSM1105492     1  0.4101     0.3702 0.628 0.000 0.372 0.000 0.000
#> GSM1105493     1  0.0000     0.8781 1.000 0.000 0.000 0.000 0.000
#> GSM1105497     5  0.0000     0.9059 0.000 0.000 0.000 0.000 1.000
#> GSM1105500     5  0.4150     0.3302 0.000 0.000 0.000 0.388 0.612
#> GSM1105501     4  0.2648     0.7734 0.000 0.000 0.000 0.848 0.152
#> GSM1105508     3  0.0404     0.9425 0.000 0.000 0.988 0.012 0.000
#> GSM1105444     2  0.0000     0.9549 0.000 1.000 0.000 0.000 0.000
#> GSM1105513     2  0.0290     0.9539 0.000 0.992 0.008 0.000 0.000
#> GSM1105516     3  0.0510     0.9402 0.000 0.000 0.984 0.016 0.000
#> GSM1105520     4  0.0000     0.8413 0.000 0.000 0.000 1.000 0.000
#> GSM1105524     1  0.0000     0.8781 1.000 0.000 0.000 0.000 0.000
#> GSM1105536     4  0.0703     0.8378 0.000 0.000 0.000 0.976 0.024
#> GSM1105537     1  0.0000     0.8781 1.000 0.000 0.000 0.000 0.000
#> GSM1105540     4  0.0000     0.8413 0.000 0.000 0.000 1.000 0.000
#> GSM1105544     4  0.0290     0.8400 0.000 0.000 0.000 0.992 0.008
#> GSM1105445     2  0.0000     0.9549 0.000 1.000 0.000 0.000 0.000
#> GSM1105553     5  0.3336     0.7009 0.000 0.000 0.000 0.228 0.772
#> GSM1105556     1  0.0000     0.8781 1.000 0.000 0.000 0.000 0.000
#> GSM1105557     2  0.3366     0.7295 0.000 0.768 0.000 0.232 0.000
#> GSM1105449     2  0.0000     0.9549 0.000 1.000 0.000 0.000 0.000
#> GSM1105469     4  0.0000     0.8413 0.000 0.000 0.000 1.000 0.000
#> GSM1105472     2  0.0404     0.9532 0.000 0.988 0.012 0.000 0.000
#> GSM1105473     3  0.0404     0.9425 0.000 0.000 0.988 0.012 0.000
#> GSM1105476     2  0.0404     0.9532 0.000 0.988 0.012 0.000 0.000
#> GSM1105477     4  0.2561     0.7784 0.000 0.000 0.000 0.856 0.144
#> GSM1105478     2  0.3690     0.7381 0.000 0.764 0.012 0.224 0.000
#> GSM1105510     5  0.0162     0.9037 0.000 0.000 0.000 0.004 0.996
#> GSM1105530     3  0.0404     0.9425 0.000 0.000 0.988 0.012 0.000
#> GSM1105539     1  0.4060     0.4757 0.640 0.000 0.360 0.000 0.000
#> GSM1105480     4  0.0000     0.8413 0.000 0.000 0.000 1.000 0.000
#> GSM1105512     3  0.0404     0.9382 0.012 0.000 0.988 0.000 0.000
#> GSM1105532     3  0.0404     0.9425 0.000 0.000 0.988 0.012 0.000
#> GSM1105541     1  0.4161     0.4140 0.608 0.000 0.392 0.000 0.000
#> GSM1105439     2  0.0000     0.9549 0.000 1.000 0.000 0.000 0.000
#> GSM1105463     4  0.3561     0.6683 0.000 0.000 0.260 0.740 0.000
#> GSM1105482     1  0.0000     0.8781 1.000 0.000 0.000 0.000 0.000
#> GSM1105483     4  0.0000     0.8413 0.000 0.000 0.000 1.000 0.000
#> GSM1105494     2  0.3835     0.7111 0.000 0.744 0.012 0.244 0.000
#> GSM1105503     4  0.0000     0.8413 0.000 0.000 0.000 1.000 0.000
#> GSM1105507     3  0.0404     0.9425 0.000 0.000 0.988 0.012 0.000
#> GSM1105446     2  0.4278     0.1710 0.000 0.548 0.000 0.000 0.452
#> GSM1105519     3  0.0404     0.9425 0.000 0.000 0.988 0.012 0.000
#> GSM1105526     4  0.3983     0.5275 0.000 0.000 0.000 0.660 0.340
#> GSM1105527     4  0.0566     0.8340 0.000 0.000 0.012 0.984 0.004
#> GSM1105531     4  0.3845     0.7262 0.000 0.000 0.208 0.768 0.024
#> GSM1105543     2  0.0404     0.9532 0.000 0.988 0.012 0.000 0.000
#> GSM1105546     1  0.0000     0.8781 1.000 0.000 0.000 0.000 0.000
#> GSM1105547     1  0.0000     0.8781 1.000 0.000 0.000 0.000 0.000
#> GSM1105455     2  0.0000     0.9549 0.000 1.000 0.000 0.000 0.000
#> GSM1105458     2  0.0000     0.9549 0.000 1.000 0.000 0.000 0.000
#> GSM1105459     2  0.0000     0.9549 0.000 1.000 0.000 0.000 0.000
#> GSM1105462     4  0.0510     0.8397 0.000 0.000 0.000 0.984 0.016
#> GSM1105441     2  0.0000     0.9549 0.000 1.000 0.000 0.000 0.000
#> GSM1105465     5  0.0000     0.9059 0.000 0.000 0.000 0.000 1.000
#> GSM1105484     2  0.0912     0.9437 0.000 0.972 0.012 0.000 0.016
#> GSM1105485     5  0.0000     0.9059 0.000 0.000 0.000 0.000 1.000
#> GSM1105496     5  0.3003     0.7200 0.000 0.000 0.000 0.188 0.812
#> GSM1105505     4  0.4322     0.7449 0.000 0.000 0.088 0.768 0.144
#> GSM1105509     3  0.0404     0.9425 0.000 0.000 0.988 0.012 0.000
#> GSM1105448     2  0.0000     0.9549 0.000 1.000 0.000 0.000 0.000
#> GSM1105521     3  0.0404     0.9382 0.012 0.000 0.988 0.000 0.000
#> GSM1105528     5  0.1195     0.8776 0.000 0.028 0.012 0.000 0.960
#> GSM1105529     5  0.0000     0.9059 0.000 0.000 0.000 0.000 1.000
#> GSM1105533     1  0.0000     0.8781 1.000 0.000 0.000 0.000 0.000
#> GSM1105545     4  0.0000     0.8413 0.000 0.000 0.000 1.000 0.000
#> GSM1105548     3  0.0404     0.9382 0.012 0.000 0.988 0.000 0.000
#> GSM1105549     1  0.4201     0.3790 0.592 0.000 0.408 0.000 0.000
#> GSM1105457     2  0.0000     0.9549 0.000 1.000 0.000 0.000 0.000
#> GSM1105460     2  0.0000     0.9549 0.000 1.000 0.000 0.000 0.000
#> GSM1105461     2  0.0000     0.9549 0.000 1.000 0.000 0.000 0.000
#> GSM1105464     3  0.3109     0.7242 0.000 0.000 0.800 0.200 0.000
#> GSM1105466     2  0.3563     0.7575 0.000 0.780 0.012 0.208 0.000
#> GSM1105479     2  0.0404     0.9532 0.000 0.988 0.012 0.000 0.000
#> GSM1105502     3  0.0404     0.9382 0.012 0.000 0.988 0.000 0.000
#> GSM1105515     1  0.0000     0.8781 1.000 0.000 0.000 0.000 0.000
#> GSM1105523     4  0.3143     0.7348 0.000 0.000 0.204 0.796 0.000
#> GSM1105550     4  0.3305     0.7143 0.000 0.000 0.224 0.776 0.000
#> GSM1105450     2  0.0404     0.9532 0.000 0.988 0.012 0.000 0.000
#> GSM1105451     2  0.0000     0.9549 0.000 1.000 0.000 0.000 0.000
#> GSM1105454     2  0.0000     0.9549 0.000 1.000 0.000 0.000 0.000
#> GSM1105468     2  0.0404     0.9532 0.000 0.988 0.012 0.000 0.000
#> GSM1105481     4  0.4607     0.5172 0.000 0.312 0.012 0.664 0.012
#> GSM1105504     4  0.4212     0.7489 0.000 0.000 0.080 0.776 0.144
#> GSM1105517     3  0.2732     0.7747 0.000 0.000 0.840 0.160 0.000
#> GSM1105525     3  0.0404     0.9425 0.000 0.000 0.988 0.012 0.000
#> GSM1105552     3  0.0963     0.9241 0.000 0.000 0.964 0.036 0.000
#> GSM1105452     5  0.0000     0.9059 0.000 0.000 0.000 0.000 1.000
#> GSM1105453     2  0.0000     0.9549 0.000 1.000 0.000 0.000 0.000
#> GSM1105456     2  0.0000     0.9549 0.000 1.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
#> GSM1105438     2  0.1267     0.9018 0.000 0.940 0.000 0.000 0.000 0.060
#> GSM1105486     6  0.1610     0.8723 0.000 0.084 0.000 0.000 0.000 0.916
#> GSM1105487     1  0.0458     0.8672 0.984 0.000 0.016 0.000 0.000 0.000
#> GSM1105490     6  0.3843     0.1653 0.000 0.452 0.000 0.000 0.000 0.548
#> GSM1105491     5  0.0000     0.9558 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM1105495     6  0.1753     0.8284 0.000 0.004 0.000 0.000 0.084 0.912
#> GSM1105498     4  0.2119     0.9176 0.000 0.000 0.000 0.904 0.036 0.060
#> GSM1105499     1  0.0000     0.8765 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM1105506     6  0.0000     0.8455 0.000 0.000 0.000 0.000 0.000 1.000
#> GSM1105442     5  0.0000     0.9558 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM1105511     4  0.2309     0.9099 0.000 0.000 0.000 0.888 0.028 0.084
#> GSM1105514     2  0.1387     0.8943 0.000 0.932 0.000 0.000 0.000 0.068
#> GSM1105518     6  0.4640     0.3218 0.000 0.376 0.000 0.048 0.000 0.576
#> GSM1105522     3  0.0000     0.9312 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM1105534     1  0.0000     0.8765 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM1105535     1  0.0000     0.8765 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM1105538     3  0.0000     0.9312 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM1105542     5  0.0000     0.9558 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM1105443     2  0.0000     0.9592 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1105551     1  0.3857     0.2136 0.532 0.000 0.468 0.000 0.000 0.000
#> GSM1105554     1  0.0000     0.8765 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM1105555     3  0.0000     0.9312 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM1105447     2  0.0000     0.9592 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1105467     6  0.1610     0.8723 0.000 0.084 0.000 0.000 0.000 0.916
#> GSM1105470     6  0.2854     0.7799 0.000 0.208 0.000 0.000 0.000 0.792
#> GSM1105471     6  0.1610     0.8723 0.000 0.084 0.000 0.000 0.000 0.916
#> GSM1105474     6  0.1610     0.8723 0.000 0.084 0.000 0.000 0.000 0.916
#> GSM1105475     6  0.1610     0.8723 0.000 0.084 0.000 0.000 0.000 0.916
#> GSM1105440     3  0.3823     0.0528 0.436 0.000 0.564 0.000 0.000 0.000
#> GSM1105488     5  0.0000     0.9558 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM1105489     1  0.0000     0.8765 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM1105492     1  0.3717     0.3535 0.616 0.000 0.384 0.000 0.000 0.000
#> GSM1105493     1  0.0000     0.8765 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM1105497     5  0.0000     0.9558 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM1105500     5  0.3499     0.5668 0.000 0.000 0.000 0.320 0.680 0.000
#> GSM1105501     4  0.2527     0.9023 0.000 0.000 0.000 0.876 0.040 0.084
#> GSM1105508     3  0.0547     0.9183 0.000 0.000 0.980 0.020 0.000 0.000
#> GSM1105444     2  0.0000     0.9592 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1105513     6  0.1204     0.8571 0.000 0.056 0.000 0.000 0.000 0.944
#> GSM1105516     3  0.0146     0.9289 0.000 0.000 0.996 0.004 0.000 0.000
#> GSM1105520     4  0.0632     0.9531 0.000 0.000 0.000 0.976 0.000 0.024
#> GSM1105524     1  0.0000     0.8765 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM1105536     4  0.0000     0.9620 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1105537     1  0.0000     0.8765 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM1105540     4  0.0000     0.9620 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1105544     4  0.0000     0.9620 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1105445     2  0.0146     0.9559 0.000 0.996 0.000 0.000 0.000 0.004
#> GSM1105553     5  0.0935     0.9336 0.000 0.000 0.000 0.032 0.964 0.004
#> GSM1105556     1  0.0000     0.8765 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM1105557     6  0.3756     0.3232 0.000 0.400 0.000 0.000 0.000 0.600
#> GSM1105449     2  0.0000     0.9592 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1105469     4  0.0000     0.9620 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1105472     6  0.2823     0.7841 0.000 0.204 0.000 0.000 0.000 0.796
#> GSM1105473     3  0.0000     0.9312 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM1105476     6  0.1610     0.8723 0.000 0.084 0.000 0.000 0.000 0.916
#> GSM1105477     4  0.0000     0.9620 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1105478     6  0.0000     0.8455 0.000 0.000 0.000 0.000 0.000 1.000
#> GSM1105510     5  0.0000     0.9558 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM1105530     3  0.0000     0.9312 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM1105539     1  0.3647     0.4741 0.640 0.000 0.360 0.000 0.000 0.000
#> GSM1105480     4  0.1610     0.9224 0.000 0.000 0.000 0.916 0.000 0.084
#> GSM1105512     3  0.0000     0.9312 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM1105532     3  0.0000     0.9312 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM1105541     1  0.3737     0.4138 0.608 0.000 0.392 0.000 0.000 0.000
#> GSM1105439     2  0.0000     0.9592 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1105463     4  0.1204     0.9232 0.000 0.000 0.056 0.944 0.000 0.000
#> GSM1105482     1  0.0000     0.8765 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM1105483     4  0.0458     0.9566 0.000 0.000 0.000 0.984 0.000 0.016
#> GSM1105494     6  0.0000     0.8455 0.000 0.000 0.000 0.000 0.000 1.000
#> GSM1105503     4  0.1610     0.9224 0.000 0.000 0.000 0.916 0.000 0.084
#> GSM1105507     3  0.0000     0.9312 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM1105446     2  0.3974     0.5505 0.000 0.680 0.000 0.000 0.296 0.024
#> GSM1105519     3  0.0000     0.9312 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM1105526     4  0.2697     0.7868 0.000 0.000 0.000 0.812 0.188 0.000
#> GSM1105527     6  0.0000     0.8455 0.000 0.000 0.000 0.000 0.000 1.000
#> GSM1105531     4  0.0000     0.9620 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1105543     6  0.1663     0.8714 0.000 0.088 0.000 0.000 0.000 0.912
#> GSM1105546     1  0.0000     0.8765 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM1105547     1  0.0000     0.8765 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM1105455     2  0.0000     0.9592 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1105458     2  0.0000     0.9592 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1105459     2  0.0000     0.9592 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1105462     4  0.0000     0.9620 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1105441     2  0.0000     0.9592 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1105465     5  0.0000     0.9558 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM1105484     6  0.1663     0.8714 0.000 0.088 0.000 0.000 0.000 0.912
#> GSM1105485     5  0.0000     0.9558 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM1105496     5  0.2454     0.8161 0.000 0.000 0.000 0.160 0.840 0.000
#> GSM1105505     4  0.0000     0.9620 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1105509     3  0.0000     0.9312 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM1105448     2  0.0000     0.9592 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1105521     3  0.0000     0.9312 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM1105528     6  0.1753     0.8284 0.000 0.004 0.000 0.000 0.084 0.912
#> GSM1105529     5  0.0000     0.9558 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM1105533     1  0.0000     0.8765 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM1105545     4  0.0000     0.9620 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1105548     3  0.0000     0.9312 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM1105549     1  0.3774     0.3789 0.592 0.000 0.408 0.000 0.000 0.000
#> GSM1105457     2  0.1663     0.8724 0.000 0.912 0.000 0.000 0.000 0.088
#> GSM1105460     2  0.0000     0.9592 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1105461     2  0.0000     0.9592 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1105464     3  0.3717     0.3688 0.000 0.000 0.616 0.384 0.000 0.000
#> GSM1105466     6  0.0000     0.8455 0.000 0.000 0.000 0.000 0.000 1.000
#> GSM1105479     6  0.1910     0.8622 0.000 0.108 0.000 0.000 0.000 0.892
#> GSM1105502     3  0.0000     0.9312 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM1105515     1  0.0000     0.8765 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM1105523     4  0.0000     0.9620 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1105550     4  0.0000     0.9620 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1105450     2  0.2762     0.6902 0.000 0.804 0.000 0.000 0.000 0.196
#> GSM1105451     2  0.0000     0.9592 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1105454     2  0.0000     0.9592 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1105468     6  0.3659     0.5473 0.000 0.364 0.000 0.000 0.000 0.636
#> GSM1105481     6  0.2078     0.8578 0.000 0.040 0.000 0.032 0.012 0.916
#> GSM1105504     4  0.0000     0.9620 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1105517     3  0.2378     0.7824 0.000 0.000 0.848 0.152 0.000 0.000
#> GSM1105525     3  0.0713     0.9122 0.000 0.000 0.972 0.028 0.000 0.000
#> GSM1105552     3  0.1327     0.8846 0.000 0.000 0.936 0.064 0.000 0.000
#> GSM1105452     5  0.0000     0.9558 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM1105453     2  0.0000     0.9592 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1105456     2  0.0000     0.9592 0.000 1.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-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) other(p) time(p) individual(p) k
#> ATC:pam 118    0.804    0.789  0.1959       0.01875 2
#> ATC:pam 118    0.153    0.925  0.0403       0.02693 3
#> ATC:pam 113    0.350    0.856  0.0759       0.06389 4
#> ATC:pam 111    0.678    0.283  0.3202       0.06122 5
#> ATC:pam 110    0.335    0.351  0.3121       0.00502 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 44956 rows and 120 columns.
#>   Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'ATC' method.
#>   Subgroups are detected by 'mclust' method.
#>   Performed in total 1250 partitions by row resampling.
#>   Best k for subgroups seems to be 5.
#> 
#> Following methods can be applied to this 'ConsensusPartition' object:
#>  [1] "cola_report"             "collect_classes"         "collect_plots"          
#>  [4] "collect_stats"           "colnames"                "compare_signatures"     
#>  [7] "consensus_heatmap"       "dimension_reduction"     "functional_enrichment"  
#> [10] "get_anno_col"            "get_anno"                "get_classes"            
#> [13] "get_consensus"           "get_matrix"              "get_membership"         
#> [16] "get_param"               "get_signatures"          "get_stats"              
#> [19] "is_best_k"               "is_stable_k"             "membership_heatmap"     
#> [22] "ncol"                    "nrow"                    "plot_ecdf"              
#> [25] "rownames"                "select_partition_number" "show"                   
#> [28] "suggest_best_k"          "test_to_known_factors"

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

collect_plots(res)

plot of chunk ATC-mclust-collect-plots

The plots are:

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

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

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

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

select_partition_number(res)

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

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

get_stats(res)
#>   k 1-PAC mean_silhouette concordance area_increased  Rand Jaccard
#> 2 2 0.499           0.934       0.888         0.4090 0.552   0.552
#> 3 3 0.608           0.636       0.799         0.4958 0.736   0.539
#> 4 4 0.598           0.765       0.816         0.1580 0.889   0.693
#> 5 5 0.766           0.745       0.827         0.0847 0.895   0.660
#> 6 6 0.867           0.865       0.924         0.0603 0.910   0.642

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

suggest_best_k(res)
#> [1] 5

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
#> GSM1105438     2  0.4562      0.893 0.096 0.904
#> GSM1105486     2  0.5737      0.863 0.136 0.864
#> GSM1105487     1  0.6712      0.979 0.824 0.176
#> GSM1105490     2  0.1184      0.942 0.016 0.984
#> GSM1105491     2  0.2423      0.926 0.040 0.960
#> GSM1105495     2  0.0000      0.943 0.000 1.000
#> GSM1105498     2  0.1184      0.942 0.016 0.984
#> GSM1105499     1  0.7056      0.989 0.808 0.192
#> GSM1105506     2  0.0000      0.943 0.000 1.000
#> GSM1105442     2  0.2423      0.926 0.040 0.960
#> GSM1105511     2  0.0000      0.943 0.000 1.000
#> GSM1105514     2  0.5519      0.870 0.128 0.872
#> GSM1105518     2  0.0000      0.943 0.000 1.000
#> GSM1105522     1  0.7056      0.989 0.808 0.192
#> GSM1105534     1  0.7056      0.989 0.808 0.192
#> GSM1105535     1  0.7056      0.989 0.808 0.192
#> GSM1105538     1  0.6887      0.984 0.816 0.184
#> GSM1105542     2  0.2423      0.926 0.040 0.960
#> GSM1105443     2  0.0376      0.943 0.004 0.996
#> GSM1105551     1  0.6712      0.979 0.824 0.176
#> GSM1105554     1  0.7056      0.989 0.808 0.192
#> GSM1105555     1  0.6712      0.979 0.824 0.176
#> GSM1105447     2  0.1184      0.942 0.016 0.984
#> GSM1105467     2  0.5737      0.863 0.136 0.864
#> GSM1105470     2  0.5629      0.867 0.132 0.868
#> GSM1105471     2  0.0000      0.943 0.000 1.000
#> GSM1105474     2  0.5737      0.863 0.136 0.864
#> GSM1105475     2  0.0000      0.943 0.000 1.000
#> GSM1105440     1  0.6712      0.979 0.824 0.176
#> GSM1105488     2  0.2423      0.926 0.040 0.960
#> GSM1105489     1  0.6712      0.979 0.824 0.176
#> GSM1105492     1  0.6712      0.979 0.824 0.176
#> GSM1105493     1  0.7056      0.989 0.808 0.192
#> GSM1105497     2  0.1184      0.942 0.016 0.984
#> GSM1105500     2  0.1184      0.942 0.016 0.984
#> GSM1105501     2  0.0000      0.943 0.000 1.000
#> GSM1105508     1  0.7056      0.989 0.808 0.192
#> GSM1105444     2  0.5519      0.870 0.128 0.872
#> GSM1105513     2  0.1184      0.942 0.016 0.984
#> GSM1105516     2  0.9323      0.249 0.348 0.652
#> GSM1105520     2  0.0000      0.943 0.000 1.000
#> GSM1105524     1  0.7056      0.989 0.808 0.192
#> GSM1105536     2  0.0000      0.943 0.000 1.000
#> GSM1105537     1  0.7056      0.989 0.808 0.192
#> GSM1105540     2  0.1633      0.939 0.024 0.976
#> GSM1105544     2  0.1184      0.942 0.016 0.984
#> GSM1105445     2  0.1184      0.942 0.016 0.984
#> GSM1105553     1  0.9460      0.696 0.636 0.364
#> GSM1105556     1  0.7056      0.989 0.808 0.192
#> GSM1105557     2  0.1184      0.942 0.016 0.984
#> GSM1105449     2  0.5408      0.873 0.124 0.876
#> GSM1105469     2  0.0376      0.942 0.004 0.996
#> GSM1105472     2  0.5737      0.863 0.136 0.864
#> GSM1105473     1  0.7056      0.989 0.808 0.192
#> GSM1105476     2  0.5737      0.863 0.136 0.864
#> GSM1105477     2  0.1184      0.942 0.016 0.984
#> GSM1105478     2  0.1184      0.942 0.016 0.984
#> GSM1105510     2  0.0000      0.943 0.000 1.000
#> GSM1105530     1  0.7056      0.989 0.808 0.192
#> GSM1105539     1  0.7056      0.989 0.808 0.192
#> GSM1105480     2  0.1184      0.942 0.016 0.984
#> GSM1105512     1  0.7056      0.989 0.808 0.192
#> GSM1105532     1  0.7056      0.989 0.808 0.192
#> GSM1105541     1  0.7056      0.989 0.808 0.192
#> GSM1105439     2  0.0376      0.943 0.004 0.996
#> GSM1105463     1  0.7056      0.989 0.808 0.192
#> GSM1105482     1  0.7056      0.989 0.808 0.192
#> GSM1105483     2  0.0376      0.942 0.004 0.996
#> GSM1105494     2  0.1184      0.942 0.016 0.984
#> GSM1105503     2  0.1184      0.942 0.016 0.984
#> GSM1105507     1  0.6712      0.979 0.824 0.176
#> GSM1105446     2  0.1184      0.942 0.016 0.984
#> GSM1105519     1  0.7056      0.989 0.808 0.192
#> GSM1105526     2  0.0000      0.943 0.000 1.000
#> GSM1105527     2  0.0000      0.943 0.000 1.000
#> GSM1105531     2  0.1184      0.935 0.016 0.984
#> GSM1105543     2  0.1184      0.942 0.016 0.984
#> GSM1105546     1  0.6712      0.979 0.824 0.176
#> GSM1105547     1  0.7056      0.989 0.808 0.192
#> GSM1105455     2  0.1184      0.942 0.016 0.984
#> GSM1105458     2  0.5294      0.876 0.120 0.880
#> GSM1105459     2  0.5737      0.863 0.136 0.864
#> GSM1105462     2  0.0376      0.942 0.004 0.996
#> GSM1105441     2  0.5519      0.870 0.128 0.872
#> GSM1105465     2  0.2423      0.926 0.040 0.960
#> GSM1105484     2  0.0000      0.943 0.000 1.000
#> GSM1105485     2  0.0000      0.943 0.000 1.000
#> GSM1105496     2  0.2236      0.930 0.036 0.964
#> GSM1105505     2  0.5178      0.826 0.116 0.884
#> GSM1105509     1  0.7056      0.989 0.808 0.192
#> GSM1105448     2  0.5294      0.876 0.120 0.880
#> GSM1105521     1  0.7056      0.989 0.808 0.192
#> GSM1105528     2  0.0000      0.943 0.000 1.000
#> GSM1105529     2  0.0000      0.943 0.000 1.000
#> GSM1105533     1  0.6973      0.987 0.812 0.188
#> GSM1105545     2  0.0000      0.943 0.000 1.000
#> GSM1105548     1  0.6712      0.979 0.824 0.176
#> GSM1105549     1  0.7056      0.989 0.808 0.192
#> GSM1105457     2  0.0672      0.943 0.008 0.992
#> GSM1105460     2  0.0000      0.943 0.000 1.000
#> GSM1105461     2  0.5737      0.863 0.136 0.864
#> GSM1105464     1  0.7056      0.989 0.808 0.192
#> GSM1105466     2  0.0000      0.943 0.000 1.000
#> GSM1105479     2  0.0000      0.943 0.000 1.000
#> GSM1105502     1  0.7056      0.989 0.808 0.192
#> GSM1105515     1  0.7056      0.989 0.808 0.192
#> GSM1105523     2  0.0376      0.942 0.004 0.996
#> GSM1105550     2  0.0938      0.938 0.012 0.988
#> GSM1105450     2  0.5737      0.863 0.136 0.864
#> GSM1105451     2  0.4939      0.884 0.108 0.892
#> GSM1105454     2  0.1184      0.942 0.016 0.984
#> GSM1105468     2  0.5737      0.863 0.136 0.864
#> GSM1105481     2  0.0000      0.943 0.000 1.000
#> GSM1105504     2  0.0672      0.940 0.008 0.992
#> GSM1105517     1  0.7056      0.989 0.808 0.192
#> GSM1105525     2  0.6531      0.725 0.168 0.832
#> GSM1105552     1  0.7056      0.989 0.808 0.192
#> GSM1105452     2  0.2948      0.922 0.052 0.948
#> GSM1105453     2  0.0376      0.943 0.004 0.996
#> GSM1105456     2  0.1184      0.942 0.016 0.984

show/hide code output

cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#>            class entropy silhouette    p1    p2    p3
#> GSM1105438     2  0.4409     0.7261 0.004 0.824 0.172
#> GSM1105486     2  0.0000     0.7790 0.000 1.000 0.000
#> GSM1105487     1  0.0000     0.9311 1.000 0.000 0.000
#> GSM1105490     2  0.6047     0.5511 0.008 0.680 0.312
#> GSM1105491     3  0.1315     0.5271 0.020 0.008 0.972
#> GSM1105495     2  0.6724     0.2551 0.012 0.568 0.420
#> GSM1105498     3  0.7169     0.3861 0.024 0.456 0.520
#> GSM1105499     1  0.0237     0.9301 0.996 0.000 0.004
#> GSM1105506     2  0.5541     0.6596 0.008 0.740 0.252
#> GSM1105442     3  0.1170     0.5259 0.016 0.008 0.976
#> GSM1105511     3  0.7174     0.3817 0.024 0.460 0.516
#> GSM1105514     2  0.0237     0.7793 0.004 0.996 0.000
#> GSM1105518     2  0.6102     0.5250 0.008 0.672 0.320
#> GSM1105522     1  0.0000     0.9311 1.000 0.000 0.000
#> GSM1105534     1  0.0000     0.9311 1.000 0.000 0.000
#> GSM1105535     1  0.0000     0.9311 1.000 0.000 0.000
#> GSM1105538     1  0.0000     0.9311 1.000 0.000 0.000
#> GSM1105542     3  0.1170     0.5259 0.016 0.008 0.976
#> GSM1105443     2  0.2200     0.7763 0.004 0.940 0.056
#> GSM1105551     1  0.0000     0.9311 1.000 0.000 0.000
#> GSM1105554     1  0.0000     0.9311 1.000 0.000 0.000
#> GSM1105555     1  0.0000     0.9311 1.000 0.000 0.000
#> GSM1105447     2  0.5692     0.6426 0.008 0.724 0.268
#> GSM1105467     2  0.0000     0.7790 0.000 1.000 0.000
#> GSM1105470     2  0.0000     0.7790 0.000 1.000 0.000
#> GSM1105471     2  0.0983     0.7806 0.004 0.980 0.016
#> GSM1105474     2  0.0000     0.7790 0.000 1.000 0.000
#> GSM1105475     2  0.3500     0.7600 0.004 0.880 0.116
#> GSM1105440     1  0.0000     0.9311 1.000 0.000 0.000
#> GSM1105488     3  0.1170     0.5259 0.016 0.008 0.976
#> GSM1105489     1  0.0000     0.9311 1.000 0.000 0.000
#> GSM1105492     1  0.0000     0.9311 1.000 0.000 0.000
#> GSM1105493     1  0.0000     0.9311 1.000 0.000 0.000
#> GSM1105497     3  0.1170     0.5259 0.016 0.008 0.976
#> GSM1105500     3  0.7169     0.3861 0.024 0.456 0.520
#> GSM1105501     3  0.7174     0.3817 0.024 0.460 0.516
#> GSM1105508     1  0.6169     0.3948 0.636 0.004 0.360
#> GSM1105444     2  0.0237     0.7793 0.004 0.996 0.000
#> GSM1105513     2  0.5201     0.6847 0.004 0.760 0.236
#> GSM1105516     3  0.6676     0.1070 0.476 0.008 0.516
#> GSM1105520     3  0.7174     0.3817 0.024 0.460 0.516
#> GSM1105524     1  0.0000     0.9311 1.000 0.000 0.000
#> GSM1105536     3  0.7174     0.3817 0.024 0.460 0.516
#> GSM1105537     1  0.0000     0.9311 1.000 0.000 0.000
#> GSM1105540     3  0.7641     0.3990 0.044 0.436 0.520
#> GSM1105544     3  0.7169     0.3861 0.024 0.456 0.520
#> GSM1105445     2  0.5404     0.6629 0.004 0.740 0.256
#> GSM1105553     3  0.7169     0.3861 0.024 0.456 0.520
#> GSM1105556     1  0.0000     0.9311 1.000 0.000 0.000
#> GSM1105557     2  0.6318     0.4251 0.008 0.636 0.356
#> GSM1105449     2  0.0000     0.7790 0.000 1.000 0.000
#> GSM1105469     3  0.7283     0.3820 0.028 0.460 0.512
#> GSM1105472     2  0.0000     0.7790 0.000 1.000 0.000
#> GSM1105473     1  0.5397     0.5839 0.720 0.000 0.280
#> GSM1105476     2  0.0000     0.7790 0.000 1.000 0.000
#> GSM1105477     3  0.7169     0.3861 0.024 0.456 0.520
#> GSM1105478     2  0.5517     0.6448 0.004 0.728 0.268
#> GSM1105510     3  0.1905     0.5258 0.016 0.028 0.956
#> GSM1105530     1  0.0237     0.9301 0.996 0.000 0.004
#> GSM1105539     1  0.0237     0.9301 0.996 0.000 0.004
#> GSM1105480     3  0.6659     0.3369 0.008 0.460 0.532
#> GSM1105512     1  0.0237     0.9301 0.996 0.000 0.004
#> GSM1105532     1  0.0237     0.9301 0.996 0.000 0.004
#> GSM1105541     1  0.0237     0.9301 0.996 0.000 0.004
#> GSM1105439     2  0.1129     0.7784 0.004 0.976 0.020
#> GSM1105463     1  0.6299     0.0406 0.524 0.000 0.476
#> GSM1105482     1  0.0000     0.9311 1.000 0.000 0.000
#> GSM1105483     3  0.7174     0.3817 0.024 0.460 0.516
#> GSM1105494     2  0.6318     0.4251 0.008 0.636 0.356
#> GSM1105503     3  0.6654     0.3490 0.008 0.456 0.536
#> GSM1105507     1  0.6079     0.3286 0.612 0.000 0.388
#> GSM1105446     3  0.3141     0.5229 0.020 0.068 0.912
#> GSM1105519     1  0.0237     0.9301 0.996 0.000 0.004
#> GSM1105526     3  0.7174     0.3817 0.024 0.460 0.516
#> GSM1105527     2  0.6750     0.3939 0.024 0.640 0.336
#> GSM1105531     3  0.7722     0.2237 0.432 0.048 0.520
#> GSM1105543     2  0.5977     0.6246 0.020 0.728 0.252
#> GSM1105546     1  0.0000     0.9311 1.000 0.000 0.000
#> GSM1105547     1  0.0000     0.9311 1.000 0.000 0.000
#> GSM1105455     2  0.2860     0.7704 0.004 0.912 0.084
#> GSM1105458     2  0.0424     0.7805 0.000 0.992 0.008
#> GSM1105459     2  0.0000     0.7790 0.000 1.000 0.000
#> GSM1105462     3  0.7174     0.3817 0.024 0.460 0.516
#> GSM1105441     2  0.0000     0.7790 0.000 1.000 0.000
#> GSM1105465     3  0.1170     0.5259 0.016 0.008 0.976
#> GSM1105484     3  0.6192    -0.0301 0.000 0.420 0.580
#> GSM1105485     3  0.1315     0.5271 0.020 0.008 0.972
#> GSM1105496     3  0.7152     0.3956 0.024 0.444 0.532
#> GSM1105505     3  0.6516     0.0958 0.480 0.004 0.516
#> GSM1105509     1  0.3816     0.7804 0.852 0.000 0.148
#> GSM1105448     2  0.0237     0.7787 0.000 0.996 0.004
#> GSM1105521     1  0.0237     0.9301 0.996 0.000 0.004
#> GSM1105528     3  0.5919     0.2994 0.016 0.260 0.724
#> GSM1105529     3  0.1170     0.5259 0.016 0.008 0.976
#> GSM1105533     1  0.0000     0.9311 1.000 0.000 0.000
#> GSM1105545     3  0.7174     0.3817 0.024 0.460 0.516
#> GSM1105548     1  0.0000     0.9311 1.000 0.000 0.000
#> GSM1105549     1  0.0237     0.9301 0.996 0.000 0.004
#> GSM1105457     2  0.5404     0.6629 0.004 0.740 0.256
#> GSM1105460     2  0.5414     0.6831 0.016 0.772 0.212
#> GSM1105461     2  0.0000     0.7790 0.000 1.000 0.000
#> GSM1105464     1  0.0237     0.9301 0.996 0.000 0.004
#> GSM1105466     2  0.5404     0.6629 0.004 0.740 0.256
#> GSM1105479     2  0.1647     0.7782 0.004 0.960 0.036
#> GSM1105502     1  0.0000     0.9311 1.000 0.000 0.000
#> GSM1105515     1  0.0000     0.9311 1.000 0.000 0.000
#> GSM1105523     3  0.7471     0.3893 0.036 0.448 0.516
#> GSM1105550     3  0.8597     0.4120 0.104 0.380 0.516
#> GSM1105450     2  0.0000     0.7790 0.000 1.000 0.000
#> GSM1105451     2  0.0000     0.7790 0.000 1.000 0.000
#> GSM1105454     2  0.5404     0.6622 0.004 0.740 0.256
#> GSM1105468     2  0.0000     0.7790 0.000 1.000 0.000
#> GSM1105481     2  0.5763     0.5947 0.008 0.716 0.276
#> GSM1105504     3  0.6816     0.1195 0.472 0.012 0.516
#> GSM1105517     3  0.6516     0.0859 0.480 0.004 0.516
#> GSM1105525     1  0.6483     0.1201 0.544 0.004 0.452
#> GSM1105552     3  0.6521     0.0513 0.492 0.004 0.504
#> GSM1105452     3  0.1170     0.5259 0.016 0.008 0.976
#> GSM1105453     2  0.4293     0.7313 0.004 0.832 0.164
#> GSM1105456     2  0.4351     0.7365 0.004 0.828 0.168

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>            class entropy silhouette    p1    p2    p3    p4
#> GSM1105438     2  0.1489      0.738 0.000 0.952 0.004 0.044
#> GSM1105486     2  0.0000      0.763 0.000 1.000 0.000 0.000
#> GSM1105487     1  0.1820      0.914 0.944 0.000 0.036 0.020
#> GSM1105490     2  0.6566      0.773 0.000 0.624 0.236 0.140
#> GSM1105491     4  0.3450      0.965 0.000 0.008 0.156 0.836
#> GSM1105495     2  0.6373      0.604 0.000 0.652 0.200 0.148
#> GSM1105498     3  0.3647      0.626 0.000 0.152 0.832 0.016
#> GSM1105499     1  0.0000      0.921 1.000 0.000 0.000 0.000
#> GSM1105506     2  0.6538      0.776 0.000 0.628 0.232 0.140
#> GSM1105442     4  0.3450      0.965 0.000 0.008 0.156 0.836
#> GSM1105511     3  0.3653      0.642 0.000 0.128 0.844 0.028
#> GSM1105514     2  0.0592      0.758 0.000 0.984 0.000 0.016
#> GSM1105518     2  0.6594      0.770 0.000 0.620 0.240 0.140
#> GSM1105522     1  0.4744      0.661 0.704 0.000 0.284 0.012
#> GSM1105534     1  0.0336      0.921 0.992 0.000 0.000 0.008
#> GSM1105535     1  0.0336      0.921 0.992 0.000 0.000 0.008
#> GSM1105538     1  0.1151      0.919 0.968 0.000 0.024 0.008
#> GSM1105542     4  0.3450      0.965 0.000 0.008 0.156 0.836
#> GSM1105443     2  0.6538      0.776 0.000 0.628 0.232 0.140
#> GSM1105551     1  0.1820      0.914 0.944 0.000 0.036 0.020
#> GSM1105554     1  0.0000      0.921 1.000 0.000 0.000 0.000
#> GSM1105555     1  0.1820      0.914 0.944 0.000 0.036 0.020
#> GSM1105447     2  0.6538      0.776 0.000 0.628 0.232 0.140
#> GSM1105467     2  0.0188      0.761 0.000 0.996 0.000 0.004
#> GSM1105470     2  0.0000      0.763 0.000 1.000 0.000 0.000
#> GSM1105471     2  0.3945      0.784 0.000 0.780 0.216 0.004
#> GSM1105474     2  0.0000      0.763 0.000 1.000 0.000 0.000
#> GSM1105475     2  0.6538      0.776 0.000 0.628 0.232 0.140
#> GSM1105440     1  0.1820      0.914 0.944 0.000 0.036 0.020
#> GSM1105488     4  0.3450      0.965 0.000 0.008 0.156 0.836
#> GSM1105489     1  0.1624      0.915 0.952 0.000 0.028 0.020
#> GSM1105492     1  0.1820      0.914 0.944 0.000 0.036 0.020
#> GSM1105493     1  0.0000      0.921 1.000 0.000 0.000 0.000
#> GSM1105497     4  0.3498      0.962 0.000 0.008 0.160 0.832
#> GSM1105500     3  0.5182      0.639 0.048 0.024 0.776 0.152
#> GSM1105501     3  0.3707      0.639 0.000 0.132 0.840 0.028
#> GSM1105508     3  0.5057      0.422 0.340 0.000 0.648 0.012
#> GSM1105444     2  0.0336      0.762 0.000 0.992 0.000 0.008
#> GSM1105513     2  0.6538      0.776 0.000 0.628 0.232 0.140
#> GSM1105516     3  0.4088      0.628 0.232 0.000 0.764 0.004
#> GSM1105520     3  0.3554      0.638 0.000 0.136 0.844 0.020
#> GSM1105524     1  0.0336      0.921 0.992 0.000 0.000 0.008
#> GSM1105536     3  0.3071      0.681 0.000 0.068 0.888 0.044
#> GSM1105537     1  0.0336      0.921 0.992 0.000 0.000 0.008
#> GSM1105540     3  0.2392      0.712 0.036 0.012 0.928 0.024
#> GSM1105544     3  0.4735      0.632 0.032 0.020 0.796 0.152
#> GSM1105445     2  0.6538      0.776 0.000 0.628 0.232 0.140
#> GSM1105553     3  0.5194      0.637 0.056 0.024 0.780 0.140
#> GSM1105556     1  0.0000      0.921 1.000 0.000 0.000 0.000
#> GSM1105557     2  0.6594      0.770 0.000 0.620 0.240 0.140
#> GSM1105449     2  0.0000      0.763 0.000 1.000 0.000 0.000
#> GSM1105469     3  0.0657      0.707 0.000 0.012 0.984 0.004
#> GSM1105472     2  0.0000      0.763 0.000 1.000 0.000 0.000
#> GSM1105473     3  0.4313      0.607 0.260 0.000 0.736 0.004
#> GSM1105476     2  0.0000      0.763 0.000 1.000 0.000 0.000
#> GSM1105477     3  0.3695      0.614 0.000 0.016 0.828 0.156
#> GSM1105478     2  0.6566      0.773 0.000 0.624 0.236 0.140
#> GSM1105510     4  0.3852      0.930 0.000 0.008 0.192 0.800
#> GSM1105530     1  0.3208      0.831 0.848 0.000 0.148 0.004
#> GSM1105539     1  0.2530      0.863 0.888 0.000 0.112 0.000
#> GSM1105480     3  0.4454      0.287 0.000 0.308 0.692 0.000
#> GSM1105512     1  0.2999      0.846 0.864 0.000 0.132 0.004
#> GSM1105532     1  0.4584      0.600 0.696 0.000 0.300 0.004
#> GSM1105541     1  0.2831      0.856 0.876 0.000 0.120 0.004
#> GSM1105439     2  0.6418      0.779 0.000 0.644 0.216 0.140
#> GSM1105463     3  0.4122      0.626 0.236 0.000 0.760 0.004
#> GSM1105482     1  0.0000      0.921 1.000 0.000 0.000 0.000
#> GSM1105483     3  0.0657      0.709 0.004 0.012 0.984 0.000
#> GSM1105494     2  0.6201      0.735 0.000 0.620 0.300 0.080
#> GSM1105503     3  0.3266      0.615 0.000 0.168 0.832 0.000
#> GSM1105507     3  0.4284      0.626 0.224 0.000 0.764 0.012
#> GSM1105446     4  0.6323      0.684 0.000 0.112 0.248 0.640
#> GSM1105519     1  0.3583      0.811 0.816 0.000 0.180 0.004
#> GSM1105526     3  0.3895      0.644 0.000 0.132 0.832 0.036
#> GSM1105527     2  0.5364      0.632 0.000 0.592 0.392 0.016
#> GSM1105531     3  0.3810      0.658 0.188 0.000 0.804 0.008
#> GSM1105543     2  0.5492      0.678 0.000 0.640 0.328 0.032
#> GSM1105546     1  0.1624      0.915 0.952 0.000 0.028 0.020
#> GSM1105547     1  0.0000      0.921 1.000 0.000 0.000 0.000
#> GSM1105455     2  0.6538      0.776 0.000 0.628 0.232 0.140
#> GSM1105458     2  0.2530      0.785 0.000 0.888 0.112 0.000
#> GSM1105459     2  0.0000      0.763 0.000 1.000 0.000 0.000
#> GSM1105462     3  0.1271      0.709 0.008 0.012 0.968 0.012
#> GSM1105441     2  0.0000      0.763 0.000 1.000 0.000 0.000
#> GSM1105465     4  0.3450      0.965 0.000 0.008 0.156 0.836
#> GSM1105484     2  0.4153      0.709 0.000 0.820 0.048 0.132
#> GSM1105485     4  0.3636      0.951 0.000 0.008 0.172 0.820
#> GSM1105496     3  0.5358      0.635 0.068 0.020 0.768 0.144
#> GSM1105505     3  0.4544      0.654 0.192 0.012 0.780 0.016
#> GSM1105509     3  0.5016      0.293 0.396 0.000 0.600 0.004
#> GSM1105448     2  0.0336      0.762 0.000 0.992 0.000 0.008
#> GSM1105521     1  0.2999      0.846 0.864 0.000 0.132 0.004
#> GSM1105528     2  0.7121      0.470 0.000 0.564 0.216 0.220
#> GSM1105529     4  0.3450      0.965 0.000 0.008 0.156 0.836
#> GSM1105533     1  0.0336      0.921 0.992 0.000 0.000 0.008
#> GSM1105545     3  0.3932      0.645 0.004 0.128 0.836 0.032
#> GSM1105548     1  0.1820      0.914 0.944 0.000 0.036 0.020
#> GSM1105549     1  0.0000      0.921 1.000 0.000 0.000 0.000
#> GSM1105457     2  0.6538      0.776 0.000 0.628 0.232 0.140
#> GSM1105460     2  0.4957      0.735 0.000 0.684 0.300 0.016
#> GSM1105461     2  0.0000      0.763 0.000 1.000 0.000 0.000
#> GSM1105464     1  0.4889      0.459 0.636 0.000 0.360 0.004
#> GSM1105466     2  0.6538      0.776 0.000 0.628 0.232 0.140
#> GSM1105479     2  0.6509      0.777 0.000 0.632 0.228 0.140
#> GSM1105502     1  0.1284      0.919 0.964 0.000 0.024 0.012
#> GSM1105515     1  0.0000      0.921 1.000 0.000 0.000 0.000
#> GSM1105523     3  0.1174      0.712 0.020 0.012 0.968 0.000
#> GSM1105550     3  0.1488      0.714 0.032 0.012 0.956 0.000
#> GSM1105450     2  0.0000      0.763 0.000 1.000 0.000 0.000
#> GSM1105451     2  0.0000      0.763 0.000 1.000 0.000 0.000
#> GSM1105454     2  0.6538      0.776 0.000 0.628 0.232 0.140
#> GSM1105468     2  0.0000      0.763 0.000 1.000 0.000 0.000
#> GSM1105481     2  0.5599      0.658 0.000 0.616 0.352 0.032
#> GSM1105504     3  0.3703      0.682 0.140 0.012 0.840 0.008
#> GSM1105517     3  0.4122      0.626 0.236 0.000 0.760 0.004
#> GSM1105525     3  0.4387      0.626 0.236 0.000 0.752 0.012
#> GSM1105552     3  0.4122      0.626 0.236 0.000 0.760 0.004
#> GSM1105452     4  0.3450      0.965 0.000 0.008 0.156 0.836
#> GSM1105453     2  0.2773      0.785 0.000 0.880 0.116 0.004
#> GSM1105456     2  0.6538      0.776 0.000 0.628 0.232 0.140

show/hide code output

cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#>            class entropy silhouette    p1    p2    p3    p4    p5
#> GSM1105438     2  0.0000     0.8780 0.000 1.000 0.000 0.000 0.000
#> GSM1105486     2  0.0000     0.8780 0.000 1.000 0.000 0.000 0.000
#> GSM1105487     1  0.0162     0.9342 0.996 0.000 0.004 0.000 0.000
#> GSM1105490     2  0.4302     0.5273 0.000 0.520 0.000 0.480 0.000
#> GSM1105491     5  0.0404     0.9520 0.000 0.000 0.000 0.012 0.988
#> GSM1105495     2  0.2915     0.8349 0.000 0.860 0.000 0.116 0.024
#> GSM1105498     4  0.3412     0.6656 0.000 0.000 0.152 0.820 0.028
#> GSM1105499     1  0.1270     0.9531 0.948 0.000 0.052 0.000 0.000
#> GSM1105506     2  0.4150     0.6499 0.000 0.612 0.000 0.388 0.000
#> GSM1105442     5  0.0162     0.9537 0.000 0.000 0.000 0.004 0.996
#> GSM1105511     4  0.3766     0.7040 0.000 0.000 0.268 0.728 0.004
#> GSM1105514     2  0.0324     0.8772 0.000 0.992 0.000 0.004 0.004
#> GSM1105518     4  0.4287    -0.4364 0.000 0.460 0.000 0.540 0.000
#> GSM1105522     3  0.2732     0.7452 0.160 0.000 0.840 0.000 0.000
#> GSM1105534     1  0.1270     0.9531 0.948 0.000 0.052 0.000 0.000
#> GSM1105535     1  0.1270     0.9531 0.948 0.000 0.052 0.000 0.000
#> GSM1105538     1  0.1341     0.9512 0.944 0.000 0.056 0.000 0.000
#> GSM1105542     5  0.0162     0.9537 0.000 0.000 0.000 0.004 0.996
#> GSM1105443     2  0.2890     0.8410 0.000 0.836 0.000 0.160 0.004
#> GSM1105551     1  0.0162     0.9342 0.996 0.000 0.004 0.000 0.000
#> GSM1105554     1  0.1270     0.9531 0.948 0.000 0.052 0.000 0.000
#> GSM1105555     1  0.0162     0.9342 0.996 0.000 0.004 0.000 0.000
#> GSM1105447     2  0.4045     0.6859 0.000 0.644 0.000 0.356 0.000
#> GSM1105467     2  0.0000     0.8780 0.000 1.000 0.000 0.000 0.000
#> GSM1105470     2  0.0486     0.8766 0.000 0.988 0.004 0.004 0.004
#> GSM1105471     2  0.1671     0.8692 0.000 0.924 0.000 0.076 0.000
#> GSM1105474     2  0.0000     0.8780 0.000 1.000 0.000 0.000 0.000
#> GSM1105475     2  0.2561     0.8476 0.000 0.856 0.000 0.144 0.000
#> GSM1105440     1  0.0162     0.9342 0.996 0.000 0.004 0.000 0.000
#> GSM1105488     5  0.0162     0.9537 0.000 0.000 0.000 0.004 0.996
#> GSM1105489     1  0.0510     0.9420 0.984 0.000 0.016 0.000 0.000
#> GSM1105492     1  0.0162     0.9342 0.996 0.000 0.004 0.000 0.000
#> GSM1105493     1  0.1410     0.9472 0.940 0.000 0.060 0.000 0.000
#> GSM1105497     5  0.1121     0.9324 0.000 0.000 0.000 0.044 0.956
#> GSM1105500     4  0.5796     0.6698 0.000 0.000 0.284 0.588 0.128
#> GSM1105501     4  0.3280     0.6672 0.000 0.012 0.160 0.824 0.004
#> GSM1105508     3  0.1571     0.6359 0.004 0.000 0.936 0.060 0.000
#> GSM1105444     2  0.0486     0.8766 0.000 0.988 0.004 0.004 0.004
#> GSM1105513     2  0.4114     0.6634 0.000 0.624 0.000 0.376 0.000
#> GSM1105516     3  0.4142     0.0356 0.004 0.000 0.684 0.308 0.004
#> GSM1105520     4  0.2890     0.6646 0.000 0.000 0.160 0.836 0.004
#> GSM1105524     1  0.1270     0.9531 0.948 0.000 0.052 0.000 0.000
#> GSM1105536     4  0.3949     0.7054 0.000 0.000 0.300 0.696 0.004
#> GSM1105537     1  0.1270     0.9531 0.948 0.000 0.052 0.000 0.000
#> GSM1105540     4  0.5613     0.6644 0.000 0.000 0.332 0.576 0.092
#> GSM1105544     4  0.5714     0.6735 0.000 0.000 0.292 0.592 0.116
#> GSM1105445     2  0.4150     0.6499 0.000 0.612 0.000 0.388 0.000
#> GSM1105553     4  0.5934     0.6455 0.000 0.000 0.232 0.592 0.176
#> GSM1105556     1  0.1270     0.9531 0.948 0.000 0.052 0.000 0.000
#> GSM1105557     4  0.4256    -0.3875 0.000 0.436 0.000 0.564 0.000
#> GSM1105449     2  0.0486     0.8766 0.000 0.988 0.004 0.004 0.004
#> GSM1105469     4  0.4066     0.6958 0.000 0.000 0.324 0.672 0.004
#> GSM1105472     2  0.0486     0.8766 0.000 0.988 0.004 0.004 0.004
#> GSM1105473     3  0.1282     0.7246 0.044 0.000 0.952 0.004 0.000
#> GSM1105476     2  0.0000     0.8780 0.000 1.000 0.000 0.000 0.000
#> GSM1105477     4  0.5788     0.6711 0.000 0.000 0.300 0.580 0.120
#> GSM1105478     2  0.4150     0.6499 0.000 0.612 0.000 0.388 0.000
#> GSM1105510     5  0.2370     0.8905 0.000 0.000 0.040 0.056 0.904
#> GSM1105530     3  0.3074     0.7120 0.196 0.000 0.804 0.000 0.000
#> GSM1105539     1  0.4273     0.1173 0.552 0.000 0.448 0.000 0.000
#> GSM1105480     4  0.1331     0.5716 0.000 0.008 0.040 0.952 0.000
#> GSM1105512     3  0.3796     0.5647 0.300 0.000 0.700 0.000 0.000
#> GSM1105532     3  0.2773     0.7410 0.164 0.000 0.836 0.000 0.000
#> GSM1105541     3  0.3949     0.5081 0.332 0.000 0.668 0.000 0.000
#> GSM1105439     2  0.1928     0.8738 0.000 0.920 0.004 0.072 0.004
#> GSM1105463     3  0.0771     0.6860 0.004 0.000 0.976 0.020 0.000
#> GSM1105482     1  0.1270     0.9531 0.948 0.000 0.052 0.000 0.000
#> GSM1105483     4  0.3949     0.7054 0.000 0.000 0.300 0.696 0.004
#> GSM1105494     4  0.4304    -0.4901 0.000 0.484 0.000 0.516 0.000
#> GSM1105503     4  0.2377     0.6450 0.000 0.000 0.128 0.872 0.000
#> GSM1105507     3  0.2674     0.5170 0.004 0.000 0.856 0.140 0.000
#> GSM1105446     5  0.3551     0.8190 0.000 0.012 0.088 0.056 0.844
#> GSM1105519     3  0.2852     0.7342 0.172 0.000 0.828 0.000 0.000
#> GSM1105526     4  0.3949     0.7054 0.000 0.000 0.300 0.696 0.004
#> GSM1105527     4  0.3934     0.2208 0.000 0.276 0.008 0.716 0.000
#> GSM1105531     4  0.4596     0.4842 0.004 0.000 0.492 0.500 0.004
#> GSM1105543     2  0.2605     0.8232 0.000 0.852 0.000 0.148 0.000
#> GSM1105546     1  0.0000     0.9348 1.000 0.000 0.000 0.000 0.000
#> GSM1105547     1  0.1270     0.9531 0.948 0.000 0.052 0.000 0.000
#> GSM1105455     2  0.2629     0.8517 0.000 0.860 0.000 0.136 0.004
#> GSM1105458     2  0.0162     0.8782 0.000 0.996 0.000 0.004 0.000
#> GSM1105459     2  0.0486     0.8766 0.000 0.988 0.004 0.004 0.004
#> GSM1105462     4  0.4084     0.6935 0.000 0.000 0.328 0.668 0.004
#> GSM1105441     2  0.0486     0.8766 0.000 0.988 0.004 0.004 0.004
#> GSM1105465     5  0.0162     0.9537 0.000 0.000 0.000 0.004 0.996
#> GSM1105484     2  0.1544     0.8673 0.000 0.932 0.000 0.068 0.000
#> GSM1105485     5  0.1626     0.9257 0.000 0.000 0.016 0.044 0.940
#> GSM1105496     4  0.5816     0.6680 0.000 0.000 0.280 0.588 0.132
#> GSM1105505     4  0.5971     0.5751 0.004 0.000 0.404 0.496 0.096
#> GSM1105509     3  0.1124     0.7214 0.036 0.000 0.960 0.004 0.000
#> GSM1105448     2  0.0486     0.8766 0.000 0.988 0.004 0.004 0.004
#> GSM1105521     3  0.3774     0.5717 0.296 0.000 0.704 0.000 0.000
#> GSM1105528     2  0.3201     0.8348 0.000 0.852 0.000 0.096 0.052
#> GSM1105529     5  0.0162     0.9537 0.000 0.000 0.000 0.004 0.996
#> GSM1105533     1  0.1270     0.9531 0.948 0.000 0.052 0.000 0.000
#> GSM1105545     4  0.3884     0.7061 0.000 0.000 0.288 0.708 0.004
#> GSM1105548     1  0.0162     0.9342 0.996 0.000 0.004 0.000 0.000
#> GSM1105549     1  0.1671     0.9338 0.924 0.000 0.076 0.000 0.000
#> GSM1105457     2  0.4150     0.6499 0.000 0.612 0.000 0.388 0.000
#> GSM1105460     2  0.1410     0.8695 0.000 0.940 0.000 0.060 0.000
#> GSM1105461     2  0.0486     0.8766 0.000 0.988 0.004 0.004 0.004
#> GSM1105464     3  0.2471     0.7494 0.136 0.000 0.864 0.000 0.000
#> GSM1105466     2  0.4150     0.6499 0.000 0.612 0.000 0.388 0.000
#> GSM1105479     2  0.2648     0.8442 0.000 0.848 0.000 0.152 0.000
#> GSM1105502     3  0.4242     0.2781 0.428 0.000 0.572 0.000 0.000
#> GSM1105515     1  0.1270     0.9531 0.948 0.000 0.052 0.000 0.000
#> GSM1105523     4  0.4135     0.6848 0.000 0.000 0.340 0.656 0.004
#> GSM1105550     4  0.4288     0.6467 0.000 0.000 0.384 0.612 0.004
#> GSM1105450     2  0.0486     0.8766 0.000 0.988 0.004 0.004 0.004
#> GSM1105451     2  0.0486     0.8766 0.000 0.988 0.004 0.004 0.004
#> GSM1105454     2  0.2690     0.8440 0.000 0.844 0.000 0.156 0.000
#> GSM1105468     2  0.0486     0.8766 0.000 0.988 0.004 0.004 0.004
#> GSM1105481     2  0.1270     0.8708 0.000 0.948 0.000 0.052 0.000
#> GSM1105504     4  0.4562     0.5681 0.004 0.000 0.444 0.548 0.004
#> GSM1105517     3  0.0566     0.6921 0.004 0.000 0.984 0.012 0.000
#> GSM1105525     3  0.1704     0.6227 0.004 0.000 0.928 0.068 0.000
#> GSM1105552     3  0.4572     0.3837 0.004 0.000 0.756 0.148 0.092
#> GSM1105452     5  0.0162     0.9537 0.000 0.000 0.000 0.004 0.996
#> GSM1105453     2  0.1965     0.8565 0.000 0.904 0.000 0.096 0.000
#> GSM1105456     2  0.3074     0.8188 0.000 0.804 0.000 0.196 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
#> GSM1105438     2  0.0146     0.9301 0.000 0.996 0.000 0.000 0.000 0.004
#> GSM1105486     2  0.0146     0.9301 0.000 0.996 0.000 0.000 0.000 0.004
#> GSM1105487     1  0.0777     0.9483 0.972 0.000 0.004 0.000 0.000 0.024
#> GSM1105490     6  0.0713     0.8703 0.000 0.028 0.000 0.000 0.000 0.972
#> GSM1105491     5  0.0146     0.9936 0.000 0.000 0.000 0.004 0.996 0.000
#> GSM1105495     2  0.0692     0.9203 0.000 0.976 0.000 0.000 0.020 0.004
#> GSM1105498     4  0.2773     0.7869 0.000 0.000 0.008 0.836 0.004 0.152
#> GSM1105499     1  0.2454     0.8424 0.840 0.000 0.160 0.000 0.000 0.000
#> GSM1105506     6  0.2219     0.8747 0.000 0.136 0.000 0.000 0.000 0.864
#> GSM1105442     5  0.0000     0.9954 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM1105511     4  0.1219     0.9034 0.000 0.000 0.000 0.948 0.004 0.048
#> GSM1105514     2  0.0146     0.9301 0.000 0.996 0.000 0.000 0.000 0.004
#> GSM1105518     6  0.2048     0.8855 0.000 0.120 0.000 0.000 0.000 0.880
#> GSM1105522     3  0.3453     0.8039 0.064 0.000 0.804 0.132 0.000 0.000
#> GSM1105534     1  0.0000     0.9530 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM1105535     1  0.0000     0.9530 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM1105538     1  0.0717     0.9495 0.976 0.000 0.008 0.000 0.000 0.016
#> GSM1105542     5  0.0000     0.9954 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM1105443     2  0.3428     0.5513 0.000 0.696 0.000 0.000 0.000 0.304
#> GSM1105551     1  0.0891     0.9473 0.968 0.000 0.008 0.000 0.000 0.024
#> GSM1105554     1  0.1444     0.9130 0.928 0.000 0.072 0.000 0.000 0.000
#> GSM1105555     1  0.0891     0.9473 0.968 0.000 0.008 0.000 0.000 0.024
#> GSM1105447     6  0.2300     0.8231 0.000 0.144 0.000 0.000 0.000 0.856
#> GSM1105467     2  0.0146     0.9301 0.000 0.996 0.000 0.000 0.000 0.004
#> GSM1105470     2  0.0000     0.9298 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1105471     2  0.0547     0.9234 0.000 0.980 0.000 0.000 0.000 0.020
#> GSM1105474     2  0.0146     0.9301 0.000 0.996 0.000 0.000 0.000 0.004
#> GSM1105475     2  0.2664     0.7666 0.000 0.816 0.000 0.000 0.000 0.184
#> GSM1105440     1  0.0891     0.9473 0.968 0.000 0.008 0.000 0.000 0.024
#> GSM1105488     5  0.0000     0.9954 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM1105489     1  0.0000     0.9530 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM1105492     1  0.0632     0.9489 0.976 0.000 0.000 0.000 0.000 0.024
#> GSM1105493     1  0.2340     0.8512 0.852 0.000 0.148 0.000 0.000 0.000
#> GSM1105497     5  0.0000     0.9954 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM1105500     4  0.2009     0.8520 0.000 0.000 0.008 0.904 0.004 0.084
#> GSM1105501     4  0.1285     0.9017 0.000 0.000 0.000 0.944 0.004 0.052
#> GSM1105508     3  0.3833     0.3036 0.000 0.000 0.556 0.444 0.000 0.000
#> GSM1105444     2  0.0000     0.9298 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1105513     6  0.1765     0.8889 0.000 0.096 0.000 0.000 0.000 0.904
#> GSM1105516     4  0.1075     0.8962 0.000 0.000 0.048 0.952 0.000 0.000
#> GSM1105520     4  0.1152     0.9046 0.000 0.000 0.000 0.952 0.004 0.044
#> GSM1105524     1  0.0000     0.9530 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM1105536     4  0.1152     0.9046 0.000 0.000 0.000 0.952 0.004 0.044
#> GSM1105537     1  0.0000     0.9530 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM1105540     4  0.0000     0.8988 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1105544     4  0.2213     0.8398 0.000 0.000 0.008 0.888 0.004 0.100
#> GSM1105445     6  0.2048     0.8855 0.000 0.120 0.000 0.000 0.000 0.880
#> GSM1105553     4  0.2656     0.8166 0.000 0.000 0.008 0.860 0.012 0.120
#> GSM1105556     1  0.2260     0.8593 0.860 0.000 0.140 0.000 0.000 0.000
#> GSM1105557     6  0.0713     0.8703 0.000 0.028 0.000 0.000 0.000 0.972
#> GSM1105449     2  0.0146     0.9301 0.000 0.996 0.000 0.000 0.000 0.004
#> GSM1105469     4  0.1168     0.9049 0.000 0.000 0.016 0.956 0.000 0.028
#> GSM1105472     2  0.0000     0.9298 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1105473     3  0.2793     0.7668 0.000 0.000 0.800 0.200 0.000 0.000
#> GSM1105476     2  0.0146     0.9301 0.000 0.996 0.000 0.000 0.000 0.004
#> GSM1105477     4  0.0291     0.8976 0.000 0.000 0.004 0.992 0.004 0.000
#> GSM1105478     6  0.0790     0.8725 0.000 0.032 0.000 0.000 0.000 0.968
#> GSM1105510     5  0.0363     0.9863 0.000 0.000 0.000 0.012 0.988 0.000
#> GSM1105530     3  0.0260     0.8384 0.008 0.000 0.992 0.000 0.000 0.000
#> GSM1105539     3  0.0790     0.8239 0.032 0.000 0.968 0.000 0.000 0.000
#> GSM1105480     6  0.2135     0.7851 0.000 0.000 0.000 0.128 0.000 0.872
#> GSM1105512     3  0.0260     0.8384 0.008 0.000 0.992 0.000 0.000 0.000
#> GSM1105532     3  0.0260     0.8388 0.000 0.000 0.992 0.008 0.000 0.000
#> GSM1105541     3  0.0260     0.8384 0.008 0.000 0.992 0.000 0.000 0.000
#> GSM1105439     2  0.1327     0.8856 0.000 0.936 0.000 0.000 0.000 0.064
#> GSM1105463     4  0.3482     0.5089 0.000 0.000 0.316 0.684 0.000 0.000
#> GSM1105482     1  0.0000     0.9530 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM1105483     4  0.1007     0.9043 0.000 0.000 0.000 0.956 0.000 0.044
#> GSM1105494     6  0.1498     0.8572 0.000 0.028 0.000 0.032 0.000 0.940
#> GSM1105503     6  0.3592     0.4689 0.000 0.000 0.000 0.344 0.000 0.656
#> GSM1105507     4  0.3244     0.5737 0.000 0.000 0.268 0.732 0.000 0.000
#> GSM1105446     5  0.0622     0.9814 0.000 0.000 0.000 0.012 0.980 0.008
#> GSM1105519     3  0.2653     0.8118 0.012 0.000 0.844 0.144 0.000 0.000
#> GSM1105526     4  0.1152     0.9046 0.000 0.000 0.000 0.952 0.004 0.044
#> GSM1105527     6  0.2462     0.8821 0.000 0.096 0.000 0.028 0.000 0.876
#> GSM1105531     4  0.1075     0.8962 0.000 0.000 0.048 0.952 0.000 0.000
#> GSM1105543     2  0.1492     0.8951 0.000 0.940 0.000 0.000 0.036 0.024
#> GSM1105546     1  0.0000     0.9530 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM1105547     1  0.0000     0.9530 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM1105455     2  0.2912     0.7088 0.000 0.784 0.000 0.000 0.000 0.216
#> GSM1105458     2  0.0363     0.9273 0.000 0.988 0.000 0.000 0.000 0.012
#> GSM1105459     2  0.0000     0.9298 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1105462     4  0.1007     0.9043 0.000 0.000 0.000 0.956 0.000 0.044
#> GSM1105441     2  0.0000     0.9298 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1105465     5  0.0000     0.9954 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM1105484     2  0.0146     0.9301 0.000 0.996 0.000 0.000 0.000 0.004
#> GSM1105485     5  0.0146     0.9936 0.000 0.000 0.000 0.004 0.996 0.000
#> GSM1105496     4  0.2686     0.8252 0.000 0.000 0.008 0.868 0.024 0.100
#> GSM1105505     4  0.0790     0.9002 0.000 0.000 0.032 0.968 0.000 0.000
#> GSM1105509     3  0.2491     0.7990 0.000 0.000 0.836 0.164 0.000 0.000
#> GSM1105448     2  0.0000     0.9298 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1105521     3  0.0260     0.8384 0.008 0.000 0.992 0.000 0.000 0.000
#> GSM1105528     2  0.0692     0.9165 0.000 0.976 0.000 0.000 0.020 0.004
#> GSM1105529     5  0.0000     0.9954 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM1105533     1  0.0000     0.9530 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM1105545     4  0.1152     0.9046 0.000 0.000 0.000 0.952 0.004 0.044
#> GSM1105548     1  0.0891     0.9473 0.968 0.000 0.008 0.000 0.000 0.024
#> GSM1105549     1  0.3464     0.6337 0.688 0.000 0.312 0.000 0.000 0.000
#> GSM1105457     6  0.2092     0.8832 0.000 0.124 0.000 0.000 0.000 0.876
#> GSM1105460     2  0.0260     0.9288 0.000 0.992 0.000 0.000 0.000 0.008
#> GSM1105461     2  0.0000     0.9298 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1105464     3  0.0260     0.8388 0.000 0.000 0.992 0.008 0.000 0.000
#> GSM1105466     6  0.2219     0.8747 0.000 0.136 0.000 0.000 0.000 0.864
#> GSM1105479     2  0.3390     0.5775 0.000 0.704 0.000 0.000 0.000 0.296
#> GSM1105502     3  0.3023     0.6797 0.232 0.000 0.768 0.000 0.000 0.000
#> GSM1105515     1  0.0000     0.9530 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM1105523     4  0.1151     0.9022 0.000 0.000 0.032 0.956 0.000 0.012
#> GSM1105550     4  0.1082     0.8994 0.000 0.000 0.040 0.956 0.000 0.004
#> GSM1105450     2  0.0000     0.9298 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1105451     2  0.0000     0.9298 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1105454     2  0.3266     0.6488 0.000 0.728 0.000 0.000 0.000 0.272
#> GSM1105468     2  0.0000     0.9298 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM1105481     2  0.0937     0.9095 0.000 0.960 0.000 0.000 0.000 0.040
#> GSM1105504     4  0.1007     0.8976 0.000 0.000 0.044 0.956 0.000 0.000
#> GSM1105517     4  0.2527     0.7819 0.000 0.000 0.168 0.832 0.000 0.000
#> GSM1105525     3  0.3706     0.5065 0.000 0.000 0.620 0.380 0.000 0.000
#> GSM1105552     4  0.2491     0.7842 0.000 0.000 0.164 0.836 0.000 0.000
#> GSM1105452     5  0.0000     0.9954 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM1105453     2  0.0146     0.9301 0.000 0.996 0.000 0.000 0.000 0.004
#> GSM1105456     2  0.3860     0.0778 0.000 0.528 0.000 0.000 0.000 0.472

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) other(p) time(p) individual(p) k
#> ATC:mclust 119    0.366   1.0000   0.795        0.0209 2
#> ATC:mclust  84    0.504   0.8157   0.492        0.0479 3
#> ATC:mclust 115    0.305   0.9868   0.247        0.0791 4
#> ATC:mclust 111    0.634   0.1179   0.320        0.0220 5
#> ATC:mclust 117    0.417   0.0344   0.527        0.0372 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 44956 rows and 120 columns.
#>   Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'ATC' method.
#>   Subgroups are detected by 'NMF' method.
#>   Performed in total 1250 partitions by row resampling.
#>   Best k for subgroups seems to be 2.
#> 
#> Following methods can be applied to this 'ConsensusPartition' object:
#>  [1] "cola_report"             "collect_classes"         "collect_plots"          
#>  [4] "collect_stats"           "colnames"                "compare_signatures"     
#>  [7] "consensus_heatmap"       "dimension_reduction"     "functional_enrichment"  
#> [10] "get_anno_col"            "get_anno"                "get_classes"            
#> [13] "get_consensus"           "get_matrix"              "get_membership"         
#> [16] "get_param"               "get_signatures"          "get_stats"              
#> [19] "is_best_k"               "is_stable_k"             "membership_heatmap"     
#> [22] "ncol"                    "nrow"                    "plot_ecdf"              
#> [25] "rownames"                "select_partition_number" "show"                   
#> [28] "suggest_best_k"          "test_to_known_factors"

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

collect_plots(res)

plot of chunk ATC-NMF-collect-plots

The plots are:

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

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

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

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

select_partition_number(res)

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

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

get_stats(res)
#>   k 1-PAC mean_silhouette concordance area_increased  Rand Jaccard
#> 2 2 0.899           0.947       0.977         0.4532 0.546   0.546
#> 3 3 0.727           0.837       0.902         0.4361 0.744   0.549
#> 4 4 0.590           0.567       0.788         0.1068 0.847   0.588
#> 5 5 0.670           0.701       0.827         0.0729 0.818   0.458
#> 6 6 0.661           0.579       0.768         0.0296 0.939   0.760

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
#> GSM1105438     2   0.000     0.9803 0.000 1.000
#> GSM1105486     2   0.000     0.9803 0.000 1.000
#> GSM1105487     1   0.000     0.9667 1.000 0.000
#> GSM1105490     2   0.000     0.9803 0.000 1.000
#> GSM1105491     2   0.000     0.9803 0.000 1.000
#> GSM1105495     2   0.000     0.9803 0.000 1.000
#> GSM1105498     2   0.000     0.9803 0.000 1.000
#> GSM1105499     1   0.000     0.9667 1.000 0.000
#> GSM1105506     2   0.000     0.9803 0.000 1.000
#> GSM1105442     2   0.000     0.9803 0.000 1.000
#> GSM1105511     2   0.000     0.9803 0.000 1.000
#> GSM1105514     2   0.000     0.9803 0.000 1.000
#> GSM1105518     2   0.000     0.9803 0.000 1.000
#> GSM1105522     1   0.000     0.9667 1.000 0.000
#> GSM1105534     1   0.000     0.9667 1.000 0.000
#> GSM1105535     1   0.000     0.9667 1.000 0.000
#> GSM1105538     1   0.000     0.9667 1.000 0.000
#> GSM1105542     2   0.000     0.9803 0.000 1.000
#> GSM1105443     2   0.000     0.9803 0.000 1.000
#> GSM1105551     1   0.000     0.9667 1.000 0.000
#> GSM1105554     1   0.000     0.9667 1.000 0.000
#> GSM1105555     1   0.000     0.9667 1.000 0.000
#> GSM1105447     2   0.000     0.9803 0.000 1.000
#> GSM1105467     2   0.000     0.9803 0.000 1.000
#> GSM1105470     2   0.000     0.9803 0.000 1.000
#> GSM1105471     2   0.000     0.9803 0.000 1.000
#> GSM1105474     2   0.000     0.9803 0.000 1.000
#> GSM1105475     2   0.000     0.9803 0.000 1.000
#> GSM1105440     1   0.000     0.9667 1.000 0.000
#> GSM1105488     2   0.000     0.9803 0.000 1.000
#> GSM1105489     1   0.000     0.9667 1.000 0.000
#> GSM1105492     1   0.000     0.9667 1.000 0.000
#> GSM1105493     1   0.000     0.9667 1.000 0.000
#> GSM1105497     2   0.000     0.9803 0.000 1.000
#> GSM1105500     2   0.000     0.9803 0.000 1.000
#> GSM1105501     2   0.000     0.9803 0.000 1.000
#> GSM1105508     1   0.358     0.9151 0.932 0.068
#> GSM1105444     2   0.000     0.9803 0.000 1.000
#> GSM1105513     2   0.000     0.9803 0.000 1.000
#> GSM1105516     1   0.891     0.5806 0.692 0.308
#> GSM1105520     2   0.000     0.9803 0.000 1.000
#> GSM1105524     1   0.000     0.9667 1.000 0.000
#> GSM1105536     2   0.000     0.9803 0.000 1.000
#> GSM1105537     1   0.000     0.9667 1.000 0.000
#> GSM1105540     2   0.808     0.6637 0.248 0.752
#> GSM1105544     2   0.000     0.9803 0.000 1.000
#> GSM1105445     2   0.000     0.9803 0.000 1.000
#> GSM1105553     2   0.000     0.9803 0.000 1.000
#> GSM1105556     1   0.000     0.9667 1.000 0.000
#> GSM1105557     2   0.000     0.9803 0.000 1.000
#> GSM1105449     2   0.000     0.9803 0.000 1.000
#> GSM1105469     2   0.000     0.9803 0.000 1.000
#> GSM1105472     2   0.000     0.9803 0.000 1.000
#> GSM1105473     1   0.260     0.9348 0.956 0.044
#> GSM1105476     2   0.000     0.9803 0.000 1.000
#> GSM1105477     2   0.000     0.9803 0.000 1.000
#> GSM1105478     2   0.000     0.9803 0.000 1.000
#> GSM1105510     2   0.000     0.9803 0.000 1.000
#> GSM1105530     1   0.000     0.9667 1.000 0.000
#> GSM1105539     1   0.000     0.9667 1.000 0.000
#> GSM1105480     2   0.000     0.9803 0.000 1.000
#> GSM1105512     1   0.000     0.9667 1.000 0.000
#> GSM1105532     1   0.000     0.9667 1.000 0.000
#> GSM1105541     1   0.000     0.9667 1.000 0.000
#> GSM1105439     2   0.000     0.9803 0.000 1.000
#> GSM1105463     1   0.714     0.7740 0.804 0.196
#> GSM1105482     1   0.000     0.9667 1.000 0.000
#> GSM1105483     2   0.000     0.9803 0.000 1.000
#> GSM1105494     2   0.000     0.9803 0.000 1.000
#> GSM1105503     2   0.000     0.9803 0.000 1.000
#> GSM1105507     1   0.494     0.8778 0.892 0.108
#> GSM1105446     2   0.000     0.9803 0.000 1.000
#> GSM1105519     1   0.000     0.9667 1.000 0.000
#> GSM1105526     2   0.000     0.9803 0.000 1.000
#> GSM1105527     2   0.000     0.9803 0.000 1.000
#> GSM1105531     2   0.584     0.8270 0.140 0.860
#> GSM1105543     2   0.000     0.9803 0.000 1.000
#> GSM1105546     1   0.000     0.9667 1.000 0.000
#> GSM1105547     1   0.000     0.9667 1.000 0.000
#> GSM1105455     2   0.000     0.9803 0.000 1.000
#> GSM1105458     2   0.000     0.9803 0.000 1.000
#> GSM1105459     2   0.000     0.9803 0.000 1.000
#> GSM1105462     2   0.000     0.9803 0.000 1.000
#> GSM1105441     2   0.000     0.9803 0.000 1.000
#> GSM1105465     2   0.000     0.9803 0.000 1.000
#> GSM1105484     2   0.000     0.9803 0.000 1.000
#> GSM1105485     2   0.745     0.7238 0.212 0.788
#> GSM1105496     2   0.000     0.9803 0.000 1.000
#> GSM1105505     2   1.000    -0.0116 0.492 0.508
#> GSM1105509     1   0.000     0.9667 1.000 0.000
#> GSM1105448     2   0.000     0.9803 0.000 1.000
#> GSM1105521     1   0.000     0.9667 1.000 0.000
#> GSM1105528     2   0.000     0.9803 0.000 1.000
#> GSM1105529     2   0.000     0.9803 0.000 1.000
#> GSM1105533     1   0.000     0.9667 1.000 0.000
#> GSM1105545     2   0.000     0.9803 0.000 1.000
#> GSM1105548     1   0.000     0.9667 1.000 0.000
#> GSM1105549     1   0.000     0.9667 1.000 0.000
#> GSM1105457     2   0.000     0.9803 0.000 1.000
#> GSM1105460     2   0.000     0.9803 0.000 1.000
#> GSM1105461     2   0.000     0.9803 0.000 1.000
#> GSM1105464     1   0.000     0.9667 1.000 0.000
#> GSM1105466     2   0.000     0.9803 0.000 1.000
#> GSM1105479     2   0.000     0.9803 0.000 1.000
#> GSM1105502     1   0.000     0.9667 1.000 0.000
#> GSM1105515     1   0.000     0.9667 1.000 0.000
#> GSM1105523     2   0.000     0.9803 0.000 1.000
#> GSM1105550     2   0.469     0.8762 0.100 0.900
#> GSM1105450     2   0.000     0.9803 0.000 1.000
#> GSM1105451     2   0.000     0.9803 0.000 1.000
#> GSM1105454     2   0.000     0.9803 0.000 1.000
#> GSM1105468     2   0.000     0.9803 0.000 1.000
#> GSM1105481     2   0.000     0.9803 0.000 1.000
#> GSM1105504     2   0.839     0.6270 0.268 0.732
#> GSM1105517     1   0.788     0.7134 0.764 0.236
#> GSM1105525     1   0.615     0.8304 0.848 0.152
#> GSM1105552     1   0.662     0.8061 0.828 0.172
#> GSM1105452     2   0.000     0.9803 0.000 1.000
#> GSM1105453     2   0.000     0.9803 0.000 1.000
#> GSM1105456     2   0.000     0.9803 0.000 1.000

show/hide code output

cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#>            class entropy silhouette    p1    p2    p3
#> GSM1105438     2  0.0892      0.799 0.000 0.980 0.020
#> GSM1105486     2  0.5733      0.744 0.000 0.676 0.324
#> GSM1105487     1  0.0000      0.947 1.000 0.000 0.000
#> GSM1105490     3  0.2711      0.867 0.000 0.088 0.912
#> GSM1105491     2  0.0000      0.794 0.000 1.000 0.000
#> GSM1105495     2  0.0237      0.795 0.000 0.996 0.004
#> GSM1105498     3  0.0000      0.918 0.000 0.000 1.000
#> GSM1105499     1  0.0000      0.947 1.000 0.000 0.000
#> GSM1105506     3  0.0000      0.918 0.000 0.000 1.000
#> GSM1105442     2  0.0000      0.794 0.000 1.000 0.000
#> GSM1105511     3  0.0424      0.919 0.000 0.008 0.992
#> GSM1105514     2  0.2356      0.808 0.000 0.928 0.072
#> GSM1105518     3  0.1289      0.912 0.000 0.032 0.968
#> GSM1105522     1  0.0424      0.943 0.992 0.000 0.008
#> GSM1105534     1  0.0000      0.947 1.000 0.000 0.000
#> GSM1105535     1  0.0000      0.947 1.000 0.000 0.000
#> GSM1105538     1  0.0000      0.947 1.000 0.000 0.000
#> GSM1105542     2  0.0000      0.794 0.000 1.000 0.000
#> GSM1105443     3  0.1163      0.914 0.000 0.028 0.972
#> GSM1105551     1  0.0000      0.947 1.000 0.000 0.000
#> GSM1105554     1  0.0000      0.947 1.000 0.000 0.000
#> GSM1105555     1  0.0000      0.947 1.000 0.000 0.000
#> GSM1105447     2  0.6026      0.664 0.000 0.624 0.376
#> GSM1105467     2  0.5678      0.754 0.000 0.684 0.316
#> GSM1105470     2  0.5905      0.704 0.000 0.648 0.352
#> GSM1105471     3  0.1529      0.908 0.000 0.040 0.960
#> GSM1105474     2  0.5397      0.789 0.000 0.720 0.280
#> GSM1105475     3  0.6244     -0.150 0.000 0.440 0.560
#> GSM1105440     1  0.0000      0.947 1.000 0.000 0.000
#> GSM1105488     2  0.0000      0.794 0.000 1.000 0.000
#> GSM1105489     1  0.0000      0.947 1.000 0.000 0.000
#> GSM1105492     1  0.0000      0.947 1.000 0.000 0.000
#> GSM1105493     1  0.0747      0.939 0.984 0.016 0.000
#> GSM1105497     2  0.0000      0.794 0.000 1.000 0.000
#> GSM1105500     2  0.4397      0.804 0.028 0.856 0.116
#> GSM1105501     3  0.4605      0.676 0.000 0.204 0.796
#> GSM1105508     1  0.6280      0.234 0.540 0.000 0.460
#> GSM1105444     2  0.4346      0.814 0.000 0.816 0.184
#> GSM1105513     3  0.2066      0.894 0.000 0.060 0.940
#> GSM1105516     1  0.4172      0.797 0.840 0.156 0.004
#> GSM1105520     3  0.0424      0.919 0.000 0.008 0.992
#> GSM1105524     1  0.0000      0.947 1.000 0.000 0.000
#> GSM1105536     2  0.5254      0.798 0.000 0.736 0.264
#> GSM1105537     1  0.0000      0.947 1.000 0.000 0.000
#> GSM1105540     3  0.5461      0.634 0.244 0.008 0.748
#> GSM1105544     2  0.9125      0.559 0.192 0.540 0.268
#> GSM1105445     3  0.0000      0.918 0.000 0.000 1.000
#> GSM1105553     2  0.4842      0.810 0.000 0.776 0.224
#> GSM1105556     1  0.0000      0.947 1.000 0.000 0.000
#> GSM1105557     3  0.0237      0.919 0.000 0.004 0.996
#> GSM1105449     2  0.5465      0.783 0.000 0.712 0.288
#> GSM1105469     3  0.0237      0.916 0.004 0.000 0.996
#> GSM1105472     2  0.5098      0.804 0.000 0.752 0.248
#> GSM1105473     1  0.2796      0.886 0.908 0.092 0.000
#> GSM1105476     2  0.5397      0.789 0.000 0.720 0.280
#> GSM1105477     2  0.4750      0.812 0.000 0.784 0.216
#> GSM1105478     3  0.0000      0.918 0.000 0.000 1.000
#> GSM1105510     2  0.0000      0.794 0.000 1.000 0.000
#> GSM1105530     1  0.1163      0.931 0.972 0.000 0.028
#> GSM1105539     1  0.0000      0.947 1.000 0.000 0.000
#> GSM1105480     3  0.0237      0.919 0.000 0.004 0.996
#> GSM1105512     1  0.0000      0.947 1.000 0.000 0.000
#> GSM1105532     1  0.4931      0.714 0.768 0.000 0.232
#> GSM1105541     1  0.0000      0.947 1.000 0.000 0.000
#> GSM1105439     3  0.3551      0.807 0.000 0.132 0.868
#> GSM1105463     1  0.0747      0.937 0.984 0.000 0.016
#> GSM1105482     1  0.0000      0.947 1.000 0.000 0.000
#> GSM1105483     3  0.0000      0.918 0.000 0.000 1.000
#> GSM1105494     3  0.2165      0.891 0.000 0.064 0.936
#> GSM1105503     3  0.0000      0.918 0.000 0.000 1.000
#> GSM1105507     1  0.0000      0.947 1.000 0.000 0.000
#> GSM1105446     2  0.0000      0.794 0.000 1.000 0.000
#> GSM1105519     1  0.0000      0.947 1.000 0.000 0.000
#> GSM1105526     2  0.5216      0.800 0.000 0.740 0.260
#> GSM1105527     3  0.0000      0.918 0.000 0.000 1.000
#> GSM1105531     1  0.8505      0.414 0.600 0.144 0.256
#> GSM1105543     2  0.0424      0.796 0.000 0.992 0.008
#> GSM1105546     1  0.0000      0.947 1.000 0.000 0.000
#> GSM1105547     1  0.0237      0.945 0.996 0.004 0.000
#> GSM1105455     3  0.2625      0.872 0.000 0.084 0.916
#> GSM1105458     2  0.5706      0.749 0.000 0.680 0.320
#> GSM1105459     2  0.5178      0.802 0.000 0.744 0.256
#> GSM1105462     3  0.0892      0.917 0.000 0.020 0.980
#> GSM1105441     2  0.5560      0.771 0.000 0.700 0.300
#> GSM1105465     2  0.0000      0.794 0.000 1.000 0.000
#> GSM1105484     2  0.0000      0.794 0.000 1.000 0.000
#> GSM1105485     2  0.0000      0.794 0.000 1.000 0.000
#> GSM1105496     2  0.2774      0.807 0.008 0.920 0.072
#> GSM1105505     1  0.6283      0.696 0.760 0.176 0.064
#> GSM1105509     1  0.0000      0.947 1.000 0.000 0.000
#> GSM1105448     2  0.4605      0.813 0.000 0.796 0.204
#> GSM1105521     1  0.0000      0.947 1.000 0.000 0.000
#> GSM1105528     2  0.0000      0.794 0.000 1.000 0.000
#> GSM1105529     2  0.0000      0.794 0.000 1.000 0.000
#> GSM1105533     1  0.0000      0.947 1.000 0.000 0.000
#> GSM1105545     3  0.1163      0.914 0.000 0.028 0.972
#> GSM1105548     1  0.0592      0.941 0.988 0.012 0.000
#> GSM1105549     1  0.2878      0.882 0.904 0.096 0.000
#> GSM1105457     3  0.0000      0.918 0.000 0.000 1.000
#> GSM1105460     3  0.2625      0.872 0.000 0.084 0.916
#> GSM1105461     2  0.5291      0.796 0.000 0.732 0.268
#> GSM1105464     1  0.1289      0.929 0.968 0.000 0.032
#> GSM1105466     3  0.0000      0.918 0.000 0.000 1.000
#> GSM1105479     3  0.0892      0.917 0.000 0.020 0.980
#> GSM1105502     1  0.0000      0.947 1.000 0.000 0.000
#> GSM1105515     1  0.0000      0.947 1.000 0.000 0.000
#> GSM1105523     3  0.0237      0.916 0.004 0.000 0.996
#> GSM1105550     3  0.0424      0.913 0.008 0.000 0.992
#> GSM1105450     2  0.5465      0.783 0.000 0.712 0.288
#> GSM1105451     2  0.5431      0.786 0.000 0.716 0.284
#> GSM1105454     2  0.6062      0.648 0.000 0.616 0.384
#> GSM1105468     2  0.5465      0.783 0.000 0.712 0.288
#> GSM1105481     2  0.5905      0.706 0.000 0.648 0.352
#> GSM1105504     1  0.7412      0.611 0.700 0.124 0.176
#> GSM1105517     1  0.2625      0.880 0.916 0.000 0.084
#> GSM1105525     3  0.4842      0.622 0.224 0.000 0.776
#> GSM1105552     1  0.0424      0.943 0.992 0.008 0.000
#> GSM1105452     2  0.0000      0.794 0.000 1.000 0.000
#> GSM1105453     2  0.5098      0.804 0.000 0.752 0.248
#> GSM1105456     3  0.3038      0.848 0.000 0.104 0.896

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>            class entropy silhouette    p1    p2    p3    p4
#> GSM1105438     2  0.2197     0.6641 0.000 0.916 0.080 0.004
#> GSM1105486     2  0.7551     0.2825 0.000 0.448 0.196 0.356
#> GSM1105487     1  0.0672     0.8902 0.984 0.000 0.008 0.008
#> GSM1105490     4  0.1022     0.6520 0.000 0.000 0.032 0.968
#> GSM1105491     2  0.0188     0.6658 0.000 0.996 0.000 0.004
#> GSM1105495     2  0.1398     0.6704 0.000 0.956 0.040 0.004
#> GSM1105498     4  0.0000     0.6433 0.000 0.000 0.000 1.000
#> GSM1105499     1  0.1389     0.8763 0.952 0.000 0.048 0.000
#> GSM1105506     3  0.3610     0.5223 0.000 0.000 0.800 0.200
#> GSM1105442     2  0.0188     0.6658 0.000 0.996 0.000 0.004
#> GSM1105511     4  0.5408     0.1355 0.000 0.012 0.488 0.500
#> GSM1105514     2  0.4784     0.6383 0.000 0.788 0.100 0.112
#> GSM1105518     4  0.4122     0.6132 0.000 0.004 0.236 0.760
#> GSM1105522     1  0.1833     0.8795 0.944 0.000 0.032 0.024
#> GSM1105534     1  0.0000     0.8906 1.000 0.000 0.000 0.000
#> GSM1105535     1  0.0000     0.8906 1.000 0.000 0.000 0.000
#> GSM1105538     1  0.0592     0.8899 0.984 0.000 0.016 0.000
#> GSM1105542     2  0.1256     0.6523 0.000 0.964 0.008 0.028
#> GSM1105443     4  0.4957     0.5288 0.000 0.012 0.320 0.668
#> GSM1105551     1  0.3695     0.7892 0.828 0.000 0.016 0.156
#> GSM1105554     1  0.0188     0.8903 0.996 0.000 0.004 0.000
#> GSM1105555     1  0.2060     0.8691 0.932 0.000 0.016 0.052
#> GSM1105447     4  0.2500     0.6673 0.000 0.040 0.044 0.916
#> GSM1105467     2  0.7645     0.3667 0.000 0.468 0.264 0.268
#> GSM1105470     3  0.7923    -0.2940 0.000 0.324 0.340 0.336
#> GSM1105471     3  0.4418     0.4897 0.000 0.032 0.784 0.184
#> GSM1105474     2  0.7184     0.3586 0.000 0.492 0.144 0.364
#> GSM1105475     4  0.6869     0.4836 0.000 0.180 0.224 0.596
#> GSM1105440     1  0.2987     0.8346 0.880 0.000 0.016 0.104
#> GSM1105488     2  0.0672     0.6607 0.000 0.984 0.008 0.008
#> GSM1105489     1  0.0592     0.8899 0.984 0.000 0.016 0.000
#> GSM1105492     1  0.0592     0.8899 0.984 0.000 0.016 0.000
#> GSM1105493     1  0.0469     0.8902 0.988 0.000 0.012 0.000
#> GSM1105497     2  0.3108     0.6396 0.000 0.872 0.016 0.112
#> GSM1105500     4  0.3959     0.5756 0.076 0.052 0.016 0.856
#> GSM1105501     3  0.7184    -0.2298 0.000 0.136 0.448 0.416
#> GSM1105508     1  0.3323     0.8334 0.876 0.000 0.064 0.060
#> GSM1105444     2  0.6572     0.5339 0.000 0.608 0.120 0.272
#> GSM1105513     4  0.3401     0.6525 0.000 0.008 0.152 0.840
#> GSM1105516     1  0.2706     0.8457 0.900 0.080 0.020 0.000
#> GSM1105520     3  0.4872     0.1715 0.000 0.004 0.640 0.356
#> GSM1105524     1  0.0188     0.8903 0.996 0.000 0.004 0.000
#> GSM1105536     2  0.6773     0.5085 0.000 0.584 0.132 0.284
#> GSM1105537     1  0.0188     0.8903 0.996 0.000 0.004 0.000
#> GSM1105540     4  0.4018     0.3454 0.224 0.000 0.004 0.772
#> GSM1105544     4  0.2513     0.6115 0.036 0.024 0.016 0.924
#> GSM1105445     4  0.3528     0.6437 0.000 0.000 0.192 0.808
#> GSM1105553     4  0.1843     0.6298 0.008 0.028 0.016 0.948
#> GSM1105556     1  0.0000     0.8906 1.000 0.000 0.000 0.000
#> GSM1105557     4  0.2216     0.6609 0.000 0.000 0.092 0.908
#> GSM1105449     4  0.7184    -0.1589 0.000 0.416 0.136 0.448
#> GSM1105469     3  0.3074     0.5663 0.000 0.000 0.848 0.152
#> GSM1105472     2  0.6673     0.5386 0.000 0.608 0.140 0.252
#> GSM1105473     1  0.5793     0.5056 0.600 0.360 0.040 0.000
#> GSM1105476     2  0.7102     0.4612 0.000 0.540 0.156 0.304
#> GSM1105477     4  0.6343     0.0217 0.036 0.392 0.016 0.556
#> GSM1105478     4  0.4585     0.4685 0.000 0.000 0.332 0.668
#> GSM1105510     2  0.0376     0.6669 0.000 0.992 0.004 0.004
#> GSM1105530     1  0.4843     0.4667 0.604 0.000 0.396 0.000
#> GSM1105539     1  0.4164     0.6852 0.736 0.000 0.264 0.000
#> GSM1105480     4  0.1867     0.6632 0.000 0.000 0.072 0.928
#> GSM1105512     1  0.2760     0.8289 0.872 0.000 0.128 0.000
#> GSM1105532     3  0.5000    -0.2500 0.496 0.000 0.504 0.000
#> GSM1105541     1  0.4382     0.6437 0.704 0.000 0.296 0.000
#> GSM1105439     4  0.6482     0.4221 0.000 0.084 0.352 0.564
#> GSM1105463     1  0.1474     0.8755 0.948 0.000 0.052 0.000
#> GSM1105482     1  0.0592     0.8899 0.984 0.000 0.016 0.000
#> GSM1105483     3  0.1576     0.5971 0.004 0.000 0.948 0.048
#> GSM1105494     4  0.0336     0.6448 0.000 0.000 0.008 0.992
#> GSM1105503     4  0.1940     0.6524 0.000 0.000 0.076 0.924
#> GSM1105507     1  0.2021     0.8690 0.932 0.000 0.012 0.056
#> GSM1105446     2  0.5337     0.3905 0.000 0.564 0.012 0.424
#> GSM1105519     1  0.0000     0.8906 1.000 0.000 0.000 0.000
#> GSM1105526     2  0.4253     0.6156 0.000 0.776 0.208 0.016
#> GSM1105527     3  0.3311     0.5513 0.000 0.000 0.828 0.172
#> GSM1105531     3  0.5644     0.4686 0.220 0.068 0.708 0.004
#> GSM1105543     2  0.5174     0.4659 0.000 0.620 0.012 0.368
#> GSM1105546     1  0.0592     0.8899 0.984 0.000 0.016 0.000
#> GSM1105547     1  0.0779     0.8892 0.980 0.004 0.016 0.000
#> GSM1105455     4  0.4706     0.6219 0.000 0.028 0.224 0.748
#> GSM1105458     4  0.7448    -0.1571 0.000 0.400 0.172 0.428
#> GSM1105459     2  0.6814     0.5150 0.000 0.584 0.140 0.276
#> GSM1105462     3  0.1394     0.5983 0.016 0.008 0.964 0.012
#> GSM1105441     4  0.7221    -0.2092 0.000 0.428 0.140 0.432
#> GSM1105465     2  0.0657     0.6606 0.000 0.984 0.004 0.012
#> GSM1105484     2  0.1109     0.6703 0.000 0.968 0.028 0.004
#> GSM1105485     2  0.0000     0.6638 0.000 1.000 0.000 0.000
#> GSM1105496     4  0.2967     0.5983 0.052 0.028 0.016 0.904
#> GSM1105505     1  0.4941     0.6933 0.760 0.044 0.004 0.192
#> GSM1105509     1  0.1867     0.8655 0.928 0.000 0.072 0.000
#> GSM1105448     2  0.6711     0.4910 0.000 0.576 0.116 0.308
#> GSM1105521     1  0.3754     0.8266 0.852 0.064 0.084 0.000
#> GSM1105528     2  0.1118     0.6671 0.000 0.964 0.036 0.000
#> GSM1105529     2  0.0188     0.6658 0.000 0.996 0.000 0.004
#> GSM1105533     1  0.0000     0.8906 1.000 0.000 0.000 0.000
#> GSM1105545     3  0.1624     0.5952 0.000 0.028 0.952 0.020
#> GSM1105548     1  0.4155     0.8006 0.836 0.032 0.016 0.116
#> GSM1105549     1  0.4220     0.6937 0.748 0.248 0.004 0.000
#> GSM1105457     4  0.4356     0.5475 0.000 0.000 0.292 0.708
#> GSM1105460     3  0.3312     0.5689 0.000 0.052 0.876 0.072
#> GSM1105461     2  0.7072     0.4191 0.000 0.524 0.140 0.336
#> GSM1105464     3  0.4994    -0.2260 0.480 0.000 0.520 0.000
#> GSM1105466     3  0.4925     0.0278 0.000 0.000 0.572 0.428
#> GSM1105479     3  0.5409    -0.2550 0.000 0.012 0.496 0.492
#> GSM1105502     1  0.0000     0.8906 1.000 0.000 0.000 0.000
#> GSM1105515     1  0.0188     0.8907 0.996 0.000 0.004 0.000
#> GSM1105523     3  0.2255     0.5919 0.012 0.000 0.920 0.068
#> GSM1105550     3  0.1975     0.5910 0.048 0.000 0.936 0.016
#> GSM1105450     2  0.7412     0.2502 0.000 0.444 0.168 0.388
#> GSM1105451     4  0.7115    -0.1594 0.000 0.420 0.128 0.452
#> GSM1105454     4  0.4469     0.6517 0.000 0.080 0.112 0.808
#> GSM1105468     2  0.7344     0.2903 0.000 0.460 0.160 0.380
#> GSM1105481     3  0.4844     0.2665 0.000 0.300 0.688 0.012
#> GSM1105504     1  0.6052     0.6397 0.700 0.024 0.216 0.060
#> GSM1105517     1  0.5132     0.3498 0.548 0.004 0.448 0.000
#> GSM1105525     3  0.7322     0.3777 0.224 0.000 0.532 0.244
#> GSM1105552     1  0.1059     0.8872 0.972 0.012 0.016 0.000
#> GSM1105452     2  0.1109     0.6626 0.000 0.968 0.004 0.028
#> GSM1105453     2  0.6949     0.2846 0.000 0.480 0.112 0.408
#> GSM1105456     4  0.3978     0.6447 0.000 0.012 0.192 0.796

show/hide code output

cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#>            class entropy silhouette    p1    p2    p3    p4    p5
#> GSM1105438     2  0.3768     0.7560 0.000 0.808 0.016 0.020 0.156
#> GSM1105486     2  0.4484     0.7441 0.000 0.764 0.176 0.032 0.028
#> GSM1105487     1  0.0324     0.8909 0.992 0.000 0.000 0.004 0.004
#> GSM1105490     2  0.4288     0.5759 0.000 0.664 0.012 0.324 0.000
#> GSM1105491     5  0.2806     0.8168 0.000 0.152 0.000 0.004 0.844
#> GSM1105495     5  0.3427     0.7616 0.000 0.192 0.000 0.012 0.796
#> GSM1105498     4  0.2657     0.7201 0.000 0.024 0.024 0.900 0.052
#> GSM1105499     1  0.1121     0.8784 0.956 0.000 0.044 0.000 0.000
#> GSM1105506     3  0.3983     0.6148 0.000 0.164 0.784 0.052 0.000
#> GSM1105442     5  0.2389     0.8395 0.000 0.116 0.000 0.004 0.880
#> GSM1105511     3  0.5142     0.5369 0.000 0.088 0.668 0.244 0.000
#> GSM1105514     2  0.3201     0.7771 0.000 0.844 0.008 0.016 0.132
#> GSM1105518     2  0.3622     0.7744 0.000 0.820 0.056 0.124 0.000
#> GSM1105522     1  0.6179     0.3691 0.576 0.000 0.132 0.280 0.012
#> GSM1105534     1  0.0162     0.8916 0.996 0.000 0.000 0.000 0.004
#> GSM1105535     1  0.0000     0.8915 1.000 0.000 0.000 0.000 0.000
#> GSM1105538     1  0.0609     0.8905 0.980 0.000 0.000 0.000 0.020
#> GSM1105542     5  0.1818     0.8557 0.000 0.044 0.000 0.024 0.932
#> GSM1105443     2  0.2278     0.8088 0.000 0.908 0.032 0.060 0.000
#> GSM1105551     1  0.4387     0.4528 0.640 0.000 0.000 0.348 0.012
#> GSM1105554     1  0.0324     0.8922 0.992 0.000 0.004 0.000 0.004
#> GSM1105555     1  0.0671     0.8888 0.980 0.000 0.000 0.016 0.004
#> GSM1105447     2  0.2513     0.7975 0.000 0.876 0.008 0.116 0.000
#> GSM1105467     2  0.6460     0.5029 0.000 0.576 0.288 0.056 0.080
#> GSM1105470     2  0.3770     0.7838 0.000 0.824 0.124 0.032 0.020
#> GSM1105471     3  0.5070     0.4741 0.000 0.272 0.668 0.052 0.008
#> GSM1105474     2  0.4121     0.7799 0.000 0.812 0.052 0.028 0.108
#> GSM1105475     2  0.4645     0.7308 0.000 0.736 0.056 0.200 0.008
#> GSM1105440     1  0.0955     0.8832 0.968 0.000 0.000 0.028 0.004
#> GSM1105488     5  0.2260     0.8580 0.000 0.064 0.000 0.028 0.908
#> GSM1105489     1  0.0451     0.8898 0.988 0.000 0.000 0.008 0.004
#> GSM1105492     1  0.0671     0.8906 0.980 0.000 0.000 0.004 0.016
#> GSM1105493     1  0.0566     0.8918 0.984 0.000 0.000 0.004 0.012
#> GSM1105497     5  0.3578     0.7874 0.000 0.048 0.000 0.132 0.820
#> GSM1105500     4  0.3466     0.7194 0.028 0.040 0.000 0.856 0.076
#> GSM1105501     2  0.4297     0.7132 0.000 0.728 0.236 0.036 0.000
#> GSM1105508     1  0.5341     0.4963 0.620 0.000 0.300 0.080 0.000
#> GSM1105444     2  0.2162     0.8069 0.000 0.916 0.008 0.012 0.064
#> GSM1105513     2  0.4908     0.5375 0.000 0.608 0.036 0.356 0.000
#> GSM1105516     1  0.3496     0.7334 0.788 0.012 0.000 0.000 0.200
#> GSM1105520     3  0.3099     0.6464 0.000 0.124 0.848 0.028 0.000
#> GSM1105524     1  0.0162     0.8918 0.996 0.000 0.004 0.000 0.000
#> GSM1105536     2  0.5007     0.6643 0.000 0.704 0.036 0.028 0.232
#> GSM1105537     1  0.0000     0.8915 1.000 0.000 0.000 0.000 0.000
#> GSM1105540     4  0.3572     0.7102 0.024 0.016 0.028 0.860 0.072
#> GSM1105544     4  0.3274     0.7229 0.048 0.020 0.004 0.872 0.056
#> GSM1105445     2  0.3366     0.7802 0.000 0.828 0.032 0.140 0.000
#> GSM1105553     4  0.2844     0.7184 0.012 0.088 0.000 0.880 0.020
#> GSM1105556     1  0.0162     0.8916 0.996 0.000 0.000 0.000 0.004
#> GSM1105557     2  0.4524     0.5617 0.000 0.644 0.020 0.336 0.000
#> GSM1105449     2  0.0771     0.8188 0.000 0.976 0.000 0.004 0.020
#> GSM1105469     3  0.4162     0.6069 0.000 0.056 0.768 0.176 0.000
#> GSM1105472     2  0.3135     0.8009 0.000 0.868 0.024 0.020 0.088
#> GSM1105473     5  0.2388     0.7798 0.072 0.000 0.028 0.000 0.900
#> GSM1105476     2  0.6500     0.1225 0.000 0.452 0.076 0.040 0.432
#> GSM1105477     4  0.6467     0.1983 0.036 0.376 0.000 0.504 0.084
#> GSM1105478     4  0.5777    -0.1641 0.000 0.088 0.444 0.468 0.000
#> GSM1105510     5  0.2701     0.8527 0.000 0.092 0.012 0.012 0.884
#> GSM1105530     3  0.3949     0.4611 0.300 0.000 0.696 0.004 0.000
#> GSM1105539     1  0.2445     0.8407 0.884 0.004 0.108 0.004 0.000
#> GSM1105480     4  0.2592     0.6887 0.000 0.056 0.052 0.892 0.000
#> GSM1105512     1  0.1892     0.8590 0.916 0.000 0.080 0.004 0.000
#> GSM1105532     3  0.3635     0.5259 0.248 0.000 0.748 0.004 0.000
#> GSM1105541     1  0.3400     0.7808 0.808 0.004 0.180 0.004 0.004
#> GSM1105439     2  0.1668     0.8161 0.000 0.940 0.032 0.028 0.000
#> GSM1105463     1  0.5584     0.4984 0.592 0.000 0.312 0.000 0.096
#> GSM1105482     1  0.0609     0.8905 0.980 0.000 0.000 0.000 0.020
#> GSM1105483     3  0.2592     0.6612 0.000 0.056 0.892 0.052 0.000
#> GSM1105494     4  0.2217     0.7134 0.000 0.044 0.024 0.920 0.012
#> GSM1105503     4  0.3410     0.6534 0.000 0.068 0.092 0.840 0.000
#> GSM1105507     4  0.4734     0.4316 0.344 0.000 0.008 0.632 0.016
#> GSM1105446     2  0.2376     0.8001 0.000 0.904 0.000 0.044 0.052
#> GSM1105519     1  0.0451     0.8919 0.988 0.000 0.000 0.004 0.008
#> GSM1105526     5  0.5799     0.4121 0.000 0.056 0.300 0.032 0.612
#> GSM1105527     3  0.4035     0.6215 0.000 0.060 0.784 0.156 0.000
#> GSM1105531     3  0.3783     0.5881 0.012 0.020 0.812 0.004 0.152
#> GSM1105543     2  0.5199     0.4886 0.000 0.636 0.000 0.072 0.292
#> GSM1105546     1  0.0162     0.8912 0.996 0.000 0.000 0.004 0.000
#> GSM1105547     1  0.0510     0.8907 0.984 0.000 0.000 0.000 0.016
#> GSM1105455     2  0.2390     0.8027 0.000 0.896 0.020 0.084 0.000
#> GSM1105458     2  0.1095     0.8205 0.000 0.968 0.012 0.008 0.012
#> GSM1105459     2  0.2151     0.8155 0.000 0.924 0.020 0.016 0.040
#> GSM1105462     3  0.3108     0.6611 0.004 0.048 0.880 0.052 0.016
#> GSM1105441     2  0.0510     0.8187 0.000 0.984 0.000 0.000 0.016
#> GSM1105465     5  0.1493     0.8510 0.000 0.024 0.000 0.028 0.948
#> GSM1105484     5  0.3333     0.7952 0.000 0.164 0.008 0.008 0.820
#> GSM1105485     5  0.1278     0.8503 0.000 0.020 0.016 0.004 0.960
#> GSM1105496     4  0.3134     0.7139 0.012 0.096 0.000 0.864 0.028
#> GSM1105505     4  0.5988     0.2019 0.400 0.020 0.012 0.528 0.040
#> GSM1105509     1  0.3010     0.7898 0.824 0.000 0.172 0.004 0.000
#> GSM1105448     2  0.1484     0.8118 0.000 0.944 0.000 0.008 0.048
#> GSM1105521     1  0.1872     0.8743 0.928 0.000 0.052 0.000 0.020
#> GSM1105528     5  0.2270     0.8537 0.000 0.072 0.016 0.004 0.908
#> GSM1105529     5  0.1568     0.8457 0.000 0.020 0.000 0.036 0.944
#> GSM1105533     1  0.0000     0.8915 1.000 0.000 0.000 0.000 0.000
#> GSM1105545     3  0.3558     0.6379 0.000 0.136 0.824 0.036 0.004
#> GSM1105548     1  0.4394     0.6372 0.732 0.000 0.000 0.220 0.048
#> GSM1105549     1  0.3231     0.7513 0.800 0.000 0.000 0.004 0.196
#> GSM1105457     2  0.4262     0.7535 0.000 0.776 0.100 0.124 0.000
#> GSM1105460     2  0.3880     0.7488 0.000 0.772 0.204 0.020 0.004
#> GSM1105461     2  0.1124     0.8152 0.000 0.960 0.000 0.004 0.036
#> GSM1105464     3  0.4089     0.5132 0.236 0.004 0.744 0.004 0.012
#> GSM1105466     2  0.5876     0.3071 0.000 0.512 0.384 0.104 0.000
#> GSM1105479     2  0.4803     0.6932 0.000 0.712 0.220 0.064 0.004
#> GSM1105502     1  0.0912     0.8901 0.972 0.000 0.012 0.000 0.016
#> GSM1105515     1  0.0510     0.8907 0.984 0.000 0.000 0.000 0.016
#> GSM1105523     3  0.2193     0.6561 0.000 0.028 0.912 0.060 0.000
#> GSM1105550     3  0.7146     0.0459 0.208 0.364 0.404 0.024 0.000
#> GSM1105450     2  0.2026     0.8178 0.000 0.928 0.044 0.012 0.016
#> GSM1105451     2  0.0771     0.8188 0.000 0.976 0.000 0.004 0.020
#> GSM1105454     2  0.2304     0.8040 0.000 0.892 0.008 0.100 0.000
#> GSM1105468     2  0.2269     0.8173 0.000 0.920 0.028 0.020 0.032
#> GSM1105481     3  0.5637    -0.0619 0.000 0.444 0.500 0.028 0.028
#> GSM1105504     1  0.5313     0.6324 0.668 0.020 0.272 0.012 0.028
#> GSM1105517     3  0.4432     0.4490 0.312 0.004 0.672 0.008 0.004
#> GSM1105525     3  0.5123     0.4922 0.032 0.024 0.668 0.276 0.000
#> GSM1105552     5  0.5987     0.3741 0.272 0.000 0.000 0.156 0.572
#> GSM1105452     5  0.2074     0.8518 0.000 0.036 0.000 0.044 0.920
#> GSM1105453     2  0.1205     0.8141 0.000 0.956 0.000 0.004 0.040
#> GSM1105456     2  0.1740     0.8138 0.000 0.932 0.012 0.056 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
#> GSM1105438     2  0.2863    0.78410 0.000 0.864 0.012 0.000 0.088 0.036
#> GSM1105486     2  0.3447    0.78869 0.000 0.836 0.088 0.052 0.004 0.020
#> GSM1105487     1  0.0260    0.88453 0.992 0.000 0.000 0.000 0.000 0.008
#> GSM1105490     2  0.5284    0.50522 0.000 0.604 0.004 0.256 0.000 0.136
#> GSM1105491     5  0.3118    0.74805 0.000 0.072 0.000 0.000 0.836 0.092
#> GSM1105495     5  0.5080    0.52510 0.000 0.256 0.040 0.000 0.652 0.052
#> GSM1105498     4  0.3340    0.00599 0.000 0.000 0.004 0.784 0.016 0.196
#> GSM1105499     1  0.0508    0.88269 0.984 0.000 0.012 0.000 0.000 0.004
#> GSM1105506     3  0.6514    0.09104 0.000 0.316 0.436 0.216 0.000 0.032
#> GSM1105442     5  0.2070    0.77235 0.000 0.044 0.000 0.000 0.908 0.048
#> GSM1105511     4  0.6345    0.33616 0.000 0.140 0.240 0.548 0.000 0.072
#> GSM1105514     2  0.2345    0.80273 0.000 0.900 0.004 0.004 0.056 0.036
#> GSM1105518     2  0.5861    0.55861 0.000 0.608 0.052 0.132 0.000 0.208
#> GSM1105522     4  0.5611    0.25547 0.272 0.000 0.124 0.584 0.000 0.020
#> GSM1105534     1  0.0260    0.88441 0.992 0.000 0.000 0.000 0.000 0.008
#> GSM1105535     1  0.0000    0.88427 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM1105538     1  0.0547    0.88371 0.980 0.000 0.000 0.000 0.000 0.020
#> GSM1105542     5  0.2575    0.76230 0.000 0.004 0.000 0.024 0.872 0.100
#> GSM1105443     2  0.1426    0.81721 0.000 0.948 0.016 0.028 0.000 0.008
#> GSM1105551     1  0.3767    0.70515 0.780 0.000 0.000 0.132 0.000 0.088
#> GSM1105554     1  0.0000    0.88427 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM1105555     1  0.0865    0.87772 0.964 0.000 0.000 0.000 0.000 0.036
#> GSM1105447     2  0.2798    0.77843 0.000 0.852 0.000 0.036 0.000 0.112
#> GSM1105467     2  0.4770    0.74160 0.000 0.756 0.108 0.076 0.040 0.020
#> GSM1105470     2  0.2262    0.80626 0.000 0.896 0.080 0.016 0.000 0.008
#> GSM1105471     2  0.5692    0.49107 0.000 0.604 0.264 0.096 0.008 0.028
#> GSM1105474     2  0.3440    0.80361 0.000 0.852 0.048 0.048 0.032 0.020
#> GSM1105475     2  0.2588    0.80617 0.000 0.876 0.024 0.092 0.000 0.008
#> GSM1105440     1  0.0972    0.87816 0.964 0.000 0.000 0.008 0.000 0.028
#> GSM1105488     5  0.1429    0.76934 0.000 0.004 0.000 0.004 0.940 0.052
#> GSM1105489     1  0.0713    0.88187 0.972 0.000 0.000 0.000 0.000 0.028
#> GSM1105492     1  0.0405    0.88515 0.988 0.000 0.000 0.004 0.000 0.008
#> GSM1105493     1  0.1010    0.87797 0.960 0.000 0.000 0.000 0.004 0.036
#> GSM1105497     5  0.3978    0.64598 0.000 0.000 0.000 0.084 0.756 0.160
#> GSM1105500     4  0.4591   -0.53702 0.000 0.000 0.000 0.500 0.036 0.464
#> GSM1105501     2  0.6297    0.34197 0.000 0.524 0.272 0.156 0.000 0.048
#> GSM1105508     4  0.7226    0.06774 0.300 0.000 0.304 0.312 0.000 0.084
#> GSM1105444     2  0.1053    0.81244 0.000 0.964 0.004 0.000 0.012 0.020
#> GSM1105513     2  0.4559    0.57086 0.000 0.628 0.004 0.324 0.000 0.044
#> GSM1105516     1  0.6291    0.23452 0.496 0.000 0.052 0.008 0.352 0.092
#> GSM1105520     3  0.4606    0.26728 0.000 0.092 0.692 0.212 0.004 0.000
#> GSM1105524     1  0.0000    0.88427 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM1105536     2  0.7252    0.26022 0.000 0.492 0.124 0.024 0.232 0.128
#> GSM1105537     1  0.0000    0.88427 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM1105540     4  0.3898    0.06714 0.000 0.000 0.012 0.780 0.060 0.148
#> GSM1105544     6  0.5411    0.43049 0.000 0.000 0.008 0.432 0.088 0.472
#> GSM1105445     2  0.2459    0.81138 0.000 0.896 0.020 0.052 0.000 0.032
#> GSM1105553     6  0.4734    0.67557 0.000 0.028 0.000 0.372 0.016 0.584
#> GSM1105556     1  0.0000    0.88427 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM1105557     2  0.5137    0.51772 0.000 0.604 0.004 0.288 0.000 0.104
#> GSM1105449     2  0.0458    0.81417 0.000 0.984 0.000 0.000 0.000 0.016
#> GSM1105469     4  0.4812    0.30840 0.000 0.028 0.372 0.580 0.000 0.020
#> GSM1105472     2  0.2077    0.81192 0.000 0.916 0.056 0.008 0.012 0.008
#> GSM1105473     5  0.3740    0.73276 0.024 0.000 0.060 0.016 0.828 0.072
#> GSM1105476     2  0.4381    0.76163 0.000 0.788 0.052 0.048 0.092 0.020
#> GSM1105477     2  0.7692    0.00751 0.012 0.432 0.020 0.144 0.116 0.276
#> GSM1105478     4  0.5501    0.22281 0.000 0.236 0.200 0.564 0.000 0.000
#> GSM1105510     5  0.2516    0.75385 0.000 0.024 0.004 0.004 0.884 0.084
#> GSM1105530     3  0.2738    0.45517 0.176 0.000 0.820 0.000 0.000 0.004
#> GSM1105539     1  0.4428    0.25385 0.580 0.000 0.388 0.000 0.000 0.032
#> GSM1105480     4  0.2714    0.22645 0.000 0.028 0.016 0.888 0.012 0.056
#> GSM1105512     1  0.1644    0.84217 0.920 0.000 0.076 0.000 0.000 0.004
#> GSM1105532     3  0.3275    0.45165 0.144 0.000 0.816 0.036 0.000 0.004
#> GSM1105541     3  0.4555    0.17710 0.420 0.000 0.548 0.004 0.000 0.028
#> GSM1105439     2  0.1370    0.81652 0.000 0.948 0.012 0.036 0.000 0.004
#> GSM1105463     3  0.6644    0.37863 0.188 0.000 0.580 0.024 0.104 0.104
#> GSM1105482     1  0.0632    0.88263 0.976 0.000 0.000 0.000 0.000 0.024
#> GSM1105483     3  0.5445    0.16885 0.000 0.168 0.564 0.268 0.000 0.000
#> GSM1105494     4  0.2803    0.11962 0.000 0.012 0.000 0.856 0.016 0.116
#> GSM1105503     4  0.4477   -0.26751 0.000 0.004 0.028 0.588 0.000 0.380
#> GSM1105507     4  0.5828   -0.21919 0.120 0.000 0.016 0.560 0.008 0.296
#> GSM1105446     2  0.5416    0.12217 0.000 0.496 0.000 0.024 0.060 0.420
#> GSM1105519     1  0.1036    0.87562 0.964 0.000 0.004 0.000 0.024 0.008
#> GSM1105526     5  0.6788    0.25620 0.000 0.012 0.204 0.244 0.492 0.048
#> GSM1105527     4  0.5115    0.28193 0.000 0.048 0.372 0.560 0.000 0.020
#> GSM1105531     3  0.5342    0.38972 0.008 0.020 0.708 0.032 0.156 0.076
#> GSM1105543     2  0.6382    0.31908 0.000 0.532 0.000 0.060 0.248 0.160
#> GSM1105546     1  0.0632    0.88271 0.976 0.000 0.000 0.000 0.000 0.024
#> GSM1105547     1  0.0865    0.87970 0.964 0.000 0.000 0.000 0.000 0.036
#> GSM1105455     2  0.1692    0.81501 0.000 0.932 0.012 0.048 0.000 0.008
#> GSM1105458     2  0.0405    0.81524 0.000 0.988 0.004 0.000 0.000 0.008
#> GSM1105459     2  0.0665    0.81764 0.000 0.980 0.008 0.000 0.008 0.004
#> GSM1105462     3  0.5558    0.30975 0.000 0.072 0.664 0.204 0.032 0.028
#> GSM1105441     2  0.0547    0.81364 0.000 0.980 0.000 0.000 0.000 0.020
#> GSM1105465     5  0.2908    0.75367 0.000 0.000 0.000 0.048 0.848 0.104
#> GSM1105484     5  0.4805    0.55784 0.000 0.244 0.024 0.008 0.684 0.040
#> GSM1105485     5  0.0862    0.77423 0.000 0.000 0.004 0.008 0.972 0.016
#> GSM1105496     6  0.4721    0.67324 0.000 0.024 0.000 0.364 0.020 0.592
#> GSM1105505     6  0.6131    0.57114 0.036 0.000 0.040 0.260 0.072 0.592
#> GSM1105509     1  0.6125   -0.03771 0.468 0.000 0.416 0.040 0.036 0.040
#> GSM1105448     2  0.0891    0.81167 0.000 0.968 0.000 0.000 0.008 0.024
#> GSM1105521     1  0.2038    0.85262 0.920 0.000 0.028 0.000 0.032 0.020
#> GSM1105528     5  0.2051    0.77069 0.000 0.040 0.008 0.000 0.916 0.036
#> GSM1105529     5  0.2826    0.75575 0.000 0.000 0.000 0.092 0.856 0.052
#> GSM1105533     1  0.0632    0.88314 0.976 0.000 0.000 0.000 0.000 0.024
#> GSM1105545     3  0.5837    0.32807 0.000 0.300 0.584 0.056 0.024 0.036
#> GSM1105548     1  0.5785    0.17295 0.508 0.000 0.000 0.076 0.040 0.376
#> GSM1105549     1  0.4059    0.61723 0.720 0.000 0.000 0.000 0.228 0.052
#> GSM1105457     2  0.3101    0.79486 0.000 0.852 0.032 0.092 0.000 0.024
#> GSM1105460     2  0.2350    0.80446 0.000 0.880 0.100 0.000 0.000 0.020
#> GSM1105461     2  0.0363    0.81420 0.000 0.988 0.000 0.000 0.000 0.012
#> GSM1105464     3  0.3350    0.46602 0.120 0.000 0.828 0.004 0.008 0.040
#> GSM1105466     2  0.4700    0.69852 0.000 0.720 0.164 0.092 0.000 0.024
#> GSM1105479     2  0.2595    0.80154 0.000 0.872 0.084 0.044 0.000 0.000
#> GSM1105502     1  0.1148    0.87505 0.960 0.000 0.004 0.016 0.000 0.020
#> GSM1105515     1  0.0363    0.88402 0.988 0.000 0.000 0.000 0.000 0.012
#> GSM1105523     3  0.4160    0.21334 0.000 0.024 0.684 0.284 0.000 0.008
#> GSM1105550     3  0.6253    0.37144 0.128 0.236 0.576 0.012 0.000 0.048
#> GSM1105450     2  0.1320    0.81594 0.000 0.948 0.036 0.016 0.000 0.000
#> GSM1105451     2  0.0777    0.81382 0.000 0.972 0.000 0.004 0.000 0.024
#> GSM1105454     2  0.2361    0.80333 0.000 0.884 0.000 0.028 0.000 0.088
#> GSM1105468     2  0.1536    0.81543 0.000 0.940 0.040 0.016 0.000 0.004
#> GSM1105481     3  0.5217   -0.00141 0.000 0.440 0.496 0.004 0.044 0.016
#> GSM1105504     3  0.6589    0.37796 0.188 0.000 0.596 0.060 0.052 0.104
#> GSM1105517     3  0.4692    0.41324 0.252 0.000 0.684 0.016 0.008 0.040
#> GSM1105525     4  0.4953    0.21634 0.012 0.016 0.436 0.520 0.000 0.016
#> GSM1105552     5  0.7326    0.20171 0.172 0.000 0.020 0.084 0.428 0.296
#> GSM1105452     5  0.3274    0.74222 0.000 0.000 0.000 0.080 0.824 0.096
#> GSM1105453     2  0.0935    0.81324 0.000 0.964 0.000 0.004 0.000 0.032
#> GSM1105456     2  0.2611    0.79550 0.000 0.876 0.016 0.016 0.000 0.092

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) other(p) time(p) individual(p) k
#> ATC:NMF 119    0.575    0.800   0.651        0.0584 2
#> ATC:NMF 117    0.868    0.715   0.427        0.0213 3
#> ATC:NMF  86    0.192    0.815   0.726        0.0192 4
#> ATC:NMF 101    0.781    0.966   0.563        0.0018 5
#> ATC:NMF  77    0.665    0.574   0.157        0.0201 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