cola Report for GDS4547

Date: 2019-12-25 21:41:03 CET, cola version: 1.3.2

Document is loading...


Summary

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

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

The call of run_all_consensus_partition_methods() was:

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

Dimension of the input matrix:

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

Density distribution

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

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

plot of chunk density-heatmap

Suggest the best k

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

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

suggest_best_k(res_list)
The best k 1-PAC Mean silhouette Concordance Optional k
SD:skmeans 2 1.000 0.976 0.991 **
CV:hclust 2 1.000 0.990 0.994 **
CV:skmeans 2 1.000 0.989 0.995 **
MAD:skmeans 2 1.000 0.962 0.986 **
MAD:mclust 3 1.000 0.987 0.993 **
ATC:kmeans 2 1.000 0.974 0.990 **
ATC:skmeans 2 1.000 0.979 0.993 **
ATC:pam 2 1.000 0.985 0.994 **
ATC:mclust 2 1.000 0.999 0.999 **
ATC:NMF 2 1.000 0.971 0.988 **
SD:NMF 3 0.999 0.936 0.976 **
CV:NMF 3 0.999 0.941 0.979 **
MAD:pam 6 0.993 0.960 0.982 ** 5
CV:pam 6 0.980 0.950 0.978 ** 5
SD:pam 6 0.978 0.947 0.977 ** 5
ATC:hclust 2 0.956 0.954 0.979 **
MAD:hclust 2 0.927 0.922 0.968 *
SD:mclust 3 0.856 0.953 0.965
MAD:NMF 2 0.855 0.931 0.971
SD:hclust 4 0.618 0.878 0.915
CV:mclust 3 0.598 0.871 0.919
MAD:kmeans 2 0.483 0.895 0.902
SD:kmeans 5 0.476 0.666 0.693
CV:kmeans 5 0.468 0.659 0.652

**: 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.873           0.926       0.970          0.408 0.595   0.595
#> CV:NMF      2 0.845           0.926       0.963          0.392 0.589   0.589
#> MAD:NMF     2 0.855           0.931       0.971          0.478 0.526   0.526
#> ATC:NMF     2 1.000           0.971       0.988          0.490 0.509   0.509
#> SD:skmeans  2 1.000           0.976       0.991          0.501 0.500   0.500
#> CV:skmeans  2 1.000           0.989       0.995          0.500 0.500   0.500
#> MAD:skmeans 2 1.000           0.962       0.986          0.501 0.499   0.499
#> ATC:skmeans 2 1.000           0.979       0.993          0.497 0.503   0.503
#> SD:mclust   2 0.456           0.873       0.899          0.315 0.678   0.678
#> CV:mclust   2 0.456           0.711       0.841          0.295 0.819   0.819
#> MAD:mclust  2 0.307           0.694       0.801          0.378 0.602   0.602
#> ATC:mclust  2 1.000           0.999       0.999          0.183 0.819   0.819
#> SD:kmeans   2 0.323           0.802       0.846          0.398 0.514   0.514
#> CV:kmeans   2 0.223           0.757       0.827          0.399 0.514   0.514
#> MAD:kmeans  2 0.483           0.895       0.902          0.449 0.501   0.501
#> ATC:kmeans  2 1.000           0.974       0.990          0.483 0.520   0.520
#> SD:pam      2 0.661           0.929       0.959          0.230 0.819   0.819
#> CV:pam      2 0.663           0.883       0.900          0.319 0.571   0.571
#> MAD:pam     2 0.797           0.940       0.971          0.453 0.556   0.556
#> ATC:pam     2 1.000           0.985       0.994          0.497 0.503   0.503
#> SD:hclust   2 0.468           0.897       0.875          0.247 0.819   0.819
#> CV:hclust   2 1.000           0.990       0.994          0.190 0.819   0.819
#> MAD:hclust  2 0.927           0.922       0.968          0.500 0.500   0.500
#> ATC:hclust  2 0.956           0.954       0.979          0.474 0.534   0.534
get_stats(res_list, k = 3)
#>             k 1-PAC mean_silhouette concordance area_increased  Rand Jaccard
#> SD:NMF      3 0.999           0.936       0.976          0.396 0.721   0.573
#> CV:NMF      3 0.999           0.941       0.979          0.450 0.719   0.568
#> MAD:NMF     3 0.651           0.740       0.878          0.312 0.759   0.575
#> ATC:NMF     3 0.789           0.863       0.921          0.309 0.805   0.630
#> SD:skmeans  3 0.759           0.887       0.915          0.313 0.807   0.627
#> CV:skmeans  3 0.643           0.858       0.899          0.312 0.825   0.657
#> MAD:skmeans 3 0.860           0.905       0.937          0.298 0.819   0.648
#> ATC:skmeans 3 0.725           0.813       0.864          0.266 0.861   0.726
#> SD:mclust   3 0.856           0.953       0.965          0.538 0.617   0.521
#> CV:mclust   3 0.598           0.871       0.919          0.738 0.718   0.656
#> MAD:mclust  3 1.000           0.987       0.993          0.220 0.572   0.456
#> ATC:mclust  3 0.481           0.820       0.893          2.123 0.592   0.502
#> SD:kmeans   3 0.396           0.625       0.731          0.432 0.958   0.921
#> CV:kmeans   3 0.345           0.364       0.633          0.445 0.740   0.575
#> MAD:kmeans  3 0.444           0.499       0.673          0.360 0.884   0.774
#> ATC:kmeans  3 0.602           0.683       0.833          0.332 0.751   0.547
#> SD:pam      3 0.822           0.934       0.945          1.302 0.642   0.563
#> CV:pam      3 0.594           0.846       0.864          0.638 0.777   0.643
#> MAD:pam     3 0.638           0.854       0.890          0.264 0.803   0.673
#> ATC:pam     3 0.816           0.877       0.949          0.235 0.799   0.630
#> SD:hclust   3 0.551           0.891       0.914          1.167 0.597   0.508
#> CV:hclust   3 0.504           0.713       0.860          1.879 0.609   0.523
#> MAD:hclust  3 0.812           0.818       0.893          0.186 0.896   0.793
#> ATC:hclust  3 0.731           0.910       0.906          0.386 0.797   0.620
get_stats(res_list, k = 4)
#>             k 1-PAC mean_silhouette concordance area_increased  Rand Jaccard
#> SD:NMF      4 0.731           0.794       0.911         0.2515 0.784   0.532
#> CV:NMF      4 0.736           0.780       0.901         0.2523 0.805   0.567
#> MAD:NMF     4 0.736           0.811       0.900         0.1466 0.733   0.413
#> ATC:NMF     4 0.791           0.820       0.905         0.1091 0.873   0.673
#> SD:skmeans  4 0.706           0.769       0.853         0.1260 0.863   0.625
#> CV:skmeans  4 0.702           0.721       0.825         0.1241 0.877   0.664
#> MAD:skmeans 4 0.680           0.816       0.851         0.1341 0.885   0.679
#> ATC:skmeans 4 0.651           0.702       0.814         0.1129 0.923   0.794
#> SD:mclust   4 0.694           0.926       0.918         0.2599 0.879   0.775
#> CV:mclust   4 0.584           0.528       0.722         0.2634 0.828   0.680
#> MAD:mclust  4 0.772           0.893       0.913         0.2832 0.878   0.775
#> ATC:mclust  4 0.810           0.874       0.907         0.2027 0.705   0.406
#> SD:kmeans   4 0.383           0.643       0.685         0.1684 0.750   0.518
#> CV:kmeans   4 0.449           0.631       0.682         0.1664 0.711   0.441
#> MAD:kmeans  4 0.460           0.633       0.698         0.1329 0.763   0.495
#> ATC:kmeans  4 0.592           0.708       0.747         0.1160 0.827   0.547
#> SD:pam      4 0.839           0.885       0.945         0.3127 0.823   0.621
#> CV:pam      4 0.829           0.804       0.925         0.3222 0.706   0.452
#> MAD:pam     4 0.848           0.889       0.951         0.2307 0.803   0.580
#> ATC:pam     4 0.844           0.920       0.951         0.0837 0.947   0.865
#> SD:hclust   4 0.618           0.878       0.915         0.1852 0.940   0.855
#> CV:hclust   4 0.471           0.556       0.727         0.1964 0.759   0.520
#> MAD:hclust  4 0.637           0.804       0.817         0.1072 0.980   0.949
#> ATC:hclust  4 0.688           0.771       0.849         0.1060 0.938   0.811
get_stats(res_list, k = 5)
#>             k 1-PAC mean_silhouette concordance area_increased  Rand Jaccard
#> SD:NMF      5 0.728           0.698       0.848         0.0839 0.800   0.427
#> CV:NMF      5 0.770           0.842       0.904         0.0777 0.817   0.475
#> MAD:NMF     5 0.705           0.660       0.778         0.0831 0.845   0.528
#> ATC:NMF     5 0.766           0.812       0.881         0.0865 0.849   0.550
#> SD:skmeans  5 0.756           0.587       0.692         0.0620 0.830   0.483
#> CV:skmeans  5 0.784           0.679       0.763         0.0659 0.853   0.512
#> MAD:skmeans 5 0.758           0.696       0.777         0.0640 0.937   0.761
#> ATC:skmeans 5 0.786           0.750       0.847         0.0700 0.943   0.818
#> SD:mclust   5 0.798           0.842       0.914         0.2243 0.819   0.564
#> CV:mclust   5 0.740           0.823       0.871         0.1588 0.763   0.434
#> MAD:mclust  5 0.703           0.678       0.818         0.2349 0.900   0.764
#> ATC:mclust  5 0.709           0.871       0.919        -0.0589 0.710   0.383
#> SD:kmeans   5 0.476           0.666       0.693         0.1081 0.873   0.600
#> CV:kmeans   5 0.468           0.659       0.652         0.0975 0.934   0.777
#> MAD:kmeans  5 0.494           0.472       0.622         0.0881 0.977   0.922
#> ATC:kmeans  5 0.674           0.756       0.808         0.0754 0.927   0.732
#> SD:pam      5 0.947           0.921       0.967         0.0825 0.946   0.821
#> CV:pam      5 0.923           0.936       0.974         0.0948 0.882   0.659
#> MAD:pam     5 0.948           0.911       0.966         0.0788 0.926   0.755
#> ATC:pam     5 0.753           0.800       0.833         0.1418 0.851   0.585
#> SD:hclust   5 0.742           0.858       0.863         0.1158 0.960   0.887
#> CV:hclust   5 0.711           0.784       0.839         0.1656 0.758   0.389
#> MAD:hclust  5 0.757           0.698       0.820         0.0901 0.987   0.965
#> ATC:hclust  5 0.731           0.722       0.829         0.0540 0.919   0.718
get_stats(res_list, k = 6)
#>             k 1-PAC mean_silhouette concordance area_increased  Rand Jaccard
#> SD:NMF      6 0.854           0.803       0.890         0.0573 0.879   0.543
#> CV:NMF      6 0.885           0.856       0.908         0.0631 0.928   0.711
#> MAD:NMF     6 0.841           0.756       0.882         0.0572 0.894   0.581
#> ATC:NMF     6 0.802           0.815       0.887         0.0556 0.907   0.630
#> SD:skmeans  6 0.841           0.776       0.809         0.0441 0.894   0.587
#> CV:skmeans  6 0.817           0.733       0.744         0.0404 0.851   0.441
#> MAD:skmeans 6 0.858           0.739       0.767         0.0449 0.892   0.558
#> ATC:skmeans 6 0.775           0.815       0.864         0.0506 0.938   0.775
#> SD:mclust   6 0.799           0.819       0.862         0.0730 0.901   0.620
#> CV:mclust   6 0.841           0.828       0.873         0.0778 0.908   0.634
#> MAD:mclust  6 0.819           0.614       0.852         0.0584 0.907   0.717
#> ATC:mclust  6 0.854           0.897       0.937         0.2138 0.829   0.535
#> SD:kmeans   6 0.612           0.744       0.695         0.0561 0.960   0.828
#> CV:kmeans   6 0.610           0.727       0.700         0.0620 0.951   0.796
#> MAD:kmeans  6 0.641           0.675       0.646         0.0483 0.897   0.636
#> ATC:kmeans  6 0.768           0.710       0.792         0.0509 0.981   0.914
#> SD:pam      6 0.978           0.947       0.977         0.0750 0.938   0.760
#> CV:pam      6 0.980           0.950       0.978         0.0731 0.941   0.763
#> MAD:pam     6 0.993           0.960       0.982         0.0655 0.921   0.690
#> ATC:pam     6 0.855           0.897       0.946         0.0706 0.840   0.441
#> SD:hclust   6 0.865           0.904       0.932         0.1366 0.879   0.616
#> CV:hclust   6 0.811           0.866       0.896         0.0437 0.980   0.906
#> MAD:hclust  6 0.897           0.865       0.900         0.1102 0.835   0.551
#> ATC:hclust  6 0.841           0.881       0.911         0.0455 0.965   0.846

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 temperature(p) time(p) specimen(p) k
#> SD:NMF      134          0.977   0.991    9.54e-21 2
#> CV:NMF      136          0.985   0.992    4.02e-21 2
#> MAD:NMF     137          0.987   0.974    4.32e-19 2
#> ATC:NMF     139          0.477   0.611    3.42e-14 2
#> SD:skmeans  138          0.869   0.998    1.28e-22 2
#> CV:skmeans  140          0.897   0.998    7.21e-23 2
#> MAD:skmeans 136          0.883   0.984    4.71e-22 2
#> ATC:skmeans 138          0.582   0.620    1.05e-13 2
#> SD:mclust   140          1.000   1.000    1.03e-25 2
#> CV:mclust   126          1.000   1.000    1.91e-23 2
#> MAD:mclust  129          0.838   0.954    1.03e-21 2
#> ATC:mclust  140          1.000   1.000    1.03e-25 2
#> SD:kmeans   135          0.987   0.994    7.66e-23 2
#> CV:kmeans   131          0.992   0.987    1.87e-22 2
#> MAD:kmeans  138          0.982   0.990    7.63e-22 2
#> ATC:kmeans  137          0.690   0.804    1.23e-15 2
#> SD:pam      140          1.000   1.000    1.03e-25 2
#> CV:pam      139          0.911   0.981    6.98e-19 2
#> MAD:pam     139          0.817   0.997    1.14e-17 2
#> ATC:pam     138          0.393   0.666    1.78e-13 2
#> SD:hclust   140          1.000   1.000    1.03e-25 2
#> CV:hclust   140          1.000   1.000    1.03e-25 2
#> MAD:hclust  130          0.996   1.000    1.19e-23 2
#> ATC:hclust  137          0.785   0.947    8.61e-17 2
test_to_known_factors(res_list, k = 3)
#>               n temperature(p) time(p) specimen(p) k
#> SD:NMF      135          0.989   1.000    8.02e-44 3
#> CV:NMF      135          0.989   1.000    8.02e-44 3
#> MAD:NMF     121          0.787   0.990    4.88e-34 3
#> ATC:NMF     132          0.850   0.948    1.00e-22 3
#> SD:skmeans  137          0.998   1.000    1.24e-44 3
#> CV:skmeans  139          0.997   1.000    7.22e-44 3
#> MAD:skmeans 136          1.000   1.000    1.74e-42 3
#> ATC:skmeans 136          0.907   0.960    2.99e-29 3
#> SD:mclust   140          1.000   1.000    6.13e-49 3
#> CV:mclust   140          1.000   1.000    6.13e-49 3
#> MAD:mclust  139          1.000   1.000    1.57e-48 3
#> ATC:mclust  133          0.961   0.997    1.99e-34 3
#> SD:kmeans   120          0.989   1.000    2.12e-21 3
#> CV:kmeans    55          0.999   1.000    6.87e-12 3
#> MAD:kmeans   72          0.981   0.997    3.93e-14 3
#> ATC:kmeans  115          0.922   0.944    1.18e-20 3
#> SD:pam      140          0.996   1.000    1.51e-43 3
#> CV:pam      139          0.991   1.000    7.70e-43 3
#> MAD:pam     137          0.983   1.000    1.97e-42 3
#> ATC:pam     128          0.582   0.970    1.27e-28 3
#> SD:hclust   140          1.000   1.000    6.13e-49 3
#> CV:hclust   126          1.000   1.000    2.01e-44 3
#> MAD:hclust  130          1.000   1.000    7.50e-45 3
#> ATC:hclust  139          0.923   0.985    8.08e-26 3
test_to_known_factors(res_list, k = 4)
#>               n temperature(p) time(p) specimen(p) k
#> SD:NMF      127          1.000   1.000    6.42e-60 4
#> CV:NMF      123          1.000   1.000    6.04e-58 4
#> MAD:NMF     131          1.000   1.000    1.82e-55 4
#> ATC:NMF     125          0.959   0.996    4.50e-42 4
#> SD:skmeans  133          1.000   1.000    1.69e-64 4
#> CV:skmeans  123          0.999   1.000    8.47e-60 4
#> MAD:skmeans 137          1.000   1.000    3.18e-67 4
#> ATC:skmeans 123          0.990   1.000    1.20e-46 4
#> SD:mclust   140          1.000   1.000    4.16e-72 4
#> CV:mclust    64          0.999   1.000    7.35e-24 4
#> MAD:mclust  139          1.000   1.000    1.71e-71 4
#> ATC:mclust  138          0.994   1.000    1.49e-55 4
#> SD:kmeans   118          1.000   1.000    1.92e-60 4
#> CV:kmeans   104          1.000   1.000    1.14e-53 4
#> MAD:kmeans  105          1.000   1.000    3.14e-52 4
#> ATC:kmeans  129          0.968   0.882    6.42e-34 4
#> SD:pam      137          1.000   1.000    7.38e-65 4
#> CV:pam      119          1.000   1.000    1.26e-55 4
#> MAD:pam     136          1.000   1.000    3.30e-62 4
#> ATC:pam     139          0.947   0.999    3.30e-51 4
#> SD:hclust   140          1.000   1.000    4.16e-72 4
#> CV:hclust    84          1.000   1.000    7.20e-31 4
#> MAD:hclust  130          1.000   1.000    5.41e-66 4
#> ATC:hclust  134          0.989   1.000    3.20e-47 4
test_to_known_factors(res_list, k = 5)
#>               n temperature(p) time(p) specimen(p) k
#> SD:NMF      107          1.000   1.000    1.48e-66 5
#> CV:NMF      132          1.000   1.000    4.42e-86 5
#> MAD:NMF     114          1.000   1.000    1.62e-70 5
#> ATC:NMF     130          0.991   0.994    3.23e-64 5
#> SD:skmeans   84          1.000   1.000    3.39e-59 5
#> CV:skmeans  132          1.000   1.000    9.80e-89 5
#> MAD:skmeans 118          1.000   1.000    5.17e-76 5
#> ATC:skmeans 129          0.973   1.000    6.92e-57 5
#> SD:mclust   135          1.000   1.000    3.55e-91 5
#> CV:mclust   126          1.000   1.000    7.26e-84 5
#> MAD:mclust   85          1.000   1.000    1.36e-57 5
#> ATC:mclust  137          0.982   1.000    9.07e-78 5
#> SD:kmeans    97          1.000   1.000    5.30e-65 5
#> CV:kmeans   108          1.000   1.000    5.93e-74 5
#> MAD:kmeans   77          0.969   0.994    5.82e-39 5
#> ATC:kmeans  130          0.993   0.975    9.10e-54 5
#> SD:pam      136          1.000   1.000    6.48e-85 5
#> CV:pam      138          1.000   1.000    5.56e-81 5
#> MAD:pam     134          1.000   1.000    1.83e-79 5
#> ATC:pam     136          0.961   0.999    1.09e-62 5
#> SD:hclust   140          1.000   1.000    2.99e-95 5
#> CV:hclust   140          1.000   1.000    2.99e-95 5
#> MAD:hclust  124          0.966   1.000    3.02e-82 5
#> ATC:hclust  109          0.968   0.999    8.76e-31 5
test_to_known_factors(res_list, k = 6)
#>               n temperature(p) time(p) specimen(p) k
#> SD:NMF      124          1.000   1.000    1.71e-98 6
#> CV:NMF      130          1.000   1.000   1.38e-106 6
#> MAD:NMF     119          0.997   1.000    1.30e-84 6
#> ATC:NMF     131          0.996   1.000    3.22e-84 6
#> SD:skmeans  139          1.000   1.000   2.31e-117 6
#> CV:skmeans  100          1.000   1.000    1.23e-83 6
#> MAD:skmeans 132          1.000   1.000   3.04e-110 6
#> ATC:skmeans 136          1.000   0.999    1.73e-78 6
#> SD:mclust   125          1.000   1.000   4.24e-106 6
#> CV:mclust   126          1.000   1.000   4.05e-107 6
#> MAD:mclust   82          0.993   1.000    3.70e-55 6
#> ATC:mclust  137          0.980   1.000    1.32e-97 6
#> SD:kmeans   122          1.000   1.000   4.84e-103 6
#> CV:kmeans   119          1.000   1.000   5.46e-100 6
#> MAD:kmeans  104          1.000   1.000    1.06e-87 6
#> ATC:kmeans  130          0.994   0.958    2.00e-54 6
#> SD:pam      138          1.000   1.000   1.51e-107 6
#> CV:pam      138          1.000   1.000   4.39e-104 6
#> MAD:pam     139          1.000   1.000   3.89e-105 6
#> ATC:pam     139          0.969   1.000    3.15e-74 6
#> SD:hclust   140          1.000   1.000   2.21e-118 6
#> CV:hclust   140          1.000   1.000   2.21e-118 6
#> MAD:hclust  134          1.000   1.000   2.83e-112 6
#> ATC:hclust  139          0.999   1.000    9.49e-84 6

Results for each method


SD:hclust

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

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

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

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

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

collect_plots(res)

plot of chunk SD-hclust-collect-plots

The plots are:

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

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

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

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

select_partition_number(res)

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

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

get_stats(res)
#>   k 1-PAC mean_silhouette concordance area_increased  Rand Jaccard
#> 2 2 0.468           0.897       0.875          0.247 0.819   0.819
#> 3 3 0.551           0.891       0.914          1.167 0.597   0.508
#> 4 4 0.618           0.878       0.915          0.185 0.940   0.855
#> 5 5 0.742           0.858       0.863          0.116 0.960   0.887
#> 6 6 0.865           0.904       0.932          0.137 0.879   0.616

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
#> GSM1009062     1   0.518      0.893 0.884 0.116
#> GSM1009076     1   0.343      0.886 0.936 0.064
#> GSM1009090     1   0.518      0.893 0.884 0.116
#> GSM1009104     1   0.563      0.832 0.868 0.132
#> GSM1009118     1   0.343      0.886 0.936 0.064
#> GSM1009132     1   0.518      0.893 0.884 0.116
#> GSM1009146     1   0.506      0.894 0.888 0.112
#> GSM1009160     2   0.518      1.000 0.116 0.884
#> GSM1009174     1   0.343      0.886 0.936 0.064
#> GSM1009188     1   0.000      0.900 1.000 0.000
#> GSM1009063     1   0.518      0.893 0.884 0.116
#> GSM1009077     1   0.343      0.886 0.936 0.064
#> GSM1009091     1   0.518      0.893 0.884 0.116
#> GSM1009105     1   0.563      0.832 0.868 0.132
#> GSM1009119     1   0.141      0.897 0.980 0.020
#> GSM1009133     1   0.518      0.893 0.884 0.116
#> GSM1009147     1   0.506      0.894 0.888 0.112
#> GSM1009161     2   0.518      1.000 0.116 0.884
#> GSM1009175     1   0.343      0.886 0.936 0.064
#> GSM1009189     1   0.000      0.900 1.000 0.000
#> GSM1009064     1   0.518      0.893 0.884 0.116
#> GSM1009078     1   0.343      0.886 0.936 0.064
#> GSM1009092     1   0.518      0.893 0.884 0.116
#> GSM1009106     1   0.563      0.832 0.868 0.132
#> GSM1009120     1   0.141      0.897 0.980 0.020
#> GSM1009134     1   0.518      0.893 0.884 0.116
#> GSM1009148     1   0.506      0.894 0.888 0.112
#> GSM1009162     2   0.518      1.000 0.116 0.884
#> GSM1009176     1   0.343      0.886 0.936 0.064
#> GSM1009190     1   0.000      0.900 1.000 0.000
#> GSM1009065     1   0.518      0.893 0.884 0.116
#> GSM1009079     1   0.343      0.886 0.936 0.064
#> GSM1009093     1   0.518      0.893 0.884 0.116
#> GSM1009107     1   0.563      0.832 0.868 0.132
#> GSM1009121     1   0.343      0.886 0.936 0.064
#> GSM1009135     1   0.518      0.893 0.884 0.116
#> GSM1009149     1   0.518      0.893 0.884 0.116
#> GSM1009163     2   0.518      1.000 0.116 0.884
#> GSM1009177     1   0.343      0.886 0.936 0.064
#> GSM1009191     1   0.000      0.900 1.000 0.000
#> GSM1009066     1   0.518      0.893 0.884 0.116
#> GSM1009080     1   0.343      0.886 0.936 0.064
#> GSM1009094     1   0.518      0.893 0.884 0.116
#> GSM1009108     1   0.563      0.832 0.868 0.132
#> GSM1009122     1   0.343      0.886 0.936 0.064
#> GSM1009136     1   0.518      0.893 0.884 0.116
#> GSM1009150     1   0.518      0.893 0.884 0.116
#> GSM1009164     2   0.518      1.000 0.116 0.884
#> GSM1009178     1   0.343      0.886 0.936 0.064
#> GSM1009192     1   0.000      0.900 1.000 0.000
#> GSM1009067     1   0.518      0.893 0.884 0.116
#> GSM1009081     1   0.343      0.886 0.936 0.064
#> GSM1009095     1   0.518      0.893 0.884 0.116
#> GSM1009109     1   0.563      0.832 0.868 0.132
#> GSM1009123     1   0.141      0.897 0.980 0.020
#> GSM1009137     1   0.518      0.893 0.884 0.116
#> GSM1009151     1   0.506      0.894 0.888 0.112
#> GSM1009165     2   0.518      1.000 0.116 0.884
#> GSM1009179     1   0.343      0.886 0.936 0.064
#> GSM1009193     1   0.000      0.900 1.000 0.000
#> GSM1009068     1   0.518      0.893 0.884 0.116
#> GSM1009082     1   0.343      0.886 0.936 0.064
#> GSM1009096     1   0.518      0.893 0.884 0.116
#> GSM1009110     1   0.563      0.832 0.868 0.132
#> GSM1009124     1   0.141      0.897 0.980 0.020
#> GSM1009138     1   0.518      0.893 0.884 0.116
#> GSM1009152     1   0.506      0.894 0.888 0.112
#> GSM1009166     2   0.518      1.000 0.116 0.884
#> GSM1009180     1   0.343      0.886 0.936 0.064
#> GSM1009194     1   0.000      0.900 1.000 0.000
#> GSM1009069     1   0.518      0.893 0.884 0.116
#> GSM1009083     1   0.343      0.886 0.936 0.064
#> GSM1009097     1   0.518      0.893 0.884 0.116
#> GSM1009111     1   0.563      0.832 0.868 0.132
#> GSM1009125     1   0.343      0.886 0.936 0.064
#> GSM1009139     1   0.518      0.893 0.884 0.116
#> GSM1009153     1   0.506      0.894 0.888 0.112
#> GSM1009167     2   0.518      1.000 0.116 0.884
#> GSM1009181     1   0.343      0.886 0.936 0.064
#> GSM1009195     1   0.000      0.900 1.000 0.000
#> GSM1009070     1   0.518      0.893 0.884 0.116
#> GSM1009084     1   0.343      0.886 0.936 0.064
#> GSM1009098     1   0.518      0.893 0.884 0.116
#> GSM1009112     1   0.563      0.832 0.868 0.132
#> GSM1009126     1   0.141      0.897 0.980 0.020
#> GSM1009140     1   0.518      0.893 0.884 0.116
#> GSM1009154     1   0.506      0.894 0.888 0.112
#> GSM1009168     2   0.518      1.000 0.116 0.884
#> GSM1009182     1   0.343      0.886 0.936 0.064
#> GSM1009196     1   0.000      0.900 1.000 0.000
#> GSM1009071     1   0.518      0.893 0.884 0.116
#> GSM1009085     1   0.343      0.886 0.936 0.064
#> GSM1009099     1   0.518      0.893 0.884 0.116
#> GSM1009113     1   0.563      0.832 0.868 0.132
#> GSM1009127     1   0.141      0.897 0.980 0.020
#> GSM1009141     1   0.518      0.893 0.884 0.116
#> GSM1009155     1   0.506      0.894 0.888 0.112
#> GSM1009169     2   0.518      1.000 0.116 0.884
#> GSM1009183     1   0.343      0.886 0.936 0.064
#> GSM1009197     1   0.000      0.900 1.000 0.000
#> GSM1009072     1   0.518      0.893 0.884 0.116
#> GSM1009086     1   0.343      0.886 0.936 0.064
#> GSM1009100     1   0.518      0.893 0.884 0.116
#> GSM1009114     1   0.563      0.832 0.868 0.132
#> GSM1009128     1   0.343      0.886 0.936 0.064
#> GSM1009142     1   0.518      0.893 0.884 0.116
#> GSM1009156     1   0.506      0.894 0.888 0.112
#> GSM1009170     2   0.518      1.000 0.116 0.884
#> GSM1009184     1   0.343      0.886 0.936 0.064
#> GSM1009198     1   0.000      0.900 1.000 0.000
#> GSM1009073     1   0.518      0.893 0.884 0.116
#> GSM1009087     1   0.343      0.886 0.936 0.064
#> GSM1009101     1   0.518      0.893 0.884 0.116
#> GSM1009115     1   0.563      0.832 0.868 0.132
#> GSM1009129     1   0.343      0.886 0.936 0.064
#> GSM1009143     1   0.518      0.893 0.884 0.116
#> GSM1009157     1   0.506      0.894 0.888 0.112
#> GSM1009171     2   0.518      1.000 0.116 0.884
#> GSM1009185     1   0.343      0.886 0.936 0.064
#> GSM1009199     1   0.000      0.900 1.000 0.000
#> GSM1009074     1   0.518      0.893 0.884 0.116
#> GSM1009088     1   0.343      0.886 0.936 0.064
#> GSM1009102     1   0.518      0.893 0.884 0.116
#> GSM1009116     1   0.563      0.832 0.868 0.132
#> GSM1009130     1   0.343      0.886 0.936 0.064
#> GSM1009144     1   0.518      0.893 0.884 0.116
#> GSM1009158     1   0.518      0.893 0.884 0.116
#> GSM1009172     2   0.518      1.000 0.116 0.884
#> GSM1009186     1   0.343      0.886 0.936 0.064
#> GSM1009200     1   0.000      0.900 1.000 0.000
#> GSM1009075     1   0.518      0.893 0.884 0.116
#> GSM1009089     1   0.343      0.886 0.936 0.064
#> GSM1009103     1   0.518      0.893 0.884 0.116
#> GSM1009117     1   0.563      0.832 0.868 0.132
#> GSM1009131     1   0.343      0.886 0.936 0.064
#> GSM1009145     1   0.518      0.893 0.884 0.116
#> GSM1009159     1   0.518      0.893 0.884 0.116
#> GSM1009173     2   0.518      1.000 0.116 0.884
#> GSM1009187     1   0.343      0.886 0.936 0.064
#> GSM1009201     1   0.000      0.900 1.000 0.000

show/hide code output

cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#>            class entropy silhouette    p1    p2    p3
#> GSM1009062     1  0.0000      0.957 1.000 0.000 0.000
#> GSM1009076     2  0.4399      0.890 0.188 0.812 0.000
#> GSM1009090     1  0.0000      0.957 1.000 0.000 0.000
#> GSM1009104     2  0.0237      0.740 0.000 0.996 0.004
#> GSM1009118     2  0.4702      0.888 0.212 0.788 0.000
#> GSM1009132     1  0.0000      0.957 1.000 0.000 0.000
#> GSM1009146     1  0.0237      0.955 0.996 0.004 0.000
#> GSM1009160     3  0.0000      1.000 0.000 0.000 1.000
#> GSM1009174     2  0.4654      0.890 0.208 0.792 0.000
#> GSM1009188     1  0.4002      0.796 0.840 0.160 0.000
#> GSM1009063     1  0.0000      0.957 1.000 0.000 0.000
#> GSM1009077     2  0.4399      0.890 0.188 0.812 0.000
#> GSM1009091     1  0.0000      0.957 1.000 0.000 0.000
#> GSM1009105     2  0.0237      0.740 0.000 0.996 0.004
#> GSM1009119     2  0.6126      0.606 0.400 0.600 0.000
#> GSM1009133     1  0.0000      0.957 1.000 0.000 0.000
#> GSM1009147     1  0.0237      0.955 0.996 0.004 0.000
#> GSM1009161     3  0.0000      1.000 0.000 0.000 1.000
#> GSM1009175     2  0.4654      0.890 0.208 0.792 0.000
#> GSM1009189     1  0.4002      0.796 0.840 0.160 0.000
#> GSM1009064     1  0.0000      0.957 1.000 0.000 0.000
#> GSM1009078     2  0.4399      0.890 0.188 0.812 0.000
#> GSM1009092     1  0.0000      0.957 1.000 0.000 0.000
#> GSM1009106     2  0.0237      0.740 0.000 0.996 0.004
#> GSM1009120     2  0.6126      0.606 0.400 0.600 0.000
#> GSM1009134     1  0.0000      0.957 1.000 0.000 0.000
#> GSM1009148     1  0.0237      0.955 0.996 0.004 0.000
#> GSM1009162     3  0.0000      1.000 0.000 0.000 1.000
#> GSM1009176     2  0.4654      0.890 0.208 0.792 0.000
#> GSM1009190     1  0.4002      0.796 0.840 0.160 0.000
#> GSM1009065     1  0.0000      0.957 1.000 0.000 0.000
#> GSM1009079     2  0.4399      0.890 0.188 0.812 0.000
#> GSM1009093     1  0.0000      0.957 1.000 0.000 0.000
#> GSM1009107     2  0.0237      0.740 0.000 0.996 0.004
#> GSM1009121     2  0.4702      0.888 0.212 0.788 0.000
#> GSM1009135     1  0.0000      0.957 1.000 0.000 0.000
#> GSM1009149     1  0.0000      0.957 1.000 0.000 0.000
#> GSM1009163     3  0.0000      1.000 0.000 0.000 1.000
#> GSM1009177     2  0.4654      0.890 0.208 0.792 0.000
#> GSM1009191     1  0.4002      0.796 0.840 0.160 0.000
#> GSM1009066     1  0.0000      0.957 1.000 0.000 0.000
#> GSM1009080     2  0.4399      0.890 0.188 0.812 0.000
#> GSM1009094     1  0.0000      0.957 1.000 0.000 0.000
#> GSM1009108     2  0.0237      0.740 0.000 0.996 0.004
#> GSM1009122     2  0.4702      0.888 0.212 0.788 0.000
#> GSM1009136     1  0.0000      0.957 1.000 0.000 0.000
#> GSM1009150     1  0.0000      0.957 1.000 0.000 0.000
#> GSM1009164     3  0.0000      1.000 0.000 0.000 1.000
#> GSM1009178     2  0.4654      0.890 0.208 0.792 0.000
#> GSM1009192     1  0.4002      0.796 0.840 0.160 0.000
#> GSM1009067     1  0.0000      0.957 1.000 0.000 0.000
#> GSM1009081     2  0.4399      0.890 0.188 0.812 0.000
#> GSM1009095     1  0.0000      0.957 1.000 0.000 0.000
#> GSM1009109     2  0.0237      0.740 0.000 0.996 0.004
#> GSM1009123     2  0.6126      0.606 0.400 0.600 0.000
#> GSM1009137     1  0.0000      0.957 1.000 0.000 0.000
#> GSM1009151     1  0.0237      0.955 0.996 0.004 0.000
#> GSM1009165     3  0.0000      1.000 0.000 0.000 1.000
#> GSM1009179     2  0.4654      0.890 0.208 0.792 0.000
#> GSM1009193     1  0.4002      0.796 0.840 0.160 0.000
#> GSM1009068     1  0.0000      0.957 1.000 0.000 0.000
#> GSM1009082     2  0.4399      0.890 0.188 0.812 0.000
#> GSM1009096     1  0.0000      0.957 1.000 0.000 0.000
#> GSM1009110     2  0.0237      0.740 0.000 0.996 0.004
#> GSM1009124     2  0.6126      0.606 0.400 0.600 0.000
#> GSM1009138     1  0.0000      0.957 1.000 0.000 0.000
#> GSM1009152     1  0.0237      0.955 0.996 0.004 0.000
#> GSM1009166     3  0.0000      1.000 0.000 0.000 1.000
#> GSM1009180     2  0.4654      0.890 0.208 0.792 0.000
#> GSM1009194     1  0.4002      0.796 0.840 0.160 0.000
#> GSM1009069     1  0.0000      0.957 1.000 0.000 0.000
#> GSM1009083     2  0.4399      0.890 0.188 0.812 0.000
#> GSM1009097     1  0.0000      0.957 1.000 0.000 0.000
#> GSM1009111     2  0.0237      0.740 0.000 0.996 0.004
#> GSM1009125     2  0.4702      0.888 0.212 0.788 0.000
#> GSM1009139     1  0.0000      0.957 1.000 0.000 0.000
#> GSM1009153     1  0.0237      0.955 0.996 0.004 0.000
#> GSM1009167     3  0.0000      1.000 0.000 0.000 1.000
#> GSM1009181     2  0.4654      0.890 0.208 0.792 0.000
#> GSM1009195     1  0.4002      0.796 0.840 0.160 0.000
#> GSM1009070     1  0.0000      0.957 1.000 0.000 0.000
#> GSM1009084     2  0.4399      0.890 0.188 0.812 0.000
#> GSM1009098     1  0.0000      0.957 1.000 0.000 0.000
#> GSM1009112     2  0.0237      0.740 0.000 0.996 0.004
#> GSM1009126     2  0.6126      0.606 0.400 0.600 0.000
#> GSM1009140     1  0.0000      0.957 1.000 0.000 0.000
#> GSM1009154     1  0.0237      0.955 0.996 0.004 0.000
#> GSM1009168     3  0.0000      1.000 0.000 0.000 1.000
#> GSM1009182     2  0.4654      0.890 0.208 0.792 0.000
#> GSM1009196     1  0.4002      0.796 0.840 0.160 0.000
#> GSM1009071     1  0.0000      0.957 1.000 0.000 0.000
#> GSM1009085     2  0.4399      0.890 0.188 0.812 0.000
#> GSM1009099     1  0.0000      0.957 1.000 0.000 0.000
#> GSM1009113     2  0.0237      0.740 0.000 0.996 0.004
#> GSM1009127     2  0.6126      0.606 0.400 0.600 0.000
#> GSM1009141     1  0.0000      0.957 1.000 0.000 0.000
#> GSM1009155     1  0.0237      0.955 0.996 0.004 0.000
#> GSM1009169     3  0.0000      1.000 0.000 0.000 1.000
#> GSM1009183     2  0.4654      0.890 0.208 0.792 0.000
#> GSM1009197     1  0.4002      0.796 0.840 0.160 0.000
#> GSM1009072     1  0.0000      0.957 1.000 0.000 0.000
#> GSM1009086     2  0.4399      0.890 0.188 0.812 0.000
#> GSM1009100     1  0.0000      0.957 1.000 0.000 0.000
#> GSM1009114     2  0.0237      0.740 0.000 0.996 0.004
#> GSM1009128     2  0.4702      0.888 0.212 0.788 0.000
#> GSM1009142     1  0.0000      0.957 1.000 0.000 0.000
#> GSM1009156     1  0.0237      0.955 0.996 0.004 0.000
#> GSM1009170     3  0.0000      1.000 0.000 0.000 1.000
#> GSM1009184     2  0.4654      0.890 0.208 0.792 0.000
#> GSM1009198     1  0.4002      0.796 0.840 0.160 0.000
#> GSM1009073     1  0.0000      0.957 1.000 0.000 0.000
#> GSM1009087     2  0.4399      0.890 0.188 0.812 0.000
#> GSM1009101     1  0.0000      0.957 1.000 0.000 0.000
#> GSM1009115     2  0.0237      0.740 0.000 0.996 0.004
#> GSM1009129     2  0.4702      0.888 0.212 0.788 0.000
#> GSM1009143     1  0.0000      0.957 1.000 0.000 0.000
#> GSM1009157     1  0.0237      0.955 0.996 0.004 0.000
#> GSM1009171     3  0.0000      1.000 0.000 0.000 1.000
#> GSM1009185     2  0.4654      0.890 0.208 0.792 0.000
#> GSM1009199     1  0.4002      0.796 0.840 0.160 0.000
#> GSM1009074     1  0.0000      0.957 1.000 0.000 0.000
#> GSM1009088     2  0.4399      0.890 0.188 0.812 0.000
#> GSM1009102     1  0.0000      0.957 1.000 0.000 0.000
#> GSM1009116     2  0.0237      0.740 0.000 0.996 0.004
#> GSM1009130     2  0.4702      0.888 0.212 0.788 0.000
#> GSM1009144     1  0.0000      0.957 1.000 0.000 0.000
#> GSM1009158     1  0.0000      0.957 1.000 0.000 0.000
#> GSM1009172     3  0.0000      1.000 0.000 0.000 1.000
#> GSM1009186     2  0.4654      0.890 0.208 0.792 0.000
#> GSM1009200     1  0.4002      0.796 0.840 0.160 0.000
#> GSM1009075     1  0.0000      0.957 1.000 0.000 0.000
#> GSM1009089     2  0.4399      0.890 0.188 0.812 0.000
#> GSM1009103     1  0.0000      0.957 1.000 0.000 0.000
#> GSM1009117     2  0.0237      0.740 0.000 0.996 0.004
#> GSM1009131     2  0.4702      0.888 0.212 0.788 0.000
#> GSM1009145     1  0.0000      0.957 1.000 0.000 0.000
#> GSM1009159     1  0.0000      0.957 1.000 0.000 0.000
#> GSM1009173     3  0.0000      1.000 0.000 0.000 1.000
#> GSM1009187     2  0.4654      0.890 0.208 0.792 0.000
#> GSM1009201     1  0.4002      0.796 0.840 0.160 0.000

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>            class entropy silhouette    p1    p2 p3    p4
#> GSM1009062     1  0.3528      0.849 0.808 0.192  0 0.000
#> GSM1009076     2  0.0817      0.948 0.000 0.976  0 0.024
#> GSM1009090     1  0.0000      0.819 1.000 0.000  0 0.000
#> GSM1009104     4  0.0000      1.000 0.000 0.000  0 1.000
#> GSM1009118     2  0.0000      0.951 0.000 1.000  0 0.000
#> GSM1009132     1  0.0000      0.819 1.000 0.000  0 0.000
#> GSM1009146     1  0.3569      0.847 0.804 0.196  0 0.000
#> GSM1009160     3  0.0000      1.000 0.000 0.000  1 0.000
#> GSM1009174     2  0.0188      0.952 0.000 0.996  0 0.004
#> GSM1009188     1  0.4679      0.691 0.648 0.352  0 0.000
#> GSM1009063     1  0.3528      0.849 0.808 0.192  0 0.000
#> GSM1009077     2  0.0817      0.948 0.000 0.976  0 0.024
#> GSM1009091     1  0.0000      0.819 1.000 0.000  0 0.000
#> GSM1009105     4  0.0000      1.000 0.000 0.000  0 1.000
#> GSM1009119     2  0.3486      0.720 0.188 0.812  0 0.000
#> GSM1009133     1  0.0000      0.819 1.000 0.000  0 0.000
#> GSM1009147     1  0.3569      0.847 0.804 0.196  0 0.000
#> GSM1009161     3  0.0000      1.000 0.000 0.000  1 0.000
#> GSM1009175     2  0.0188      0.952 0.000 0.996  0 0.004
#> GSM1009189     1  0.4679      0.691 0.648 0.352  0 0.000
#> GSM1009064     1  0.3528      0.849 0.808 0.192  0 0.000
#> GSM1009078     2  0.0817      0.948 0.000 0.976  0 0.024
#> GSM1009092     1  0.0000      0.819 1.000 0.000  0 0.000
#> GSM1009106     4  0.0000      1.000 0.000 0.000  0 1.000
#> GSM1009120     2  0.3486      0.720 0.188 0.812  0 0.000
#> GSM1009134     1  0.0000      0.819 1.000 0.000  0 0.000
#> GSM1009148     1  0.3569      0.847 0.804 0.196  0 0.000
#> GSM1009162     3  0.0000      1.000 0.000 0.000  1 0.000
#> GSM1009176     2  0.0188      0.952 0.000 0.996  0 0.004
#> GSM1009190     1  0.4679      0.691 0.648 0.352  0 0.000
#> GSM1009065     1  0.3528      0.849 0.808 0.192  0 0.000
#> GSM1009079     2  0.0817      0.948 0.000 0.976  0 0.024
#> GSM1009093     1  0.0000      0.819 1.000 0.000  0 0.000
#> GSM1009107     4  0.0000      1.000 0.000 0.000  0 1.000
#> GSM1009121     2  0.0000      0.951 0.000 1.000  0 0.000
#> GSM1009135     1  0.0000      0.819 1.000 0.000  0 0.000
#> GSM1009149     1  0.3528      0.849 0.808 0.192  0 0.000
#> GSM1009163     3  0.0000      1.000 0.000 0.000  1 0.000
#> GSM1009177     2  0.0188      0.952 0.000 0.996  0 0.004
#> GSM1009191     1  0.4679      0.691 0.648 0.352  0 0.000
#> GSM1009066     1  0.3528      0.849 0.808 0.192  0 0.000
#> GSM1009080     2  0.0817      0.948 0.000 0.976  0 0.024
#> GSM1009094     1  0.0000      0.819 1.000 0.000  0 0.000
#> GSM1009108     4  0.0000      1.000 0.000 0.000  0 1.000
#> GSM1009122     2  0.0000      0.951 0.000 1.000  0 0.000
#> GSM1009136     1  0.0000      0.819 1.000 0.000  0 0.000
#> GSM1009150     1  0.3528      0.849 0.808 0.192  0 0.000
#> GSM1009164     3  0.0000      1.000 0.000 0.000  1 0.000
#> GSM1009178     2  0.0188      0.952 0.000 0.996  0 0.004
#> GSM1009192     1  0.4679      0.691 0.648 0.352  0 0.000
#> GSM1009067     1  0.3528      0.849 0.808 0.192  0 0.000
#> GSM1009081     2  0.0817      0.948 0.000 0.976  0 0.024
#> GSM1009095     1  0.0000      0.819 1.000 0.000  0 0.000
#> GSM1009109     4  0.0000      1.000 0.000 0.000  0 1.000
#> GSM1009123     2  0.3486      0.720 0.188 0.812  0 0.000
#> GSM1009137     1  0.0000      0.819 1.000 0.000  0 0.000
#> GSM1009151     1  0.3569      0.847 0.804 0.196  0 0.000
#> GSM1009165     3  0.0000      1.000 0.000 0.000  1 0.000
#> GSM1009179     2  0.0188      0.952 0.000 0.996  0 0.004
#> GSM1009193     1  0.4679      0.691 0.648 0.352  0 0.000
#> GSM1009068     1  0.3528      0.849 0.808 0.192  0 0.000
#> GSM1009082     2  0.0817      0.948 0.000 0.976  0 0.024
#> GSM1009096     1  0.0000      0.819 1.000 0.000  0 0.000
#> GSM1009110     4  0.0000      1.000 0.000 0.000  0 1.000
#> GSM1009124     2  0.3486      0.720 0.188 0.812  0 0.000
#> GSM1009138     1  0.0000      0.819 1.000 0.000  0 0.000
#> GSM1009152     1  0.3569      0.847 0.804 0.196  0 0.000
#> GSM1009166     3  0.0000      1.000 0.000 0.000  1 0.000
#> GSM1009180     2  0.0188      0.952 0.000 0.996  0 0.004
#> GSM1009194     1  0.4679      0.691 0.648 0.352  0 0.000
#> GSM1009069     1  0.3528      0.849 0.808 0.192  0 0.000
#> GSM1009083     2  0.0817      0.948 0.000 0.976  0 0.024
#> GSM1009097     1  0.0000      0.819 1.000 0.000  0 0.000
#> GSM1009111     4  0.0000      1.000 0.000 0.000  0 1.000
#> GSM1009125     2  0.0000      0.951 0.000 1.000  0 0.000
#> GSM1009139     1  0.0000      0.819 1.000 0.000  0 0.000
#> GSM1009153     1  0.3569      0.847 0.804 0.196  0 0.000
#> GSM1009167     3  0.0000      1.000 0.000 0.000  1 0.000
#> GSM1009181     2  0.0188      0.952 0.000 0.996  0 0.004
#> GSM1009195     1  0.4679      0.691 0.648 0.352  0 0.000
#> GSM1009070     1  0.3528      0.849 0.808 0.192  0 0.000
#> GSM1009084     2  0.0817      0.948 0.000 0.976  0 0.024
#> GSM1009098     1  0.0000      0.819 1.000 0.000  0 0.000
#> GSM1009112     4  0.0000      1.000 0.000 0.000  0 1.000
#> GSM1009126     2  0.3486      0.720 0.188 0.812  0 0.000
#> GSM1009140     1  0.0000      0.819 1.000 0.000  0 0.000
#> GSM1009154     1  0.3569      0.847 0.804 0.196  0 0.000
#> GSM1009168     3  0.0000      1.000 0.000 0.000  1 0.000
#> GSM1009182     2  0.0188      0.952 0.000 0.996  0 0.004
#> GSM1009196     1  0.4679      0.691 0.648 0.352  0 0.000
#> GSM1009071     1  0.3528      0.849 0.808 0.192  0 0.000
#> GSM1009085     2  0.0817      0.948 0.000 0.976  0 0.024
#> GSM1009099     1  0.0000      0.819 1.000 0.000  0 0.000
#> GSM1009113     4  0.0000      1.000 0.000 0.000  0 1.000
#> GSM1009127     2  0.3486      0.720 0.188 0.812  0 0.000
#> GSM1009141     1  0.0000      0.819 1.000 0.000  0 0.000
#> GSM1009155     1  0.3569      0.847 0.804 0.196  0 0.000
#> GSM1009169     3  0.0000      1.000 0.000 0.000  1 0.000
#> GSM1009183     2  0.0188      0.952 0.000 0.996  0 0.004
#> GSM1009197     1  0.4679      0.691 0.648 0.352  0 0.000
#> GSM1009072     1  0.3528      0.849 0.808 0.192  0 0.000
#> GSM1009086     2  0.0817      0.948 0.000 0.976  0 0.024
#> GSM1009100     1  0.0000      0.819 1.000 0.000  0 0.000
#> GSM1009114     4  0.0000      1.000 0.000 0.000  0 1.000
#> GSM1009128     2  0.0000      0.951 0.000 1.000  0 0.000
#> GSM1009142     1  0.0000      0.819 1.000 0.000  0 0.000
#> GSM1009156     1  0.3569      0.847 0.804 0.196  0 0.000
#> GSM1009170     3  0.0000      1.000 0.000 0.000  1 0.000
#> GSM1009184     2  0.0188      0.952 0.000 0.996  0 0.004
#> GSM1009198     1  0.4679      0.691 0.648 0.352  0 0.000
#> GSM1009073     1  0.3528      0.849 0.808 0.192  0 0.000
#> GSM1009087     2  0.0817      0.948 0.000 0.976  0 0.024
#> GSM1009101     1  0.0000      0.819 1.000 0.000  0 0.000
#> GSM1009115     4  0.0000      1.000 0.000 0.000  0 1.000
#> GSM1009129     2  0.0000      0.951 0.000 1.000  0 0.000
#> GSM1009143     1  0.0000      0.819 1.000 0.000  0 0.000
#> GSM1009157     1  0.3569      0.847 0.804 0.196  0 0.000
#> GSM1009171     3  0.0000      1.000 0.000 0.000  1 0.000
#> GSM1009185     2  0.0188      0.952 0.000 0.996  0 0.004
#> GSM1009199     1  0.4679      0.691 0.648 0.352  0 0.000
#> GSM1009074     1  0.3528      0.849 0.808 0.192  0 0.000
#> GSM1009088     2  0.0817      0.948 0.000 0.976  0 0.024
#> GSM1009102     1  0.0000      0.819 1.000 0.000  0 0.000
#> GSM1009116     4  0.0000      1.000 0.000 0.000  0 1.000
#> GSM1009130     2  0.0000      0.951 0.000 1.000  0 0.000
#> GSM1009144     1  0.0000      0.819 1.000 0.000  0 0.000
#> GSM1009158     1  0.3528      0.849 0.808 0.192  0 0.000
#> GSM1009172     3  0.0000      1.000 0.000 0.000  1 0.000
#> GSM1009186     2  0.0188      0.952 0.000 0.996  0 0.004
#> GSM1009200     1  0.4679      0.691 0.648 0.352  0 0.000
#> GSM1009075     1  0.3528      0.849 0.808 0.192  0 0.000
#> GSM1009089     2  0.0817      0.948 0.000 0.976  0 0.024
#> GSM1009103     1  0.0000      0.819 1.000 0.000  0 0.000
#> GSM1009117     4  0.0000      1.000 0.000 0.000  0 1.000
#> GSM1009131     2  0.0000      0.951 0.000 1.000  0 0.000
#> GSM1009145     1  0.0000      0.819 1.000 0.000  0 0.000
#> GSM1009159     1  0.3528      0.849 0.808 0.192  0 0.000
#> GSM1009173     3  0.0000      1.000 0.000 0.000  1 0.000
#> GSM1009187     2  0.0188      0.952 0.000 0.996  0 0.004
#> GSM1009201     1  0.4679      0.691 0.648 0.352  0 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
#> GSM1009062     1   0.374      0.832 0.732 0.004  0 0.264 0.000
#> GSM1009076     4   0.333      1.000 0.000 0.208  0 0.788 0.004
#> GSM1009090     1   0.000      0.810 1.000 0.000  0 0.000 0.000
#> GSM1009104     5   0.000      1.000 0.000 0.000  0 0.000 1.000
#> GSM1009118     2   0.000      0.825 0.000 1.000  0 0.000 0.000
#> GSM1009132     1   0.000      0.810 1.000 0.000  0 0.000 0.000
#> GSM1009146     1   0.453      0.831 0.728 0.060  0 0.212 0.000
#> GSM1009160     3   0.000      1.000 0.000 0.000  1 0.000 0.000
#> GSM1009174     2   0.223      0.837 0.000 0.884  0 0.116 0.000
#> GSM1009188     1   0.609      0.712 0.572 0.216  0 0.212 0.000
#> GSM1009063     1   0.374      0.832 0.732 0.004  0 0.264 0.000
#> GSM1009077     4   0.333      1.000 0.000 0.208  0 0.788 0.004
#> GSM1009091     1   0.000      0.810 1.000 0.000  0 0.000 0.000
#> GSM1009105     5   0.000      1.000 0.000 0.000  0 0.000 1.000
#> GSM1009119     2   0.300      0.642 0.188 0.812  0 0.000 0.000
#> GSM1009133     1   0.000      0.810 1.000 0.000  0 0.000 0.000
#> GSM1009147     1   0.453      0.831 0.728 0.060  0 0.212 0.000
#> GSM1009161     3   0.000      1.000 0.000 0.000  1 0.000 0.000
#> GSM1009175     2   0.223      0.837 0.000 0.884  0 0.116 0.000
#> GSM1009189     1   0.609      0.712 0.572 0.216  0 0.212 0.000
#> GSM1009064     1   0.374      0.832 0.732 0.004  0 0.264 0.000
#> GSM1009078     4   0.333      1.000 0.000 0.208  0 0.788 0.004
#> GSM1009092     1   0.000      0.810 1.000 0.000  0 0.000 0.000
#> GSM1009106     5   0.000      1.000 0.000 0.000  0 0.000 1.000
#> GSM1009120     2   0.300      0.642 0.188 0.812  0 0.000 0.000
#> GSM1009134     1   0.000      0.810 1.000 0.000  0 0.000 0.000
#> GSM1009148     1   0.453      0.831 0.728 0.060  0 0.212 0.000
#> GSM1009162     3   0.000      1.000 0.000 0.000  1 0.000 0.000
#> GSM1009176     2   0.223      0.837 0.000 0.884  0 0.116 0.000
#> GSM1009190     1   0.609      0.712 0.572 0.216  0 0.212 0.000
#> GSM1009065     1   0.374      0.832 0.732 0.004  0 0.264 0.000
#> GSM1009079     4   0.333      1.000 0.000 0.208  0 0.788 0.004
#> GSM1009093     1   0.000      0.810 1.000 0.000  0 0.000 0.000
#> GSM1009107     5   0.000      1.000 0.000 0.000  0 0.000 1.000
#> GSM1009121     2   0.000      0.825 0.000 1.000  0 0.000 0.000
#> GSM1009135     1   0.000      0.810 1.000 0.000  0 0.000 0.000
#> GSM1009149     1   0.447      0.832 0.732 0.056  0 0.212 0.000
#> GSM1009163     3   0.000      1.000 0.000 0.000  1 0.000 0.000
#> GSM1009177     2   0.223      0.837 0.000 0.884  0 0.116 0.000
#> GSM1009191     1   0.609      0.712 0.572 0.216  0 0.212 0.000
#> GSM1009066     1   0.374      0.832 0.732 0.004  0 0.264 0.000
#> GSM1009080     4   0.333      1.000 0.000 0.208  0 0.788 0.004
#> GSM1009094     1   0.000      0.810 1.000 0.000  0 0.000 0.000
#> GSM1009108     5   0.000      1.000 0.000 0.000  0 0.000 1.000
#> GSM1009122     2   0.000      0.825 0.000 1.000  0 0.000 0.000
#> GSM1009136     1   0.000      0.810 1.000 0.000  0 0.000 0.000
#> GSM1009150     1   0.447      0.832 0.732 0.056  0 0.212 0.000
#> GSM1009164     3   0.000      1.000 0.000 0.000  1 0.000 0.000
#> GSM1009178     2   0.223      0.837 0.000 0.884  0 0.116 0.000
#> GSM1009192     1   0.609      0.712 0.572 0.216  0 0.212 0.000
#> GSM1009067     1   0.374      0.832 0.732 0.004  0 0.264 0.000
#> GSM1009081     4   0.333      1.000 0.000 0.208  0 0.788 0.004
#> GSM1009095     1   0.000      0.810 1.000 0.000  0 0.000 0.000
#> GSM1009109     5   0.000      1.000 0.000 0.000  0 0.000 1.000
#> GSM1009123     2   0.300      0.642 0.188 0.812  0 0.000 0.000
#> GSM1009137     1   0.000      0.810 1.000 0.000  0 0.000 0.000
#> GSM1009151     1   0.453      0.831 0.728 0.060  0 0.212 0.000
#> GSM1009165     3   0.000      1.000 0.000 0.000  1 0.000 0.000
#> GSM1009179     2   0.223      0.837 0.000 0.884  0 0.116 0.000
#> GSM1009193     1   0.609      0.712 0.572 0.216  0 0.212 0.000
#> GSM1009068     1   0.374      0.832 0.732 0.004  0 0.264 0.000
#> GSM1009082     4   0.333      1.000 0.000 0.208  0 0.788 0.004
#> GSM1009096     1   0.000      0.810 1.000 0.000  0 0.000 0.000
#> GSM1009110     5   0.000      1.000 0.000 0.000  0 0.000 1.000
#> GSM1009124     2   0.300      0.642 0.188 0.812  0 0.000 0.000
#> GSM1009138     1   0.000      0.810 1.000 0.000  0 0.000 0.000
#> GSM1009152     1   0.453      0.831 0.728 0.060  0 0.212 0.000
#> GSM1009166     3   0.000      1.000 0.000 0.000  1 0.000 0.000
#> GSM1009180     2   0.223      0.837 0.000 0.884  0 0.116 0.000
#> GSM1009194     1   0.609      0.712 0.572 0.216  0 0.212 0.000
#> GSM1009069     1   0.374      0.832 0.732 0.004  0 0.264 0.000
#> GSM1009083     4   0.333      1.000 0.000 0.208  0 0.788 0.004
#> GSM1009097     1   0.000      0.810 1.000 0.000  0 0.000 0.000
#> GSM1009111     5   0.000      1.000 0.000 0.000  0 0.000 1.000
#> GSM1009125     2   0.000      0.825 0.000 1.000  0 0.000 0.000
#> GSM1009139     1   0.000      0.810 1.000 0.000  0 0.000 0.000
#> GSM1009153     1   0.453      0.831 0.728 0.060  0 0.212 0.000
#> GSM1009167     3   0.000      1.000 0.000 0.000  1 0.000 0.000
#> GSM1009181     2   0.223      0.837 0.000 0.884  0 0.116 0.000
#> GSM1009195     1   0.609      0.712 0.572 0.216  0 0.212 0.000
#> GSM1009070     1   0.374      0.832 0.732 0.004  0 0.264 0.000
#> GSM1009084     4   0.333      1.000 0.000 0.208  0 0.788 0.004
#> GSM1009098     1   0.000      0.810 1.000 0.000  0 0.000 0.000
#> GSM1009112     5   0.000      1.000 0.000 0.000  0 0.000 1.000
#> GSM1009126     2   0.300      0.642 0.188 0.812  0 0.000 0.000
#> GSM1009140     1   0.000      0.810 1.000 0.000  0 0.000 0.000
#> GSM1009154     1   0.453      0.831 0.728 0.060  0 0.212 0.000
#> GSM1009168     3   0.000      1.000 0.000 0.000  1 0.000 0.000
#> GSM1009182     2   0.223      0.837 0.000 0.884  0 0.116 0.000
#> GSM1009196     1   0.609      0.712 0.572 0.216  0 0.212 0.000
#> GSM1009071     1   0.374      0.832 0.732 0.004  0 0.264 0.000
#> GSM1009085     4   0.333      1.000 0.000 0.208  0 0.788 0.004
#> GSM1009099     1   0.000      0.810 1.000 0.000  0 0.000 0.000
#> GSM1009113     5   0.000      1.000 0.000 0.000  0 0.000 1.000
#> GSM1009127     2   0.300      0.642 0.188 0.812  0 0.000 0.000
#> GSM1009141     1   0.000      0.810 1.000 0.000  0 0.000 0.000
#> GSM1009155     1   0.453      0.831 0.728 0.060  0 0.212 0.000
#> GSM1009169     3   0.000      1.000 0.000 0.000  1 0.000 0.000
#> GSM1009183     2   0.223      0.837 0.000 0.884  0 0.116 0.000
#> GSM1009197     1   0.609      0.712 0.572 0.216  0 0.212 0.000
#> GSM1009072     1   0.374      0.832 0.732 0.004  0 0.264 0.000
#> GSM1009086     4   0.333      1.000 0.000 0.208  0 0.788 0.004
#> GSM1009100     1   0.000      0.810 1.000 0.000  0 0.000 0.000
#> GSM1009114     5   0.000      1.000 0.000 0.000  0 0.000 1.000
#> GSM1009128     2   0.000      0.825 0.000 1.000  0 0.000 0.000
#> GSM1009142     1   0.000      0.810 1.000 0.000  0 0.000 0.000
#> GSM1009156     1   0.453      0.831 0.728 0.060  0 0.212 0.000
#> GSM1009170     3   0.000      1.000 0.000 0.000  1 0.000 0.000
#> GSM1009184     2   0.223      0.837 0.000 0.884  0 0.116 0.000
#> GSM1009198     1   0.609      0.712 0.572 0.216  0 0.212 0.000
#> GSM1009073     1   0.374      0.832 0.732 0.004  0 0.264 0.000
#> GSM1009087     4   0.333      1.000 0.000 0.208  0 0.788 0.004
#> GSM1009101     1   0.000      0.810 1.000 0.000  0 0.000 0.000
#> GSM1009115     5   0.000      1.000 0.000 0.000  0 0.000 1.000
#> GSM1009129     2   0.000      0.825 0.000 1.000  0 0.000 0.000
#> GSM1009143     1   0.000      0.810 1.000 0.000  0 0.000 0.000
#> GSM1009157     1   0.453      0.831 0.728 0.060  0 0.212 0.000
#> GSM1009171     3   0.000      1.000 0.000 0.000  1 0.000 0.000
#> GSM1009185     2   0.223      0.837 0.000 0.884  0 0.116 0.000
#> GSM1009199     1   0.609      0.712 0.572 0.216  0 0.212 0.000
#> GSM1009074     1   0.374      0.832 0.732 0.004  0 0.264 0.000
#> GSM1009088     4   0.333      1.000 0.000 0.208  0 0.788 0.004
#> GSM1009102     1   0.000      0.810 1.000 0.000  0 0.000 0.000
#> GSM1009116     5   0.000      1.000 0.000 0.000  0 0.000 1.000
#> GSM1009130     2   0.000      0.825 0.000 1.000  0 0.000 0.000
#> GSM1009144     1   0.000      0.810 1.000 0.000  0 0.000 0.000
#> GSM1009158     1   0.447      0.832 0.732 0.056  0 0.212 0.000
#> GSM1009172     3   0.000      1.000 0.000 0.000  1 0.000 0.000
#> GSM1009186     2   0.223      0.837 0.000 0.884  0 0.116 0.000
#> GSM1009200     1   0.609      0.712 0.572 0.216  0 0.212 0.000
#> GSM1009075     1   0.374      0.832 0.732 0.004  0 0.264 0.000
#> GSM1009089     4   0.333      1.000 0.000 0.208  0 0.788 0.004
#> GSM1009103     1   0.000      0.810 1.000 0.000  0 0.000 0.000
#> GSM1009117     5   0.000      1.000 0.000 0.000  0 0.000 1.000
#> GSM1009131     2   0.000      0.825 0.000 1.000  0 0.000 0.000
#> GSM1009145     1   0.000      0.810 1.000 0.000  0 0.000 0.000
#> GSM1009159     1   0.447      0.832 0.732 0.056  0 0.212 0.000
#> GSM1009173     3   0.000      1.000 0.000 0.000  1 0.000 0.000
#> GSM1009187     2   0.223      0.837 0.000 0.884  0 0.116 0.000
#> GSM1009201     1   0.609      0.712 0.572 0.216  0 0.212 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
#> GSM1009062     1   0.114      0.889 0.948 0.000  0 0.000  0 0.052
#> GSM1009076     6   0.000      1.000 0.000 0.000  0 0.000  0 1.000
#> GSM1009090     4   0.000      1.000 0.000 0.000  0 1.000  0 0.000
#> GSM1009104     5   0.000      1.000 0.000 0.000  0 0.000  1 0.000
#> GSM1009118     2   0.000      0.734 0.000 1.000  0 0.000  0 0.000
#> GSM1009132     4   0.000      1.000 0.000 0.000  0 1.000  0 0.000
#> GSM1009146     1   0.141      0.896 0.936 0.004  0 0.060  0 0.000
#> GSM1009160     3   0.000      1.000 0.000 0.000  1 0.000  0 0.000
#> GSM1009174     2   0.371      0.715 0.008 0.680  0 0.000  0 0.312
#> GSM1009188     1   0.245      0.844 0.840 0.160  0 0.000  0 0.000
#> GSM1009063     1   0.114      0.889 0.948 0.000  0 0.000  0 0.052
#> GSM1009077     6   0.000      1.000 0.000 0.000  0 0.000  0 1.000
#> GSM1009091     4   0.000      1.000 0.000 0.000  0 1.000  0 0.000
#> GSM1009105     5   0.000      1.000 0.000 0.000  0 0.000  1 0.000
#> GSM1009119     2   0.270      0.637 0.188 0.812  0 0.000  0 0.000
#> GSM1009133     4   0.000      1.000 0.000 0.000  0 1.000  0 0.000
#> GSM1009147     1   0.141      0.896 0.936 0.004  0 0.060  0 0.000
#> GSM1009161     3   0.000      1.000 0.000 0.000  1 0.000  0 0.000
#> GSM1009175     2   0.371      0.715 0.008 0.680  0 0.000  0 0.312
#> GSM1009189     1   0.245      0.844 0.840 0.160  0 0.000  0 0.000
#> GSM1009064     1   0.114      0.889 0.948 0.000  0 0.000  0 0.052
#> GSM1009078     6   0.000      1.000 0.000 0.000  0 0.000  0 1.000
#> GSM1009092     4   0.000      1.000 0.000 0.000  0 1.000  0 0.000
#> GSM1009106     5   0.000      1.000 0.000 0.000  0 0.000  1 0.000
#> GSM1009120     2   0.270      0.637 0.188 0.812  0 0.000  0 0.000
#> GSM1009134     4   0.000      1.000 0.000 0.000  0 1.000  0 0.000
#> GSM1009148     1   0.141      0.896 0.936 0.004  0 0.060  0 0.000
#> GSM1009162     3   0.000      1.000 0.000 0.000  1 0.000  0 0.000
#> GSM1009176     2   0.371      0.715 0.008 0.680  0 0.000  0 0.312
#> GSM1009190     1   0.245      0.844 0.840 0.160  0 0.000  0 0.000
#> GSM1009065     1   0.114      0.889 0.948 0.000  0 0.000  0 0.052
#> GSM1009079     6   0.000      1.000 0.000 0.000  0 0.000  0 1.000
#> GSM1009093     4   0.000      1.000 0.000 0.000  0 1.000  0 0.000
#> GSM1009107     5   0.000      1.000 0.000 0.000  0 0.000  1 0.000
#> GSM1009121     2   0.000      0.734 0.000 1.000  0 0.000  0 0.000
#> GSM1009135     4   0.000      1.000 0.000 0.000  0 1.000  0 0.000
#> GSM1009149     1   0.133      0.894 0.936 0.000  0 0.064  0 0.000
#> GSM1009163     3   0.000      1.000 0.000 0.000  1 0.000  0 0.000
#> GSM1009177     2   0.371      0.715 0.008 0.680  0 0.000  0 0.312
#> GSM1009191     1   0.245      0.844 0.840 0.160  0 0.000  0 0.000
#> GSM1009066     1   0.114      0.889 0.948 0.000  0 0.000  0 0.052
#> GSM1009080     6   0.000      1.000 0.000 0.000  0 0.000  0 1.000
#> GSM1009094     4   0.000      1.000 0.000 0.000  0 1.000  0 0.000
#> GSM1009108     5   0.000      1.000 0.000 0.000  0 0.000  1 0.000
#> GSM1009122     2   0.000      0.734 0.000 1.000  0 0.000  0 0.000
#> GSM1009136     4   0.000      1.000 0.000 0.000  0 1.000  0 0.000
#> GSM1009150     1   0.133      0.894 0.936 0.000  0 0.064  0 0.000
#> GSM1009164     3   0.000      1.000 0.000 0.000  1 0.000  0 0.000
#> GSM1009178     2   0.371      0.715 0.008 0.680  0 0.000  0 0.312
#> GSM1009192     1   0.245      0.844 0.840 0.160  0 0.000  0 0.000
#> GSM1009067     1   0.114      0.889 0.948 0.000  0 0.000  0 0.052
#> GSM1009081     6   0.000      1.000 0.000 0.000  0 0.000  0 1.000
#> GSM1009095     4   0.000      1.000 0.000 0.000  0 1.000  0 0.000
#> GSM1009109     5   0.000      1.000 0.000 0.000  0 0.000  1 0.000
#> GSM1009123     2   0.270      0.637 0.188 0.812  0 0.000  0 0.000
#> GSM1009137     4   0.000      1.000 0.000 0.000  0 1.000  0 0.000
#> GSM1009151     1   0.141      0.896 0.936 0.004  0 0.060  0 0.000
#> GSM1009165     3   0.000      1.000 0.000 0.000  1 0.000  0 0.000
#> GSM1009179     2   0.371      0.715 0.008 0.680  0 0.000  0 0.312
#> GSM1009193     1   0.245      0.844 0.840 0.160  0 0.000  0 0.000
#> GSM1009068     1   0.114      0.889 0.948 0.000  0 0.000  0 0.052
#> GSM1009082     6   0.000      1.000 0.000 0.000  0 0.000  0 1.000
#> GSM1009096     4   0.000      1.000 0.000 0.000  0 1.000  0 0.000
#> GSM1009110     5   0.000      1.000 0.000 0.000  0 0.000  1 0.000
#> GSM1009124     2   0.270      0.637 0.188 0.812  0 0.000  0 0.000
#> GSM1009138     4   0.000      1.000 0.000 0.000  0 1.000  0 0.000
#> GSM1009152     1   0.141      0.896 0.936 0.004  0 0.060  0 0.000
#> GSM1009166     3   0.000      1.000 0.000 0.000  1 0.000  0 0.000
#> GSM1009180     2   0.371      0.715 0.008 0.680  0 0.000  0 0.312
#> GSM1009194     1   0.245      0.844 0.840 0.160  0 0.000  0 0.000
#> GSM1009069     1   0.114      0.889 0.948 0.000  0 0.000  0 0.052
#> GSM1009083     6   0.000      1.000 0.000 0.000  0 0.000  0 1.000
#> GSM1009097     4   0.000      1.000 0.000 0.000  0 1.000  0 0.000
#> GSM1009111     5   0.000      1.000 0.000 0.000  0 0.000  1 0.000
#> GSM1009125     2   0.000      0.734 0.000 1.000  0 0.000  0 0.000
#> GSM1009139     4   0.000      1.000 0.000 0.000  0 1.000  0 0.000
#> GSM1009153     1   0.141      0.896 0.936 0.004  0 0.060  0 0.000
#> GSM1009167     3   0.000      1.000 0.000 0.000  1 0.000  0 0.000
#> GSM1009181     2   0.371      0.715 0.008 0.680  0 0.000  0 0.312
#> GSM1009195     1   0.245      0.844 0.840 0.160  0 0.000  0 0.000
#> GSM1009070     1   0.114      0.889 0.948 0.000  0 0.000  0 0.052
#> GSM1009084     6   0.000      1.000 0.000 0.000  0 0.000  0 1.000
#> GSM1009098     4   0.000      1.000 0.000 0.000  0 1.000  0 0.000
#> GSM1009112     5   0.000      1.000 0.000 0.000  0 0.000  1 0.000
#> GSM1009126     2   0.270      0.637 0.188 0.812  0 0.000  0 0.000
#> GSM1009140     4   0.000      1.000 0.000 0.000  0 1.000  0 0.000
#> GSM1009154     1   0.141      0.896 0.936 0.004  0 0.060  0 0.000
#> GSM1009168     3   0.000      1.000 0.000 0.000  1 0.000  0 0.000
#> GSM1009182     2   0.371      0.715 0.008 0.680  0 0.000  0 0.312
#> GSM1009196     1   0.245      0.844 0.840 0.160  0 0.000  0 0.000
#> GSM1009071     1   0.114      0.889 0.948 0.000  0 0.000  0 0.052
#> GSM1009085     6   0.000      1.000 0.000 0.000  0 0.000  0 1.000
#> GSM1009099     4   0.000      1.000 0.000 0.000  0 1.000  0 0.000
#> GSM1009113     5   0.000      1.000 0.000 0.000  0 0.000  1 0.000
#> GSM1009127     2   0.270      0.637 0.188 0.812  0 0.000  0 0.000
#> GSM1009141     4   0.000      1.000 0.000 0.000  0 1.000  0 0.000
#> GSM1009155     1   0.141      0.896 0.936 0.004  0 0.060  0 0.000
#> GSM1009169     3   0.000      1.000 0.000 0.000  1 0.000  0 0.000
#> GSM1009183     2   0.371      0.715 0.008 0.680  0 0.000  0 0.312
#> GSM1009197     1   0.245      0.844 0.840 0.160  0 0.000  0 0.000
#> GSM1009072     1   0.114      0.889 0.948 0.000  0 0.000  0 0.052
#> GSM1009086     6   0.000      1.000 0.000 0.000  0 0.000  0 1.000
#> GSM1009100     4   0.000      1.000 0.000 0.000  0 1.000  0 0.000
#> GSM1009114     5   0.000      1.000 0.000 0.000  0 0.000  1 0.000
#> GSM1009128     2   0.000      0.734 0.000 1.000  0 0.000  0 0.000
#> GSM1009142     4   0.000      1.000 0.000 0.000  0 1.000  0 0.000
#> GSM1009156     1   0.141      0.896 0.936 0.004  0 0.060  0 0.000
#> GSM1009170     3   0.000      1.000 0.000 0.000  1 0.000  0 0.000
#> GSM1009184     2   0.371      0.715 0.008 0.680  0 0.000  0 0.312
#> GSM1009198     1   0.245      0.844 0.840 0.160  0 0.000  0 0.000
#> GSM1009073     1   0.114      0.889 0.948 0.000  0 0.000  0 0.052
#> GSM1009087     6   0.000      1.000 0.000 0.000  0 0.000  0 1.000
#> GSM1009101     4   0.000      1.000 0.000 0.000  0 1.000  0 0.000
#> GSM1009115     5   0.000      1.000 0.000 0.000  0 0.000  1 0.000
#> GSM1009129     2   0.000      0.734 0.000 1.000  0 0.000  0 0.000
#> GSM1009143     4   0.000      1.000 0.000 0.000  0 1.000  0 0.000
#> GSM1009157     1   0.141      0.896 0.936 0.004  0 0.060  0 0.000
#> GSM1009171     3   0.000      1.000 0.000 0.000  1 0.000  0 0.000
#> GSM1009185     2   0.371      0.715 0.008 0.680  0 0.000  0 0.312
#> GSM1009199     1   0.245      0.844 0.840 0.160  0 0.000  0 0.000
#> GSM1009074     1   0.114      0.889 0.948 0.000  0 0.000  0 0.052
#> GSM1009088     6   0.000      1.000 0.000 0.000  0 0.000  0 1.000
#> GSM1009102     4   0.000      1.000 0.000 0.000  0 1.000  0 0.000
#> GSM1009116     5   0.000      1.000 0.000 0.000  0 0.000  1 0.000
#> GSM1009130     2   0.000      0.734 0.000 1.000  0 0.000  0 0.000
#> GSM1009144     4   0.000      1.000 0.000 0.000  0 1.000  0 0.000
#> GSM1009158     1   0.133      0.894 0.936 0.000  0 0.064  0 0.000
#> GSM1009172     3   0.000      1.000 0.000 0.000  1 0.000  0 0.000
#> GSM1009186     2   0.371      0.715 0.008 0.680  0 0.000  0 0.312
#> GSM1009200     1   0.245      0.844 0.840 0.160  0 0.000  0 0.000
#> GSM1009075     1   0.114      0.889 0.948 0.000  0 0.000  0 0.052
#> GSM1009089     6   0.000      1.000 0.000 0.000  0 0.000  0 1.000
#> GSM1009103     4   0.000      1.000 0.000 0.000  0 1.000  0 0.000
#> GSM1009117     5   0.000      1.000 0.000 0.000  0 0.000  1 0.000
#> GSM1009131     2   0.000      0.734 0.000 1.000  0 0.000  0 0.000
#> GSM1009145     4   0.000      1.000 0.000 0.000  0 1.000  0 0.000
#> GSM1009159     1   0.133      0.894 0.936 0.000  0 0.064  0 0.000
#> GSM1009173     3   0.000      1.000 0.000 0.000  1 0.000  0 0.000
#> GSM1009187     2   0.371      0.715 0.008 0.680  0 0.000  0 0.312
#> GSM1009201     1   0.245      0.844 0.840 0.160  0 0.000  0 0.000

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

consensus_heatmap(res, k = 2)

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

consensus_heatmap(res, k = 3)

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

consensus_heatmap(res, k = 4)

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

consensus_heatmap(res, k = 5)

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

consensus_heatmap(res, k = 6)

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

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

membership_heatmap(res, k = 2)

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

membership_heatmap(res, k = 3)

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

membership_heatmap(res, k = 4)

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

membership_heatmap(res, k = 5)

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

membership_heatmap(res, k = 6)

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

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

Signature heatmaps where rows are scaled:

get_signatures(res, k = 2)

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

get_signatures(res, k = 3)

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

get_signatures(res, k = 4)

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

get_signatures(res, k = 5)

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

get_signatures(res, k = 6)

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

Signature heatmaps where rows are not scaled:

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

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

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

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

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

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

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

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

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

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

Compare the overlap of signatures from different k:

compare_signatures(res)

plot of chunk SD-hclust-signature_compare

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

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

An example of the output of tb is:

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

The columns in tb are:

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

UMAP plot which shows how samples are separated.

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

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

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

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

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

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

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

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

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

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

Following heatmap shows how subgroups are split when increasing k:

collect_classes(res)

plot of chunk SD-hclust-collect-classes

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

test_to_known_factors(res)
#>             n temperature(p) time(p) specimen(p) k
#> SD:hclust 140              1       1    1.03e-25 2
#> SD:hclust 140              1       1    6.13e-49 3
#> SD:hclust 140              1       1    4.16e-72 4
#> SD:hclust 140              1       1    2.99e-95 5
#> SD:hclust 140              1       1   2.21e-118 6

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


SD:kmeans

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

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

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

res
#> A 'ConsensusPartition' object with k = 2, 3, 4, 5, 6.
#>   On a matrix with 51941 rows and 140 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 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-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.323           0.802       0.846         0.3979 0.514   0.514
#> 3 3 0.396           0.625       0.731         0.4323 0.958   0.921
#> 4 4 0.383           0.643       0.685         0.1684 0.750   0.518
#> 5 5 0.476           0.666       0.693         0.1081 0.873   0.600
#> 6 6 0.612           0.744       0.695         0.0561 0.960   0.828

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
#> GSM1009062     1   0.482      0.882 0.896 0.104
#> GSM1009076     2   0.861      0.795 0.284 0.716
#> GSM1009090     1   0.224      0.888 0.964 0.036
#> GSM1009104     2   0.745      0.810 0.212 0.788
#> GSM1009118     1   0.634      0.792 0.840 0.160
#> GSM1009132     1   0.224      0.888 0.964 0.036
#> GSM1009146     1   0.327      0.907 0.940 0.060
#> GSM1009160     2   0.443      0.724 0.092 0.908
#> GSM1009174     2   0.987      0.646 0.432 0.568
#> GSM1009188     1   0.343      0.907 0.936 0.064
#> GSM1009063     1   0.482      0.882 0.896 0.104
#> GSM1009077     2   0.861      0.795 0.284 0.716
#> GSM1009091     1   0.224      0.888 0.964 0.036
#> GSM1009105     2   0.745      0.810 0.212 0.788
#> GSM1009119     1   0.343      0.907 0.936 0.064
#> GSM1009133     1   0.224      0.888 0.964 0.036
#> GSM1009147     1   0.327      0.907 0.940 0.060
#> GSM1009161     2   0.443      0.724 0.092 0.908
#> GSM1009175     2   0.987      0.646 0.432 0.568
#> GSM1009189     1   0.343      0.907 0.936 0.064
#> GSM1009064     1   0.482      0.882 0.896 0.104
#> GSM1009078     2   0.921      0.753 0.336 0.664
#> GSM1009092     1   0.224      0.888 0.964 0.036
#> GSM1009106     2   0.745      0.810 0.212 0.788
#> GSM1009120     1   0.327      0.907 0.940 0.060
#> GSM1009134     1   0.224      0.888 0.964 0.036
#> GSM1009148     1   0.327      0.907 0.940 0.060
#> GSM1009162     2   0.443      0.724 0.092 0.908
#> GSM1009176     2   0.980      0.673 0.416 0.584
#> GSM1009190     1   0.343      0.907 0.936 0.064
#> GSM1009065     1   0.482      0.882 0.896 0.104
#> GSM1009079     2   0.861      0.795 0.284 0.716
#> GSM1009093     1   0.224      0.888 0.964 0.036
#> GSM1009107     2   0.745      0.810 0.212 0.788
#> GSM1009121     1   0.634      0.792 0.840 0.160
#> GSM1009135     1   0.224      0.888 0.964 0.036
#> GSM1009149     1   0.311      0.908 0.944 0.056
#> GSM1009163     2   0.443      0.724 0.092 0.908
#> GSM1009177     2   0.980      0.673 0.416 0.584
#> GSM1009191     1   0.343      0.907 0.936 0.064
#> GSM1009066     1   0.482      0.882 0.896 0.104
#> GSM1009080     2   0.861      0.795 0.284 0.716
#> GSM1009094     1   0.224      0.888 0.964 0.036
#> GSM1009108     2   0.745      0.810 0.212 0.788
#> GSM1009122     1   0.980     -0.142 0.584 0.416
#> GSM1009136     1   0.224      0.888 0.964 0.036
#> GSM1009150     1   0.311      0.908 0.944 0.056
#> GSM1009164     2   0.443      0.724 0.092 0.908
#> GSM1009178     2   0.991      0.620 0.444 0.556
#> GSM1009192     1   0.327      0.907 0.940 0.060
#> GSM1009067     1   0.482      0.882 0.896 0.104
#> GSM1009081     2   0.861      0.795 0.284 0.716
#> GSM1009095     1   0.163      0.888 0.976 0.024
#> GSM1009109     2   0.745      0.810 0.212 0.788
#> GSM1009123     1   0.327      0.908 0.940 0.060
#> GSM1009137     1   0.224      0.888 0.964 0.036
#> GSM1009151     1   0.327      0.907 0.940 0.060
#> GSM1009165     2   0.443      0.724 0.092 0.908
#> GSM1009179     2   0.991      0.620 0.444 0.556
#> GSM1009193     1   0.343      0.907 0.936 0.064
#> GSM1009068     1   0.482      0.882 0.896 0.104
#> GSM1009082     2   0.861      0.795 0.284 0.716
#> GSM1009096     1   0.224      0.888 0.964 0.036
#> GSM1009110     2   0.745      0.810 0.212 0.788
#> GSM1009124     1   0.388      0.902 0.924 0.076
#> GSM1009138     1   0.224      0.888 0.964 0.036
#> GSM1009152     1   0.327      0.907 0.940 0.060
#> GSM1009166     2   0.443      0.724 0.092 0.908
#> GSM1009180     2   0.991      0.620 0.444 0.556
#> GSM1009194     1   0.327      0.907 0.940 0.060
#> GSM1009069     1   0.482      0.882 0.896 0.104
#> GSM1009083     2   0.861      0.795 0.284 0.716
#> GSM1009097     1   0.224      0.888 0.964 0.036
#> GSM1009111     2   0.745      0.810 0.212 0.788
#> GSM1009125     2   0.999      0.524 0.480 0.520
#> GSM1009139     1   0.224      0.888 0.964 0.036
#> GSM1009153     1   0.327      0.907 0.940 0.060
#> GSM1009167     2   0.443      0.724 0.092 0.908
#> GSM1009181     2   0.980      0.673 0.416 0.584
#> GSM1009195     1   0.358      0.905 0.932 0.068
#> GSM1009070     1   0.482      0.882 0.896 0.104
#> GSM1009084     2   0.861      0.795 0.284 0.716
#> GSM1009098     1   0.224      0.888 0.964 0.036
#> GSM1009112     2   0.745      0.810 0.212 0.788
#> GSM1009126     1   0.388      0.902 0.924 0.076
#> GSM1009140     1   0.224      0.888 0.964 0.036
#> GSM1009154     1   0.327      0.907 0.940 0.060
#> GSM1009168     2   0.443      0.724 0.092 0.908
#> GSM1009182     2   0.987      0.646 0.432 0.568
#> GSM1009196     1   0.327      0.907 0.940 0.060
#> GSM1009071     1   0.482      0.882 0.896 0.104
#> GSM1009085     2   0.861      0.795 0.284 0.716
#> GSM1009099     1   0.224      0.888 0.964 0.036
#> GSM1009113     2   0.745      0.810 0.212 0.788
#> GSM1009127     1   0.327      0.907 0.940 0.060
#> GSM1009141     1   0.224      0.888 0.964 0.036
#> GSM1009155     1   0.327      0.907 0.940 0.060
#> GSM1009169     2   0.443      0.724 0.092 0.908
#> GSM1009183     2   0.980      0.673 0.416 0.584
#> GSM1009197     1   0.327      0.907 0.940 0.060
#> GSM1009072     1   0.482      0.882 0.896 0.104
#> GSM1009086     2   0.861      0.795 0.284 0.716
#> GSM1009100     1   0.224      0.888 0.964 0.036
#> GSM1009114     2   0.745      0.810 0.212 0.788
#> GSM1009128     1   0.891      0.402 0.692 0.308
#> GSM1009142     1   0.224      0.888 0.964 0.036
#> GSM1009156     1   0.327      0.907 0.940 0.060
#> GSM1009170     2   0.443      0.724 0.092 0.908
#> GSM1009184     2   0.987      0.646 0.432 0.568
#> GSM1009198     1   0.343      0.907 0.936 0.064
#> GSM1009073     1   0.482      0.882 0.896 0.104
#> GSM1009087     2   0.921      0.753 0.336 0.664
#> GSM1009101     1   0.224      0.888 0.964 0.036
#> GSM1009115     2   0.745      0.810 0.212 0.788
#> GSM1009129     2   0.985      0.651 0.428 0.572
#> GSM1009143     1   0.224      0.888 0.964 0.036
#> GSM1009157     1   0.327      0.907 0.940 0.060
#> GSM1009171     2   0.443      0.724 0.092 0.908
#> GSM1009185     2   0.992      0.611 0.448 0.552
#> GSM1009199     1   0.343      0.907 0.936 0.064
#> GSM1009074     1   0.482      0.882 0.896 0.104
#> GSM1009088     2   0.900      0.772 0.316 0.684
#> GSM1009102     1   0.224      0.888 0.964 0.036
#> GSM1009116     2   0.745      0.810 0.212 0.788
#> GSM1009130     2   0.891      0.783 0.308 0.692
#> GSM1009144     1   0.224      0.888 0.964 0.036
#> GSM1009158     1   0.327      0.907 0.940 0.060
#> GSM1009172     2   0.443      0.724 0.092 0.908
#> GSM1009186     2   0.987      0.646 0.432 0.568
#> GSM1009200     1   0.343      0.907 0.936 0.064
#> GSM1009075     1   0.482      0.882 0.896 0.104
#> GSM1009089     1   0.992     -0.195 0.552 0.448
#> GSM1009103     1   0.224      0.888 0.964 0.036
#> GSM1009117     2   0.745      0.810 0.212 0.788
#> GSM1009131     1   0.904      0.343 0.680 0.320
#> GSM1009145     1   0.224      0.888 0.964 0.036
#> GSM1009159     1   0.311      0.908 0.944 0.056
#> GSM1009173     2   0.443      0.724 0.092 0.908
#> GSM1009187     1   0.946      0.159 0.636 0.364
#> GSM1009201     1   0.343      0.907 0.936 0.064

show/hide code output

cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#>            class entropy silhouette    p1    p2 p3
#> GSM1009062     1  0.7147     0.6344 0.696 0.076 NA
#> GSM1009076     2  0.7297     0.6717 0.188 0.704 NA
#> GSM1009090     1  0.6148     0.6624 0.640 0.004 NA
#> GSM1009104     2  0.3091     0.6971 0.072 0.912 NA
#> GSM1009118     1  0.4790     0.6201 0.848 0.096 NA
#> GSM1009132     1  0.6373     0.6498 0.588 0.004 NA
#> GSM1009146     1  0.2229     0.7345 0.944 0.012 NA
#> GSM1009160     2  0.7640     0.5809 0.056 0.592 NA
#> GSM1009174     2  0.9082     0.4837 0.392 0.468 NA
#> GSM1009188     1  0.0424     0.7372 0.992 0.008 NA
#> GSM1009063     1  0.7147     0.6344 0.696 0.076 NA
#> GSM1009077     2  0.7297     0.6717 0.188 0.704 NA
#> GSM1009091     1  0.6148     0.6624 0.640 0.004 NA
#> GSM1009105     2  0.3091     0.6971 0.072 0.912 NA
#> GSM1009119     1  0.0237     0.7383 0.996 0.000 NA
#> GSM1009133     1  0.6373     0.6498 0.588 0.004 NA
#> GSM1009147     1  0.1999     0.7329 0.952 0.012 NA
#> GSM1009161     2  0.7640     0.5809 0.056 0.592 NA
#> GSM1009175     2  0.9082     0.4837 0.392 0.468 NA
#> GSM1009189     1  0.0424     0.7372 0.992 0.008 NA
#> GSM1009064     1  0.7147     0.6344 0.696 0.076 NA
#> GSM1009078     2  0.8201     0.6110 0.276 0.612 NA
#> GSM1009092     1  0.6148     0.6624 0.640 0.004 NA
#> GSM1009106     2  0.3091     0.6971 0.072 0.912 NA
#> GSM1009120     1  0.0424     0.7391 0.992 0.000 NA
#> GSM1009134     1  0.6373     0.6498 0.588 0.004 NA
#> GSM1009148     1  0.2229     0.7345 0.944 0.012 NA
#> GSM1009162     2  0.7620     0.5809 0.056 0.596 NA
#> GSM1009176     2  0.9082     0.4837 0.392 0.468 NA
#> GSM1009190     1  0.0424     0.7372 0.992 0.008 NA
#> GSM1009065     1  0.7147     0.6344 0.696 0.076 NA
#> GSM1009079     2  0.7297     0.6717 0.188 0.704 NA
#> GSM1009093     1  0.6148     0.6624 0.640 0.004 NA
#> GSM1009107     2  0.3091     0.6971 0.072 0.912 NA
#> GSM1009121     1  0.4859     0.6012 0.840 0.116 NA
#> GSM1009135     1  0.6373     0.6498 0.588 0.004 NA
#> GSM1009149     1  0.2229     0.7345 0.944 0.012 NA
#> GSM1009163     2  0.7640     0.5809 0.056 0.592 NA
#> GSM1009177     2  0.9082     0.4837 0.392 0.468 NA
#> GSM1009191     1  0.0424     0.7372 0.992 0.008 NA
#> GSM1009066     1  0.7147     0.6344 0.696 0.076 NA
#> GSM1009080     2  0.7297     0.6717 0.188 0.704 NA
#> GSM1009094     1  0.6148     0.6624 0.640 0.004 NA
#> GSM1009108     2  0.3091     0.6971 0.072 0.912 NA
#> GSM1009122     1  0.7394     0.1732 0.652 0.284 NA
#> GSM1009136     1  0.6359     0.6502 0.592 0.004 NA
#> GSM1009150     1  0.2339     0.7355 0.940 0.012 NA
#> GSM1009164     2  0.7640     0.5809 0.056 0.592 NA
#> GSM1009178     2  0.9093     0.4685 0.400 0.460 NA
#> GSM1009192     1  0.0424     0.7372 0.992 0.008 NA
#> GSM1009067     1  0.7147     0.6344 0.696 0.076 NA
#> GSM1009081     2  0.7297     0.6717 0.188 0.704 NA
#> GSM1009095     1  0.6148     0.6624 0.640 0.004 NA
#> GSM1009109     2  0.3091     0.6971 0.072 0.912 NA
#> GSM1009123     1  0.0592     0.7379 0.988 0.000 NA
#> GSM1009137     1  0.6373     0.6498 0.588 0.004 NA
#> GSM1009151     1  0.2229     0.7345 0.944 0.012 NA
#> GSM1009165     2  0.7620     0.5809 0.056 0.596 NA
#> GSM1009179     2  0.9093     0.4685 0.400 0.460 NA
#> GSM1009193     1  0.0424     0.7372 0.992 0.008 NA
#> GSM1009068     1  0.7147     0.6344 0.696 0.076 NA
#> GSM1009082     2  0.7297     0.6717 0.188 0.704 NA
#> GSM1009096     1  0.6148     0.6624 0.640 0.004 NA
#> GSM1009110     2  0.3091     0.6971 0.072 0.912 NA
#> GSM1009124     1  0.1765     0.7260 0.956 0.004 NA
#> GSM1009138     1  0.6373     0.6498 0.588 0.004 NA
#> GSM1009152     1  0.2229     0.7345 0.944 0.012 NA
#> GSM1009166     2  0.7620     0.5809 0.056 0.596 NA
#> GSM1009180     2  0.9102     0.4517 0.408 0.452 NA
#> GSM1009194     1  0.0661     0.7374 0.988 0.008 NA
#> GSM1009069     1  0.7106     0.6331 0.700 0.076 NA
#> GSM1009083     2  0.7458     0.6653 0.196 0.692 NA
#> GSM1009097     1  0.6148     0.6624 0.640 0.004 NA
#> GSM1009111     2  0.3091     0.6971 0.072 0.912 NA
#> GSM1009125     1  0.7867    -0.0479 0.584 0.348 NA
#> GSM1009139     1  0.6373     0.6498 0.588 0.004 NA
#> GSM1009153     1  0.2229     0.7345 0.944 0.012 NA
#> GSM1009167     2  0.7620     0.5809 0.056 0.596 NA
#> GSM1009181     2  0.9082     0.4837 0.392 0.468 NA
#> GSM1009195     1  0.1905     0.7221 0.956 0.016 NA
#> GSM1009070     1  0.7064     0.6402 0.704 0.076 NA
#> GSM1009084     2  0.7297     0.6717 0.188 0.704 NA
#> GSM1009098     1  0.6148     0.6624 0.640 0.004 NA
#> GSM1009112     2  0.3091     0.6971 0.072 0.912 NA
#> GSM1009126     1  0.1765     0.7260 0.956 0.004 NA
#> GSM1009140     1  0.6373     0.6498 0.588 0.004 NA
#> GSM1009154     1  0.2229     0.7345 0.944 0.012 NA
#> GSM1009168     2  0.7620     0.5809 0.056 0.596 NA
#> GSM1009182     2  0.9082     0.4837 0.392 0.468 NA
#> GSM1009196     1  0.0592     0.7367 0.988 0.012 NA
#> GSM1009071     1  0.7147     0.6344 0.696 0.076 NA
#> GSM1009085     2  0.7297     0.6717 0.188 0.704 NA
#> GSM1009099     1  0.6148     0.6624 0.640 0.004 NA
#> GSM1009113     2  0.3091     0.6971 0.072 0.912 NA
#> GSM1009127     1  0.0424     0.7384 0.992 0.000 NA
#> GSM1009141     1  0.6373     0.6498 0.588 0.004 NA
#> GSM1009155     1  0.2229     0.7345 0.944 0.012 NA
#> GSM1009169     2  0.7620     0.5809 0.056 0.596 NA
#> GSM1009183     2  0.9082     0.4837 0.392 0.468 NA
#> GSM1009197     1  0.0424     0.7372 0.992 0.008 NA
#> GSM1009072     1  0.7147     0.6344 0.696 0.076 NA
#> GSM1009086     2  0.7297     0.6717 0.188 0.704 NA
#> GSM1009100     1  0.6148     0.6624 0.640 0.004 NA
#> GSM1009114     2  0.3091     0.6971 0.072 0.912 NA
#> GSM1009128     1  0.5955     0.4922 0.772 0.180 NA
#> GSM1009142     1  0.6373     0.6498 0.588 0.004 NA
#> GSM1009156     1  0.2414     0.7266 0.940 0.020 NA
#> GSM1009170     2  0.7640     0.5809 0.056 0.592 NA
#> GSM1009184     2  0.9082     0.4837 0.392 0.468 NA
#> GSM1009198     1  0.0424     0.7372 0.992 0.008 NA
#> GSM1009073     1  0.7147     0.6344 0.696 0.076 NA
#> GSM1009087     2  0.8201     0.6110 0.276 0.612 NA
#> GSM1009101     1  0.6148     0.6624 0.640 0.004 NA
#> GSM1009115     2  0.3091     0.6971 0.072 0.912 NA
#> GSM1009129     1  0.8208    -0.3644 0.476 0.452 NA
#> GSM1009143     1  0.6373     0.6498 0.588 0.004 NA
#> GSM1009157     1  0.3272     0.7080 0.904 0.016 NA
#> GSM1009171     2  0.7640     0.5809 0.056 0.592 NA
#> GSM1009185     2  0.9112     0.4156 0.428 0.432 NA
#> GSM1009199     1  0.1585     0.7275 0.964 0.008 NA
#> GSM1009074     1  0.7147     0.6344 0.696 0.076 NA
#> GSM1009088     2  0.8201     0.6110 0.276 0.612 NA
#> GSM1009102     1  0.6169     0.6615 0.636 0.004 NA
#> GSM1009116     2  0.3091     0.6971 0.072 0.912 NA
#> GSM1009130     2  0.7564     0.6234 0.296 0.636 NA
#> GSM1009144     1  0.6373     0.6498 0.588 0.004 NA
#> GSM1009158     1  0.2229     0.7345 0.944 0.012 NA
#> GSM1009172     2  0.7640     0.5809 0.056 0.592 NA
#> GSM1009186     2  0.9082     0.4837 0.392 0.468 NA
#> GSM1009200     1  0.0424     0.7372 0.992 0.008 NA
#> GSM1009075     1  0.7147     0.6344 0.696 0.076 NA
#> GSM1009089     2  0.8743     0.4811 0.372 0.512 NA
#> GSM1009103     1  0.6169     0.6615 0.636 0.004 NA
#> GSM1009117     2  0.3091     0.6971 0.072 0.912 NA
#> GSM1009131     1  0.6481     0.3854 0.728 0.224 NA
#> GSM1009145     1  0.6359     0.6502 0.592 0.004 NA
#> GSM1009159     1  0.2229     0.7345 0.944 0.012 NA
#> GSM1009173     2  0.7620     0.5809 0.056 0.596 NA
#> GSM1009187     1  0.8991    -0.3186 0.476 0.392 NA
#> GSM1009201     1  0.0424     0.7372 0.992 0.008 NA

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>            class entropy silhouette    p1    p2    p3    p4
#> GSM1009062     1   0.711     0.4550 0.596 0.220 0.008 0.176
#> GSM1009076     2   0.548     0.5629 0.104 0.732 0.164 0.000
#> GSM1009090     4   0.676     0.8457 0.408 0.072 0.008 0.512
#> GSM1009104     3   0.752     0.5504 0.020 0.420 0.452 0.108
#> GSM1009118     1   0.679     0.4691 0.676 0.156 0.036 0.132
#> GSM1009132     4   0.453     0.8554 0.292 0.004 0.000 0.704
#> GSM1009146     1   0.212     0.6686 0.932 0.028 0.000 0.040
#> GSM1009160     3   0.215     0.6601 0.020 0.008 0.936 0.036
#> GSM1009174     2   0.900     0.6742 0.320 0.428 0.112 0.140
#> GSM1009188     1   0.263     0.6690 0.912 0.024 0.004 0.060
#> GSM1009063     1   0.711     0.4550 0.596 0.220 0.008 0.176
#> GSM1009077     2   0.548     0.5629 0.104 0.732 0.164 0.000
#> GSM1009091     4   0.676     0.8457 0.408 0.072 0.008 0.512
#> GSM1009105     3   0.752     0.5504 0.020 0.420 0.452 0.108
#> GSM1009119     1   0.334     0.6476 0.876 0.024 0.008 0.092
#> GSM1009133     4   0.453     0.8554 0.292 0.004 0.000 0.704
#> GSM1009147     1   0.139     0.6778 0.960 0.028 0.000 0.012
#> GSM1009161     3   0.225     0.6602 0.020 0.008 0.932 0.040
#> GSM1009175     2   0.900     0.6742 0.320 0.428 0.112 0.140
#> GSM1009189     1   0.263     0.6690 0.912 0.024 0.004 0.060
#> GSM1009064     1   0.711     0.4550 0.596 0.220 0.008 0.176
#> GSM1009078     2   0.545     0.6102 0.172 0.732 0.096 0.000
#> GSM1009092     4   0.676     0.8457 0.408 0.072 0.008 0.512
#> GSM1009106     3   0.752     0.5504 0.020 0.420 0.452 0.108
#> GSM1009120     1   0.317     0.6601 0.884 0.028 0.004 0.084
#> GSM1009134     4   0.453     0.8554 0.292 0.004 0.000 0.704
#> GSM1009148     1   0.212     0.6686 0.932 0.028 0.000 0.040
#> GSM1009162     3   0.151     0.6602 0.020 0.008 0.960 0.012
#> GSM1009176     2   0.900     0.6742 0.320 0.428 0.112 0.140
#> GSM1009190     1   0.263     0.6690 0.912 0.024 0.004 0.060
#> GSM1009065     1   0.711     0.4550 0.596 0.220 0.008 0.176
#> GSM1009079     2   0.548     0.5629 0.104 0.732 0.164 0.000
#> GSM1009093     4   0.676     0.8457 0.408 0.072 0.008 0.512
#> GSM1009107     3   0.752     0.5504 0.020 0.420 0.452 0.108
#> GSM1009121     1   0.670     0.4808 0.684 0.148 0.036 0.132
#> GSM1009135     4   0.453     0.8554 0.292 0.004 0.000 0.704
#> GSM1009149     1   0.212     0.6686 0.932 0.028 0.000 0.040
#> GSM1009163     3   0.219     0.6601 0.020 0.012 0.936 0.032
#> GSM1009177     2   0.900     0.6742 0.320 0.428 0.112 0.140
#> GSM1009191     1   0.263     0.6690 0.912 0.024 0.004 0.060
#> GSM1009066     1   0.711     0.4550 0.596 0.220 0.008 0.176
#> GSM1009080     2   0.548     0.5629 0.104 0.732 0.164 0.000
#> GSM1009094     4   0.676     0.8457 0.408 0.072 0.008 0.512
#> GSM1009108     3   0.752     0.5504 0.020 0.420 0.452 0.108
#> GSM1009122     1   0.768     0.2841 0.604 0.204 0.060 0.132
#> GSM1009136     4   0.458     0.8548 0.300 0.004 0.000 0.696
#> GSM1009150     1   0.212     0.6686 0.932 0.028 0.000 0.040
#> GSM1009164     3   0.219     0.6601 0.020 0.012 0.936 0.032
#> GSM1009178     2   0.900     0.6742 0.320 0.428 0.112 0.140
#> GSM1009192     1   0.263     0.6690 0.912 0.024 0.004 0.060
#> GSM1009067     1   0.711     0.4550 0.596 0.220 0.008 0.176
#> GSM1009081     2   0.548     0.5629 0.104 0.732 0.164 0.000
#> GSM1009095     4   0.676     0.8457 0.408 0.072 0.008 0.512
#> GSM1009109     3   0.752     0.5504 0.020 0.420 0.452 0.108
#> GSM1009123     1   0.341     0.6474 0.872 0.024 0.008 0.096
#> GSM1009137     4   0.453     0.8554 0.292 0.004 0.000 0.704
#> GSM1009151     1   0.212     0.6686 0.932 0.028 0.000 0.040
#> GSM1009165     3   0.136     0.6604 0.020 0.012 0.964 0.004
#> GSM1009179     2   0.900     0.6742 0.320 0.428 0.112 0.140
#> GSM1009193     1   0.263     0.6690 0.912 0.024 0.004 0.060
#> GSM1009068     1   0.711     0.4550 0.596 0.220 0.008 0.176
#> GSM1009082     2   0.548     0.5629 0.104 0.732 0.164 0.000
#> GSM1009096     4   0.676     0.8457 0.408 0.072 0.008 0.512
#> GSM1009110     3   0.752     0.5504 0.020 0.420 0.452 0.108
#> GSM1009124     1   0.501     0.5997 0.784 0.080 0.008 0.128
#> GSM1009138     4   0.453     0.8554 0.292 0.004 0.000 0.704
#> GSM1009152     1   0.212     0.6686 0.932 0.028 0.000 0.040
#> GSM1009166     3   0.151     0.6602 0.020 0.008 0.960 0.012
#> GSM1009180     2   0.900     0.6742 0.320 0.428 0.112 0.140
#> GSM1009194     1   0.263     0.6690 0.912 0.024 0.004 0.060
#> GSM1009069     1   0.711     0.4550 0.596 0.220 0.008 0.176
#> GSM1009083     2   0.551     0.5722 0.112 0.732 0.156 0.000
#> GSM1009097     4   0.676     0.8457 0.408 0.072 0.008 0.512
#> GSM1009111     3   0.752     0.5504 0.020 0.420 0.452 0.108
#> GSM1009125     1   0.791     0.2277 0.584 0.212 0.068 0.136
#> GSM1009139     4   0.453     0.8554 0.292 0.004 0.000 0.704
#> GSM1009153     1   0.212     0.6686 0.932 0.028 0.000 0.040
#> GSM1009167     3   0.138     0.6603 0.020 0.008 0.964 0.008
#> GSM1009181     2   0.900     0.6742 0.320 0.428 0.112 0.140
#> GSM1009195     1   0.327     0.6668 0.884 0.056 0.004 0.056
#> GSM1009070     1   0.705     0.4553 0.604 0.212 0.008 0.176
#> GSM1009084     2   0.548     0.5629 0.104 0.732 0.164 0.000
#> GSM1009098     4   0.676     0.8457 0.408 0.072 0.008 0.512
#> GSM1009112     3   0.752     0.5504 0.020 0.420 0.452 0.108
#> GSM1009126     1   0.501     0.5997 0.784 0.080 0.008 0.128
#> GSM1009140     4   0.453     0.8554 0.292 0.004 0.000 0.704
#> GSM1009154     1   0.212     0.6686 0.932 0.028 0.000 0.040
#> GSM1009168     3   0.138     0.6603 0.020 0.008 0.964 0.008
#> GSM1009182     2   0.900     0.6742 0.320 0.428 0.112 0.140
#> GSM1009196     1   0.263     0.6690 0.912 0.024 0.004 0.060
#> GSM1009071     1   0.711     0.4550 0.596 0.220 0.008 0.176
#> GSM1009085     2   0.548     0.5629 0.104 0.732 0.164 0.000
#> GSM1009099     4   0.676     0.8457 0.408 0.072 0.008 0.512
#> GSM1009113     3   0.752     0.5504 0.020 0.420 0.452 0.108
#> GSM1009127     1   0.351     0.6495 0.868 0.028 0.008 0.096
#> GSM1009141     4   0.453     0.8554 0.292 0.004 0.000 0.704
#> GSM1009155     1   0.194     0.6727 0.940 0.028 0.000 0.032
#> GSM1009169     3   0.138     0.6603 0.020 0.008 0.964 0.008
#> GSM1009183     2   0.900     0.6742 0.320 0.428 0.112 0.140
#> GSM1009197     1   0.263     0.6690 0.912 0.024 0.004 0.060
#> GSM1009072     1   0.711     0.4550 0.596 0.220 0.008 0.176
#> GSM1009086     2   0.548     0.5629 0.104 0.732 0.164 0.000
#> GSM1009100     4   0.676     0.8457 0.408 0.072 0.008 0.512
#> GSM1009114     3   0.752     0.5504 0.020 0.420 0.452 0.108
#> GSM1009128     1   0.688     0.4585 0.672 0.152 0.040 0.136
#> GSM1009142     4   0.453     0.8554 0.292 0.004 0.000 0.704
#> GSM1009156     1   0.202     0.6813 0.932 0.056 0.000 0.012
#> GSM1009170     3   0.219     0.6601 0.020 0.012 0.936 0.032
#> GSM1009184     2   0.900     0.6742 0.320 0.428 0.112 0.140
#> GSM1009198     1   0.263     0.6690 0.912 0.024 0.004 0.060
#> GSM1009073     1   0.711     0.4550 0.596 0.220 0.008 0.176
#> GSM1009087     2   0.545     0.6102 0.172 0.732 0.096 0.000
#> GSM1009101     4   0.676     0.8457 0.408 0.072 0.008 0.512
#> GSM1009115     3   0.752     0.5504 0.020 0.420 0.452 0.108
#> GSM1009129     1   0.824     0.0638 0.548 0.244 0.088 0.120
#> GSM1009143     4   0.453     0.8554 0.292 0.004 0.000 0.704
#> GSM1009157     1   0.256     0.6783 0.908 0.072 0.000 0.020
#> GSM1009171     3   0.199     0.6606 0.020 0.012 0.944 0.024
#> GSM1009185     2   0.890     0.6573 0.328 0.432 0.100 0.140
#> GSM1009199     1   0.302     0.6676 0.896 0.044 0.004 0.056
#> GSM1009074     1   0.711     0.4550 0.596 0.220 0.008 0.176
#> GSM1009088     2   0.545     0.6102 0.172 0.732 0.096 0.000
#> GSM1009102     4   0.676     0.8457 0.408 0.072 0.008 0.512
#> GSM1009116     3   0.752     0.5504 0.020 0.420 0.452 0.108
#> GSM1009130     2   0.840     0.4649 0.388 0.416 0.144 0.052
#> GSM1009144     4   0.453     0.8554 0.292 0.004 0.000 0.704
#> GSM1009158     1   0.212     0.6686 0.932 0.028 0.000 0.040
#> GSM1009172     3   0.215     0.6601 0.020 0.008 0.936 0.036
#> GSM1009186     2   0.900     0.6742 0.320 0.428 0.112 0.140
#> GSM1009200     1   0.263     0.6690 0.912 0.024 0.004 0.060
#> GSM1009075     1   0.711     0.4550 0.596 0.220 0.008 0.176
#> GSM1009089     2   0.529     0.6084 0.208 0.728 0.064 0.000
#> GSM1009103     4   0.676     0.8457 0.408 0.072 0.008 0.512
#> GSM1009117     3   0.752     0.5504 0.020 0.420 0.452 0.108
#> GSM1009131     1   0.687     0.4310 0.664 0.172 0.032 0.132
#> GSM1009145     4   0.458     0.8548 0.300 0.004 0.000 0.696
#> GSM1009159     1   0.202     0.6679 0.936 0.024 0.000 0.040
#> GSM1009173     3   0.136     0.6604 0.020 0.012 0.964 0.004
#> GSM1009187     2   0.857     0.6038 0.360 0.432 0.068 0.140
#> GSM1009201     1   0.263     0.6690 0.912 0.024 0.004 0.060

show/hide code output

cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#>            class entropy silhouette    p1    p2    p3    p4    p5
#> GSM1009062     5  0.5546   9.96e-01 0.364 0.020 0.000 0.040 0.576
#> GSM1009076     2  0.2700   5.27e-01 0.068 0.896 0.012 0.004 0.020
#> GSM1009090     4  0.3395   8.19e-01 0.236 0.000 0.000 0.764 0.000
#> GSM1009104     2  0.6752   3.31e-01 0.016 0.620 0.208 0.084 0.072
#> GSM1009118     1  0.5853   5.73e-01 0.716 0.076 0.020 0.056 0.132
#> GSM1009132     4  0.7156   8.17e-01 0.168 0.016 0.096 0.600 0.120
#> GSM1009146     1  0.4556   4.94e-01 0.756 0.008 0.016 0.028 0.192
#> GSM1009160     3  0.3088   9.86e-01 0.004 0.164 0.828 0.000 0.004
#> GSM1009174     2  0.8988   4.34e-01 0.260 0.368 0.108 0.056 0.208
#> GSM1009188     1  0.0771   7.07e-01 0.976 0.004 0.000 0.020 0.000
#> GSM1009063     5  0.5546   9.96e-01 0.364 0.020 0.000 0.040 0.576
#> GSM1009077     2  0.2700   5.27e-01 0.068 0.896 0.012 0.004 0.020
#> GSM1009091     4  0.3395   8.19e-01 0.236 0.000 0.000 0.764 0.000
#> GSM1009105     2  0.6752   3.31e-01 0.016 0.620 0.208 0.084 0.072
#> GSM1009119     1  0.3304   6.70e-01 0.872 0.012 0.012 0.044 0.060
#> GSM1009133     4  0.7156   8.17e-01 0.168 0.016 0.096 0.600 0.120
#> GSM1009147     1  0.4241   5.27e-01 0.780 0.008 0.016 0.020 0.176
#> GSM1009161     3  0.3088   9.86e-01 0.004 0.164 0.828 0.000 0.004
#> GSM1009175     2  0.8988   4.34e-01 0.260 0.368 0.108 0.056 0.208
#> GSM1009189     1  0.0771   7.07e-01 0.976 0.004 0.000 0.020 0.000
#> GSM1009064     5  0.5759   9.95e-01 0.364 0.020 0.004 0.044 0.568
#> GSM1009078     2  0.4040   5.25e-01 0.152 0.800 0.012 0.004 0.032
#> GSM1009092     4  0.3395   8.19e-01 0.236 0.000 0.000 0.764 0.000
#> GSM1009106     2  0.6752   3.31e-01 0.016 0.620 0.208 0.084 0.072
#> GSM1009120     1  0.3161   6.74e-01 0.880 0.012 0.012 0.040 0.056
#> GSM1009134     4  0.7156   8.17e-01 0.168 0.016 0.096 0.600 0.120
#> GSM1009148     1  0.4556   4.94e-01 0.756 0.008 0.016 0.028 0.192
#> GSM1009162     3  0.3516   9.85e-01 0.004 0.164 0.812 0.000 0.020
#> GSM1009176     2  0.8988   4.34e-01 0.260 0.368 0.108 0.056 0.208
#> GSM1009190     1  0.0771   7.07e-01 0.976 0.004 0.000 0.020 0.000
#> GSM1009065     5  0.5759   9.95e-01 0.364 0.020 0.004 0.044 0.568
#> GSM1009079     2  0.2700   5.27e-01 0.068 0.896 0.012 0.004 0.020
#> GSM1009093     4  0.3395   8.19e-01 0.236 0.000 0.000 0.764 0.000
#> GSM1009107     2  0.6752   3.31e-01 0.016 0.620 0.208 0.084 0.072
#> GSM1009121     1  0.6136   5.61e-01 0.696 0.088 0.020 0.064 0.132
#> GSM1009135     4  0.7156   8.17e-01 0.168 0.016 0.096 0.600 0.120
#> GSM1009149     1  0.4556   4.94e-01 0.756 0.008 0.016 0.028 0.192
#> GSM1009163     3  0.3477   9.86e-01 0.004 0.164 0.816 0.004 0.012
#> GSM1009177     2  0.8988   4.34e-01 0.260 0.368 0.108 0.056 0.208
#> GSM1009191     1  0.0771   7.07e-01 0.976 0.004 0.000 0.020 0.000
#> GSM1009066     5  0.5759   9.95e-01 0.364 0.020 0.004 0.044 0.568
#> GSM1009080     2  0.2700   5.27e-01 0.068 0.896 0.012 0.004 0.020
#> GSM1009094     4  0.3395   8.19e-01 0.236 0.000 0.000 0.764 0.000
#> GSM1009108     2  0.6752   3.31e-01 0.016 0.620 0.208 0.084 0.072
#> GSM1009122     1  0.6823   4.90e-01 0.632 0.156 0.024 0.056 0.132
#> GSM1009136     4  0.7172   8.16e-01 0.176 0.016 0.092 0.596 0.120
#> GSM1009150     1  0.4556   4.94e-01 0.756 0.008 0.016 0.028 0.192
#> GSM1009164     3  0.3477   9.86e-01 0.004 0.164 0.816 0.004 0.012
#> GSM1009178     2  0.8988   4.34e-01 0.260 0.368 0.108 0.056 0.208
#> GSM1009192     1  0.0771   7.07e-01 0.976 0.004 0.000 0.020 0.000
#> GSM1009067     5  0.5546   9.96e-01 0.364 0.020 0.000 0.040 0.576
#> GSM1009081     2  0.2700   5.27e-01 0.068 0.896 0.012 0.004 0.020
#> GSM1009095     4  0.3395   8.19e-01 0.236 0.000 0.000 0.764 0.000
#> GSM1009109     2  0.6752   3.31e-01 0.016 0.620 0.208 0.084 0.072
#> GSM1009123     1  0.3748   6.59e-01 0.848 0.016 0.012 0.056 0.068
#> GSM1009137     4  0.7156   8.17e-01 0.168 0.016 0.096 0.600 0.120
#> GSM1009151     1  0.4556   4.94e-01 0.756 0.008 0.016 0.028 0.192
#> GSM1009165     3  0.3929   9.85e-01 0.004 0.164 0.796 0.004 0.032
#> GSM1009179     2  0.8988   4.34e-01 0.260 0.368 0.108 0.056 0.208
#> GSM1009193     1  0.0771   7.07e-01 0.976 0.004 0.000 0.020 0.000
#> GSM1009068     5  0.5546   9.96e-01 0.364 0.020 0.000 0.040 0.576
#> GSM1009082     2  0.2700   5.27e-01 0.068 0.896 0.012 0.004 0.020
#> GSM1009096     4  0.3395   8.19e-01 0.236 0.000 0.000 0.764 0.000
#> GSM1009110     2  0.6778   3.30e-01 0.016 0.620 0.204 0.080 0.080
#> GSM1009124     1  0.5242   6.08e-01 0.756 0.032 0.020 0.072 0.120
#> GSM1009138     4  0.7156   8.17e-01 0.168 0.016 0.096 0.600 0.120
#> GSM1009152     1  0.4556   4.94e-01 0.756 0.008 0.016 0.028 0.192
#> GSM1009166     3  0.3516   9.85e-01 0.004 0.164 0.812 0.000 0.020
#> GSM1009180     2  0.8988   4.34e-01 0.260 0.368 0.108 0.056 0.208
#> GSM1009194     1  0.0771   7.07e-01 0.976 0.004 0.000 0.020 0.000
#> GSM1009069     5  0.5759   9.95e-01 0.364 0.020 0.004 0.044 0.568
#> GSM1009083     2  0.2917   5.28e-01 0.076 0.884 0.012 0.004 0.024
#> GSM1009097     4  0.3395   8.19e-01 0.236 0.000 0.000 0.764 0.000
#> GSM1009111     2  0.6752   3.31e-01 0.016 0.620 0.208 0.084 0.072
#> GSM1009125     1  0.7077   4.71e-01 0.612 0.168 0.032 0.056 0.132
#> GSM1009139     4  0.7156   8.17e-01 0.168 0.016 0.096 0.600 0.120
#> GSM1009153     1  0.4556   4.94e-01 0.756 0.008 0.016 0.028 0.192
#> GSM1009167     3  0.4545   9.67e-01 0.004 0.168 0.768 0.020 0.040
#> GSM1009181     2  0.8988   4.34e-01 0.260 0.368 0.108 0.056 0.208
#> GSM1009195     1  0.0955   7.01e-01 0.968 0.028 0.000 0.004 0.000
#> GSM1009070     5  0.5546   9.96e-01 0.364 0.020 0.000 0.040 0.576
#> GSM1009084     2  0.2700   5.27e-01 0.068 0.896 0.012 0.004 0.020
#> GSM1009098     4  0.3395   8.19e-01 0.236 0.000 0.000 0.764 0.000
#> GSM1009112     2  0.6752   3.31e-01 0.016 0.620 0.208 0.084 0.072
#> GSM1009126     1  0.5242   6.08e-01 0.756 0.032 0.020 0.072 0.120
#> GSM1009140     4  0.7156   8.17e-01 0.168 0.016 0.096 0.600 0.120
#> GSM1009154     1  0.4556   4.94e-01 0.756 0.008 0.016 0.028 0.192
#> GSM1009168     3  0.3968   9.79e-01 0.004 0.168 0.792 0.004 0.032
#> GSM1009182     2  0.8988   4.34e-01 0.260 0.368 0.108 0.056 0.208
#> GSM1009196     1  0.0771   7.07e-01 0.976 0.004 0.000 0.020 0.000
#> GSM1009071     5  0.5759   9.95e-01 0.364 0.020 0.004 0.044 0.568
#> GSM1009085     2  0.2700   5.27e-01 0.068 0.896 0.012 0.004 0.020
#> GSM1009099     4  0.3395   8.19e-01 0.236 0.000 0.000 0.764 0.000
#> GSM1009113     2  0.6752   3.31e-01 0.016 0.620 0.208 0.084 0.072
#> GSM1009127     1  0.3680   6.61e-01 0.852 0.016 0.012 0.052 0.068
#> GSM1009141     4  0.7156   8.17e-01 0.168 0.016 0.096 0.600 0.120
#> GSM1009155     1  0.4556   4.94e-01 0.756 0.008 0.016 0.028 0.192
#> GSM1009169     3  0.3970   9.82e-01 0.004 0.164 0.796 0.008 0.028
#> GSM1009183     2  0.8988   4.34e-01 0.260 0.368 0.108 0.056 0.208
#> GSM1009197     1  0.0771   7.07e-01 0.976 0.004 0.000 0.020 0.000
#> GSM1009072     5  0.5546   9.96e-01 0.364 0.020 0.000 0.040 0.576
#> GSM1009086     2  0.2700   5.27e-01 0.068 0.896 0.012 0.004 0.020
#> GSM1009100     4  0.3395   8.19e-01 0.236 0.000 0.000 0.764 0.000
#> GSM1009114     2  0.6778   3.30e-01 0.016 0.620 0.204 0.080 0.080
#> GSM1009128     1  0.6092   5.68e-01 0.700 0.076 0.020 0.072 0.132
#> GSM1009142     4  0.7156   8.17e-01 0.168 0.016 0.096 0.600 0.120
#> GSM1009156     1  0.4391   5.55e-01 0.784 0.020 0.016 0.020 0.160
#> GSM1009170     3  0.3477   9.86e-01 0.004 0.164 0.816 0.004 0.012
#> GSM1009184     2  0.9003   4.34e-01 0.260 0.368 0.112 0.056 0.204
#> GSM1009198     1  0.0771   7.07e-01 0.976 0.004 0.000 0.020 0.000
#> GSM1009073     5  0.5759   9.95e-01 0.364 0.020 0.004 0.044 0.568
#> GSM1009087     2  0.4040   5.25e-01 0.152 0.800 0.012 0.004 0.032
#> GSM1009101     4  0.3395   8.19e-01 0.236 0.000 0.000 0.764 0.000
#> GSM1009115     2  0.6752   3.31e-01 0.016 0.620 0.208 0.084 0.072
#> GSM1009129     1  0.6983   4.54e-01 0.604 0.192 0.024 0.048 0.132
#> GSM1009143     4  0.7156   8.17e-01 0.168 0.016 0.096 0.600 0.120
#> GSM1009157     1  0.4391   5.48e-01 0.784 0.020 0.016 0.020 0.160
#> GSM1009171     3  0.3477   9.86e-01 0.004 0.164 0.816 0.004 0.012
#> GSM1009185     2  0.8965   4.28e-01 0.264 0.368 0.104 0.056 0.208
#> GSM1009199     1  0.1012   7.04e-01 0.968 0.020 0.000 0.012 0.000
#> GSM1009074     5  0.5546   9.96e-01 0.364 0.020 0.000 0.040 0.576
#> GSM1009088     2  0.4040   5.25e-01 0.152 0.800 0.012 0.004 0.032
#> GSM1009102     4  0.3395   8.19e-01 0.236 0.000 0.000 0.764 0.000
#> GSM1009116     2  0.6752   3.31e-01 0.016 0.620 0.208 0.084 0.072
#> GSM1009130     1  0.6817  -5.08e-05 0.452 0.412 0.012 0.024 0.100
#> GSM1009144     4  0.7156   8.17e-01 0.168 0.016 0.096 0.600 0.120
#> GSM1009158     1  0.4556   4.94e-01 0.756 0.008 0.016 0.028 0.192
#> GSM1009172     3  0.3088   9.86e-01 0.004 0.164 0.828 0.000 0.004
#> GSM1009186     2  0.9003   4.34e-01 0.260 0.368 0.112 0.056 0.204
#> GSM1009200     1  0.0771   7.07e-01 0.976 0.004 0.000 0.020 0.000
#> GSM1009075     5  0.5546   9.96e-01 0.364 0.020 0.000 0.040 0.576
#> GSM1009089     2  0.4203   5.22e-01 0.156 0.792 0.012 0.008 0.032
#> GSM1009103     4  0.3395   8.19e-01 0.236 0.000 0.000 0.764 0.000
#> GSM1009117     2  0.6778   3.30e-01 0.016 0.620 0.204 0.080 0.080
#> GSM1009131     1  0.6100   5.55e-01 0.696 0.100 0.020 0.052 0.132
#> GSM1009145     4  0.7172   8.16e-01 0.176 0.016 0.092 0.596 0.120
#> GSM1009159     1  0.4556   4.94e-01 0.756 0.008 0.016 0.028 0.192
#> GSM1009173     3  0.3848   9.86e-01 0.004 0.164 0.800 0.004 0.028
#> GSM1009187     2  0.8982   4.28e-01 0.264 0.368 0.108 0.056 0.204
#> GSM1009201     1  0.0771   7.07e-01 0.976 0.004 0.000 0.020 0.000

show/hide code output

cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#>            class entropy silhouette    p1    p2    p3    p4    p5    p6
#> GSM1009062     6   0.436      0.986 0.244 0.008 0.000 0.040 0.004 0.704
#> GSM1009076     2   0.722      0.460 0.040 0.456 0.052 0.024 0.352 0.076
#> GSM1009090     4   0.686      0.810 0.136 0.032 0.004 0.584 0.140 0.104
#> GSM1009104     5   0.541      0.995 0.000 0.176 0.248 0.000 0.576 0.000
#> GSM1009118     1   0.562      0.592 0.700 0.148 0.012 0.048 0.028 0.064
#> GSM1009132     4   0.233      0.807 0.076 0.004 0.000 0.896 0.004 0.020
#> GSM1009146     1   0.578      0.552 0.692 0.044 0.012 0.048 0.056 0.148
#> GSM1009160     3   0.208      0.957 0.000 0.040 0.916 0.012 0.000 0.032
#> GSM1009174     2   0.359      0.607 0.164 0.796 0.024 0.004 0.000 0.012
#> GSM1009188     1   0.181      0.712 0.928 0.020 0.000 0.044 0.000 0.008
#> GSM1009063     6   0.436      0.986 0.244 0.008 0.000 0.040 0.004 0.704
#> GSM1009077     2   0.722      0.460 0.040 0.456 0.052 0.024 0.352 0.076
#> GSM1009091     4   0.686      0.810 0.136 0.032 0.004 0.584 0.140 0.104
#> GSM1009105     5   0.541      0.995 0.000 0.176 0.248 0.000 0.576 0.000
#> GSM1009119     1   0.376      0.663 0.840 0.024 0.012 0.036 0.024 0.064
#> GSM1009133     4   0.218      0.807 0.076 0.004 0.000 0.900 0.000 0.020
#> GSM1009147     1   0.572      0.555 0.696 0.044 0.012 0.044 0.056 0.148
#> GSM1009161     3   0.208      0.957 0.000 0.040 0.916 0.012 0.000 0.032
#> GSM1009175     2   0.359      0.607 0.164 0.796 0.024 0.004 0.000 0.012
#> GSM1009189     1   0.181      0.712 0.928 0.020 0.000 0.044 0.000 0.008
#> GSM1009064     6   0.539      0.972 0.244 0.012 0.008 0.052 0.028 0.656
#> GSM1009078     2   0.721      0.466 0.064 0.456 0.028 0.028 0.352 0.072
#> GSM1009092     4   0.686      0.810 0.136 0.032 0.004 0.584 0.140 0.104
#> GSM1009106     5   0.541      0.995 0.000 0.176 0.248 0.000 0.576 0.000
#> GSM1009120     1   0.362      0.667 0.848 0.024 0.012 0.028 0.024 0.064
#> GSM1009134     4   0.218      0.807 0.076 0.004 0.000 0.900 0.000 0.020
#> GSM1009148     1   0.578      0.552 0.692 0.044 0.012 0.048 0.056 0.148
#> GSM1009162     3   0.240      0.959 0.000 0.048 0.900 0.008 0.004 0.040
#> GSM1009176     2   0.359      0.607 0.164 0.796 0.024 0.004 0.000 0.012
#> GSM1009190     1   0.181      0.712 0.928 0.020 0.000 0.044 0.000 0.008
#> GSM1009065     6   0.539      0.972 0.244 0.012 0.008 0.052 0.028 0.656
#> GSM1009079     2   0.722      0.460 0.040 0.456 0.052 0.024 0.352 0.076
#> GSM1009093     4   0.686      0.810 0.136 0.032 0.004 0.584 0.140 0.104
#> GSM1009107     5   0.543      0.994 0.000 0.176 0.252 0.000 0.572 0.000
#> GSM1009121     1   0.579      0.587 0.692 0.144 0.012 0.048 0.040 0.064
#> GSM1009135     4   0.218      0.807 0.076 0.004 0.000 0.900 0.000 0.020
#> GSM1009149     1   0.578      0.552 0.692 0.044 0.012 0.048 0.056 0.148
#> GSM1009163     3   0.166      0.958 0.000 0.040 0.936 0.012 0.000 0.012
#> GSM1009177     2   0.359      0.607 0.164 0.796 0.024 0.004 0.000 0.012
#> GSM1009191     1   0.181      0.712 0.928 0.020 0.000 0.044 0.000 0.008
#> GSM1009066     6   0.509      0.979 0.244 0.008 0.008 0.048 0.020 0.672
#> GSM1009080     2   0.722      0.460 0.040 0.456 0.052 0.024 0.352 0.076
#> GSM1009094     4   0.686      0.810 0.136 0.032 0.004 0.584 0.140 0.104
#> GSM1009108     5   0.543      0.994 0.000 0.176 0.252 0.000 0.572 0.000
#> GSM1009122     1   0.639      0.493 0.612 0.220 0.012 0.048 0.044 0.064
#> GSM1009136     4   0.243      0.807 0.080 0.008 0.000 0.888 0.000 0.024
#> GSM1009150     1   0.578      0.552 0.692 0.044 0.012 0.048 0.056 0.148
#> GSM1009164     3   0.166      0.958 0.000 0.040 0.936 0.012 0.000 0.012
#> GSM1009178     2   0.362      0.605 0.168 0.792 0.024 0.004 0.000 0.012
#> GSM1009192     1   0.181      0.712 0.928 0.020 0.000 0.044 0.000 0.008
#> GSM1009067     6   0.436      0.986 0.244 0.008 0.000 0.040 0.004 0.704
#> GSM1009081     2   0.722      0.460 0.040 0.456 0.052 0.024 0.352 0.076
#> GSM1009095     4   0.688      0.810 0.136 0.036 0.004 0.584 0.140 0.100
#> GSM1009109     5   0.541      0.995 0.000 0.176 0.248 0.000 0.576 0.000
#> GSM1009123     1   0.396      0.658 0.828 0.024 0.012 0.048 0.024 0.064
#> GSM1009137     4   0.218      0.807 0.076 0.004 0.000 0.900 0.000 0.020
#> GSM1009151     1   0.578      0.552 0.692 0.044 0.012 0.048 0.056 0.148
#> GSM1009165     3   0.220      0.957 0.000 0.048 0.912 0.012 0.004 0.024
#> GSM1009179     2   0.362      0.605 0.168 0.792 0.024 0.004 0.000 0.012
#> GSM1009193     1   0.181      0.712 0.928 0.020 0.000 0.044 0.000 0.008
#> GSM1009068     6   0.436      0.986 0.244 0.008 0.000 0.040 0.004 0.704
#> GSM1009082     2   0.722      0.460 0.040 0.456 0.052 0.024 0.352 0.076
#> GSM1009096     4   0.686      0.810 0.136 0.032 0.004 0.584 0.140 0.104
#> GSM1009110     5   0.599      0.983 0.000 0.176 0.252 0.008 0.552 0.012
#> GSM1009124     1   0.524      0.615 0.736 0.116 0.012 0.048 0.024 0.064
#> GSM1009138     4   0.218      0.807 0.076 0.004 0.000 0.900 0.000 0.020
#> GSM1009152     1   0.578      0.552 0.692 0.044 0.012 0.048 0.056 0.148
#> GSM1009166     3   0.240      0.959 0.000 0.048 0.900 0.008 0.004 0.040
#> GSM1009180     2   0.362      0.605 0.168 0.792 0.024 0.004 0.000 0.012
#> GSM1009194     1   0.181      0.712 0.928 0.020 0.000 0.044 0.000 0.008
#> GSM1009069     6   0.539      0.972 0.244 0.012 0.008 0.052 0.028 0.656
#> GSM1009083     2   0.722      0.460 0.040 0.456 0.052 0.024 0.352 0.076
#> GSM1009097     4   0.686      0.810 0.136 0.032 0.004 0.584 0.140 0.104
#> GSM1009111     5   0.543      0.994 0.000 0.176 0.252 0.000 0.572 0.000
#> GSM1009125     1   0.650      0.478 0.604 0.224 0.016 0.048 0.044 0.064
#> GSM1009139     4   0.233      0.807 0.076 0.004 0.000 0.896 0.004 0.020
#> GSM1009153     1   0.578      0.552 0.692 0.044 0.012 0.048 0.056 0.148
#> GSM1009167     3   0.336      0.938 0.000 0.056 0.856 0.020 0.032 0.036
#> GSM1009181     2   0.359      0.607 0.164 0.796 0.024 0.004 0.000 0.012
#> GSM1009195     1   0.189      0.710 0.924 0.024 0.000 0.044 0.000 0.008
#> GSM1009070     6   0.436      0.986 0.244 0.008 0.000 0.040 0.004 0.704
#> GSM1009084     2   0.722      0.460 0.040 0.456 0.052 0.024 0.352 0.076
#> GSM1009098     4   0.685      0.810 0.136 0.032 0.004 0.584 0.144 0.100
#> GSM1009112     5   0.541      0.995 0.000 0.176 0.248 0.000 0.576 0.000
#> GSM1009126     1   0.524      0.615 0.736 0.116 0.012 0.048 0.024 0.064
#> GSM1009140     4   0.218      0.807 0.076 0.004 0.000 0.900 0.000 0.020
#> GSM1009154     1   0.578      0.552 0.692 0.044 0.012 0.048 0.056 0.148
#> GSM1009168     3   0.286      0.952 0.000 0.056 0.880 0.016 0.012 0.036
#> GSM1009182     2   0.359      0.607 0.164 0.796 0.024 0.004 0.000 0.012
#> GSM1009196     1   0.181      0.712 0.928 0.020 0.000 0.044 0.000 0.008
#> GSM1009071     6   0.509      0.979 0.244 0.008 0.008 0.048 0.020 0.672
#> GSM1009085     2   0.722      0.460 0.040 0.456 0.052 0.024 0.352 0.076
#> GSM1009099     4   0.685      0.810 0.136 0.032 0.004 0.584 0.144 0.100
#> GSM1009113     5   0.543      0.994 0.000 0.176 0.252 0.000 0.572 0.000
#> GSM1009127     1   0.396      0.658 0.828 0.024 0.012 0.048 0.024 0.064
#> GSM1009141     4   0.233      0.807 0.076 0.004 0.000 0.896 0.004 0.020
#> GSM1009155     1   0.578      0.552 0.692 0.044 0.012 0.048 0.056 0.148
#> GSM1009169     3   0.260      0.952 0.000 0.044 0.896 0.016 0.012 0.032
#> GSM1009183     2   0.359      0.607 0.164 0.796 0.024 0.004 0.000 0.012
#> GSM1009197     1   0.181      0.712 0.928 0.020 0.000 0.044 0.000 0.008
#> GSM1009072     6   0.436      0.986 0.244 0.008 0.000 0.040 0.004 0.704
#> GSM1009086     2   0.722      0.460 0.040 0.456 0.052 0.024 0.352 0.076
#> GSM1009100     4   0.685      0.810 0.136 0.032 0.004 0.584 0.144 0.100
#> GSM1009114     5   0.588      0.986 0.000 0.176 0.248 0.008 0.560 0.008
#> GSM1009128     1   0.575      0.590 0.696 0.140 0.012 0.048 0.040 0.064
#> GSM1009142     4   0.233      0.807 0.076 0.004 0.000 0.896 0.004 0.020
#> GSM1009156     1   0.561      0.568 0.708 0.044 0.012 0.044 0.056 0.136
#> GSM1009170     3   0.166      0.958 0.000 0.040 0.936 0.012 0.000 0.012
#> GSM1009184     2   0.359      0.607 0.164 0.796 0.024 0.004 0.000 0.012
#> GSM1009198     1   0.181      0.712 0.928 0.020 0.000 0.044 0.000 0.008
#> GSM1009073     6   0.470      0.985 0.244 0.012 0.004 0.040 0.008 0.692
#> GSM1009087     2   0.721      0.466 0.064 0.456 0.028 0.028 0.352 0.072
#> GSM1009101     4   0.685      0.810 0.136 0.032 0.004 0.584 0.144 0.100
#> GSM1009115     5   0.541      0.995 0.000 0.176 0.248 0.000 0.576 0.000
#> GSM1009129     1   0.667      0.456 0.592 0.224 0.016 0.048 0.056 0.064
#> GSM1009143     4   0.256      0.805 0.076 0.012 0.000 0.884 0.000 0.028
#> GSM1009157     1   0.561      0.568 0.708 0.044 0.012 0.044 0.056 0.136
#> GSM1009171     3   0.123      0.961 0.000 0.040 0.952 0.004 0.000 0.004
#> GSM1009185     2   0.362      0.605 0.168 0.792 0.024 0.004 0.000 0.012
#> GSM1009199     1   0.189      0.710 0.924 0.024 0.000 0.044 0.000 0.008
#> GSM1009074     6   0.445      0.986 0.244 0.012 0.000 0.040 0.004 0.700
#> GSM1009088     2   0.721      0.466 0.064 0.456 0.028 0.028 0.352 0.072
#> GSM1009102     4   0.688      0.810 0.136 0.036 0.004 0.584 0.140 0.100
#> GSM1009116     5   0.541      0.995 0.000 0.176 0.248 0.000 0.576 0.000
#> GSM1009130     1   0.729      0.254 0.524 0.220 0.024 0.024 0.144 0.064
#> GSM1009144     4   0.270      0.805 0.076 0.012 0.000 0.880 0.004 0.028
#> GSM1009158     1   0.578      0.552 0.692 0.044 0.012 0.048 0.056 0.148
#> GSM1009172     3   0.208      0.957 0.000 0.040 0.916 0.012 0.000 0.032
#> GSM1009186     2   0.359      0.607 0.164 0.796 0.024 0.004 0.000 0.012
#> GSM1009200     1   0.181      0.712 0.928 0.020 0.000 0.044 0.000 0.008
#> GSM1009075     6   0.445      0.986 0.244 0.012 0.000 0.040 0.004 0.700
#> GSM1009089     2   0.727      0.460 0.068 0.448 0.024 0.028 0.352 0.080
#> GSM1009103     4   0.688      0.810 0.136 0.036 0.004 0.584 0.140 0.100
#> GSM1009117     5   0.588      0.986 0.000 0.176 0.248 0.008 0.560 0.008
#> GSM1009131     1   0.579      0.586 0.692 0.144 0.012 0.048 0.040 0.064
#> GSM1009145     4   0.243      0.807 0.080 0.008 0.000 0.888 0.000 0.024
#> GSM1009159     1   0.578      0.552 0.692 0.044 0.012 0.048 0.056 0.148
#> GSM1009173     3   0.240      0.955 0.000 0.044 0.904 0.012 0.008 0.032
#> GSM1009187     2   0.358      0.602 0.172 0.792 0.020 0.004 0.000 0.012
#> GSM1009201     1   0.181      0.712 0.928 0.020 0.000 0.044 0.000 0.008

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

consensus_heatmap(res, k = 2)

plot of chunk tab-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 temperature(p) time(p) specimen(p) k
#> SD:kmeans 135          0.987   0.994    7.66e-23 2
#> SD:kmeans 120          0.989   1.000    2.12e-21 3
#> SD:kmeans 118          1.000   1.000    1.92e-60 4
#> SD:kmeans  97          1.000   1.000    5.30e-65 5
#> SD:kmeans 122          1.000   1.000   4.84e-103 6

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


SD:skmeans**

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

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

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

res
#> A 'ConsensusPartition' object with k = 2, 3, 4, 5, 6.
#>   On a matrix with 51941 rows and 140 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 1.000           0.976       0.991         0.5007 0.500   0.500
#> 3 3 0.759           0.887       0.915         0.3129 0.807   0.627
#> 4 4 0.706           0.769       0.853         0.1260 0.863   0.625
#> 5 5 0.756           0.587       0.692         0.0620 0.830   0.483
#> 6 6 0.841           0.776       0.809         0.0441 0.894   0.587

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
#> GSM1009062     1  0.0000      0.989 1.000 0.000
#> GSM1009076     2  0.0000      0.992 0.000 1.000
#> GSM1009090     1  0.0000      0.989 1.000 0.000
#> GSM1009104     2  0.0000      0.992 0.000 1.000
#> GSM1009118     2  0.9944      0.141 0.456 0.544
#> GSM1009132     1  0.0000      0.989 1.000 0.000
#> GSM1009146     1  0.0000      0.989 1.000 0.000
#> GSM1009160     2  0.0000      0.992 0.000 1.000
#> GSM1009174     2  0.0000      0.992 0.000 1.000
#> GSM1009188     1  0.0000      0.989 1.000 0.000
#> GSM1009063     1  0.0000      0.989 1.000 0.000
#> GSM1009077     2  0.0000      0.992 0.000 1.000
#> GSM1009091     1  0.0000      0.989 1.000 0.000
#> GSM1009105     2  0.0000      0.992 0.000 1.000
#> GSM1009119     1  0.0000      0.989 1.000 0.000
#> GSM1009133     1  0.0000      0.989 1.000 0.000
#> GSM1009147     1  0.0000      0.989 1.000 0.000
#> GSM1009161     2  0.0000      0.992 0.000 1.000
#> GSM1009175     2  0.0000      0.992 0.000 1.000
#> GSM1009189     1  0.0000      0.989 1.000 0.000
#> GSM1009064     1  0.0000      0.989 1.000 0.000
#> GSM1009078     2  0.0000      0.992 0.000 1.000
#> GSM1009092     1  0.0000      0.989 1.000 0.000
#> GSM1009106     2  0.0000      0.992 0.000 1.000
#> GSM1009120     1  0.0000      0.989 1.000 0.000
#> GSM1009134     1  0.0000      0.989 1.000 0.000
#> GSM1009148     1  0.0000      0.989 1.000 0.000
#> GSM1009162     2  0.0000      0.992 0.000 1.000
#> GSM1009176     2  0.0000      0.992 0.000 1.000
#> GSM1009190     1  0.0000      0.989 1.000 0.000
#> GSM1009065     1  0.0000      0.989 1.000 0.000
#> GSM1009079     2  0.0000      0.992 0.000 1.000
#> GSM1009093     1  0.0000      0.989 1.000 0.000
#> GSM1009107     2  0.0000      0.992 0.000 1.000
#> GSM1009121     2  0.0672      0.985 0.008 0.992
#> GSM1009135     1  0.0000      0.989 1.000 0.000
#> GSM1009149     1  0.0000      0.989 1.000 0.000
#> GSM1009163     2  0.0000      0.992 0.000 1.000
#> GSM1009177     2  0.0000      0.992 0.000 1.000
#> GSM1009191     1  0.0000      0.989 1.000 0.000
#> GSM1009066     1  0.0000      0.989 1.000 0.000
#> GSM1009080     2  0.0000      0.992 0.000 1.000
#> GSM1009094     1  0.0000      0.989 1.000 0.000
#> GSM1009108     2  0.0000      0.992 0.000 1.000
#> GSM1009122     2  0.0000      0.992 0.000 1.000
#> GSM1009136     1  0.0000      0.989 1.000 0.000
#> GSM1009150     1  0.0000      0.989 1.000 0.000
#> GSM1009164     2  0.0000      0.992 0.000 1.000
#> GSM1009178     2  0.0000      0.992 0.000 1.000
#> GSM1009192     1  0.0000      0.989 1.000 0.000
#> GSM1009067     1  0.0000      0.989 1.000 0.000
#> GSM1009081     2  0.0000      0.992 0.000 1.000
#> GSM1009095     1  0.0000      0.989 1.000 0.000
#> GSM1009109     2  0.0000      0.992 0.000 1.000
#> GSM1009123     1  0.0000      0.989 1.000 0.000
#> GSM1009137     1  0.0000      0.989 1.000 0.000
#> GSM1009151     1  0.0000      0.989 1.000 0.000
#> GSM1009165     2  0.0000      0.992 0.000 1.000
#> GSM1009179     2  0.0000      0.992 0.000 1.000
#> GSM1009193     1  0.0000      0.989 1.000 0.000
#> GSM1009068     1  0.0000      0.989 1.000 0.000
#> GSM1009082     2  0.0000      0.992 0.000 1.000
#> GSM1009096     1  0.0000      0.989 1.000 0.000
#> GSM1009110     2  0.0000      0.992 0.000 1.000
#> GSM1009124     1  0.0000      0.989 1.000 0.000
#> GSM1009138     1  0.0000      0.989 1.000 0.000
#> GSM1009152     1  0.0000      0.989 1.000 0.000
#> GSM1009166     2  0.0000      0.992 0.000 1.000
#> GSM1009180     2  0.0000      0.992 0.000 1.000
#> GSM1009194     1  0.0000      0.989 1.000 0.000
#> GSM1009069     1  0.0000      0.989 1.000 0.000
#> GSM1009083     2  0.0000      0.992 0.000 1.000
#> GSM1009097     1  0.0000      0.989 1.000 0.000
#> GSM1009111     2  0.0000      0.992 0.000 1.000
#> GSM1009125     2  0.0000      0.992 0.000 1.000
#> GSM1009139     1  0.0000      0.989 1.000 0.000
#> GSM1009153     1  0.0000      0.989 1.000 0.000
#> GSM1009167     2  0.0000      0.992 0.000 1.000
#> GSM1009181     2  0.0000      0.992 0.000 1.000
#> GSM1009195     1  0.7139      0.754 0.804 0.196
#> GSM1009070     1  0.0000      0.989 1.000 0.000
#> GSM1009084     2  0.0000      0.992 0.000 1.000
#> GSM1009098     1  0.0000      0.989 1.000 0.000
#> GSM1009112     2  0.0000      0.992 0.000 1.000
#> GSM1009126     1  0.0000      0.989 1.000 0.000
#> GSM1009140     1  0.0000      0.989 1.000 0.000
#> GSM1009154     1  0.0000      0.989 1.000 0.000
#> GSM1009168     2  0.0000      0.992 0.000 1.000
#> GSM1009182     2  0.0000      0.992 0.000 1.000
#> GSM1009196     1  0.0000      0.989 1.000 0.000
#> GSM1009071     1  0.0000      0.989 1.000 0.000
#> GSM1009085     2  0.0000      0.992 0.000 1.000
#> GSM1009099     1  0.0000      0.989 1.000 0.000
#> GSM1009113     2  0.0000      0.992 0.000 1.000
#> GSM1009127     1  0.0000      0.989 1.000 0.000
#> GSM1009141     1  0.0000      0.989 1.000 0.000
#> GSM1009155     1  0.0000      0.989 1.000 0.000
#> GSM1009169     2  0.0000      0.992 0.000 1.000
#> GSM1009183     2  0.0000      0.992 0.000 1.000
#> GSM1009197     1  0.0000      0.989 1.000 0.000
#> GSM1009072     1  0.0000      0.989 1.000 0.000
#> GSM1009086     2  0.0000      0.992 0.000 1.000
#> GSM1009100     1  0.0000      0.989 1.000 0.000
#> GSM1009114     2  0.0000      0.992 0.000 1.000
#> GSM1009128     2  0.0000      0.992 0.000 1.000
#> GSM1009142     1  0.0000      0.989 1.000 0.000
#> GSM1009156     1  0.8267      0.650 0.740 0.260
#> GSM1009170     2  0.0000      0.992 0.000 1.000
#> GSM1009184     2  0.0000      0.992 0.000 1.000
#> GSM1009198     1  0.0000      0.989 1.000 0.000
#> GSM1009073     1  0.0000      0.989 1.000 0.000
#> GSM1009087     2  0.0000      0.992 0.000 1.000
#> GSM1009101     1  0.0000      0.989 1.000 0.000
#> GSM1009115     2  0.0000      0.992 0.000 1.000
#> GSM1009129     2  0.0000      0.992 0.000 1.000
#> GSM1009143     1  0.0000      0.989 1.000 0.000
#> GSM1009157     1  0.9552      0.402 0.624 0.376
#> GSM1009171     2  0.0000      0.992 0.000 1.000
#> GSM1009185     2  0.0000      0.992 0.000 1.000
#> GSM1009199     1  0.0000      0.989 1.000 0.000
#> GSM1009074     1  0.0000      0.989 1.000 0.000
#> GSM1009088     2  0.0000      0.992 0.000 1.000
#> GSM1009102     1  0.0000      0.989 1.000 0.000
#> GSM1009116     2  0.0000      0.992 0.000 1.000
#> GSM1009130     2  0.0000      0.992 0.000 1.000
#> GSM1009144     1  0.0000      0.989 1.000 0.000
#> GSM1009158     1  0.0000      0.989 1.000 0.000
#> GSM1009172     2  0.0000      0.992 0.000 1.000
#> GSM1009186     2  0.0000      0.992 0.000 1.000
#> GSM1009200     1  0.0000      0.989 1.000 0.000
#> GSM1009075     1  0.0000      0.989 1.000 0.000
#> GSM1009089     2  0.0000      0.992 0.000 1.000
#> GSM1009103     1  0.0000      0.989 1.000 0.000
#> GSM1009117     2  0.0000      0.992 0.000 1.000
#> GSM1009131     2  0.0000      0.992 0.000 1.000
#> GSM1009145     1  0.0000      0.989 1.000 0.000
#> GSM1009159     1  0.0000      0.989 1.000 0.000
#> GSM1009173     2  0.0000      0.992 0.000 1.000
#> GSM1009187     2  0.0000      0.992 0.000 1.000
#> GSM1009201     1  0.0000      0.989 1.000 0.000

show/hide code output

cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#>            class entropy silhouette    p1    p2    p3
#> GSM1009062     1  0.4235      0.874 0.824 0.000 0.176
#> GSM1009076     2  0.1964      0.932 0.056 0.944 0.000
#> GSM1009090     3  0.0892      0.923 0.020 0.000 0.980
#> GSM1009104     2  0.0000      0.937 0.000 1.000 0.000
#> GSM1009118     3  0.5931      0.782 0.124 0.084 0.792
#> GSM1009132     3  0.0592      0.922 0.012 0.000 0.988
#> GSM1009146     1  0.2165      0.913 0.936 0.000 0.064
#> GSM1009160     2  0.1015      0.933 0.008 0.980 0.012
#> GSM1009174     2  0.3983      0.896 0.144 0.852 0.004
#> GSM1009188     1  0.3482      0.899 0.872 0.000 0.128
#> GSM1009063     1  0.4235      0.874 0.824 0.000 0.176
#> GSM1009077     2  0.1964      0.932 0.056 0.944 0.000
#> GSM1009091     3  0.0892      0.923 0.020 0.000 0.980
#> GSM1009105     2  0.0000      0.937 0.000 1.000 0.000
#> GSM1009119     3  0.4842      0.737 0.224 0.000 0.776
#> GSM1009133     3  0.0592      0.922 0.012 0.000 0.988
#> GSM1009147     1  0.2165      0.913 0.936 0.000 0.064
#> GSM1009161     2  0.1015      0.933 0.008 0.980 0.012
#> GSM1009175     2  0.3983      0.896 0.144 0.852 0.004
#> GSM1009189     1  0.3482      0.899 0.872 0.000 0.128
#> GSM1009064     1  0.4235      0.874 0.824 0.000 0.176
#> GSM1009078     2  0.1964      0.932 0.056 0.944 0.000
#> GSM1009092     3  0.0892      0.923 0.020 0.000 0.980
#> GSM1009106     2  0.0000      0.937 0.000 1.000 0.000
#> GSM1009120     1  0.3879      0.883 0.848 0.000 0.152
#> GSM1009134     3  0.0592      0.922 0.012 0.000 0.988
#> GSM1009148     1  0.2165      0.913 0.936 0.000 0.064
#> GSM1009162     2  0.1015      0.933 0.008 0.980 0.012
#> GSM1009176     2  0.3983      0.896 0.144 0.852 0.004
#> GSM1009190     1  0.3482      0.899 0.872 0.000 0.128
#> GSM1009065     1  0.4235      0.874 0.824 0.000 0.176
#> GSM1009079     2  0.1964      0.932 0.056 0.944 0.000
#> GSM1009093     3  0.0892      0.923 0.020 0.000 0.980
#> GSM1009107     2  0.0000      0.937 0.000 1.000 0.000
#> GSM1009121     3  0.5815      0.785 0.096 0.104 0.800
#> GSM1009135     3  0.0592      0.922 0.012 0.000 0.988
#> GSM1009149     1  0.2165      0.913 0.936 0.000 0.064
#> GSM1009163     2  0.1015      0.933 0.008 0.980 0.012
#> GSM1009177     2  0.3983      0.896 0.144 0.852 0.004
#> GSM1009191     1  0.3482      0.899 0.872 0.000 0.128
#> GSM1009066     1  0.4235      0.874 0.824 0.000 0.176
#> GSM1009080     2  0.1964      0.932 0.056 0.944 0.000
#> GSM1009094     3  0.0892      0.923 0.020 0.000 0.980
#> GSM1009108     2  0.0000      0.937 0.000 1.000 0.000
#> GSM1009122     3  0.8033      0.239 0.064 0.424 0.512
#> GSM1009136     3  0.0592      0.922 0.012 0.000 0.988
#> GSM1009150     1  0.2165      0.913 0.936 0.000 0.064
#> GSM1009164     2  0.1015      0.933 0.008 0.980 0.012
#> GSM1009178     2  0.3983      0.896 0.144 0.852 0.004
#> GSM1009192     1  0.3482      0.899 0.872 0.000 0.128
#> GSM1009067     1  0.4235      0.874 0.824 0.000 0.176
#> GSM1009081     2  0.1964      0.932 0.056 0.944 0.000
#> GSM1009095     3  0.0892      0.923 0.020 0.000 0.980
#> GSM1009109     2  0.0000      0.937 0.000 1.000 0.000
#> GSM1009123     3  0.3752      0.826 0.144 0.000 0.856
#> GSM1009137     3  0.0592      0.922 0.012 0.000 0.988
#> GSM1009151     1  0.2165      0.913 0.936 0.000 0.064
#> GSM1009165     2  0.1015      0.933 0.008 0.980 0.012
#> GSM1009179     2  0.3983      0.896 0.144 0.852 0.004
#> GSM1009193     1  0.3482      0.899 0.872 0.000 0.128
#> GSM1009068     1  0.4235      0.874 0.824 0.000 0.176
#> GSM1009082     2  0.1964      0.932 0.056 0.944 0.000
#> GSM1009096     3  0.0892      0.923 0.020 0.000 0.980
#> GSM1009110     2  0.0000      0.937 0.000 1.000 0.000
#> GSM1009124     3  0.3965      0.824 0.132 0.008 0.860
#> GSM1009138     3  0.0592      0.922 0.012 0.000 0.988
#> GSM1009152     1  0.2165      0.913 0.936 0.000 0.064
#> GSM1009166     2  0.1015      0.933 0.008 0.980 0.012
#> GSM1009180     2  0.3983      0.896 0.144 0.852 0.004
#> GSM1009194     1  0.3482      0.899 0.872 0.000 0.128
#> GSM1009069     1  0.3851      0.850 0.860 0.004 0.136
#> GSM1009083     2  0.1964      0.932 0.056 0.944 0.000
#> GSM1009097     3  0.0892      0.923 0.020 0.000 0.980
#> GSM1009111     2  0.0000      0.937 0.000 1.000 0.000
#> GSM1009125     3  0.7956      0.241 0.060 0.424 0.516
#> GSM1009139     3  0.0592      0.922 0.012 0.000 0.988
#> GSM1009153     1  0.2165      0.913 0.936 0.000 0.064
#> GSM1009167     2  0.1015      0.933 0.008 0.980 0.012
#> GSM1009181     2  0.3983      0.896 0.144 0.852 0.004
#> GSM1009195     1  0.3116      0.893 0.892 0.000 0.108
#> GSM1009070     1  0.4235      0.874 0.824 0.000 0.176
#> GSM1009084     2  0.1964      0.932 0.056 0.944 0.000
#> GSM1009098     3  0.0892      0.923 0.020 0.000 0.980
#> GSM1009112     2  0.0000      0.937 0.000 1.000 0.000
#> GSM1009126     3  0.3965      0.824 0.132 0.008 0.860
#> GSM1009140     3  0.0592      0.922 0.012 0.000 0.988
#> GSM1009154     1  0.2165      0.913 0.936 0.000 0.064
#> GSM1009168     2  0.1015      0.933 0.008 0.980 0.012
#> GSM1009182     2  0.3983      0.896 0.144 0.852 0.004
#> GSM1009196     1  0.3482      0.899 0.872 0.000 0.128
#> GSM1009071     1  0.4235      0.874 0.824 0.000 0.176
#> GSM1009085     2  0.1964      0.932 0.056 0.944 0.000
#> GSM1009099     3  0.0892      0.923 0.020 0.000 0.980
#> GSM1009113     2  0.0000      0.937 0.000 1.000 0.000
#> GSM1009127     3  0.4842      0.737 0.224 0.000 0.776
#> GSM1009141     3  0.0592      0.922 0.012 0.000 0.988
#> GSM1009155     1  0.2165      0.913 0.936 0.000 0.064
#> GSM1009169     2  0.1015      0.933 0.008 0.980 0.012
#> GSM1009183     2  0.3983      0.896 0.144 0.852 0.004
#> GSM1009197     1  0.3482      0.899 0.872 0.000 0.128
#> GSM1009072     1  0.4235      0.874 0.824 0.000 0.176
#> GSM1009086     2  0.1964      0.932 0.056 0.944 0.000
#> GSM1009100     3  0.0892      0.923 0.020 0.000 0.980
#> GSM1009114     2  0.0000      0.937 0.000 1.000 0.000
#> GSM1009128     3  0.5815      0.786 0.096 0.104 0.800
#> GSM1009142     3  0.0592      0.922 0.012 0.000 0.988
#> GSM1009156     1  0.1031      0.883 0.976 0.000 0.024
#> GSM1009170     2  0.1015      0.933 0.008 0.980 0.012
#> GSM1009184     2  0.3983      0.896 0.144 0.852 0.004
#> GSM1009198     1  0.3482      0.899 0.872 0.000 0.128
#> GSM1009073     1  0.4235      0.874 0.824 0.000 0.176
#> GSM1009087     2  0.1964      0.932 0.056 0.944 0.000
#> GSM1009101     3  0.0892      0.923 0.020 0.000 0.980
#> GSM1009115     2  0.0000      0.937 0.000 1.000 0.000
#> GSM1009129     2  0.4469      0.840 0.060 0.864 0.076
#> GSM1009143     3  0.0592      0.922 0.012 0.000 0.988
#> GSM1009157     1  0.0592      0.873 0.988 0.000 0.012
#> GSM1009171     2  0.1015      0.933 0.008 0.980 0.012
#> GSM1009185     2  0.3983      0.896 0.144 0.852 0.004
#> GSM1009199     1  0.3192      0.895 0.888 0.000 0.112
#> GSM1009074     1  0.4235      0.874 0.824 0.000 0.176
#> GSM1009088     2  0.1964      0.932 0.056 0.944 0.000
#> GSM1009102     3  0.0892      0.923 0.020 0.000 0.980
#> GSM1009116     2  0.0000      0.937 0.000 1.000 0.000
#> GSM1009130     2  0.2280      0.907 0.052 0.940 0.008
#> GSM1009144     3  0.0592      0.922 0.012 0.000 0.988
#> GSM1009158     1  0.2165      0.913 0.936 0.000 0.064
#> GSM1009172     2  0.1015      0.933 0.008 0.980 0.012
#> GSM1009186     2  0.3983      0.896 0.144 0.852 0.004
#> GSM1009200     1  0.3482      0.899 0.872 0.000 0.128
#> GSM1009075     1  0.4235      0.874 0.824 0.000 0.176
#> GSM1009089     2  0.5138      0.740 0.252 0.748 0.000
#> GSM1009103     3  0.0892      0.923 0.020 0.000 0.980
#> GSM1009117     2  0.0000      0.937 0.000 1.000 0.000
#> GSM1009131     2  0.8521     -0.112 0.092 0.468 0.440
#> GSM1009145     3  0.0592      0.922 0.012 0.000 0.988
#> GSM1009159     1  0.2165      0.913 0.936 0.000 0.064
#> GSM1009173     2  0.1015      0.933 0.008 0.980 0.012
#> GSM1009187     2  0.3983      0.896 0.144 0.852 0.004
#> GSM1009201     1  0.3482      0.899 0.872 0.000 0.128

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>            class entropy silhouette    p1    p2    p3    p4
#> GSM1009062     1  0.4917      0.797 0.768 0.040 0.008 0.184
#> GSM1009076     2  0.4222      0.733 0.000 0.728 0.272 0.000
#> GSM1009090     4  0.0707      0.942 0.020 0.000 0.000 0.980
#> GSM1009104     3  0.4661      0.520 0.000 0.348 0.652 0.000
#> GSM1009118     3  0.8224      0.398 0.096 0.176 0.572 0.156
#> GSM1009132     4  0.0000      0.942 0.000 0.000 0.000 1.000
#> GSM1009146     1  0.1059      0.878 0.972 0.012 0.000 0.016
#> GSM1009160     3  0.1867      0.706 0.000 0.072 0.928 0.000
#> GSM1009174     2  0.1584      0.777 0.012 0.952 0.036 0.000
#> GSM1009188     1  0.3038      0.863 0.904 0.036 0.032 0.028
#> GSM1009063     1  0.4917      0.797 0.768 0.040 0.008 0.184
#> GSM1009077     2  0.4222      0.733 0.000 0.728 0.272 0.000
#> GSM1009091     4  0.0707      0.942 0.020 0.000 0.000 0.980
#> GSM1009105     3  0.4661      0.520 0.000 0.348 0.652 0.000
#> GSM1009119     1  0.5027      0.751 0.784 0.028 0.036 0.152
#> GSM1009133     4  0.0000      0.942 0.000 0.000 0.000 1.000
#> GSM1009147     1  0.1059      0.878 0.972 0.012 0.000 0.016
#> GSM1009161     3  0.1867      0.706 0.000 0.072 0.928 0.000
#> GSM1009175     2  0.1584      0.777 0.012 0.952 0.036 0.000
#> GSM1009189     1  0.3038      0.863 0.904 0.036 0.032 0.028
#> GSM1009064     1  0.4917      0.797 0.768 0.040 0.008 0.184
#> GSM1009078     2  0.4164      0.731 0.000 0.736 0.264 0.000
#> GSM1009092     4  0.0707      0.942 0.020 0.000 0.000 0.980
#> GSM1009106     3  0.4661      0.520 0.000 0.348 0.652 0.000
#> GSM1009120     1  0.2940      0.863 0.908 0.028 0.036 0.028
#> GSM1009134     4  0.0000      0.942 0.000 0.000 0.000 1.000
#> GSM1009148     1  0.1059      0.878 0.972 0.012 0.000 0.016
#> GSM1009162     3  0.1867      0.706 0.000 0.072 0.928 0.000
#> GSM1009176     2  0.1584      0.777 0.012 0.952 0.036 0.000
#> GSM1009190     1  0.3038      0.863 0.904 0.036 0.032 0.028
#> GSM1009065     1  0.4917      0.797 0.768 0.040 0.008 0.184
#> GSM1009079     2  0.4222      0.733 0.000 0.728 0.272 0.000
#> GSM1009093     4  0.0707      0.942 0.020 0.000 0.000 0.980
#> GSM1009107     3  0.4661      0.520 0.000 0.348 0.652 0.000
#> GSM1009121     3  0.7656      0.445 0.072 0.164 0.620 0.144
#> GSM1009135     4  0.0000      0.942 0.000 0.000 0.000 1.000
#> GSM1009149     1  0.1059      0.878 0.972 0.012 0.000 0.016
#> GSM1009163     3  0.1867      0.706 0.000 0.072 0.928 0.000
#> GSM1009177     2  0.1584      0.777 0.012 0.952 0.036 0.000
#> GSM1009191     1  0.3038      0.863 0.904 0.036 0.032 0.028
#> GSM1009066     1  0.4917      0.797 0.768 0.040 0.008 0.184
#> GSM1009080     2  0.4222      0.733 0.000 0.728 0.272 0.000
#> GSM1009094     4  0.0707      0.942 0.020 0.000 0.000 0.980
#> GSM1009108     3  0.4661      0.520 0.000 0.348 0.652 0.000
#> GSM1009122     3  0.6918      0.493 0.056 0.188 0.668 0.088
#> GSM1009136     4  0.0000      0.942 0.000 0.000 0.000 1.000
#> GSM1009150     1  0.1059      0.878 0.972 0.012 0.000 0.016
#> GSM1009164     3  0.1867      0.706 0.000 0.072 0.928 0.000
#> GSM1009178     2  0.1584      0.777 0.012 0.952 0.036 0.000
#> GSM1009192     1  0.3038      0.863 0.904 0.036 0.032 0.028
#> GSM1009067     1  0.4917      0.797 0.768 0.040 0.008 0.184
#> GSM1009081     2  0.4222      0.733 0.000 0.728 0.272 0.000
#> GSM1009095     4  0.0707      0.942 0.020 0.000 0.000 0.980
#> GSM1009109     3  0.4661      0.520 0.000 0.348 0.652 0.000
#> GSM1009123     4  0.7082      0.515 0.264 0.032 0.092 0.612
#> GSM1009137     4  0.0000      0.942 0.000 0.000 0.000 1.000
#> GSM1009151     1  0.1059      0.878 0.972 0.012 0.000 0.016
#> GSM1009165     3  0.1867      0.706 0.000 0.072 0.928 0.000
#> GSM1009179     2  0.1584      0.777 0.012 0.952 0.036 0.000
#> GSM1009193     1  0.3038      0.863 0.904 0.036 0.032 0.028
#> GSM1009068     1  0.4917      0.797 0.768 0.040 0.008 0.184
#> GSM1009082     2  0.4222      0.733 0.000 0.728 0.272 0.000
#> GSM1009096     4  0.0707      0.942 0.020 0.000 0.000 0.980
#> GSM1009110     3  0.4661      0.520 0.000 0.348 0.652 0.000
#> GSM1009124     4  0.9335      0.278 0.168 0.144 0.264 0.424
#> GSM1009138     4  0.0000      0.942 0.000 0.000 0.000 1.000
#> GSM1009152     1  0.1059      0.878 0.972 0.012 0.000 0.016
#> GSM1009166     3  0.1867      0.706 0.000 0.072 0.928 0.000
#> GSM1009180     2  0.1584      0.777 0.012 0.952 0.036 0.000
#> GSM1009194     1  0.3038      0.863 0.904 0.036 0.032 0.028
#> GSM1009069     1  0.4917      0.797 0.768 0.040 0.008 0.184
#> GSM1009083     2  0.4222      0.733 0.000 0.728 0.272 0.000
#> GSM1009097     4  0.0707      0.942 0.020 0.000 0.000 0.980
#> GSM1009111     3  0.4661      0.520 0.000 0.348 0.652 0.000
#> GSM1009125     3  0.6952      0.493 0.052 0.200 0.660 0.088
#> GSM1009139     4  0.0000      0.942 0.000 0.000 0.000 1.000
#> GSM1009153     1  0.1059      0.878 0.972 0.012 0.000 0.016
#> GSM1009167     3  0.1867      0.706 0.000 0.072 0.928 0.000
#> GSM1009181     2  0.1584      0.777 0.012 0.952 0.036 0.000
#> GSM1009195     1  0.3038      0.863 0.904 0.036 0.032 0.028
#> GSM1009070     1  0.4917      0.797 0.768 0.040 0.008 0.184
#> GSM1009084     2  0.4222      0.733 0.000 0.728 0.272 0.000
#> GSM1009098     4  0.0707      0.942 0.020 0.000 0.000 0.980
#> GSM1009112     3  0.4661      0.520 0.000 0.348 0.652 0.000
#> GSM1009126     4  0.9321      0.287 0.168 0.144 0.260 0.428
#> GSM1009140     4  0.0000      0.942 0.000 0.000 0.000 1.000
#> GSM1009154     1  0.1059      0.878 0.972 0.012 0.000 0.016
#> GSM1009168     3  0.1867      0.706 0.000 0.072 0.928 0.000
#> GSM1009182     2  0.1584      0.777 0.012 0.952 0.036 0.000
#> GSM1009196     1  0.3038      0.863 0.904 0.036 0.032 0.028
#> GSM1009071     1  0.4917      0.797 0.768 0.040 0.008 0.184
#> GSM1009085     2  0.4222      0.733 0.000 0.728 0.272 0.000
#> GSM1009099     4  0.0707      0.942 0.020 0.000 0.000 0.980
#> GSM1009113     3  0.4661      0.520 0.000 0.348 0.652 0.000
#> GSM1009127     1  0.5482      0.735 0.764 0.032 0.056 0.148
#> GSM1009141     4  0.0000      0.942 0.000 0.000 0.000 1.000
#> GSM1009155     1  0.1059      0.878 0.972 0.012 0.000 0.016
#> GSM1009169     3  0.1867      0.706 0.000 0.072 0.928 0.000
#> GSM1009183     2  0.1584      0.777 0.012 0.952 0.036 0.000
#> GSM1009197     1  0.3038      0.863 0.904 0.036 0.032 0.028
#> GSM1009072     1  0.4917      0.797 0.768 0.040 0.008 0.184
#> GSM1009086     2  0.4222      0.733 0.000 0.728 0.272 0.000
#> GSM1009100     4  0.0707      0.942 0.020 0.000 0.000 0.980
#> GSM1009114     3  0.4661      0.520 0.000 0.348 0.652 0.000
#> GSM1009128     3  0.7750      0.432 0.068 0.152 0.608 0.172
#> GSM1009142     4  0.0000      0.942 0.000 0.000 0.000 1.000
#> GSM1009156     1  0.1004      0.874 0.972 0.024 0.004 0.000
#> GSM1009170     3  0.1867      0.706 0.000 0.072 0.928 0.000
#> GSM1009184     2  0.1584      0.777 0.012 0.952 0.036 0.000
#> GSM1009198     1  0.3038      0.863 0.904 0.036 0.032 0.028
#> GSM1009073     1  0.4917      0.797 0.768 0.040 0.008 0.184
#> GSM1009087     2  0.4164      0.731 0.000 0.736 0.264 0.000
#> GSM1009101     4  0.0707      0.942 0.020 0.000 0.000 0.980
#> GSM1009115     3  0.4661      0.520 0.000 0.348 0.652 0.000
#> GSM1009129     3  0.5317      0.554 0.052 0.200 0.740 0.008
#> GSM1009143     4  0.0000      0.942 0.000 0.000 0.000 1.000
#> GSM1009157     1  0.1109      0.873 0.968 0.028 0.004 0.000
#> GSM1009171     3  0.1867      0.706 0.000 0.072 0.928 0.000
#> GSM1009185     2  0.1584      0.777 0.012 0.952 0.036 0.000
#> GSM1009199     1  0.3038      0.863 0.904 0.036 0.032 0.028
#> GSM1009074     1  0.4917      0.797 0.768 0.040 0.008 0.184
#> GSM1009088     2  0.4164      0.731 0.000 0.736 0.264 0.000
#> GSM1009102     4  0.0707      0.942 0.020 0.000 0.000 0.980
#> GSM1009116     3  0.4661      0.520 0.000 0.348 0.652 0.000
#> GSM1009130     3  0.3266      0.653 0.040 0.084 0.876 0.000
#> GSM1009144     4  0.0000      0.942 0.000 0.000 0.000 1.000
#> GSM1009158     1  0.1059      0.878 0.972 0.012 0.000 0.016
#> GSM1009172     3  0.1867      0.706 0.000 0.072 0.928 0.000
#> GSM1009186     2  0.1584      0.777 0.012 0.952 0.036 0.000
#> GSM1009200     1  0.3038      0.863 0.904 0.036 0.032 0.028
#> GSM1009075     1  0.4917      0.797 0.768 0.040 0.008 0.184
#> GSM1009089     2  0.4576      0.725 0.012 0.728 0.260 0.000
#> GSM1009103     4  0.0707      0.942 0.020 0.000 0.000 0.980
#> GSM1009117     3  0.4661      0.520 0.000 0.348 0.652 0.000
#> GSM1009131     3  0.5737      0.549 0.064 0.196 0.724 0.016
#> GSM1009145     4  0.0000      0.942 0.000 0.000 0.000 1.000
#> GSM1009159     1  0.1059      0.878 0.972 0.012 0.000 0.016
#> GSM1009173     3  0.1867      0.706 0.000 0.072 0.928 0.000
#> GSM1009187     2  0.1584      0.777 0.012 0.952 0.036 0.000
#> GSM1009201     1  0.3038      0.863 0.904 0.036 0.032 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
#> GSM1009062     3  0.5309      0.999 0.336 0.004 0.604 0.056 0.000
#> GSM1009076     5  0.5942      0.198 0.004 0.292 0.124 0.000 0.580
#> GSM1009090     4  0.0510      0.983 0.016 0.000 0.000 0.984 0.000
#> GSM1009104     5  0.0162      0.556 0.000 0.004 0.000 0.000 0.996
#> GSM1009118     1  0.8950      0.268 0.424 0.220 0.148 0.072 0.136
#> GSM1009132     4  0.0609      0.983 0.000 0.000 0.020 0.980 0.000
#> GSM1009146     1  0.4313     -0.157 0.636 0.008 0.356 0.000 0.000
#> GSM1009160     5  0.6381      0.495 0.000 0.212 0.276 0.000 0.512
#> GSM1009174     2  0.3652      1.000 0.012 0.784 0.004 0.000 0.200
#> GSM1009188     1  0.0609      0.519 0.980 0.000 0.000 0.020 0.000
#> GSM1009063     3  0.5309      0.999 0.336 0.004 0.604 0.056 0.000
#> GSM1009077     5  0.5942      0.198 0.004 0.292 0.124 0.000 0.580
#> GSM1009091     4  0.0510      0.983 0.016 0.000 0.000 0.984 0.000
#> GSM1009105     5  0.0162      0.556 0.000 0.004 0.000 0.000 0.996
#> GSM1009119     1  0.4055      0.476 0.820 0.028 0.064 0.088 0.000
#> GSM1009133     4  0.0609      0.983 0.000 0.000 0.020 0.980 0.000
#> GSM1009147     1  0.4313     -0.157 0.636 0.008 0.356 0.000 0.000
#> GSM1009161     5  0.6381      0.495 0.000 0.212 0.276 0.000 0.512
#> GSM1009175     2  0.3652      1.000 0.012 0.784 0.004 0.000 0.200
#> GSM1009189     1  0.0609      0.519 0.980 0.000 0.000 0.020 0.000
#> GSM1009064     3  0.5309      0.999 0.336 0.004 0.604 0.056 0.000
#> GSM1009078     5  0.5942      0.198 0.004 0.292 0.124 0.000 0.580
#> GSM1009092     4  0.0510      0.983 0.016 0.000 0.000 0.984 0.000
#> GSM1009106     5  0.0162      0.556 0.000 0.004 0.000 0.000 0.996
#> GSM1009120     1  0.3036      0.496 0.880 0.028 0.064 0.028 0.000
#> GSM1009134     4  0.0609      0.983 0.000 0.000 0.020 0.980 0.000
#> GSM1009148     1  0.4313     -0.157 0.636 0.008 0.356 0.000 0.000
#> GSM1009162     5  0.6381      0.495 0.000 0.212 0.276 0.000 0.512
#> GSM1009176     2  0.3652      1.000 0.012 0.784 0.004 0.000 0.200
#> GSM1009190     1  0.0609      0.519 0.980 0.000 0.000 0.020 0.000
#> GSM1009065     3  0.5309      0.999 0.336 0.004 0.604 0.056 0.000
#> GSM1009079     5  0.5942      0.198 0.004 0.292 0.124 0.000 0.580
#> GSM1009093     4  0.0510      0.983 0.016 0.000 0.000 0.984 0.000
#> GSM1009107     5  0.0162      0.556 0.000 0.004 0.000 0.000 0.996
#> GSM1009121     1  0.9104      0.230 0.396 0.220 0.148 0.068 0.168
#> GSM1009135     4  0.0609      0.983 0.000 0.000 0.020 0.980 0.000
#> GSM1009149     1  0.4313     -0.157 0.636 0.008 0.356 0.000 0.000
#> GSM1009163     5  0.6381      0.495 0.000 0.212 0.276 0.000 0.512
#> GSM1009177     2  0.3652      1.000 0.012 0.784 0.004 0.000 0.200
#> GSM1009191     1  0.0609      0.519 0.980 0.000 0.000 0.020 0.000
#> GSM1009066     3  0.5309      0.999 0.336 0.004 0.604 0.056 0.000
#> GSM1009080     5  0.5942      0.198 0.004 0.292 0.124 0.000 0.580
#> GSM1009094     4  0.0510      0.983 0.016 0.000 0.000 0.984 0.000
#> GSM1009108     5  0.0162      0.556 0.000 0.004 0.000 0.000 0.996
#> GSM1009122     1  0.9088      0.203 0.384 0.220 0.152 0.056 0.188
#> GSM1009136     4  0.0609      0.983 0.000 0.000 0.020 0.980 0.000
#> GSM1009150     1  0.4313     -0.157 0.636 0.008 0.356 0.000 0.000
#> GSM1009164     5  0.6381      0.495 0.000 0.212 0.276 0.000 0.512
#> GSM1009178     2  0.3652      1.000 0.012 0.784 0.004 0.000 0.200
#> GSM1009192     1  0.0609      0.519 0.980 0.000 0.000 0.020 0.000
#> GSM1009067     3  0.5309      0.999 0.336 0.004 0.604 0.056 0.000
#> GSM1009081     5  0.5942      0.198 0.004 0.292 0.124 0.000 0.580
#> GSM1009095     4  0.0510      0.983 0.016 0.000 0.000 0.984 0.000
#> GSM1009109     5  0.0162      0.556 0.000 0.004 0.000 0.000 0.996
#> GSM1009123     1  0.5946      0.379 0.632 0.040 0.072 0.256 0.000
#> GSM1009137     4  0.0609      0.983 0.000 0.000 0.020 0.980 0.000
#> GSM1009151     1  0.4313     -0.157 0.636 0.008 0.356 0.000 0.000
#> GSM1009165     5  0.6381      0.495 0.000 0.212 0.276 0.000 0.512
#> GSM1009179     2  0.3652      1.000 0.012 0.784 0.004 0.000 0.200
#> GSM1009193     1  0.0609      0.519 0.980 0.000 0.000 0.020 0.000
#> GSM1009068     3  0.5309      0.999 0.336 0.004 0.604 0.056 0.000
#> GSM1009082     5  0.5942      0.198 0.004 0.292 0.124 0.000 0.580
#> GSM1009096     4  0.0510      0.983 0.016 0.000 0.000 0.984 0.000
#> GSM1009110     5  0.0162      0.556 0.000 0.004 0.000 0.000 0.996
#> GSM1009124     1  0.7894      0.370 0.532 0.192 0.148 0.096 0.032
#> GSM1009138     4  0.0609      0.983 0.000 0.000 0.020 0.980 0.000
#> GSM1009152     1  0.4313     -0.157 0.636 0.008 0.356 0.000 0.000
#> GSM1009166     5  0.6381      0.495 0.000 0.212 0.276 0.000 0.512
#> GSM1009180     2  0.3652      1.000 0.012 0.784 0.004 0.000 0.200
#> GSM1009194     1  0.0609      0.519 0.980 0.000 0.000 0.020 0.000
#> GSM1009069     3  0.5399      0.991 0.336 0.004 0.604 0.052 0.004
#> GSM1009083     5  0.5942      0.198 0.004 0.292 0.124 0.000 0.580
#> GSM1009097     4  0.0510      0.983 0.016 0.000 0.000 0.984 0.000
#> GSM1009111     5  0.0162      0.556 0.000 0.004 0.000 0.000 0.996
#> GSM1009125     1  0.9107      0.206 0.384 0.224 0.148 0.060 0.184
#> GSM1009139     4  0.0609      0.983 0.000 0.000 0.020 0.980 0.000
#> GSM1009153     1  0.4313     -0.157 0.636 0.008 0.356 0.000 0.000
#> GSM1009167     5  0.6381      0.495 0.000 0.212 0.276 0.000 0.512
#> GSM1009181     2  0.3652      1.000 0.012 0.784 0.004 0.000 0.200
#> GSM1009195     1  0.0671      0.517 0.980 0.000 0.004 0.016 0.000
#> GSM1009070     3  0.5309      0.999 0.336 0.004 0.604 0.056 0.000
#> GSM1009084     5  0.5942      0.198 0.004 0.292 0.124 0.000 0.580
#> GSM1009098     4  0.0510      0.983 0.016 0.000 0.000 0.984 0.000
#> GSM1009112     5  0.0162      0.556 0.000 0.004 0.000 0.000 0.996
#> GSM1009126     1  0.7894      0.370 0.532 0.192 0.148 0.096 0.032
#> GSM1009140     4  0.0609      0.983 0.000 0.000 0.020 0.980 0.000
#> GSM1009154     1  0.4313     -0.157 0.636 0.008 0.356 0.000 0.000
#> GSM1009168     5  0.6381      0.495 0.000 0.212 0.276 0.000 0.512
#> GSM1009182     2  0.3652      1.000 0.012 0.784 0.004 0.000 0.200
#> GSM1009196     1  0.0609      0.519 0.980 0.000 0.000 0.020 0.000
#> GSM1009071     3  0.5309      0.999 0.336 0.004 0.604 0.056 0.000
#> GSM1009085     5  0.5942      0.198 0.004 0.292 0.124 0.000 0.580
#> GSM1009099     4  0.0510      0.983 0.016 0.000 0.000 0.984 0.000
#> GSM1009113     5  0.0162      0.556 0.000 0.004 0.000 0.000 0.996
#> GSM1009127     1  0.4355      0.472 0.804 0.040 0.068 0.088 0.000
#> GSM1009141     4  0.0609      0.983 0.000 0.000 0.020 0.980 0.000
#> GSM1009155     1  0.4313     -0.157 0.636 0.008 0.356 0.000 0.000
#> GSM1009169     5  0.6381      0.495 0.000 0.212 0.276 0.000 0.512
#> GSM1009183     2  0.3652      1.000 0.012 0.784 0.004 0.000 0.200
#> GSM1009197     1  0.0609      0.519 0.980 0.000 0.000 0.020 0.000
#> GSM1009072     3  0.5309      0.999 0.336 0.004 0.604 0.056 0.000
#> GSM1009086     5  0.5942      0.198 0.004 0.292 0.124 0.000 0.580
#> GSM1009100     4  0.0510      0.983 0.016 0.000 0.000 0.984 0.000
#> GSM1009114     5  0.0162      0.556 0.000 0.004 0.000 0.000 0.996
#> GSM1009128     1  0.9176      0.231 0.392 0.224 0.148 0.080 0.156
#> GSM1009142     4  0.0609      0.983 0.000 0.000 0.020 0.980 0.000
#> GSM1009156     1  0.4313     -0.157 0.636 0.008 0.356 0.000 0.000
#> GSM1009170     5  0.6381      0.495 0.000 0.212 0.276 0.000 0.512
#> GSM1009184     2  0.3652      1.000 0.012 0.784 0.004 0.000 0.200
#> GSM1009198     1  0.0609      0.519 0.980 0.000 0.000 0.020 0.000
#> GSM1009073     3  0.5309      0.999 0.336 0.004 0.604 0.056 0.000
#> GSM1009087     5  0.5942      0.198 0.004 0.292 0.124 0.000 0.580
#> GSM1009101     4  0.0510      0.983 0.016 0.000 0.000 0.984 0.000
#> GSM1009115     5  0.0162      0.556 0.000 0.004 0.000 0.000 0.996
#> GSM1009129     1  0.8589      0.144 0.380 0.216 0.156 0.012 0.236
#> GSM1009143     4  0.0609      0.983 0.000 0.000 0.020 0.980 0.000
#> GSM1009157     1  0.4313     -0.157 0.636 0.008 0.356 0.000 0.000
#> GSM1009171     5  0.6381      0.495 0.000 0.212 0.276 0.000 0.512
#> GSM1009185     2  0.3652      1.000 0.012 0.784 0.004 0.000 0.200
#> GSM1009199     1  0.0609      0.519 0.980 0.000 0.000 0.020 0.000
#> GSM1009074     3  0.5309      0.999 0.336 0.004 0.604 0.056 0.000
#> GSM1009088     5  0.5942      0.198 0.004 0.292 0.124 0.000 0.580
#> GSM1009102     4  0.0510      0.983 0.016 0.000 0.000 0.984 0.000
#> GSM1009116     5  0.0162      0.556 0.000 0.004 0.000 0.000 0.996
#> GSM1009130     5  0.7848      0.158 0.296 0.100 0.180 0.000 0.424
#> GSM1009144     4  0.0609      0.983 0.000 0.000 0.020 0.980 0.000
#> GSM1009158     1  0.4313     -0.157 0.636 0.008 0.356 0.000 0.000
#> GSM1009172     5  0.6381      0.495 0.000 0.212 0.276 0.000 0.512
#> GSM1009186     2  0.3652      1.000 0.012 0.784 0.004 0.000 0.200
#> GSM1009200     1  0.0609      0.519 0.980 0.000 0.000 0.020 0.000
#> GSM1009075     3  0.5309      0.999 0.336 0.004 0.604 0.056 0.000
#> GSM1009089     5  0.6053      0.173 0.004 0.292 0.136 0.000 0.568
#> GSM1009103     4  0.0510      0.983 0.016 0.000 0.000 0.984 0.000
#> GSM1009117     5  0.0162      0.556 0.000 0.004 0.000 0.000 0.996
#> GSM1009131     1  0.8633      0.167 0.388 0.216 0.156 0.016 0.224
#> GSM1009145     4  0.0609      0.983 0.000 0.000 0.020 0.980 0.000
#> GSM1009159     1  0.4313     -0.157 0.636 0.008 0.356 0.000 0.000
#> GSM1009173     5  0.6381      0.495 0.000 0.212 0.276 0.000 0.512
#> GSM1009187     2  0.3652      1.000 0.012 0.784 0.004 0.000 0.200
#> GSM1009201     1  0.0609      0.519 0.980 0.000 0.000 0.020 0.000

show/hide code output

cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#>            class entropy silhouette    p1    p2    p3    p4    p5    p6
#> GSM1009062     6  0.1257      0.708 0.000 0.000 0.000 0.020 0.028 0.952
#> GSM1009076     5  0.1180      0.641 0.004 0.004 0.008 0.000 0.960 0.024
#> GSM1009090     4  0.0146      0.982 0.004 0.000 0.000 0.996 0.000 0.000
#> GSM1009104     5  0.5721      0.604 0.028 0.100 0.324 0.000 0.548 0.000
#> GSM1009118     1  0.6662      0.562 0.532 0.272 0.132 0.008 0.020 0.036
#> GSM1009132     4  0.1086      0.982 0.012 0.012 0.000 0.964 0.000 0.012
#> GSM1009146     6  0.5052      0.632 0.392 0.052 0.012 0.000 0.000 0.544
#> GSM1009160     3  0.0790      1.000 0.000 0.000 0.968 0.000 0.032 0.000
#> GSM1009174     2  0.3198      1.000 0.000 0.740 0.000 0.000 0.260 0.000
#> GSM1009188     1  0.2520      0.644 0.872 0.012 0.000 0.008 0.000 0.108
#> GSM1009063     6  0.1257      0.708 0.000 0.000 0.000 0.020 0.028 0.952
#> GSM1009077     5  0.1180      0.641 0.004 0.004 0.008 0.000 0.960 0.024
#> GSM1009091     4  0.0146      0.982 0.004 0.000 0.000 0.996 0.000 0.000
#> GSM1009105     5  0.5721      0.604 0.028 0.100 0.324 0.000 0.548 0.000
#> GSM1009119     1  0.4517      0.656 0.744 0.164 0.020 0.008 0.000 0.064
#> GSM1009133     4  0.1086      0.982 0.012 0.012 0.000 0.964 0.000 0.012
#> GSM1009147     6  0.5052      0.632 0.392 0.052 0.012 0.000 0.000 0.544
#> GSM1009161     3  0.0790      1.000 0.000 0.000 0.968 0.000 0.032 0.000
#> GSM1009175     2  0.3198      1.000 0.000 0.740 0.000 0.000 0.260 0.000
#> GSM1009189     1  0.2520      0.644 0.872 0.012 0.000 0.008 0.000 0.108
#> GSM1009064     6  0.1257      0.708 0.000 0.000 0.000 0.020 0.028 0.952
#> GSM1009078     5  0.1180      0.641 0.004 0.004 0.008 0.000 0.960 0.024
#> GSM1009092     4  0.0146      0.982 0.004 0.000 0.000 0.996 0.000 0.000
#> GSM1009106     5  0.5721      0.604 0.028 0.100 0.324 0.000 0.548 0.000
#> GSM1009120     1  0.4555      0.655 0.744 0.156 0.020 0.008 0.000 0.072
#> GSM1009134     4  0.1086      0.982 0.012 0.012 0.000 0.964 0.000 0.012
#> GSM1009148     6  0.5052      0.632 0.392 0.052 0.012 0.000 0.000 0.544
#> GSM1009162     3  0.0790      1.000 0.000 0.000 0.968 0.000 0.032 0.000
#> GSM1009176     2  0.3198      1.000 0.000 0.740 0.000 0.000 0.260 0.000
#> GSM1009190     1  0.2520      0.644 0.872 0.012 0.000 0.008 0.000 0.108
#> GSM1009065     6  0.1257      0.708 0.000 0.000 0.000 0.020 0.028 0.952
#> GSM1009079     5  0.1180      0.641 0.004 0.004 0.008 0.000 0.960 0.024
#> GSM1009093     4  0.0146      0.982 0.004 0.000 0.000 0.996 0.000 0.000
#> GSM1009107     5  0.5721      0.604 0.028 0.100 0.324 0.000 0.548 0.000
#> GSM1009121     1  0.6808      0.547 0.516 0.276 0.140 0.008 0.024 0.036
#> GSM1009135     4  0.1086      0.982 0.012 0.012 0.000 0.964 0.000 0.012
#> GSM1009149     6  0.5052      0.632 0.392 0.052 0.012 0.000 0.000 0.544
#> GSM1009163     3  0.0790      1.000 0.000 0.000 0.968 0.000 0.032 0.000
#> GSM1009177     2  0.3198      1.000 0.000 0.740 0.000 0.000 0.260 0.000
#> GSM1009191     1  0.2520      0.644 0.872 0.012 0.000 0.008 0.000 0.108
#> GSM1009066     6  0.1257      0.708 0.000 0.000 0.000 0.020 0.028 0.952
#> GSM1009080     5  0.1180      0.641 0.004 0.004 0.008 0.000 0.960 0.024
#> GSM1009094     4  0.0146      0.982 0.004 0.000 0.000 0.996 0.000 0.000
#> GSM1009108     5  0.5721      0.604 0.028 0.100 0.324 0.000 0.548 0.000
#> GSM1009122     1  0.6847      0.539 0.504 0.288 0.140 0.008 0.024 0.036
#> GSM1009136     4  0.1086      0.982 0.012 0.012 0.000 0.964 0.000 0.012
#> GSM1009150     6  0.5052      0.632 0.392 0.052 0.012 0.000 0.000 0.544
#> GSM1009164     3  0.0790      1.000 0.000 0.000 0.968 0.000 0.032 0.000
#> GSM1009178     2  0.3198      1.000 0.000 0.740 0.000 0.000 0.260 0.000
#> GSM1009192     1  0.2520      0.644 0.872 0.012 0.000 0.008 0.000 0.108
#> GSM1009067     6  0.1257      0.708 0.000 0.000 0.000 0.020 0.028 0.952
#> GSM1009081     5  0.1180      0.641 0.004 0.004 0.008 0.000 0.960 0.024
#> GSM1009095     4  0.0146      0.982 0.004 0.000 0.000 0.996 0.000 0.000
#> GSM1009109     5  0.5721      0.604 0.028 0.100 0.324 0.000 0.548 0.000
#> GSM1009123     1  0.4767      0.652 0.736 0.168 0.024 0.036 0.000 0.036
#> GSM1009137     4  0.1086      0.982 0.012 0.012 0.000 0.964 0.000 0.012
#> GSM1009151     6  0.5052      0.632 0.392 0.052 0.012 0.000 0.000 0.544
#> GSM1009165     3  0.0790      1.000 0.000 0.000 0.968 0.000 0.032 0.000
#> GSM1009179     2  0.3198      1.000 0.000 0.740 0.000 0.000 0.260 0.000
#> GSM1009193     1  0.2520      0.644 0.872 0.012 0.000 0.008 0.000 0.108
#> GSM1009068     6  0.1257      0.708 0.000 0.000 0.000 0.020 0.028 0.952
#> GSM1009082     5  0.1180      0.641 0.004 0.004 0.008 0.000 0.960 0.024
#> GSM1009096     4  0.0146      0.982 0.004 0.000 0.000 0.996 0.000 0.000
#> GSM1009110     5  0.5721      0.604 0.028 0.100 0.324 0.000 0.548 0.000
#> GSM1009124     1  0.5640      0.636 0.652 0.212 0.084 0.012 0.004 0.036
#> GSM1009138     4  0.1086      0.982 0.012 0.012 0.000 0.964 0.000 0.012
#> GSM1009152     6  0.5052      0.632 0.392 0.052 0.012 0.000 0.000 0.544
#> GSM1009166     3  0.0790      1.000 0.000 0.000 0.968 0.000 0.032 0.000
#> GSM1009180     2  0.3198      1.000 0.000 0.740 0.000 0.000 0.260 0.000
#> GSM1009194     1  0.2520      0.644 0.872 0.012 0.000 0.008 0.000 0.108
#> GSM1009069     6  0.1196      0.700 0.000 0.000 0.000 0.008 0.040 0.952
#> GSM1009083     5  0.1180      0.641 0.004 0.004 0.008 0.000 0.960 0.024
#> GSM1009097     4  0.0146      0.982 0.004 0.000 0.000 0.996 0.000 0.000
#> GSM1009111     5  0.5721      0.604 0.028 0.100 0.324 0.000 0.548 0.000
#> GSM1009125     1  0.6876      0.534 0.500 0.288 0.144 0.008 0.024 0.036
#> GSM1009139     4  0.1086      0.982 0.012 0.012 0.000 0.964 0.000 0.012
#> GSM1009153     6  0.5052      0.632 0.392 0.052 0.012 0.000 0.000 0.544
#> GSM1009167     3  0.0790      1.000 0.000 0.000 0.968 0.000 0.032 0.000
#> GSM1009181     2  0.3198      1.000 0.000 0.740 0.000 0.000 0.260 0.000
#> GSM1009195     1  0.2551      0.640 0.872 0.012 0.000 0.004 0.004 0.108
#> GSM1009070     6  0.1257      0.708 0.000 0.000 0.000 0.020 0.028 0.952
#> GSM1009084     5  0.1180      0.641 0.004 0.004 0.008 0.000 0.960 0.024
#> GSM1009098     4  0.0146      0.982 0.004 0.000 0.000 0.996 0.000 0.000
#> GSM1009112     5  0.5721      0.604 0.028 0.100 0.324 0.000 0.548 0.000
#> GSM1009126     1  0.5640      0.636 0.652 0.212 0.084 0.012 0.004 0.036
#> GSM1009140     4  0.1086      0.982 0.012 0.012 0.000 0.964 0.000 0.012
#> GSM1009154     6  0.5052      0.632 0.392 0.052 0.012 0.000 0.000 0.544
#> GSM1009168     3  0.0790      1.000 0.000 0.000 0.968 0.000 0.032 0.000
#> GSM1009182     2  0.3198      1.000 0.000 0.740 0.000 0.000 0.260 0.000
#> GSM1009196     1  0.2520      0.644 0.872 0.012 0.000 0.008 0.000 0.108
#> GSM1009071     6  0.1257      0.708 0.000 0.000 0.000 0.020 0.028 0.952
#> GSM1009085     5  0.1180      0.641 0.004 0.004 0.008 0.000 0.960 0.024
#> GSM1009099     4  0.0146      0.982 0.004 0.000 0.000 0.996 0.000 0.000
#> GSM1009113     5  0.5721      0.604 0.028 0.100 0.324 0.000 0.548 0.000
#> GSM1009127     1  0.4646      0.655 0.736 0.168 0.020 0.012 0.000 0.064
#> GSM1009141     4  0.1086      0.982 0.012 0.012 0.000 0.964 0.000 0.012
#> GSM1009155     6  0.5052      0.632 0.392 0.052 0.012 0.000 0.000 0.544
#> GSM1009169     3  0.0790      1.000 0.000 0.000 0.968 0.000 0.032 0.000
#> GSM1009183     2  0.3198      1.000 0.000 0.740 0.000 0.000 0.260 0.000
#> GSM1009197     1  0.2520      0.644 0.872 0.012 0.000 0.008 0.000 0.108
#> GSM1009072     6  0.1257      0.708 0.000 0.000 0.000 0.020 0.028 0.952
#> GSM1009086     5  0.1180      0.641 0.004 0.004 0.008 0.000 0.960 0.024
#> GSM1009100     4  0.0146      0.982 0.004 0.000 0.000 0.996 0.000 0.000
#> GSM1009114     5  0.5721      0.604 0.028 0.100 0.324 0.000 0.548 0.000
#> GSM1009128     1  0.6808      0.547 0.516 0.276 0.140 0.008 0.024 0.036
#> GSM1009142     4  0.1086      0.982 0.012 0.012 0.000 0.964 0.000 0.012
#> GSM1009156     6  0.5052      0.632 0.392 0.052 0.012 0.000 0.000 0.544
#> GSM1009170     3  0.0790      1.000 0.000 0.000 0.968 0.000 0.032 0.000
#> GSM1009184     2  0.3198      1.000 0.000 0.740 0.000 0.000 0.260 0.000
#> GSM1009198     1  0.2520      0.644 0.872 0.012 0.000 0.008 0.000 0.108
#> GSM1009073     6  0.1257      0.708 0.000 0.000 0.000 0.020 0.028 0.952
#> GSM1009087     5  0.1180      0.641 0.004 0.004 0.008 0.000 0.960 0.024
#> GSM1009101     4  0.0146      0.982 0.004 0.000 0.000 0.996 0.000 0.000
#> GSM1009115     5  0.5721      0.604 0.028 0.100 0.324 0.000 0.548 0.000
#> GSM1009129     1  0.6925      0.532 0.500 0.284 0.140 0.004 0.036 0.036
#> GSM1009143     4  0.1086      0.982 0.012 0.012 0.000 0.964 0.000 0.012
#> GSM1009157     6  0.5052      0.632 0.392 0.052 0.012 0.000 0.000 0.544
#> GSM1009171     3  0.0790      1.000 0.000 0.000 0.968 0.000 0.032 0.000
#> GSM1009185     2  0.3198      1.000 0.000 0.740 0.000 0.000 0.260 0.000
#> GSM1009199     1  0.2520      0.644 0.872 0.012 0.000 0.008 0.000 0.108
#> GSM1009074     6  0.1257      0.708 0.000 0.000 0.000 0.020 0.028 0.952
#> GSM1009088     5  0.1180      0.641 0.004 0.004 0.008 0.000 0.960 0.024
#> GSM1009102     4  0.0146      0.982 0.004 0.000 0.000 0.996 0.000 0.000
#> GSM1009116     5  0.5721      0.604 0.028 0.100 0.324 0.000 0.548 0.000
#> GSM1009130     1  0.8055      0.289 0.360 0.212 0.148 0.000 0.244 0.036
#> GSM1009144     4  0.1086      0.982 0.012 0.012 0.000 0.964 0.000 0.012
#> GSM1009158     6  0.5052      0.632 0.392 0.052 0.012 0.000 0.000 0.544
#> GSM1009172     3  0.0790      1.000 0.000 0.000 0.968 0.000 0.032 0.000
#> GSM1009186     2  0.3198      1.000 0.000 0.740 0.000 0.000 0.260 0.000
#> GSM1009200     1  0.2520      0.644 0.872 0.012 0.000 0.008 0.000 0.108
#> GSM1009075     6  0.1257      0.708 0.000 0.000 0.000 0.020 0.028 0.952
#> GSM1009089     5  0.1180      0.641 0.004 0.004 0.008 0.000 0.960 0.024
#> GSM1009103     4  0.0146      0.982 0.004 0.000 0.000 0.996 0.000 0.000
#> GSM1009117     5  0.5721      0.604 0.028 0.100 0.324 0.000 0.548 0.000
#> GSM1009131     1  0.6746      0.549 0.524 0.268 0.140 0.004 0.028 0.036
#> GSM1009145     4  0.1086      0.982 0.012 0.012 0.000 0.964 0.000 0.012
#> GSM1009159     6  0.5052      0.632 0.392 0.052 0.012 0.000 0.000 0.544
#> GSM1009173     3  0.0790      1.000 0.000 0.000 0.968 0.000 0.032 0.000
#> GSM1009187     2  0.3198      1.000 0.000 0.740 0.000 0.000 0.260 0.000
#> GSM1009201     1  0.2520      0.644 0.872 0.012 0.000 0.008 0.000 0.108

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 temperature(p) time(p) specimen(p) k
#> SD:skmeans 138          0.869   0.998    1.28e-22 2
#> SD:skmeans 137          0.998   1.000    1.24e-44 3
#> SD:skmeans 133          1.000   1.000    1.69e-64 4
#> SD:skmeans  84          1.000   1.000    3.39e-59 5
#> SD:skmeans 139          1.000   1.000   2.31e-117 6

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


SD:pam**

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

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

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

res
#> A 'ConsensusPartition' object with k = 2, 3, 4, 5, 6.
#>   On a matrix with 51941 rows and 140 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 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 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.661           0.929       0.959         0.2297 0.819   0.819
#> 3 3 0.822           0.934       0.945         1.3025 0.642   0.563
#> 4 4 0.839           0.885       0.945         0.3127 0.823   0.621
#> 5 5 0.947           0.921       0.967         0.0825 0.946   0.821
#> 6 6 0.978           0.947       0.977         0.0750 0.938   0.760

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] 5

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

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

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

show/hide code output

cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#>            class entropy silhouette    p1    p2
#> GSM1009062     1  0.0000      0.951 1.000 0.000
#> GSM1009076     1  0.6973      0.825 0.812 0.188
#> GSM1009090     1  0.0000      0.951 1.000 0.000
#> GSM1009104     1  0.6973      0.825 0.812 0.188
#> GSM1009118     1  0.0376      0.950 0.996 0.004
#> GSM1009132     1  0.0000      0.951 1.000 0.000
#> GSM1009146     1  0.0000      0.951 1.000 0.000
#> GSM1009160     2  0.0000      1.000 0.000 1.000
#> GSM1009174     1  0.0938      0.946 0.988 0.012
#> GSM1009188     1  0.0000      0.951 1.000 0.000
#> GSM1009063     1  0.0000      0.951 1.000 0.000
#> GSM1009077     1  0.6973      0.825 0.812 0.188
#> GSM1009091     1  0.0000      0.951 1.000 0.000
#> GSM1009105     1  0.6973      0.825 0.812 0.188
#> GSM1009119     1  0.0000      0.951 1.000 0.000
#> GSM1009133     1  0.0000      0.951 1.000 0.000
#> GSM1009147     1  0.0000      0.951 1.000 0.000
#> GSM1009161     2  0.0000      1.000 0.000 1.000
#> GSM1009175     1  0.0938      0.946 0.988 0.012
#> GSM1009189     1  0.0000      0.951 1.000 0.000
#> GSM1009064     1  0.0000      0.951 1.000 0.000
#> GSM1009078     1  0.0000      0.951 1.000 0.000
#> GSM1009092     1  0.0000      0.951 1.000 0.000
#> GSM1009106     1  0.6973      0.825 0.812 0.188
#> GSM1009120     1  0.0000      0.951 1.000 0.000
#> GSM1009134     1  0.0000      0.951 1.000 0.000
#> GSM1009148     1  0.0000      0.951 1.000 0.000
#> GSM1009162     2  0.0000      1.000 0.000 1.000
#> GSM1009176     1  0.6973      0.825 0.812 0.188
#> GSM1009190     1  0.0000      0.951 1.000 0.000
#> GSM1009065     1  0.0000      0.951 1.000 0.000
#> GSM1009079     1  0.6973      0.825 0.812 0.188
#> GSM1009093     1  0.0000      0.951 1.000 0.000
#> GSM1009107     1  0.6973      0.825 0.812 0.188
#> GSM1009121     1  0.0000      0.951 1.000 0.000
#> GSM1009135     1  0.0000      0.951 1.000 0.000
#> GSM1009149     1  0.0000      0.951 1.000 0.000
#> GSM1009163     2  0.0000      1.000 0.000 1.000
#> GSM1009177     1  0.5946      0.859 0.856 0.144
#> GSM1009191     1  0.0000      0.951 1.000 0.000
#> GSM1009066     1  0.0000      0.951 1.000 0.000
#> GSM1009080     1  0.6973      0.825 0.812 0.188
#> GSM1009094     1  0.0000      0.951 1.000 0.000
#> GSM1009108     1  0.6973      0.825 0.812 0.188
#> GSM1009122     1  0.0938      0.946 0.988 0.012
#> GSM1009136     1  0.0000      0.951 1.000 0.000
#> GSM1009150     1  0.0000      0.951 1.000 0.000
#> GSM1009164     2  0.0000      1.000 0.000 1.000
#> GSM1009178     1  0.0938      0.946 0.988 0.012
#> GSM1009192     1  0.0000      0.951 1.000 0.000
#> GSM1009067     1  0.0000      0.951 1.000 0.000
#> GSM1009081     1  0.6973      0.825 0.812 0.188
#> GSM1009095     1  0.0000      0.951 1.000 0.000
#> GSM1009109     1  0.6973      0.825 0.812 0.188
#> GSM1009123     1  0.0000      0.951 1.000 0.000
#> GSM1009137     1  0.0000      0.951 1.000 0.000
#> GSM1009151     1  0.0000      0.951 1.000 0.000
#> GSM1009165     2  0.0000      1.000 0.000 1.000
#> GSM1009179     1  0.0938      0.946 0.988 0.012
#> GSM1009193     1  0.0000      0.951 1.000 0.000
#> GSM1009068     1  0.0000      0.951 1.000 0.000
#> GSM1009082     1  0.6973      0.825 0.812 0.188
#> GSM1009096     1  0.0000      0.951 1.000 0.000
#> GSM1009110     1  0.6973      0.825 0.812 0.188
#> GSM1009124     1  0.0000      0.951 1.000 0.000
#> GSM1009138     1  0.0000      0.951 1.000 0.000
#> GSM1009152     1  0.0000      0.951 1.000 0.000
#> GSM1009166     2  0.0000      1.000 0.000 1.000
#> GSM1009180     1  0.0938      0.946 0.988 0.012
#> GSM1009194     1  0.0000      0.951 1.000 0.000
#> GSM1009069     1  0.0376      0.950 0.996 0.004
#> GSM1009083     1  0.6973      0.825 0.812 0.188
#> GSM1009097     1  0.0000      0.951 1.000 0.000
#> GSM1009111     1  0.6973      0.825 0.812 0.188
#> GSM1009125     1  0.6973      0.825 0.812 0.188
#> GSM1009139     1  0.0000      0.951 1.000 0.000
#> GSM1009153     1  0.0000      0.951 1.000 0.000
#> GSM1009167     2  0.0000      1.000 0.000 1.000
#> GSM1009181     1  0.6973      0.825 0.812 0.188
#> GSM1009195     1  0.0000      0.951 1.000 0.000
#> GSM1009070     1  0.0000      0.951 1.000 0.000
#> GSM1009084     1  0.6973      0.825 0.812 0.188
#> GSM1009098     1  0.0000      0.951 1.000 0.000
#> GSM1009112     1  0.6973      0.825 0.812 0.188
#> GSM1009126     1  0.0000      0.951 1.000 0.000
#> GSM1009140     1  0.0000      0.951 1.000 0.000
#> GSM1009154     1  0.0000      0.951 1.000 0.000
#> GSM1009168     2  0.0000      1.000 0.000 1.000
#> GSM1009182     1  0.0938      0.946 0.988 0.012
#> GSM1009196     1  0.0000      0.951 1.000 0.000
#> GSM1009071     1  0.0000      0.951 1.000 0.000
#> GSM1009085     1  0.6973      0.825 0.812 0.188
#> GSM1009099     1  0.0000      0.951 1.000 0.000
#> GSM1009113     1  0.6973      0.825 0.812 0.188
#> GSM1009127     1  0.0000      0.951 1.000 0.000
#> GSM1009141     1  0.0000      0.951 1.000 0.000
#> GSM1009155     1  0.0000      0.951 1.000 0.000
#> GSM1009169     2  0.0000      1.000 0.000 1.000
#> GSM1009183     1  0.0938      0.946 0.988 0.012
#> GSM1009197     1  0.0000      0.951 1.000 0.000
#> GSM1009072     1  0.0000      0.951 1.000 0.000
#> GSM1009086     1  0.6973      0.825 0.812 0.188
#> GSM1009100     1  0.0000      0.951 1.000 0.000
#> GSM1009114     1  0.6973      0.825 0.812 0.188
#> GSM1009128     1  0.0000      0.951 1.000 0.000
#> GSM1009142     1  0.0000      0.951 1.000 0.000
#> GSM1009156     1  0.0000      0.951 1.000 0.000
#> GSM1009170     2  0.0000      1.000 0.000 1.000
#> GSM1009184     1  0.0938      0.946 0.988 0.012
#> GSM1009198     1  0.0000      0.951 1.000 0.000
#> GSM1009073     1  0.0000      0.951 1.000 0.000
#> GSM1009087     1  0.0000      0.951 1.000 0.000
#> GSM1009101     1  0.0000      0.951 1.000 0.000
#> GSM1009115     1  0.6973      0.825 0.812 0.188
#> GSM1009129     1  0.6973      0.825 0.812 0.188
#> GSM1009143     1  0.0000      0.951 1.000 0.000
#> GSM1009157     1  0.0000      0.951 1.000 0.000
#> GSM1009171     2  0.0000      1.000 0.000 1.000
#> GSM1009185     1  0.0938      0.946 0.988 0.012
#> GSM1009199     1  0.0000      0.951 1.000 0.000
#> GSM1009074     1  0.0000      0.951 1.000 0.000
#> GSM1009088     1  0.0000      0.951 1.000 0.000
#> GSM1009102     1  0.0000      0.951 1.000 0.000
#> GSM1009116     1  0.6973      0.825 0.812 0.188
#> GSM1009130     1  0.6712      0.833 0.824 0.176
#> GSM1009144     1  0.0000      0.951 1.000 0.000
#> GSM1009158     1  0.0000      0.951 1.000 0.000
#> GSM1009172     2  0.0000      1.000 0.000 1.000
#> GSM1009186     1  0.0938      0.946 0.988 0.012
#> GSM1009200     1  0.0000      0.951 1.000 0.000
#> GSM1009075     1  0.0000      0.951 1.000 0.000
#> GSM1009089     1  0.0000      0.951 1.000 0.000
#> GSM1009103     1  0.0000      0.951 1.000 0.000
#> GSM1009117     1  0.6973      0.825 0.812 0.188
#> GSM1009131     1  0.0000      0.951 1.000 0.000
#> GSM1009145     1  0.0000      0.951 1.000 0.000
#> GSM1009159     1  0.0000      0.951 1.000 0.000
#> GSM1009173     2  0.0000      1.000 0.000 1.000
#> GSM1009187     1  0.0938      0.946 0.988 0.012
#> GSM1009201     1  0.0000      0.951 1.000 0.000

show/hide code output

cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#>            class entropy silhouette    p1    p2 p3
#> GSM1009062     1  0.2356      0.955 0.928 0.072  0
#> GSM1009076     2  0.0000      0.927 0.000 1.000  0
#> GSM1009090     1  0.0000      0.938 1.000 0.000  0
#> GSM1009104     2  0.0000      0.927 0.000 1.000  0
#> GSM1009118     1  0.2448      0.953 0.924 0.076  0
#> GSM1009132     1  0.0892      0.931 0.980 0.020  0
#> GSM1009146     1  0.2165      0.958 0.936 0.064  0
#> GSM1009160     3  0.0000      1.000 0.000 0.000  1
#> GSM1009174     2  0.2537      0.908 0.080 0.920  0
#> GSM1009188     1  0.2066      0.958 0.940 0.060  0
#> GSM1009063     1  0.2537      0.951 0.920 0.080  0
#> GSM1009077     2  0.0000      0.927 0.000 1.000  0
#> GSM1009091     1  0.0000      0.938 1.000 0.000  0
#> GSM1009105     2  0.0000      0.927 0.000 1.000  0
#> GSM1009119     1  0.2066      0.958 0.940 0.060  0
#> GSM1009133     1  0.0000      0.938 1.000 0.000  0
#> GSM1009147     1  0.2165      0.958 0.936 0.064  0
#> GSM1009161     3  0.0000      1.000 0.000 0.000  1
#> GSM1009175     2  0.2537      0.908 0.080 0.920  0
#> GSM1009189     1  0.2165      0.958 0.936 0.064  0
#> GSM1009064     1  0.3116      0.932 0.892 0.108  0
#> GSM1009078     1  0.3686      0.906 0.860 0.140  0
#> GSM1009092     1  0.0000      0.938 1.000 0.000  0
#> GSM1009106     2  0.0000      0.927 0.000 1.000  0
#> GSM1009120     1  0.2165      0.958 0.936 0.064  0
#> GSM1009134     1  0.0000      0.938 1.000 0.000  0
#> GSM1009148     1  0.2165      0.958 0.936 0.064  0
#> GSM1009162     3  0.0000      1.000 0.000 0.000  1
#> GSM1009176     2  0.2448      0.910 0.076 0.924  0
#> GSM1009190     1  0.2165      0.958 0.936 0.064  0
#> GSM1009065     1  0.3340      0.922 0.880 0.120  0
#> GSM1009079     2  0.0000      0.927 0.000 1.000  0
#> GSM1009093     1  0.0000      0.938 1.000 0.000  0
#> GSM1009107     2  0.0000      0.927 0.000 1.000  0
#> GSM1009121     1  0.2165      0.958 0.936 0.064  0
#> GSM1009135     1  0.0000      0.938 1.000 0.000  0
#> GSM1009149     1  0.2165      0.958 0.936 0.064  0
#> GSM1009163     3  0.0000      1.000 0.000 0.000  1
#> GSM1009177     2  0.2537      0.908 0.080 0.920  0
#> GSM1009191     1  0.2165      0.958 0.936 0.064  0
#> GSM1009066     1  0.2448      0.953 0.924 0.076  0
#> GSM1009080     2  0.0000      0.927 0.000 1.000  0
#> GSM1009094     1  0.0000      0.938 1.000 0.000  0
#> GSM1009108     2  0.0000      0.927 0.000 1.000  0
#> GSM1009122     2  0.5591      0.607 0.304 0.696  0
#> GSM1009136     1  0.0000      0.938 1.000 0.000  0
#> GSM1009150     1  0.2066      0.958 0.940 0.060  0
#> GSM1009164     3  0.0000      1.000 0.000 0.000  1
#> GSM1009178     2  0.3038      0.889 0.104 0.896  0
#> GSM1009192     1  0.2165      0.958 0.936 0.064  0
#> GSM1009067     1  0.2356      0.955 0.928 0.072  0
#> GSM1009081     2  0.0000      0.927 0.000 1.000  0
#> GSM1009095     1  0.0000      0.938 1.000 0.000  0
#> GSM1009109     2  0.0000      0.927 0.000 1.000  0
#> GSM1009123     1  0.2066      0.958 0.940 0.060  0
#> GSM1009137     1  0.0000      0.938 1.000 0.000  0
#> GSM1009151     1  0.2165      0.958 0.936 0.064  0
#> GSM1009165     3  0.0000      1.000 0.000 0.000  1
#> GSM1009179     2  0.3038      0.889 0.104 0.896  0
#> GSM1009193     1  0.2165      0.958 0.936 0.064  0
#> GSM1009068     1  0.2356      0.955 0.928 0.072  0
#> GSM1009082     2  0.1529      0.920 0.040 0.960  0
#> GSM1009096     1  0.0000      0.938 1.000 0.000  0
#> GSM1009110     2  0.0000      0.927 0.000 1.000  0
#> GSM1009124     1  0.2165      0.958 0.936 0.064  0
#> GSM1009138     1  0.0000      0.938 1.000 0.000  0
#> GSM1009152     1  0.2165      0.958 0.936 0.064  0
#> GSM1009166     3  0.0000      1.000 0.000 0.000  1
#> GSM1009180     2  0.3038      0.889 0.104 0.896  0
#> GSM1009194     1  0.2165      0.958 0.936 0.064  0
#> GSM1009069     1  0.4842      0.793 0.776 0.224  0
#> GSM1009083     2  0.1411      0.921 0.036 0.964  0
#> GSM1009097     1  0.0000      0.938 1.000 0.000  0
#> GSM1009111     2  0.0000      0.927 0.000 1.000  0
#> GSM1009125     2  0.3619      0.852 0.136 0.864  0
#> GSM1009139     1  0.0000      0.938 1.000 0.000  0
#> GSM1009153     1  0.2165      0.958 0.936 0.064  0
#> GSM1009167     3  0.0000      1.000 0.000 0.000  1
#> GSM1009181     2  0.2448      0.910 0.076 0.924  0
#> GSM1009195     1  0.2165      0.958 0.936 0.064  0
#> GSM1009070     1  0.2959      0.938 0.900 0.100  0
#> GSM1009084     2  0.0000      0.927 0.000 1.000  0
#> GSM1009098     1  0.0000      0.938 1.000 0.000  0
#> GSM1009112     2  0.0000      0.927 0.000 1.000  0
#> GSM1009126     1  0.2165      0.958 0.936 0.064  0
#> GSM1009140     1  0.0000      0.938 1.000 0.000  0
#> GSM1009154     1  0.2165      0.958 0.936 0.064  0
#> GSM1009168     3  0.0000      1.000 0.000 0.000  1
#> GSM1009182     2  0.3038      0.889 0.104 0.896  0
#> GSM1009196     1  0.2165      0.958 0.936 0.064  0
#> GSM1009071     1  0.3340      0.922 0.880 0.120  0
#> GSM1009085     2  0.0000      0.927 0.000 1.000  0
#> GSM1009099     1  0.0000      0.938 1.000 0.000  0
#> GSM1009113     2  0.0000      0.927 0.000 1.000  0
#> GSM1009127     1  0.2165      0.958 0.936 0.064  0
#> GSM1009141     1  0.0000      0.938 1.000 0.000  0
#> GSM1009155     1  0.2165      0.958 0.936 0.064  0
#> GSM1009169     3  0.0000      1.000 0.000 0.000  1
#> GSM1009183     2  0.2448      0.910 0.076 0.924  0
#> GSM1009197     1  0.2165      0.958 0.936 0.064  0
#> GSM1009072     1  0.2796      0.944 0.908 0.092  0
#> GSM1009086     2  0.0000      0.927 0.000 1.000  0
#> GSM1009100     1  0.0000      0.938 1.000 0.000  0
#> GSM1009114     2  0.0000      0.927 0.000 1.000  0
#> GSM1009128     1  0.5760      0.562 0.672 0.328  0
#> GSM1009142     1  0.0000      0.938 1.000 0.000  0
#> GSM1009156     1  0.2165      0.958 0.936 0.064  0
#> GSM1009170     3  0.0000      1.000 0.000 0.000  1
#> GSM1009184     2  0.2537      0.908 0.080 0.920  0
#> GSM1009198     1  0.2165      0.958 0.936 0.064  0
#> GSM1009073     1  0.3038      0.935 0.896 0.104  0
#> GSM1009087     1  0.3752      0.902 0.856 0.144  0
#> GSM1009101     1  0.0000      0.938 1.000 0.000  0
#> GSM1009115     2  0.0000      0.927 0.000 1.000  0
#> GSM1009129     2  0.5216      0.660 0.260 0.740  0
#> GSM1009143     1  0.0000      0.938 1.000 0.000  0
#> GSM1009157     1  0.2165      0.958 0.936 0.064  0
#> GSM1009171     3  0.0000      1.000 0.000 0.000  1
#> GSM1009185     2  0.2537      0.908 0.080 0.920  0
#> GSM1009199     1  0.2165      0.958 0.936 0.064  0
#> GSM1009074     1  0.2959      0.938 0.900 0.100  0
#> GSM1009088     1  0.4605      0.828 0.796 0.204  0
#> GSM1009102     1  0.0000      0.938 1.000 0.000  0
#> GSM1009116     2  0.0000      0.927 0.000 1.000  0
#> GSM1009130     1  0.3551      0.913 0.868 0.132  0
#> GSM1009144     1  0.0000      0.938 1.000 0.000  0
#> GSM1009158     1  0.2165      0.958 0.936 0.064  0
#> GSM1009172     3  0.0000      1.000 0.000 0.000  1
#> GSM1009186     2  0.2537      0.908 0.080 0.920  0
#> GSM1009200     1  0.2165      0.958 0.936 0.064  0
#> GSM1009075     1  0.2959      0.938 0.900 0.100  0
#> GSM1009089     1  0.3619      0.909 0.864 0.136  0
#> GSM1009103     1  0.0000      0.938 1.000 0.000  0
#> GSM1009117     2  0.0000      0.927 0.000 1.000  0
#> GSM1009131     1  0.2625      0.949 0.916 0.084  0
#> GSM1009145     1  0.0000      0.938 1.000 0.000  0
#> GSM1009159     1  0.2165      0.958 0.936 0.064  0
#> GSM1009173     3  0.0000      1.000 0.000 0.000  1
#> GSM1009187     2  0.3116      0.885 0.108 0.892  0
#> GSM1009201     1  0.2165      0.958 0.936 0.064  0

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>            class entropy silhouette    p1    p2 p3    p4
#> GSM1009062     1  0.0000      0.950 1.000 0.000  0 0.000
#> GSM1009076     2  0.0000      0.833 0.000 1.000  0 0.000
#> GSM1009090     4  0.0000      0.979 0.000 0.000  0 1.000
#> GSM1009104     2  0.0000      0.833 0.000 1.000  0 0.000
#> GSM1009118     1  0.2868      0.807 0.864 0.136  0 0.000
#> GSM1009132     4  0.0000      0.979 0.000 0.000  0 1.000
#> GSM1009146     1  0.0000      0.950 1.000 0.000  0 0.000
#> GSM1009160     3  0.0000      1.000 0.000 0.000  1 0.000
#> GSM1009174     2  0.4431      0.709 0.304 0.696  0 0.000
#> GSM1009188     1  0.0000      0.950 1.000 0.000  0 0.000
#> GSM1009063     1  0.0000      0.950 1.000 0.000  0 0.000
#> GSM1009077     2  0.0000      0.833 0.000 1.000  0 0.000
#> GSM1009091     4  0.0000      0.979 0.000 0.000  0 1.000
#> GSM1009105     2  0.0000      0.833 0.000 1.000  0 0.000
#> GSM1009119     1  0.0000      0.950 1.000 0.000  0 0.000
#> GSM1009133     4  0.0000      0.979 0.000 0.000  0 1.000
#> GSM1009147     1  0.0000      0.950 1.000 0.000  0 0.000
#> GSM1009161     3  0.0000      1.000 0.000 0.000  1 0.000
#> GSM1009175     2  0.4431      0.709 0.304 0.696  0 0.000
#> GSM1009189     1  0.0000      0.950 1.000 0.000  0 0.000
#> GSM1009064     1  0.0000      0.950 1.000 0.000  0 0.000
#> GSM1009078     1  0.2149      0.873 0.912 0.088  0 0.000
#> GSM1009092     4  0.0000      0.979 0.000 0.000  0 1.000
#> GSM1009106     2  0.0000      0.833 0.000 1.000  0 0.000
#> GSM1009120     1  0.0000      0.950 1.000 0.000  0 0.000
#> GSM1009134     4  0.0000      0.979 0.000 0.000  0 1.000
#> GSM1009148     1  0.0000      0.950 1.000 0.000  0 0.000
#> GSM1009162     3  0.0000      1.000 0.000 0.000  1 0.000
#> GSM1009176     2  0.4072      0.749 0.252 0.748  0 0.000
#> GSM1009190     1  0.0000      0.950 1.000 0.000  0 0.000
#> GSM1009065     1  0.0336      0.945 0.992 0.008  0 0.000
#> GSM1009079     2  0.0000      0.833 0.000 1.000  0 0.000
#> GSM1009093     4  0.0000      0.979 0.000 0.000  0 1.000
#> GSM1009107     2  0.0000      0.833 0.000 1.000  0 0.000
#> GSM1009121     1  0.5582      0.671 0.728 0.136  0 0.136
#> GSM1009135     4  0.0000      0.979 0.000 0.000  0 1.000
#> GSM1009149     1  0.0000      0.950 1.000 0.000  0 0.000
#> GSM1009163     3  0.0000      1.000 0.000 0.000  1 0.000
#> GSM1009177     2  0.4406      0.712 0.300 0.700  0 0.000
#> GSM1009191     1  0.0000      0.950 1.000 0.000  0 0.000
#> GSM1009066     1  0.0000      0.950 1.000 0.000  0 0.000
#> GSM1009080     2  0.0000      0.833 0.000 1.000  0 0.000
#> GSM1009094     4  0.0000      0.979 0.000 0.000  0 1.000
#> GSM1009108     2  0.0000      0.833 0.000 1.000  0 0.000
#> GSM1009122     1  0.4999     -0.226 0.508 0.492  0 0.000
#> GSM1009136     4  0.0000      0.979 0.000 0.000  0 1.000
#> GSM1009150     1  0.0000      0.950 1.000 0.000  0 0.000
#> GSM1009164     3  0.0000      1.000 0.000 0.000  1 0.000
#> GSM1009178     2  0.4454      0.704 0.308 0.692  0 0.000
#> GSM1009192     1  0.0000      0.950 1.000 0.000  0 0.000
#> GSM1009067     1  0.0000      0.950 1.000 0.000  0 0.000
#> GSM1009081     2  0.0000      0.833 0.000 1.000  0 0.000
#> GSM1009095     4  0.0000      0.979 0.000 0.000  0 1.000
#> GSM1009109     2  0.0000      0.833 0.000 1.000  0 0.000
#> GSM1009123     1  0.4008      0.678 0.756 0.000  0 0.244
#> GSM1009137     4  0.0000      0.979 0.000 0.000  0 1.000
#> GSM1009151     1  0.0000      0.950 1.000 0.000  0 0.000
#> GSM1009165     3  0.0000      1.000 0.000 0.000  1 0.000
#> GSM1009179     2  0.4454      0.704 0.308 0.692  0 0.000
#> GSM1009193     1  0.0000      0.950 1.000 0.000  0 0.000
#> GSM1009068     1  0.0000      0.950 1.000 0.000  0 0.000
#> GSM1009082     2  0.1389      0.823 0.048 0.952  0 0.000
#> GSM1009096     4  0.0000      0.979 0.000 0.000  0 1.000
#> GSM1009110     2  0.0000      0.833 0.000 1.000  0 0.000
#> GSM1009124     1  0.0000      0.950 1.000 0.000  0 0.000
#> GSM1009138     4  0.0000      0.979 0.000 0.000  0 1.000
#> GSM1009152     1  0.0000      0.950 1.000 0.000  0 0.000
#> GSM1009166     3  0.0000      1.000 0.000 0.000  1 0.000
#> GSM1009180     2  0.4454      0.704 0.308 0.692  0 0.000
#> GSM1009194     1  0.0000      0.950 1.000 0.000  0 0.000
#> GSM1009069     1  0.1867      0.887 0.928 0.072  0 0.000
#> GSM1009083     2  0.1716      0.818 0.064 0.936  0 0.000
#> GSM1009097     4  0.0000      0.979 0.000 0.000  0 1.000
#> GSM1009111     2  0.0000      0.833 0.000 1.000  0 0.000
#> GSM1009125     2  0.3959      0.784 0.092 0.840  0 0.068
#> GSM1009139     4  0.0000      0.979 0.000 0.000  0 1.000
#> GSM1009153     1  0.0000      0.950 1.000 0.000  0 0.000
#> GSM1009167     3  0.0000      1.000 0.000 0.000  1 0.000
#> GSM1009181     2  0.4356      0.719 0.292 0.708  0 0.000
#> GSM1009195     1  0.1389      0.911 0.952 0.048  0 0.000
#> GSM1009070     1  0.0000      0.950 1.000 0.000  0 0.000
#> GSM1009084     2  0.0000      0.833 0.000 1.000  0 0.000
#> GSM1009098     4  0.0000      0.979 0.000 0.000  0 1.000
#> GSM1009112     2  0.0000      0.833 0.000 1.000  0 0.000
#> GSM1009126     1  0.1211      0.919 0.960 0.040  0 0.000
#> GSM1009140     4  0.0000      0.979 0.000 0.000  0 1.000
#> GSM1009154     1  0.0000      0.950 1.000 0.000  0 0.000
#> GSM1009168     3  0.0000      1.000 0.000 0.000  1 0.000
#> GSM1009182     2  0.4454      0.704 0.308 0.692  0 0.000
#> GSM1009196     1  0.0000      0.950 1.000 0.000  0 0.000
#> GSM1009071     1  0.0000      0.950 1.000 0.000  0 0.000
#> GSM1009085     2  0.0000      0.833 0.000 1.000  0 0.000
#> GSM1009099     4  0.0000      0.979 0.000 0.000  0 1.000
#> GSM1009113     2  0.0000      0.833 0.000 1.000  0 0.000
#> GSM1009127     1  0.0000      0.950 1.000 0.000  0 0.000
#> GSM1009141     4  0.0000      0.979 0.000 0.000  0 1.000
#> GSM1009155     1  0.0000      0.950 1.000 0.000  0 0.000
#> GSM1009169     3  0.0000      1.000 0.000 0.000  1 0.000
#> GSM1009183     2  0.4356      0.719 0.292 0.708  0 0.000
#> GSM1009197     1  0.0000      0.950 1.000 0.000  0 0.000
#> GSM1009072     1  0.0000      0.950 1.000 0.000  0 0.000
#> GSM1009086     2  0.0000      0.833 0.000 1.000  0 0.000
#> GSM1009100     4  0.0000      0.979 0.000 0.000  0 1.000
#> GSM1009114     2  0.0000      0.833 0.000 1.000  0 0.000
#> GSM1009128     4  0.7070      0.266 0.348 0.136  0 0.516
#> GSM1009142     4  0.0000      0.979 0.000 0.000  0 1.000
#> GSM1009156     1  0.0000      0.950 1.000 0.000  0 0.000
#> GSM1009170     3  0.0000      1.000 0.000 0.000  1 0.000
#> GSM1009184     2  0.4431      0.709 0.304 0.696  0 0.000
#> GSM1009198     1  0.1022      0.926 0.968 0.000  0 0.032
#> GSM1009073     1  0.0000      0.950 1.000 0.000  0 0.000
#> GSM1009087     1  0.2281      0.866 0.904 0.096  0 0.000
#> GSM1009101     4  0.0000      0.979 0.000 0.000  0 1.000
#> GSM1009115     2  0.0000      0.833 0.000 1.000  0 0.000
#> GSM1009129     2  0.4585      0.568 0.332 0.668  0 0.000
#> GSM1009143     4  0.0000      0.979 0.000 0.000  0 1.000
#> GSM1009157     1  0.0000      0.950 1.000 0.000  0 0.000
#> GSM1009171     3  0.0000      1.000 0.000 0.000  1 0.000
#> GSM1009185     2  0.4431      0.709 0.304 0.696  0 0.000
#> GSM1009199     1  0.2530      0.840 0.888 0.112  0 0.000
#> GSM1009074     1  0.0000      0.950 1.000 0.000  0 0.000
#> GSM1009088     1  0.3569      0.741 0.804 0.196  0 0.000
#> GSM1009102     4  0.0000      0.979 0.000 0.000  0 1.000
#> GSM1009116     2  0.0000      0.833 0.000 1.000  0 0.000
#> GSM1009130     1  0.4746      0.435 0.632 0.368  0 0.000
#> GSM1009144     4  0.0000      0.979 0.000 0.000  0 1.000
#> GSM1009158     1  0.0000      0.950 1.000 0.000  0 0.000
#> GSM1009172     3  0.0000      1.000 0.000 0.000  1 0.000
#> GSM1009186     2  0.4431      0.709 0.304 0.696  0 0.000
#> GSM1009200     1  0.0000      0.950 1.000 0.000  0 0.000
#> GSM1009075     1  0.0000      0.950 1.000 0.000  0 0.000
#> GSM1009089     1  0.1792      0.896 0.932 0.068  0 0.000
#> GSM1009103     4  0.0000      0.979 0.000 0.000  0 1.000
#> GSM1009117     2  0.0000      0.833 0.000 1.000  0 0.000
#> GSM1009131     1  0.3311      0.776 0.828 0.172  0 0.000
#> GSM1009145     4  0.0000      0.979 0.000 0.000  0 1.000
#> GSM1009159     1  0.0000      0.950 1.000 0.000  0 0.000
#> GSM1009173     3  0.0000      1.000 0.000 0.000  1 0.000
#> GSM1009187     2  0.4454      0.704 0.308 0.692  0 0.000
#> GSM1009201     1  0.0000      0.950 1.000 0.000  0 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
#> GSM1009062     1  0.0000     0.9343 1.000 0.000  0 0.000 0.000
#> GSM1009076     2  0.0510     0.9351 0.000 0.984  0 0.000 0.016
#> GSM1009090     4  0.0000     1.0000 0.000 0.000  0 1.000 0.000
#> GSM1009104     5  0.0000     1.0000 0.000 0.000  0 0.000 1.000
#> GSM1009118     1  0.3774     0.5827 0.704 0.296  0 0.000 0.000
#> GSM1009132     4  0.0000     1.0000 0.000 0.000  0 1.000 0.000
#> GSM1009146     1  0.0000     0.9343 1.000 0.000  0 0.000 0.000
#> GSM1009160     3  0.0000     1.0000 0.000 0.000  1 0.000 0.000
#> GSM1009174     2  0.0000     0.9420 0.000 1.000  0 0.000 0.000
#> GSM1009188     1  0.0000     0.9343 1.000 0.000  0 0.000 0.000
#> GSM1009063     1  0.0000     0.9343 1.000 0.000  0 0.000 0.000
#> GSM1009077     2  0.0404     0.9375 0.000 0.988  0 0.000 0.012
#> GSM1009091     4  0.0000     1.0000 0.000 0.000  0 1.000 0.000
#> GSM1009105     5  0.0000     1.0000 0.000 0.000  0 0.000 1.000
#> GSM1009119     1  0.0000     0.9343 1.000 0.000  0 0.000 0.000
#> GSM1009133     4  0.0000     1.0000 0.000 0.000  0 1.000 0.000
#> GSM1009147     1  0.0000     0.9343 1.000 0.000  0 0.000 0.000
#> GSM1009161     3  0.0000     1.0000 0.000 0.000  1 0.000 0.000
#> GSM1009175     2  0.0000     0.9420 0.000 1.000  0 0.000 0.000
#> GSM1009189     1  0.0000     0.9343 1.000 0.000  0 0.000 0.000
#> GSM1009064     1  0.0000     0.9343 1.000 0.000  0 0.000 0.000
#> GSM1009078     1  0.1410     0.8879 0.940 0.000  0 0.000 0.060
#> GSM1009092     4  0.0000     1.0000 0.000 0.000  0 1.000 0.000
#> GSM1009106     5  0.0000     1.0000 0.000 0.000  0 0.000 1.000
#> GSM1009120     1  0.0000     0.9343 1.000 0.000  0 0.000 0.000
#> GSM1009134     4  0.0000     1.0000 0.000 0.000  0 1.000 0.000
#> GSM1009148     1  0.0000     0.9343 1.000 0.000  0 0.000 0.000
#> GSM1009162     3  0.0000     1.0000 0.000 0.000  1 0.000 0.000
#> GSM1009176     2  0.0000     0.9420 0.000 1.000  0 0.000 0.000
#> GSM1009190     1  0.0000     0.9343 1.000 0.000  0 0.000 0.000
#> GSM1009065     1  0.0000     0.9343 1.000 0.000  0 0.000 0.000
#> GSM1009079     2  0.0162     0.9409 0.000 0.996  0 0.000 0.004
#> GSM1009093     4  0.0000     1.0000 0.000 0.000  0 1.000 0.000
#> GSM1009107     5  0.0000     1.0000 0.000 0.000  0 0.000 1.000
#> GSM1009121     1  0.4086     0.6128 0.704 0.012  0 0.284 0.000
#> GSM1009135     4  0.0000     1.0000 0.000 0.000  0 1.000 0.000
#> GSM1009149     1  0.0000     0.9343 1.000 0.000  0 0.000 0.000
#> GSM1009163     3  0.0000     1.0000 0.000 0.000  1 0.000 0.000
#> GSM1009177     2  0.0000     0.9420 0.000 1.000  0 0.000 0.000
#> GSM1009191     1  0.0000     0.9343 1.000 0.000  0 0.000 0.000
#> GSM1009066     1  0.0000     0.9343 1.000 0.000  0 0.000 0.000
#> GSM1009080     2  0.0162     0.9409 0.000 0.996  0 0.000 0.004
#> GSM1009094     4  0.0000     1.0000 0.000 0.000  0 1.000 0.000
#> GSM1009108     5  0.0000     1.0000 0.000 0.000  0 0.000 1.000
#> GSM1009122     2  0.3949     0.4919 0.332 0.668  0 0.000 0.000
#> GSM1009136     4  0.0000     1.0000 0.000 0.000  0 1.000 0.000
#> GSM1009150     1  0.0000     0.9343 1.000 0.000  0 0.000 0.000
#> GSM1009164     3  0.0000     1.0000 0.000 0.000  1 0.000 0.000
#> GSM1009178     2  0.0000     0.9420 0.000 1.000  0 0.000 0.000
#> GSM1009192     1  0.0000     0.9343 1.000 0.000  0 0.000 0.000
#> GSM1009067     1  0.0000     0.9343 1.000 0.000  0 0.000 0.000
#> GSM1009081     2  0.0404     0.9375 0.000 0.988  0 0.000 0.012
#> GSM1009095     4  0.0000     1.0000 0.000 0.000  0 1.000 0.000
#> GSM1009109     5  0.0000     1.0000 0.000 0.000  0 0.000 1.000
#> GSM1009123     1  0.3612     0.6507 0.732 0.000  0 0.268 0.000
#> GSM1009137     4  0.0000     1.0000 0.000 0.000  0 1.000 0.000
#> GSM1009151     1  0.0000     0.9343 1.000 0.000  0 0.000 0.000
#> GSM1009165     3  0.0000     1.0000 0.000 0.000  1 0.000 0.000
#> GSM1009179     2  0.0000     0.9420 0.000 1.000  0 0.000 0.000
#> GSM1009193     1  0.0000     0.9343 1.000 0.000  0 0.000 0.000
#> GSM1009068     1  0.0000     0.9343 1.000 0.000  0 0.000 0.000
#> GSM1009082     2  0.0404     0.9375 0.000 0.988  0 0.000 0.012
#> GSM1009096     4  0.0000     1.0000 0.000 0.000  0 1.000 0.000
#> GSM1009110     5  0.0000     1.0000 0.000 0.000  0 0.000 1.000
#> GSM1009124     1  0.0000     0.9343 1.000 0.000  0 0.000 0.000
#> GSM1009138     4  0.0000     1.0000 0.000 0.000  0 1.000 0.000
#> GSM1009152     1  0.0000     0.9343 1.000 0.000  0 0.000 0.000
#> GSM1009166     3  0.0000     1.0000 0.000 0.000  1 0.000 0.000
#> GSM1009180     2  0.0000     0.9420 0.000 1.000  0 0.000 0.000
#> GSM1009194     1  0.0000     0.9343 1.000 0.000  0 0.000 0.000
#> GSM1009069     1  0.4150     0.3473 0.612 0.388  0 0.000 0.000
#> GSM1009083     2  0.0290     0.9394 0.000 0.992  0 0.000 0.008
#> GSM1009097     4  0.0000     1.0000 0.000 0.000  0 1.000 0.000
#> GSM1009111     5  0.0000     1.0000 0.000 0.000  0 0.000 1.000
#> GSM1009125     2  0.0000     0.9420 0.000 1.000  0 0.000 0.000
#> GSM1009139     4  0.0000     1.0000 0.000 0.000  0 1.000 0.000
#> GSM1009153     1  0.0000     0.9343 1.000 0.000  0 0.000 0.000
#> GSM1009167     3  0.0000     1.0000 0.000 0.000  1 0.000 0.000
#> GSM1009181     2  0.0000     0.9420 0.000 1.000  0 0.000 0.000
#> GSM1009195     1  0.3074     0.7409 0.804 0.196  0 0.000 0.000
#> GSM1009070     1  0.0000     0.9343 1.000 0.000  0 0.000 0.000
#> GSM1009084     2  0.2732     0.8045 0.000 0.840  0 0.000 0.160
#> GSM1009098     4  0.0000     1.0000 0.000 0.000  0 1.000 0.000
#> GSM1009112     5  0.0000     1.0000 0.000 0.000  0 0.000 1.000
#> GSM1009126     1  0.0000     0.9343 1.000 0.000  0 0.000 0.000
#> GSM1009140     4  0.0000     1.0000 0.000 0.000  0 1.000 0.000
#> GSM1009154     1  0.0000     0.9343 1.000 0.000  0 0.000 0.000
#> GSM1009168     3  0.0000     1.0000 0.000 0.000  1 0.000 0.000
#> GSM1009182     2  0.0000     0.9420 0.000 1.000  0 0.000 0.000
#> GSM1009196     1  0.0000     0.9343 1.000 0.000  0 0.000 0.000
#> GSM1009071     1  0.0000     0.9343 1.000 0.000  0 0.000 0.000
#> GSM1009085     2  0.3074     0.7620 0.000 0.804  0 0.000 0.196
#> GSM1009099     4  0.0000     1.0000 0.000 0.000  0 1.000 0.000
#> GSM1009113     5  0.0000     1.0000 0.000 0.000  0 0.000 1.000
#> GSM1009127     1  0.0000     0.9343 1.000 0.000  0 0.000 0.000
#> GSM1009141     4  0.0000     1.0000 0.000 0.000  0 1.000 0.000
#> GSM1009155     1  0.0000     0.9343 1.000 0.000  0 0.000 0.000
#> GSM1009169     3  0.0000     1.0000 0.000 0.000  1 0.000 0.000
#> GSM1009183     2  0.0000     0.9420 0.000 1.000  0 0.000 0.000
#> GSM1009197     1  0.0000     0.9343 1.000 0.000  0 0.000 0.000
#> GSM1009072     1  0.0000     0.9343 1.000 0.000  0 0.000 0.000
#> GSM1009086     2  0.2605     0.8177 0.000 0.852  0 0.000 0.148
#> GSM1009100     4  0.0000     1.0000 0.000 0.000  0 1.000 0.000
#> GSM1009114     5  0.0000     1.0000 0.000 0.000  0 0.000 1.000
#> GSM1009128     1  0.4747     0.1036 0.500 0.016  0 0.484 0.000
#> GSM1009142     4  0.0000     1.0000 0.000 0.000  0 1.000 0.000
#> GSM1009156     1  0.0000     0.9343 1.000 0.000  0 0.000 0.000
#> GSM1009170     3  0.0000     1.0000 0.000 0.000  1 0.000 0.000
#> GSM1009184     2  0.0000     0.9420 0.000 1.000  0 0.000 0.000
#> GSM1009198     1  0.0880     0.9104 0.968 0.000  0 0.032 0.000
#> GSM1009073     1  0.0000     0.9343 1.000 0.000  0 0.000 0.000
#> GSM1009087     1  0.2011     0.8595 0.908 0.004  0 0.000 0.088
#> GSM1009101     4  0.0000     1.0000 0.000 0.000  0 1.000 0.000
#> GSM1009115     5  0.0000     1.0000 0.000 0.000  0 0.000 1.000
#> GSM1009129     2  0.3932     0.5013 0.328 0.672  0 0.000 0.000
#> GSM1009143     4  0.0000     1.0000 0.000 0.000  0 1.000 0.000
#> GSM1009157     1  0.0000     0.9343 1.000 0.000  0 0.000 0.000
#> GSM1009171     3  0.0000     1.0000 0.000 0.000  1 0.000 0.000
#> GSM1009185     2  0.0000     0.9420 0.000 1.000  0 0.000 0.000
#> GSM1009199     1  0.3586     0.6394 0.736 0.264  0 0.000 0.000
#> GSM1009074     1  0.0000     0.9343 1.000 0.000  0 0.000 0.000
#> GSM1009088     1  0.3764     0.7417 0.800 0.044  0 0.000 0.156
#> GSM1009102     4  0.0000     1.0000 0.000 0.000  0 1.000 0.000
#> GSM1009116     5  0.0000     1.0000 0.000 0.000  0 0.000 1.000
#> GSM1009130     1  0.4307     0.0981 0.504 0.000  0 0.000 0.496
#> GSM1009144     4  0.0000     1.0000 0.000 0.000  0 1.000 0.000
#> GSM1009158     1  0.0000     0.9343 1.000 0.000  0 0.000 0.000
#> GSM1009172     3  0.0000     1.0000 0.000 0.000  1 0.000 0.000
#> GSM1009186     2  0.0000     0.9420 0.000 1.000  0 0.000 0.000
#> GSM1009200     1  0.0000     0.9343 1.000 0.000  0 0.000 0.000
#> GSM1009075     1  0.0000     0.9343 1.000 0.000  0 0.000 0.000
#> GSM1009089     1  0.1697     0.8824 0.932 0.008  0 0.000 0.060
#> GSM1009103     4  0.0000     1.0000 0.000 0.000  0 1.000 0.000
#> GSM1009117     5  0.0000     1.0000 0.000 0.000  0 0.000 1.000
#> GSM1009131     1  0.3684     0.6291 0.720 0.000  0 0.000 0.280
#> GSM1009145     4  0.0000     1.0000 0.000 0.000  0 1.000 0.000
#> GSM1009159     1  0.0000     0.9343 1.000 0.000  0 0.000 0.000
#> GSM1009173     3  0.0000     1.0000 0.000 0.000  1 0.000 0.000
#> GSM1009187     2  0.0000     0.9420 0.000 1.000  0 0.000 0.000
#> GSM1009201     1  0.0000     0.9343 1.000 0.000  0 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
#> GSM1009062     6  0.0000     1.0000 0.000 0.000  0 0.000 0.000 1.000
#> GSM1009076     2  0.1007     0.9185 0.000 0.956  0 0.000 0.044 0.000
#> GSM1009090     4  0.0000     1.0000 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009104     5  0.0000     1.0000 0.000 0.000  0 0.000 1.000 0.000
#> GSM1009118     1  0.2562     0.7667 0.828 0.172  0 0.000 0.000 0.000
#> GSM1009132     4  0.0000     1.0000 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009146     1  0.0000     0.9547 1.000 0.000  0 0.000 0.000 0.000
#> GSM1009160     3  0.0000     1.0000 0.000 0.000  1 0.000 0.000 0.000
#> GSM1009174     2  0.0000     0.9389 0.000 1.000  0 0.000 0.000 0.000
#> GSM1009188     1  0.0000     0.9547 1.000 0.000  0 0.000 0.000 0.000
#> GSM1009063     6  0.0000     1.0000 0.000 0.000  0 0.000 0.000 1.000
#> GSM1009077     2  0.1074     0.9235 0.000 0.960  0 0.000 0.012 0.028
#> GSM1009091     4  0.0000     1.0000 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009105     5  0.0000     1.0000 0.000 0.000  0 0.000 1.000 0.000
#> GSM1009119     1  0.0000     0.9547 1.000 0.000  0 0.000 0.000 0.000
#> GSM1009133     4  0.0000     1.0000 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009147     1  0.0000     0.9547 1.000 0.000  0 0.000 0.000 0.000
#> GSM1009161     3  0.0000     1.0000 0.000 0.000  1 0.000 0.000 0.000
#> GSM1009175     2  0.0000     0.9389 0.000 1.000  0 0.000 0.000 0.000
#> GSM1009189     1  0.0000     0.9547 1.000 0.000  0 0.000 0.000 0.000
#> GSM1009064     6  0.0000     1.0000 0.000 0.000  0 0.000 0.000 1.000
#> GSM1009078     1  0.2658     0.8360 0.864 0.000  0 0.000 0.036 0.100
#> GSM1009092     4  0.0000     1.0000 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009106     5  0.0000     1.0000 0.000 0.000  0 0.000 1.000 0.000
#> GSM1009120     1  0.0000     0.9547 1.000 0.000  0 0.000 0.000 0.000
#> GSM1009134     4  0.0000     1.0000 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009148     1  0.0000     0.9547 1.000 0.000  0 0.000 0.000 0.000
#> GSM1009162     3  0.0000     1.0000 0.000 0.000  1 0.000 0.000 0.000
#> GSM1009176     2  0.0000     0.9389 0.000 1.000  0 0.000 0.000 0.000
#> GSM1009190     1  0.0000     0.9547 1.000 0.000  0 0.000 0.000 0.000
#> GSM1009065     6  0.0000     1.0000 0.000 0.000  0 0.000 0.000 1.000
#> GSM1009079     2  0.0363     0.9351 0.000 0.988  0 0.000 0.012 0.000
#> GSM1009093     4  0.0000     1.0000 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009107     5  0.0000     1.0000 0.000 0.000  0 0.000 1.000 0.000
#> GSM1009121     1  0.0000     0.9547 1.000 0.000  0 0.000 0.000 0.000
#> GSM1009135     4  0.0000     1.0000 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009149     1  0.0000     0.9547 1.000 0.000  0 0.000 0.000 0.000
#> GSM1009163     3  0.0000     1.0000 0.000 0.000  1 0.000 0.000 0.000
#> GSM1009177     2  0.0000     0.9389 0.000 1.000  0 0.000 0.000 0.000
#> GSM1009191     1  0.0000     0.9547 1.000 0.000  0 0.000 0.000 0.000
#> GSM1009066     6  0.0000     1.0000 0.000 0.000  0 0.000 0.000 1.000
#> GSM1009080     2  0.0260     0.9366 0.000 0.992  0 0.000 0.008 0.000
#> GSM1009094     4  0.0000     1.0000 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009108     5  0.0000     1.0000 0.000 0.000  0 0.000 1.000 0.000
#> GSM1009122     2  0.3547     0.5318 0.332 0.668  0 0.000 0.000 0.000
#> GSM1009136     4  0.0000     1.0000 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009150     1  0.0000     0.9547 1.000 0.000  0 0.000 0.000 0.000
#> GSM1009164     3  0.0000     1.0000 0.000 0.000  1 0.000 0.000 0.000
#> GSM1009178     2  0.0000     0.9389 0.000 1.000  0 0.000 0.000 0.000
#> GSM1009192     1  0.0000     0.9547 1.000 0.000  0 0.000 0.000 0.000
#> GSM1009067     6  0.0000     1.0000 0.000 0.000  0 0.000 0.000 1.000
#> GSM1009081     2  0.0865     0.9233 0.000 0.964  0 0.000 0.036 0.000
#> GSM1009095     4  0.0000     1.0000 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009109     5  0.0000     1.0000 0.000 0.000  0 0.000 1.000 0.000
#> GSM1009123     1  0.0000     0.9547 1.000 0.000  0 0.000 0.000 0.000
#> GSM1009137     4  0.0000     1.0000 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009151     1  0.0000     0.9547 1.000 0.000  0 0.000 0.000 0.000
#> GSM1009165     3  0.0000     1.0000 0.000 0.000  1 0.000 0.000 0.000
#> GSM1009179     2  0.0000     0.9389 0.000 1.000  0 0.000 0.000 0.000
#> GSM1009193     1  0.0000     0.9547 1.000 0.000  0 0.000 0.000 0.000
#> GSM1009068     6  0.0000     1.0000 0.000 0.000  0 0.000 0.000 1.000
#> GSM1009082     2  0.1007     0.9158 0.000 0.956  0 0.000 0.000 0.044
#> GSM1009096     4  0.0000     1.0000 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009110     5  0.0000     1.0000 0.000 0.000  0 0.000 1.000 0.000
#> GSM1009124     1  0.0000     0.9547 1.000 0.000  0 0.000 0.000 0.000
#> GSM1009138     4  0.0000     1.0000 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009152     1  0.0000     0.9547 1.000 0.000  0 0.000 0.000 0.000
#> GSM1009166     3  0.0000     1.0000 0.000 0.000  1 0.000 0.000 0.000
#> GSM1009180     2  0.0000     0.9389 0.000 1.000  0 0.000 0.000 0.000
#> GSM1009194     1  0.0000     0.9547 1.000 0.000  0 0.000 0.000 0.000
#> GSM1009069     6  0.0000     1.0000 0.000 0.000  0 0.000 0.000 1.000
#> GSM1009083     2  0.1267     0.9038 0.000 0.940  0 0.000 0.000 0.060
#> GSM1009097     4  0.0000     1.0000 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009111     5  0.0000     1.0000 0.000 0.000  0 0.000 1.000 0.000
#> GSM1009125     2  0.0146     0.9370 0.004 0.996  0 0.000 0.000 0.000
#> GSM1009139     4  0.0000     1.0000 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009153     1  0.0000     0.9547 1.000 0.000  0 0.000 0.000 0.000
#> GSM1009167     3  0.0000     1.0000 0.000 0.000  1 0.000 0.000 0.000
#> GSM1009181     2  0.0000     0.9389 0.000 1.000  0 0.000 0.000 0.000
#> GSM1009195     1  0.0000     0.9547 1.000 0.000  0 0.000 0.000 0.000
#> GSM1009070     6  0.0000     1.0000 0.000 0.000  0 0.000 0.000 1.000
#> GSM1009084     2  0.2706     0.8123 0.000 0.832  0 0.000 0.160 0.008
#> GSM1009098     4  0.0000     1.0000 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009112     5  0.0000     1.0000 0.000 0.000  0 0.000 1.000 0.000
#> GSM1009126     1  0.0000     0.9547 1.000 0.000  0 0.000 0.000 0.000
#> GSM1009140     4  0.0000     1.0000 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009154     1  0.0000     0.9547 1.000 0.000  0 0.000 0.000 0.000
#> GSM1009168     3  0.0000     1.0000 0.000 0.000  1 0.000 0.000 0.000
#> GSM1009182     2  0.0000     0.9389 0.000 1.000  0 0.000 0.000 0.000
#> GSM1009196     1  0.0000     0.9547 1.000 0.000  0 0.000 0.000 0.000
#> GSM1009071     6  0.0000     1.0000 0.000 0.000  0 0.000 0.000 1.000
#> GSM1009085     2  0.2980     0.7749 0.000 0.800  0 0.000 0.192 0.008
#> GSM1009099     4  0.0000     1.0000 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009113     5  0.0000     1.0000 0.000 0.000  0 0.000 1.000 0.000
#> GSM1009127     1  0.0000     0.9547 1.000 0.000  0 0.000 0.000 0.000
#> GSM1009141     4  0.0000     1.0000 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009155     1  0.0000     0.9547 1.000 0.000  0 0.000 0.000 0.000
#> GSM1009169     3  0.0000     1.0000 0.000 0.000  1 0.000 0.000 0.000
#> GSM1009183     2  0.0000     0.9389 0.000 1.000  0 0.000 0.000 0.000
#> GSM1009197     1  0.0000     0.9547 1.000 0.000  0 0.000 0.000 0.000
#> GSM1009072     6  0.0000     1.0000 0.000 0.000  0 0.000 0.000 1.000
#> GSM1009086     2  0.2378     0.8255 0.000 0.848  0 0.000 0.152 0.000
#> GSM1009100     4  0.0000     1.0000 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009114     5  0.0000     1.0000 0.000 0.000  0 0.000 1.000 0.000
#> GSM1009128     1  0.4534     0.0618 0.496 0.032  0 0.472 0.000 0.000
#> GSM1009142     4  0.0000     1.0000 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009156     1  0.0000     0.9547 1.000 0.000  0 0.000 0.000 0.000
#> GSM1009170     3  0.0000     1.0000 0.000 0.000  1 0.000 0.000 0.000
#> GSM1009184     2  0.0000     0.9389 0.000 1.000  0 0.000 0.000 0.000
#> GSM1009198     1  0.0000     0.9547 1.000 0.000  0 0.000 0.000 0.000
#> GSM1009073     6  0.0000     1.0000 0.000 0.000  0 0.000 0.000 1.000
#> GSM1009087     1  0.2998     0.8275 0.852 0.004  0 0.000 0.068 0.076
#> GSM1009101     4  0.0000     1.0000 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009115     5  0.0000     1.0000 0.000 0.000  0 0.000 1.000 0.000
#> GSM1009129     2  0.3531     0.5403 0.328 0.672  0 0.000 0.000 0.000
#> GSM1009143     4  0.0000     1.0000 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009157     1  0.0000     0.9547 1.000 0.000  0 0.000 0.000 0.000
#> GSM1009171     3  0.0000     1.0000 0.000 0.000  1 0.000 0.000 0.000
#> GSM1009185     2  0.0000     0.9389 0.000 1.000  0 0.000 0.000 0.000
#> GSM1009199     1  0.0000     0.9547 1.000 0.000  0 0.000 0.000 0.000
#> GSM1009074     6  0.0000     1.0000 0.000 0.000  0 0.000 0.000 1.000
#> GSM1009088     1  0.3977     0.7660 0.796 0.036  0 0.000 0.104 0.064
#> GSM1009102     4  0.0000     1.0000 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009116     5  0.0000     1.0000 0.000 0.000  0 0.000 1.000 0.000
#> GSM1009130     1  0.3864     0.0994 0.520 0.000  0 0.000 0.480 0.000
#> GSM1009144     4  0.0000     1.0000 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009158     1  0.0000     0.9547 1.000 0.000  0 0.000 0.000 0.000
#> GSM1009172     3  0.0000     1.0000 0.000 0.000  1 0.000 0.000 0.000
#> GSM1009186     2  0.0000     0.9389 0.000 1.000  0 0.000 0.000 0.000
#> GSM1009200     1  0.0000     0.9547 1.000 0.000  0 0.000 0.000 0.000
#> GSM1009075     6  0.0000     1.0000 0.000 0.000  0 0.000 0.000 1.000
#> GSM1009089     1  0.2946     0.7667 0.812 0.000  0 0.000 0.012 0.176
#> GSM1009103     4  0.0000     1.0000 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009117     5  0.0000     1.0000 0.000 0.000  0 0.000 1.000 0.000
#> GSM1009131     1  0.0000     0.9547 1.000 0.000  0 0.000 0.000 0.000
#> GSM1009145     4  0.0000     1.0000 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009159     1  0.0000     0.9547 1.000 0.000  0 0.000 0.000 0.000
#> GSM1009173     3  0.0000     1.0000 0.000 0.000  1 0.000 0.000 0.000
#> GSM1009187     2  0.0000     0.9389 0.000 1.000  0 0.000 0.000 0.000
#> GSM1009201     1  0.0000     0.9547 1.000 0.000  0 0.000 0.000 0.000

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

consensus_heatmap(res, k = 2)

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

consensus_heatmap(res, k = 3)

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

consensus_heatmap(res, k = 4)

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

consensus_heatmap(res, k = 5)

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

consensus_heatmap(res, k = 6)

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

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

membership_heatmap(res, k = 2)

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

membership_heatmap(res, k = 3)

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

membership_heatmap(res, k = 4)

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

membership_heatmap(res, k = 5)

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

membership_heatmap(res, k = 6)

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

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

Signature heatmaps where rows are scaled:

get_signatures(res, k = 2)

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

get_signatures(res, k = 3)

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

get_signatures(res, k = 4)

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

get_signatures(res, k = 5)

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

get_signatures(res, k = 6)

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

Signature heatmaps where rows are not scaled:

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

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

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

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

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

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

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

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

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

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

Compare the overlap of signatures from different k:

compare_signatures(res)

plot of chunk SD-pam-signature_compare

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

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

An example of the output of tb is:

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

The columns in tb are:

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

UMAP plot which shows how samples are separated.

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

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

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

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

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

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

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

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

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

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

Following heatmap shows how subgroups are split when increasing k:

collect_classes(res)

plot of chunk SD-pam-collect-classes

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

test_to_known_factors(res)
#>          n temperature(p) time(p) specimen(p) k
#> SD:pam 140          1.000       1    1.03e-25 2
#> SD:pam 140          0.996       1    1.51e-43 3
#> SD:pam 137          1.000       1    7.38e-65 4
#> SD:pam 136          1.000       1    6.48e-85 5
#> SD:pam 138          1.000       1   1.51e-107 6

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


SD:mclust

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

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

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

res
#> A 'ConsensusPartition' object with k = 2, 3, 4, 5, 6.
#>   On a matrix with 51941 rows and 140 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 3.
#> 
#> Following methods can be applied to this 'ConsensusPartition' object:
#>  [1] "cola_report"             "collect_classes"         "collect_plots"          
#>  [4] "collect_stats"           "colnames"                "compare_signatures"     
#>  [7] "consensus_heatmap"       "dimension_reduction"     "functional_enrichment"  
#> [10] "get_anno_col"            "get_anno"                "get_classes"            
#> [13] "get_consensus"           "get_matrix"              "get_membership"         
#> [16] "get_param"               "get_signatures"          "get_stats"              
#> [19] "is_best_k"               "is_stable_k"             "membership_heatmap"     
#> [22] "ncol"                    "nrow"                    "plot_ecdf"              
#> [25] "rownames"                "select_partition_number" "show"                   
#> [28] "suggest_best_k"          "test_to_known_factors"

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

collect_plots(res)

plot of chunk SD-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.456           0.873       0.899          0.315 0.678   0.678
#> 3 3 0.856           0.953       0.965          0.538 0.617   0.521
#> 4 4 0.694           0.926       0.918          0.260 0.879   0.775
#> 5 5 0.798           0.842       0.914          0.224 0.819   0.564
#> 6 6 0.799           0.819       0.862          0.073 0.901   0.620

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
#> GSM1009062     1  0.4431      0.862 0.908 0.092
#> GSM1009076     1  0.0000      0.916 1.000 0.000
#> GSM1009090     1  0.6531      0.814 0.832 0.168
#> GSM1009104     2  0.9580      0.818 0.380 0.620
#> GSM1009118     1  0.0672      0.917 0.992 0.008
#> GSM1009132     1  0.6531      0.814 0.832 0.168
#> GSM1009146     1  0.2236      0.904 0.964 0.036
#> GSM1009160     2  0.5519      0.856 0.128 0.872
#> GSM1009174     1  0.0000      0.916 1.000 0.000
#> GSM1009188     1  0.0938      0.916 0.988 0.012
#> GSM1009063     1  0.4431      0.862 0.908 0.092
#> GSM1009077     1  0.0000      0.916 1.000 0.000
#> GSM1009091     1  0.6531      0.814 0.832 0.168
#> GSM1009105     2  0.9580      0.818 0.380 0.620
#> GSM1009119     1  0.0672      0.917 0.992 0.008
#> GSM1009133     1  0.6531      0.814 0.832 0.168
#> GSM1009147     1  0.1184      0.915 0.984 0.016
#> GSM1009161     2  0.5519      0.856 0.128 0.872
#> GSM1009175     1  0.0000      0.916 1.000 0.000
#> GSM1009189     1  0.0938      0.916 0.988 0.012
#> GSM1009064     1  0.4431      0.862 0.908 0.092
#> GSM1009078     1  0.0000      0.916 1.000 0.000
#> GSM1009092     1  0.6531      0.814 0.832 0.168
#> GSM1009106     2  0.9580      0.818 0.380 0.620
#> GSM1009120     1  0.0938      0.916 0.988 0.012
#> GSM1009134     1  0.6531      0.814 0.832 0.168
#> GSM1009148     1  0.3274      0.888 0.940 0.060
#> GSM1009162     2  0.5519      0.856 0.128 0.872
#> GSM1009176     1  0.0000      0.916 1.000 0.000
#> GSM1009190     1  0.0938      0.916 0.988 0.012
#> GSM1009065     1  0.4431      0.862 0.908 0.092
#> GSM1009079     1  0.0000      0.916 1.000 0.000
#> GSM1009093     1  0.6531      0.814 0.832 0.168
#> GSM1009107     2  0.9580      0.818 0.380 0.620
#> GSM1009121     1  0.0672      0.917 0.992 0.008
#> GSM1009135     1  0.6531      0.814 0.832 0.168
#> GSM1009149     1  0.0938      0.916 0.988 0.012
#> GSM1009163     2  0.5519      0.856 0.128 0.872
#> GSM1009177     1  0.0000      0.916 1.000 0.000
#> GSM1009191     1  0.0938      0.916 0.988 0.012
#> GSM1009066     1  0.4431      0.862 0.908 0.092
#> GSM1009080     1  0.0000      0.916 1.000 0.000
#> GSM1009094     1  0.6531      0.814 0.832 0.168
#> GSM1009108     2  0.9580      0.818 0.380 0.620
#> GSM1009122     1  0.0672      0.917 0.992 0.008
#> GSM1009136     1  0.6531      0.814 0.832 0.168
#> GSM1009150     1  0.0938      0.916 0.988 0.012
#> GSM1009164     2  0.5519      0.856 0.128 0.872
#> GSM1009178     1  0.0000      0.916 1.000 0.000
#> GSM1009192     1  0.0938      0.916 0.988 0.012
#> GSM1009067     1  0.4431      0.862 0.908 0.092
#> GSM1009081     1  0.0000      0.916 1.000 0.000
#> GSM1009095     1  0.6531      0.814 0.832 0.168
#> GSM1009109     2  0.9580      0.818 0.380 0.620
#> GSM1009123     1  0.0000      0.916 1.000 0.000
#> GSM1009137     1  0.6531      0.814 0.832 0.168
#> GSM1009151     1  0.4431      0.862 0.908 0.092
#> GSM1009165     2  0.5519      0.856 0.128 0.872
#> GSM1009179     1  0.0000      0.916 1.000 0.000
#> GSM1009193     1  0.0938      0.916 0.988 0.012
#> GSM1009068     1  0.4431      0.862 0.908 0.092
#> GSM1009082     1  0.0000      0.916 1.000 0.000
#> GSM1009096     1  0.6531      0.814 0.832 0.168
#> GSM1009110     2  0.9580      0.818 0.380 0.620
#> GSM1009124     1  0.0938      0.916 0.988 0.012
#> GSM1009138     1  0.6531      0.814 0.832 0.168
#> GSM1009152     1  0.3584      0.882 0.932 0.068
#> GSM1009166     2  0.5519      0.856 0.128 0.872
#> GSM1009180     1  0.0000      0.916 1.000 0.000
#> GSM1009194     1  0.0938      0.916 0.988 0.012
#> GSM1009069     1  0.3274      0.886 0.940 0.060
#> GSM1009083     1  0.0000      0.916 1.000 0.000
#> GSM1009097     1  0.6531      0.814 0.832 0.168
#> GSM1009111     2  0.9580      0.818 0.380 0.620
#> GSM1009125     1  0.0672      0.917 0.992 0.008
#> GSM1009139     1  0.6531      0.814 0.832 0.168
#> GSM1009153     1  0.4431      0.862 0.908 0.092
#> GSM1009167     2  0.5519      0.856 0.128 0.872
#> GSM1009181     1  0.0000      0.916 1.000 0.000
#> GSM1009195     1  0.0938      0.916 0.988 0.012
#> GSM1009070     1  0.4431      0.862 0.908 0.092
#> GSM1009084     1  0.0000      0.916 1.000 0.000
#> GSM1009098     1  0.6531      0.814 0.832 0.168
#> GSM1009112     2  0.9580      0.818 0.380 0.620
#> GSM1009126     1  0.0672      0.917 0.992 0.008
#> GSM1009140     1  0.6531      0.814 0.832 0.168
#> GSM1009154     1  0.1184      0.915 0.984 0.016
#> GSM1009168     2  0.5519      0.856 0.128 0.872
#> GSM1009182     1  0.0000      0.916 1.000 0.000
#> GSM1009196     1  0.0938      0.916 0.988 0.012
#> GSM1009071     1  0.4431      0.862 0.908 0.092
#> GSM1009085     1  0.0000      0.916 1.000 0.000
#> GSM1009099     1  0.6531      0.814 0.832 0.168
#> GSM1009113     2  0.9580      0.818 0.380 0.620
#> GSM1009127     1  0.0672      0.917 0.992 0.008
#> GSM1009141     1  0.6531      0.814 0.832 0.168
#> GSM1009155     1  0.4431      0.862 0.908 0.092
#> GSM1009169     2  0.5519      0.856 0.128 0.872
#> GSM1009183     1  0.0000      0.916 1.000 0.000
#> GSM1009197     1  0.0938      0.916 0.988 0.012
#> GSM1009072     1  0.4431      0.862 0.908 0.092
#> GSM1009086     1  0.0000      0.916 1.000 0.000
#> GSM1009100     1  0.6531      0.814 0.832 0.168
#> GSM1009114     2  0.9580      0.818 0.380 0.620
#> GSM1009128     1  0.0672      0.917 0.992 0.008
#> GSM1009142     1  0.6531      0.814 0.832 0.168
#> GSM1009156     1  0.1633      0.912 0.976 0.024
#> GSM1009170     2  0.5519      0.856 0.128 0.872
#> GSM1009184     1  0.0000      0.916 1.000 0.000
#> GSM1009198     1  0.0938      0.916 0.988 0.012
#> GSM1009073     1  0.4431      0.862 0.908 0.092
#> GSM1009087     1  0.0000      0.916 1.000 0.000
#> GSM1009101     1  0.6531      0.814 0.832 0.168
#> GSM1009115     2  0.9580      0.818 0.380 0.620
#> GSM1009129     1  0.0938      0.916 0.988 0.012
#> GSM1009143     1  0.6531      0.814 0.832 0.168
#> GSM1009157     1  0.1843      0.909 0.972 0.028
#> GSM1009171     2  0.5519      0.856 0.128 0.872
#> GSM1009185     1  0.0000      0.916 1.000 0.000
#> GSM1009199     1  0.0938      0.916 0.988 0.012
#> GSM1009074     1  0.4431      0.862 0.908 0.092
#> GSM1009088     1  0.0000      0.916 1.000 0.000
#> GSM1009102     1  0.6531      0.814 0.832 0.168
#> GSM1009116     2  0.9580      0.818 0.380 0.620
#> GSM1009130     1  0.0938      0.916 0.988 0.012
#> GSM1009144     1  0.6531      0.814 0.832 0.168
#> GSM1009158     1  0.3431      0.885 0.936 0.064
#> GSM1009172     2  0.5519      0.856 0.128 0.872
#> GSM1009186     1  0.0000      0.916 1.000 0.000
#> GSM1009200     1  0.0938      0.916 0.988 0.012
#> GSM1009075     1  0.4431      0.862 0.908 0.092
#> GSM1009089     1  0.0000      0.916 1.000 0.000
#> GSM1009103     1  0.6531      0.814 0.832 0.168
#> GSM1009117     2  0.9580      0.818 0.380 0.620
#> GSM1009131     1  0.0938      0.916 0.988 0.012
#> GSM1009145     1  0.6531      0.814 0.832 0.168
#> GSM1009159     1  0.0938      0.916 0.988 0.012
#> GSM1009173     2  0.5519      0.856 0.128 0.872
#> GSM1009187     1  0.0000      0.916 1.000 0.000
#> GSM1009201     1  0.0938      0.916 0.988 0.012

show/hide code output

cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#>            class entropy silhouette    p1    p2    p3
#> GSM1009062     2  0.0000      0.951 0.000 1.000 0.000
#> GSM1009076     2  0.0000      0.951 0.000 1.000 0.000
#> GSM1009090     1  0.0000      0.999 1.000 0.000 0.000
#> GSM1009104     2  0.3038      0.901 0.000 0.896 0.104
#> GSM1009118     2  0.2537      0.937 0.080 0.920 0.000
#> GSM1009132     1  0.0000      0.999 1.000 0.000 0.000
#> GSM1009146     2  0.2066      0.946 0.060 0.940 0.000
#> GSM1009160     3  0.0000      1.000 0.000 0.000 1.000
#> GSM1009174     2  0.0000      0.951 0.000 1.000 0.000
#> GSM1009188     2  0.2066      0.946 0.060 0.940 0.000
#> GSM1009063     2  0.0000      0.951 0.000 1.000 0.000
#> GSM1009077     2  0.0000      0.951 0.000 1.000 0.000
#> GSM1009091     1  0.0000      0.999 1.000 0.000 0.000
#> GSM1009105     2  0.3038      0.901 0.000 0.896 0.104
#> GSM1009119     2  0.4974      0.761 0.236 0.764 0.000
#> GSM1009133     1  0.0000      0.999 1.000 0.000 0.000
#> GSM1009147     2  0.2066      0.946 0.060 0.940 0.000
#> GSM1009161     3  0.0000      1.000 0.000 0.000 1.000
#> GSM1009175     2  0.0000      0.951 0.000 1.000 0.000
#> GSM1009189     2  0.2066      0.946 0.060 0.940 0.000
#> GSM1009064     2  0.0000      0.951 0.000 1.000 0.000
#> GSM1009078     2  0.0000      0.951 0.000 1.000 0.000
#> GSM1009092     1  0.0000      0.999 1.000 0.000 0.000
#> GSM1009106     2  0.3038      0.901 0.000 0.896 0.104
#> GSM1009120     2  0.3816      0.841 0.148 0.852 0.000
#> GSM1009134     1  0.0000      0.999 1.000 0.000 0.000
#> GSM1009148     2  0.2066      0.946 0.060 0.940 0.000
#> GSM1009162     3  0.0000      1.000 0.000 0.000 1.000
#> GSM1009176     2  0.0000      0.951 0.000 1.000 0.000
#> GSM1009190     2  0.2066      0.946 0.060 0.940 0.000
#> GSM1009065     2  0.0000      0.951 0.000 1.000 0.000
#> GSM1009079     2  0.0000      0.951 0.000 1.000 0.000
#> GSM1009093     1  0.0000      0.999 1.000 0.000 0.000
#> GSM1009107     2  0.3038      0.901 0.000 0.896 0.104
#> GSM1009121     2  0.2537      0.937 0.080 0.920 0.000
#> GSM1009135     1  0.0000      0.999 1.000 0.000 0.000
#> GSM1009149     2  0.2066      0.946 0.060 0.940 0.000
#> GSM1009163     3  0.0000      1.000 0.000 0.000 1.000
#> GSM1009177     2  0.0000      0.951 0.000 1.000 0.000
#> GSM1009191     2  0.2066      0.946 0.060 0.940 0.000
#> GSM1009066     2  0.0000      0.951 0.000 1.000 0.000
#> GSM1009080     2  0.0000      0.951 0.000 1.000 0.000
#> GSM1009094     1  0.0000      0.999 1.000 0.000 0.000
#> GSM1009108     2  0.3038      0.901 0.000 0.896 0.104
#> GSM1009122     2  0.2537      0.937 0.080 0.920 0.000
#> GSM1009136     1  0.0000      0.999 1.000 0.000 0.000
#> GSM1009150     2  0.1964      0.947 0.056 0.944 0.000
#> GSM1009164     3  0.0000      1.000 0.000 0.000 1.000
#> GSM1009178     2  0.0000      0.951 0.000 1.000 0.000
#> GSM1009192     2  0.2066      0.946 0.060 0.940 0.000
#> GSM1009067     2  0.0000      0.951 0.000 1.000 0.000
#> GSM1009081     2  0.0000      0.951 0.000 1.000 0.000
#> GSM1009095     1  0.0892      0.965 0.980 0.020 0.000
#> GSM1009109     2  0.3038      0.901 0.000 0.896 0.104
#> GSM1009123     2  0.5706      0.621 0.320 0.680 0.000
#> GSM1009137     1  0.0000      0.999 1.000 0.000 0.000
#> GSM1009151     2  0.1964      0.947 0.056 0.944 0.000
#> GSM1009165     3  0.0000      1.000 0.000 0.000 1.000
#> GSM1009179     2  0.0000      0.951 0.000 1.000 0.000
#> GSM1009193     2  0.2066      0.946 0.060 0.940 0.000
#> GSM1009068     2  0.0000      0.951 0.000 1.000 0.000
#> GSM1009082     2  0.0000      0.951 0.000 1.000 0.000
#> GSM1009096     1  0.0000      0.999 1.000 0.000 0.000
#> GSM1009110     2  0.3038      0.901 0.000 0.896 0.104
#> GSM1009124     2  0.2625      0.935 0.084 0.916 0.000
#> GSM1009138     1  0.0000      0.999 1.000 0.000 0.000
#> GSM1009152     2  0.1964      0.947 0.056 0.944 0.000
#> GSM1009166     3  0.0000      1.000 0.000 0.000 1.000
#> GSM1009180     2  0.0000      0.951 0.000 1.000 0.000
#> GSM1009194     2  0.2066      0.946 0.060 0.940 0.000
#> GSM1009069     2  0.0000      0.951 0.000 1.000 0.000
#> GSM1009083     2  0.0000      0.951 0.000 1.000 0.000
#> GSM1009097     1  0.0000      0.999 1.000 0.000 0.000
#> GSM1009111     2  0.3038      0.901 0.000 0.896 0.104
#> GSM1009125     2  0.2537      0.937 0.080 0.920 0.000
#> GSM1009139     1  0.0000      0.999 1.000 0.000 0.000
#> GSM1009153     2  0.2066      0.946 0.060 0.940 0.000
#> GSM1009167     3  0.0000      1.000 0.000 0.000 1.000
#> GSM1009181     2  0.0000      0.951 0.000 1.000 0.000
#> GSM1009195     2  0.2066      0.946 0.060 0.940 0.000
#> GSM1009070     2  0.0000      0.951 0.000 1.000 0.000
#> GSM1009084     2  0.0000      0.951 0.000 1.000 0.000
#> GSM1009098     1  0.0000      0.999 1.000 0.000 0.000
#> GSM1009112     2  0.3038      0.901 0.000 0.896 0.104
#> GSM1009126     2  0.2625      0.935 0.084 0.916 0.000
#> GSM1009140     1  0.0000      0.999 1.000 0.000 0.000
#> GSM1009154     2  0.2066      0.946 0.060 0.940 0.000
#> GSM1009168     3  0.0000      1.000 0.000 0.000 1.000
#> GSM1009182     2  0.0000      0.951 0.000 1.000 0.000
#> GSM1009196     2  0.2066      0.946 0.060 0.940 0.000
#> GSM1009071     2  0.0000      0.951 0.000 1.000 0.000
#> GSM1009085     2  0.0000      0.951 0.000 1.000 0.000
#> GSM1009099     1  0.0000      0.999 1.000 0.000 0.000
#> GSM1009113     2  0.3038      0.901 0.000 0.896 0.104
#> GSM1009127     2  0.4555      0.809 0.200 0.800 0.000
#> GSM1009141     1  0.0000      0.999 1.000 0.000 0.000
#> GSM1009155     2  0.2066      0.946 0.060 0.940 0.000
#> GSM1009169     3  0.0000      1.000 0.000 0.000 1.000
#> GSM1009183     2  0.0000      0.951 0.000 1.000 0.000
#> GSM1009197     2  0.2066      0.946 0.060 0.940 0.000
#> GSM1009072     2  0.0000      0.951 0.000 1.000 0.000
#> GSM1009086     2  0.0000      0.951 0.000 1.000 0.000
#> GSM1009100     1  0.0000      0.999 1.000 0.000 0.000
#> GSM1009114     2  0.3038      0.901 0.000 0.896 0.104
#> GSM1009128     2  0.2537      0.937 0.080 0.920 0.000
#> GSM1009142     1  0.0000      0.999 1.000 0.000 0.000
#> GSM1009156     2  0.2165      0.945 0.064 0.936 0.000
#> GSM1009170     3  0.0000      1.000 0.000 0.000 1.000
#> GSM1009184     2  0.0000      0.951 0.000 1.000 0.000
#> GSM1009198     2  0.2066      0.946 0.060 0.940 0.000
#> GSM1009073     2  0.0000      0.951 0.000 1.000 0.000
#> GSM1009087     2  0.0000      0.951 0.000 1.000 0.000
#> GSM1009101     1  0.0000      0.999 1.000 0.000 0.000
#> GSM1009115     2  0.3038      0.901 0.000 0.896 0.104
#> GSM1009129     2  0.2537      0.937 0.080 0.920 0.000
#> GSM1009143     1  0.0000      0.999 1.000 0.000 0.000
#> GSM1009157     2  0.2165      0.945 0.064 0.936 0.000
#> GSM1009171     3  0.0000      1.000 0.000 0.000 1.000
#> GSM1009185     2  0.0000      0.951 0.000 1.000 0.000
#> GSM1009199     2  0.2066      0.946 0.060 0.940 0.000
#> GSM1009074     2  0.0000      0.951 0.000 1.000 0.000
#> GSM1009088     2  0.0000      0.951 0.000 1.000 0.000
#> GSM1009102     1  0.0000      0.999 1.000 0.000 0.000
#> GSM1009116     2  0.3038      0.901 0.000 0.896 0.104
#> GSM1009130     2  0.2537      0.937 0.080 0.920 0.000
#> GSM1009144     1  0.0000      0.999 1.000 0.000 0.000
#> GSM1009158     2  0.2066      0.946 0.060 0.940 0.000
#> GSM1009172     3  0.0000      1.000 0.000 0.000 1.000
#> GSM1009186     2  0.0000      0.951 0.000 1.000 0.000
#> GSM1009200     2  0.2066      0.946 0.060 0.940 0.000
#> GSM1009075     2  0.0000      0.951 0.000 1.000 0.000
#> GSM1009089     2  0.0000      0.951 0.000 1.000 0.000
#> GSM1009103     1  0.0000      0.999 1.000 0.000 0.000
#> GSM1009117     2  0.3038      0.901 0.000 0.896 0.104
#> GSM1009131     2  0.2537      0.937 0.080 0.920 0.000
#> GSM1009145     1  0.0000      0.999 1.000 0.000 0.000
#> GSM1009159     2  0.2066      0.946 0.060 0.940 0.000
#> GSM1009173     3  0.0000      1.000 0.000 0.000 1.000
#> GSM1009187     2  0.0000      0.951 0.000 1.000 0.000
#> GSM1009201     2  0.2066      0.946 0.060 0.940 0.000

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>            class entropy silhouette    p1    p2 p3    p4
#> GSM1009062     1  0.3219      0.881 0.836 0.164  0 0.000
#> GSM1009076     1  0.3266      0.875 0.832 0.168  0 0.000
#> GSM1009090     4  0.0000      1.000 0.000 0.000  0 1.000
#> GSM1009104     2  0.1716      0.999 0.064 0.936  0 0.000
#> GSM1009118     1  0.1398      0.892 0.956 0.040  0 0.004
#> GSM1009132     4  0.0000      1.000 0.000 0.000  0 1.000
#> GSM1009146     1  0.1716      0.870 0.936 0.064  0 0.000
#> GSM1009160     3  0.0000      1.000 0.000 0.000  1 0.000
#> GSM1009174     1  0.3219      0.877 0.836 0.164  0 0.000
#> GSM1009188     1  0.0657      0.892 0.984 0.012  0 0.004
#> GSM1009063     1  0.3219      0.881 0.836 0.164  0 0.000
#> GSM1009077     1  0.3266      0.875 0.832 0.168  0 0.000
#> GSM1009091     4  0.0000      1.000 0.000 0.000  0 1.000
#> GSM1009105     2  0.1716      0.999 0.064 0.936  0 0.000
#> GSM1009119     1  0.2909      0.841 0.888 0.020  0 0.092
#> GSM1009133     4  0.0000      1.000 0.000 0.000  0 1.000
#> GSM1009147     1  0.1489      0.880 0.952 0.044  0 0.004
#> GSM1009161     3  0.0000      1.000 0.000 0.000  1 0.000
#> GSM1009175     1  0.3219      0.877 0.836 0.164  0 0.000
#> GSM1009189     1  0.0779      0.891 0.980 0.016  0 0.004
#> GSM1009064     1  0.3219      0.881 0.836 0.164  0 0.000
#> GSM1009078     1  0.3266      0.875 0.832 0.168  0 0.000
#> GSM1009092     4  0.0000      1.000 0.000 0.000  0 1.000
#> GSM1009106     2  0.1716      0.999 0.064 0.936  0 0.000
#> GSM1009120     1  0.2483      0.877 0.916 0.032  0 0.052
#> GSM1009134     4  0.0000      1.000 0.000 0.000  0 1.000
#> GSM1009148     1  0.1716      0.870 0.936 0.064  0 0.000
#> GSM1009162     3  0.0000      1.000 0.000 0.000  1 0.000
#> GSM1009176     1  0.3219      0.877 0.836 0.164  0 0.000
#> GSM1009190     1  0.0524      0.891 0.988 0.008  0 0.004
#> GSM1009065     1  0.3219      0.881 0.836 0.164  0 0.000
#> GSM1009079     1  0.3266      0.875 0.832 0.168  0 0.000
#> GSM1009093     4  0.0000      1.000 0.000 0.000  0 1.000
#> GSM1009107     2  0.1716      0.999 0.064 0.936  0 0.000
#> GSM1009121     1  0.1398      0.892 0.956 0.040  0 0.004
#> GSM1009135     4  0.0000      1.000 0.000 0.000  0 1.000
#> GSM1009149     1  0.1637      0.872 0.940 0.060  0 0.000
#> GSM1009163     3  0.0000      1.000 0.000 0.000  1 0.000
#> GSM1009177     1  0.3219      0.877 0.836 0.164  0 0.000
#> GSM1009191     1  0.0524      0.891 0.988 0.008  0 0.004
#> GSM1009066     1  0.3219      0.881 0.836 0.164  0 0.000
#> GSM1009080     1  0.3266      0.875 0.832 0.168  0 0.000
#> GSM1009094     4  0.0000      1.000 0.000 0.000  0 1.000
#> GSM1009108     2  0.1716      0.999 0.064 0.936  0 0.000
#> GSM1009122     1  0.1398      0.892 0.956 0.040  0 0.004
#> GSM1009136     4  0.0000      1.000 0.000 0.000  0 1.000
#> GSM1009150     1  0.1637      0.872 0.940 0.060  0 0.000
#> GSM1009164     3  0.0000      1.000 0.000 0.000  1 0.000
#> GSM1009178     1  0.3123      0.880 0.844 0.156  0 0.000
#> GSM1009192     1  0.0657      0.890 0.984 0.012  0 0.004
#> GSM1009067     1  0.3219      0.881 0.836 0.164  0 0.000
#> GSM1009081     1  0.3266      0.875 0.832 0.168  0 0.000
#> GSM1009095     4  0.0188      0.993 0.004 0.000  0 0.996
#> GSM1009109     2  0.1716      0.999 0.064 0.936  0 0.000
#> GSM1009123     1  0.5008      0.639 0.732 0.040  0 0.228
#> GSM1009137     4  0.0000      1.000 0.000 0.000  0 1.000
#> GSM1009151     1  0.1716      0.870 0.936 0.064  0 0.000
#> GSM1009165     3  0.0000      1.000 0.000 0.000  1 0.000
#> GSM1009179     1  0.3123      0.880 0.844 0.156  0 0.000
#> GSM1009193     1  0.0657      0.890 0.984 0.012  0 0.004
#> GSM1009068     1  0.3219      0.881 0.836 0.164  0 0.000
#> GSM1009082     1  0.3266      0.875 0.832 0.168  0 0.000
#> GSM1009096     4  0.0000      1.000 0.000 0.000  0 1.000
#> GSM1009110     2  0.1792      0.993 0.068 0.932  0 0.000
#> GSM1009124     1  0.1398      0.892 0.956 0.040  0 0.004
#> GSM1009138     4  0.0000      1.000 0.000 0.000  0 1.000
#> GSM1009152     1  0.1716      0.870 0.936 0.064  0 0.000
#> GSM1009166     3  0.0000      1.000 0.000 0.000  1 0.000
#> GSM1009180     1  0.3123      0.880 0.844 0.156  0 0.000
#> GSM1009194     1  0.0657      0.890 0.984 0.012  0 0.004
#> GSM1009069     1  0.3569      0.880 0.804 0.196  0 0.000
#> GSM1009083     1  0.3266      0.875 0.832 0.168  0 0.000
#> GSM1009097     4  0.0000      1.000 0.000 0.000  0 1.000
#> GSM1009111     2  0.1716      0.999 0.064 0.936  0 0.000
#> GSM1009125     1  0.1398      0.892 0.956 0.040  0 0.004
#> GSM1009139     4  0.0000      1.000 0.000 0.000  0 1.000
#> GSM1009153     1  0.1716      0.870 0.936 0.064  0 0.000
#> GSM1009167     3  0.0000      1.000 0.000 0.000  1 0.000
#> GSM1009181     1  0.3219      0.877 0.836 0.164  0 0.000
#> GSM1009195     1  0.0524      0.891 0.988 0.008  0 0.004
#> GSM1009070     1  0.3219      0.881 0.836 0.164  0 0.000
#> GSM1009084     1  0.3266      0.875 0.832 0.168  0 0.000
#> GSM1009098     4  0.0000      1.000 0.000 0.000  0 1.000
#> GSM1009112     2  0.1716      0.999 0.064 0.936  0 0.000
#> GSM1009126     1  0.1398      0.892 0.956 0.040  0 0.004
#> GSM1009140     4  0.0000      1.000 0.000 0.000  0 1.000
#> GSM1009154     1  0.1716      0.870 0.936 0.064  0 0.000
#> GSM1009168     3  0.0000      1.000 0.000 0.000  1 0.000
#> GSM1009182     1  0.3219      0.877 0.836 0.164  0 0.000
#> GSM1009196     1  0.1489      0.880 0.952 0.044  0 0.004
#> GSM1009071     1  0.3219      0.881 0.836 0.164  0 0.000
#> GSM1009085     1  0.3266      0.875 0.832 0.168  0 0.000
#> GSM1009099     4  0.0000      1.000 0.000 0.000  0 1.000
#> GSM1009113     2  0.1716      0.999 0.064 0.936  0 0.000
#> GSM1009127     1  0.2174      0.876 0.928 0.020  0 0.052
#> GSM1009141     4  0.0000      1.000 0.000 0.000  0 1.000
#> GSM1009155     1  0.1716      0.875 0.936 0.064  0 0.000
#> GSM1009169     3  0.0000      1.000 0.000 0.000  1 0.000
#> GSM1009183     1  0.3219      0.877 0.836 0.164  0 0.000
#> GSM1009197     1  0.0657      0.890 0.984 0.012  0 0.004
#> GSM1009072     1  0.3219      0.881 0.836 0.164  0 0.000
#> GSM1009086     1  0.3266      0.875 0.832 0.168  0 0.000
#> GSM1009100     4  0.0000      1.000 0.000 0.000  0 1.000
#> GSM1009114     2  0.1716      0.999 0.064 0.936  0 0.000
#> GSM1009128     1  0.1398      0.892 0.956 0.040  0 0.004
#> GSM1009142     4  0.0000      1.000 0.000 0.000  0 1.000
#> GSM1009156     1  0.1576      0.882 0.948 0.048  0 0.004
#> GSM1009170     3  0.0000      1.000 0.000 0.000  1 0.000
#> GSM1009184     1  0.3219      0.877 0.836 0.164  0 0.000
#> GSM1009198     1  0.0779      0.892 0.980 0.016  0 0.004
#> GSM1009073     1  0.3219      0.881 0.836 0.164  0 0.000
#> GSM1009087     1  0.3266      0.875 0.832 0.168  0 0.000
#> GSM1009101     4  0.0000      1.000 0.000 0.000  0 1.000
#> GSM1009115     2  0.1792      0.993 0.068 0.932  0 0.000
#> GSM1009129     1  0.1398      0.892 0.956 0.040  0 0.004
#> GSM1009143     4  0.0000      1.000 0.000 0.000  0 1.000
#> GSM1009157     1  0.1661      0.884 0.944 0.052  0 0.004
#> GSM1009171     3  0.0000      1.000 0.000 0.000  1 0.000
#> GSM1009185     1  0.3123      0.880 0.844 0.156  0 0.000
#> GSM1009199     1  0.0524      0.891 0.988 0.008  0 0.004
#> GSM1009074     1  0.3219      0.881 0.836 0.164  0 0.000
#> GSM1009088     1  0.3266      0.875 0.832 0.168  0 0.000
#> GSM1009102     4  0.0000      1.000 0.000 0.000  0 1.000
#> GSM1009116     2  0.1716      0.999 0.064 0.936  0 0.000
#> GSM1009130     1  0.1398      0.892 0.956 0.040  0 0.004
#> GSM1009144     4  0.0000      1.000 0.000 0.000  0 1.000
#> GSM1009158     1  0.1716      0.870 0.936 0.064  0 0.000
#> GSM1009172     3  0.0000      1.000 0.000 0.000  1 0.000
#> GSM1009186     1  0.3219      0.877 0.836 0.164  0 0.000
#> GSM1009200     1  0.0376      0.891 0.992 0.004  0 0.004
#> GSM1009075     1  0.3219      0.881 0.836 0.164  0 0.000
#> GSM1009089     1  0.3219      0.877 0.836 0.164  0 0.000
#> GSM1009103     4  0.0000      1.000 0.000 0.000  0 1.000
#> GSM1009117     2  0.1716      0.999 0.064 0.936  0 0.000
#> GSM1009131     1  0.1398      0.892 0.956 0.040  0 0.004
#> GSM1009145     4  0.0000      1.000 0.000 0.000  0 1.000
#> GSM1009159     1  0.1637      0.872 0.940 0.060  0 0.000
#> GSM1009173     3  0.0000      1.000 0.000 0.000  1 0.000
#> GSM1009187     1  0.3123      0.880 0.844 0.156  0 0.000
#> GSM1009201     1  0.0524      0.891 0.988 0.008  0 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
#> GSM1009062     1  0.3318     0.6928 0.808 0.180  0 0.000 0.012
#> GSM1009076     2  0.0000     0.9109 0.000 1.000  0 0.000 0.000
#> GSM1009090     4  0.0000     0.9934 0.000 0.000  0 1.000 0.000
#> GSM1009104     5  0.0404     1.0000 0.000 0.012  0 0.000 0.988
#> GSM1009118     2  0.1121     0.8816 0.044 0.956  0 0.000 0.000
#> GSM1009132     4  0.0794     0.9621 0.000 0.028  0 0.972 0.000
#> GSM1009146     1  0.1121     0.7349 0.956 0.044  0 0.000 0.000
#> GSM1009160     3  0.0000     1.0000 0.000 0.000  1 0.000 0.000
#> GSM1009174     2  0.0000     0.9109 0.000 1.000  0 0.000 0.000
#> GSM1009188     1  0.4045     0.6163 0.644 0.356  0 0.000 0.000
#> GSM1009063     1  0.3318     0.6928 0.808 0.180  0 0.000 0.012
#> GSM1009077     2  0.0000     0.9109 0.000 1.000  0 0.000 0.000
#> GSM1009091     4  0.0000     0.9934 0.000 0.000  0 1.000 0.000
#> GSM1009105     5  0.0404     1.0000 0.000 0.012  0 0.000 0.988
#> GSM1009119     2  0.5756     0.1750 0.312 0.576  0 0.112 0.000
#> GSM1009133     4  0.0000     0.9934 0.000 0.000  0 1.000 0.000
#> GSM1009147     1  0.3837     0.6545 0.692 0.308  0 0.000 0.000
#> GSM1009161     3  0.0000     1.0000 0.000 0.000  1 0.000 0.000
#> GSM1009175     2  0.0000     0.9109 0.000 1.000  0 0.000 0.000
#> GSM1009189     1  0.4045     0.6163 0.644 0.356  0 0.000 0.000
#> GSM1009064     1  0.3318     0.6928 0.808 0.180  0 0.000 0.012
#> GSM1009078     2  0.0000     0.9109 0.000 1.000  0 0.000 0.000
#> GSM1009092     4  0.0000     0.9934 0.000 0.000  0 1.000 0.000
#> GSM1009106     5  0.0404     1.0000 0.000 0.012  0 0.000 0.988
#> GSM1009120     2  0.5862     0.0439 0.344 0.544  0 0.112 0.000
#> GSM1009134     4  0.0000     0.9934 0.000 0.000  0 1.000 0.000
#> GSM1009148     1  0.1121     0.7349 0.956 0.044  0 0.000 0.000
#> GSM1009162     3  0.0000     1.0000 0.000 0.000  1 0.000 0.000
#> GSM1009176     2  0.0000     0.9109 0.000 1.000  0 0.000 0.000
#> GSM1009190     1  0.4045     0.6163 0.644 0.356  0 0.000 0.000
#> GSM1009065     1  0.3318     0.6928 0.808 0.180  0 0.000 0.012
#> GSM1009079     2  0.0000     0.9109 0.000 1.000  0 0.000 0.000
#> GSM1009093     4  0.0000     0.9934 0.000 0.000  0 1.000 0.000
#> GSM1009107     5  0.0404     1.0000 0.000 0.012  0 0.000 0.988
#> GSM1009121     2  0.1197     0.8785 0.048 0.952  0 0.000 0.000
#> GSM1009135     4  0.0000     0.9934 0.000 0.000  0 1.000 0.000
#> GSM1009149     1  0.1121     0.7349 0.956 0.044  0 0.000 0.000
#> GSM1009163     3  0.0000     1.0000 0.000 0.000  1 0.000 0.000
#> GSM1009177     2  0.0000     0.9109 0.000 1.000  0 0.000 0.000
#> GSM1009191     1  0.4045     0.6163 0.644 0.356  0 0.000 0.000
#> GSM1009066     1  0.3318     0.6928 0.808 0.180  0 0.000 0.012
#> GSM1009080     2  0.0000     0.9109 0.000 1.000  0 0.000 0.000
#> GSM1009094     4  0.0000     0.9934 0.000 0.000  0 1.000 0.000
#> GSM1009108     5  0.0404     1.0000 0.000 0.012  0 0.000 0.988
#> GSM1009122     2  0.1043     0.8842 0.040 0.960  0 0.000 0.000
#> GSM1009136     4  0.0000     0.9934 0.000 0.000  0 1.000 0.000
#> GSM1009150     1  0.1121     0.7349 0.956 0.044  0 0.000 0.000
#> GSM1009164     3  0.0000     1.0000 0.000 0.000  1 0.000 0.000
#> GSM1009178     2  0.0000     0.9109 0.000 1.000  0 0.000 0.000
#> GSM1009192     1  0.4045     0.6163 0.644 0.356  0 0.000 0.000
#> GSM1009067     1  0.3318     0.6928 0.808 0.180  0 0.000 0.012
#> GSM1009081     2  0.0000     0.9109 0.000 1.000  0 0.000 0.000
#> GSM1009095     4  0.1877     0.9021 0.012 0.064  0 0.924 0.000
#> GSM1009109     5  0.0404     1.0000 0.000 0.012  0 0.000 0.988
#> GSM1009123     2  0.3944     0.6921 0.052 0.788  0 0.160 0.000
#> GSM1009137     4  0.0000     0.9934 0.000 0.000  0 1.000 0.000
#> GSM1009151     1  0.1121     0.7349 0.956 0.044  0 0.000 0.000
#> GSM1009165     3  0.0000     1.0000 0.000 0.000  1 0.000 0.000
#> GSM1009179     2  0.0000     0.9109 0.000 1.000  0 0.000 0.000
#> GSM1009193     1  0.4045     0.6163 0.644 0.356  0 0.000 0.000
#> GSM1009068     1  0.3318     0.6928 0.808 0.180  0 0.000 0.012
#> GSM1009082     2  0.0000     0.9109 0.000 1.000  0 0.000 0.000
#> GSM1009096     4  0.0000     0.9934 0.000 0.000  0 1.000 0.000
#> GSM1009110     5  0.0404     1.0000 0.000 0.012  0 0.000 0.988
#> GSM1009124     2  0.3561     0.4966 0.260 0.740  0 0.000 0.000
#> GSM1009138     4  0.0000     0.9934 0.000 0.000  0 1.000 0.000
#> GSM1009152     1  0.1121     0.7349 0.956 0.044  0 0.000 0.000
#> GSM1009166     3  0.0000     1.0000 0.000 0.000  1 0.000 0.000
#> GSM1009180     2  0.0000     0.9109 0.000 1.000  0 0.000 0.000
#> GSM1009194     1  0.4045     0.6163 0.644 0.356  0 0.000 0.000
#> GSM1009069     2  0.4273    -0.1955 0.448 0.552  0 0.000 0.000
#> GSM1009083     2  0.0000     0.9109 0.000 1.000  0 0.000 0.000
#> GSM1009097     4  0.0000     0.9934 0.000 0.000  0 1.000 0.000
#> GSM1009111     5  0.0404     1.0000 0.000 0.012  0 0.000 0.988
#> GSM1009125     2  0.1197     0.8785 0.048 0.952  0 0.000 0.000
#> GSM1009139     4  0.0671     0.9757 0.004 0.016  0 0.980 0.000
#> GSM1009153     1  0.1121     0.7349 0.956 0.044  0 0.000 0.000
#> GSM1009167     3  0.0000     1.0000 0.000 0.000  1 0.000 0.000
#> GSM1009181     2  0.0000     0.9109 0.000 1.000  0 0.000 0.000
#> GSM1009195     1  0.4045     0.6163 0.644 0.356  0 0.000 0.000
#> GSM1009070     1  0.3318     0.6928 0.808 0.180  0 0.000 0.012
#> GSM1009084     2  0.0000     0.9109 0.000 1.000  0 0.000 0.000
#> GSM1009098     4  0.0000     0.9934 0.000 0.000  0 1.000 0.000
#> GSM1009112     5  0.0404     1.0000 0.000 0.012  0 0.000 0.988
#> GSM1009126     2  0.1341     0.8706 0.056 0.944  0 0.000 0.000
#> GSM1009140     4  0.0000     0.9934 0.000 0.000  0 1.000 0.000
#> GSM1009154     1  0.1121     0.7349 0.956 0.044  0 0.000 0.000
#> GSM1009168     3  0.0000     1.0000 0.000 0.000  1 0.000 0.000
#> GSM1009182     2  0.0000     0.9109 0.000 1.000  0 0.000 0.000
#> GSM1009196     1  0.3837     0.6545 0.692 0.308  0 0.000 0.000
#> GSM1009071     1  0.3318     0.6928 0.808 0.180  0 0.000 0.012
#> GSM1009085     2  0.0000     0.9109 0.000 1.000  0 0.000 0.000
#> GSM1009099     4  0.0000     0.9934 0.000 0.000  0 1.000 0.000
#> GSM1009113     5  0.0404     1.0000 0.000 0.012  0 0.000 0.988
#> GSM1009127     2  0.5813     0.1140 0.328 0.560  0 0.112 0.000
#> GSM1009141     4  0.0162     0.9901 0.004 0.000  0 0.996 0.000
#> GSM1009155     1  0.1121     0.7349 0.956 0.044  0 0.000 0.000
#> GSM1009169     3  0.0000     1.0000 0.000 0.000  1 0.000 0.000
#> GSM1009183     2  0.0000     0.9109 0.000 1.000  0 0.000 0.000
#> GSM1009197     1  0.4030     0.6201 0.648 0.352  0 0.000 0.000
#> GSM1009072     1  0.3318     0.6928 0.808 0.180  0 0.000 0.012
#> GSM1009086     2  0.0000     0.9109 0.000 1.000  0 0.000 0.000
#> GSM1009100     4  0.0000     0.9934 0.000 0.000  0 1.000 0.000
#> GSM1009114     5  0.0404     1.0000 0.000 0.012  0 0.000 0.988
#> GSM1009128     2  0.1197     0.8785 0.048 0.952  0 0.000 0.000
#> GSM1009142     4  0.0000     0.9934 0.000 0.000  0 1.000 0.000
#> GSM1009156     1  0.3999     0.6315 0.656 0.344  0 0.000 0.000
#> GSM1009170     3  0.0000     1.0000 0.000 0.000  1 0.000 0.000
#> GSM1009184     2  0.0000     0.9109 0.000 1.000  0 0.000 0.000
#> GSM1009198     1  0.4045     0.6163 0.644 0.356  0 0.000 0.000
#> GSM1009073     1  0.3318     0.6928 0.808 0.180  0 0.000 0.012
#> GSM1009087     2  0.0000     0.9109 0.000 1.000  0 0.000 0.000
#> GSM1009101     4  0.0000     0.9934 0.000 0.000  0 1.000 0.000
#> GSM1009115     5  0.0404     1.0000 0.000 0.012  0 0.000 0.988
#> GSM1009129     2  0.1121     0.8816 0.044 0.956  0 0.000 0.000
#> GSM1009143     4  0.0000     0.9934 0.000 0.000  0 1.000 0.000
#> GSM1009157     1  0.3913     0.6476 0.676 0.324  0 0.000 0.000
#> GSM1009171     3  0.0000     1.0000 0.000 0.000  1 0.000 0.000
#> GSM1009185     2  0.0000     0.9109 0.000 1.000  0 0.000 0.000
#> GSM1009199     1  0.4045     0.6163 0.644 0.356  0 0.000 0.000
#> GSM1009074     1  0.3318     0.6928 0.808 0.180  0 0.000 0.012
#> GSM1009088     2  0.0000     0.9109 0.000 1.000  0 0.000 0.000
#> GSM1009102     4  0.0162     0.9901 0.004 0.000  0 0.996 0.000
#> GSM1009116     5  0.0404     1.0000 0.000 0.012  0 0.000 0.988
#> GSM1009130     2  0.3177     0.6196 0.208 0.792  0 0.000 0.000
#> GSM1009144     4  0.0290     0.9861 0.000 0.008  0 0.992 0.000
#> GSM1009158     1  0.1121     0.7349 0.956 0.044  0 0.000 0.000
#> GSM1009172     3  0.0000     1.0000 0.000 0.000  1 0.000 0.000
#> GSM1009186     2  0.0000     0.9109 0.000 1.000  0 0.000 0.000
#> GSM1009200     1  0.4045     0.6163 0.644 0.356  0 0.000 0.000
#> GSM1009075     1  0.3318     0.6928 0.808 0.180  0 0.000 0.012
#> GSM1009089     2  0.0000     0.9109 0.000 1.000  0 0.000 0.000
#> GSM1009103     4  0.0000     0.9934 0.000 0.000  0 1.000 0.000
#> GSM1009117     5  0.0404     1.0000 0.000 0.012  0 0.000 0.988
#> GSM1009131     2  0.1478     0.8617 0.064 0.936  0 0.000 0.000
#> GSM1009145     4  0.0000     0.9934 0.000 0.000  0 1.000 0.000
#> GSM1009159     1  0.1121     0.7349 0.956 0.044  0 0.000 0.000
#> GSM1009173     3  0.0000     1.0000 0.000 0.000  1 0.000 0.000
#> GSM1009187     2  0.0000     0.9109 0.000 1.000  0 0.000 0.000
#> GSM1009201     1  0.4045     0.6163 0.644 0.356  0 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
#> GSM1009062     6  0.3320      0.966 0.212 0.016  0 0.000  0 0.772
#> GSM1009076     2  0.2454      0.698 0.000 0.840  0 0.000  0 0.160
#> GSM1009090     4  0.0000      0.979 0.000 0.000  0 1.000  0 0.000
#> GSM1009104     5  0.0000      1.000 0.000 0.000  0 0.000  1 0.000
#> GSM1009118     2  0.6017      0.234 0.316 0.424  0 0.000  0 0.260
#> GSM1009132     4  0.0865      0.952 0.036 0.000  0 0.964  0 0.000
#> GSM1009146     1  0.1765      0.757 0.904 0.000  0 0.000  0 0.096
#> GSM1009160     3  0.0000      1.000 0.000 0.000  1 0.000  0 0.000
#> GSM1009174     2  0.2730      0.743 0.192 0.808  0 0.000  0 0.000
#> GSM1009188     1  0.0146      0.808 0.996 0.004  0 0.000  0 0.000
#> GSM1009063     6  0.3320      0.966 0.212 0.016  0 0.000  0 0.772
#> GSM1009077     2  0.2454      0.698 0.000 0.840  0 0.000  0 0.160
#> GSM1009091     4  0.0000      0.979 0.000 0.000  0 1.000  0 0.000
#> GSM1009105     5  0.0000      1.000 0.000 0.000  0 0.000  1 0.000
#> GSM1009119     1  0.5909      0.410 0.596 0.056  0 0.116  0 0.232
#> GSM1009133     4  0.0000      0.979 0.000 0.000  0 1.000  0 0.000
#> GSM1009147     1  0.0146      0.807 0.996 0.000  0 0.000  0 0.004
#> GSM1009161     3  0.0000      1.000 0.000 0.000  1 0.000  0 0.000
#> GSM1009175     2  0.2730      0.743 0.192 0.808  0 0.000  0 0.000
#> GSM1009189     1  0.0146      0.808 0.996 0.004  0 0.000  0 0.000
#> GSM1009064     6  0.3320      0.966 0.212 0.016  0 0.000  0 0.772
#> GSM1009078     2  0.2402      0.705 0.004 0.856  0 0.000  0 0.140
#> GSM1009092     4  0.0000      0.979 0.000 0.000  0 1.000  0 0.000
#> GSM1009106     5  0.0000      1.000 0.000 0.000  0 0.000  1 0.000
#> GSM1009120     1  0.5299      0.437 0.648 0.024  0 0.116  0 0.212
#> GSM1009134     4  0.0000      0.979 0.000 0.000  0 1.000  0 0.000
#> GSM1009148     1  0.1863      0.751 0.896 0.000  0 0.000  0 0.104
#> GSM1009162     3  0.0000      1.000 0.000 0.000  1 0.000  0 0.000
#> GSM1009176     2  0.2730      0.743 0.192 0.808  0 0.000  0 0.000
#> GSM1009190     1  0.0146      0.808 0.996 0.004  0 0.000  0 0.000
#> GSM1009065     6  0.3320      0.966 0.212 0.016  0 0.000  0 0.772
#> GSM1009079     2  0.3506      0.713 0.052 0.792  0 0.000  0 0.156
#> GSM1009093     4  0.0000      0.979 0.000 0.000  0 1.000  0 0.000
#> GSM1009107     5  0.0000      1.000 0.000 0.000  0 0.000  1 0.000
#> GSM1009121     1  0.5926      0.236 0.464 0.276  0 0.000  0 0.260
#> GSM1009135     4  0.0000      0.979 0.000 0.000  0 1.000  0 0.000
#> GSM1009149     1  0.1765      0.757 0.904 0.000  0 0.000  0 0.096
#> GSM1009163     3  0.0000      1.000 0.000 0.000  1 0.000  0 0.000
#> GSM1009177     2  0.2730      0.743 0.192 0.808  0 0.000  0 0.000
#> GSM1009191     1  0.0146      0.808 0.996 0.004  0 0.000  0 0.000
#> GSM1009066     6  0.3320      0.966 0.212 0.016  0 0.000  0 0.772
#> GSM1009080     2  0.2454      0.698 0.000 0.840  0 0.000  0 0.160
#> GSM1009094     4  0.0000      0.979 0.000 0.000  0 1.000  0 0.000
#> GSM1009108     5  0.0000      1.000 0.000 0.000  0 0.000  1 0.000
#> GSM1009122     2  0.5969      0.299 0.292 0.448  0 0.000  0 0.260
#> GSM1009136     4  0.0000      0.979 0.000 0.000  0 1.000  0 0.000
#> GSM1009150     1  0.1814      0.754 0.900 0.000  0 0.000  0 0.100
#> GSM1009164     3  0.0000      1.000 0.000 0.000  1 0.000  0 0.000
#> GSM1009178     2  0.2730      0.743 0.192 0.808  0 0.000  0 0.000
#> GSM1009192     1  0.0000      0.807 1.000 0.000  0 0.000  0 0.000
#> GSM1009067     6  0.3320      0.966 0.212 0.016  0 0.000  0 0.772
#> GSM1009081     2  0.2416      0.699 0.000 0.844  0 0.000  0 0.156
#> GSM1009095     4  0.2994      0.730 0.208 0.004  0 0.788  0 0.000
#> GSM1009109     5  0.0000      1.000 0.000 0.000  0 0.000  1 0.000
#> GSM1009123     1  0.6966      0.307 0.472 0.144  0 0.132  0 0.252
#> GSM1009137     4  0.0000      0.979 0.000 0.000  0 1.000  0 0.000
#> GSM1009151     1  0.1863      0.751 0.896 0.000  0 0.000  0 0.104
#> GSM1009165     3  0.0000      1.000 0.000 0.000  1 0.000  0 0.000
#> GSM1009179     2  0.2730      0.743 0.192 0.808  0 0.000  0 0.000
#> GSM1009193     1  0.0146      0.808 0.996 0.004  0 0.000  0 0.000
#> GSM1009068     6  0.3320      0.966 0.212 0.016  0 0.000  0 0.772
#> GSM1009082     2  0.2454      0.698 0.000 0.840  0 0.000  0 0.160
#> GSM1009096     4  0.0000      0.979 0.000 0.000  0 1.000  0 0.000
#> GSM1009110     5  0.0000      1.000 0.000 0.000  0 0.000  1 0.000
#> GSM1009124     1  0.5258      0.458 0.596 0.152  0 0.000  0 0.252
#> GSM1009138     4  0.0000      0.979 0.000 0.000  0 1.000  0 0.000
#> GSM1009152     1  0.1863      0.751 0.896 0.000  0 0.000  0 0.104
#> GSM1009166     3  0.0000      1.000 0.000 0.000  1 0.000  0 0.000
#> GSM1009180     2  0.2969      0.712 0.224 0.776  0 0.000  0 0.000
#> GSM1009194     1  0.0000      0.807 1.000 0.000  0 0.000  0 0.000
#> GSM1009069     6  0.5974      0.475 0.248 0.312  0 0.000  0 0.440
#> GSM1009083     2  0.2416      0.699 0.000 0.844  0 0.000  0 0.156
#> GSM1009097     4  0.0000      0.979 0.000 0.000  0 1.000  0 0.000
#> GSM1009111     5  0.0000      1.000 0.000 0.000  0 0.000  1 0.000
#> GSM1009125     1  0.5902      0.258 0.472 0.268  0 0.000  0 0.260
#> GSM1009139     4  0.1387      0.926 0.068 0.000  0 0.932  0 0.000
#> GSM1009153     1  0.1765      0.757 0.904 0.000  0 0.000  0 0.096
#> GSM1009167     3  0.0000      1.000 0.000 0.000  1 0.000  0 0.000
#> GSM1009181     2  0.2730      0.743 0.192 0.808  0 0.000  0 0.000
#> GSM1009195     1  0.0146      0.808 0.996 0.004  0 0.000  0 0.000
#> GSM1009070     6  0.3320      0.966 0.212 0.016  0 0.000  0 0.772
#> GSM1009084     2  0.2454      0.698 0.000 0.840  0 0.000  0 0.160
#> GSM1009098     4  0.0000      0.979 0.000 0.000  0 1.000  0 0.000
#> GSM1009112     5  0.0000      1.000 0.000 0.000  0 0.000  1 0.000
#> GSM1009126     1  0.5586      0.409 0.544 0.196  0 0.000  0 0.260
#> GSM1009140     4  0.0000      0.979 0.000 0.000  0 1.000  0 0.000
#> GSM1009154     1  0.1814      0.754 0.900 0.000  0 0.000  0 0.100
#> GSM1009168     3  0.0000      1.000 0.000 0.000  1 0.000  0 0.000
#> GSM1009182     2  0.2730      0.743 0.192 0.808  0 0.000  0 0.000
#> GSM1009196     1  0.0000      0.807 1.000 0.000  0 0.000  0 0.000
#> GSM1009071     6  0.3320      0.966 0.212 0.016  0 0.000  0 0.772
#> GSM1009085     2  0.2454      0.698 0.000 0.840  0 0.000  0 0.160
#> GSM1009099     4  0.0000      0.979 0.000 0.000  0 1.000  0 0.000
#> GSM1009113     5  0.0000      1.000 0.000 0.000  0 0.000  1 0.000
#> GSM1009127     1  0.5909      0.410 0.596 0.056  0 0.116  0 0.232
#> GSM1009141     4  0.1387      0.926 0.068 0.000  0 0.932  0 0.000
#> GSM1009155     1  0.1007      0.791 0.956 0.000  0 0.000  0 0.044
#> GSM1009169     3  0.0000      1.000 0.000 0.000  1 0.000  0 0.000
#> GSM1009183     2  0.2730      0.743 0.192 0.808  0 0.000  0 0.000
#> GSM1009197     1  0.0000      0.807 1.000 0.000  0 0.000  0 0.000
#> GSM1009072     6  0.3320      0.966 0.212 0.016  0 0.000  0 0.772
#> GSM1009086     2  0.2454      0.698 0.000 0.840  0 0.000  0 0.160
#> GSM1009100     4  0.0000      0.979 0.000 0.000  0 1.000  0 0.000
#> GSM1009114     5  0.0000      1.000 0.000 0.000  0 0.000  1 0.000
#> GSM1009128     1  0.5948      0.212 0.456 0.284  0 0.000  0 0.260
#> GSM1009142     4  0.0000      0.979 0.000 0.000  0 1.000  0 0.000
#> GSM1009156     1  0.0713      0.798 0.972 0.000  0 0.000  0 0.028
#> GSM1009170     3  0.0000      1.000 0.000 0.000  1 0.000  0 0.000
#> GSM1009184     2  0.2730      0.743 0.192 0.808  0 0.000  0 0.000
#> GSM1009198     1  0.0146      0.808 0.996 0.004  0 0.000  0 0.000
#> GSM1009073     6  0.3320      0.966 0.212 0.016  0 0.000  0 0.772
#> GSM1009087     2  0.2520      0.703 0.004 0.844  0 0.000  0 0.152
#> GSM1009101     4  0.0000      0.979 0.000 0.000  0 1.000  0 0.000
#> GSM1009115     5  0.0000      1.000 0.000 0.000  0 0.000  1 0.000
#> GSM1009129     2  0.5969      0.299 0.292 0.448  0 0.000  0 0.260
#> GSM1009143     4  0.0000      0.979 0.000 0.000  0 1.000  0 0.000
#> GSM1009157     1  0.0632      0.800 0.976 0.000  0 0.000  0 0.024
#> GSM1009171     3  0.0000      1.000 0.000 0.000  1 0.000  0 0.000
#> GSM1009185     2  0.2941      0.717 0.220 0.780  0 0.000  0 0.000
#> GSM1009199     1  0.0146      0.808 0.996 0.004  0 0.000  0 0.000
#> GSM1009074     6  0.3320      0.966 0.212 0.016  0 0.000  0 0.772
#> GSM1009088     2  0.2520      0.703 0.004 0.844  0 0.000  0 0.152
#> GSM1009102     4  0.0790      0.959 0.032 0.000  0 0.968  0 0.000
#> GSM1009116     5  0.0000      1.000 0.000 0.000  0 0.000  1 0.000
#> GSM1009130     2  0.5938      0.327 0.280 0.460  0 0.000  0 0.260
#> GSM1009144     4  0.0937      0.953 0.040 0.000  0 0.960  0 0.000
#> GSM1009158     1  0.1765      0.759 0.904 0.000  0 0.000  0 0.096
#> GSM1009172     3  0.0000      1.000 0.000 0.000  1 0.000  0 0.000
#> GSM1009186     2  0.2730      0.743 0.192 0.808  0 0.000  0 0.000
#> GSM1009200     1  0.0146      0.808 0.996 0.004  0 0.000  0 0.000
#> GSM1009075     6  0.3320      0.966 0.212 0.016  0 0.000  0 0.772
#> GSM1009089     2  0.3167      0.726 0.072 0.832  0 0.000  0 0.096
#> GSM1009103     4  0.0790      0.959 0.032 0.000  0 0.968  0 0.000
#> GSM1009117     5  0.0000      1.000 0.000 0.000  0 0.000  1 0.000
#> GSM1009131     2  0.6039      0.187 0.332 0.408  0 0.000  0 0.260
#> GSM1009145     4  0.0000      0.979 0.000 0.000  0 1.000  0 0.000
#> GSM1009159     1  0.1610      0.767 0.916 0.000  0 0.000  0 0.084
#> GSM1009173     3  0.0000      1.000 0.000 0.000  1 0.000  0 0.000
#> GSM1009187     2  0.2854      0.729 0.208 0.792  0 0.000  0 0.000
#> GSM1009201     1  0.0146      0.808 0.996 0.004  0 0.000  0 0.000

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

consensus_heatmap(res, k = 2)

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

consensus_heatmap(res, k = 3)

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

consensus_heatmap(res, k = 4)

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

consensus_heatmap(res, k = 5)

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

consensus_heatmap(res, k = 6)

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

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

membership_heatmap(res, k = 2)

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

membership_heatmap(res, k = 3)

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

membership_heatmap(res, k = 4)

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

membership_heatmap(res, k = 5)

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

membership_heatmap(res, k = 6)

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

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

Signature heatmaps where rows are scaled:

get_signatures(res, k = 2)

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

get_signatures(res, k = 3)

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

get_signatures(res, k = 4)

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

get_signatures(res, k = 5)

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

get_signatures(res, k = 6)

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

Signature heatmaps where rows are not scaled:

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

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

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

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

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

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

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

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

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

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

Compare the overlap of signatures from different k:

compare_signatures(res)

plot of chunk SD-mclust-signature_compare

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

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

An example of the output of tb is:

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

The columns in tb are:

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

UMAP plot which shows how samples are separated.

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

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

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

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

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

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

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

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

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

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

Following heatmap shows how subgroups are split when increasing k:

collect_classes(res)

plot of chunk SD-mclust-collect-classes

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

test_to_known_factors(res)
#>             n temperature(p) time(p) specimen(p) k
#> SD:mclust 140              1       1    1.03e-25 2
#> SD:mclust 140              1       1    6.13e-49 3
#> SD:mclust 140              1       1    4.16e-72 4
#> SD:mclust 135              1       1    3.55e-91 5
#> SD:mclust 125              1       1   4.24e-106 6

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


SD:NMF**

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

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

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

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

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

collect_plots(res)

plot of chunk SD-NMF-collect-plots

The plots are:

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

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

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

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

select_partition_number(res)

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

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

get_stats(res)
#>   k 1-PAC mean_silhouette concordance area_increased  Rand Jaccard
#> 2 2 0.873           0.926       0.970         0.4076 0.595   0.595
#> 3 3 0.999           0.936       0.976         0.3960 0.721   0.573
#> 4 4 0.731           0.794       0.911         0.2515 0.784   0.532
#> 5 5 0.728           0.698       0.848         0.0839 0.800   0.427
#> 6 6 0.854           0.803       0.890         0.0573 0.879   0.543

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
#> GSM1009062     1  0.0000     0.9733 1.000 0.000
#> GSM1009076     2  0.3431     0.9155 0.064 0.936
#> GSM1009090     1  0.0000     0.9733 1.000 0.000
#> GSM1009104     2  0.0000     0.9528 0.000 1.000
#> GSM1009118     1  0.0000     0.9733 1.000 0.000
#> GSM1009132     1  0.0000     0.9733 1.000 0.000
#> GSM1009146     1  0.0000     0.9733 1.000 0.000
#> GSM1009160     2  0.0000     0.9528 0.000 1.000
#> GSM1009174     1  0.0672     0.9660 0.992 0.008
#> GSM1009188     1  0.0000     0.9733 1.000 0.000
#> GSM1009063     1  0.0000     0.9733 1.000 0.000
#> GSM1009077     2  0.6712     0.8071 0.176 0.824
#> GSM1009091     1  0.0000     0.9733 1.000 0.000
#> GSM1009105     2  0.0000     0.9528 0.000 1.000
#> GSM1009119     1  0.0000     0.9733 1.000 0.000
#> GSM1009133     1  0.0000     0.9733 1.000 0.000
#> GSM1009147     1  0.0000     0.9733 1.000 0.000
#> GSM1009161     2  0.0000     0.9528 0.000 1.000
#> GSM1009175     1  0.0000     0.9733 1.000 0.000
#> GSM1009189     1  0.0000     0.9733 1.000 0.000
#> GSM1009064     1  0.0000     0.9733 1.000 0.000
#> GSM1009078     1  0.0376     0.9698 0.996 0.004
#> GSM1009092     1  0.0000     0.9733 1.000 0.000
#> GSM1009106     2  0.0000     0.9528 0.000 1.000
#> GSM1009120     1  0.0000     0.9733 1.000 0.000
#> GSM1009134     1  0.0000     0.9733 1.000 0.000
#> GSM1009148     1  0.0000     0.9733 1.000 0.000
#> GSM1009162     2  0.0000     0.9528 0.000 1.000
#> GSM1009176     1  0.9963     0.0875 0.536 0.464
#> GSM1009190     1  0.0000     0.9733 1.000 0.000
#> GSM1009065     1  0.0000     0.9733 1.000 0.000
#> GSM1009079     2  0.5737     0.8544 0.136 0.864
#> GSM1009093     1  0.0000     0.9733 1.000 0.000
#> GSM1009107     2  0.0000     0.9528 0.000 1.000
#> GSM1009121     1  0.0000     0.9733 1.000 0.000
#> GSM1009135     1  0.0000     0.9733 1.000 0.000
#> GSM1009149     1  0.0000     0.9733 1.000 0.000
#> GSM1009163     2  0.0000     0.9528 0.000 1.000
#> GSM1009177     1  0.9815     0.2409 0.580 0.420
#> GSM1009191     1  0.0000     0.9733 1.000 0.000
#> GSM1009066     1  0.0000     0.9733 1.000 0.000
#> GSM1009080     2  0.4690     0.8890 0.100 0.900
#> GSM1009094     1  0.0000     0.9733 1.000 0.000
#> GSM1009108     2  0.0000     0.9528 0.000 1.000
#> GSM1009122     1  0.0376     0.9698 0.996 0.004
#> GSM1009136     1  0.0000     0.9733 1.000 0.000
#> GSM1009150     1  0.0000     0.9733 1.000 0.000
#> GSM1009164     2  0.0000     0.9528 0.000 1.000
#> GSM1009178     1  0.0000     0.9733 1.000 0.000
#> GSM1009192     1  0.0000     0.9733 1.000 0.000
#> GSM1009067     1  0.0000     0.9733 1.000 0.000
#> GSM1009081     2  0.6712     0.8071 0.176 0.824
#> GSM1009095     1  0.0000     0.9733 1.000 0.000
#> GSM1009109     2  0.0000     0.9528 0.000 1.000
#> GSM1009123     1  0.0000     0.9733 1.000 0.000
#> GSM1009137     1  0.0000     0.9733 1.000 0.000
#> GSM1009151     1  0.0000     0.9733 1.000 0.000
#> GSM1009165     2  0.0000     0.9528 0.000 1.000
#> GSM1009179     1  0.0000     0.9733 1.000 0.000
#> GSM1009193     1  0.0000     0.9733 1.000 0.000
#> GSM1009068     1  0.0000     0.9733 1.000 0.000
#> GSM1009082     2  0.8144     0.6919 0.252 0.748
#> GSM1009096     1  0.0000     0.9733 1.000 0.000
#> GSM1009110     2  0.0000     0.9528 0.000 1.000
#> GSM1009124     1  0.0000     0.9733 1.000 0.000
#> GSM1009138     1  0.0000     0.9733 1.000 0.000
#> GSM1009152     1  0.0000     0.9733 1.000 0.000
#> GSM1009166     2  0.0000     0.9528 0.000 1.000
#> GSM1009180     1  0.0000     0.9733 1.000 0.000
#> GSM1009194     1  0.0000     0.9733 1.000 0.000
#> GSM1009069     1  0.0000     0.9733 1.000 0.000
#> GSM1009083     1  0.9866     0.2024 0.568 0.432
#> GSM1009097     1  0.0000     0.9733 1.000 0.000
#> GSM1009111     2  0.0000     0.9528 0.000 1.000
#> GSM1009125     1  0.8081     0.6476 0.752 0.248
#> GSM1009139     1  0.0000     0.9733 1.000 0.000
#> GSM1009153     1  0.0000     0.9733 1.000 0.000
#> GSM1009167     2  0.0000     0.9528 0.000 1.000
#> GSM1009181     1  0.9815     0.2409 0.580 0.420
#> GSM1009195     1  0.0000     0.9733 1.000 0.000
#> GSM1009070     1  0.0000     0.9733 1.000 0.000
#> GSM1009084     2  0.4815     0.8856 0.104 0.896
#> GSM1009098     1  0.0000     0.9733 1.000 0.000
#> GSM1009112     2  0.0000     0.9528 0.000 1.000
#> GSM1009126     1  0.0000     0.9733 1.000 0.000
#> GSM1009140     1  0.0000     0.9733 1.000 0.000
#> GSM1009154     1  0.0000     0.9733 1.000 0.000
#> GSM1009168     2  0.0000     0.9528 0.000 1.000
#> GSM1009182     1  0.0000     0.9733 1.000 0.000
#> GSM1009196     1  0.0000     0.9733 1.000 0.000
#> GSM1009071     1  0.0000     0.9733 1.000 0.000
#> GSM1009085     2  0.4690     0.8890 0.100 0.900
#> GSM1009099     1  0.0000     0.9733 1.000 0.000
#> GSM1009113     2  0.0000     0.9528 0.000 1.000
#> GSM1009127     1  0.0000     0.9733 1.000 0.000
#> GSM1009141     1  0.0000     0.9733 1.000 0.000
#> GSM1009155     1  0.0000     0.9733 1.000 0.000
#> GSM1009169     2  0.0000     0.9528 0.000 1.000
#> GSM1009183     1  0.9087     0.4956 0.676 0.324
#> GSM1009197     1  0.0000     0.9733 1.000 0.000
#> GSM1009072     1  0.0000     0.9733 1.000 0.000
#> GSM1009086     2  0.2423     0.9308 0.040 0.960
#> GSM1009100     1  0.0000     0.9733 1.000 0.000
#> GSM1009114     2  0.0000     0.9528 0.000 1.000
#> GSM1009128     1  0.0000     0.9733 1.000 0.000
#> GSM1009142     1  0.0000     0.9733 1.000 0.000
#> GSM1009156     1  0.0000     0.9733 1.000 0.000
#> GSM1009170     2  0.0000     0.9528 0.000 1.000
#> GSM1009184     1  0.0000     0.9733 1.000 0.000
#> GSM1009198     1  0.0000     0.9733 1.000 0.000
#> GSM1009073     1  0.0000     0.9733 1.000 0.000
#> GSM1009087     1  0.0672     0.9660 0.992 0.008
#> GSM1009101     1  0.0000     0.9733 1.000 0.000
#> GSM1009115     2  0.0000     0.9528 0.000 1.000
#> GSM1009129     2  0.9866     0.2709 0.432 0.568
#> GSM1009143     1  0.0000     0.9733 1.000 0.000
#> GSM1009157     1  0.0000     0.9733 1.000 0.000
#> GSM1009171     2  0.0000     0.9528 0.000 1.000
#> GSM1009185     1  0.0000     0.9733 1.000 0.000
#> GSM1009199     1  0.0000     0.9733 1.000 0.000
#> GSM1009074     1  0.0000     0.9733 1.000 0.000
#> GSM1009088     1  0.5946     0.8123 0.856 0.144
#> GSM1009102     1  0.0000     0.9733 1.000 0.000
#> GSM1009116     2  0.0000     0.9528 0.000 1.000
#> GSM1009130     2  0.5629     0.8587 0.132 0.868
#> GSM1009144     1  0.0000     0.9733 1.000 0.000
#> GSM1009158     1  0.0000     0.9733 1.000 0.000
#> GSM1009172     2  0.0000     0.9528 0.000 1.000
#> GSM1009186     1  0.0000     0.9733 1.000 0.000
#> GSM1009200     1  0.0000     0.9733 1.000 0.000
#> GSM1009075     1  0.0000     0.9733 1.000 0.000
#> GSM1009089     1  0.0000     0.9733 1.000 0.000
#> GSM1009103     1  0.0000     0.9733 1.000 0.000
#> GSM1009117     2  0.0000     0.9528 0.000 1.000
#> GSM1009131     1  0.0000     0.9733 1.000 0.000
#> GSM1009145     1  0.0000     0.9733 1.000 0.000
#> GSM1009159     1  0.0000     0.9733 1.000 0.000
#> GSM1009173     2  0.0000     0.9528 0.000 1.000
#> GSM1009187     1  0.0000     0.9733 1.000 0.000
#> GSM1009201     1  0.0000     0.9733 1.000 0.000

show/hide code output

cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#>            class entropy silhouette    p1    p2    p3
#> GSM1009062     1  0.0424      0.967 0.992 0.008 0.000
#> GSM1009076     2  0.0000      0.961 0.000 1.000 0.000
#> GSM1009090     1  0.0000      0.972 1.000 0.000 0.000
#> GSM1009104     2  0.0237      0.960 0.000 0.996 0.004
#> GSM1009118     1  0.1289      0.945 0.968 0.032 0.000
#> GSM1009132     1  0.0000      0.972 1.000 0.000 0.000
#> GSM1009146     1  0.0000      0.972 1.000 0.000 0.000
#> GSM1009160     3  0.0000      1.000 0.000 0.000 1.000
#> GSM1009174     2  0.0000      0.961 0.000 1.000 0.000
#> GSM1009188     1  0.0000      0.972 1.000 0.000 0.000
#> GSM1009063     1  0.0892      0.958 0.980 0.020 0.000
#> GSM1009077     2  0.0000      0.961 0.000 1.000 0.000
#> GSM1009091     1  0.0000      0.972 1.000 0.000 0.000
#> GSM1009105     2  0.0237      0.960 0.000 0.996 0.004
#> GSM1009119     1  0.0000      0.972 1.000 0.000 0.000
#> GSM1009133     1  0.0000      0.972 1.000 0.000 0.000
#> GSM1009147     1  0.0000      0.972 1.000 0.000 0.000
#> GSM1009161     3  0.0000      1.000 0.000 0.000 1.000
#> GSM1009175     2  0.0000      0.961 0.000 1.000 0.000
#> GSM1009189     1  0.0000      0.972 1.000 0.000 0.000
#> GSM1009064     1  0.2448      0.901 0.924 0.076 0.000
#> GSM1009078     2  0.0000      0.961 0.000 1.000 0.000
#> GSM1009092     1  0.0000      0.972 1.000 0.000 0.000
#> GSM1009106     2  0.0237      0.960 0.000 0.996 0.004
#> GSM1009120     1  0.0000      0.972 1.000 0.000 0.000
#> GSM1009134     1  0.0000      0.972 1.000 0.000 0.000
#> GSM1009148     1  0.0237      0.970 0.996 0.004 0.000
#> GSM1009162     3  0.0000      1.000 0.000 0.000 1.000
#> GSM1009176     2  0.0000      0.961 0.000 1.000 0.000
#> GSM1009190     1  0.0000      0.972 1.000 0.000 0.000
#> GSM1009065     1  0.3941      0.802 0.844 0.156 0.000
#> GSM1009079     2  0.0000      0.961 0.000 1.000 0.000
#> GSM1009093     1  0.0000      0.972 1.000 0.000 0.000
#> GSM1009107     2  0.0237      0.960 0.000 0.996 0.004
#> GSM1009121     1  0.0000      0.972 1.000 0.000 0.000
#> GSM1009135     1  0.0000      0.972 1.000 0.000 0.000
#> GSM1009149     1  0.0000      0.972 1.000 0.000 0.000
#> GSM1009163     3  0.0000      1.000 0.000 0.000 1.000
#> GSM1009177     2  0.0000      0.961 0.000 1.000 0.000
#> GSM1009191     1  0.1529      0.939 0.960 0.040 0.000
#> GSM1009066     1  0.1289      0.947 0.968 0.032 0.000
#> GSM1009080     2  0.0000      0.961 0.000 1.000 0.000
#> GSM1009094     1  0.0000      0.972 1.000 0.000 0.000
#> GSM1009108     2  0.0237      0.960 0.000 0.996 0.004
#> GSM1009122     1  0.6252      0.208 0.556 0.444 0.000
#> GSM1009136     1  0.0000      0.972 1.000 0.000 0.000
#> GSM1009150     1  0.0000      0.972 1.000 0.000 0.000
#> GSM1009164     3  0.0000      1.000 0.000 0.000 1.000
#> GSM1009178     2  0.0237      0.958 0.004 0.996 0.000
#> GSM1009192     1  0.0000      0.972 1.000 0.000 0.000
#> GSM1009067     1  0.0424      0.967 0.992 0.008 0.000
#> GSM1009081     2  0.0000      0.961 0.000 1.000 0.000
#> GSM1009095     1  0.0000      0.972 1.000 0.000 0.000
#> GSM1009109     2  0.0237      0.960 0.000 0.996 0.004
#> GSM1009123     1  0.0000      0.972 1.000 0.000 0.000
#> GSM1009137     1  0.0000      0.972 1.000 0.000 0.000
#> GSM1009151     1  0.0237      0.970 0.996 0.004 0.000
#> GSM1009165     3  0.0000      1.000 0.000 0.000 1.000
#> GSM1009179     2  0.0237      0.958 0.004 0.996 0.000
#> GSM1009193     1  0.0000      0.972 1.000 0.000 0.000
#> GSM1009068     1  0.0237      0.970 0.996 0.004 0.000
#> GSM1009082     2  0.0000      0.961 0.000 1.000 0.000
#> GSM1009096     1  0.0000      0.972 1.000 0.000 0.000
#> GSM1009110     2  0.0237      0.960 0.000 0.996 0.004
#> GSM1009124     1  0.0000      0.972 1.000 0.000 0.000
#> GSM1009138     1  0.0000      0.972 1.000 0.000 0.000
#> GSM1009152     1  0.0000      0.972 1.000 0.000 0.000
#> GSM1009166     3  0.0000      1.000 0.000 0.000 1.000
#> GSM1009180     2  0.0237      0.958 0.004 0.996 0.000
#> GSM1009194     1  0.0000      0.972 1.000 0.000 0.000
#> GSM1009069     2  0.1753      0.906 0.048 0.952 0.000
#> GSM1009083     2  0.0000      0.961 0.000 1.000 0.000
#> GSM1009097     1  0.0000      0.972 1.000 0.000 0.000
#> GSM1009111     2  0.0237      0.960 0.000 0.996 0.004
#> GSM1009125     1  0.9532      0.152 0.488 0.244 0.268
#> GSM1009139     1  0.0000      0.972 1.000 0.000 0.000
#> GSM1009153     1  0.0237      0.970 0.996 0.004 0.000
#> GSM1009167     3  0.0000      1.000 0.000 0.000 1.000
#> GSM1009181     2  0.0000      0.961 0.000 1.000 0.000
#> GSM1009195     1  0.6168      0.306 0.588 0.412 0.000
#> GSM1009070     1  0.0424      0.967 0.992 0.008 0.000
#> GSM1009084     2  0.0000      0.961 0.000 1.000 0.000
#> GSM1009098     1  0.0000      0.972 1.000 0.000 0.000
#> GSM1009112     2  0.0237      0.960 0.000 0.996 0.004
#> GSM1009126     1  0.0000      0.972 1.000 0.000 0.000
#> GSM1009140     1  0.0000      0.972 1.000 0.000 0.000
#> GSM1009154     1  0.0000      0.972 1.000 0.000 0.000
#> GSM1009168     3  0.0000      1.000 0.000 0.000 1.000
#> GSM1009182     2  0.0000      0.961 0.000 1.000 0.000
#> GSM1009196     1  0.0000      0.972 1.000 0.000 0.000
#> GSM1009071     1  0.2356      0.906 0.928 0.072 0.000
#> GSM1009085     2  0.0000      0.961 0.000 1.000 0.000
#> GSM1009099     1  0.0000      0.972 1.000 0.000 0.000
#> GSM1009113     2  0.0237      0.960 0.000 0.996 0.004
#> GSM1009127     1  0.0000      0.972 1.000 0.000 0.000
#> GSM1009141     1  0.0000      0.972 1.000 0.000 0.000
#> GSM1009155     1  0.0424      0.967 0.992 0.008 0.000
#> GSM1009169     3  0.0000      1.000 0.000 0.000 1.000
#> GSM1009183     2  0.0000      0.961 0.000 1.000 0.000
#> GSM1009197     1  0.0000      0.972 1.000 0.000 0.000
#> GSM1009072     1  0.0592      0.964 0.988 0.012 0.000
#> GSM1009086     2  0.0000      0.961 0.000 1.000 0.000
#> GSM1009100     1  0.0000      0.972 1.000 0.000 0.000
#> GSM1009114     2  0.0747      0.950 0.000 0.984 0.016
#> GSM1009128     1  0.0747      0.960 0.984 0.000 0.016
#> GSM1009142     1  0.0000      0.972 1.000 0.000 0.000
#> GSM1009156     2  0.6308      0.024 0.492 0.508 0.000
#> GSM1009170     3  0.0000      1.000 0.000 0.000 1.000
#> GSM1009184     2  0.0000      0.961 0.000 1.000 0.000
#> GSM1009198     1  0.0000      0.972 1.000 0.000 0.000
#> GSM1009073     1  0.1031      0.954 0.976 0.024 0.000
#> GSM1009087     2  0.0000      0.961 0.000 1.000 0.000
#> GSM1009101     1  0.0000      0.972 1.000 0.000 0.000
#> GSM1009115     2  0.0592      0.954 0.000 0.988 0.012
#> GSM1009129     2  0.1129      0.941 0.020 0.976 0.004
#> GSM1009143     1  0.0000      0.972 1.000 0.000 0.000
#> GSM1009157     2  0.6260      0.165 0.448 0.552 0.000
#> GSM1009171     3  0.0000      1.000 0.000 0.000 1.000
#> GSM1009185     2  0.0237      0.958 0.004 0.996 0.000
#> GSM1009199     1  0.2165      0.914 0.936 0.064 0.000
#> GSM1009074     1  0.0592      0.964 0.988 0.012 0.000
#> GSM1009088     2  0.0000      0.961 0.000 1.000 0.000
#> GSM1009102     1  0.0000      0.972 1.000 0.000 0.000
#> GSM1009116     2  0.0237      0.960 0.000 0.996 0.004
#> GSM1009130     2  0.0237      0.960 0.000 0.996 0.004
#> GSM1009144     1  0.0000      0.972 1.000 0.000 0.000
#> GSM1009158     1  0.0000      0.972 1.000 0.000 0.000
#> GSM1009172     3  0.0000      1.000 0.000 0.000 1.000
#> GSM1009186     2  0.0000      0.961 0.000 1.000 0.000
#> GSM1009200     1  0.0000      0.972 1.000 0.000 0.000
#> GSM1009075     1  0.0424      0.967 0.992 0.008 0.000
#> GSM1009089     2  0.0237      0.958 0.004 0.996 0.000
#> GSM1009103     1  0.0000      0.972 1.000 0.000 0.000
#> GSM1009117     2  0.0237      0.960 0.000 0.996 0.004
#> GSM1009131     2  0.4235      0.721 0.176 0.824 0.000
#> GSM1009145     1  0.0000      0.972 1.000 0.000 0.000
#> GSM1009159     1  0.0000      0.972 1.000 0.000 0.000
#> GSM1009173     3  0.0000      1.000 0.000 0.000 1.000
#> GSM1009187     2  0.1163      0.932 0.028 0.972 0.000
#> GSM1009201     1  0.0000      0.972 1.000 0.000 0.000

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>            class entropy silhouette    p1    p2    p3    p4
#> GSM1009062     1  0.1118     0.8749 0.964 0.000 0.000 0.036
#> GSM1009076     2  0.0000     0.8688 0.000 1.000 0.000 0.000
#> GSM1009090     4  0.0000     0.8665 0.000 0.000 0.000 1.000
#> GSM1009104     2  0.0000     0.8688 0.000 1.000 0.000 0.000
#> GSM1009118     4  0.3881     0.7423 0.172 0.016 0.000 0.812
#> GSM1009132     4  0.0000     0.8665 0.000 0.000 0.000 1.000
#> GSM1009146     1  0.0000     0.8903 1.000 0.000 0.000 0.000
#> GSM1009160     3  0.0000     1.0000 0.000 0.000 1.000 0.000
#> GSM1009174     2  0.4382     0.6704 0.296 0.704 0.000 0.000
#> GSM1009188     4  0.4697     0.4780 0.356 0.000 0.000 0.644
#> GSM1009063     1  0.0336     0.8899 0.992 0.000 0.000 0.008
#> GSM1009077     2  0.0188     0.8684 0.004 0.996 0.000 0.000
#> GSM1009091     4  0.0000     0.8665 0.000 0.000 0.000 1.000
#> GSM1009105     2  0.0000     0.8688 0.000 1.000 0.000 0.000
#> GSM1009119     4  0.4406     0.5811 0.300 0.000 0.000 0.700
#> GSM1009133     4  0.0000     0.8665 0.000 0.000 0.000 1.000
#> GSM1009147     1  0.0000     0.8903 1.000 0.000 0.000 0.000
#> GSM1009161     3  0.0000     1.0000 0.000 0.000 1.000 0.000
#> GSM1009175     2  0.4103     0.7237 0.256 0.744 0.000 0.000
#> GSM1009189     4  0.4977     0.2081 0.460 0.000 0.000 0.540
#> GSM1009064     1  0.0469     0.8892 0.988 0.000 0.000 0.012
#> GSM1009078     1  0.4941     0.1892 0.564 0.436 0.000 0.000
#> GSM1009092     4  0.0188     0.8644 0.004 0.000 0.000 0.996
#> GSM1009106     2  0.0000     0.8688 0.000 1.000 0.000 0.000
#> GSM1009120     1  0.4843     0.2800 0.604 0.000 0.000 0.396
#> GSM1009134     4  0.0000     0.8665 0.000 0.000 0.000 1.000
#> GSM1009148     1  0.0000     0.8903 1.000 0.000 0.000 0.000
#> GSM1009162     3  0.0000     1.0000 0.000 0.000 1.000 0.000
#> GSM1009176     2  0.2814     0.8333 0.132 0.868 0.000 0.000
#> GSM1009190     1  0.4996    -0.0411 0.516 0.000 0.000 0.484
#> GSM1009065     1  0.0336     0.8899 0.992 0.000 0.000 0.008
#> GSM1009079     2  0.0000     0.8688 0.000 1.000 0.000 0.000
#> GSM1009093     4  0.0000     0.8665 0.000 0.000 0.000 1.000
#> GSM1009107     2  0.0000     0.8688 0.000 1.000 0.000 0.000
#> GSM1009121     4  0.2281     0.8129 0.096 0.000 0.000 0.904
#> GSM1009135     4  0.0000     0.8665 0.000 0.000 0.000 1.000
#> GSM1009149     1  0.2589     0.8078 0.884 0.000 0.000 0.116
#> GSM1009163     3  0.0000     1.0000 0.000 0.000 1.000 0.000
#> GSM1009177     2  0.2814     0.8335 0.132 0.868 0.000 0.000
#> GSM1009191     1  0.2216     0.8325 0.908 0.000 0.000 0.092
#> GSM1009066     1  0.0707     0.8856 0.980 0.000 0.000 0.020
#> GSM1009080     2  0.0000     0.8688 0.000 1.000 0.000 0.000
#> GSM1009094     4  0.0000     0.8665 0.000 0.000 0.000 1.000
#> GSM1009108     2  0.0000     0.8688 0.000 1.000 0.000 0.000
#> GSM1009122     4  0.7497    -0.0331 0.180 0.396 0.000 0.424
#> GSM1009136     4  0.0000     0.8665 0.000 0.000 0.000 1.000
#> GSM1009150     1  0.0707     0.8843 0.980 0.000 0.000 0.020
#> GSM1009164     3  0.0000     1.0000 0.000 0.000 1.000 0.000
#> GSM1009178     2  0.4543     0.6261 0.324 0.676 0.000 0.000
#> GSM1009192     1  0.2216     0.8321 0.908 0.000 0.000 0.092
#> GSM1009067     1  0.0592     0.8875 0.984 0.000 0.000 0.016
#> GSM1009081     2  0.0000     0.8688 0.000 1.000 0.000 0.000
#> GSM1009095     4  0.0000     0.8665 0.000 0.000 0.000 1.000
#> GSM1009109     2  0.0000     0.8688 0.000 1.000 0.000 0.000
#> GSM1009123     4  0.3123     0.7666 0.156 0.000 0.000 0.844
#> GSM1009137     4  0.0000     0.8665 0.000 0.000 0.000 1.000
#> GSM1009151     1  0.0000     0.8903 1.000 0.000 0.000 0.000
#> GSM1009165     3  0.0000     1.0000 0.000 0.000 1.000 0.000
#> GSM1009179     2  0.4564     0.6187 0.328 0.672 0.000 0.000
#> GSM1009193     4  0.4999     0.0935 0.492 0.000 0.000 0.508
#> GSM1009068     1  0.1302     0.8685 0.956 0.000 0.000 0.044
#> GSM1009082     2  0.1474     0.8574 0.052 0.948 0.000 0.000
#> GSM1009096     4  0.0000     0.8665 0.000 0.000 0.000 1.000
#> GSM1009110     2  0.0000     0.8688 0.000 1.000 0.000 0.000
#> GSM1009124     4  0.4008     0.6648 0.244 0.000 0.000 0.756
#> GSM1009138     4  0.0000     0.8665 0.000 0.000 0.000 1.000
#> GSM1009152     1  0.0000     0.8903 1.000 0.000 0.000 0.000
#> GSM1009166     3  0.0000     1.0000 0.000 0.000 1.000 0.000
#> GSM1009180     2  0.4304     0.6887 0.284 0.716 0.000 0.000
#> GSM1009194     1  0.0000     0.8903 1.000 0.000 0.000 0.000
#> GSM1009069     1  0.0927     0.8826 0.976 0.016 0.000 0.008
#> GSM1009083     2  0.2216     0.8333 0.092 0.908 0.000 0.000
#> GSM1009097     4  0.0000     0.8665 0.000 0.000 0.000 1.000
#> GSM1009111     2  0.0000     0.8688 0.000 1.000 0.000 0.000
#> GSM1009125     4  0.4540     0.5719 0.004 0.248 0.008 0.740
#> GSM1009139     4  0.0000     0.8665 0.000 0.000 0.000 1.000
#> GSM1009153     1  0.0000     0.8903 1.000 0.000 0.000 0.000
#> GSM1009167     3  0.0000     1.0000 0.000 0.000 1.000 0.000
#> GSM1009181     2  0.2530     0.8405 0.112 0.888 0.000 0.000
#> GSM1009195     1  0.0000     0.8903 1.000 0.000 0.000 0.000
#> GSM1009070     1  0.0469     0.8892 0.988 0.000 0.000 0.012
#> GSM1009084     2  0.0188     0.8684 0.004 0.996 0.000 0.000
#> GSM1009098     4  0.0000     0.8665 0.000 0.000 0.000 1.000
#> GSM1009112     2  0.0000     0.8688 0.000 1.000 0.000 0.000
#> GSM1009126     4  0.3528     0.7290 0.192 0.000 0.000 0.808
#> GSM1009140     4  0.0000     0.8665 0.000 0.000 0.000 1.000
#> GSM1009154     1  0.0000     0.8903 1.000 0.000 0.000 0.000
#> GSM1009168     3  0.0000     1.0000 0.000 0.000 1.000 0.000
#> GSM1009182     2  0.4277     0.6932 0.280 0.720 0.000 0.000
#> GSM1009196     1  0.0000     0.8903 1.000 0.000 0.000 0.000
#> GSM1009071     1  0.0469     0.8892 0.988 0.000 0.000 0.012
#> GSM1009085     2  0.0592     0.8649 0.016 0.984 0.000 0.000
#> GSM1009099     4  0.0188     0.8644 0.004 0.000 0.000 0.996
#> GSM1009113     2  0.0000     0.8688 0.000 1.000 0.000 0.000
#> GSM1009127     4  0.4605     0.5211 0.336 0.000 0.000 0.664
#> GSM1009141     4  0.0000     0.8665 0.000 0.000 0.000 1.000
#> GSM1009155     1  0.0000     0.8903 1.000 0.000 0.000 0.000
#> GSM1009169     3  0.0000     1.0000 0.000 0.000 1.000 0.000
#> GSM1009183     2  0.2760     0.8346 0.128 0.872 0.000 0.000
#> GSM1009197     1  0.4713     0.3816 0.640 0.000 0.000 0.360
#> GSM1009072     1  0.1302     0.8685 0.956 0.000 0.000 0.044
#> GSM1009086     2  0.0000     0.8688 0.000 1.000 0.000 0.000
#> GSM1009100     4  0.0000     0.8665 0.000 0.000 0.000 1.000
#> GSM1009114     2  0.0000     0.8688 0.000 1.000 0.000 0.000
#> GSM1009128     4  0.0921     0.8531 0.028 0.000 0.000 0.972
#> GSM1009142     4  0.0000     0.8665 0.000 0.000 0.000 1.000
#> GSM1009156     1  0.0000     0.8903 1.000 0.000 0.000 0.000
#> GSM1009170     3  0.0000     1.0000 0.000 0.000 1.000 0.000
#> GSM1009184     2  0.4713     0.5548 0.360 0.640 0.000 0.000
#> GSM1009198     4  0.4790     0.4256 0.380 0.000 0.000 0.620
#> GSM1009073     1  0.0469     0.8892 0.988 0.000 0.000 0.012
#> GSM1009087     1  0.4713     0.4041 0.640 0.360 0.000 0.000
#> GSM1009101     4  0.0000     0.8665 0.000 0.000 0.000 1.000
#> GSM1009115     2  0.0000     0.8688 0.000 1.000 0.000 0.000
#> GSM1009129     2  0.3400     0.7954 0.180 0.820 0.000 0.000
#> GSM1009143     4  0.0000     0.8665 0.000 0.000 0.000 1.000
#> GSM1009157     1  0.0000     0.8903 1.000 0.000 0.000 0.000
#> GSM1009171     3  0.0000     1.0000 0.000 0.000 1.000 0.000
#> GSM1009185     2  0.4134     0.7202 0.260 0.740 0.000 0.000
#> GSM1009199     1  0.1022     0.8785 0.968 0.000 0.000 0.032
#> GSM1009074     1  0.0336     0.8899 0.992 0.000 0.000 0.008
#> GSM1009088     1  0.4907     0.2610 0.580 0.420 0.000 0.000
#> GSM1009102     4  0.0000     0.8665 0.000 0.000 0.000 1.000
#> GSM1009116     2  0.0000     0.8688 0.000 1.000 0.000 0.000
#> GSM1009130     2  0.3311     0.8019 0.172 0.828 0.000 0.000
#> GSM1009144     4  0.0000     0.8665 0.000 0.000 0.000 1.000
#> GSM1009158     1  0.0000     0.8903 1.000 0.000 0.000 0.000
#> GSM1009172     3  0.0000     1.0000 0.000 0.000 1.000 0.000
#> GSM1009186     2  0.4697     0.5632 0.356 0.644 0.000 0.000
#> GSM1009200     4  0.4941     0.2808 0.436 0.000 0.000 0.564
#> GSM1009075     1  0.0707     0.8855 0.980 0.000 0.000 0.020
#> GSM1009089     1  0.0817     0.8794 0.976 0.024 0.000 0.000
#> GSM1009103     4  0.0000     0.8665 0.000 0.000 0.000 1.000
#> GSM1009117     2  0.0000     0.8688 0.000 1.000 0.000 0.000
#> GSM1009131     2  0.5494     0.7103 0.208 0.716 0.000 0.076
#> GSM1009145     4  0.0000     0.8665 0.000 0.000 0.000 1.000
#> GSM1009159     1  0.2704     0.7989 0.876 0.000 0.000 0.124
#> GSM1009173     3  0.0000     1.0000 0.000 0.000 1.000 0.000
#> GSM1009187     1  0.4948     0.0440 0.560 0.440 0.000 0.000
#> GSM1009201     1  0.4134     0.6007 0.740 0.000 0.000 0.260

show/hide code output

cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#>            class entropy silhouette    p1    p2 p3    p4    p5
#> GSM1009062     1  0.0000     0.8210 1.000 0.000  0 0.000 0.000
#> GSM1009076     5  0.2378     0.8852 0.048 0.048  0 0.000 0.904
#> GSM1009090     4  0.0290     0.9204 0.000 0.008  0 0.992 0.000
#> GSM1009104     5  0.0162     0.9018 0.000 0.004  0 0.000 0.996
#> GSM1009118     2  0.6497     0.2414 0.040 0.460  0 0.424 0.076
#> GSM1009132     4  0.0290     0.9217 0.008 0.000  0 0.992 0.000
#> GSM1009146     2  0.4300     0.2758 0.476 0.524  0 0.000 0.000
#> GSM1009160     3  0.0000     1.0000 0.000 0.000  1 0.000 0.000
#> GSM1009174     2  0.2286     0.5667 0.004 0.888  0 0.000 0.108
#> GSM1009188     2  0.5355     0.5429 0.084 0.624  0 0.292 0.000
#> GSM1009063     1  0.0000     0.8210 1.000 0.000  0 0.000 0.000
#> GSM1009077     5  0.2863     0.8753 0.060 0.064  0 0.000 0.876
#> GSM1009091     4  0.0510     0.9186 0.000 0.016  0 0.984 0.000
#> GSM1009105     5  0.0162     0.9018 0.000 0.004  0 0.000 0.996
#> GSM1009119     2  0.6154     0.4706 0.144 0.508  0 0.348 0.000
#> GSM1009133     4  0.0290     0.9217 0.008 0.000  0 0.992 0.000
#> GSM1009147     2  0.3521     0.5614 0.232 0.764  0 0.004 0.000
#> GSM1009161     3  0.0000     1.0000 0.000 0.000  1 0.000 0.000
#> GSM1009175     2  0.1831     0.5895 0.004 0.920  0 0.000 0.076
#> GSM1009189     2  0.5472     0.5723 0.156 0.656  0 0.188 0.000
#> GSM1009064     1  0.0000     0.8210 1.000 0.000  0 0.000 0.000
#> GSM1009078     5  0.4130     0.6825 0.292 0.012  0 0.000 0.696
#> GSM1009092     4  0.0880     0.9082 0.000 0.032  0 0.968 0.000
#> GSM1009106     5  0.0162     0.9018 0.000 0.004  0 0.000 0.996
#> GSM1009120     2  0.5922     0.3885 0.388 0.504  0 0.108 0.000
#> GSM1009134     4  0.0290     0.9217 0.008 0.000  0 0.992 0.000
#> GSM1009148     2  0.4304     0.2594 0.484 0.516  0 0.000 0.000
#> GSM1009162     3  0.0000     1.0000 0.000 0.000  1 0.000 0.000
#> GSM1009176     2  0.3550     0.4369 0.004 0.760  0 0.000 0.236
#> GSM1009190     2  0.4322     0.6086 0.088 0.768  0 0.144 0.000
#> GSM1009065     1  0.0000     0.8210 1.000 0.000  0 0.000 0.000
#> GSM1009079     5  0.3039     0.8130 0.012 0.152  0 0.000 0.836
#> GSM1009093     4  0.0794     0.9111 0.000 0.028  0 0.972 0.000
#> GSM1009107     5  0.0162     0.9018 0.000 0.004  0 0.000 0.996
#> GSM1009121     4  0.4262     0.0189 0.000 0.440  0 0.560 0.000
#> GSM1009135     4  0.0290     0.9217 0.008 0.000  0 0.992 0.000
#> GSM1009149     2  0.4740     0.2942 0.468 0.516  0 0.016 0.000
#> GSM1009163     3  0.0000     1.0000 0.000 0.000  1 0.000 0.000
#> GSM1009177     2  0.3521     0.4433 0.004 0.764  0 0.000 0.232
#> GSM1009191     2  0.2006     0.6209 0.072 0.916  0 0.012 0.000
#> GSM1009066     1  0.0000     0.8210 1.000 0.000  0 0.000 0.000
#> GSM1009080     5  0.2964     0.8439 0.024 0.120  0 0.000 0.856
#> GSM1009094     4  0.0510     0.9186 0.000 0.016  0 0.984 0.000
#> GSM1009108     5  0.0162     0.9018 0.000 0.004  0 0.000 0.996
#> GSM1009122     2  0.6763     0.3593 0.016 0.504  0 0.284 0.196
#> GSM1009136     4  0.0290     0.9217 0.008 0.000  0 0.992 0.000
#> GSM1009150     2  0.4559     0.2722 0.480 0.512  0 0.008 0.000
#> GSM1009164     3  0.0000     1.0000 0.000 0.000  1 0.000 0.000
#> GSM1009178     2  0.0566     0.6114 0.004 0.984  0 0.000 0.012
#> GSM1009192     2  0.4793     0.3488 0.436 0.544  0 0.020 0.000
#> GSM1009067     1  0.0000     0.8210 1.000 0.000  0 0.000 0.000
#> GSM1009081     5  0.1750     0.8916 0.028 0.036  0 0.000 0.936
#> GSM1009095     4  0.0162     0.9211 0.000 0.004  0 0.996 0.000
#> GSM1009109     5  0.0162     0.9018 0.000 0.004  0 0.000 0.996
#> GSM1009123     4  0.4907    -0.2139 0.024 0.484  0 0.492 0.000
#> GSM1009137     4  0.0290     0.9217 0.008 0.000  0 0.992 0.000
#> GSM1009151     1  0.4306    -0.2580 0.508 0.492  0 0.000 0.000
#> GSM1009165     3  0.0000     1.0000 0.000 0.000  1 0.000 0.000
#> GSM1009179     2  0.0771     0.6096 0.004 0.976  0 0.000 0.020
#> GSM1009193     2  0.6279     0.4730 0.280 0.528  0 0.192 0.000
#> GSM1009068     1  0.0162     0.8177 0.996 0.000  0 0.004 0.000
#> GSM1009082     5  0.3064     0.8635 0.108 0.036  0 0.000 0.856
#> GSM1009096     4  0.0510     0.9186 0.000 0.016  0 0.984 0.000
#> GSM1009110     5  0.0162     0.9018 0.000 0.004  0 0.000 0.996
#> GSM1009124     2  0.5111     0.3795 0.040 0.552  0 0.408 0.000
#> GSM1009138     4  0.0290     0.9217 0.008 0.000  0 0.992 0.000
#> GSM1009152     1  0.4300    -0.2181 0.524 0.476  0 0.000 0.000
#> GSM1009166     3  0.0000     1.0000 0.000 0.000  1 0.000 0.000
#> GSM1009180     2  0.0671     0.6115 0.004 0.980  0 0.000 0.016
#> GSM1009194     2  0.4397     0.3564 0.432 0.564  0 0.004 0.000
#> GSM1009069     1  0.0162     0.8174 0.996 0.004  0 0.000 0.000
#> GSM1009083     5  0.3513     0.8114 0.180 0.020  0 0.000 0.800
#> GSM1009097     4  0.0880     0.9082 0.000 0.032  0 0.968 0.000
#> GSM1009111     5  0.0162     0.9018 0.000 0.004  0 0.000 0.996
#> GSM1009125     4  0.5752     0.4760 0.000 0.208  0 0.620 0.172
#> GSM1009139     4  0.0290     0.9217 0.008 0.000  0 0.992 0.000
#> GSM1009153     1  0.4300    -0.2175 0.524 0.476  0 0.000 0.000
#> GSM1009167     3  0.0000     1.0000 0.000 0.000  1 0.000 0.000
#> GSM1009181     2  0.3579     0.4296 0.004 0.756  0 0.000 0.240
#> GSM1009195     2  0.2338     0.6129 0.112 0.884  0 0.000 0.004
#> GSM1009070     1  0.0000     0.8210 1.000 0.000  0 0.000 0.000
#> GSM1009084     5  0.2046     0.8851 0.068 0.016  0 0.000 0.916
#> GSM1009098     4  0.0510     0.9186 0.000 0.016  0 0.984 0.000
#> GSM1009112     5  0.0162     0.9018 0.000 0.004  0 0.000 0.996
#> GSM1009126     2  0.4744     0.2248 0.016 0.508  0 0.476 0.000
#> GSM1009140     4  0.0290     0.9217 0.008 0.000  0 0.992 0.000
#> GSM1009154     2  0.4451     0.2444 0.492 0.504  0 0.004 0.000
#> GSM1009168     3  0.0000     1.0000 0.000 0.000  1 0.000 0.000
#> GSM1009182     2  0.1638     0.5953 0.004 0.932  0 0.000 0.064
#> GSM1009196     2  0.4118     0.4774 0.336 0.660  0 0.004 0.000
#> GSM1009071     1  0.0000     0.8210 1.000 0.000  0 0.000 0.000
#> GSM1009085     5  0.2351     0.8770 0.088 0.016  0 0.000 0.896
#> GSM1009099     4  0.0880     0.9082 0.000 0.032  0 0.968 0.000
#> GSM1009113     5  0.0162     0.9018 0.000 0.004  0 0.000 0.996
#> GSM1009127     2  0.6372     0.4613 0.184 0.492  0 0.324 0.000
#> GSM1009141     4  0.0290     0.9217 0.008 0.000  0 0.992 0.000
#> GSM1009155     1  0.4262    -0.1296 0.560 0.440  0 0.000 0.000
#> GSM1009169     3  0.0000     1.0000 0.000 0.000  1 0.000 0.000
#> GSM1009183     2  0.2970     0.5225 0.004 0.828  0 0.000 0.168
#> GSM1009197     2  0.5683     0.4944 0.304 0.588  0 0.108 0.000
#> GSM1009072     1  0.0162     0.8177 0.996 0.000  0 0.004 0.000
#> GSM1009086     5  0.1661     0.8935 0.036 0.024  0 0.000 0.940
#> GSM1009100     4  0.0510     0.9186 0.000 0.016  0 0.984 0.000
#> GSM1009114     5  0.0162     0.9018 0.000 0.004  0 0.000 0.996
#> GSM1009128     4  0.4015     0.3363 0.000 0.348  0 0.652 0.000
#> GSM1009142     4  0.0290     0.9217 0.008 0.000  0 0.992 0.000
#> GSM1009156     2  0.2074     0.6085 0.104 0.896  0 0.000 0.000
#> GSM1009170     3  0.0000     1.0000 0.000 0.000  1 0.000 0.000
#> GSM1009184     2  0.1894     0.5889 0.008 0.920  0 0.000 0.072
#> GSM1009198     2  0.4878     0.5649 0.060 0.676  0 0.264 0.000
#> GSM1009073     1  0.0000     0.8210 1.000 0.000  0 0.000 0.000
#> GSM1009087     5  0.4090     0.7105 0.268 0.016  0 0.000 0.716
#> GSM1009101     4  0.0510     0.9186 0.000 0.016  0 0.984 0.000
#> GSM1009115     5  0.0162     0.9018 0.000 0.004  0 0.000 0.996
#> GSM1009129     5  0.4323     0.6228 0.028 0.240  0 0.004 0.728
#> GSM1009143     4  0.0290     0.9217 0.008 0.000  0 0.992 0.000
#> GSM1009157     2  0.4294     0.2820 0.468 0.532  0 0.000 0.000
#> GSM1009171     3  0.0000     1.0000 0.000 0.000  1 0.000 0.000
#> GSM1009185     2  0.0566     0.6114 0.004 0.984  0 0.000 0.012
#> GSM1009199     2  0.1638     0.6199 0.064 0.932  0 0.004 0.000
#> GSM1009074     1  0.0000     0.8210 1.000 0.000  0 0.000 0.000
#> GSM1009088     5  0.4065     0.7151 0.264 0.016  0 0.000 0.720
#> GSM1009102     4  0.0162     0.9211 0.000 0.004  0 0.996 0.000
#> GSM1009116     5  0.0162     0.9018 0.000 0.004  0 0.000 0.996
#> GSM1009130     5  0.2694     0.8427 0.032 0.076  0 0.004 0.888
#> GSM1009144     4  0.0290     0.9217 0.008 0.000  0 0.992 0.000
#> GSM1009158     2  0.4305     0.2508 0.488 0.512  0 0.000 0.000
#> GSM1009172     3  0.0000     1.0000 0.000 0.000  1 0.000 0.000
#> GSM1009186     2  0.2017     0.5841 0.008 0.912  0 0.000 0.080
#> GSM1009200     2  0.4763     0.5878 0.076 0.712  0 0.212 0.000
#> GSM1009075     1  0.0000     0.8210 1.000 0.000  0 0.000 0.000
#> GSM1009089     1  0.4514     0.5803 0.740 0.072  0 0.000 0.188
#> GSM1009103     4  0.0324     0.9215 0.004 0.004  0 0.992 0.000
#> GSM1009117     5  0.0162     0.9018 0.000 0.004  0 0.000 0.996
#> GSM1009131     5  0.5858     0.2529 0.060 0.340  0 0.024 0.576
#> GSM1009145     4  0.0290     0.9217 0.008 0.000  0 0.992 0.000
#> GSM1009159     2  0.4740     0.2925 0.468 0.516  0 0.016 0.000
#> GSM1009173     3  0.0000     1.0000 0.000 0.000  1 0.000 0.000
#> GSM1009187     2  0.0290     0.6124 0.008 0.992  0 0.000 0.000
#> GSM1009201     2  0.5773     0.4369 0.356 0.544  0 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
#> GSM1009062     6  0.0363     0.9236 0.012 0.000  0 0.000 0.000 0.988
#> GSM1009076     5  0.5911     0.2774 0.048 0.388  0 0.000 0.488 0.076
#> GSM1009090     4  0.0964     0.9738 0.012 0.016  0 0.968 0.004 0.000
#> GSM1009104     5  0.0000     0.8246 0.000 0.000  0 0.000 1.000 0.000
#> GSM1009118     1  0.5409     0.4919 0.584 0.284  0 0.124 0.000 0.008
#> GSM1009132     4  0.0000     0.9764 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009146     1  0.1501     0.8430 0.924 0.000  0 0.000 0.000 0.076
#> GSM1009160     3  0.0000     1.0000 0.000 0.000  1 0.000 0.000 0.000
#> GSM1009174     2  0.1556     0.8533 0.080 0.920  0 0.000 0.000 0.000
#> GSM1009188     1  0.1265     0.8451 0.948 0.008  0 0.044 0.000 0.000
#> GSM1009063     6  0.0363     0.9236 0.012 0.000  0 0.000 0.000 0.988
#> GSM1009077     2  0.6238    -0.1569 0.048 0.448  0 0.000 0.392 0.112
#> GSM1009091     4  0.1464     0.9641 0.036 0.016  0 0.944 0.004 0.000
#> GSM1009105     5  0.0000     0.8246 0.000 0.000  0 0.000 1.000 0.000
#> GSM1009119     1  0.1923     0.8346 0.916 0.016  0 0.064 0.000 0.004
#> GSM1009133     4  0.0000     0.9764 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009147     1  0.1461     0.8426 0.940 0.044  0 0.000 0.000 0.016
#> GSM1009161     3  0.0000     1.0000 0.000 0.000  1 0.000 0.000 0.000
#> GSM1009175     2  0.1556     0.8533 0.080 0.920  0 0.000 0.000 0.000
#> GSM1009189     1  0.1245     0.8464 0.952 0.016  0 0.032 0.000 0.000
#> GSM1009064     6  0.0363     0.9236 0.012 0.000  0 0.000 0.000 0.988
#> GSM1009078     5  0.5959     0.3925 0.056 0.076  0 0.000 0.512 0.356
#> GSM1009092     4  0.2501     0.8905 0.108 0.016  0 0.872 0.004 0.000
#> GSM1009106     5  0.0000     0.8246 0.000 0.000  0 0.000 1.000 0.000
#> GSM1009120     1  0.1959     0.8484 0.924 0.020  0 0.032 0.000 0.024
#> GSM1009134     4  0.0000     0.9764 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009148     1  0.1910     0.8307 0.892 0.000  0 0.000 0.000 0.108
#> GSM1009162     3  0.0000     1.0000 0.000 0.000  1 0.000 0.000 0.000
#> GSM1009176     2  0.1779     0.8449 0.064 0.920  0 0.000 0.016 0.000
#> GSM1009190     1  0.0870     0.8484 0.972 0.012  0 0.012 0.000 0.004
#> GSM1009065     6  0.0363     0.9236 0.012 0.000  0 0.000 0.000 0.988
#> GSM1009079     2  0.3863     0.5985 0.048 0.776  0 0.000 0.164 0.012
#> GSM1009093     4  0.1464     0.9642 0.036 0.016  0 0.944 0.004 0.000
#> GSM1009107     5  0.0000     0.8246 0.000 0.000  0 0.000 1.000 0.000
#> GSM1009121     1  0.3569     0.7553 0.792 0.036  0 0.164 0.000 0.008
#> GSM1009135     4  0.0000     0.9764 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009149     1  0.1141     0.8483 0.948 0.000  0 0.000 0.000 0.052
#> GSM1009163     3  0.0000     1.0000 0.000 0.000  1 0.000 0.000 0.000
#> GSM1009177     2  0.1745     0.8480 0.068 0.920  0 0.000 0.012 0.000
#> GSM1009191     1  0.0692     0.8454 0.976 0.020  0 0.000 0.000 0.004
#> GSM1009066     6  0.0363     0.9236 0.012 0.000  0 0.000 0.000 0.988
#> GSM1009080     2  0.4323     0.5566 0.048 0.744  0 0.000 0.180 0.028
#> GSM1009094     4  0.1313     0.9687 0.028 0.016  0 0.952 0.004 0.000
#> GSM1009108     5  0.0146     0.8222 0.000 0.004  0 0.000 0.996 0.000
#> GSM1009122     1  0.4905     0.1278 0.492 0.460  0 0.036 0.000 0.012
#> GSM1009136     4  0.0000     0.9764 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009150     1  0.1387     0.8459 0.932 0.000  0 0.000 0.000 0.068
#> GSM1009164     3  0.0000     1.0000 0.000 0.000  1 0.000 0.000 0.000
#> GSM1009178     2  0.1610     0.8517 0.084 0.916  0 0.000 0.000 0.000
#> GSM1009192     1  0.1296     0.8509 0.952 0.004  0 0.012 0.000 0.032
#> GSM1009067     6  0.0363     0.9236 0.012 0.000  0 0.000 0.000 0.988
#> GSM1009081     2  0.5289    -0.1557 0.048 0.472  0 0.000 0.456 0.024
#> GSM1009095     4  0.1059     0.9730 0.016 0.016  0 0.964 0.004 0.000
#> GSM1009109     5  0.0000     0.8246 0.000 0.000  0 0.000 1.000 0.000
#> GSM1009123     1  0.2313     0.8141 0.884 0.012  0 0.100 0.000 0.004
#> GSM1009137     4  0.0000     0.9764 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009151     1  0.2883     0.7566 0.788 0.000  0 0.000 0.000 0.212
#> GSM1009165     3  0.0000     1.0000 0.000 0.000  1 0.000 0.000 0.000
#> GSM1009179     2  0.1556     0.8533 0.080 0.920  0 0.000 0.000 0.000
#> GSM1009193     1  0.1391     0.8485 0.944 0.000  0 0.040 0.000 0.016
#> GSM1009068     6  0.0363     0.9236 0.012 0.000  0 0.000 0.000 0.988
#> GSM1009082     5  0.6704     0.2699 0.048 0.348  0 0.000 0.404 0.200
#> GSM1009096     4  0.1390     0.9665 0.032 0.016  0 0.948 0.004 0.000
#> GSM1009110     5  0.0000     0.8246 0.000 0.000  0 0.000 1.000 0.000
#> GSM1009124     1  0.2822     0.8180 0.868 0.056  0 0.068 0.000 0.008
#> GSM1009138     4  0.0000     0.9764 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009152     1  0.3175     0.7129 0.744 0.000  0 0.000 0.000 0.256
#> GSM1009166     3  0.0000     1.0000 0.000 0.000  1 0.000 0.000 0.000
#> GSM1009180     2  0.1610     0.8517 0.084 0.916  0 0.000 0.000 0.000
#> GSM1009194     1  0.3023     0.8046 0.828 0.032  0 0.000 0.000 0.140
#> GSM1009069     6  0.0363     0.9236 0.012 0.000  0 0.000 0.000 0.988
#> GSM1009083     6  0.6881    -0.2321 0.048 0.276  0 0.000 0.316 0.360
#> GSM1009097     4  0.1738     0.9517 0.052 0.016  0 0.928 0.004 0.000
#> GSM1009111     5  0.0000     0.8246 0.000 0.000  0 0.000 1.000 0.000
#> GSM1009125     2  0.6004     0.0453 0.340 0.416  0 0.244 0.000 0.000
#> GSM1009139     4  0.0000     0.9764 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009153     1  0.3330     0.6778 0.716 0.000  0 0.000 0.000 0.284
#> GSM1009167     3  0.0000     1.0000 0.000 0.000  1 0.000 0.000 0.000
#> GSM1009181     2  0.1829     0.8378 0.056 0.920  0 0.000 0.024 0.000
#> GSM1009195     1  0.3053     0.7253 0.812 0.168  0 0.000 0.000 0.020
#> GSM1009070     6  0.0363     0.9236 0.012 0.000  0 0.000 0.000 0.988
#> GSM1009084     5  0.4788     0.6990 0.048 0.124  0 0.000 0.732 0.096
#> GSM1009098     4  0.1059     0.9730 0.016 0.016  0 0.964 0.004 0.000
#> GSM1009112     5  0.0000     0.8246 0.000 0.000  0 0.000 1.000 0.000
#> GSM1009126     1  0.4329     0.7102 0.728 0.088  0 0.180 0.000 0.004
#> GSM1009140     4  0.0000     0.9764 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009154     1  0.1714     0.8390 0.908 0.000  0 0.000 0.000 0.092
#> GSM1009168     3  0.0000     1.0000 0.000 0.000  1 0.000 0.000 0.000
#> GSM1009182     2  0.1556     0.8533 0.080 0.920  0 0.000 0.000 0.000
#> GSM1009196     1  0.1265     0.8490 0.948 0.008  0 0.000 0.000 0.044
#> GSM1009071     6  0.0363     0.9236 0.012 0.000  0 0.000 0.000 0.988
#> GSM1009085     5  0.4920     0.6965 0.048 0.108  0 0.000 0.720 0.124
#> GSM1009099     4  0.1863     0.9442 0.060 0.016  0 0.920 0.004 0.000
#> GSM1009113     5  0.0000     0.8246 0.000 0.000  0 0.000 1.000 0.000
#> GSM1009127     1  0.2402     0.8254 0.896 0.032  0 0.060 0.000 0.012
#> GSM1009141     4  0.0000     0.9764 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009155     1  0.3774     0.4659 0.592 0.000  0 0.000 0.000 0.408
#> GSM1009169     3  0.0000     1.0000 0.000 0.000  1 0.000 0.000 0.000
#> GSM1009183     2  0.1701     0.8502 0.072 0.920  0 0.000 0.008 0.000
#> GSM1009197     1  0.1434     0.8502 0.948 0.008  0 0.024 0.000 0.020
#> GSM1009072     6  0.0508     0.9190 0.012 0.000  0 0.004 0.000 0.984
#> GSM1009086     5  0.4852     0.5460 0.048 0.276  0 0.000 0.652 0.024
#> GSM1009100     4  0.1148     0.9720 0.020 0.016  0 0.960 0.004 0.000
#> GSM1009114     5  0.0000     0.8246 0.000 0.000  0 0.000 1.000 0.000
#> GSM1009128     1  0.2592     0.8010 0.864 0.016  0 0.116 0.000 0.004
#> GSM1009142     4  0.0000     0.9764 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009156     1  0.1563     0.8381 0.932 0.056  0 0.000 0.000 0.012
#> GSM1009170     3  0.0000     1.0000 0.000 0.000  1 0.000 0.000 0.000
#> GSM1009184     2  0.1556     0.8533 0.080 0.920  0 0.000 0.000 0.000
#> GSM1009198     1  0.1367     0.8444 0.944 0.012  0 0.044 0.000 0.000
#> GSM1009073     6  0.0363     0.9236 0.012 0.000  0 0.000 0.000 0.988
#> GSM1009087     5  0.5887     0.4754 0.056 0.080  0 0.000 0.552 0.312
#> GSM1009101     4  0.1232     0.9706 0.024 0.016  0 0.956 0.004 0.000
#> GSM1009115     5  0.0000     0.8246 0.000 0.000  0 0.000 1.000 0.000
#> GSM1009129     1  0.6608    -0.1456 0.380 0.240  0 0.012 0.356 0.012
#> GSM1009143     4  0.0000     0.9764 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009157     1  0.3738     0.6738 0.704 0.016  0 0.000 0.000 0.280
#> GSM1009171     3  0.0000     1.0000 0.000 0.000  1 0.000 0.000 0.000
#> GSM1009185     2  0.1610     0.8517 0.084 0.916  0 0.000 0.000 0.000
#> GSM1009199     1  0.2994     0.6928 0.788 0.208  0 0.000 0.000 0.004
#> GSM1009074     6  0.0363     0.9236 0.012 0.000  0 0.000 0.000 0.988
#> GSM1009088     5  0.5997     0.4294 0.056 0.084  0 0.000 0.524 0.336
#> GSM1009102     4  0.0964     0.9735 0.012 0.016  0 0.968 0.004 0.000
#> GSM1009116     5  0.0000     0.8246 0.000 0.000  0 0.000 1.000 0.000
#> GSM1009130     5  0.5212     0.4071 0.340 0.064  0 0.004 0.580 0.012
#> GSM1009144     4  0.0000     0.9764 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009158     1  0.1501     0.8437 0.924 0.000  0 0.000 0.000 0.076
#> GSM1009172     3  0.0000     1.0000 0.000 0.000  1 0.000 0.000 0.000
#> GSM1009186     2  0.1556     0.8533 0.080 0.920  0 0.000 0.000 0.000
#> GSM1009200     1  0.1225     0.8471 0.952 0.012  0 0.036 0.000 0.000
#> GSM1009075     6  0.0363     0.9236 0.012 0.000  0 0.000 0.000 0.988
#> GSM1009089     6  0.6432     0.3420 0.228 0.072  0 0.000 0.160 0.540
#> GSM1009103     4  0.0964     0.9735 0.012 0.016  0 0.968 0.004 0.000
#> GSM1009117     5  0.0000     0.8246 0.000 0.000  0 0.000 1.000 0.000
#> GSM1009131     1  0.5235     0.4371 0.620 0.064  0 0.012 0.292 0.012
#> GSM1009145     4  0.0000     0.9764 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009159     1  0.1267     0.8478 0.940 0.000  0 0.000 0.000 0.060
#> GSM1009173     3  0.0000     1.0000 0.000 0.000  1 0.000 0.000 0.000
#> GSM1009187     2  0.1610     0.8517 0.084 0.916  0 0.000 0.000 0.000
#> GSM1009201     1  0.0976     0.8491 0.968 0.008  0 0.016 0.000 0.008

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

consensus_heatmap(res, k = 2)

plot of chunk tab-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 temperature(p) time(p) specimen(p) k
#> SD:NMF 134          0.977   0.991    9.54e-21 2
#> SD:NMF 135          0.989   1.000    8.02e-44 3
#> SD:NMF 127          1.000   1.000    6.42e-60 4
#> SD:NMF 107          1.000   1.000    1.48e-66 5
#> SD:NMF 124          1.000   1.000    1.71e-98 6

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


CV:hclust**

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

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

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

res
#> A 'ConsensusPartition' object with k = 2, 3, 4, 5, 6.
#>   On a matrix with 51941 rows and 140 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 1.000           0.990       0.994         0.1899 0.819   0.819
#> 3 3 0.504           0.713       0.860         1.8790 0.609   0.523
#> 4 4 0.471           0.556       0.727         0.1964 0.759   0.520
#> 5 5 0.711           0.784       0.839         0.1656 0.758   0.389
#> 6 6 0.811           0.866       0.896         0.0437 0.980   0.906

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

suggest_best_k(res)
#> [1] 2

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

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

show/hide code output

cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#>            class entropy silhouette    p1    p2
#> GSM1009062     1   0.000      0.994 1.000 0.000
#> GSM1009076     1   0.000      0.994 1.000 0.000
#> GSM1009090     1   0.000      0.994 1.000 0.000
#> GSM1009104     1   0.311      0.947 0.944 0.056
#> GSM1009118     1   0.000      0.994 1.000 0.000
#> GSM1009132     1   0.000      0.994 1.000 0.000
#> GSM1009146     1   0.000      0.994 1.000 0.000
#> GSM1009160     2   0.000      1.000 0.000 1.000
#> GSM1009174     1   0.000      0.994 1.000 0.000
#> GSM1009188     1   0.000      0.994 1.000 0.000
#> GSM1009063     1   0.000      0.994 1.000 0.000
#> GSM1009077     1   0.000      0.994 1.000 0.000
#> GSM1009091     1   0.000      0.994 1.000 0.000
#> GSM1009105     1   0.311      0.947 0.944 0.056
#> GSM1009119     1   0.000      0.994 1.000 0.000
#> GSM1009133     1   0.000      0.994 1.000 0.000
#> GSM1009147     1   0.000      0.994 1.000 0.000
#> GSM1009161     2   0.000      1.000 0.000 1.000
#> GSM1009175     1   0.000      0.994 1.000 0.000
#> GSM1009189     1   0.000      0.994 1.000 0.000
#> GSM1009064     1   0.000      0.994 1.000 0.000
#> GSM1009078     1   0.000      0.994 1.000 0.000
#> GSM1009092     1   0.000      0.994 1.000 0.000
#> GSM1009106     1   0.311      0.947 0.944 0.056
#> GSM1009120     1   0.000      0.994 1.000 0.000
#> GSM1009134     1   0.000      0.994 1.000 0.000
#> GSM1009148     1   0.000      0.994 1.000 0.000
#> GSM1009162     2   0.000      1.000 0.000 1.000
#> GSM1009176     1   0.000      0.994 1.000 0.000
#> GSM1009190     1   0.000      0.994 1.000 0.000
#> GSM1009065     1   0.000      0.994 1.000 0.000
#> GSM1009079     1   0.000      0.994 1.000 0.000
#> GSM1009093     1   0.000      0.994 1.000 0.000
#> GSM1009107     1   0.311      0.947 0.944 0.056
#> GSM1009121     1   0.000      0.994 1.000 0.000
#> GSM1009135     1   0.000      0.994 1.000 0.000
#> GSM1009149     1   0.000      0.994 1.000 0.000
#> GSM1009163     2   0.000      1.000 0.000 1.000
#> GSM1009177     1   0.000      0.994 1.000 0.000
#> GSM1009191     1   0.000      0.994 1.000 0.000
#> GSM1009066     1   0.000      0.994 1.000 0.000
#> GSM1009080     1   0.000      0.994 1.000 0.000
#> GSM1009094     1   0.000      0.994 1.000 0.000
#> GSM1009108     1   0.311      0.947 0.944 0.056
#> GSM1009122     1   0.000      0.994 1.000 0.000
#> GSM1009136     1   0.000      0.994 1.000 0.000
#> GSM1009150     1   0.000      0.994 1.000 0.000
#> GSM1009164     2   0.000      1.000 0.000 1.000
#> GSM1009178     1   0.000      0.994 1.000 0.000
#> GSM1009192     1   0.000      0.994 1.000 0.000
#> GSM1009067     1   0.000      0.994 1.000 0.000
#> GSM1009081     1   0.000      0.994 1.000 0.000
#> GSM1009095     1   0.000      0.994 1.000 0.000
#> GSM1009109     1   0.311      0.947 0.944 0.056
#> GSM1009123     1   0.000      0.994 1.000 0.000
#> GSM1009137     1   0.000      0.994 1.000 0.000
#> GSM1009151     1   0.000      0.994 1.000 0.000
#> GSM1009165     2   0.000      1.000 0.000 1.000
#> GSM1009179     1   0.000      0.994 1.000 0.000
#> GSM1009193     1   0.000      0.994 1.000 0.000
#> GSM1009068     1   0.000      0.994 1.000 0.000
#> GSM1009082     1   0.000      0.994 1.000 0.000
#> GSM1009096     1   0.000      0.994 1.000 0.000
#> GSM1009110     1   0.311      0.947 0.944 0.056
#> GSM1009124     1   0.000      0.994 1.000 0.000
#> GSM1009138     1   0.000      0.994 1.000 0.000
#> GSM1009152     1   0.000      0.994 1.000 0.000
#> GSM1009166     2   0.000      1.000 0.000 1.000
#> GSM1009180     1   0.000      0.994 1.000 0.000
#> GSM1009194     1   0.000      0.994 1.000 0.000
#> GSM1009069     1   0.000      0.994 1.000 0.000
#> GSM1009083     1   0.000      0.994 1.000 0.000
#> GSM1009097     1   0.000      0.994 1.000 0.000
#> GSM1009111     1   0.311      0.947 0.944 0.056
#> GSM1009125     1   0.000      0.994 1.000 0.000
#> GSM1009139     1   0.000      0.994 1.000 0.000
#> GSM1009153     1   0.000      0.994 1.000 0.000
#> GSM1009167     2   0.000      1.000 0.000 1.000
#> GSM1009181     1   0.000      0.994 1.000 0.000
#> GSM1009195     1   0.000      0.994 1.000 0.000
#> GSM1009070     1   0.000      0.994 1.000 0.000
#> GSM1009084     1   0.000      0.994 1.000 0.000
#> GSM1009098     1   0.000      0.994 1.000 0.000
#> GSM1009112     1   0.311      0.947 0.944 0.056
#> GSM1009126     1   0.000      0.994 1.000 0.000
#> GSM1009140     1   0.000      0.994 1.000 0.000
#> GSM1009154     1   0.000      0.994 1.000 0.000
#> GSM1009168     2   0.000      1.000 0.000 1.000
#> GSM1009182     1   0.000      0.994 1.000 0.000
#> GSM1009196     1   0.000      0.994 1.000 0.000
#> GSM1009071     1   0.000      0.994 1.000 0.000
#> GSM1009085     1   0.000      0.994 1.000 0.000
#> GSM1009099     1   0.000      0.994 1.000 0.000
#> GSM1009113     1   0.311      0.947 0.944 0.056
#> GSM1009127     1   0.000      0.994 1.000 0.000
#> GSM1009141     1   0.000      0.994 1.000 0.000
#> GSM1009155     1   0.000      0.994 1.000 0.000
#> GSM1009169     2   0.000      1.000 0.000 1.000
#> GSM1009183     1   0.000      0.994 1.000 0.000
#> GSM1009197     1   0.000      0.994 1.000 0.000
#> GSM1009072     1   0.000      0.994 1.000 0.000
#> GSM1009086     1   0.000      0.994 1.000 0.000
#> GSM1009100     1   0.000      0.994 1.000 0.000
#> GSM1009114     1   0.311      0.947 0.944 0.056
#> GSM1009128     1   0.000      0.994 1.000 0.000
#> GSM1009142     1   0.000      0.994 1.000 0.000
#> GSM1009156     1   0.000      0.994 1.000 0.000
#> GSM1009170     2   0.000      1.000 0.000 1.000
#> GSM1009184     1   0.000      0.994 1.000 0.000
#> GSM1009198     1   0.000      0.994 1.000 0.000
#> GSM1009073     1   0.000      0.994 1.000 0.000
#> GSM1009087     1   0.000      0.994 1.000 0.000
#> GSM1009101     1   0.000      0.994 1.000 0.000
#> GSM1009115     1   0.311      0.947 0.944 0.056
#> GSM1009129     1   0.000      0.994 1.000 0.000
#> GSM1009143     1   0.000      0.994 1.000 0.000
#> GSM1009157     1   0.000      0.994 1.000 0.000
#> GSM1009171     2   0.000      1.000 0.000 1.000
#> GSM1009185     1   0.000      0.994 1.000 0.000
#> GSM1009199     1   0.000      0.994 1.000 0.000
#> GSM1009074     1   0.000      0.994 1.000 0.000
#> GSM1009088     1   0.000      0.994 1.000 0.000
#> GSM1009102     1   0.000      0.994 1.000 0.000
#> GSM1009116     1   0.311      0.947 0.944 0.056
#> GSM1009130     1   0.000      0.994 1.000 0.000
#> GSM1009144     1   0.000      0.994 1.000 0.000
#> GSM1009158     1   0.000      0.994 1.000 0.000
#> GSM1009172     2   0.000      1.000 0.000 1.000
#> GSM1009186     1   0.000      0.994 1.000 0.000
#> GSM1009200     1   0.000      0.994 1.000 0.000
#> GSM1009075     1   0.000      0.994 1.000 0.000
#> GSM1009089     1   0.000      0.994 1.000 0.000
#> GSM1009103     1   0.000      0.994 1.000 0.000
#> GSM1009117     1   0.311      0.947 0.944 0.056
#> GSM1009131     1   0.000      0.994 1.000 0.000
#> GSM1009145     1   0.000      0.994 1.000 0.000
#> GSM1009159     1   0.000      0.994 1.000 0.000
#> GSM1009173     2   0.000      1.000 0.000 1.000
#> GSM1009187     1   0.000      0.994 1.000 0.000
#> GSM1009201     1   0.000      0.994 1.000 0.000

show/hide code output

cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#>            class entropy silhouette    p1    p2    p3
#> GSM1009062     1  0.6062      0.521 0.616 0.384 0.000
#> GSM1009076     2  0.1163      0.768 0.028 0.972 0.000
#> GSM1009090     1  0.0000      0.820 1.000 0.000 0.000
#> GSM1009104     2  0.1964      0.741 0.000 0.944 0.056
#> GSM1009118     2  0.6286      0.294 0.464 0.536 0.000
#> GSM1009132     1  0.0000      0.820 1.000 0.000 0.000
#> GSM1009146     1  0.0237      0.820 0.996 0.004 0.000
#> GSM1009160     3  0.0000      1.000 0.000 0.000 1.000
#> GSM1009174     2  0.5529      0.660 0.296 0.704 0.000
#> GSM1009188     1  0.4399      0.722 0.812 0.188 0.000
#> GSM1009063     1  0.6062      0.521 0.616 0.384 0.000
#> GSM1009077     2  0.1163      0.768 0.028 0.972 0.000
#> GSM1009091     1  0.0000      0.820 1.000 0.000 0.000
#> GSM1009105     2  0.1964      0.741 0.000 0.944 0.056
#> GSM1009119     1  0.6168      0.217 0.588 0.412 0.000
#> GSM1009133     1  0.0000      0.820 1.000 0.000 0.000
#> GSM1009147     1  0.0237      0.820 0.996 0.004 0.000
#> GSM1009161     3  0.0000      1.000 0.000 0.000 1.000
#> GSM1009175     2  0.5529      0.660 0.296 0.704 0.000
#> GSM1009189     1  0.4399      0.722 0.812 0.188 0.000
#> GSM1009064     1  0.6062      0.521 0.616 0.384 0.000
#> GSM1009078     2  0.1163      0.768 0.028 0.972 0.000
#> GSM1009092     1  0.0000      0.820 1.000 0.000 0.000
#> GSM1009106     2  0.1964      0.741 0.000 0.944 0.056
#> GSM1009120     1  0.6168      0.217 0.588 0.412 0.000
#> GSM1009134     1  0.0000      0.820 1.000 0.000 0.000
#> GSM1009148     1  0.0237      0.820 0.996 0.004 0.000
#> GSM1009162     3  0.0000      1.000 0.000 0.000 1.000
#> GSM1009176     2  0.5529      0.660 0.296 0.704 0.000
#> GSM1009190     1  0.4399      0.722 0.812 0.188 0.000
#> GSM1009065     1  0.6062      0.521 0.616 0.384 0.000
#> GSM1009079     2  0.1163      0.768 0.028 0.972 0.000
#> GSM1009093     1  0.0000      0.820 1.000 0.000 0.000
#> GSM1009107     2  0.1964      0.741 0.000 0.944 0.056
#> GSM1009121     2  0.6286      0.294 0.464 0.536 0.000
#> GSM1009135     1  0.0000      0.820 1.000 0.000 0.000
#> GSM1009149     1  0.0237      0.820 0.996 0.004 0.000
#> GSM1009163     3  0.0000      1.000 0.000 0.000 1.000
#> GSM1009177     2  0.5529      0.660 0.296 0.704 0.000
#> GSM1009191     1  0.4399      0.722 0.812 0.188 0.000
#> GSM1009066     1  0.6062      0.521 0.616 0.384 0.000
#> GSM1009080     2  0.1163      0.768 0.028 0.972 0.000
#> GSM1009094     1  0.0000      0.820 1.000 0.000 0.000
#> GSM1009108     2  0.1964      0.741 0.000 0.944 0.056
#> GSM1009122     2  0.6286      0.294 0.464 0.536 0.000
#> GSM1009136     1  0.0000      0.820 1.000 0.000 0.000
#> GSM1009150     1  0.0237      0.820 0.996 0.004 0.000
#> GSM1009164     3  0.0000      1.000 0.000 0.000 1.000
#> GSM1009178     2  0.5529      0.660 0.296 0.704 0.000
#> GSM1009192     1  0.4399      0.722 0.812 0.188 0.000
#> GSM1009067     1  0.6062      0.521 0.616 0.384 0.000
#> GSM1009081     2  0.1163      0.768 0.028 0.972 0.000
#> GSM1009095     1  0.0000      0.820 1.000 0.000 0.000
#> GSM1009109     2  0.1964      0.741 0.000 0.944 0.056
#> GSM1009123     1  0.6168      0.217 0.588 0.412 0.000
#> GSM1009137     1  0.0000      0.820 1.000 0.000 0.000
#> GSM1009151     1  0.0237      0.820 0.996 0.004 0.000
#> GSM1009165     3  0.0000      1.000 0.000 0.000 1.000
#> GSM1009179     2  0.5529      0.660 0.296 0.704 0.000
#> GSM1009193     1  0.4399      0.722 0.812 0.188 0.000
#> GSM1009068     1  0.6062      0.521 0.616 0.384 0.000
#> GSM1009082     2  0.1163      0.768 0.028 0.972 0.000
#> GSM1009096     1  0.0000      0.820 1.000 0.000 0.000
#> GSM1009110     2  0.1964      0.741 0.000 0.944 0.056
#> GSM1009124     1  0.6168      0.217 0.588 0.412 0.000
#> GSM1009138     1  0.0000      0.820 1.000 0.000 0.000
#> GSM1009152     1  0.0237      0.820 0.996 0.004 0.000
#> GSM1009166     3  0.0000      1.000 0.000 0.000 1.000
#> GSM1009180     2  0.5529      0.660 0.296 0.704 0.000
#> GSM1009194     1  0.4399      0.722 0.812 0.188 0.000
#> GSM1009069     1  0.6062      0.521 0.616 0.384 0.000
#> GSM1009083     2  0.1163      0.768 0.028 0.972 0.000
#> GSM1009097     1  0.0000      0.820 1.000 0.000 0.000
#> GSM1009111     2  0.1964      0.741 0.000 0.944 0.056
#> GSM1009125     2  0.6286      0.294 0.464 0.536 0.000
#> GSM1009139     1  0.0000      0.820 1.000 0.000 0.000
#> GSM1009153     1  0.0237      0.820 0.996 0.004 0.000
#> GSM1009167     3  0.0000      1.000 0.000 0.000 1.000
#> GSM1009181     2  0.5529      0.660 0.296 0.704 0.000
#> GSM1009195     1  0.4399      0.722 0.812 0.188 0.000
#> GSM1009070     1  0.6062      0.521 0.616 0.384 0.000
#> GSM1009084     2  0.1163      0.768 0.028 0.972 0.000
#> GSM1009098     1  0.0000      0.820 1.000 0.000 0.000
#> GSM1009112     2  0.1964      0.741 0.000 0.944 0.056
#> GSM1009126     1  0.6168      0.217 0.588 0.412 0.000
#> GSM1009140     1  0.0000      0.820 1.000 0.000 0.000
#> GSM1009154     1  0.0237      0.820 0.996 0.004 0.000
#> GSM1009168     3  0.0000      1.000 0.000 0.000 1.000
#> GSM1009182     2  0.5529      0.660 0.296 0.704 0.000
#> GSM1009196     1  0.4399      0.722 0.812 0.188 0.000
#> GSM1009071     1  0.6062      0.521 0.616 0.384 0.000
#> GSM1009085     2  0.1163      0.768 0.028 0.972 0.000
#> GSM1009099     1  0.0000      0.820 1.000 0.000 0.000
#> GSM1009113     2  0.1964      0.741 0.000 0.944 0.056
#> GSM1009127     1  0.6168      0.217 0.588 0.412 0.000
#> GSM1009141     1  0.0000      0.820 1.000 0.000 0.000
#> GSM1009155     1  0.0592      0.818 0.988 0.012 0.000
#> GSM1009169     3  0.0000      1.000 0.000 0.000 1.000
#> GSM1009183     2  0.5529      0.660 0.296 0.704 0.000
#> GSM1009197     1  0.4399      0.722 0.812 0.188 0.000
#> GSM1009072     1  0.6062      0.521 0.616 0.384 0.000
#> GSM1009086     2  0.1163      0.768 0.028 0.972 0.000
#> GSM1009100     1  0.0000      0.820 1.000 0.000 0.000
#> GSM1009114     2  0.1964      0.741 0.000 0.944 0.056
#> GSM1009128     2  0.6286      0.294 0.464 0.536 0.000
#> GSM1009142     1  0.0000      0.820 1.000 0.000 0.000
#> GSM1009156     1  0.0592      0.818 0.988 0.012 0.000
#> GSM1009170     3  0.0000      1.000 0.000 0.000 1.000
#> GSM1009184     2  0.5529      0.660 0.296 0.704 0.000
#> GSM1009198     1  0.4399      0.722 0.812 0.188 0.000
#> GSM1009073     1  0.6062      0.521 0.616 0.384 0.000
#> GSM1009087     2  0.1163      0.768 0.028 0.972 0.000
#> GSM1009101     1  0.0000      0.820 1.000 0.000 0.000
#> GSM1009115     2  0.1964      0.741 0.000 0.944 0.056
#> GSM1009129     2  0.6286      0.294 0.464 0.536 0.000
#> GSM1009143     1  0.0000      0.820 1.000 0.000 0.000
#> GSM1009157     1  0.0592      0.818 0.988 0.012 0.000
#> GSM1009171     3  0.0000      1.000 0.000 0.000 1.000
#> GSM1009185     2  0.5529      0.660 0.296 0.704 0.000
#> GSM1009199     1  0.4399      0.722 0.812 0.188 0.000
#> GSM1009074     1  0.6062      0.521 0.616 0.384 0.000
#> GSM1009088     2  0.1163      0.768 0.028 0.972 0.000
#> GSM1009102     1  0.0000      0.820 1.000 0.000 0.000
#> GSM1009116     2  0.1964      0.741 0.000 0.944 0.056
#> GSM1009130     2  0.6286      0.294 0.464 0.536 0.000
#> GSM1009144     1  0.0000      0.820 1.000 0.000 0.000
#> GSM1009158     1  0.0237      0.820 0.996 0.004 0.000
#> GSM1009172     3  0.0000      1.000 0.000 0.000 1.000
#> GSM1009186     2  0.5529      0.660 0.296 0.704 0.000
#> GSM1009200     1  0.4399      0.722 0.812 0.188 0.000
#> GSM1009075     1  0.6062      0.521 0.616 0.384 0.000
#> GSM1009089     2  0.1163      0.768 0.028 0.972 0.000
#> GSM1009103     1  0.0000      0.820 1.000 0.000 0.000
#> GSM1009117     2  0.1964      0.741 0.000 0.944 0.056
#> GSM1009131     2  0.6286      0.294 0.464 0.536 0.000
#> GSM1009145     1  0.0000      0.820 1.000 0.000 0.000
#> GSM1009159     1  0.0237      0.820 0.996 0.004 0.000
#> GSM1009173     3  0.0000      1.000 0.000 0.000 1.000
#> GSM1009187     2  0.5529      0.660 0.296 0.704 0.000
#> GSM1009201     1  0.4399      0.722 0.812 0.188 0.000

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>            class entropy silhouette    p1    p2 p3    p4
#> GSM1009062     1   0.485     -0.113 0.600 0.000  0 0.400
#> GSM1009076     1   0.498      0.011 0.540 0.460  0 0.000
#> GSM1009090     4   0.000      0.779 0.000 0.000  0 1.000
#> GSM1009104     2   0.000      1.000 0.000 1.000  0 0.000
#> GSM1009118     1   0.625      0.432 0.592 0.072  0 0.336
#> GSM1009132     4   0.000      0.779 0.000 0.000  0 1.000
#> GSM1009146     4   0.380      0.740 0.220 0.000  0 0.780
#> GSM1009160     3   0.000      1.000 0.000 0.000  1 0.000
#> GSM1009174     1   0.705      0.461 0.572 0.232  0 0.196
#> GSM1009188     4   0.503      0.553 0.400 0.004  0 0.596
#> GSM1009063     1   0.485     -0.113 0.600 0.000  0 0.400
#> GSM1009077     1   0.498      0.011 0.540 0.460  0 0.000
#> GSM1009091     4   0.000      0.779 0.000 0.000  0 1.000
#> GSM1009105     2   0.000      1.000 0.000 1.000  0 0.000
#> GSM1009119     1   0.584      0.251 0.524 0.032  0 0.444
#> GSM1009133     4   0.000      0.779 0.000 0.000  0 1.000
#> GSM1009147     4   0.380      0.740 0.220 0.000  0 0.780
#> GSM1009161     3   0.000      1.000 0.000 0.000  1 0.000
#> GSM1009175     1   0.705      0.461 0.572 0.232  0 0.196
#> GSM1009189     4   0.503      0.553 0.400 0.004  0 0.596
#> GSM1009064     1   0.485     -0.113 0.600 0.000  0 0.400
#> GSM1009078     1   0.498      0.011 0.540 0.460  0 0.000
#> GSM1009092     4   0.000      0.779 0.000 0.000  0 1.000
#> GSM1009106     2   0.000      1.000 0.000 1.000  0 0.000
#> GSM1009120     1   0.584      0.251 0.524 0.032  0 0.444
#> GSM1009134     4   0.000      0.779 0.000 0.000  0 1.000
#> GSM1009148     4   0.380      0.740 0.220 0.000  0 0.780
#> GSM1009162     3   0.000      1.000 0.000 0.000  1 0.000
#> GSM1009176     1   0.705      0.461 0.572 0.232  0 0.196
#> GSM1009190     4   0.503      0.553 0.400 0.004  0 0.596
#> GSM1009065     1   0.485     -0.113 0.600 0.000  0 0.400
#> GSM1009079     1   0.498      0.011 0.540 0.460  0 0.000
#> GSM1009093     4   0.000      0.779 0.000 0.000  0 1.000
#> GSM1009107     2   0.000      1.000 0.000 1.000  0 0.000
#> GSM1009121     1   0.625      0.432 0.592 0.072  0 0.336
#> GSM1009135     4   0.000      0.779 0.000 0.000  0 1.000
#> GSM1009149     4   0.380      0.740 0.220 0.000  0 0.780
#> GSM1009163     3   0.000      1.000 0.000 0.000  1 0.000
#> GSM1009177     1   0.705      0.461 0.572 0.232  0 0.196
#> GSM1009191     4   0.503      0.553 0.400 0.004  0 0.596
#> GSM1009066     1   0.485     -0.113 0.600 0.000  0 0.400
#> GSM1009080     1   0.498      0.011 0.540 0.460  0 0.000
#> GSM1009094     4   0.000      0.779 0.000 0.000  0 1.000
#> GSM1009108     2   0.000      1.000 0.000 1.000  0 0.000
#> GSM1009122     1   0.625      0.432 0.592 0.072  0 0.336
#> GSM1009136     4   0.000      0.779 0.000 0.000  0 1.000
#> GSM1009150     4   0.380      0.740 0.220 0.000  0 0.780
#> GSM1009164     3   0.000      1.000 0.000 0.000  1 0.000
#> GSM1009178     1   0.705      0.461 0.572 0.232  0 0.196
#> GSM1009192     4   0.503      0.553 0.400 0.004  0 0.596
#> GSM1009067     1   0.485     -0.113 0.600 0.000  0 0.400
#> GSM1009081     1   0.498      0.011 0.540 0.460  0 0.000
#> GSM1009095     4   0.000      0.779 0.000 0.000  0 1.000
#> GSM1009109     2   0.000      1.000 0.000 1.000  0 0.000
#> GSM1009123     1   0.584      0.251 0.524 0.032  0 0.444
#> GSM1009137     4   0.000      0.779 0.000 0.000  0 1.000
#> GSM1009151     4   0.380      0.740 0.220 0.000  0 0.780
#> GSM1009165     3   0.000      1.000 0.000 0.000  1 0.000
#> GSM1009179     1   0.705      0.461 0.572 0.232  0 0.196
#> GSM1009193     4   0.503      0.553 0.400 0.004  0 0.596
#> GSM1009068     1   0.485     -0.113 0.600 0.000  0 0.400
#> GSM1009082     1   0.498      0.011 0.540 0.460  0 0.000
#> GSM1009096     4   0.000      0.779 0.000 0.000  0 1.000
#> GSM1009110     2   0.000      1.000 0.000 1.000  0 0.000
#> GSM1009124     1   0.584      0.251 0.524 0.032  0 0.444
#> GSM1009138     4   0.000      0.779 0.000 0.000  0 1.000
#> GSM1009152     4   0.380      0.740 0.220 0.000  0 0.780
#> GSM1009166     3   0.000      1.000 0.000 0.000  1 0.000
#> GSM1009180     1   0.705      0.461 0.572 0.232  0 0.196
#> GSM1009194     4   0.503      0.553 0.400 0.004  0 0.596
#> GSM1009069     1   0.485     -0.113 0.600 0.000  0 0.400
#> GSM1009083     1   0.498      0.011 0.540 0.460  0 0.000
#> GSM1009097     4   0.000      0.779 0.000 0.000  0 1.000
#> GSM1009111     2   0.000      1.000 0.000 1.000  0 0.000
#> GSM1009125     1   0.625      0.432 0.592 0.072  0 0.336
#> GSM1009139     4   0.000      0.779 0.000 0.000  0 1.000
#> GSM1009153     4   0.380      0.740 0.220 0.000  0 0.780
#> GSM1009167     3   0.000      1.000 0.000 0.000  1 0.000
#> GSM1009181     1   0.705      0.461 0.572 0.232  0 0.196
#> GSM1009195     4   0.503      0.553 0.400 0.004  0 0.596
#> GSM1009070     1   0.485     -0.113 0.600 0.000  0 0.400
#> GSM1009084     1   0.498      0.011 0.540 0.460  0 0.000
#> GSM1009098     4   0.000      0.779 0.000 0.000  0 1.000
#> GSM1009112     2   0.000      1.000 0.000 1.000  0 0.000
#> GSM1009126     1   0.584      0.251 0.524 0.032  0 0.444
#> GSM1009140     4   0.000      0.779 0.000 0.000  0 1.000
#> GSM1009154     4   0.380      0.740 0.220 0.000  0 0.780
#> GSM1009168     3   0.000      1.000 0.000 0.000  1 0.000
#> GSM1009182     1   0.705      0.461 0.572 0.232  0 0.196
#> GSM1009196     4   0.503      0.553 0.400 0.004  0 0.596
#> GSM1009071     1   0.485     -0.113 0.600 0.000  0 0.400
#> GSM1009085     1   0.498      0.011 0.540 0.460  0 0.000
#> GSM1009099     4   0.000      0.779 0.000 0.000  0 1.000
#> GSM1009113     2   0.000      1.000 0.000 1.000  0 0.000
#> GSM1009127     1   0.584      0.251 0.524 0.032  0 0.444
#> GSM1009141     4   0.000      0.779 0.000 0.000  0 1.000
#> GSM1009155     4   0.387      0.736 0.228 0.000  0 0.772
#> GSM1009169     3   0.000      1.000 0.000 0.000  1 0.000
#> GSM1009183     1   0.705      0.461 0.572 0.232  0 0.196
#> GSM1009197     4   0.503      0.553 0.400 0.004  0 0.596
#> GSM1009072     1   0.485     -0.113 0.600 0.000  0 0.400
#> GSM1009086     1   0.498      0.011 0.540 0.460  0 0.000
#> GSM1009100     4   0.000      0.779 0.000 0.000  0 1.000
#> GSM1009114     2   0.000      1.000 0.000 1.000  0 0.000
#> GSM1009128     1   0.625      0.432 0.592 0.072  0 0.336
#> GSM1009142     4   0.000      0.779 0.000 0.000  0 1.000
#> GSM1009156     4   0.387      0.736 0.228 0.000  0 0.772
#> GSM1009170     3   0.000      1.000 0.000 0.000  1 0.000
#> GSM1009184     1   0.705      0.461 0.572 0.232  0 0.196
#> GSM1009198     4   0.503      0.553 0.400 0.004  0 0.596
#> GSM1009073     1   0.485     -0.113 0.600 0.000  0 0.400
#> GSM1009087     1   0.498      0.011 0.540 0.460  0 0.000
#> GSM1009101     4   0.000      0.779 0.000 0.000  0 1.000
#> GSM1009115     2   0.000      1.000 0.000 1.000  0 0.000
#> GSM1009129     1   0.625      0.432 0.592 0.072  0 0.336
#> GSM1009143     4   0.000      0.779 0.000 0.000  0 1.000
#> GSM1009157     4   0.387      0.736 0.228 0.000  0 0.772
#> GSM1009171     3   0.000      1.000 0.000 0.000  1 0.000
#> GSM1009185     1   0.705      0.461 0.572 0.232  0 0.196
#> GSM1009199     4   0.503      0.553 0.400 0.004  0 0.596
#> GSM1009074     1   0.485     -0.113 0.600 0.000  0 0.400
#> GSM1009088     1   0.498      0.011 0.540 0.460  0 0.000
#> GSM1009102     4   0.000      0.779 0.000 0.000  0 1.000
#> GSM1009116     2   0.000      1.000 0.000 1.000  0 0.000
#> GSM1009130     1   0.625      0.432 0.592 0.072  0 0.336
#> GSM1009144     4   0.000      0.779 0.000 0.000  0 1.000
#> GSM1009158     4   0.380      0.740 0.220 0.000  0 0.780
#> GSM1009172     3   0.000      1.000 0.000 0.000  1 0.000
#> GSM1009186     1   0.705      0.461 0.572 0.232  0 0.196
#> GSM1009200     4   0.503      0.553 0.400 0.004  0 0.596
#> GSM1009075     1   0.485     -0.113 0.600 0.000  0 0.400
#> GSM1009089     1   0.498      0.011 0.540 0.460  0 0.000
#> GSM1009103     4   0.000      0.779 0.000 0.000  0 1.000
#> GSM1009117     2   0.000      1.000 0.000 1.000  0 0.000
#> GSM1009131     1   0.625      0.432 0.592 0.072  0 0.336
#> GSM1009145     4   0.000      0.779 0.000 0.000  0 1.000
#> GSM1009159     4   0.380      0.740 0.220 0.000  0 0.780
#> GSM1009173     3   0.000      1.000 0.000 0.000  1 0.000
#> GSM1009187     1   0.705      0.461 0.572 0.232  0 0.196
#> GSM1009201     4   0.503      0.553 0.400 0.004  0 0.596

show/hide code output

cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#>            class entropy silhouette    p1    p2 p3    p4    p5
#> GSM1009062     1  0.0865      0.644 0.972 0.024  0 0.004 0.000
#> GSM1009076     5  0.6372      0.638 0.376 0.168  0 0.000 0.456
#> GSM1009090     4  0.0000      1.000 0.000 0.000  0 1.000 0.000
#> GSM1009104     5  0.0000      0.677 0.000 0.000  0 0.000 1.000
#> GSM1009118     2  0.0703      0.779 0.024 0.976  0 0.000 0.000
#> GSM1009132     4  0.0000      1.000 0.000 0.000  0 1.000 0.000
#> GSM1009146     1  0.4350      0.639 0.588 0.004  0 0.408 0.000
#> GSM1009160     3  0.0000      1.000 0.000 0.000  1 0.000 0.000
#> GSM1009174     2  0.2732      0.784 0.000 0.840  0 0.000 0.160
#> GSM1009188     1  0.4400      0.772 0.736 0.052  0 0.212 0.000
#> GSM1009063     1  0.0865      0.644 0.972 0.024  0 0.004 0.000
#> GSM1009077     5  0.6372      0.638 0.376 0.168  0 0.000 0.456
#> GSM1009091     4  0.0000      1.000 0.000 0.000  0 1.000 0.000
#> GSM1009105     5  0.0000      0.677 0.000 0.000  0 0.000 1.000
#> GSM1009119     2  0.5162      0.561 0.148 0.692  0 0.160 0.000
#> GSM1009133     4  0.0000      1.000 0.000 0.000  0 1.000 0.000
#> GSM1009147     1  0.4350      0.639 0.588 0.004  0 0.408 0.000
#> GSM1009161     3  0.0000      1.000 0.000 0.000  1 0.000 0.000
#> GSM1009175     2  0.2732      0.784 0.000 0.840  0 0.000 0.160
#> GSM1009189     1  0.4400      0.772 0.736 0.052  0 0.212 0.000
#> GSM1009064     1  0.0865      0.644 0.972 0.024  0 0.004 0.000
#> GSM1009078     5  0.6372      0.638 0.376 0.168  0 0.000 0.456
#> GSM1009092     4  0.0000      1.000 0.000 0.000  0 1.000 0.000
#> GSM1009106     5  0.0000      0.677 0.000 0.000  0 0.000 1.000
#> GSM1009120     2  0.5162      0.561 0.148 0.692  0 0.160 0.000
#> GSM1009134     4  0.0000      1.000 0.000 0.000  0 1.000 0.000
#> GSM1009148     1  0.4350      0.639 0.588 0.004  0 0.408 0.000
#> GSM1009162     3  0.0000      1.000 0.000 0.000  1 0.000 0.000
#> GSM1009176     2  0.2732      0.784 0.000 0.840  0 0.000 0.160
#> GSM1009190     1  0.4400      0.772 0.736 0.052  0 0.212 0.000
#> GSM1009065     1  0.0865      0.644 0.972 0.024  0 0.004 0.000
#> GSM1009079     5  0.6372      0.638 0.376 0.168  0 0.000 0.456
#> GSM1009093     4  0.0000      1.000 0.000 0.000  0 1.000 0.000
#> GSM1009107     5  0.0000      0.677 0.000 0.000  0 0.000 1.000
#> GSM1009121     2  0.0703      0.779 0.024 0.976  0 0.000 0.000
#> GSM1009135     4  0.0000      1.000 0.000 0.000  0 1.000 0.000
#> GSM1009149     1  0.4350      0.639 0.588 0.004  0 0.408 0.000
#> GSM1009163     3  0.0000      1.000 0.000 0.000  1 0.000 0.000
#> GSM1009177     2  0.2732      0.784 0.000 0.840  0 0.000 0.160
#> GSM1009191     1  0.4400      0.772 0.736 0.052  0 0.212 0.000
#> GSM1009066     1  0.0865      0.644 0.972 0.024  0 0.004 0.000
#> GSM1009080     5  0.6372      0.638 0.376 0.168  0 0.000 0.456
#> GSM1009094     4  0.0000      1.000 0.000 0.000  0 1.000 0.000
#> GSM1009108     5  0.0000      0.677 0.000 0.000  0 0.000 1.000
#> GSM1009122     2  0.0703      0.779 0.024 0.976  0 0.000 0.000
#> GSM1009136     4  0.0000      1.000 0.000 0.000  0 1.000 0.000
#> GSM1009150     1  0.4350      0.639 0.588 0.004  0 0.408 0.000
#> GSM1009164     3  0.0000      1.000 0.000 0.000  1 0.000 0.000
#> GSM1009178     2  0.2732      0.784 0.000 0.840  0 0.000 0.160
#> GSM1009192     1  0.4400      0.772 0.736 0.052  0 0.212 0.000
#> GSM1009067     1  0.0865      0.644 0.972 0.024  0 0.004 0.000
#> GSM1009081     5  0.6372      0.638 0.376 0.168  0 0.000 0.456
#> GSM1009095     4  0.0000      1.000 0.000 0.000  0 1.000 0.000
#> GSM1009109     5  0.0000      0.677 0.000 0.000  0 0.000 1.000
#> GSM1009123     2  0.5162      0.561 0.148 0.692  0 0.160 0.000
#> GSM1009137     4  0.0000      1.000 0.000 0.000  0 1.000 0.000
#> GSM1009151     1  0.4350      0.639 0.588 0.004  0 0.408 0.000
#> GSM1009165     3  0.0000      1.000 0.000 0.000  1 0.000 0.000
#> GSM1009179     2  0.2732      0.784 0.000 0.840  0 0.000 0.160
#> GSM1009193     1  0.4400      0.772 0.736 0.052  0 0.212 0.000
#> GSM1009068     1  0.0865      0.644 0.972 0.024  0 0.004 0.000
#> GSM1009082     5  0.6372      0.638 0.376 0.168  0 0.000 0.456
#> GSM1009096     4  0.0000      1.000 0.000 0.000  0 1.000 0.000
#> GSM1009110     5  0.0000      0.677 0.000 0.000  0 0.000 1.000
#> GSM1009124     2  0.5162      0.561 0.148 0.692  0 0.160 0.000
#> GSM1009138     4  0.0000      1.000 0.000 0.000  0 1.000 0.000
#> GSM1009152     1  0.4350      0.639 0.588 0.004  0 0.408 0.000
#> GSM1009166     3  0.0000      1.000 0.000 0.000  1 0.000 0.000
#> GSM1009180     2  0.2732      0.784 0.000 0.840  0 0.000 0.160
#> GSM1009194     1  0.4400      0.772 0.736 0.052  0 0.212 0.000
#> GSM1009069     1  0.0865      0.644 0.972 0.024  0 0.004 0.000
#> GSM1009083     5  0.6372      0.638 0.376 0.168  0 0.000 0.456
#> GSM1009097     4  0.0000      1.000 0.000 0.000  0 1.000 0.000
#> GSM1009111     5  0.0000      0.677 0.000 0.000  0 0.000 1.000
#> GSM1009125     2  0.0703      0.779 0.024 0.976  0 0.000 0.000
#> GSM1009139     4  0.0000      1.000 0.000 0.000  0 1.000 0.000
#> GSM1009153     1  0.4350      0.639 0.588 0.004  0 0.408 0.000
#> GSM1009167     3  0.0000      1.000 0.000 0.000  1 0.000 0.000
#> GSM1009181     2  0.2732      0.784 0.000 0.840  0 0.000 0.160
#> GSM1009195     1  0.4400      0.772 0.736 0.052  0 0.212 0.000
#> GSM1009070     1  0.0865      0.644 0.972 0.024  0 0.004 0.000
#> GSM1009084     5  0.6372      0.638 0.376 0.168  0 0.000 0.456
#> GSM1009098     4  0.0000      1.000 0.000 0.000  0 1.000 0.000
#> GSM1009112     5  0.0000      0.677 0.000 0.000  0 0.000 1.000
#> GSM1009126     2  0.5162      0.561 0.148 0.692  0 0.160 0.000
#> GSM1009140     4  0.0000      1.000 0.000 0.000  0 1.000 0.000
#> GSM1009154     1  0.4350      0.639 0.588 0.004  0 0.408 0.000
#> GSM1009168     3  0.0000      1.000 0.000 0.000  1 0.000 0.000
#> GSM1009182     2  0.2732      0.784 0.000 0.840  0 0.000 0.160
#> GSM1009196     1  0.4400      0.772 0.736 0.052  0 0.212 0.000
#> GSM1009071     1  0.0865      0.644 0.972 0.024  0 0.004 0.000
#> GSM1009085     5  0.6372      0.638 0.376 0.168  0 0.000 0.456
#> GSM1009099     4  0.0000      1.000 0.000 0.000  0 1.000 0.000
#> GSM1009113     5  0.0000      0.677 0.000 0.000  0 0.000 1.000
#> GSM1009127     2  0.5162      0.561 0.148 0.692  0 0.160 0.000
#> GSM1009141     4  0.0000      1.000 0.000 0.000  0 1.000 0.000
#> GSM1009155     1  0.4446      0.646 0.592 0.008  0 0.400 0.000
#> GSM1009169     3  0.0000      1.000 0.000 0.000  1 0.000 0.000
#> GSM1009183     2  0.2732      0.784 0.000 0.840  0 0.000 0.160
#> GSM1009197     1  0.4400      0.772 0.736 0.052  0 0.212 0.000
#> GSM1009072     1  0.0865      0.644 0.972 0.024  0 0.004 0.000
#> GSM1009086     5  0.6372      0.638 0.376 0.168  0 0.000 0.456
#> GSM1009100     4  0.0000      1.000 0.000 0.000  0 1.000 0.000
#> GSM1009114     5  0.0000      0.677 0.000 0.000  0 0.000 1.000
#> GSM1009128     2  0.0703      0.779 0.024 0.976  0 0.000 0.000
#> GSM1009142     4  0.0000      1.000 0.000 0.000  0 1.000 0.000
#> GSM1009156     1  0.4446      0.646 0.592 0.008  0 0.400 0.000
#> GSM1009170     3  0.0000      1.000 0.000 0.000  1 0.000 0.000
#> GSM1009184     2  0.2732      0.784 0.000 0.840  0 0.000 0.160
#> GSM1009198     1  0.4400      0.772 0.736 0.052  0 0.212 0.000
#> GSM1009073     1  0.0865      0.644 0.972 0.024  0 0.004 0.000
#> GSM1009087     5  0.6372      0.638 0.376 0.168  0 0.000 0.456
#> GSM1009101     4  0.0000      1.000 0.000 0.000  0 1.000 0.000
#> GSM1009115     5  0.0000      0.677 0.000 0.000  0 0.000 1.000
#> GSM1009129     2  0.0703      0.779 0.024 0.976  0 0.000 0.000
#> GSM1009143     4  0.0000      1.000 0.000 0.000  0 1.000 0.000
#> GSM1009157     1  0.4446      0.646 0.592 0.008  0 0.400 0.000
#> GSM1009171     3  0.0000      1.000 0.000 0.000  1 0.000 0.000
#> GSM1009185     2  0.2732      0.784 0.000 0.840  0 0.000 0.160
#> GSM1009199     1  0.4400      0.772 0.736 0.052  0 0.212 0.000
#> GSM1009074     1  0.0865      0.644 0.972 0.024  0 0.004 0.000
#> GSM1009088     5  0.6372      0.638 0.376 0.168  0 0.000 0.456
#> GSM1009102     4  0.0000      1.000 0.000 0.000  0 1.000 0.000
#> GSM1009116     5  0.0000      0.677 0.000 0.000  0 0.000 1.000
#> GSM1009130     2  0.0703      0.779 0.024 0.976  0 0.000 0.000
#> GSM1009144     4  0.0000      1.000 0.000 0.000  0 1.000 0.000
#> GSM1009158     1  0.4350      0.639 0.588 0.004  0 0.408 0.000
#> GSM1009172     3  0.0000      1.000 0.000 0.000  1 0.000 0.000
#> GSM1009186     2  0.2732      0.784 0.000 0.840  0 0.000 0.160
#> GSM1009200     1  0.4400      0.772 0.736 0.052  0 0.212 0.000
#> GSM1009075     1  0.0865      0.644 0.972 0.024  0 0.004 0.000
#> GSM1009089     5  0.6372      0.638 0.376 0.168  0 0.000 0.456
#> GSM1009103     4  0.0000      1.000 0.000 0.000  0 1.000 0.000
#> GSM1009117     5  0.0000      0.677 0.000 0.000  0 0.000 1.000
#> GSM1009131     2  0.0703      0.779 0.024 0.976  0 0.000 0.000
#> GSM1009145     4  0.0000      1.000 0.000 0.000  0 1.000 0.000
#> GSM1009159     1  0.4350      0.639 0.588 0.004  0 0.408 0.000
#> GSM1009173     3  0.0000      1.000 0.000 0.000  1 0.000 0.000
#> GSM1009187     2  0.2732      0.784 0.000 0.840  0 0.000 0.160
#> GSM1009201     1  0.4400      0.772 0.736 0.052  0 0.212 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
#> GSM1009062     1  0.2277      0.690 0.892 0.000  0 0.000 0.032 0.076
#> GSM1009076     6  0.0000      1.000 0.000 0.000  0 0.000 0.000 1.000
#> GSM1009090     4  0.0000      1.000 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009104     5  0.0790      1.000 0.000 0.000  0 0.000 0.968 0.032
#> GSM1009118     2  0.0146      0.787 0.004 0.996  0 0.000 0.000 0.000
#> GSM1009132     4  0.0000      1.000 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009146     1  0.3769      0.686 0.640 0.004  0 0.356 0.000 0.000
#> GSM1009160     3  0.0000      1.000 0.000 0.000  1 0.000 0.000 0.000
#> GSM1009174     2  0.2762      0.795 0.000 0.804  0 0.000 0.000 0.196
#> GSM1009188     1  0.3506      0.793 0.792 0.052  0 0.156 0.000 0.000
#> GSM1009063     1  0.2277      0.690 0.892 0.000  0 0.000 0.032 0.076
#> GSM1009077     6  0.0000      1.000 0.000 0.000  0 0.000 0.000 1.000
#> GSM1009091     4  0.0000      1.000 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009105     5  0.0790      1.000 0.000 0.000  0 0.000 0.968 0.032
#> GSM1009119     2  0.4464      0.568 0.140 0.712  0 0.148 0.000 0.000
#> GSM1009133     4  0.0000      1.000 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009147     1  0.3769      0.686 0.640 0.004  0 0.356 0.000 0.000
#> GSM1009161     3  0.0000      1.000 0.000 0.000  1 0.000 0.000 0.000
#> GSM1009175     2  0.2762      0.795 0.000 0.804  0 0.000 0.000 0.196
#> GSM1009189     1  0.3506      0.793 0.792 0.052  0 0.156 0.000 0.000
#> GSM1009064     1  0.2277      0.690 0.892 0.000  0 0.000 0.032 0.076
#> GSM1009078     6  0.0000      1.000 0.000 0.000  0 0.000 0.000 1.000
#> GSM1009092     4  0.0000      1.000 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009106     5  0.0790      1.000 0.000 0.000  0 0.000 0.968 0.032
#> GSM1009120     2  0.4464      0.568 0.140 0.712  0 0.148 0.000 0.000
#> GSM1009134     4  0.0000      1.000 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009148     1  0.3769      0.686 0.640 0.004  0 0.356 0.000 0.000
#> GSM1009162     3  0.0000      1.000 0.000 0.000  1 0.000 0.000 0.000
#> GSM1009176     2  0.2762      0.795 0.000 0.804  0 0.000 0.000 0.196
#> GSM1009190     1  0.3506      0.793 0.792 0.052  0 0.156 0.000 0.000
#> GSM1009065     1  0.2277      0.690 0.892 0.000  0 0.000 0.032 0.076
#> GSM1009079     6  0.0000      1.000 0.000 0.000  0 0.000 0.000 1.000
#> GSM1009093     4  0.0000      1.000 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009107     5  0.0790      1.000 0.000 0.000  0 0.000 0.968 0.032
#> GSM1009121     2  0.0146      0.787 0.004 0.996  0 0.000 0.000 0.000
#> GSM1009135     4  0.0000      1.000 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009149     1  0.3769      0.686 0.640 0.004  0 0.356 0.000 0.000
#> GSM1009163     3  0.0000      1.000 0.000 0.000  1 0.000 0.000 0.000
#> GSM1009177     2  0.2762      0.795 0.000 0.804  0 0.000 0.000 0.196
#> GSM1009191     1  0.3506      0.793 0.792 0.052  0 0.156 0.000 0.000
#> GSM1009066     1  0.2277      0.690 0.892 0.000  0 0.000 0.032 0.076
#> GSM1009080     6  0.0000      1.000 0.000 0.000  0 0.000 0.000 1.000
#> GSM1009094     4  0.0000      1.000 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009108     5  0.0790      1.000 0.000 0.000  0 0.000 0.968 0.032
#> GSM1009122     2  0.0146      0.787 0.004 0.996  0 0.000 0.000 0.000
#> GSM1009136     4  0.0000      1.000 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009150     1  0.3769      0.686 0.640 0.004  0 0.356 0.000 0.000
#> GSM1009164     3  0.0000      1.000 0.000 0.000  1 0.000 0.000 0.000
#> GSM1009178     2  0.2762      0.795 0.000 0.804  0 0.000 0.000 0.196
#> GSM1009192     1  0.3506      0.793 0.792 0.052  0 0.156 0.000 0.000
#> GSM1009067     1  0.2277      0.690 0.892 0.000  0 0.000 0.032 0.076
#> GSM1009081     6  0.0000      1.000 0.000 0.000  0 0.000 0.000 1.000
#> GSM1009095     4  0.0000      1.000 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009109     5  0.0790      1.000 0.000 0.000  0 0.000 0.968 0.032
#> GSM1009123     2  0.4464      0.568 0.140 0.712  0 0.148 0.000 0.000
#> GSM1009137     4  0.0000      1.000 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009151     1  0.3769      0.686 0.640 0.004  0 0.356 0.000 0.000
#> GSM1009165     3  0.0000      1.000 0.000 0.000  1 0.000 0.000 0.000
#> GSM1009179     2  0.2762      0.795 0.000 0.804  0 0.000 0.000 0.196
#> GSM1009193     1  0.3506      0.793 0.792 0.052  0 0.156 0.000 0.000
#> GSM1009068     1  0.2277      0.690 0.892 0.000  0 0.000 0.032 0.076
#> GSM1009082     6  0.0000      1.000 0.000 0.000  0 0.000 0.000 1.000
#> GSM1009096     4  0.0000      1.000 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009110     5  0.0790      1.000 0.000 0.000  0 0.000 0.968 0.032
#> GSM1009124     2  0.4464      0.568 0.140 0.712  0 0.148 0.000 0.000
#> GSM1009138     4  0.0000      1.000 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009152     1  0.3769      0.686 0.640 0.004  0 0.356 0.000 0.000
#> GSM1009166     3  0.0000      1.000 0.000 0.000  1 0.000 0.000 0.000
#> GSM1009180     2  0.2762      0.795 0.000 0.804  0 0.000 0.000 0.196
#> GSM1009194     1  0.3506      0.793 0.792 0.052  0 0.156 0.000 0.000
#> GSM1009069     1  0.2277      0.690 0.892 0.000  0 0.000 0.032 0.076
#> GSM1009083     6  0.0000      1.000 0.000 0.000  0 0.000 0.000 1.000
#> GSM1009097     4  0.0000      1.000 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009111     5  0.0790      1.000 0.000 0.000  0 0.000 0.968 0.032
#> GSM1009125     2  0.0146      0.787 0.004 0.996  0 0.000 0.000 0.000
#> GSM1009139     4  0.0000      1.000 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009153     1  0.3769      0.686 0.640 0.004  0 0.356 0.000 0.000
#> GSM1009167     3  0.0000      1.000 0.000 0.000  1 0.000 0.000 0.000
#> GSM1009181     2  0.2762      0.795 0.000 0.804  0 0.000 0.000 0.196
#> GSM1009195     1  0.3506      0.793 0.792 0.052  0 0.156 0.000 0.000
#> GSM1009070     1  0.2277      0.690 0.892 0.000  0 0.000 0.032 0.076
#> GSM1009084     6  0.0000      1.000 0.000 0.000  0 0.000 0.000 1.000
#> GSM1009098     4  0.0000      1.000 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009112     5  0.0790      1.000 0.000 0.000  0 0.000 0.968 0.032
#> GSM1009126     2  0.4464      0.568 0.140 0.712  0 0.148 0.000 0.000
#> GSM1009140     4  0.0000      1.000 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009154     1  0.3769      0.686 0.640 0.004  0 0.356 0.000 0.000
#> GSM1009168     3  0.0000      1.000 0.000 0.000  1 0.000 0.000 0.000
#> GSM1009182     2  0.2762      0.795 0.000 0.804  0 0.000 0.000 0.196
#> GSM1009196     1  0.3506      0.793 0.792 0.052  0 0.156 0.000 0.000
#> GSM1009071     1  0.2277      0.690 0.892 0.000  0 0.000 0.032 0.076
#> GSM1009085     6  0.0000      1.000 0.000 0.000  0 0.000 0.000 1.000
#> GSM1009099     4  0.0000      1.000 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009113     5  0.0790      1.000 0.000 0.000  0 0.000 0.968 0.032
#> GSM1009127     2  0.4464      0.568 0.140 0.712  0 0.148 0.000 0.000
#> GSM1009141     4  0.0000      1.000 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009155     1  0.3847      0.692 0.644 0.008  0 0.348 0.000 0.000
#> GSM1009169     3  0.0000      1.000 0.000 0.000  1 0.000 0.000 0.000
#> GSM1009183     2  0.2762      0.795 0.000 0.804  0 0.000 0.000 0.196
#> GSM1009197     1  0.3506      0.793 0.792 0.052  0 0.156 0.000 0.000
#> GSM1009072     1  0.2277      0.690 0.892 0.000  0 0.000 0.032 0.076
#> GSM1009086     6  0.0000      1.000 0.000 0.000  0 0.000 0.000 1.000
#> GSM1009100     4  0.0000      1.000 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009114     5  0.0790      1.000 0.000 0.000  0 0.000 0.968 0.032
#> GSM1009128     2  0.0146      0.787 0.004 0.996  0 0.000 0.000 0.000
#> GSM1009142     4  0.0000      1.000 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009156     1  0.3847      0.692 0.644 0.008  0 0.348 0.000 0.000
#> GSM1009170     3  0.0000      1.000 0.000 0.000  1 0.000 0.000 0.000
#> GSM1009184     2  0.2762      0.795 0.000 0.804  0 0.000 0.000 0.196
#> GSM1009198     1  0.3506      0.793 0.792 0.052  0 0.156 0.000 0.000
#> GSM1009073     1  0.2277      0.690 0.892 0.000  0 0.000 0.032 0.076
#> GSM1009087     6  0.0000      1.000 0.000 0.000  0 0.000 0.000 1.000
#> GSM1009101     4  0.0000      1.000 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009115     5  0.0790      1.000 0.000 0.000  0 0.000 0.968 0.032
#> GSM1009129     2  0.0146      0.787 0.004 0.996  0 0.000 0.000 0.000
#> GSM1009143     4  0.0000      1.000 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009157     1  0.3847      0.692 0.644 0.008  0 0.348 0.000 0.000
#> GSM1009171     3  0.0000      1.000 0.000 0.000  1 0.000 0.000 0.000
#> GSM1009185     2  0.2762      0.795 0.000 0.804  0 0.000 0.000 0.196
#> GSM1009199     1  0.3506      0.793 0.792 0.052  0 0.156 0.000 0.000
#> GSM1009074     1  0.2277      0.690 0.892 0.000  0 0.000 0.032 0.076
#> GSM1009088     6  0.0000      1.000 0.000 0.000  0 0.000 0.000 1.000
#> GSM1009102     4  0.0000      1.000 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009116     5  0.0790      1.000 0.000 0.000  0 0.000 0.968 0.032
#> GSM1009130     2  0.0146      0.787 0.004 0.996  0 0.000 0.000 0.000
#> GSM1009144     4  0.0000      1.000 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009158     1  0.3769      0.686 0.640 0.004  0 0.356 0.000 0.000
#> GSM1009172     3  0.0000      1.000 0.000 0.000  1 0.000 0.000 0.000
#> GSM1009186     2  0.2762      0.795 0.000 0.804  0 0.000 0.000 0.196
#> GSM1009200     1  0.3506      0.793 0.792 0.052  0 0.156 0.000 0.000
#> GSM1009075     1  0.2277      0.690 0.892 0.000  0 0.000 0.032 0.076
#> GSM1009089     6  0.0000      1.000 0.000 0.000  0 0.000 0.000 1.000
#> GSM1009103     4  0.0000      1.000 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009117     5  0.0790      1.000 0.000 0.000  0 0.000 0.968 0.032
#> GSM1009131     2  0.0146      0.787 0.004 0.996  0 0.000 0.000 0.000
#> GSM1009145     4  0.0000      1.000 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009159     1  0.3769      0.686 0.640 0.004  0 0.356 0.000 0.000
#> GSM1009173     3  0.0000      1.000 0.000 0.000  1 0.000 0.000 0.000
#> GSM1009187     2  0.2762      0.795 0.000 0.804  0 0.000 0.000 0.196
#> GSM1009201     1  0.3506      0.793 0.792 0.052  0 0.156 0.000 0.000

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

consensus_heatmap(res, k = 2)

plot of chunk tab-CV-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 temperature(p) time(p) specimen(p) k
#> CV:hclust 140              1       1    1.03e-25 2
#> CV:hclust 126              1       1    2.01e-44 3
#> CV:hclust  84              1       1    7.20e-31 4
#> CV:hclust 140              1       1    2.99e-95 5
#> CV:hclust 140              1       1   2.21e-118 6

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


CV:kmeans

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

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

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

res
#> A 'ConsensusPartition' object with k = 2, 3, 4, 5, 6.
#>   On a matrix with 51941 rows and 140 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 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-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.223           0.757       0.827         0.3994 0.514   0.514
#> 3 3 0.345           0.364       0.633         0.4453 0.740   0.575
#> 4 4 0.449           0.631       0.682         0.1664 0.711   0.441
#> 5 5 0.468           0.659       0.652         0.0975 0.934   0.777
#> 6 6 0.610           0.727       0.700         0.0620 0.951   0.796

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
#> GSM1009062     1   0.541      0.855 0.876 0.124
#> GSM1009076     2   0.855      0.778 0.280 0.720
#> GSM1009090     1   0.327      0.823 0.940 0.060
#> GSM1009104     2   0.753      0.789 0.216 0.784
#> GSM1009118     1   0.671      0.770 0.824 0.176
#> GSM1009132     1   0.343      0.822 0.936 0.064
#> GSM1009146     1   0.456      0.871 0.904 0.096
#> GSM1009160     2   0.373      0.687 0.072 0.928
#> GSM1009174     2   0.990      0.583 0.440 0.560
#> GSM1009188     1   0.443      0.873 0.908 0.092
#> GSM1009063     1   0.541      0.855 0.876 0.124
#> GSM1009077     2   0.855      0.778 0.280 0.720
#> GSM1009091     1   0.327      0.823 0.940 0.060
#> GSM1009105     2   0.753      0.789 0.216 0.784
#> GSM1009119     1   0.430      0.873 0.912 0.088
#> GSM1009133     1   0.343      0.822 0.936 0.064
#> GSM1009147     1   0.430      0.873 0.912 0.088
#> GSM1009161     2   0.373      0.687 0.072 0.928
#> GSM1009175     2   0.990      0.583 0.440 0.560
#> GSM1009189     1   0.443      0.873 0.908 0.092
#> GSM1009064     1   0.541      0.855 0.876 0.124
#> GSM1009078     2   0.904      0.746 0.320 0.680
#> GSM1009092     1   0.327      0.823 0.940 0.060
#> GSM1009106     2   0.753      0.789 0.216 0.784
#> GSM1009120     1   0.416      0.873 0.916 0.084
#> GSM1009134     1   0.343      0.822 0.936 0.064
#> GSM1009148     1   0.456      0.871 0.904 0.096
#> GSM1009162     2   0.373      0.687 0.072 0.928
#> GSM1009176     2   0.985      0.606 0.428 0.572
#> GSM1009190     1   0.443      0.873 0.908 0.092
#> GSM1009065     1   0.541      0.855 0.876 0.124
#> GSM1009079     2   0.855      0.778 0.280 0.720
#> GSM1009093     1   0.327      0.823 0.940 0.060
#> GSM1009107     2   0.753      0.789 0.216 0.784
#> GSM1009121     1   0.680      0.762 0.820 0.180
#> GSM1009135     1   0.343      0.822 0.936 0.064
#> GSM1009149     1   0.456      0.871 0.904 0.096
#> GSM1009163     2   0.373      0.687 0.072 0.928
#> GSM1009177     2   0.985      0.606 0.428 0.572
#> GSM1009191     1   0.443      0.873 0.908 0.092
#> GSM1009066     1   0.541      0.855 0.876 0.124
#> GSM1009080     2   0.855      0.778 0.280 0.720
#> GSM1009094     1   0.327      0.823 0.940 0.060
#> GSM1009108     2   0.753      0.789 0.216 0.784
#> GSM1009122     1   0.999     -0.416 0.516 0.484
#> GSM1009136     1   0.327      0.819 0.940 0.060
#> GSM1009150     1   0.456      0.871 0.904 0.096
#> GSM1009164     2   0.373      0.687 0.072 0.928
#> GSM1009178     2   0.998      0.487 0.476 0.524
#> GSM1009192     1   0.443      0.873 0.908 0.092
#> GSM1009067     1   0.541      0.855 0.876 0.124
#> GSM1009081     2   0.855      0.778 0.280 0.720
#> GSM1009095     1   0.327      0.823 0.940 0.060
#> GSM1009109     2   0.753      0.789 0.216 0.784
#> GSM1009123     1   0.443      0.871 0.908 0.092
#> GSM1009137     1   0.343      0.822 0.936 0.064
#> GSM1009151     1   0.456      0.871 0.904 0.096
#> GSM1009165     2   0.373      0.687 0.072 0.928
#> GSM1009179     2   0.998      0.487 0.476 0.524
#> GSM1009193     1   0.443      0.873 0.908 0.092
#> GSM1009068     1   0.541      0.855 0.876 0.124
#> GSM1009082     2   0.855      0.778 0.280 0.720
#> GSM1009096     1   0.327      0.823 0.940 0.060
#> GSM1009110     2   0.753      0.789 0.216 0.784
#> GSM1009124     1   0.456      0.870 0.904 0.096
#> GSM1009138     1   0.343      0.822 0.936 0.064
#> GSM1009152     1   0.456      0.871 0.904 0.096
#> GSM1009166     2   0.373      0.687 0.072 0.928
#> GSM1009180     2   0.998      0.487 0.476 0.524
#> GSM1009194     1   0.443      0.873 0.908 0.092
#> GSM1009069     1   0.541      0.855 0.876 0.124
#> GSM1009083     2   0.855      0.778 0.280 0.720
#> GSM1009097     1   0.327      0.823 0.940 0.060
#> GSM1009111     2   0.753      0.789 0.216 0.784
#> GSM1009125     2   0.999      0.488 0.484 0.516
#> GSM1009139     1   0.343      0.822 0.936 0.064
#> GSM1009153     1   0.456      0.871 0.904 0.096
#> GSM1009167     2   0.373      0.687 0.072 0.928
#> GSM1009181     2   0.985      0.606 0.428 0.572
#> GSM1009195     1   0.443      0.873 0.908 0.092
#> GSM1009070     1   0.541      0.855 0.876 0.124
#> GSM1009084     2   0.855      0.778 0.280 0.720
#> GSM1009098     1   0.327      0.823 0.940 0.060
#> GSM1009112     2   0.753      0.789 0.216 0.784
#> GSM1009126     1   0.456      0.870 0.904 0.096
#> GSM1009140     1   0.343      0.822 0.936 0.064
#> GSM1009154     1   0.456      0.871 0.904 0.096
#> GSM1009168     2   0.373      0.687 0.072 0.928
#> GSM1009182     2   0.990      0.583 0.440 0.560
#> GSM1009196     1   0.443      0.873 0.908 0.092
#> GSM1009071     1   0.541      0.855 0.876 0.124
#> GSM1009085     2   0.855      0.778 0.280 0.720
#> GSM1009099     1   0.327      0.823 0.940 0.060
#> GSM1009113     2   0.753      0.789 0.216 0.784
#> GSM1009127     1   0.430      0.873 0.912 0.088
#> GSM1009141     1   0.343      0.822 0.936 0.064
#> GSM1009155     1   0.456      0.871 0.904 0.096
#> GSM1009169     2   0.373      0.687 0.072 0.928
#> GSM1009183     2   0.988      0.591 0.436 0.564
#> GSM1009197     1   0.443      0.873 0.908 0.092
#> GSM1009072     1   0.541      0.855 0.876 0.124
#> GSM1009086     2   0.855      0.778 0.280 0.720
#> GSM1009100     1   0.327      0.823 0.940 0.060
#> GSM1009114     2   0.753      0.789 0.216 0.784
#> GSM1009128     1   0.738      0.711 0.792 0.208
#> GSM1009142     1   0.343      0.822 0.936 0.064
#> GSM1009156     1   0.469      0.870 0.900 0.100
#> GSM1009170     2   0.373      0.687 0.072 0.928
#> GSM1009184     2   0.990      0.583 0.440 0.560
#> GSM1009198     1   0.443      0.873 0.908 0.092
#> GSM1009073     1   0.541      0.855 0.876 0.124
#> GSM1009087     2   0.904      0.746 0.320 0.680
#> GSM1009101     1   0.327      0.823 0.940 0.060
#> GSM1009115     2   0.753      0.789 0.216 0.784
#> GSM1009129     2   0.985      0.620 0.428 0.572
#> GSM1009143     1   0.343      0.822 0.936 0.064
#> GSM1009157     1   0.469      0.870 0.900 0.100
#> GSM1009171     2   0.373      0.687 0.072 0.928
#> GSM1009185     1   0.991     -0.191 0.556 0.444
#> GSM1009199     1   0.443      0.873 0.908 0.092
#> GSM1009074     1   0.541      0.855 0.876 0.124
#> GSM1009088     2   0.891      0.757 0.308 0.692
#> GSM1009102     1   0.327      0.823 0.940 0.060
#> GSM1009116     2   0.753      0.789 0.216 0.784
#> GSM1009130     2   0.939      0.716 0.356 0.644
#> GSM1009144     1   0.343      0.822 0.936 0.064
#> GSM1009158     1   0.456      0.871 0.904 0.096
#> GSM1009172     2   0.373      0.687 0.072 0.928
#> GSM1009186     2   0.990      0.583 0.440 0.560
#> GSM1009200     1   0.443      0.873 0.908 0.092
#> GSM1009075     1   0.541      0.855 0.876 0.124
#> GSM1009089     2   1.000      0.392 0.492 0.508
#> GSM1009103     1   0.327      0.823 0.940 0.060
#> GSM1009117     2   0.753      0.789 0.216 0.784
#> GSM1009131     1   0.939      0.199 0.644 0.356
#> GSM1009145     1   0.343      0.822 0.936 0.064
#> GSM1009159     1   0.456      0.871 0.904 0.096
#> GSM1009173     2   0.373      0.687 0.072 0.928
#> GSM1009187     1   0.988     -0.152 0.564 0.436
#> GSM1009201     1   0.443      0.873 0.908 0.092

show/hide code output

cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#>            class entropy silhouette    p1    p2    p3
#> GSM1009062     1   0.627     0.3724 0.768 0.076 0.156
#> GSM1009076     2   0.725     0.6471 0.196 0.704 0.100
#> GSM1009090     1   0.682    -0.8503 0.512 0.012 0.476
#> GSM1009104     2   0.364     0.7387 0.084 0.892 0.024
#> GSM1009118     1   0.653     0.4121 0.760 0.124 0.116
#> GSM1009132     3   0.627     0.9973 0.456 0.000 0.544
#> GSM1009146     1   0.175     0.4754 0.960 0.012 0.028
#> GSM1009160     2   0.790     0.6447 0.084 0.616 0.300
#> GSM1009174     1   0.879    -0.1268 0.456 0.432 0.112
#> GSM1009188     1   0.195     0.4535 0.952 0.008 0.040
#> GSM1009063     1   0.627     0.3724 0.768 0.076 0.156
#> GSM1009077     2   0.725     0.6471 0.196 0.704 0.100
#> GSM1009091     1   0.682    -0.8503 0.512 0.012 0.476
#> GSM1009105     2   0.364     0.7387 0.084 0.892 0.024
#> GSM1009119     1   0.220     0.4399 0.940 0.004 0.056
#> GSM1009133     3   0.627     0.9973 0.456 0.000 0.544
#> GSM1009147     1   0.162     0.4773 0.964 0.012 0.024
#> GSM1009161     2   0.790     0.6447 0.084 0.616 0.300
#> GSM1009175     1   0.879    -0.1268 0.456 0.432 0.112
#> GSM1009189     1   0.195     0.4535 0.952 0.008 0.040
#> GSM1009064     1   0.627     0.3724 0.768 0.076 0.156
#> GSM1009078     2   0.819     0.5000 0.292 0.604 0.104
#> GSM1009092     1   0.682    -0.8503 0.512 0.012 0.476
#> GSM1009106     2   0.364     0.7387 0.084 0.892 0.024
#> GSM1009120     1   0.210     0.4451 0.944 0.004 0.052
#> GSM1009134     3   0.627     0.9973 0.456 0.000 0.544
#> GSM1009148     1   0.175     0.4754 0.960 0.012 0.028
#> GSM1009162     2   0.787     0.6446 0.084 0.620 0.296
#> GSM1009176     1   0.879    -0.1268 0.456 0.432 0.112
#> GSM1009190     1   0.195     0.4535 0.952 0.008 0.040
#> GSM1009065     1   0.627     0.3724 0.768 0.076 0.156
#> GSM1009079     2   0.725     0.6471 0.196 0.704 0.100
#> GSM1009093     1   0.682    -0.8503 0.512 0.012 0.476
#> GSM1009107     2   0.364     0.7387 0.084 0.892 0.024
#> GSM1009121     1   0.739     0.3855 0.696 0.196 0.108
#> GSM1009135     3   0.627     0.9973 0.456 0.000 0.544
#> GSM1009149     1   0.188     0.4736 0.956 0.012 0.032
#> GSM1009163     2   0.790     0.6447 0.084 0.616 0.300
#> GSM1009177     1   0.879    -0.1268 0.456 0.432 0.112
#> GSM1009191     1   0.195     0.4535 0.952 0.008 0.040
#> GSM1009066     1   0.627     0.3724 0.768 0.076 0.156
#> GSM1009080     2   0.725     0.6471 0.196 0.704 0.100
#> GSM1009094     1   0.682    -0.8503 0.512 0.012 0.476
#> GSM1009108     2   0.364     0.7387 0.084 0.892 0.024
#> GSM1009122     1   0.863     0.1611 0.544 0.340 0.116
#> GSM1009136     3   0.629     0.9840 0.464 0.000 0.536
#> GSM1009150     1   0.188     0.4736 0.956 0.012 0.032
#> GSM1009164     2   0.790     0.6447 0.084 0.616 0.300
#> GSM1009178     1   0.879    -0.1045 0.464 0.424 0.112
#> GSM1009192     1   0.195     0.4535 0.952 0.008 0.040
#> GSM1009067     1   0.627     0.3724 0.768 0.076 0.156
#> GSM1009081     2   0.725     0.6471 0.196 0.704 0.100
#> GSM1009095     1   0.682    -0.8503 0.512 0.012 0.476
#> GSM1009109     2   0.364     0.7387 0.084 0.892 0.024
#> GSM1009123     1   0.220     0.4399 0.940 0.004 0.056
#> GSM1009137     3   0.627     0.9973 0.456 0.000 0.544
#> GSM1009151     1   0.175     0.4754 0.960 0.012 0.028
#> GSM1009165     2   0.787     0.6446 0.084 0.620 0.296
#> GSM1009179     1   0.879    -0.1045 0.464 0.424 0.112
#> GSM1009193     1   0.195     0.4535 0.952 0.008 0.040
#> GSM1009068     1   0.627     0.3724 0.768 0.076 0.156
#> GSM1009082     2   0.725     0.6471 0.196 0.704 0.100
#> GSM1009096     1   0.682    -0.8503 0.512 0.012 0.476
#> GSM1009110     2   0.364     0.7387 0.084 0.892 0.024
#> GSM1009124     1   0.296     0.4386 0.912 0.008 0.080
#> GSM1009138     3   0.627     0.9973 0.456 0.000 0.544
#> GSM1009152     1   0.175     0.4754 0.960 0.012 0.028
#> GSM1009166     2   0.787     0.6446 0.084 0.620 0.296
#> GSM1009180     1   0.879    -0.1045 0.464 0.424 0.112
#> GSM1009194     1   0.206     0.4540 0.948 0.008 0.044
#> GSM1009069     1   0.644     0.3745 0.756 0.076 0.168
#> GSM1009083     2   0.734     0.6368 0.204 0.696 0.100
#> GSM1009097     1   0.682    -0.8503 0.512 0.012 0.476
#> GSM1009111     2   0.364     0.7387 0.084 0.892 0.024
#> GSM1009125     1   0.874     0.0779 0.512 0.372 0.116
#> GSM1009139     3   0.627     0.9973 0.456 0.000 0.544
#> GSM1009153     1   0.175     0.4754 0.960 0.012 0.028
#> GSM1009167     2   0.790     0.6446 0.084 0.616 0.300
#> GSM1009181     1   0.879    -0.1268 0.456 0.432 0.112
#> GSM1009195     1   0.249     0.4617 0.932 0.008 0.060
#> GSM1009070     1   0.621     0.3698 0.772 0.076 0.152
#> GSM1009084     2   0.725     0.6471 0.196 0.704 0.100
#> GSM1009098     1   0.682    -0.8503 0.512 0.012 0.476
#> GSM1009112     2   0.364     0.7387 0.084 0.892 0.024
#> GSM1009126     1   0.296     0.4386 0.912 0.008 0.080
#> GSM1009140     3   0.627     0.9973 0.456 0.000 0.544
#> GSM1009154     1   0.175     0.4754 0.960 0.012 0.028
#> GSM1009168     2   0.787     0.6446 0.084 0.620 0.296
#> GSM1009182     1   0.879    -0.1268 0.456 0.432 0.112
#> GSM1009196     1   0.195     0.4535 0.952 0.008 0.040
#> GSM1009071     1   0.627     0.3724 0.768 0.076 0.156
#> GSM1009085     2   0.725     0.6471 0.196 0.704 0.100
#> GSM1009099     1   0.682    -0.8503 0.512 0.012 0.476
#> GSM1009113     2   0.364     0.7387 0.084 0.892 0.024
#> GSM1009127     1   0.210     0.4451 0.944 0.004 0.052
#> GSM1009141     3   0.627     0.9973 0.456 0.000 0.544
#> GSM1009155     1   0.162     0.4773 0.964 0.012 0.024
#> GSM1009169     2   0.787     0.6446 0.084 0.620 0.296
#> GSM1009183     1   0.879    -0.1268 0.456 0.432 0.112
#> GSM1009197     1   0.195     0.4535 0.952 0.008 0.040
#> GSM1009072     1   0.627     0.3724 0.768 0.076 0.156
#> GSM1009086     2   0.725     0.6471 0.196 0.704 0.100
#> GSM1009100     1   0.682    -0.8503 0.512 0.012 0.476
#> GSM1009114     2   0.364     0.7387 0.084 0.892 0.024
#> GSM1009128     1   0.754     0.3746 0.680 0.216 0.104
#> GSM1009142     3   0.627     0.9973 0.456 0.000 0.544
#> GSM1009156     1   0.148     0.4789 0.968 0.012 0.020
#> GSM1009170     2   0.790     0.6447 0.084 0.616 0.300
#> GSM1009184     1   0.879    -0.1268 0.456 0.432 0.112
#> GSM1009198     1   0.195     0.4535 0.952 0.008 0.040
#> GSM1009073     1   0.627     0.3724 0.768 0.076 0.156
#> GSM1009087     2   0.819     0.5000 0.292 0.604 0.104
#> GSM1009101     1   0.682    -0.8503 0.512 0.012 0.476
#> GSM1009115     2   0.364     0.7387 0.084 0.892 0.024
#> GSM1009129     1   0.879    -0.1341 0.452 0.436 0.112
#> GSM1009143     3   0.627     0.9973 0.456 0.000 0.544
#> GSM1009157     1   0.241     0.4832 0.940 0.020 0.040
#> GSM1009171     2   0.790     0.6447 0.084 0.616 0.300
#> GSM1009185     1   0.878    -0.0951 0.468 0.420 0.112
#> GSM1009199     1   0.249     0.4617 0.932 0.008 0.060
#> GSM1009074     1   0.627     0.3724 0.768 0.076 0.156
#> GSM1009088     2   0.813     0.5127 0.284 0.612 0.104
#> GSM1009102     1   0.682    -0.8503 0.512 0.012 0.476
#> GSM1009116     2   0.364     0.7387 0.084 0.892 0.024
#> GSM1009130     2   0.833     0.4679 0.328 0.572 0.100
#> GSM1009144     3   0.627     0.9973 0.456 0.000 0.544
#> GSM1009158     1   0.175     0.4754 0.960 0.012 0.028
#> GSM1009172     2   0.790     0.6447 0.084 0.616 0.300
#> GSM1009186     1   0.879    -0.1268 0.456 0.432 0.112
#> GSM1009200     1   0.195     0.4535 0.952 0.008 0.040
#> GSM1009075     1   0.627     0.3724 0.768 0.076 0.156
#> GSM1009089     2   0.855     0.3587 0.364 0.532 0.104
#> GSM1009103     1   0.682    -0.8503 0.512 0.012 0.476
#> GSM1009117     2   0.364     0.7387 0.084 0.892 0.024
#> GSM1009131     1   0.811     0.2871 0.604 0.300 0.096
#> GSM1009145     3   0.629     0.9840 0.464 0.000 0.536
#> GSM1009159     1   0.188     0.4736 0.956 0.012 0.032
#> GSM1009173     2   0.787     0.6446 0.084 0.620 0.296
#> GSM1009187     1   0.878    -0.0851 0.472 0.416 0.112
#> GSM1009201     1   0.195     0.4535 0.952 0.008 0.040

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>            class entropy silhouette    p1    p2    p3    p4
#> GSM1009062     1   0.819     0.4543 0.556 0.088 0.120 0.236
#> GSM1009076     2   0.238     0.5966 0.072 0.916 0.004 0.008
#> GSM1009090     4   0.736     0.7952 0.384 0.012 0.116 0.488
#> GSM1009104     2   0.546     0.3978 0.008 0.744 0.172 0.076
#> GSM1009118     1   0.760     0.4454 0.592 0.232 0.044 0.132
#> GSM1009132     4   0.416     0.8044 0.240 0.004 0.000 0.756
#> GSM1009146     1   0.197     0.6689 0.944 0.012 0.028 0.016
#> GSM1009160     3   0.559     0.9883 0.020 0.296 0.668 0.016
#> GSM1009174     2   0.765     0.5446 0.312 0.548 0.088 0.052
#> GSM1009188     1   0.307     0.6438 0.888 0.024 0.004 0.084
#> GSM1009063     1   0.819     0.4543 0.556 0.088 0.120 0.236
#> GSM1009077     2   0.238     0.5966 0.072 0.916 0.004 0.008
#> GSM1009091     4   0.736     0.7952 0.384 0.012 0.116 0.488
#> GSM1009105     2   0.546     0.3978 0.008 0.744 0.172 0.076
#> GSM1009119     1   0.391     0.6165 0.848 0.020 0.020 0.112
#> GSM1009133     4   0.416     0.8044 0.240 0.004 0.000 0.756
#> GSM1009147     1   0.185     0.6687 0.948 0.012 0.028 0.012
#> GSM1009161     3   0.569     0.9882 0.020 0.296 0.664 0.020
#> GSM1009175     2   0.765     0.5446 0.312 0.548 0.088 0.052
#> GSM1009189     1   0.307     0.6438 0.888 0.024 0.004 0.084
#> GSM1009064     1   0.819     0.4543 0.556 0.088 0.120 0.236
#> GSM1009078     2   0.382     0.6093 0.160 0.824 0.008 0.008
#> GSM1009092     4   0.736     0.7952 0.384 0.012 0.116 0.488
#> GSM1009106     2   0.546     0.3978 0.008 0.744 0.172 0.076
#> GSM1009120     1   0.373     0.6293 0.860 0.020 0.020 0.100
#> GSM1009134     4   0.416     0.8044 0.240 0.004 0.000 0.756
#> GSM1009148     1   0.197     0.6689 0.944 0.012 0.028 0.016
#> GSM1009162     3   0.597     0.9869 0.020 0.296 0.652 0.032
#> GSM1009176     2   0.758     0.5628 0.296 0.564 0.088 0.052
#> GSM1009190     1   0.307     0.6438 0.888 0.024 0.004 0.084
#> GSM1009065     1   0.819     0.4543 0.556 0.088 0.120 0.236
#> GSM1009079     2   0.238     0.5966 0.072 0.916 0.004 0.008
#> GSM1009093     4   0.736     0.7952 0.384 0.012 0.116 0.488
#> GSM1009107     2   0.546     0.3978 0.008 0.744 0.172 0.076
#> GSM1009121     1   0.752     0.4349 0.604 0.220 0.044 0.132
#> GSM1009135     4   0.416     0.8044 0.240 0.004 0.000 0.756
#> GSM1009149     1   0.197     0.6689 0.944 0.012 0.028 0.016
#> GSM1009163     3   0.569     0.9880 0.020 0.296 0.664 0.020
#> GSM1009177     2   0.758     0.5628 0.296 0.564 0.088 0.052
#> GSM1009191     1   0.307     0.6438 0.888 0.024 0.004 0.084
#> GSM1009066     1   0.819     0.4543 0.556 0.088 0.120 0.236
#> GSM1009080     2   0.238     0.5966 0.072 0.916 0.004 0.008
#> GSM1009094     4   0.736     0.7952 0.384 0.012 0.116 0.488
#> GSM1009108     2   0.546     0.3978 0.008 0.744 0.172 0.076
#> GSM1009122     1   0.800    -0.0473 0.444 0.400 0.044 0.112
#> GSM1009136     4   0.466     0.8037 0.264 0.004 0.008 0.724
#> GSM1009150     1   0.197     0.6689 0.944 0.012 0.028 0.016
#> GSM1009164     3   0.569     0.9880 0.020 0.296 0.664 0.020
#> GSM1009178     2   0.765     0.5446 0.312 0.548 0.088 0.052
#> GSM1009192     1   0.307     0.6438 0.888 0.024 0.004 0.084
#> GSM1009067     1   0.819     0.4543 0.556 0.088 0.120 0.236
#> GSM1009081     2   0.238     0.5966 0.072 0.916 0.004 0.008
#> GSM1009095     4   0.732     0.7952 0.384 0.012 0.112 0.492
#> GSM1009109     2   0.546     0.3978 0.008 0.744 0.172 0.076
#> GSM1009123     1   0.418     0.6057 0.832 0.020 0.024 0.124
#> GSM1009137     4   0.416     0.8044 0.240 0.004 0.000 0.756
#> GSM1009151     1   0.197     0.6689 0.944 0.012 0.028 0.016
#> GSM1009165     3   0.597     0.9878 0.020 0.296 0.652 0.032
#> GSM1009179     2   0.765     0.5446 0.312 0.548 0.088 0.052
#> GSM1009193     1   0.307     0.6438 0.888 0.024 0.004 0.084
#> GSM1009068     1   0.819     0.4543 0.556 0.088 0.120 0.236
#> GSM1009082     2   0.238     0.5966 0.072 0.916 0.004 0.008
#> GSM1009096     4   0.736     0.7952 0.384 0.012 0.116 0.488
#> GSM1009110     2   0.546     0.3978 0.008 0.744 0.172 0.076
#> GSM1009124     1   0.531     0.5841 0.780 0.048 0.040 0.132
#> GSM1009138     4   0.416     0.8044 0.240 0.004 0.000 0.756
#> GSM1009152     1   0.197     0.6689 0.944 0.012 0.028 0.016
#> GSM1009166     3   0.597     0.9869 0.020 0.296 0.652 0.032
#> GSM1009180     2   0.765     0.5446 0.312 0.548 0.088 0.052
#> GSM1009194     1   0.313     0.6441 0.884 0.024 0.004 0.088
#> GSM1009069     1   0.834     0.4489 0.544 0.100 0.120 0.236
#> GSM1009083     2   0.253     0.5992 0.080 0.908 0.004 0.008
#> GSM1009097     4   0.736     0.7952 0.384 0.012 0.116 0.488
#> GSM1009111     2   0.546     0.3978 0.008 0.744 0.172 0.076
#> GSM1009125     1   0.803    -0.0851 0.436 0.408 0.048 0.108
#> GSM1009139     4   0.416     0.8044 0.240 0.004 0.000 0.756
#> GSM1009153     1   0.197     0.6689 0.944 0.012 0.028 0.016
#> GSM1009167     3   0.664     0.9700 0.020 0.296 0.616 0.068
#> GSM1009181     2   0.758     0.5628 0.296 0.564 0.088 0.052
#> GSM1009195     1   0.407     0.6469 0.840 0.064 0.004 0.092
#> GSM1009070     1   0.800     0.4573 0.572 0.076 0.120 0.232
#> GSM1009084     2   0.238     0.5966 0.072 0.916 0.004 0.008
#> GSM1009098     4   0.732     0.7952 0.384 0.012 0.112 0.492
#> GSM1009112     2   0.546     0.3978 0.008 0.744 0.172 0.076
#> GSM1009126     1   0.531     0.5841 0.780 0.048 0.040 0.132
#> GSM1009140     4   0.416     0.8044 0.240 0.004 0.000 0.756
#> GSM1009154     1   0.197     0.6689 0.944 0.012 0.028 0.016
#> GSM1009168     3   0.644     0.9769 0.020 0.296 0.628 0.056
#> GSM1009182     2   0.765     0.5446 0.312 0.548 0.088 0.052
#> GSM1009196     1   0.307     0.6438 0.888 0.024 0.004 0.084
#> GSM1009071     1   0.819     0.4543 0.556 0.088 0.120 0.236
#> GSM1009085     2   0.238     0.5966 0.072 0.916 0.004 0.008
#> GSM1009099     4   0.732     0.7952 0.384 0.012 0.112 0.492
#> GSM1009113     2   0.546     0.3978 0.008 0.744 0.172 0.076
#> GSM1009127     1   0.413     0.6099 0.836 0.020 0.024 0.120
#> GSM1009141     4   0.416     0.8044 0.240 0.004 0.000 0.756
#> GSM1009155     1   0.197     0.6689 0.944 0.012 0.028 0.016
#> GSM1009169     3   0.644     0.9769 0.020 0.296 0.628 0.056
#> GSM1009183     2   0.762     0.5547 0.304 0.556 0.088 0.052
#> GSM1009197     1   0.307     0.6438 0.888 0.024 0.004 0.084
#> GSM1009072     1   0.819     0.4543 0.556 0.088 0.120 0.236
#> GSM1009086     2   0.238     0.5966 0.072 0.916 0.004 0.008
#> GSM1009100     4   0.732     0.7952 0.384 0.012 0.112 0.492
#> GSM1009114     2   0.546     0.3978 0.008 0.744 0.172 0.076
#> GSM1009128     1   0.708     0.4598 0.656 0.164 0.044 0.136
#> GSM1009142     4   0.416     0.8044 0.240 0.004 0.000 0.756
#> GSM1009156     1   0.196     0.6693 0.944 0.020 0.028 0.008
#> GSM1009170     3   0.569     0.9880 0.020 0.296 0.664 0.020
#> GSM1009184     2   0.765     0.5446 0.312 0.548 0.088 0.052
#> GSM1009198     1   0.307     0.6438 0.888 0.024 0.004 0.084
#> GSM1009073     1   0.819     0.4543 0.556 0.088 0.120 0.236
#> GSM1009087     2   0.382     0.6093 0.160 0.824 0.008 0.008
#> GSM1009101     4   0.732     0.7952 0.384 0.012 0.112 0.492
#> GSM1009115     2   0.546     0.3978 0.008 0.744 0.172 0.076
#> GSM1009129     2   0.780     0.2248 0.392 0.472 0.048 0.088
#> GSM1009143     4   0.434     0.8039 0.240 0.004 0.004 0.752
#> GSM1009157     1   0.317     0.6512 0.888 0.076 0.028 0.008
#> GSM1009171     3   0.569     0.9880 0.020 0.296 0.664 0.020
#> GSM1009185     2   0.763     0.5298 0.324 0.540 0.088 0.048
#> GSM1009199     1   0.365     0.6456 0.860 0.040 0.004 0.096
#> GSM1009074     1   0.819     0.4543 0.556 0.088 0.120 0.236
#> GSM1009088     2   0.382     0.6093 0.160 0.824 0.008 0.008
#> GSM1009102     4   0.732     0.7952 0.384 0.012 0.112 0.492
#> GSM1009116     2   0.546     0.3978 0.008 0.744 0.172 0.076
#> GSM1009130     2   0.619     0.4886 0.260 0.668 0.032 0.040
#> GSM1009144     4   0.434     0.8039 0.240 0.004 0.004 0.752
#> GSM1009158     1   0.197     0.6689 0.944 0.012 0.028 0.016
#> GSM1009172     3   0.559     0.9883 0.020 0.296 0.668 0.016
#> GSM1009186     2   0.765     0.5446 0.312 0.548 0.088 0.052
#> GSM1009200     1   0.307     0.6438 0.888 0.024 0.004 0.084
#> GSM1009075     1   0.819     0.4543 0.556 0.088 0.120 0.236
#> GSM1009089     2   0.448     0.5842 0.224 0.760 0.008 0.008
#> GSM1009103     4   0.732     0.7952 0.384 0.012 0.112 0.492
#> GSM1009117     2   0.546     0.3978 0.008 0.744 0.172 0.076
#> GSM1009131     1   0.762     0.3007 0.560 0.292 0.044 0.104
#> GSM1009145     4   0.466     0.8037 0.264 0.004 0.008 0.724
#> GSM1009159     1   0.197     0.6689 0.944 0.012 0.028 0.016
#> GSM1009173     3   0.597     0.9878 0.020 0.296 0.652 0.032
#> GSM1009187     2   0.767     0.5384 0.316 0.544 0.088 0.052
#> GSM1009201     1   0.307     0.6438 0.888 0.024 0.004 0.084

show/hide code output

cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#>            class entropy silhouette    p1    p2    p3    p4    p5
#> GSM1009062     5   0.693      0.998 0.380 0.056 0.000 0.100 0.464
#> GSM1009076     2   0.551      0.557 0.044 0.720 0.020 0.040 0.176
#> GSM1009090     4   0.353      0.744 0.256 0.000 0.000 0.744 0.000
#> GSM1009104     2   0.400      0.318 0.004 0.748 0.232 0.016 0.000
#> GSM1009118     1   0.702      0.520 0.636 0.092 0.044 0.080 0.148
#> GSM1009132     4   0.635      0.736 0.120 0.004 0.032 0.616 0.228
#> GSM1009146     1   0.400      0.572 0.820 0.012 0.012 0.036 0.120
#> GSM1009160     3   0.291      0.983 0.012 0.104 0.872 0.004 0.008
#> GSM1009174     2   0.871      0.452 0.252 0.356 0.096 0.032 0.264
#> GSM1009188     1   0.218      0.717 0.920 0.008 0.024 0.048 0.000
#> GSM1009063     5   0.693      0.998 0.380 0.056 0.000 0.100 0.464
#> GSM1009077     2   0.551      0.557 0.044 0.720 0.020 0.040 0.176
#> GSM1009091     4   0.353      0.744 0.256 0.000 0.000 0.744 0.000
#> GSM1009105     2   0.400      0.318 0.004 0.748 0.232 0.016 0.000
#> GSM1009119     1   0.375      0.687 0.852 0.008 0.040 0.052 0.048
#> GSM1009133     4   0.635      0.736 0.120 0.004 0.032 0.616 0.228
#> GSM1009147     1   0.392      0.577 0.824 0.012 0.012 0.032 0.120
#> GSM1009161     3   0.291      0.983 0.012 0.104 0.872 0.004 0.008
#> GSM1009175     2   0.871      0.452 0.252 0.356 0.096 0.032 0.264
#> GSM1009189     1   0.218      0.717 0.920 0.008 0.024 0.048 0.000
#> GSM1009064     5   0.707      0.996 0.380 0.056 0.004 0.100 0.460
#> GSM1009078     2   0.591      0.560 0.076 0.692 0.016 0.040 0.176
#> GSM1009092     4   0.353      0.744 0.256 0.000 0.000 0.744 0.000
#> GSM1009106     2   0.400      0.318 0.004 0.748 0.232 0.016 0.000
#> GSM1009120     1   0.360      0.688 0.860 0.008 0.036 0.052 0.044
#> GSM1009134     4   0.635      0.736 0.120 0.004 0.032 0.616 0.228
#> GSM1009148     1   0.400      0.572 0.820 0.012 0.012 0.036 0.120
#> GSM1009162     3   0.344      0.981 0.012 0.104 0.852 0.008 0.024
#> GSM1009176     2   0.870      0.456 0.248 0.360 0.096 0.032 0.264
#> GSM1009190     1   0.218      0.717 0.920 0.008 0.024 0.048 0.000
#> GSM1009065     5   0.707      0.996 0.380 0.056 0.004 0.100 0.460
#> GSM1009079     2   0.551      0.557 0.044 0.720 0.020 0.040 0.176
#> GSM1009093     4   0.353      0.744 0.256 0.000 0.000 0.744 0.000
#> GSM1009107     2   0.400      0.318 0.004 0.748 0.232 0.016 0.000
#> GSM1009121     1   0.698      0.523 0.640 0.092 0.044 0.080 0.144
#> GSM1009135     4   0.635      0.736 0.120 0.004 0.032 0.616 0.228
#> GSM1009149     1   0.400      0.572 0.820 0.012 0.012 0.036 0.120
#> GSM1009163     3   0.279      0.983 0.012 0.104 0.876 0.004 0.004
#> GSM1009177     2   0.870      0.456 0.248 0.360 0.096 0.032 0.264
#> GSM1009191     1   0.218      0.717 0.920 0.008 0.024 0.048 0.000
#> GSM1009066     5   0.693      0.998 0.380 0.056 0.000 0.100 0.464
#> GSM1009080     2   0.551      0.557 0.044 0.720 0.020 0.040 0.176
#> GSM1009094     4   0.353      0.744 0.256 0.000 0.000 0.744 0.000
#> GSM1009108     2   0.400      0.318 0.004 0.748 0.232 0.016 0.000
#> GSM1009122     1   0.811      0.336 0.516 0.188 0.052 0.076 0.168
#> GSM1009136     4   0.647      0.736 0.128 0.008 0.032 0.616 0.216
#> GSM1009150     1   0.400      0.572 0.820 0.012 0.012 0.036 0.120
#> GSM1009164     3   0.279      0.983 0.012 0.104 0.876 0.004 0.004
#> GSM1009178     2   0.871      0.452 0.252 0.356 0.096 0.032 0.264
#> GSM1009192     1   0.218      0.717 0.920 0.008 0.024 0.048 0.000
#> GSM1009067     5   0.693      0.998 0.380 0.056 0.000 0.100 0.464
#> GSM1009081     2   0.551      0.557 0.044 0.720 0.020 0.040 0.176
#> GSM1009095     4   0.369      0.744 0.256 0.004 0.000 0.740 0.000
#> GSM1009109     2   0.400      0.318 0.004 0.748 0.232 0.016 0.000
#> GSM1009123     1   0.408      0.676 0.832 0.008 0.040 0.068 0.052
#> GSM1009137     4   0.635      0.736 0.120 0.004 0.032 0.616 0.228
#> GSM1009151     1   0.400      0.572 0.820 0.012 0.012 0.036 0.120
#> GSM1009165     3   0.335      0.981 0.012 0.104 0.856 0.008 0.020
#> GSM1009179     2   0.871      0.452 0.252 0.356 0.096 0.032 0.264
#> GSM1009193     1   0.218      0.717 0.920 0.008 0.024 0.048 0.000
#> GSM1009068     5   0.693      0.998 0.380 0.056 0.000 0.100 0.464
#> GSM1009082     2   0.551      0.557 0.044 0.720 0.020 0.040 0.176
#> GSM1009096     4   0.353      0.744 0.256 0.000 0.000 0.744 0.000
#> GSM1009110     2   0.400      0.318 0.004 0.748 0.232 0.016 0.000
#> GSM1009124     1   0.531      0.624 0.752 0.016 0.040 0.076 0.116
#> GSM1009138     4   0.635      0.736 0.120 0.004 0.032 0.616 0.228
#> GSM1009152     1   0.400      0.572 0.820 0.012 0.012 0.036 0.120
#> GSM1009166     3   0.344      0.981 0.012 0.104 0.852 0.008 0.024
#> GSM1009180     2   0.871      0.452 0.252 0.356 0.096 0.032 0.264
#> GSM1009194     1   0.234      0.715 0.916 0.008 0.024 0.048 0.004
#> GSM1009069     5   0.707      0.996 0.380 0.056 0.004 0.100 0.460
#> GSM1009083     2   0.551      0.557 0.044 0.720 0.020 0.040 0.176
#> GSM1009097     4   0.353      0.744 0.256 0.000 0.000 0.744 0.000
#> GSM1009111     2   0.400      0.318 0.004 0.748 0.232 0.016 0.000
#> GSM1009125     1   0.811      0.336 0.516 0.188 0.052 0.076 0.168
#> GSM1009139     4   0.635      0.736 0.120 0.004 0.032 0.616 0.228
#> GSM1009153     1   0.400      0.572 0.820 0.012 0.012 0.036 0.120
#> GSM1009167     3   0.392      0.973 0.012 0.104 0.832 0.024 0.028
#> GSM1009181     2   0.870      0.456 0.248 0.360 0.096 0.032 0.264
#> GSM1009195     1   0.266      0.710 0.908 0.012 0.024 0.036 0.020
#> GSM1009070     5   0.694      0.990 0.384 0.056 0.000 0.100 0.460
#> GSM1009084     2   0.551      0.557 0.044 0.720 0.020 0.040 0.176
#> GSM1009098     4   0.353      0.744 0.256 0.000 0.000 0.744 0.000
#> GSM1009112     2   0.400      0.318 0.004 0.748 0.232 0.016 0.000
#> GSM1009126     1   0.536      0.621 0.748 0.016 0.040 0.076 0.120
#> GSM1009140     4   0.635      0.736 0.120 0.004 0.032 0.616 0.228
#> GSM1009154     1   0.400      0.572 0.820 0.012 0.012 0.036 0.120
#> GSM1009168     3   0.374      0.977 0.012 0.104 0.840 0.020 0.024
#> GSM1009182     2   0.871      0.452 0.252 0.356 0.096 0.032 0.264
#> GSM1009196     1   0.229      0.715 0.916 0.012 0.024 0.048 0.000
#> GSM1009071     5   0.693      0.998 0.380 0.056 0.000 0.100 0.464
#> GSM1009085     2   0.551      0.557 0.044 0.720 0.020 0.040 0.176
#> GSM1009099     4   0.353      0.744 0.256 0.000 0.000 0.744 0.000
#> GSM1009113     2   0.400      0.318 0.004 0.748 0.232 0.016 0.000
#> GSM1009127     1   0.415      0.675 0.828 0.008 0.040 0.068 0.056
#> GSM1009141     4   0.635      0.736 0.120 0.004 0.032 0.616 0.228
#> GSM1009155     1   0.400      0.572 0.820 0.012 0.012 0.036 0.120
#> GSM1009169     3   0.384      0.977 0.012 0.104 0.836 0.024 0.024
#> GSM1009183     2   0.870      0.456 0.248 0.360 0.096 0.032 0.264
#> GSM1009197     1   0.218      0.717 0.920 0.008 0.024 0.048 0.000
#> GSM1009072     5   0.693      0.998 0.380 0.056 0.000 0.100 0.464
#> GSM1009086     2   0.551      0.557 0.044 0.720 0.020 0.040 0.176
#> GSM1009100     4   0.353      0.744 0.256 0.000 0.000 0.744 0.000
#> GSM1009114     2   0.400      0.318 0.004 0.748 0.232 0.016 0.000
#> GSM1009128     1   0.680      0.545 0.656 0.076 0.044 0.088 0.136
#> GSM1009142     4   0.635      0.736 0.120 0.004 0.032 0.616 0.228
#> GSM1009156     1   0.378      0.585 0.832 0.012 0.012 0.028 0.116
#> GSM1009170     3   0.279      0.983 0.012 0.104 0.876 0.004 0.004
#> GSM1009184     2   0.871      0.452 0.252 0.356 0.096 0.032 0.264
#> GSM1009198     1   0.218      0.717 0.920 0.008 0.024 0.048 0.000
#> GSM1009073     5   0.693      0.998 0.380 0.056 0.000 0.100 0.464
#> GSM1009087     2   0.591      0.560 0.076 0.692 0.016 0.040 0.176
#> GSM1009101     4   0.353      0.744 0.256 0.000 0.000 0.744 0.000
#> GSM1009115     2   0.400      0.318 0.004 0.748 0.232 0.016 0.000
#> GSM1009129     1   0.827      0.260 0.488 0.216 0.052 0.076 0.168
#> GSM1009143     4   0.644      0.735 0.120 0.008 0.032 0.616 0.224
#> GSM1009157     1   0.398      0.572 0.820 0.016 0.012 0.028 0.124
#> GSM1009171     3   0.247      0.984 0.012 0.104 0.884 0.000 0.000
#> GSM1009185     2   0.871      0.452 0.252 0.356 0.096 0.032 0.264
#> GSM1009199     1   0.250      0.714 0.912 0.012 0.024 0.044 0.008
#> GSM1009074     5   0.693      0.998 0.380 0.056 0.000 0.100 0.464
#> GSM1009088     2   0.591      0.560 0.076 0.692 0.016 0.040 0.176
#> GSM1009102     4   0.369      0.744 0.256 0.004 0.000 0.740 0.000
#> GSM1009116     2   0.400      0.318 0.004 0.748 0.232 0.016 0.000
#> GSM1009130     2   0.830      0.222 0.332 0.400 0.052 0.052 0.164
#> GSM1009144     4   0.644      0.735 0.120 0.008 0.032 0.616 0.224
#> GSM1009158     1   0.400      0.572 0.820 0.012 0.012 0.036 0.120
#> GSM1009172     3   0.291      0.983 0.012 0.104 0.872 0.004 0.008
#> GSM1009186     2   0.871      0.452 0.252 0.356 0.096 0.032 0.264
#> GSM1009200     1   0.218      0.717 0.920 0.008 0.024 0.048 0.000
#> GSM1009075     5   0.693      0.998 0.380 0.056 0.000 0.100 0.464
#> GSM1009089     2   0.607      0.558 0.088 0.680 0.016 0.040 0.176
#> GSM1009103     4   0.369      0.744 0.256 0.004 0.000 0.740 0.000
#> GSM1009117     2   0.400      0.318 0.004 0.748 0.232 0.016 0.000
#> GSM1009131     1   0.698      0.510 0.636 0.104 0.040 0.072 0.148
#> GSM1009145     4   0.647      0.736 0.128 0.008 0.032 0.616 0.216
#> GSM1009159     1   0.395      0.576 0.824 0.012 0.012 0.036 0.116
#> GSM1009173     3   0.304      0.983 0.012 0.104 0.868 0.008 0.008
#> GSM1009187     2   0.868      0.445 0.256 0.356 0.092 0.032 0.264
#> GSM1009201     1   0.218      0.717 0.920 0.008 0.024 0.048 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
#> GSM1009062     6   0.576     0.9945 0.216 0.040 0.000 0.084 0.020 0.640
#> GSM1009076     5   0.707     0.4980 0.024 0.360 0.072 0.012 0.448 0.084
#> GSM1009090     4   0.730     0.7563 0.172 0.060 0.000 0.524 0.080 0.164
#> GSM1009104     5   0.324     0.5703 0.004 0.000 0.244 0.000 0.752 0.000
#> GSM1009118     1   0.672     0.4458 0.564 0.236 0.000 0.076 0.068 0.056
#> GSM1009132     4   0.155     0.7557 0.044 0.008 0.000 0.940 0.004 0.004
#> GSM1009146     1   0.512     0.5879 0.728 0.072 0.004 0.028 0.028 0.140
#> GSM1009160     3   0.175     0.9652 0.008 0.024 0.940 0.004 0.008 0.016
#> GSM1009174     2   0.577     0.9969 0.148 0.664 0.024 0.004 0.132 0.028
#> GSM1009188     1   0.207     0.7018 0.916 0.012 0.000 0.056 0.004 0.012
#> GSM1009063     6   0.576     0.9945 0.216 0.040 0.000 0.084 0.020 0.640
#> GSM1009077     5   0.707     0.4980 0.024 0.360 0.072 0.012 0.448 0.084
#> GSM1009091     4   0.730     0.7563 0.172 0.060 0.000 0.524 0.080 0.164
#> GSM1009105     5   0.324     0.5703 0.004 0.000 0.244 0.000 0.752 0.000
#> GSM1009119     1   0.469     0.6422 0.768 0.100 0.000 0.056 0.028 0.048
#> GSM1009133     4   0.155     0.7557 0.044 0.008 0.000 0.940 0.004 0.004
#> GSM1009147     1   0.512     0.5879 0.728 0.072 0.004 0.028 0.028 0.140
#> GSM1009161     3   0.175     0.9652 0.008 0.024 0.940 0.004 0.008 0.016
#> GSM1009175     2   0.577     0.9969 0.148 0.664 0.024 0.004 0.132 0.028
#> GSM1009189     1   0.207     0.7018 0.916 0.012 0.000 0.056 0.004 0.012
#> GSM1009064     6   0.601     0.9919 0.216 0.052 0.000 0.084 0.024 0.624
#> GSM1009078     5   0.707     0.4430 0.044 0.364 0.040 0.012 0.448 0.092
#> GSM1009092     4   0.730     0.7563 0.172 0.060 0.000 0.524 0.080 0.164
#> GSM1009106     5   0.338     0.5702 0.004 0.000 0.244 0.004 0.748 0.000
#> GSM1009120     1   0.463     0.6436 0.772 0.100 0.000 0.052 0.028 0.048
#> GSM1009134     4   0.155     0.7557 0.044 0.008 0.000 0.940 0.004 0.004
#> GSM1009148     1   0.512     0.5879 0.728 0.072 0.004 0.028 0.028 0.140
#> GSM1009162     3   0.112     0.9611 0.008 0.004 0.964 0.000 0.008 0.016
#> GSM1009176     2   0.577     0.9916 0.144 0.664 0.024 0.004 0.136 0.028
#> GSM1009190     1   0.207     0.7018 0.916 0.012 0.000 0.056 0.004 0.012
#> GSM1009065     6   0.601     0.9919 0.216 0.052 0.000 0.084 0.024 0.624
#> GSM1009079     5   0.707     0.4980 0.024 0.360 0.072 0.012 0.448 0.084
#> GSM1009093     4   0.730     0.7563 0.172 0.060 0.000 0.524 0.080 0.164
#> GSM1009107     5   0.324     0.5703 0.004 0.000 0.244 0.000 0.752 0.000
#> GSM1009121     1   0.671     0.4659 0.576 0.216 0.000 0.076 0.076 0.056
#> GSM1009135     4   0.155     0.7557 0.044 0.008 0.000 0.940 0.004 0.004
#> GSM1009149     1   0.512     0.5879 0.728 0.072 0.004 0.028 0.028 0.140
#> GSM1009163     3   0.213     0.9631 0.008 0.024 0.924 0.012 0.008 0.024
#> GSM1009177     2   0.577     0.9916 0.144 0.664 0.024 0.004 0.136 0.028
#> GSM1009191     1   0.207     0.7018 0.916 0.012 0.000 0.056 0.004 0.012
#> GSM1009066     6   0.589     0.9939 0.216 0.044 0.000 0.084 0.024 0.632
#> GSM1009080     5   0.707     0.4980 0.024 0.360 0.072 0.012 0.448 0.084
#> GSM1009094     4   0.730     0.7563 0.172 0.060 0.000 0.524 0.080 0.164
#> GSM1009108     5   0.338     0.5702 0.004 0.000 0.244 0.004 0.748 0.000
#> GSM1009122     1   0.734     0.3283 0.504 0.248 0.004 0.076 0.112 0.056
#> GSM1009136     4   0.187     0.7549 0.044 0.012 0.004 0.928 0.012 0.000
#> GSM1009150     1   0.512     0.5879 0.728 0.072 0.004 0.028 0.028 0.140
#> GSM1009164     3   0.213     0.9631 0.008 0.024 0.924 0.012 0.008 0.024
#> GSM1009178     2   0.577     0.9969 0.148 0.664 0.024 0.004 0.132 0.028
#> GSM1009192     1   0.207     0.7018 0.916 0.012 0.000 0.056 0.004 0.012
#> GSM1009067     6   0.576     0.9945 0.216 0.040 0.000 0.084 0.020 0.640
#> GSM1009081     5   0.707     0.4980 0.024 0.360 0.072 0.012 0.448 0.084
#> GSM1009095     4   0.750     0.7530 0.172 0.072 0.004 0.524 0.092 0.136
#> GSM1009109     5   0.338     0.5702 0.004 0.000 0.244 0.004 0.748 0.000
#> GSM1009123     1   0.500     0.6326 0.744 0.108 0.000 0.072 0.028 0.048
#> GSM1009137     4   0.155     0.7557 0.044 0.008 0.000 0.940 0.004 0.004
#> GSM1009151     1   0.512     0.5879 0.728 0.072 0.004 0.028 0.028 0.140
#> GSM1009165     3   0.155     0.9618 0.008 0.004 0.948 0.008 0.008 0.024
#> GSM1009179     2   0.577     0.9969 0.148 0.664 0.024 0.004 0.132 0.028
#> GSM1009193     1   0.196     0.7014 0.920 0.008 0.000 0.056 0.004 0.012
#> GSM1009068     6   0.576     0.9945 0.216 0.040 0.000 0.084 0.020 0.640
#> GSM1009082     5   0.707     0.4980 0.024 0.360 0.072 0.012 0.448 0.084
#> GSM1009096     4   0.730     0.7563 0.172 0.060 0.000 0.524 0.080 0.164
#> GSM1009110     5   0.406     0.5643 0.004 0.004 0.244 0.008 0.724 0.016
#> GSM1009124     1   0.554     0.5895 0.676 0.184 0.000 0.072 0.024 0.044
#> GSM1009138     4   0.155     0.7557 0.044 0.008 0.000 0.940 0.004 0.004
#> GSM1009152     1   0.512     0.5879 0.728 0.072 0.004 0.028 0.028 0.140
#> GSM1009166     3   0.112     0.9611 0.008 0.004 0.964 0.000 0.008 0.016
#> GSM1009180     2   0.577     0.9969 0.148 0.664 0.024 0.004 0.132 0.028
#> GSM1009194     1   0.207     0.7018 0.916 0.012 0.000 0.056 0.004 0.012
#> GSM1009069     6   0.601     0.9919 0.216 0.052 0.000 0.084 0.024 0.624
#> GSM1009083     5   0.707     0.4980 0.024 0.360 0.072 0.012 0.448 0.084
#> GSM1009097     4   0.730     0.7563 0.172 0.060 0.000 0.524 0.080 0.164
#> GSM1009111     5   0.324     0.5703 0.004 0.000 0.244 0.000 0.752 0.000
#> GSM1009125     1   0.761     0.3111 0.492 0.248 0.016 0.076 0.112 0.056
#> GSM1009139     4   0.155     0.7557 0.044 0.008 0.000 0.940 0.004 0.004
#> GSM1009153     1   0.512     0.5879 0.728 0.072 0.004 0.028 0.028 0.140
#> GSM1009167     3   0.235     0.9410 0.008 0.032 0.912 0.008 0.008 0.032
#> GSM1009181     2   0.577     0.9916 0.144 0.664 0.024 0.004 0.136 0.028
#> GSM1009195     1   0.216     0.7006 0.912 0.016 0.000 0.056 0.004 0.012
#> GSM1009070     6   0.572     0.9897 0.220 0.036 0.000 0.084 0.020 0.640
#> GSM1009084     5   0.707     0.4980 0.024 0.360 0.072 0.012 0.448 0.084
#> GSM1009098     4   0.733     0.7562 0.172 0.064 0.000 0.524 0.080 0.160
#> GSM1009112     5   0.324     0.5703 0.004 0.000 0.244 0.000 0.752 0.000
#> GSM1009126     1   0.554     0.5895 0.676 0.184 0.000 0.072 0.024 0.044
#> GSM1009140     4   0.155     0.7557 0.044 0.008 0.000 0.940 0.004 0.004
#> GSM1009154     1   0.512     0.5879 0.728 0.072 0.004 0.028 0.028 0.140
#> GSM1009168     3   0.199     0.9487 0.008 0.032 0.928 0.004 0.008 0.020
#> GSM1009182     2   0.577     0.9969 0.148 0.664 0.024 0.004 0.132 0.028
#> GSM1009196     1   0.207     0.7018 0.916 0.012 0.000 0.056 0.004 0.012
#> GSM1009071     6   0.595     0.9932 0.216 0.048 0.000 0.084 0.024 0.628
#> GSM1009085     5   0.707     0.4980 0.024 0.360 0.072 0.012 0.448 0.084
#> GSM1009099     4   0.733     0.7562 0.172 0.064 0.000 0.524 0.080 0.160
#> GSM1009113     5   0.338     0.5702 0.004 0.000 0.244 0.004 0.748 0.000
#> GSM1009127     1   0.504     0.6305 0.740 0.112 0.000 0.072 0.028 0.048
#> GSM1009141     4   0.155     0.7557 0.044 0.008 0.000 0.940 0.004 0.004
#> GSM1009155     1   0.512     0.5879 0.728 0.072 0.004 0.028 0.028 0.140
#> GSM1009169     3   0.208     0.9470 0.008 0.032 0.924 0.004 0.008 0.024
#> GSM1009183     2   0.577     0.9969 0.148 0.664 0.024 0.004 0.132 0.028
#> GSM1009197     1   0.207     0.7018 0.916 0.012 0.000 0.056 0.004 0.012
#> GSM1009072     6   0.576     0.9945 0.216 0.040 0.000 0.084 0.020 0.640
#> GSM1009086     5   0.707     0.4980 0.024 0.360 0.072 0.012 0.448 0.084
#> GSM1009100     4   0.733     0.7562 0.172 0.064 0.000 0.524 0.080 0.160
#> GSM1009114     5   0.377     0.5668 0.004 0.004 0.244 0.004 0.736 0.008
#> GSM1009128     1   0.636     0.5174 0.612 0.200 0.000 0.076 0.064 0.048
#> GSM1009142     4   0.155     0.7557 0.044 0.008 0.000 0.940 0.004 0.004
#> GSM1009156     1   0.512     0.5879 0.728 0.072 0.004 0.028 0.028 0.140
#> GSM1009170     3   0.213     0.9631 0.008 0.024 0.924 0.012 0.008 0.024
#> GSM1009184     2   0.584     0.9954 0.148 0.660 0.024 0.004 0.132 0.032
#> GSM1009198     1   0.207     0.7018 0.916 0.012 0.000 0.056 0.004 0.012
#> GSM1009073     6   0.595     0.9932 0.216 0.048 0.000 0.084 0.024 0.628
#> GSM1009087     5   0.707     0.4430 0.044 0.364 0.040 0.012 0.448 0.092
#> GSM1009101     4   0.733     0.7562 0.172 0.064 0.000 0.524 0.080 0.160
#> GSM1009115     5   0.324     0.5703 0.004 0.000 0.244 0.000 0.752 0.000
#> GSM1009129     1   0.769     0.2862 0.480 0.248 0.016 0.072 0.128 0.056
#> GSM1009143     4   0.211     0.7534 0.044 0.016 0.004 0.920 0.012 0.004
#> GSM1009157     1   0.518     0.5846 0.724 0.076 0.004 0.028 0.028 0.140
#> GSM1009171     3   0.187     0.9652 0.008 0.012 0.936 0.012 0.008 0.024
#> GSM1009185     2   0.577     0.9969 0.148 0.664 0.024 0.004 0.132 0.028
#> GSM1009199     1   0.216     0.7006 0.912 0.016 0.000 0.056 0.004 0.012
#> GSM1009074     6   0.576     0.9945 0.216 0.040 0.000 0.084 0.020 0.640
#> GSM1009088     5   0.707     0.4430 0.044 0.364 0.040 0.012 0.448 0.092
#> GSM1009102     4   0.750     0.7530 0.172 0.072 0.004 0.524 0.092 0.136
#> GSM1009116     5   0.338     0.5702 0.004 0.000 0.244 0.004 0.748 0.000
#> GSM1009130     1   0.824     0.0108 0.372 0.236 0.032 0.032 0.248 0.080
#> GSM1009144     4   0.211     0.7534 0.044 0.016 0.004 0.920 0.012 0.004
#> GSM1009158     1   0.512     0.5879 0.728 0.072 0.004 0.028 0.028 0.140
#> GSM1009172     3   0.175     0.9652 0.008 0.024 0.940 0.004 0.008 0.016
#> GSM1009186     2   0.584     0.9954 0.148 0.660 0.024 0.004 0.132 0.032
#> GSM1009200     1   0.207     0.7018 0.916 0.012 0.000 0.056 0.004 0.012
#> GSM1009075     6   0.582     0.9943 0.216 0.044 0.000 0.084 0.020 0.636
#> GSM1009089     5   0.704     0.4217 0.056 0.364 0.028 0.012 0.448 0.092
#> GSM1009103     4   0.750     0.7530 0.172 0.072 0.004 0.524 0.092 0.136
#> GSM1009117     5   0.377     0.5668 0.004 0.004 0.244 0.004 0.736 0.008
#> GSM1009131     1   0.671     0.4642 0.576 0.216 0.000 0.072 0.080 0.056
#> GSM1009145     4   0.187     0.7549 0.044 0.012 0.004 0.928 0.012 0.000
#> GSM1009159     1   0.512     0.5879 0.728 0.072 0.004 0.028 0.028 0.140
#> GSM1009173     3   0.104     0.9648 0.008 0.000 0.968 0.008 0.008 0.008
#> GSM1009187     2   0.584     0.9954 0.148 0.660 0.024 0.004 0.132 0.032
#> GSM1009201     1   0.207     0.7018 0.916 0.012 0.000 0.056 0.004 0.012

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

consensus_heatmap(res, k = 2)

plot of chunk tab-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 temperature(p) time(p) specimen(p) k
#> CV:kmeans 131          0.992   0.987    1.87e-22 2
#> CV:kmeans  55          0.999   1.000    6.87e-12 3
#> CV:kmeans 104          1.000   1.000    1.14e-53 4
#> CV:kmeans 108          1.000   1.000    5.93e-74 5
#> CV:kmeans 119          1.000   1.000   5.46e-100 6

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


CV:skmeans**

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

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

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

res
#> A 'ConsensusPartition' object with k = 2, 3, 4, 5, 6.
#>   On a matrix with 51941 rows and 140 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 1.000           0.989       0.995         0.5005 0.500   0.500
#> 3 3 0.643           0.858       0.899         0.3118 0.825   0.657
#> 4 4 0.702           0.721       0.825         0.1241 0.877   0.664
#> 5 5 0.784           0.679       0.763         0.0659 0.853   0.512
#> 6 6 0.817           0.733       0.744         0.0404 0.851   0.441

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
#> GSM1009062     1  0.0000      0.995 1.000 0.000
#> GSM1009076     2  0.0000      0.996 0.000 1.000
#> GSM1009090     1  0.0000      0.995 1.000 0.000
#> GSM1009104     2  0.0000      0.996 0.000 1.000
#> GSM1009118     2  0.8267      0.645 0.260 0.740
#> GSM1009132     1  0.0000      0.995 1.000 0.000
#> GSM1009146     1  0.0000      0.995 1.000 0.000
#> GSM1009160     2  0.0000      0.996 0.000 1.000
#> GSM1009174     2  0.0000      0.996 0.000 1.000
#> GSM1009188     1  0.0000      0.995 1.000 0.000
#> GSM1009063     1  0.0000      0.995 1.000 0.000
#> GSM1009077     2  0.0000      0.996 0.000 1.000
#> GSM1009091     1  0.0000      0.995 1.000 0.000
#> GSM1009105     2  0.0000      0.996 0.000 1.000
#> GSM1009119     1  0.0000      0.995 1.000 0.000
#> GSM1009133     1  0.0000      0.995 1.000 0.000
#> GSM1009147     1  0.0000      0.995 1.000 0.000
#> GSM1009161     2  0.0000      0.996 0.000 1.000
#> GSM1009175     2  0.0000      0.996 0.000 1.000
#> GSM1009189     1  0.0000      0.995 1.000 0.000
#> GSM1009064     1  0.0000      0.995 1.000 0.000
#> GSM1009078     2  0.0000      0.996 0.000 1.000
#> GSM1009092     1  0.0000      0.995 1.000 0.000
#> GSM1009106     2  0.0000      0.996 0.000 1.000
#> GSM1009120     1  0.0000      0.995 1.000 0.000
#> GSM1009134     1  0.0000      0.995 1.000 0.000
#> GSM1009148     1  0.0000      0.995 1.000 0.000
#> GSM1009162     2  0.0000      0.996 0.000 1.000
#> GSM1009176     2  0.0000      0.996 0.000 1.000
#> GSM1009190     1  0.0000      0.995 1.000 0.000
#> GSM1009065     1  0.0000      0.995 1.000 0.000
#> GSM1009079     2  0.0000      0.996 0.000 1.000
#> GSM1009093     1  0.0000      0.995 1.000 0.000
#> GSM1009107     2  0.0000      0.996 0.000 1.000
#> GSM1009121     2  0.0376      0.992 0.004 0.996
#> GSM1009135     1  0.0000      0.995 1.000 0.000
#> GSM1009149     1  0.0000      0.995 1.000 0.000
#> GSM1009163     2  0.0000      0.996 0.000 1.000
#> GSM1009177     2  0.0000      0.996 0.000 1.000
#> GSM1009191     1  0.0000      0.995 1.000 0.000
#> GSM1009066     1  0.0000      0.995 1.000 0.000
#> GSM1009080     2  0.0000      0.996 0.000 1.000
#> GSM1009094     1  0.0000      0.995 1.000 0.000
#> GSM1009108     2  0.0000      0.996 0.000 1.000
#> GSM1009122     2  0.0000      0.996 0.000 1.000
#> GSM1009136     1  0.0000      0.995 1.000 0.000
#> GSM1009150     1  0.0000      0.995 1.000 0.000
#> GSM1009164     2  0.0000      0.996 0.000 1.000
#> GSM1009178     2  0.0000      0.996 0.000 1.000
#> GSM1009192     1  0.0000      0.995 1.000 0.000
#> GSM1009067     1  0.0000      0.995 1.000 0.000
#> GSM1009081     2  0.0000      0.996 0.000 1.000
#> GSM1009095     1  0.0000      0.995 1.000 0.000
#> GSM1009109     2  0.0000      0.996 0.000 1.000
#> GSM1009123     1  0.0000      0.995 1.000 0.000
#> GSM1009137     1  0.0000      0.995 1.000 0.000
#> GSM1009151     1  0.0000      0.995 1.000 0.000
#> GSM1009165     2  0.0000      0.996 0.000 1.000
#> GSM1009179     2  0.0000      0.996 0.000 1.000
#> GSM1009193     1  0.0000      0.995 1.000 0.000
#> GSM1009068     1  0.0000      0.995 1.000 0.000
#> GSM1009082     2  0.0000      0.996 0.000 1.000
#> GSM1009096     1  0.0000      0.995 1.000 0.000
#> GSM1009110     2  0.0000      0.996 0.000 1.000
#> GSM1009124     1  0.0000      0.995 1.000 0.000
#> GSM1009138     1  0.0000      0.995 1.000 0.000
#> GSM1009152     1  0.0000      0.995 1.000 0.000
#> GSM1009166     2  0.0000      0.996 0.000 1.000
#> GSM1009180     2  0.0000      0.996 0.000 1.000
#> GSM1009194     1  0.0000      0.995 1.000 0.000
#> GSM1009069     1  0.0000      0.995 1.000 0.000
#> GSM1009083     2  0.0000      0.996 0.000 1.000
#> GSM1009097     1  0.0000      0.995 1.000 0.000
#> GSM1009111     2  0.0000      0.996 0.000 1.000
#> GSM1009125     2  0.0000      0.996 0.000 1.000
#> GSM1009139     1  0.0000      0.995 1.000 0.000
#> GSM1009153     1  0.0000      0.995 1.000 0.000
#> GSM1009167     2  0.0000      0.996 0.000 1.000
#> GSM1009181     2  0.0000      0.996 0.000 1.000
#> GSM1009195     1  0.6247      0.815 0.844 0.156
#> GSM1009070     1  0.0000      0.995 1.000 0.000
#> GSM1009084     2  0.0000      0.996 0.000 1.000
#> GSM1009098     1  0.0000      0.995 1.000 0.000
#> GSM1009112     2  0.0000      0.996 0.000 1.000
#> GSM1009126     1  0.0000      0.995 1.000 0.000
#> GSM1009140     1  0.0000      0.995 1.000 0.000
#> GSM1009154     1  0.0000      0.995 1.000 0.000
#> GSM1009168     2  0.0000      0.996 0.000 1.000
#> GSM1009182     2  0.0000      0.996 0.000 1.000
#> GSM1009196     1  0.0000      0.995 1.000 0.000
#> GSM1009071     1  0.0000      0.995 1.000 0.000
#> GSM1009085     2  0.0000      0.996 0.000 1.000
#> GSM1009099     1  0.0000      0.995 1.000 0.000
#> GSM1009113     2  0.0000      0.996 0.000 1.000
#> GSM1009127     1  0.0000      0.995 1.000 0.000
#> GSM1009141     1  0.0000      0.995 1.000 0.000
#> GSM1009155     1  0.0000      0.995 1.000 0.000
#> GSM1009169     2  0.0000      0.996 0.000 1.000
#> GSM1009183     2  0.0000      0.996 0.000 1.000
#> GSM1009197     1  0.0000      0.995 1.000 0.000
#> GSM1009072     1  0.0000      0.995 1.000 0.000
#> GSM1009086     2  0.0000      0.996 0.000 1.000
#> GSM1009100     1  0.0000      0.995 1.000 0.000
#> GSM1009114     2  0.0000      0.996 0.000 1.000
#> GSM1009128     2  0.0000      0.996 0.000 1.000
#> GSM1009142     1  0.0000      0.995 1.000 0.000
#> GSM1009156     1  0.1414      0.975 0.980 0.020
#> GSM1009170     2  0.0000      0.996 0.000 1.000
#> GSM1009184     2  0.0000      0.996 0.000 1.000
#> GSM1009198     1  0.0000      0.995 1.000 0.000
#> GSM1009073     1  0.0000      0.995 1.000 0.000
#> GSM1009087     2  0.0000      0.996 0.000 1.000
#> GSM1009101     1  0.0000      0.995 1.000 0.000
#> GSM1009115     2  0.0000      0.996 0.000 1.000
#> GSM1009129     2  0.0000      0.996 0.000 1.000
#> GSM1009143     1  0.0000      0.995 1.000 0.000
#> GSM1009157     1  0.7528      0.726 0.784 0.216
#> GSM1009171     2  0.0000      0.996 0.000 1.000
#> GSM1009185     2  0.0000      0.996 0.000 1.000
#> GSM1009199     1  0.0000      0.995 1.000 0.000
#> GSM1009074     1  0.0000      0.995 1.000 0.000
#> GSM1009088     2  0.0000      0.996 0.000 1.000
#> GSM1009102     1  0.0000      0.995 1.000 0.000
#> GSM1009116     2  0.0000      0.996 0.000 1.000
#> GSM1009130     2  0.0000      0.996 0.000 1.000
#> GSM1009144     1  0.0000      0.995 1.000 0.000
#> GSM1009158     1  0.0000      0.995 1.000 0.000
#> GSM1009172     2  0.0000      0.996 0.000 1.000
#> GSM1009186     2  0.0000      0.996 0.000 1.000
#> GSM1009200     1  0.0000      0.995 1.000 0.000
#> GSM1009075     1  0.0000      0.995 1.000 0.000
#> GSM1009089     2  0.0000      0.996 0.000 1.000
#> GSM1009103     1  0.0000      0.995 1.000 0.000
#> GSM1009117     2  0.0000      0.996 0.000 1.000
#> GSM1009131     2  0.0000      0.996 0.000 1.000
#> GSM1009145     1  0.0000      0.995 1.000 0.000
#> GSM1009159     1  0.0000      0.995 1.000 0.000
#> GSM1009173     2  0.0000      0.996 0.000 1.000
#> GSM1009187     2  0.0000      0.996 0.000 1.000
#> GSM1009201     1  0.0000      0.995 1.000 0.000

show/hide code output

cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#>            class entropy silhouette    p1    p2    p3
#> GSM1009062     1  0.5201      0.779 0.760 0.004 0.236
#> GSM1009076     2  0.1529      0.912 0.040 0.960 0.000
#> GSM1009090     3  0.1163      0.916 0.028 0.000 0.972
#> GSM1009104     2  0.0000      0.914 0.000 1.000 0.000
#> GSM1009118     3  0.7525      0.640 0.228 0.096 0.676
#> GSM1009132     3  0.0892      0.915 0.020 0.000 0.980
#> GSM1009146     1  0.1753      0.875 0.952 0.000 0.048
#> GSM1009160     2  0.2486      0.898 0.008 0.932 0.060
#> GSM1009174     2  0.4784      0.831 0.200 0.796 0.004
#> GSM1009188     1  0.3116      0.866 0.892 0.000 0.108
#> GSM1009063     1  0.5201      0.779 0.760 0.004 0.236
#> GSM1009077     2  0.1529      0.912 0.040 0.960 0.000
#> GSM1009091     3  0.1163      0.916 0.028 0.000 0.972
#> GSM1009105     2  0.0000      0.914 0.000 1.000 0.000
#> GSM1009119     3  0.6008      0.497 0.372 0.000 0.628
#> GSM1009133     3  0.0892      0.915 0.020 0.000 0.980
#> GSM1009147     1  0.1753      0.875 0.952 0.000 0.048
#> GSM1009161     2  0.2486      0.898 0.008 0.932 0.060
#> GSM1009175     2  0.4784      0.831 0.200 0.796 0.004
#> GSM1009189     1  0.3116      0.866 0.892 0.000 0.108
#> GSM1009064     1  0.5201      0.779 0.760 0.004 0.236
#> GSM1009078     2  0.1529      0.912 0.040 0.960 0.000
#> GSM1009092     3  0.1163      0.916 0.028 0.000 0.972
#> GSM1009106     2  0.0000      0.914 0.000 1.000 0.000
#> GSM1009120     1  0.3941      0.818 0.844 0.000 0.156
#> GSM1009134     3  0.0892      0.915 0.020 0.000 0.980
#> GSM1009148     1  0.1753      0.875 0.952 0.000 0.048
#> GSM1009162     2  0.2486      0.898 0.008 0.932 0.060
#> GSM1009176     2  0.4784      0.831 0.200 0.796 0.004
#> GSM1009190     1  0.3116      0.866 0.892 0.000 0.108
#> GSM1009065     1  0.5201      0.779 0.760 0.004 0.236
#> GSM1009079     2  0.1529      0.912 0.040 0.960 0.000
#> GSM1009093     3  0.1163      0.916 0.028 0.000 0.972
#> GSM1009107     2  0.0000      0.914 0.000 1.000 0.000
#> GSM1009121     3  0.7766      0.643 0.176 0.148 0.676
#> GSM1009135     3  0.0892      0.915 0.020 0.000 0.980
#> GSM1009149     1  0.1753      0.875 0.952 0.000 0.048
#> GSM1009163     2  0.2486      0.898 0.008 0.932 0.060
#> GSM1009177     2  0.4784      0.831 0.200 0.796 0.004
#> GSM1009191     1  0.3116      0.866 0.892 0.000 0.108
#> GSM1009066     1  0.5201      0.779 0.760 0.004 0.236
#> GSM1009080     2  0.1529      0.912 0.040 0.960 0.000
#> GSM1009094     3  0.1163      0.916 0.028 0.000 0.972
#> GSM1009108     2  0.0000      0.914 0.000 1.000 0.000
#> GSM1009122     2  0.6239      0.749 0.072 0.768 0.160
#> GSM1009136     3  0.0892      0.915 0.020 0.000 0.980
#> GSM1009150     1  0.1753      0.875 0.952 0.000 0.048
#> GSM1009164     2  0.2486      0.898 0.008 0.932 0.060
#> GSM1009178     2  0.4784      0.831 0.200 0.796 0.004
#> GSM1009192     1  0.3116      0.866 0.892 0.000 0.108
#> GSM1009067     1  0.5201      0.779 0.760 0.004 0.236
#> GSM1009081     2  0.1529      0.912 0.040 0.960 0.000
#> GSM1009095     3  0.1163      0.916 0.028 0.000 0.972
#> GSM1009109     2  0.0000      0.914 0.000 1.000 0.000
#> GSM1009123     3  0.5291      0.661 0.268 0.000 0.732
#> GSM1009137     3  0.0892      0.915 0.020 0.000 0.980
#> GSM1009151     1  0.1753      0.875 0.952 0.000 0.048
#> GSM1009165     2  0.2486      0.898 0.008 0.932 0.060
#> GSM1009179     2  0.4784      0.831 0.200 0.796 0.004
#> GSM1009193     1  0.3116      0.866 0.892 0.000 0.108
#> GSM1009068     1  0.5201      0.779 0.760 0.004 0.236
#> GSM1009082     2  0.1529      0.912 0.040 0.960 0.000
#> GSM1009096     3  0.1163      0.916 0.028 0.000 0.972
#> GSM1009110     2  0.0000      0.914 0.000 1.000 0.000
#> GSM1009124     3  0.5443      0.661 0.260 0.004 0.736
#> GSM1009138     3  0.0892      0.915 0.020 0.000 0.980
#> GSM1009152     1  0.1753      0.875 0.952 0.000 0.048
#> GSM1009166     2  0.2486      0.898 0.008 0.932 0.060
#> GSM1009180     2  0.4784      0.831 0.200 0.796 0.004
#> GSM1009194     1  0.3116      0.866 0.892 0.000 0.108
#> GSM1009069     1  0.5551      0.759 0.768 0.020 0.212
#> GSM1009083     2  0.1529      0.912 0.040 0.960 0.000
#> GSM1009097     3  0.1163      0.916 0.028 0.000 0.972
#> GSM1009111     2  0.0000      0.914 0.000 1.000 0.000
#> GSM1009125     2  0.6062      0.758 0.064 0.776 0.160
#> GSM1009139     3  0.0892      0.915 0.020 0.000 0.980
#> GSM1009153     1  0.1753      0.875 0.952 0.000 0.048
#> GSM1009167     2  0.2486      0.898 0.008 0.932 0.060
#> GSM1009181     2  0.4784      0.831 0.200 0.796 0.004
#> GSM1009195     1  0.2959      0.864 0.900 0.000 0.100
#> GSM1009070     1  0.5201      0.779 0.760 0.004 0.236
#> GSM1009084     2  0.1529      0.912 0.040 0.960 0.000
#> GSM1009098     3  0.1163      0.916 0.028 0.000 0.972
#> GSM1009112     2  0.0000      0.914 0.000 1.000 0.000
#> GSM1009126     3  0.5443      0.661 0.260 0.004 0.736
#> GSM1009140     3  0.0892      0.915 0.020 0.000 0.980
#> GSM1009154     1  0.1753      0.875 0.952 0.000 0.048
#> GSM1009168     2  0.2486      0.898 0.008 0.932 0.060
#> GSM1009182     2  0.4784      0.831 0.200 0.796 0.004
#> GSM1009196     1  0.3116      0.866 0.892 0.000 0.108
#> GSM1009071     1  0.5201      0.779 0.760 0.004 0.236
#> GSM1009085     2  0.1529      0.912 0.040 0.960 0.000
#> GSM1009099     3  0.1163      0.916 0.028 0.000 0.972
#> GSM1009113     2  0.0000      0.914 0.000 1.000 0.000
#> GSM1009127     3  0.5948      0.501 0.360 0.000 0.640
#> GSM1009141     3  0.0892      0.915 0.020 0.000 0.980
#> GSM1009155     1  0.1753      0.875 0.952 0.000 0.048
#> GSM1009169     2  0.2486      0.898 0.008 0.932 0.060
#> GSM1009183     2  0.4784      0.831 0.200 0.796 0.004
#> GSM1009197     1  0.3116      0.866 0.892 0.000 0.108
#> GSM1009072     1  0.5201      0.779 0.760 0.004 0.236
#> GSM1009086     2  0.1529      0.912 0.040 0.960 0.000
#> GSM1009100     3  0.1163      0.916 0.028 0.000 0.972
#> GSM1009114     2  0.0000      0.914 0.000 1.000 0.000
#> GSM1009128     3  0.7552      0.659 0.168 0.140 0.692
#> GSM1009142     3  0.0892      0.915 0.020 0.000 0.980
#> GSM1009156     1  0.1711      0.859 0.960 0.008 0.032
#> GSM1009170     2  0.2486      0.898 0.008 0.932 0.060
#> GSM1009184     2  0.4784      0.831 0.200 0.796 0.004
#> GSM1009198     1  0.3116      0.866 0.892 0.000 0.108
#> GSM1009073     1  0.5201      0.779 0.760 0.004 0.236
#> GSM1009087     2  0.1529      0.912 0.040 0.960 0.000
#> GSM1009101     3  0.1163      0.916 0.028 0.000 0.972
#> GSM1009115     2  0.0000      0.914 0.000 1.000 0.000
#> GSM1009129     2  0.4475      0.852 0.064 0.864 0.072
#> GSM1009143     3  0.0892      0.915 0.020 0.000 0.980
#> GSM1009157     1  0.1015      0.844 0.980 0.008 0.012
#> GSM1009171     2  0.2486      0.898 0.008 0.932 0.060
#> GSM1009185     2  0.4784      0.831 0.200 0.796 0.004
#> GSM1009199     1  0.3038      0.865 0.896 0.000 0.104
#> GSM1009074     1  0.5201      0.779 0.760 0.004 0.236
#> GSM1009088     2  0.1529      0.912 0.040 0.960 0.000
#> GSM1009102     3  0.1163      0.916 0.028 0.000 0.972
#> GSM1009116     2  0.0000      0.914 0.000 1.000 0.000
#> GSM1009130     2  0.3083      0.885 0.060 0.916 0.024
#> GSM1009144     3  0.0892      0.915 0.020 0.000 0.980
#> GSM1009158     1  0.1753      0.875 0.952 0.000 0.048
#> GSM1009172     2  0.2486      0.898 0.008 0.932 0.060
#> GSM1009186     2  0.4784      0.831 0.200 0.796 0.004
#> GSM1009200     1  0.3116      0.866 0.892 0.000 0.108
#> GSM1009075     1  0.5201      0.779 0.760 0.004 0.236
#> GSM1009089     2  0.4452      0.800 0.192 0.808 0.000
#> GSM1009103     3  0.1163      0.916 0.028 0.000 0.972
#> GSM1009117     2  0.0000      0.914 0.000 1.000 0.000
#> GSM1009131     2  0.7278      0.674 0.152 0.712 0.136
#> GSM1009145     3  0.0892      0.915 0.020 0.000 0.980
#> GSM1009159     1  0.1860      0.875 0.948 0.000 0.052
#> GSM1009173     2  0.2486      0.898 0.008 0.932 0.060
#> GSM1009187     2  0.4784      0.831 0.200 0.796 0.004
#> GSM1009201     1  0.3116      0.866 0.892 0.000 0.108

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>            class entropy silhouette    p1    p2    p3    p4
#> GSM1009062     1  0.5542    0.75107 0.732 0.044 0.020 0.204
#> GSM1009076     2  0.2408    0.66186 0.000 0.896 0.104 0.000
#> GSM1009090     4  0.1389    0.94944 0.048 0.000 0.000 0.952
#> GSM1009104     2  0.4925    0.34655 0.000 0.572 0.428 0.000
#> GSM1009118     3  0.6742    0.54148 0.100 0.076 0.700 0.124
#> GSM1009132     4  0.0000    0.94855 0.000 0.000 0.000 1.000
#> GSM1009146     1  0.0524    0.86313 0.988 0.004 0.000 0.008
#> GSM1009160     3  0.3402    0.74128 0.000 0.164 0.832 0.004
#> GSM1009174     2  0.4633    0.59248 0.048 0.780 0.172 0.000
#> GSM1009188     1  0.2860    0.85282 0.904 0.004 0.048 0.044
#> GSM1009063     1  0.5542    0.75107 0.732 0.044 0.020 0.204
#> GSM1009077     2  0.2408    0.66186 0.000 0.896 0.104 0.000
#> GSM1009091     4  0.1389    0.94944 0.048 0.000 0.000 0.952
#> GSM1009105     2  0.4925    0.34655 0.000 0.572 0.428 0.000
#> GSM1009119     1  0.4819    0.74398 0.784 0.004 0.060 0.152
#> GSM1009133     4  0.0000    0.94855 0.000 0.000 0.000 1.000
#> GSM1009147     1  0.0524    0.86313 0.988 0.004 0.000 0.008
#> GSM1009161     3  0.3402    0.74128 0.000 0.164 0.832 0.004
#> GSM1009175     2  0.4633    0.59248 0.048 0.780 0.172 0.000
#> GSM1009189     1  0.2860    0.85282 0.904 0.004 0.048 0.044
#> GSM1009064     1  0.5542    0.75107 0.732 0.044 0.020 0.204
#> GSM1009078     2  0.2408    0.66186 0.000 0.896 0.104 0.000
#> GSM1009092     4  0.1389    0.94944 0.048 0.000 0.000 0.952
#> GSM1009106     2  0.4925    0.34655 0.000 0.572 0.428 0.000
#> GSM1009120     1  0.2944    0.85069 0.900 0.004 0.052 0.044
#> GSM1009134     4  0.0000    0.94855 0.000 0.000 0.000 1.000
#> GSM1009148     1  0.0524    0.86313 0.988 0.004 0.000 0.008
#> GSM1009162     3  0.3402    0.74128 0.000 0.164 0.832 0.004
#> GSM1009176     2  0.4633    0.59248 0.048 0.780 0.172 0.000
#> GSM1009190     1  0.2860    0.85282 0.904 0.004 0.048 0.044
#> GSM1009065     1  0.5542    0.75107 0.732 0.044 0.020 0.204
#> GSM1009079     2  0.2408    0.66186 0.000 0.896 0.104 0.000
#> GSM1009093     4  0.1389    0.94944 0.048 0.000 0.000 0.952
#> GSM1009107     2  0.4925    0.34655 0.000 0.572 0.428 0.000
#> GSM1009121     3  0.6453    0.55272 0.064 0.084 0.716 0.136
#> GSM1009135     4  0.0000    0.94855 0.000 0.000 0.000 1.000
#> GSM1009149     1  0.0524    0.86313 0.988 0.004 0.000 0.008
#> GSM1009163     3  0.3402    0.74128 0.000 0.164 0.832 0.004
#> GSM1009177     2  0.4633    0.59248 0.048 0.780 0.172 0.000
#> GSM1009191     1  0.2860    0.85282 0.904 0.004 0.048 0.044
#> GSM1009066     1  0.5542    0.75107 0.732 0.044 0.020 0.204
#> GSM1009080     2  0.2408    0.66186 0.000 0.896 0.104 0.000
#> GSM1009094     4  0.1389    0.94944 0.048 0.000 0.000 0.952
#> GSM1009108     2  0.4925    0.34655 0.000 0.572 0.428 0.000
#> GSM1009122     3  0.5194    0.59913 0.056 0.112 0.792 0.040
#> GSM1009136     4  0.0000    0.94855 0.000 0.000 0.000 1.000
#> GSM1009150     1  0.0524    0.86313 0.988 0.004 0.000 0.008
#> GSM1009164     3  0.3402    0.74128 0.000 0.164 0.832 0.004
#> GSM1009178     2  0.4633    0.59248 0.048 0.780 0.172 0.000
#> GSM1009192     1  0.2860    0.85282 0.904 0.004 0.048 0.044
#> GSM1009067     1  0.5542    0.75107 0.732 0.044 0.020 0.204
#> GSM1009081     2  0.2408    0.66186 0.000 0.896 0.104 0.000
#> GSM1009095     4  0.1389    0.94944 0.048 0.000 0.000 0.952
#> GSM1009109     2  0.4925    0.34655 0.000 0.572 0.428 0.000
#> GSM1009123     4  0.7372    0.12402 0.400 0.004 0.140 0.456
#> GSM1009137     4  0.0000    0.94855 0.000 0.000 0.000 1.000
#> GSM1009151     1  0.0524    0.86313 0.988 0.004 0.000 0.008
#> GSM1009165     3  0.3402    0.74128 0.000 0.164 0.832 0.004
#> GSM1009179     2  0.4633    0.59248 0.048 0.780 0.172 0.000
#> GSM1009193     1  0.2860    0.85282 0.904 0.004 0.048 0.044
#> GSM1009068     1  0.5542    0.75107 0.732 0.044 0.020 0.204
#> GSM1009082     2  0.2408    0.66186 0.000 0.896 0.104 0.000
#> GSM1009096     4  0.1389    0.94944 0.048 0.000 0.000 0.952
#> GSM1009110     2  0.4925    0.34655 0.000 0.572 0.428 0.000
#> GSM1009124     3  0.8235    0.00949 0.240 0.016 0.404 0.340
#> GSM1009138     4  0.0000    0.94855 0.000 0.000 0.000 1.000
#> GSM1009152     1  0.0524    0.86313 0.988 0.004 0.000 0.008
#> GSM1009166     3  0.3402    0.74128 0.000 0.164 0.832 0.004
#> GSM1009180     2  0.4633    0.59248 0.048 0.780 0.172 0.000
#> GSM1009194     1  0.2860    0.85282 0.904 0.004 0.048 0.044
#> GSM1009069     1  0.5542    0.75107 0.732 0.044 0.020 0.204
#> GSM1009083     2  0.2408    0.66186 0.000 0.896 0.104 0.000
#> GSM1009097     4  0.1389    0.94944 0.048 0.000 0.000 0.952
#> GSM1009111     2  0.4925    0.34655 0.000 0.572 0.428 0.000
#> GSM1009125     3  0.5194    0.59913 0.056 0.112 0.792 0.040
#> GSM1009139     4  0.0000    0.94855 0.000 0.000 0.000 1.000
#> GSM1009153     1  0.0524    0.86313 0.988 0.004 0.000 0.008
#> GSM1009167     3  0.3402    0.74128 0.000 0.164 0.832 0.004
#> GSM1009181     2  0.4633    0.59248 0.048 0.780 0.172 0.000
#> GSM1009195     1  0.2860    0.85282 0.904 0.004 0.048 0.044
#> GSM1009070     1  0.5542    0.75107 0.732 0.044 0.020 0.204
#> GSM1009084     2  0.2408    0.66186 0.000 0.896 0.104 0.000
#> GSM1009098     4  0.1389    0.94944 0.048 0.000 0.000 0.952
#> GSM1009112     2  0.4925    0.34655 0.000 0.572 0.428 0.000
#> GSM1009126     3  0.8235    0.00949 0.240 0.016 0.404 0.340
#> GSM1009140     4  0.0000    0.94855 0.000 0.000 0.000 1.000
#> GSM1009154     1  0.0524    0.86313 0.988 0.004 0.000 0.008
#> GSM1009168     3  0.3402    0.74128 0.000 0.164 0.832 0.004
#> GSM1009182     2  0.4633    0.59248 0.048 0.780 0.172 0.000
#> GSM1009196     1  0.2860    0.85282 0.904 0.004 0.048 0.044
#> GSM1009071     1  0.5542    0.75107 0.732 0.044 0.020 0.204
#> GSM1009085     2  0.2408    0.66186 0.000 0.896 0.104 0.000
#> GSM1009099     4  0.1389    0.94944 0.048 0.000 0.000 0.952
#> GSM1009113     2  0.4925    0.34655 0.000 0.572 0.428 0.000
#> GSM1009127     1  0.5540    0.70314 0.740 0.004 0.108 0.148
#> GSM1009141     4  0.0000    0.94855 0.000 0.000 0.000 1.000
#> GSM1009155     1  0.0524    0.86313 0.988 0.004 0.000 0.008
#> GSM1009169     3  0.3402    0.74128 0.000 0.164 0.832 0.004
#> GSM1009183     2  0.4633    0.59248 0.048 0.780 0.172 0.000
#> GSM1009197     1  0.2860    0.85282 0.904 0.004 0.048 0.044
#> GSM1009072     1  0.5542    0.75107 0.732 0.044 0.020 0.204
#> GSM1009086     2  0.2408    0.66186 0.000 0.896 0.104 0.000
#> GSM1009100     4  0.1389    0.94944 0.048 0.000 0.000 0.952
#> GSM1009114     2  0.4925    0.34655 0.000 0.572 0.428 0.000
#> GSM1009128     3  0.6507    0.53283 0.076 0.052 0.700 0.172
#> GSM1009142     4  0.0000    0.94855 0.000 0.000 0.000 1.000
#> GSM1009156     1  0.0524    0.86149 0.988 0.008 0.000 0.004
#> GSM1009170     3  0.3402    0.74128 0.000 0.164 0.832 0.004
#> GSM1009184     2  0.4633    0.59248 0.048 0.780 0.172 0.000
#> GSM1009198     1  0.2860    0.85282 0.904 0.004 0.048 0.044
#> GSM1009073     1  0.5542    0.75107 0.732 0.044 0.020 0.204
#> GSM1009087     2  0.2408    0.66186 0.000 0.896 0.104 0.000
#> GSM1009101     4  0.1389    0.94944 0.048 0.000 0.000 0.952
#> GSM1009115     2  0.4925    0.34655 0.000 0.572 0.428 0.000
#> GSM1009129     3  0.4720    0.59799 0.056 0.120 0.808 0.016
#> GSM1009143     4  0.0000    0.94855 0.000 0.000 0.000 1.000
#> GSM1009157     1  0.0657    0.86017 0.984 0.012 0.000 0.004
#> GSM1009171     3  0.3402    0.74128 0.000 0.164 0.832 0.004
#> GSM1009185     2  0.4633    0.59248 0.048 0.780 0.172 0.000
#> GSM1009199     1  0.2860    0.85282 0.904 0.004 0.048 0.044
#> GSM1009074     1  0.5542    0.75107 0.732 0.044 0.020 0.204
#> GSM1009088     2  0.2408    0.66186 0.000 0.896 0.104 0.000
#> GSM1009102     4  0.1389    0.94944 0.048 0.000 0.000 0.952
#> GSM1009116     2  0.4925    0.34655 0.000 0.572 0.428 0.000
#> GSM1009130     3  0.5537    0.60198 0.056 0.256 0.688 0.000
#> GSM1009144     4  0.0000    0.94855 0.000 0.000 0.000 1.000
#> GSM1009158     1  0.0524    0.86313 0.988 0.004 0.000 0.008
#> GSM1009172     3  0.3402    0.74128 0.000 0.164 0.832 0.004
#> GSM1009186     2  0.4633    0.59248 0.048 0.780 0.172 0.000
#> GSM1009200     1  0.2860    0.85282 0.904 0.004 0.048 0.044
#> GSM1009075     1  0.5542    0.75107 0.732 0.044 0.020 0.204
#> GSM1009089     2  0.2843    0.65310 0.020 0.892 0.088 0.000
#> GSM1009103     4  0.1389    0.94944 0.048 0.000 0.000 0.952
#> GSM1009117     2  0.4925    0.34655 0.000 0.572 0.428 0.000
#> GSM1009131     3  0.4903    0.59364 0.060 0.128 0.796 0.016
#> GSM1009145     4  0.0000    0.94855 0.000 0.000 0.000 1.000
#> GSM1009159     1  0.0524    0.86313 0.988 0.004 0.000 0.008
#> GSM1009173     3  0.3402    0.74128 0.000 0.164 0.832 0.004
#> GSM1009187     2  0.4633    0.59248 0.048 0.780 0.172 0.000
#> GSM1009201     1  0.2860    0.85282 0.904 0.004 0.048 0.044

show/hide code output

cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#>            class entropy silhouette    p1    p2    p3    p4    p5
#> GSM1009062     1  0.1701     0.7031 0.936 0.016 0.000 0.048 0.000
#> GSM1009076     2  0.4361     0.6721 0.060 0.792 0.124 0.000 0.024
#> GSM1009090     4  0.0324     0.9832 0.004 0.000 0.000 0.992 0.004
#> GSM1009104     3  0.5568     0.5028 0.020 0.472 0.476 0.000 0.032
#> GSM1009118     5  0.7053     0.3310 0.032 0.108 0.280 0.028 0.552
#> GSM1009132     4  0.0794     0.9833 0.028 0.000 0.000 0.972 0.000
#> GSM1009146     1  0.4251     0.6058 0.624 0.000 0.000 0.004 0.372
#> GSM1009160     3  0.0324     0.6690 0.000 0.000 0.992 0.004 0.004
#> GSM1009174     2  0.4371     0.7267 0.032 0.776 0.028 0.000 0.164
#> GSM1009188     5  0.4080     0.5684 0.252 0.000 0.000 0.020 0.728
#> GSM1009063     1  0.1701     0.7031 0.936 0.016 0.000 0.048 0.000
#> GSM1009077     2  0.4361     0.6721 0.060 0.792 0.124 0.000 0.024
#> GSM1009091     4  0.0324     0.9832 0.004 0.000 0.000 0.992 0.004
#> GSM1009105     3  0.5568     0.5028 0.020 0.472 0.476 0.000 0.032
#> GSM1009119     5  0.4354     0.5655 0.180 0.000 0.004 0.056 0.760
#> GSM1009133     4  0.0794     0.9833 0.028 0.000 0.000 0.972 0.000
#> GSM1009147     1  0.4251     0.6058 0.624 0.000 0.000 0.004 0.372
#> GSM1009161     3  0.0324     0.6690 0.000 0.000 0.992 0.004 0.004
#> GSM1009175     2  0.4371     0.7267 0.032 0.776 0.028 0.000 0.164
#> GSM1009189     5  0.4080     0.5684 0.252 0.000 0.000 0.020 0.728
#> GSM1009064     1  0.1701     0.7031 0.936 0.016 0.000 0.048 0.000
#> GSM1009078     2  0.4361     0.6721 0.060 0.792 0.124 0.000 0.024
#> GSM1009092     4  0.0324     0.9832 0.004 0.000 0.000 0.992 0.004
#> GSM1009106     3  0.5568     0.5028 0.020 0.472 0.476 0.000 0.032
#> GSM1009120     5  0.3944     0.5601 0.212 0.000 0.004 0.020 0.764
#> GSM1009134     4  0.0794     0.9833 0.028 0.000 0.000 0.972 0.000
#> GSM1009148     1  0.4251     0.6058 0.624 0.000 0.000 0.004 0.372
#> GSM1009162     3  0.0324     0.6690 0.000 0.000 0.992 0.004 0.004
#> GSM1009176     2  0.4371     0.7267 0.032 0.776 0.028 0.000 0.164
#> GSM1009190     5  0.4080     0.5684 0.252 0.000 0.000 0.020 0.728
#> GSM1009065     1  0.1701     0.7031 0.936 0.016 0.000 0.048 0.000
#> GSM1009079     2  0.4361     0.6721 0.060 0.792 0.124 0.000 0.024
#> GSM1009093     4  0.0324     0.9832 0.004 0.000 0.000 0.992 0.004
#> GSM1009107     3  0.5568     0.5028 0.020 0.472 0.476 0.000 0.032
#> GSM1009121     5  0.7037     0.3175 0.028 0.112 0.284 0.028 0.548
#> GSM1009135     4  0.0794     0.9833 0.028 0.000 0.000 0.972 0.000
#> GSM1009149     1  0.4251     0.6058 0.624 0.000 0.000 0.004 0.372
#> GSM1009163     3  0.0324     0.6690 0.000 0.000 0.992 0.004 0.004
#> GSM1009177     2  0.4371     0.7267 0.032 0.776 0.028 0.000 0.164
#> GSM1009191     5  0.4080     0.5684 0.252 0.000 0.000 0.020 0.728
#> GSM1009066     1  0.1701     0.7031 0.936 0.016 0.000 0.048 0.000
#> GSM1009080     2  0.4361     0.6721 0.060 0.792 0.124 0.000 0.024
#> GSM1009094     4  0.0324     0.9832 0.004 0.000 0.000 0.992 0.004
#> GSM1009108     3  0.5568     0.5028 0.020 0.472 0.476 0.000 0.032
#> GSM1009122     5  0.7033     0.2758 0.028 0.120 0.304 0.020 0.528
#> GSM1009136     4  0.0794     0.9833 0.028 0.000 0.000 0.972 0.000
#> GSM1009150     1  0.4251     0.6058 0.624 0.000 0.000 0.004 0.372
#> GSM1009164     3  0.0324     0.6690 0.000 0.000 0.992 0.004 0.004
#> GSM1009178     2  0.4371     0.7267 0.032 0.776 0.028 0.000 0.164
#> GSM1009192     5  0.4080     0.5684 0.252 0.000 0.000 0.020 0.728
#> GSM1009067     1  0.1701     0.7031 0.936 0.016 0.000 0.048 0.000
#> GSM1009081     2  0.4361     0.6721 0.060 0.792 0.124 0.000 0.024
#> GSM1009095     4  0.0324     0.9832 0.004 0.000 0.000 0.992 0.004
#> GSM1009109     3  0.5568     0.5028 0.020 0.472 0.476 0.000 0.032
#> GSM1009123     5  0.4460     0.5204 0.060 0.000 0.012 0.160 0.768
#> GSM1009137     4  0.0794     0.9833 0.028 0.000 0.000 0.972 0.000
#> GSM1009151     1  0.4251     0.6058 0.624 0.000 0.000 0.004 0.372
#> GSM1009165     3  0.0324     0.6690 0.000 0.000 0.992 0.004 0.004
#> GSM1009179     2  0.4371     0.7267 0.032 0.776 0.028 0.000 0.164
#> GSM1009193     5  0.4080     0.5684 0.252 0.000 0.000 0.020 0.728
#> GSM1009068     1  0.1701     0.7031 0.936 0.016 0.000 0.048 0.000
#> GSM1009082     2  0.4361     0.6721 0.060 0.792 0.124 0.000 0.024
#> GSM1009096     4  0.0324     0.9832 0.004 0.000 0.000 0.992 0.004
#> GSM1009110     3  0.5568     0.5028 0.020 0.472 0.476 0.000 0.032
#> GSM1009124     5  0.5219     0.5239 0.016 0.052 0.096 0.072 0.764
#> GSM1009138     4  0.0794     0.9833 0.028 0.000 0.000 0.972 0.000
#> GSM1009152     1  0.4251     0.6058 0.624 0.000 0.000 0.004 0.372
#> GSM1009166     3  0.0324     0.6690 0.000 0.000 0.992 0.004 0.004
#> GSM1009180     2  0.4371     0.7267 0.032 0.776 0.028 0.000 0.164
#> GSM1009194     5  0.4080     0.5684 0.252 0.000 0.000 0.020 0.728
#> GSM1009069     1  0.1701     0.7031 0.936 0.016 0.000 0.048 0.000
#> GSM1009083     2  0.4361     0.6721 0.060 0.792 0.124 0.000 0.024
#> GSM1009097     4  0.0324     0.9832 0.004 0.000 0.000 0.992 0.004
#> GSM1009111     3  0.5568     0.5028 0.020 0.472 0.476 0.000 0.032
#> GSM1009125     5  0.6972     0.2705 0.024 0.120 0.308 0.020 0.528
#> GSM1009139     4  0.0794     0.9833 0.028 0.000 0.000 0.972 0.000
#> GSM1009153     1  0.4251     0.6058 0.624 0.000 0.000 0.004 0.372
#> GSM1009167     3  0.0324     0.6690 0.000 0.000 0.992 0.004 0.004
#> GSM1009181     2  0.4371     0.7267 0.032 0.776 0.028 0.000 0.164
#> GSM1009195     5  0.4080     0.5684 0.252 0.000 0.000 0.020 0.728
#> GSM1009070     1  0.1701     0.7031 0.936 0.016 0.000 0.048 0.000
#> GSM1009084     2  0.4361     0.6721 0.060 0.792 0.124 0.000 0.024
#> GSM1009098     4  0.0324     0.9832 0.004 0.000 0.000 0.992 0.004
#> GSM1009112     3  0.5568     0.5028 0.020 0.472 0.476 0.000 0.032
#> GSM1009126     5  0.5219     0.5239 0.016 0.052 0.096 0.072 0.764
#> GSM1009140     4  0.0794     0.9833 0.028 0.000 0.000 0.972 0.000
#> GSM1009154     1  0.4251     0.6058 0.624 0.000 0.000 0.004 0.372
#> GSM1009168     3  0.0324     0.6690 0.000 0.000 0.992 0.004 0.004
#> GSM1009182     2  0.4371     0.7267 0.032 0.776 0.028 0.000 0.164
#> GSM1009196     5  0.4080     0.5684 0.252 0.000 0.000 0.020 0.728
#> GSM1009071     1  0.1701     0.7031 0.936 0.016 0.000 0.048 0.000
#> GSM1009085     2  0.4361     0.6721 0.060 0.792 0.124 0.000 0.024
#> GSM1009099     4  0.0324     0.9832 0.004 0.000 0.000 0.992 0.004
#> GSM1009113     3  0.5568     0.5028 0.020 0.472 0.476 0.000 0.032
#> GSM1009127     5  0.4177     0.5652 0.168 0.000 0.004 0.052 0.776
#> GSM1009141     4  0.0794     0.9833 0.028 0.000 0.000 0.972 0.000
#> GSM1009155     1  0.4251     0.6058 0.624 0.000 0.000 0.004 0.372
#> GSM1009169     3  0.0324     0.6690 0.000 0.000 0.992 0.004 0.004
#> GSM1009183     2  0.4371     0.7267 0.032 0.776 0.028 0.000 0.164
#> GSM1009197     5  0.4080     0.5684 0.252 0.000 0.000 0.020 0.728
#> GSM1009072     1  0.1701     0.7031 0.936 0.016 0.000 0.048 0.000
#> GSM1009086     2  0.4361     0.6721 0.060 0.792 0.124 0.000 0.024
#> GSM1009100     4  0.0324     0.9832 0.004 0.000 0.000 0.992 0.004
#> GSM1009114     3  0.5568     0.5028 0.020 0.472 0.476 0.000 0.032
#> GSM1009128     5  0.7053     0.3411 0.024 0.084 0.284 0.052 0.556
#> GSM1009142     4  0.0794     0.9833 0.028 0.000 0.000 0.972 0.000
#> GSM1009156     1  0.4251     0.6058 0.624 0.000 0.000 0.004 0.372
#> GSM1009170     3  0.0324     0.6690 0.000 0.000 0.992 0.004 0.004
#> GSM1009184     2  0.4371     0.7267 0.032 0.776 0.028 0.000 0.164
#> GSM1009198     5  0.4080     0.5684 0.252 0.000 0.000 0.020 0.728
#> GSM1009073     1  0.1701     0.7031 0.936 0.016 0.000 0.048 0.000
#> GSM1009087     2  0.4361     0.6721 0.060 0.792 0.124 0.000 0.024
#> GSM1009101     4  0.0324     0.9832 0.004 0.000 0.000 0.992 0.004
#> GSM1009115     3  0.5568     0.5028 0.020 0.472 0.476 0.000 0.032
#> GSM1009129     5  0.6901     0.2611 0.024 0.120 0.312 0.016 0.528
#> GSM1009143     4  0.0794     0.9833 0.028 0.000 0.000 0.972 0.000
#> GSM1009157     1  0.4251     0.6058 0.624 0.000 0.000 0.004 0.372
#> GSM1009171     3  0.0324     0.6690 0.000 0.000 0.992 0.004 0.004
#> GSM1009185     2  0.4371     0.7267 0.032 0.776 0.028 0.000 0.164
#> GSM1009199     5  0.4080     0.5684 0.252 0.000 0.000 0.020 0.728
#> GSM1009074     1  0.1701     0.7031 0.936 0.016 0.000 0.048 0.000
#> GSM1009088     2  0.4361     0.6721 0.060 0.792 0.124 0.000 0.024
#> GSM1009102     4  0.0324     0.9832 0.004 0.000 0.000 0.992 0.004
#> GSM1009116     3  0.5568     0.5028 0.020 0.472 0.476 0.000 0.032
#> GSM1009130     5  0.6796    -0.0413 0.024 0.140 0.408 0.000 0.428
#> GSM1009144     4  0.0794     0.9833 0.028 0.000 0.000 0.972 0.000
#> GSM1009158     1  0.4251     0.6058 0.624 0.000 0.000 0.004 0.372
#> GSM1009172     3  0.0324     0.6690 0.000 0.000 0.992 0.004 0.004
#> GSM1009186     2  0.4371     0.7267 0.032 0.776 0.028 0.000 0.164
#> GSM1009200     5  0.4080     0.5684 0.252 0.000 0.000 0.020 0.728
#> GSM1009075     1  0.1701     0.7031 0.936 0.016 0.000 0.048 0.000
#> GSM1009089     2  0.4433     0.6692 0.060 0.792 0.116 0.000 0.032
#> GSM1009103     4  0.0324     0.9832 0.004 0.000 0.000 0.992 0.004
#> GSM1009117     3  0.5568     0.5028 0.020 0.472 0.476 0.000 0.032
#> GSM1009131     5  0.6935     0.2796 0.028 0.120 0.300 0.016 0.536
#> GSM1009145     4  0.0794     0.9833 0.028 0.000 0.000 0.972 0.000
#> GSM1009159     1  0.4251     0.6058 0.624 0.000 0.000 0.004 0.372
#> GSM1009173     3  0.0324     0.6690 0.000 0.000 0.992 0.004 0.004
#> GSM1009187     2  0.4371     0.7267 0.032 0.776 0.028 0.000 0.164
#> GSM1009201     5  0.4080     0.5684 0.252 0.000 0.000 0.020 0.728

show/hide code output

cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#>            class entropy silhouette    p1    p2    p3    p4    p5    p6
#> GSM1009062     6  0.2243    1.00000 0.112 0.004 0.000 0.004 0.000 0.880
#> GSM1009076     5  0.5598    0.44842 0.000 0.332 0.024 0.000 0.552 0.092
#> GSM1009090     4  0.1082    0.95918 0.000 0.000 0.000 0.956 0.040 0.004
#> GSM1009104     5  0.5734    0.53389 0.000 0.196 0.264 0.000 0.536 0.004
#> GSM1009118     5  0.8221    0.05428 0.284 0.092 0.116 0.016 0.404 0.088
#> GSM1009132     4  0.1152    0.95820 0.000 0.000 0.000 0.952 0.004 0.044
#> GSM1009146     1  0.4898    0.49466 0.612 0.016 0.000 0.000 0.048 0.324
#> GSM1009160     3  0.0458    1.00000 0.000 0.016 0.984 0.000 0.000 0.000
#> GSM1009174     2  0.0291    1.00000 0.004 0.992 0.000 0.000 0.000 0.004
#> GSM1009188     1  0.0291    0.69137 0.992 0.000 0.000 0.004 0.000 0.004
#> GSM1009063     6  0.2243    1.00000 0.112 0.004 0.000 0.004 0.000 0.880
#> GSM1009077     5  0.5598    0.44842 0.000 0.332 0.024 0.000 0.552 0.092
#> GSM1009091     4  0.1082    0.95918 0.000 0.000 0.000 0.956 0.040 0.004
#> GSM1009105     5  0.5734    0.53389 0.000 0.196 0.264 0.000 0.536 0.004
#> GSM1009119     1  0.5574    0.50068 0.644 0.000 0.016 0.028 0.224 0.088
#> GSM1009133     4  0.1152    0.95820 0.000 0.000 0.000 0.952 0.004 0.044
#> GSM1009147     1  0.4898    0.49466 0.612 0.016 0.000 0.000 0.048 0.324
#> GSM1009161     3  0.0458    1.00000 0.000 0.016 0.984 0.000 0.000 0.000
#> GSM1009175     2  0.0291    1.00000 0.004 0.992 0.000 0.000 0.000 0.004
#> GSM1009189     1  0.0291    0.69137 0.992 0.000 0.000 0.004 0.000 0.004
#> GSM1009064     6  0.2243    1.00000 0.112 0.004 0.000 0.004 0.000 0.880
#> GSM1009078     5  0.5598    0.44842 0.000 0.332 0.024 0.000 0.552 0.092
#> GSM1009092     4  0.1082    0.95918 0.000 0.000 0.000 0.956 0.040 0.004
#> GSM1009106     5  0.5734    0.53389 0.000 0.196 0.264 0.000 0.536 0.004
#> GSM1009120     1  0.5550    0.50345 0.648 0.000 0.016 0.028 0.220 0.088
#> GSM1009134     4  0.1152    0.95820 0.000 0.000 0.000 0.952 0.004 0.044
#> GSM1009148     1  0.4898    0.49466 0.612 0.016 0.000 0.000 0.048 0.324
#> GSM1009162     3  0.0458    1.00000 0.000 0.016 0.984 0.000 0.000 0.000
#> GSM1009176     2  0.0291    1.00000 0.004 0.992 0.000 0.000 0.000 0.004
#> GSM1009190     1  0.0291    0.69137 0.992 0.000 0.000 0.004 0.000 0.004
#> GSM1009065     6  0.2243    1.00000 0.112 0.004 0.000 0.004 0.000 0.880
#> GSM1009079     5  0.5598    0.44842 0.000 0.332 0.024 0.000 0.552 0.092
#> GSM1009093     4  0.1082    0.95918 0.000 0.000 0.000 0.956 0.040 0.004
#> GSM1009107     5  0.5734    0.53389 0.000 0.196 0.264 0.000 0.536 0.004
#> GSM1009121     5  0.8348    0.05354 0.280 0.092 0.116 0.024 0.400 0.088
#> GSM1009135     4  0.1152    0.95820 0.000 0.000 0.000 0.952 0.004 0.044
#> GSM1009149     1  0.4898    0.49466 0.612 0.016 0.000 0.000 0.048 0.324
#> GSM1009163     3  0.0458    1.00000 0.000 0.016 0.984 0.000 0.000 0.000
#> GSM1009177     2  0.0291    1.00000 0.004 0.992 0.000 0.000 0.000 0.004
#> GSM1009191     1  0.0291    0.69137 0.992 0.000 0.000 0.004 0.000 0.004
#> GSM1009066     6  0.2243    1.00000 0.112 0.004 0.000 0.004 0.000 0.880
#> GSM1009080     5  0.5598    0.44842 0.000 0.332 0.024 0.000 0.552 0.092
#> GSM1009094     4  0.1082    0.95918 0.000 0.000 0.000 0.956 0.040 0.004
#> GSM1009108     5  0.5734    0.53389 0.000 0.196 0.264 0.000 0.536 0.004
#> GSM1009122     5  0.8072    0.11555 0.264 0.092 0.124 0.008 0.424 0.088
#> GSM1009136     4  0.1082    0.95845 0.000 0.000 0.000 0.956 0.004 0.040
#> GSM1009150     1  0.4898    0.49466 0.612 0.016 0.000 0.000 0.048 0.324
#> GSM1009164     3  0.0458    1.00000 0.000 0.016 0.984 0.000 0.000 0.000
#> GSM1009178     2  0.0291    1.00000 0.004 0.992 0.000 0.000 0.000 0.004
#> GSM1009192     1  0.0291    0.69137 0.992 0.000 0.000 0.004 0.000 0.004
#> GSM1009067     6  0.2243    1.00000 0.112 0.004 0.000 0.004 0.000 0.880
#> GSM1009081     5  0.5598    0.44842 0.000 0.332 0.024 0.000 0.552 0.092
#> GSM1009095     4  0.1082    0.95918 0.000 0.000 0.000 0.956 0.040 0.004
#> GSM1009109     5  0.5734    0.53389 0.000 0.196 0.264 0.000 0.536 0.004
#> GSM1009123     1  0.5933    0.47934 0.620 0.000 0.020 0.044 0.228 0.088
#> GSM1009137     4  0.1152    0.95820 0.000 0.000 0.000 0.952 0.004 0.044
#> GSM1009151     1  0.4898    0.49466 0.612 0.016 0.000 0.000 0.048 0.324
#> GSM1009165     3  0.0458    1.00000 0.000 0.016 0.984 0.000 0.000 0.000
#> GSM1009179     2  0.0291    1.00000 0.004 0.992 0.000 0.000 0.000 0.004
#> GSM1009193     1  0.0291    0.69137 0.992 0.000 0.000 0.004 0.000 0.004
#> GSM1009068     6  0.2243    1.00000 0.112 0.004 0.000 0.004 0.000 0.880
#> GSM1009082     5  0.5598    0.44842 0.000 0.332 0.024 0.000 0.552 0.092
#> GSM1009096     4  0.1082    0.95918 0.000 0.000 0.000 0.956 0.040 0.004
#> GSM1009110     5  0.5734    0.53389 0.000 0.196 0.264 0.000 0.536 0.004
#> GSM1009124     1  0.7500    0.32999 0.508 0.072 0.044 0.032 0.256 0.088
#> GSM1009138     4  0.1152    0.95820 0.000 0.000 0.000 0.952 0.004 0.044
#> GSM1009152     1  0.4898    0.49466 0.612 0.016 0.000 0.000 0.048 0.324
#> GSM1009166     3  0.0458    1.00000 0.000 0.016 0.984 0.000 0.000 0.000
#> GSM1009180     2  0.0291    1.00000 0.004 0.992 0.000 0.000 0.000 0.004
#> GSM1009194     1  0.0291    0.69137 0.992 0.000 0.000 0.004 0.000 0.004
#> GSM1009069     6  0.2243    1.00000 0.112 0.004 0.000 0.004 0.000 0.880
#> GSM1009083     5  0.5598    0.44842 0.000 0.332 0.024 0.000 0.552 0.092
#> GSM1009097     4  0.1082    0.95918 0.000 0.000 0.000 0.956 0.040 0.004
#> GSM1009111     5  0.5734    0.53389 0.000 0.196 0.264 0.000 0.536 0.004
#> GSM1009125     5  0.8072    0.11555 0.264 0.092 0.124 0.008 0.424 0.088
#> GSM1009139     4  0.1152    0.95820 0.000 0.000 0.000 0.952 0.004 0.044
#> GSM1009153     1  0.4898    0.49466 0.612 0.016 0.000 0.000 0.048 0.324
#> GSM1009167     3  0.0458    1.00000 0.000 0.016 0.984 0.000 0.000 0.000
#> GSM1009181     2  0.0291    1.00000 0.004 0.992 0.000 0.000 0.000 0.004
#> GSM1009195     1  0.0291    0.69137 0.992 0.000 0.000 0.004 0.000 0.004
#> GSM1009070     6  0.2243    1.00000 0.112 0.004 0.000 0.004 0.000 0.880
#> GSM1009084     5  0.5598    0.44842 0.000 0.332 0.024 0.000 0.552 0.092
#> GSM1009098     4  0.1082    0.95918 0.000 0.000 0.000 0.956 0.040 0.004
#> GSM1009112     5  0.5734    0.53389 0.000 0.196 0.264 0.000 0.536 0.004
#> GSM1009126     1  0.7543    0.32423 0.504 0.076 0.044 0.032 0.256 0.088
#> GSM1009140     4  0.1152    0.95820 0.000 0.000 0.000 0.952 0.004 0.044
#> GSM1009154     1  0.4898    0.49466 0.612 0.016 0.000 0.000 0.048 0.324
#> GSM1009168     3  0.0458    1.00000 0.000 0.016 0.984 0.000 0.000 0.000
#> GSM1009182     2  0.0291    1.00000 0.004 0.992 0.000 0.000 0.000 0.004
#> GSM1009196     1  0.0291    0.69137 0.992 0.000 0.000 0.004 0.000 0.004
#> GSM1009071     6  0.2243    1.00000 0.112 0.004 0.000 0.004 0.000 0.880
#> GSM1009085     5  0.5598    0.44842 0.000 0.332 0.024 0.000 0.552 0.092
#> GSM1009099     4  0.1082    0.95918 0.000 0.000 0.000 0.956 0.040 0.004
#> GSM1009113     5  0.5734    0.53389 0.000 0.196 0.264 0.000 0.536 0.004
#> GSM1009127     1  0.5699    0.49155 0.632 0.000 0.020 0.028 0.232 0.088
#> GSM1009141     4  0.1152    0.95820 0.000 0.000 0.000 0.952 0.004 0.044
#> GSM1009155     1  0.4898    0.49466 0.612 0.016 0.000 0.000 0.048 0.324
#> GSM1009169     3  0.0458    1.00000 0.000 0.016 0.984 0.000 0.000 0.000
#> GSM1009183     2  0.0291    1.00000 0.004 0.992 0.000 0.000 0.000 0.004
#> GSM1009197     1  0.0291    0.69137 0.992 0.000 0.000 0.004 0.000 0.004
#> GSM1009072     6  0.2243    1.00000 0.112 0.004 0.000 0.004 0.000 0.880
#> GSM1009086     5  0.5598    0.44842 0.000 0.332 0.024 0.000 0.552 0.092
#> GSM1009100     4  0.1082    0.95918 0.000 0.000 0.000 0.956 0.040 0.004
#> GSM1009114     5  0.5734    0.53389 0.000 0.196 0.264 0.000 0.536 0.004
#> GSM1009128     5  0.8523   -0.00276 0.304 0.088 0.116 0.036 0.368 0.088
#> GSM1009142     4  0.1152    0.95820 0.000 0.000 0.000 0.952 0.004 0.044
#> GSM1009156     1  0.4898    0.49466 0.612 0.016 0.000 0.000 0.048 0.324
#> GSM1009170     3  0.0458    1.00000 0.000 0.016 0.984 0.000 0.000 0.000
#> GSM1009184     2  0.0291    1.00000 0.004 0.992 0.000 0.000 0.000 0.004
#> GSM1009198     1  0.0291    0.69137 0.992 0.000 0.000 0.004 0.000 0.004
#> GSM1009073     6  0.2243    1.00000 0.112 0.004 0.000 0.004 0.000 0.880
#> GSM1009087     5  0.5598    0.44842 0.000 0.332 0.024 0.000 0.552 0.092
#> GSM1009101     4  0.1082    0.95918 0.000 0.000 0.000 0.956 0.040 0.004
#> GSM1009115     5  0.5734    0.53389 0.000 0.196 0.264 0.000 0.536 0.004
#> GSM1009129     5  0.8026    0.12432 0.260 0.088 0.124 0.008 0.432 0.088
#> GSM1009143     4  0.1152    0.95820 0.000 0.000 0.000 0.952 0.004 0.044
#> GSM1009157     1  0.4898    0.49466 0.612 0.016 0.000 0.000 0.048 0.324
#> GSM1009171     3  0.0458    1.00000 0.000 0.016 0.984 0.000 0.000 0.000
#> GSM1009185     2  0.0291    1.00000 0.004 0.992 0.000 0.000 0.000 0.004
#> GSM1009199     1  0.0291    0.69137 0.992 0.000 0.000 0.004 0.000 0.004
#> GSM1009074     6  0.2243    1.00000 0.112 0.004 0.000 0.004 0.000 0.880
#> GSM1009088     5  0.5598    0.44842 0.000 0.332 0.024 0.000 0.552 0.092
#> GSM1009102     4  0.1082    0.95918 0.000 0.000 0.000 0.956 0.040 0.004
#> GSM1009116     5  0.5734    0.53389 0.000 0.196 0.264 0.000 0.536 0.004
#> GSM1009130     5  0.6460    0.24712 0.156 0.008 0.144 0.004 0.596 0.092
#> GSM1009144     4  0.1152    0.95820 0.000 0.000 0.000 0.952 0.004 0.044
#> GSM1009158     1  0.4898    0.49466 0.612 0.016 0.000 0.000 0.048 0.324
#> GSM1009172     3  0.0458    1.00000 0.000 0.016 0.984 0.000 0.000 0.000
#> GSM1009186     2  0.0291    1.00000 0.004 0.992 0.000 0.000 0.000 0.004
#> GSM1009200     1  0.0291    0.69137 0.992 0.000 0.000 0.004 0.000 0.004
#> GSM1009075     6  0.2243    1.00000 0.112 0.004 0.000 0.004 0.000 0.880
#> GSM1009089     5  0.5598    0.44842 0.000 0.332 0.024 0.000 0.552 0.092
#> GSM1009103     4  0.1082    0.95918 0.000 0.000 0.000 0.956 0.040 0.004
#> GSM1009117     5  0.5734    0.53389 0.000 0.196 0.264 0.000 0.536 0.004
#> GSM1009131     5  0.7938    0.09911 0.276 0.080 0.116 0.008 0.432 0.088
#> GSM1009145     4  0.1082    0.95845 0.000 0.000 0.000 0.956 0.004 0.040
#> GSM1009159     1  0.4898    0.49466 0.612 0.016 0.000 0.000 0.048 0.324
#> GSM1009173     3  0.0458    1.00000 0.000 0.016 0.984 0.000 0.000 0.000
#> GSM1009187     2  0.0291    1.00000 0.004 0.992 0.000 0.000 0.000 0.004
#> GSM1009201     1  0.0291    0.69137 0.992 0.000 0.000 0.004 0.000 0.004

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

consensus_heatmap(res, k = 2)

plot of chunk tab-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 temperature(p) time(p) specimen(p) k
#> CV:skmeans 140          0.897   0.998    7.21e-23 2
#> CV:skmeans 139          0.997   1.000    7.22e-44 3
#> CV:skmeans 123          0.999   1.000    8.47e-60 4
#> CV:skmeans 132          1.000   1.000    9.80e-89 5
#> CV:skmeans 100          1.000   1.000    1.23e-83 6

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


CV:pam**

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

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

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

res
#> A 'ConsensusPartition' object with k = 2, 3, 4, 5, 6.
#>   On a matrix with 51941 rows and 140 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 6.
#> 
#> Following methods can be applied to this 'ConsensusPartition' object:
#>  [1] "cola_report"             "collect_classes"         "collect_plots"          
#>  [4] "collect_stats"           "colnames"                "compare_signatures"     
#>  [7] "consensus_heatmap"       "dimension_reduction"     "functional_enrichment"  
#> [10] "get_anno_col"            "get_anno"                "get_classes"            
#> [13] "get_consensus"           "get_matrix"              "get_membership"         
#> [16] "get_param"               "get_signatures"          "get_stats"              
#> [19] "is_best_k"               "is_stable_k"             "membership_heatmap"     
#> [22] "ncol"                    "nrow"                    "plot_ecdf"              
#> [25] "rownames"                "select_partition_number" "show"                   
#> [28] "suggest_best_k"          "test_to_known_factors"

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

collect_plots(res)

plot of chunk CV-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.663           0.883       0.900         0.3187 0.571   0.571
#> 3 3 0.594           0.846       0.864         0.6376 0.777   0.643
#> 4 4 0.829           0.804       0.925         0.3222 0.706   0.452
#> 5 5 0.923           0.936       0.974         0.0948 0.882   0.659
#> 6 6 0.980           0.950       0.978         0.0731 0.941   0.763

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] 5

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

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

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

show/hide code output

cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#>            class entropy silhouette    p1    p2
#> GSM1009062     1  0.0000     0.9892 1.000 0.000
#> GSM1009076     2  0.9954     0.7068 0.460 0.540
#> GSM1009090     1  0.0000     0.9892 1.000 0.000
#> GSM1009104     2  0.9954     0.7068 0.460 0.540
#> GSM1009118     1  0.0000     0.9892 1.000 0.000
#> GSM1009132     1  0.0000     0.9892 1.000 0.000
#> GSM1009146     1  0.0000     0.9892 1.000 0.000
#> GSM1009160     2  0.0000     0.6370 0.000 1.000
#> GSM1009174     1  0.0376     0.9850 0.996 0.004
#> GSM1009188     1  0.0000     0.9892 1.000 0.000
#> GSM1009063     1  0.0000     0.9892 1.000 0.000
#> GSM1009077     2  0.9954     0.7068 0.460 0.540
#> GSM1009091     1  0.0000     0.9892 1.000 0.000
#> GSM1009105     2  0.9954     0.7068 0.460 0.540
#> GSM1009119     1  0.0000     0.9892 1.000 0.000
#> GSM1009133     1  0.0000     0.9892 1.000 0.000
#> GSM1009147     1  0.0000     0.9892 1.000 0.000
#> GSM1009161     2  0.0000     0.6370 0.000 1.000
#> GSM1009175     1  0.0376     0.9850 0.996 0.004
#> GSM1009189     1  0.0000     0.9892 1.000 0.000
#> GSM1009064     1  0.0000     0.9892 1.000 0.000
#> GSM1009078     1  0.0376     0.9847 0.996 0.004
#> GSM1009092     1  0.0000     0.9892 1.000 0.000
#> GSM1009106     2  0.9954     0.7068 0.460 0.540
#> GSM1009120     1  0.0000     0.9892 1.000 0.000
#> GSM1009134     1  0.0000     0.9892 1.000 0.000
#> GSM1009148     1  0.0000     0.9892 1.000 0.000
#> GSM1009162     2  0.0000     0.6370 0.000 1.000
#> GSM1009176     2  0.9970     0.6913 0.468 0.532
#> GSM1009190     1  0.0000     0.9892 1.000 0.000
#> GSM1009065     1  0.0000     0.9892 1.000 0.000
#> GSM1009079     2  0.9954     0.7068 0.460 0.540
#> GSM1009093     1  0.0000     0.9892 1.000 0.000
#> GSM1009107     2  0.9954     0.7068 0.460 0.540
#> GSM1009121     1  0.0000     0.9892 1.000 0.000
#> GSM1009135     1  0.0000     0.9892 1.000 0.000
#> GSM1009149     1  0.0000     0.9892 1.000 0.000
#> GSM1009163     2  0.0000     0.6370 0.000 1.000
#> GSM1009177     1  0.9358    -0.0814 0.648 0.352
#> GSM1009191     1  0.0000     0.9892 1.000 0.000
#> GSM1009066     1  0.0000     0.9892 1.000 0.000
#> GSM1009080     2  0.9954     0.7068 0.460 0.540
#> GSM1009094     1  0.0000     0.9892 1.000 0.000
#> GSM1009108     2  0.9954     0.7068 0.460 0.540
#> GSM1009122     1  0.0376     0.9850 0.996 0.004
#> GSM1009136     1  0.0000     0.9892 1.000 0.000
#> GSM1009150     1  0.0000     0.9892 1.000 0.000
#> GSM1009164     2  0.0000     0.6370 0.000 1.000
#> GSM1009178     1  0.0376     0.9850 0.996 0.004
#> GSM1009192     1  0.0000     0.9892 1.000 0.000
#> GSM1009067     1  0.0000     0.9892 1.000 0.000
#> GSM1009081     2  0.9954     0.7068 0.460 0.540
#> GSM1009095     1  0.0000     0.9892 1.000 0.000
#> GSM1009109     2  0.9954     0.7068 0.460 0.540
#> GSM1009123     1  0.0000     0.9892 1.000 0.000
#> GSM1009137     1  0.0000     0.9892 1.000 0.000
#> GSM1009151     1  0.0000     0.9892 1.000 0.000
#> GSM1009165     2  0.0000     0.6370 0.000 1.000
#> GSM1009179     1  0.0376     0.9850 0.996 0.004
#> GSM1009193     1  0.0000     0.9892 1.000 0.000
#> GSM1009068     1  0.0000     0.9892 1.000 0.000
#> GSM1009082     2  0.9954     0.7068 0.460 0.540
#> GSM1009096     1  0.0000     0.9892 1.000 0.000
#> GSM1009110     2  0.9954     0.7068 0.460 0.540
#> GSM1009124     1  0.0000     0.9892 1.000 0.000
#> GSM1009138     1  0.0000     0.9892 1.000 0.000
#> GSM1009152     1  0.0000     0.9892 1.000 0.000
#> GSM1009166     2  0.0000     0.6370 0.000 1.000
#> GSM1009180     1  0.0376     0.9850 0.996 0.004
#> GSM1009194     1  0.0000     0.9892 1.000 0.000
#> GSM1009069     1  0.1633     0.9561 0.976 0.024
#> GSM1009083     2  0.9954     0.7068 0.460 0.540
#> GSM1009097     1  0.0000     0.9892 1.000 0.000
#> GSM1009111     2  0.9954     0.7068 0.460 0.540
#> GSM1009125     2  0.9970     0.6913 0.468 0.532
#> GSM1009139     1  0.0000     0.9892 1.000 0.000
#> GSM1009153     1  0.0000     0.9892 1.000 0.000
#> GSM1009167     2  0.0000     0.6370 0.000 1.000
#> GSM1009181     2  0.9954     0.7068 0.460 0.540
#> GSM1009195     1  0.0000     0.9892 1.000 0.000
#> GSM1009070     1  0.0000     0.9892 1.000 0.000
#> GSM1009084     2  0.9954     0.7068 0.460 0.540
#> GSM1009098     1  0.0000     0.9892 1.000 0.000
#> GSM1009112     2  0.9954     0.7068 0.460 0.540
#> GSM1009126     1  0.0000     0.9892 1.000 0.000
#> GSM1009140     1  0.0000     0.9892 1.000 0.000
#> GSM1009154     1  0.0000     0.9892 1.000 0.000
#> GSM1009168     2  0.0000     0.6370 0.000 1.000
#> GSM1009182     1  0.0376     0.9850 0.996 0.004
#> GSM1009196     1  0.0000     0.9892 1.000 0.000
#> GSM1009071     1  0.0000     0.9892 1.000 0.000
#> GSM1009085     2  0.9954     0.7068 0.460 0.540
#> GSM1009099     1  0.0000     0.9892 1.000 0.000
#> GSM1009113     2  0.9954     0.7068 0.460 0.540
#> GSM1009127     1  0.0000     0.9892 1.000 0.000
#> GSM1009141     1  0.0000     0.9892 1.000 0.000
#> GSM1009155     1  0.0000     0.9892 1.000 0.000
#> GSM1009169     2  0.0000     0.6370 0.000 1.000
#> GSM1009183     1  0.6712     0.6429 0.824 0.176
#> GSM1009197     1  0.0000     0.9892 1.000 0.000
#> GSM1009072     1  0.0000     0.9892 1.000 0.000
#> GSM1009086     2  0.9954     0.7068 0.460 0.540
#> GSM1009100     1  0.0000     0.9892 1.000 0.000
#> GSM1009114     2  0.9954     0.7068 0.460 0.540
#> GSM1009128     1  0.0000     0.9892 1.000 0.000
#> GSM1009142     1  0.0000     0.9892 1.000 0.000
#> GSM1009156     1  0.0000     0.9892 1.000 0.000
#> GSM1009170     2  0.0000     0.6370 0.000 1.000
#> GSM1009184     1  0.0376     0.9850 0.996 0.004
#> GSM1009198     1  0.0000     0.9892 1.000 0.000
#> GSM1009073     1  0.0000     0.9892 1.000 0.000
#> GSM1009087     1  0.0376     0.9847 0.996 0.004
#> GSM1009101     1  0.0000     0.9892 1.000 0.000
#> GSM1009115     2  0.9954     0.7068 0.460 0.540
#> GSM1009129     2  0.9998     0.6368 0.492 0.508
#> GSM1009143     1  0.0000     0.9892 1.000 0.000
#> GSM1009157     1  0.0000     0.9892 1.000 0.000
#> GSM1009171     2  0.0000     0.6370 0.000 1.000
#> GSM1009185     1  0.0376     0.9850 0.996 0.004
#> GSM1009199     1  0.0000     0.9892 1.000 0.000
#> GSM1009074     1  0.0000     0.9892 1.000 0.000
#> GSM1009088     1  0.3584     0.8811 0.932 0.068
#> GSM1009102     1  0.0000     0.9892 1.000 0.000
#> GSM1009116     2  0.9954     0.7068 0.460 0.540
#> GSM1009130     2  0.9963     0.6999 0.464 0.536
#> GSM1009144     1  0.0000     0.9892 1.000 0.000
#> GSM1009158     1  0.0000     0.9892 1.000 0.000
#> GSM1009172     2  0.0000     0.6370 0.000 1.000
#> GSM1009186     1  0.0376     0.9850 0.996 0.004
#> GSM1009200     1  0.0000     0.9892 1.000 0.000
#> GSM1009075     1  0.0000     0.9892 1.000 0.000
#> GSM1009089     1  0.0376     0.9847 0.996 0.004
#> GSM1009103     1  0.0000     0.9892 1.000 0.000
#> GSM1009117     2  0.9954     0.7068 0.460 0.540
#> GSM1009131     1  0.0000     0.9892 1.000 0.000
#> GSM1009145     1  0.0000     0.9892 1.000 0.000
#> GSM1009159     1  0.0000     0.9892 1.000 0.000
#> GSM1009173     2  0.0000     0.6370 0.000 1.000
#> GSM1009187     1  0.0376     0.9850 0.996 0.004
#> GSM1009201     1  0.0000     0.9892 1.000 0.000

show/hide code output

cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#>            class entropy silhouette    p1    p2 p3
#> GSM1009062     1  0.5621      0.825 0.692 0.308  0
#> GSM1009076     2  0.0000      0.963 0.000 1.000  0
#> GSM1009090     1  0.0000      0.725 1.000 0.000  0
#> GSM1009104     2  0.0000      0.963 0.000 1.000  0
#> GSM1009118     1  0.5810      0.793 0.664 0.336  0
#> GSM1009132     1  0.0592      0.718 0.988 0.012  0
#> GSM1009146     1  0.5621      0.825 0.692 0.308  0
#> GSM1009160     3  0.0000      1.000 0.000 0.000  1
#> GSM1009174     2  0.1031      0.954 0.024 0.976  0
#> GSM1009188     1  0.5591      0.825 0.696 0.304  0
#> GSM1009063     1  0.5621      0.825 0.692 0.308  0
#> GSM1009077     2  0.0000      0.963 0.000 1.000  0
#> GSM1009091     1  0.0000      0.725 1.000 0.000  0
#> GSM1009105     2  0.0000      0.963 0.000 1.000  0
#> GSM1009119     1  0.5591      0.825 0.696 0.304  0
#> GSM1009133     1  0.0000      0.725 1.000 0.000  0
#> GSM1009147     1  0.5621      0.825 0.692 0.308  0
#> GSM1009161     3  0.0000      1.000 0.000 0.000  1
#> GSM1009175     2  0.1031      0.954 0.024 0.976  0
#> GSM1009189     1  0.5621      0.825 0.692 0.308  0
#> GSM1009064     1  0.5621      0.825 0.692 0.308  0
#> GSM1009078     1  0.6126      0.695 0.600 0.400  0
#> GSM1009092     1  0.0000      0.725 1.000 0.000  0
#> GSM1009106     2  0.0000      0.963 0.000 1.000  0
#> GSM1009120     1  0.5621      0.825 0.692 0.308  0
#> GSM1009134     1  0.0000      0.725 1.000 0.000  0
#> GSM1009148     1  0.5621      0.825 0.692 0.308  0
#> GSM1009162     3  0.0000      1.000 0.000 0.000  1
#> GSM1009176     2  0.0000      0.963 0.000 1.000  0
#> GSM1009190     1  0.5621      0.825 0.692 0.308  0
#> GSM1009065     1  0.5650      0.821 0.688 0.312  0
#> GSM1009079     2  0.0000      0.963 0.000 1.000  0
#> GSM1009093     1  0.0000      0.725 1.000 0.000  0
#> GSM1009107     2  0.0000      0.963 0.000 1.000  0
#> GSM1009121     1  0.5621      0.825 0.692 0.308  0
#> GSM1009135     1  0.0000      0.725 1.000 0.000  0
#> GSM1009149     1  0.5621      0.825 0.692 0.308  0
#> GSM1009163     3  0.0000      1.000 0.000 0.000  1
#> GSM1009177     2  0.1031      0.954 0.024 0.976  0
#> GSM1009191     1  0.5621      0.825 0.692 0.308  0
#> GSM1009066     1  0.5621      0.825 0.692 0.308  0
#> GSM1009080     2  0.0000      0.963 0.000 1.000  0
#> GSM1009094     1  0.0000      0.725 1.000 0.000  0
#> GSM1009108     2  0.0000      0.963 0.000 1.000  0
#> GSM1009122     2  0.4121      0.723 0.168 0.832  0
#> GSM1009136     1  0.0000      0.725 1.000 0.000  0
#> GSM1009150     1  0.5621      0.825 0.692 0.308  0
#> GSM1009164     3  0.0000      1.000 0.000 0.000  1
#> GSM1009178     2  0.1031      0.954 0.024 0.976  0
#> GSM1009192     1  0.5621      0.825 0.692 0.308  0
#> GSM1009067     1  0.5621      0.825 0.692 0.308  0
#> GSM1009081     2  0.0000      0.963 0.000 1.000  0
#> GSM1009095     1  0.0000      0.725 1.000 0.000  0
#> GSM1009109     2  0.0000      0.963 0.000 1.000  0
#> GSM1009123     1  0.4750      0.799 0.784 0.216  0
#> GSM1009137     1  0.0000      0.725 1.000 0.000  0
#> GSM1009151     1  0.5621      0.825 0.692 0.308  0
#> GSM1009165     3  0.0000      1.000 0.000 0.000  1
#> GSM1009179     2  0.1031      0.954 0.024 0.976  0
#> GSM1009193     1  0.5621      0.825 0.692 0.308  0
#> GSM1009068     1  0.5621      0.825 0.692 0.308  0
#> GSM1009082     2  0.0000      0.963 0.000 1.000  0
#> GSM1009096     1  0.0000      0.725 1.000 0.000  0
#> GSM1009110     2  0.0000      0.963 0.000 1.000  0
#> GSM1009124     1  0.5621      0.825 0.692 0.308  0
#> GSM1009138     1  0.0000      0.725 1.000 0.000  0
#> GSM1009152     1  0.5621      0.825 0.692 0.308  0
#> GSM1009166     3  0.0000      1.000 0.000 0.000  1
#> GSM1009180     2  0.1031      0.954 0.024 0.976  0
#> GSM1009194     1  0.5621      0.825 0.692 0.308  0
#> GSM1009069     2  0.1411      0.941 0.036 0.964  0
#> GSM1009083     2  0.0000      0.963 0.000 1.000  0
#> GSM1009097     1  0.0000      0.725 1.000 0.000  0
#> GSM1009111     2  0.0000      0.963 0.000 1.000  0
#> GSM1009125     2  0.1163      0.943 0.028 0.972  0
#> GSM1009139     1  0.0000      0.725 1.000 0.000  0
#> GSM1009153     1  0.5621      0.825 0.692 0.308  0
#> GSM1009167     3  0.0000      1.000 0.000 0.000  1
#> GSM1009181     2  0.0000      0.963 0.000 1.000  0
#> GSM1009195     1  0.5621      0.825 0.692 0.308  0
#> GSM1009070     1  0.5621      0.825 0.692 0.308  0
#> GSM1009084     2  0.0000      0.963 0.000 1.000  0
#> GSM1009098     1  0.0000      0.725 1.000 0.000  0
#> GSM1009112     2  0.0000      0.963 0.000 1.000  0
#> GSM1009126     1  0.5621      0.825 0.692 0.308  0
#> GSM1009140     1  0.0000      0.725 1.000 0.000  0
#> GSM1009154     1  0.5621      0.825 0.692 0.308  0
#> GSM1009168     3  0.0000      1.000 0.000 0.000  1
#> GSM1009182     2  0.1031      0.954 0.024 0.976  0
#> GSM1009196     1  0.5621      0.825 0.692 0.308  0
#> GSM1009071     1  0.5621      0.825 0.692 0.308  0
#> GSM1009085     2  0.0000      0.963 0.000 1.000  0
#> GSM1009099     1  0.0000      0.725 1.000 0.000  0
#> GSM1009113     2  0.0000      0.963 0.000 1.000  0
#> GSM1009127     1  0.5621      0.825 0.692 0.308  0
#> GSM1009141     1  0.0000      0.725 1.000 0.000  0
#> GSM1009155     1  0.5621      0.825 0.692 0.308  0
#> GSM1009169     3  0.0000      1.000 0.000 0.000  1
#> GSM1009183     2  0.1031      0.954 0.024 0.976  0
#> GSM1009197     1  0.5621      0.825 0.692 0.308  0
#> GSM1009072     1  0.5138      0.811 0.748 0.252  0
#> GSM1009086     2  0.0000      0.963 0.000 1.000  0
#> GSM1009100     1  0.0000      0.725 1.000 0.000  0
#> GSM1009114     2  0.0000      0.963 0.000 1.000  0
#> GSM1009128     1  0.6140      0.567 0.596 0.404  0
#> GSM1009142     1  0.0000      0.725 1.000 0.000  0
#> GSM1009156     1  0.5926      0.766 0.644 0.356  0
#> GSM1009170     3  0.0000      1.000 0.000 0.000  1
#> GSM1009184     2  0.1031      0.954 0.024 0.976  0
#> GSM1009198     1  0.5621      0.825 0.692 0.308  0
#> GSM1009073     1  0.5621      0.825 0.692 0.308  0
#> GSM1009087     1  0.6180      0.665 0.584 0.416  0
#> GSM1009101     1  0.0000      0.725 1.000 0.000  0
#> GSM1009115     2  0.0000      0.963 0.000 1.000  0
#> GSM1009129     2  0.3619      0.776 0.136 0.864  0
#> GSM1009143     1  0.0000      0.725 1.000 0.000  0
#> GSM1009157     1  0.5733      0.808 0.676 0.324  0
#> GSM1009171     3  0.0000      1.000 0.000 0.000  1
#> GSM1009185     2  0.1031      0.954 0.024 0.976  0
#> GSM1009199     1  0.5621      0.825 0.692 0.308  0
#> GSM1009074     1  0.5621      0.825 0.692 0.308  0
#> GSM1009088     2  0.6215     -0.241 0.428 0.572  0
#> GSM1009102     1  0.0000      0.725 1.000 0.000  0
#> GSM1009116     2  0.0000      0.963 0.000 1.000  0
#> GSM1009130     1  0.5785      0.802 0.668 0.332  0
#> GSM1009144     1  0.0000      0.725 1.000 0.000  0
#> GSM1009158     1  0.5621      0.825 0.692 0.308  0
#> GSM1009172     3  0.0000      1.000 0.000 0.000  1
#> GSM1009186     2  0.1031      0.954 0.024 0.976  0
#> GSM1009200     1  0.5621      0.825 0.692 0.308  0
#> GSM1009075     1  0.5621      0.825 0.692 0.308  0
#> GSM1009089     1  0.5988      0.749 0.632 0.368  0
#> GSM1009103     1  0.0000      0.725 1.000 0.000  0
#> GSM1009117     2  0.0000      0.963 0.000 1.000  0
#> GSM1009131     1  0.5621      0.825 0.692 0.308  0
#> GSM1009145     1  0.0000      0.725 1.000 0.000  0
#> GSM1009159     1  0.4750      0.799 0.784 0.216  0
#> GSM1009173     3  0.0000      1.000 0.000 0.000  1
#> GSM1009187     2  0.1031      0.954 0.024 0.976  0
#> GSM1009201     1  0.5621      0.825 0.692 0.308  0

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>            class entropy silhouette    p1    p2 p3    p4
#> GSM1009062     1  0.0000     0.8545 1.000 0.000  0 0.000
#> GSM1009076     2  0.0000     0.9135 0.000 1.000  0 0.000
#> GSM1009090     4  0.0000     0.9840 0.000 0.000  0 1.000
#> GSM1009104     2  0.0000     0.9135 0.000 1.000  0 0.000
#> GSM1009118     1  0.0000     0.8545 1.000 0.000  0 0.000
#> GSM1009132     4  0.0000     0.9840 0.000 0.000  0 1.000
#> GSM1009146     1  0.0000     0.8545 1.000 0.000  0 0.000
#> GSM1009160     3  0.0000     1.0000 0.000 0.000  1 0.000
#> GSM1009174     1  0.4992     0.2230 0.524 0.476  0 0.000
#> GSM1009188     1  0.0000     0.8545 1.000 0.000  0 0.000
#> GSM1009063     1  0.0000     0.8545 1.000 0.000  0 0.000
#> GSM1009077     2  0.0000     0.9135 0.000 1.000  0 0.000
#> GSM1009091     4  0.0000     0.9840 0.000 0.000  0 1.000
#> GSM1009105     2  0.0000     0.9135 0.000 1.000  0 0.000
#> GSM1009119     1  0.0000     0.8545 1.000 0.000  0 0.000
#> GSM1009133     4  0.0000     0.9840 0.000 0.000  0 1.000
#> GSM1009147     1  0.0000     0.8545 1.000 0.000  0 0.000
#> GSM1009161     3  0.0000     1.0000 0.000 0.000  1 0.000
#> GSM1009175     1  0.4992     0.2230 0.524 0.476  0 0.000
#> GSM1009189     1  0.0000     0.8545 1.000 0.000  0 0.000
#> GSM1009064     1  0.0000     0.8545 1.000 0.000  0 0.000
#> GSM1009078     1  0.3172     0.7359 0.840 0.160  0 0.000
#> GSM1009092     4  0.0000     0.9840 0.000 0.000  0 1.000
#> GSM1009106     2  0.0000     0.9135 0.000 1.000  0 0.000
#> GSM1009120     1  0.0000     0.8545 1.000 0.000  0 0.000
#> GSM1009134     4  0.0000     0.9840 0.000 0.000  0 1.000
#> GSM1009148     1  0.0000     0.8545 1.000 0.000  0 0.000
#> GSM1009162     3  0.0000     1.0000 0.000 0.000  1 0.000
#> GSM1009176     2  0.4999    -0.1632 0.492 0.508  0 0.000
#> GSM1009190     1  0.0000     0.8545 1.000 0.000  0 0.000
#> GSM1009065     1  0.0000     0.8545 1.000 0.000  0 0.000
#> GSM1009079     2  0.0000     0.9135 0.000 1.000  0 0.000
#> GSM1009093     4  0.0000     0.9840 0.000 0.000  0 1.000
#> GSM1009107     2  0.0000     0.9135 0.000 1.000  0 0.000
#> GSM1009121     1  0.4888     0.2068 0.588 0.000  0 0.412
#> GSM1009135     4  0.0000     0.9840 0.000 0.000  0 1.000
#> GSM1009149     1  0.0000     0.8545 1.000 0.000  0 0.000
#> GSM1009163     3  0.0000     1.0000 0.000 0.000  1 0.000
#> GSM1009177     1  0.4992     0.2230 0.524 0.476  0 0.000
#> GSM1009191     1  0.0000     0.8545 1.000 0.000  0 0.000
#> GSM1009066     1  0.0000     0.8545 1.000 0.000  0 0.000
#> GSM1009080     2  0.0000     0.9135 0.000 1.000  0 0.000
#> GSM1009094     4  0.0000     0.9840 0.000 0.000  0 1.000
#> GSM1009108     2  0.0000     0.9135 0.000 1.000  0 0.000
#> GSM1009122     1  0.4697     0.4598 0.644 0.356  0 0.000
#> GSM1009136     4  0.0000     0.9840 0.000 0.000  0 1.000
#> GSM1009150     1  0.0000     0.8545 1.000 0.000  0 0.000
#> GSM1009164     3  0.0000     1.0000 0.000 0.000  1 0.000
#> GSM1009178     1  0.4992     0.2230 0.524 0.476  0 0.000
#> GSM1009192     1  0.0000     0.8545 1.000 0.000  0 0.000
#> GSM1009067     1  0.0000     0.8545 1.000 0.000  0 0.000
#> GSM1009081     2  0.0000     0.9135 0.000 1.000  0 0.000
#> GSM1009095     4  0.0000     0.9840 0.000 0.000  0 1.000
#> GSM1009109     2  0.0000     0.9135 0.000 1.000  0 0.000
#> GSM1009123     1  0.4888     0.2045 0.588 0.000  0 0.412
#> GSM1009137     4  0.0000     0.9840 0.000 0.000  0 1.000
#> GSM1009151     1  0.0000     0.8545 1.000 0.000  0 0.000
#> GSM1009165     3  0.0000     1.0000 0.000 0.000  1 0.000
#> GSM1009179     1  0.4992     0.2230 0.524 0.476  0 0.000
#> GSM1009193     1  0.0000     0.8545 1.000 0.000  0 0.000
#> GSM1009068     1  0.0000     0.8545 1.000 0.000  0 0.000
#> GSM1009082     2  0.0188     0.9095 0.004 0.996  0 0.000
#> GSM1009096     4  0.0000     0.9840 0.000 0.000  0 1.000
#> GSM1009110     2  0.0000     0.9135 0.000 1.000  0 0.000
#> GSM1009124     1  0.0000     0.8545 1.000 0.000  0 0.000
#> GSM1009138     4  0.0000     0.9840 0.000 0.000  0 1.000
#> GSM1009152     1  0.0000     0.8545 1.000 0.000  0 0.000
#> GSM1009166     3  0.0000     1.0000 0.000 0.000  1 0.000
#> GSM1009180     1  0.4992     0.2230 0.524 0.476  0 0.000
#> GSM1009194     1  0.0000     0.8545 1.000 0.000  0 0.000
#> GSM1009069     1  0.4985     0.2413 0.532 0.468  0 0.000
#> GSM1009083     2  0.0000     0.9135 0.000 1.000  0 0.000
#> GSM1009097     4  0.0000     0.9840 0.000 0.000  0 1.000
#> GSM1009111     2  0.0000     0.9135 0.000 1.000  0 0.000
#> GSM1009125     2  0.0469     0.9015 0.012 0.988  0 0.000
#> GSM1009139     4  0.0000     0.9840 0.000 0.000  0 1.000
#> GSM1009153     1  0.0000     0.8545 1.000 0.000  0 0.000
#> GSM1009167     3  0.0000     1.0000 0.000 0.000  1 0.000
#> GSM1009181     2  0.4999    -0.1628 0.492 0.508  0 0.000
#> GSM1009195     1  0.0000     0.8545 1.000 0.000  0 0.000
#> GSM1009070     1  0.0000     0.8545 1.000 0.000  0 0.000
#> GSM1009084     2  0.0000     0.9135 0.000 1.000  0 0.000
#> GSM1009098     4  0.0000     0.9840 0.000 0.000  0 1.000
#> GSM1009112     2  0.0000     0.9135 0.000 1.000  0 0.000
#> GSM1009126     1  0.0000     0.8545 1.000 0.000  0 0.000
#> GSM1009140     4  0.0000     0.9840 0.000 0.000  0 1.000
#> GSM1009154     1  0.0000     0.8545 1.000 0.000  0 0.000
#> GSM1009168     3  0.0000     1.0000 0.000 0.000  1 0.000
#> GSM1009182     1  0.4992     0.2230 0.524 0.476  0 0.000
#> GSM1009196     1  0.0000     0.8545 1.000 0.000  0 0.000
#> GSM1009071     1  0.0000     0.8545 1.000 0.000  0 0.000
#> GSM1009085     2  0.0000     0.9135 0.000 1.000  0 0.000
#> GSM1009099     4  0.0000     0.9840 0.000 0.000  0 1.000
#> GSM1009113     2  0.0000     0.9135 0.000 1.000  0 0.000
#> GSM1009127     1  0.0000     0.8545 1.000 0.000  0 0.000
#> GSM1009141     4  0.0000     0.9840 0.000 0.000  0 1.000
#> GSM1009155     1  0.0000     0.8545 1.000 0.000  0 0.000
#> GSM1009169     3  0.0000     1.0000 0.000 0.000  1 0.000
#> GSM1009183     1  0.4994     0.2116 0.520 0.480  0 0.000
#> GSM1009197     1  0.0000     0.8545 1.000 0.000  0 0.000
#> GSM1009072     1  0.0000     0.8545 1.000 0.000  0 0.000
#> GSM1009086     2  0.0000     0.9135 0.000 1.000  0 0.000
#> GSM1009100     4  0.0000     0.9840 0.000 0.000  0 1.000
#> GSM1009114     2  0.0000     0.9135 0.000 1.000  0 0.000
#> GSM1009128     4  0.6742     0.4674 0.232 0.160  0 0.608
#> GSM1009142     4  0.0000     0.9840 0.000 0.000  0 1.000
#> GSM1009156     1  0.1474     0.8214 0.948 0.052  0 0.000
#> GSM1009170     3  0.0000     1.0000 0.000 0.000  1 0.000
#> GSM1009184     1  0.4992     0.2230 0.524 0.476  0 0.000
#> GSM1009198     1  0.3074     0.7137 0.848 0.000  0 0.152
#> GSM1009073     1  0.0000     0.8545 1.000 0.000  0 0.000
#> GSM1009087     1  0.3219     0.7316 0.836 0.164  0 0.000
#> GSM1009101     4  0.0000     0.9840 0.000 0.000  0 1.000
#> GSM1009115     2  0.0000     0.9135 0.000 1.000  0 0.000
#> GSM1009129     2  0.3486     0.6654 0.188 0.812  0 0.000
#> GSM1009143     4  0.0000     0.9840 0.000 0.000  0 1.000
#> GSM1009157     1  0.0592     0.8451 0.984 0.016  0 0.000
#> GSM1009171     3  0.0000     1.0000 0.000 0.000  1 0.000
#> GSM1009185     1  0.4992     0.2230 0.524 0.476  0 0.000
#> GSM1009199     1  0.0000     0.8545 1.000 0.000  0 0.000
#> GSM1009074     1  0.0000     0.8545 1.000 0.000  0 0.000
#> GSM1009088     1  0.4746     0.4544 0.632 0.368  0 0.000
#> GSM1009102     4  0.0000     0.9840 0.000 0.000  0 1.000
#> GSM1009116     2  0.0000     0.9135 0.000 1.000  0 0.000
#> GSM1009130     2  0.4994     0.0432 0.480 0.520  0 0.000
#> GSM1009144     4  0.0000     0.9840 0.000 0.000  0 1.000
#> GSM1009158     1  0.0000     0.8545 1.000 0.000  0 0.000
#> GSM1009172     3  0.0000     1.0000 0.000 0.000  1 0.000
#> GSM1009186     1  0.4992     0.2230 0.524 0.476  0 0.000
#> GSM1009200     1  0.0000     0.8545 1.000 0.000  0 0.000
#> GSM1009075     1  0.0000     0.8545 1.000 0.000  0 0.000
#> GSM1009089     1  0.1557     0.8201 0.944 0.056  0 0.000
#> GSM1009103     4  0.0000     0.9840 0.000 0.000  0 1.000
#> GSM1009117     2  0.0000     0.9135 0.000 1.000  0 0.000
#> GSM1009131     1  0.1557     0.8130 0.944 0.056  0 0.000
#> GSM1009145     4  0.0000     0.9840 0.000 0.000  0 1.000
#> GSM1009159     1  0.0000     0.8545 1.000 0.000  0 0.000
#> GSM1009173     3  0.0000     1.0000 0.000 0.000  1 0.000
#> GSM1009187     1  0.4992     0.2230 0.524 0.476  0 0.000
#> GSM1009201     1  0.0000     0.8545 1.000 0.000  0 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
#> GSM1009062     1  0.0000      0.961 1.000 0.000  0 0.000 0.000
#> GSM1009076     2  0.0290      0.956 0.000 0.992  0 0.000 0.008
#> GSM1009090     4  0.0000      0.982 0.000 0.000  0 1.000 0.000
#> GSM1009104     5  0.0000      0.955 0.000 0.000  0 0.000 1.000
#> GSM1009118     1  0.3837      0.564 0.692 0.308  0 0.000 0.000
#> GSM1009132     4  0.0000      0.982 0.000 0.000  0 1.000 0.000
#> GSM1009146     1  0.0000      0.961 1.000 0.000  0 0.000 0.000
#> GSM1009160     3  0.0000      1.000 0.000 0.000  1 0.000 0.000
#> GSM1009174     2  0.0000      0.959 0.000 1.000  0 0.000 0.000
#> GSM1009188     1  0.0000      0.961 1.000 0.000  0 0.000 0.000
#> GSM1009063     1  0.0000      0.961 1.000 0.000  0 0.000 0.000
#> GSM1009077     2  0.0290      0.956 0.000 0.992  0 0.000 0.008
#> GSM1009091     4  0.0000      0.982 0.000 0.000  0 1.000 0.000
#> GSM1009105     5  0.0000      0.955 0.000 0.000  0 0.000 1.000
#> GSM1009119     1  0.0000      0.961 1.000 0.000  0 0.000 0.000
#> GSM1009133     4  0.0000      0.982 0.000 0.000  0 1.000 0.000
#> GSM1009147     1  0.0000      0.961 1.000 0.000  0 0.000 0.000
#> GSM1009161     3  0.0000      1.000 0.000 0.000  1 0.000 0.000
#> GSM1009175     2  0.0000      0.959 0.000 1.000  0 0.000 0.000
#> GSM1009189     1  0.0000      0.961 1.000 0.000  0 0.000 0.000
#> GSM1009064     1  0.0000      0.961 1.000 0.000  0 0.000 0.000
#> GSM1009078     1  0.2358      0.860 0.888 0.104  0 0.000 0.008
#> GSM1009092     4  0.0000      0.982 0.000 0.000  0 1.000 0.000
#> GSM1009106     5  0.0000      0.955 0.000 0.000  0 0.000 1.000
#> GSM1009120     1  0.0000      0.961 1.000 0.000  0 0.000 0.000
#> GSM1009134     4  0.0000      0.982 0.000 0.000  0 1.000 0.000
#> GSM1009148     1  0.0000      0.961 1.000 0.000  0 0.000 0.000
#> GSM1009162     3  0.0000      1.000 0.000 0.000  1 0.000 0.000
#> GSM1009176     2  0.0000      0.959 0.000 1.000  0 0.000 0.000
#> GSM1009190     1  0.0000      0.961 1.000 0.000  0 0.000 0.000
#> GSM1009065     1  0.0000      0.961 1.000 0.000  0 0.000 0.000
#> GSM1009079     2  0.0000      0.959 0.000 1.000  0 0.000 0.000
#> GSM1009093     4  0.0000      0.982 0.000 0.000  0 1.000 0.000
#> GSM1009107     5  0.0000      0.955 0.000 0.000  0 0.000 1.000
#> GSM1009121     1  0.3115      0.830 0.852 0.036  0 0.112 0.000
#> GSM1009135     4  0.0000      0.982 0.000 0.000  0 1.000 0.000
#> GSM1009149     1  0.0000      0.961 1.000 0.000  0 0.000 0.000
#> GSM1009163     3  0.0000      1.000 0.000 0.000  1 0.000 0.000
#> GSM1009177     2  0.0000      0.959 0.000 1.000  0 0.000 0.000
#> GSM1009191     1  0.0000      0.961 1.000 0.000  0 0.000 0.000
#> GSM1009066     1  0.0000      0.961 1.000 0.000  0 0.000 0.000
#> GSM1009080     2  0.0162      0.957 0.000 0.996  0 0.000 0.004
#> GSM1009094     4  0.0000      0.982 0.000 0.000  0 1.000 0.000
#> GSM1009108     5  0.0000      0.955 0.000 0.000  0 0.000 1.000
#> GSM1009122     2  0.3003      0.723 0.188 0.812  0 0.000 0.000
#> GSM1009136     4  0.0000      0.982 0.000 0.000  0 1.000 0.000
#> GSM1009150     1  0.0000      0.961 1.000 0.000  0 0.000 0.000
#> GSM1009164     3  0.0000      1.000 0.000 0.000  1 0.000 0.000
#> GSM1009178     2  0.0000      0.959 0.000 1.000  0 0.000 0.000
#> GSM1009192     1  0.0000      0.961 1.000 0.000  0 0.000 0.000
#> GSM1009067     1  0.0000      0.961 1.000 0.000  0 0.000 0.000
#> GSM1009081     2  0.0290      0.956 0.000 0.992  0 0.000 0.008
#> GSM1009095     4  0.0000      0.982 0.000 0.000  0 1.000 0.000
#> GSM1009109     5  0.0000      0.955 0.000 0.000  0 0.000 1.000
#> GSM1009123     1  0.3109      0.750 0.800 0.000  0 0.200 0.000
#> GSM1009137     4  0.0000      0.982 0.000 0.000  0 1.000 0.000
#> GSM1009151     1  0.0000      0.961 1.000 0.000  0 0.000 0.000
#> GSM1009165     3  0.0000      1.000 0.000 0.000  1 0.000 0.000
#> GSM1009179     2  0.0000      0.959 0.000 1.000  0 0.000 0.000
#> GSM1009193     1  0.0000      0.961 1.000 0.000  0 0.000 0.000
#> GSM1009068     1  0.0000      0.961 1.000 0.000  0 0.000 0.000
#> GSM1009082     2  0.0290      0.956 0.000 0.992  0 0.000 0.008
#> GSM1009096     4  0.0000      0.982 0.000 0.000  0 1.000 0.000
#> GSM1009110     5  0.0000      0.955 0.000 0.000  0 0.000 1.000
#> GSM1009124     1  0.0000      0.961 1.000 0.000  0 0.000 0.000
#> GSM1009138     4  0.0000      0.982 0.000 0.000  0 1.000 0.000
#> GSM1009152     1  0.0000      0.961 1.000 0.000  0 0.000 0.000
#> GSM1009166     3  0.0000      1.000 0.000 0.000  1 0.000 0.000
#> GSM1009180     2  0.0000      0.959 0.000 1.000  0 0.000 0.000
#> GSM1009194     1  0.0000      0.961 1.000 0.000  0 0.000 0.000
#> GSM1009069     2  0.3398      0.677 0.216 0.780  0 0.000 0.004
#> GSM1009083     2  0.0290      0.956 0.000 0.992  0 0.000 0.008
#> GSM1009097     4  0.0000      0.982 0.000 0.000  0 1.000 0.000
#> GSM1009111     5  0.0000      0.955 0.000 0.000  0 0.000 1.000
#> GSM1009125     2  0.0290      0.952 0.008 0.992  0 0.000 0.000
#> GSM1009139     4  0.0000      0.982 0.000 0.000  0 1.000 0.000
#> GSM1009153     1  0.0000      0.961 1.000 0.000  0 0.000 0.000
#> GSM1009167     3  0.0000      1.000 0.000 0.000  1 0.000 0.000
#> GSM1009181     2  0.0000      0.959 0.000 1.000  0 0.000 0.000
#> GSM1009195     1  0.1043      0.930 0.960 0.040  0 0.000 0.000
#> GSM1009070     1  0.0000      0.961 1.000 0.000  0 0.000 0.000
#> GSM1009084     2  0.2424      0.830 0.000 0.868  0 0.000 0.132
#> GSM1009098     4  0.0000      0.982 0.000 0.000  0 1.000 0.000
#> GSM1009112     5  0.0000      0.955 0.000 0.000  0 0.000 1.000
#> GSM1009126     1  0.0000      0.961 1.000 0.000  0 0.000 0.000
#> GSM1009140     4  0.0000      0.982 0.000 0.000  0 1.000 0.000
#> GSM1009154     1  0.0000      0.961 1.000 0.000  0 0.000 0.000
#> GSM1009168     3  0.0000      1.000 0.000 0.000  1 0.000 0.000
#> GSM1009182     2  0.0000      0.959 0.000 1.000  0 0.000 0.000
#> GSM1009196     1  0.0000      0.961 1.000 0.000  0 0.000 0.000
#> GSM1009071     1  0.0000      0.961 1.000 0.000  0 0.000 0.000
#> GSM1009085     5  0.3857      0.534 0.000 0.312  0 0.000 0.688
#> GSM1009099     4  0.0000      0.982 0.000 0.000  0 1.000 0.000
#> GSM1009113     5  0.0000      0.955 0.000 0.000  0 0.000 1.000
#> GSM1009127     1  0.0000      0.961 1.000 0.000  0 0.000 0.000
#> GSM1009141     4  0.0000      0.982 0.000 0.000  0 1.000 0.000
#> GSM1009155     1  0.0000      0.961 1.000 0.000  0 0.000 0.000
#> GSM1009169     3  0.0000      1.000 0.000 0.000  1 0.000 0.000
#> GSM1009183     2  0.0000      0.959 0.000 1.000  0 0.000 0.000
#> GSM1009197     1  0.0000      0.961 1.000 0.000  0 0.000 0.000
#> GSM1009072     1  0.0000      0.961 1.000 0.000  0 0.000 0.000
#> GSM1009086     2  0.1043      0.931 0.000 0.960  0 0.000 0.040
#> GSM1009100     4  0.0000      0.982 0.000 0.000  0 1.000 0.000
#> GSM1009114     5  0.0000      0.955 0.000 0.000  0 0.000 1.000
#> GSM1009128     4  0.4225      0.396 0.364 0.004  0 0.632 0.000
#> GSM1009142     4  0.0000      0.982 0.000 0.000  0 1.000 0.000
#> GSM1009156     1  0.0162      0.959 0.996 0.004  0 0.000 0.000
#> GSM1009170     3  0.0000      1.000 0.000 0.000  1 0.000 0.000
#> GSM1009184     2  0.0000      0.959 0.000 1.000  0 0.000 0.000
#> GSM1009198     1  0.2074      0.866 0.896 0.000  0 0.104 0.000
#> GSM1009073     1  0.0000      0.961 1.000 0.000  0 0.000 0.000
#> GSM1009087     1  0.2574      0.847 0.876 0.112  0 0.000 0.012
#> GSM1009101     4  0.0000      0.982 0.000 0.000  0 1.000 0.000
#> GSM1009115     5  0.0000      0.955 0.000 0.000  0 0.000 1.000
#> GSM1009129     2  0.3003      0.723 0.188 0.812  0 0.000 0.000
#> GSM1009143     4  0.0000      0.982 0.000 0.000  0 1.000 0.000
#> GSM1009157     1  0.0404      0.953 0.988 0.012  0 0.000 0.000
#> GSM1009171     3  0.0000      1.000 0.000 0.000  1 0.000 0.000
#> GSM1009185     2  0.0000      0.959 0.000 1.000  0 0.000 0.000
#> GSM1009199     1  0.2648      0.816 0.848 0.152  0 0.000 0.000
#> GSM1009074     1  0.0000      0.961 1.000 0.000  0 0.000 0.000
#> GSM1009088     1  0.6191      0.245 0.536 0.172  0 0.000 0.292
#> GSM1009102     4  0.0000      0.982 0.000 0.000  0 1.000 0.000
#> GSM1009116     5  0.0000      0.955 0.000 0.000  0 0.000 1.000
#> GSM1009130     5  0.3109      0.671 0.200 0.000  0 0.000 0.800
#> GSM1009144     4  0.0000      0.982 0.000 0.000  0 1.000 0.000
#> GSM1009158     1  0.0000      0.961 1.000 0.000  0 0.000 0.000
#> GSM1009172     3  0.0000      1.000 0.000 0.000  1 0.000 0.000
#> GSM1009186     2  0.0000      0.959 0.000 1.000  0 0.000 0.000
#> GSM1009200     1  0.0000      0.961 1.000 0.000  0 0.000 0.000
#> GSM1009075     1  0.0000      0.961 1.000 0.000  0 0.000 0.000
#> GSM1009089     1  0.1282      0.923 0.952 0.044  0 0.000 0.004
#> GSM1009103     4  0.0000      0.982 0.000 0.000  0 1.000 0.000
#> GSM1009117     5  0.0000      0.955 0.000 0.000  0 0.000 1.000
#> GSM1009131     1  0.3177      0.741 0.792 0.000  0 0.000 0.208
#> GSM1009145     4  0.0000      0.982 0.000 0.000  0 1.000 0.000
#> GSM1009159     1  0.0000      0.961 1.000 0.000  0 0.000 0.000
#> GSM1009173     3  0.0000      1.000 0.000 0.000  1 0.000 0.000
#> GSM1009187     2  0.0000      0.959 0.000 1.000  0 0.000 0.000
#> GSM1009201     1  0.0000      0.961 1.000 0.000  0 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
#> GSM1009062     6  0.0146      0.999 0.004 0.000  0 0.000 0.000 0.996
#> GSM1009076     2  0.1391      0.937 0.000 0.944  0 0.000 0.040 0.016
#> GSM1009090     4  0.0000      0.984 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009104     5  0.0000      0.958 0.000 0.000  0 0.000 1.000 0.000
#> GSM1009118     1  0.3288      0.601 0.724 0.276  0 0.000 0.000 0.000
#> GSM1009132     4  0.0000      0.984 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009146     1  0.0000      0.967 1.000 0.000  0 0.000 0.000 0.000
#> GSM1009160     3  0.0000      1.000 0.000 0.000  1 0.000 0.000 0.000
#> GSM1009174     2  0.0000      0.962 0.000 1.000  0 0.000 0.000 0.000
#> GSM1009188     1  0.0000      0.967 1.000 0.000  0 0.000 0.000 0.000
#> GSM1009063     6  0.0146      0.999 0.004 0.000  0 0.000 0.000 0.996
#> GSM1009077     2  0.1261      0.943 0.000 0.952  0 0.000 0.024 0.024
#> GSM1009091     4  0.0000      0.984 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009105     5  0.0000      0.958 0.000 0.000  0 0.000 1.000 0.000
#> GSM1009119     1  0.0000      0.967 1.000 0.000  0 0.000 0.000 0.000
#> GSM1009133     4  0.0000      0.984 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009147     1  0.0000      0.967 1.000 0.000  0 0.000 0.000 0.000
#> GSM1009161     3  0.0000      1.000 0.000 0.000  1 0.000 0.000 0.000
#> GSM1009175     2  0.0000      0.962 0.000 1.000  0 0.000 0.000 0.000
#> GSM1009189     1  0.0000      0.967 1.000 0.000  0 0.000 0.000 0.000
#> GSM1009064     6  0.0146      0.999 0.004 0.000  0 0.000 0.000 0.996
#> GSM1009078     1  0.3402      0.795 0.820 0.052  0 0.000 0.008 0.120
#> GSM1009092     4  0.0000      0.984 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009106     5  0.0000      0.958 0.000 0.000  0 0.000 1.000 0.000
#> GSM1009120     1  0.0000      0.967 1.000 0.000  0 0.000 0.000 0.000
#> GSM1009134     4  0.0000      0.984 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009148     1  0.0000      0.967 1.000 0.000  0 0.000 0.000 0.000
#> GSM1009162     3  0.0000      1.000 0.000 0.000  1 0.000 0.000 0.000
#> GSM1009176     2  0.0000      0.962 0.000 1.000  0 0.000 0.000 0.000
#> GSM1009190     1  0.0000      0.967 1.000 0.000  0 0.000 0.000 0.000
#> GSM1009065     6  0.0000      0.994 0.000 0.000  0 0.000 0.000 1.000
#> GSM1009079     2  0.0146      0.961 0.000 0.996  0 0.000 0.000 0.004
#> GSM1009093     4  0.0000      0.984 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009107     5  0.0000      0.958 0.000 0.000  0 0.000 1.000 0.000
#> GSM1009121     1  0.0146      0.964 0.996 0.004  0 0.000 0.000 0.000
#> GSM1009135     4  0.0000      0.984 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009149     1  0.0000      0.967 1.000 0.000  0 0.000 0.000 0.000
#> GSM1009163     3  0.0000      1.000 0.000 0.000  1 0.000 0.000 0.000
#> GSM1009177     2  0.0000      0.962 0.000 1.000  0 0.000 0.000 0.000
#> GSM1009191     1  0.0000      0.967 1.000 0.000  0 0.000 0.000 0.000
#> GSM1009066     6  0.0146      0.999 0.004 0.000  0 0.000 0.000 0.996
#> GSM1009080     2  0.0405      0.958 0.000 0.988  0 0.000 0.008 0.004
#> GSM1009094     4  0.0000      0.984 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009108     5  0.0000      0.958 0.000 0.000  0 0.000 1.000 0.000
#> GSM1009122     2  0.2697      0.749 0.188 0.812  0 0.000 0.000 0.000
#> GSM1009136     4  0.0000      0.984 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009150     1  0.0000      0.967 1.000 0.000  0 0.000 0.000 0.000
#> GSM1009164     3  0.0000      1.000 0.000 0.000  1 0.000 0.000 0.000
#> GSM1009178     2  0.0000      0.962 0.000 1.000  0 0.000 0.000 0.000
#> GSM1009192     1  0.0000      0.967 1.000 0.000  0 0.000 0.000 0.000
#> GSM1009067     6  0.0146      0.999 0.004 0.000  0 0.000 0.000 0.996
#> GSM1009081     2  0.0935      0.946 0.000 0.964  0 0.000 0.032 0.004
#> GSM1009095     4  0.0000      0.984 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009109     5  0.0000      0.958 0.000 0.000  0 0.000 1.000 0.000
#> GSM1009123     1  0.0000      0.967 1.000 0.000  0 0.000 0.000 0.000
#> GSM1009137     4  0.0000      0.984 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009151     1  0.0000      0.967 1.000 0.000  0 0.000 0.000 0.000
#> GSM1009165     3  0.0000      1.000 0.000 0.000  1 0.000 0.000 0.000
#> GSM1009179     2  0.0000      0.962 0.000 1.000  0 0.000 0.000 0.000
#> GSM1009193     1  0.0000      0.967 1.000 0.000  0 0.000 0.000 0.000
#> GSM1009068     6  0.0146      0.999 0.004 0.000  0 0.000 0.000 0.996
#> GSM1009082     2  0.1320      0.939 0.000 0.948  0 0.000 0.016 0.036
#> GSM1009096     4  0.0000      0.984 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009110     5  0.0000      0.958 0.000 0.000  0 0.000 1.000 0.000
#> GSM1009124     1  0.0000      0.967 1.000 0.000  0 0.000 0.000 0.000
#> GSM1009138     4  0.0000      0.984 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009152     1  0.0000      0.967 1.000 0.000  0 0.000 0.000 0.000
#> GSM1009166     3  0.0000      1.000 0.000 0.000  1 0.000 0.000 0.000
#> GSM1009180     2  0.0000      0.962 0.000 1.000  0 0.000 0.000 0.000
#> GSM1009194     1  0.0000      0.967 1.000 0.000  0 0.000 0.000 0.000
#> GSM1009069     6  0.0000      0.994 0.000 0.000  0 0.000 0.000 1.000
#> GSM1009083     2  0.1297      0.939 0.000 0.948  0 0.000 0.012 0.040
#> GSM1009097     4  0.0000      0.984 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009111     5  0.0000      0.958 0.000 0.000  0 0.000 1.000 0.000
#> GSM1009125     2  0.0260      0.957 0.008 0.992  0 0.000 0.000 0.000
#> GSM1009139     4  0.0000      0.984 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009153     1  0.0000      0.967 1.000 0.000  0 0.000 0.000 0.000
#> GSM1009167     3  0.0000      1.000 0.000 0.000  1 0.000 0.000 0.000
#> GSM1009181     2  0.0000      0.962 0.000 1.000  0 0.000 0.000 0.000
#> GSM1009195     1  0.0000      0.967 1.000 0.000  0 0.000 0.000 0.000
#> GSM1009070     6  0.0146      0.999 0.004 0.000  0 0.000 0.000 0.996
#> GSM1009084     2  0.2783      0.821 0.000 0.836  0 0.000 0.148 0.016
#> GSM1009098     4  0.0000      0.984 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009112     5  0.0000      0.958 0.000 0.000  0 0.000 1.000 0.000
#> GSM1009126     1  0.0000      0.967 1.000 0.000  0 0.000 0.000 0.000
#> GSM1009140     4  0.0000      0.984 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009154     1  0.0000      0.967 1.000 0.000  0 0.000 0.000 0.000
#> GSM1009168     3  0.0000      1.000 0.000 0.000  1 0.000 0.000 0.000
#> GSM1009182     2  0.0000      0.962 0.000 1.000  0 0.000 0.000 0.000
#> GSM1009196     1  0.0000      0.967 1.000 0.000  0 0.000 0.000 0.000
#> GSM1009071     6  0.0146      0.999 0.004 0.000  0 0.000 0.000 0.996
#> GSM1009085     5  0.3898      0.541 0.000 0.296  0 0.000 0.684 0.020
#> GSM1009099     4  0.0000      0.984 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009113     5  0.0000      0.958 0.000 0.000  0 0.000 1.000 0.000
#> GSM1009127     1  0.0000      0.967 1.000 0.000  0 0.000 0.000 0.000
#> GSM1009141     4  0.0000      0.984 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009155     1  0.0000      0.967 1.000 0.000  0 0.000 0.000 0.000
#> GSM1009169     3  0.0000      1.000 0.000 0.000  1 0.000 0.000 0.000
#> GSM1009183     2  0.0000      0.962 0.000 1.000  0 0.000 0.000 0.000
#> GSM1009197     1  0.0000      0.967 1.000 0.000  0 0.000 0.000 0.000
#> GSM1009072     6  0.0146      0.999 0.004 0.000  0 0.000 0.000 0.996
#> GSM1009086     2  0.1531      0.921 0.000 0.928  0 0.000 0.068 0.004
#> GSM1009100     4  0.0000      0.984 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009114     5  0.0000      0.958 0.000 0.000  0 0.000 1.000 0.000
#> GSM1009128     4  0.4167      0.446 0.344 0.024  0 0.632 0.000 0.000
#> GSM1009142     4  0.0000      0.984 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009156     1  0.0146      0.964 0.996 0.004  0 0.000 0.000 0.000
#> GSM1009170     3  0.0000      1.000 0.000 0.000  1 0.000 0.000 0.000
#> GSM1009184     2  0.0000      0.962 0.000 1.000  0 0.000 0.000 0.000
#> GSM1009198     1  0.0000      0.967 1.000 0.000  0 0.000 0.000 0.000
#> GSM1009073     6  0.0146      0.999 0.004 0.000  0 0.000 0.000 0.996
#> GSM1009087     1  0.3297      0.809 0.832 0.060  0 0.000 0.008 0.100
#> GSM1009101     4  0.0000      0.984 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009115     5  0.0000      0.958 0.000 0.000  0 0.000 1.000 0.000
#> GSM1009129     2  0.2805      0.753 0.184 0.812  0 0.000 0.000 0.004
#> GSM1009143     4  0.0000      0.984 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009157     1  0.0363      0.957 0.988 0.012  0 0.000 0.000 0.000
#> GSM1009171     3  0.0000      1.000 0.000 0.000  1 0.000 0.000 0.000
#> GSM1009185     2  0.0000      0.962 0.000 1.000  0 0.000 0.000 0.000
#> GSM1009199     1  0.0000      0.967 1.000 0.000  0 0.000 0.000 0.000
#> GSM1009074     6  0.0146      0.999 0.004 0.000  0 0.000 0.000 0.996
#> GSM1009088     1  0.6417      0.315 0.536 0.096  0 0.000 0.260 0.108
#> GSM1009102     4  0.0000      0.984 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009116     5  0.0000      0.958 0.000 0.000  0 0.000 1.000 0.000
#> GSM1009130     5  0.2902      0.705 0.196 0.000  0 0.000 0.800 0.004
#> GSM1009144     4  0.0000      0.984 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009158     1  0.0000      0.967 1.000 0.000  0 0.000 0.000 0.000
#> GSM1009172     3  0.0000      1.000 0.000 0.000  1 0.000 0.000 0.000
#> GSM1009186     2  0.0000      0.962 0.000 1.000  0 0.000 0.000 0.000
#> GSM1009200     1  0.0000      0.967 1.000 0.000  0 0.000 0.000 0.000
#> GSM1009075     6  0.0146      0.999 0.004 0.000  0 0.000 0.000 0.996
#> GSM1009089     1  0.2805      0.770 0.812 0.000  0 0.000 0.004 0.184
#> GSM1009103     4  0.0000      0.984 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009117     5  0.0000      0.958 0.000 0.000  0 0.000 1.000 0.000
#> GSM1009131     1  0.0000      0.967 1.000 0.000  0 0.000 0.000 0.000
#> GSM1009145     4  0.0000      0.984 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009159     1  0.0000      0.967 1.000 0.000  0 0.000 0.000 0.000
#> GSM1009173     3  0.0000      1.000 0.000 0.000  1 0.000 0.000 0.000
#> GSM1009187     2  0.0000      0.962 0.000 1.000  0 0.000 0.000 0.000
#> GSM1009201     1  0.0000      0.967 1.000 0.000  0 0.000 0.000 0.000

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

consensus_heatmap(res, k = 2)

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

consensus_heatmap(res, k = 3)

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

consensus_heatmap(res, k = 4)

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

consensus_heatmap(res, k = 5)

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

consensus_heatmap(res, k = 6)

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

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

membership_heatmap(res, k = 2)

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

membership_heatmap(res, k = 3)

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

membership_heatmap(res, k = 4)

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

membership_heatmap(res, k = 5)

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

membership_heatmap(res, k = 6)

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

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

Signature heatmaps where rows are scaled:

get_signatures(res, k = 2)

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

get_signatures(res, k = 3)

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

get_signatures(res, k = 4)

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

get_signatures(res, k = 5)

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

get_signatures(res, k = 6)

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

Signature heatmaps where rows are not scaled:

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

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

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

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

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

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

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

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

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

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

Compare the overlap of signatures from different k:

compare_signatures(res)

plot of chunk CV-pam-signature_compare

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

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

An example of the output of tb is:

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

The columns in tb are:

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

UMAP plot which shows how samples are separated.

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

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

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

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

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

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

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

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

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

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

Following heatmap shows how subgroups are split when increasing k:

collect_classes(res)

plot of chunk CV-pam-collect-classes

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

test_to_known_factors(res)
#>          n temperature(p) time(p) specimen(p) k
#> CV:pam 139          0.911   0.981    6.98e-19 2
#> CV:pam 139          0.991   1.000    7.70e-43 3
#> CV:pam 119          1.000   1.000    1.26e-55 4
#> CV:pam 138          1.000   1.000    5.56e-81 5
#> CV:pam 138          1.000   1.000   4.39e-104 6

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


CV:mclust

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

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

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

res
#> A 'ConsensusPartition' object with k = 2, 3, 4, 5, 6.
#>   On a matrix with 51941 rows and 140 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 3.
#> 
#> Following methods can be applied to this 'ConsensusPartition' object:
#>  [1] "cola_report"             "collect_classes"         "collect_plots"          
#>  [4] "collect_stats"           "colnames"                "compare_signatures"     
#>  [7] "consensus_heatmap"       "dimension_reduction"     "functional_enrichment"  
#> [10] "get_anno_col"            "get_anno"                "get_classes"            
#> [13] "get_consensus"           "get_matrix"              "get_membership"         
#> [16] "get_param"               "get_signatures"          "get_stats"              
#> [19] "is_best_k"               "is_stable_k"             "membership_heatmap"     
#> [22] "ncol"                    "nrow"                    "plot_ecdf"              
#> [25] "rownames"                "select_partition_number" "show"                   
#> [28] "suggest_best_k"          "test_to_known_factors"

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

collect_plots(res)

plot of chunk CV-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.456           0.711       0.841         0.2950 0.819   0.819
#> 3 3 0.598           0.871       0.919         0.7377 0.718   0.656
#> 4 4 0.584           0.528       0.722         0.2634 0.828   0.680
#> 5 5 0.740           0.823       0.871         0.1588 0.763   0.434
#> 6 6 0.841           0.828       0.873         0.0778 0.908   0.634

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
#> GSM1009062     1  0.3733      0.813 0.928 0.072
#> GSM1009076     1  0.0000      0.834 1.000 0.000
#> GSM1009090     1  0.7528      0.705 0.784 0.216
#> GSM1009104     1  0.9944     -0.267 0.544 0.456
#> GSM1009118     1  0.0376      0.835 0.996 0.004
#> GSM1009132     1  0.7528      0.705 0.784 0.216
#> GSM1009146     1  0.2948      0.825 0.948 0.052
#> GSM1009160     2  0.7528      1.000 0.216 0.784
#> GSM1009174     1  0.0000      0.834 1.000 0.000
#> GSM1009188     1  0.2423      0.829 0.960 0.040
#> GSM1009063     1  0.3733      0.813 0.928 0.072
#> GSM1009077     1  0.0000      0.834 1.000 0.000
#> GSM1009091     1  0.7528      0.705 0.784 0.216
#> GSM1009105     1  0.9944     -0.267 0.544 0.456
#> GSM1009119     1  0.0376      0.835 0.996 0.004
#> GSM1009133     1  0.7528      0.705 0.784 0.216
#> GSM1009147     1  0.3431      0.818 0.936 0.064
#> GSM1009161     2  0.7528      1.000 0.216 0.784
#> GSM1009175     1  0.0000      0.834 1.000 0.000
#> GSM1009189     1  0.2603      0.828 0.956 0.044
#> GSM1009064     1  0.3733      0.813 0.928 0.072
#> GSM1009078     1  0.0000      0.834 1.000 0.000
#> GSM1009092     1  0.7528      0.705 0.784 0.216
#> GSM1009106     1  0.9944     -0.267 0.544 0.456
#> GSM1009120     1  0.0376      0.835 0.996 0.004
#> GSM1009134     1  0.7528      0.705 0.784 0.216
#> GSM1009148     1  0.2948      0.825 0.948 0.052
#> GSM1009162     2  0.7528      1.000 0.216 0.784
#> GSM1009176     1  0.0000      0.834 1.000 0.000
#> GSM1009190     1  0.2603      0.828 0.956 0.044
#> GSM1009065     1  0.3733      0.813 0.928 0.072
#> GSM1009079     1  0.0000      0.834 1.000 0.000
#> GSM1009093     1  0.7528      0.705 0.784 0.216
#> GSM1009107     1  0.9944     -0.267 0.544 0.456
#> GSM1009121     1  0.0376      0.835 0.996 0.004
#> GSM1009135     1  0.7528      0.705 0.784 0.216
#> GSM1009149     1  0.2603      0.828 0.956 0.044
#> GSM1009163     2  0.7528      1.000 0.216 0.784
#> GSM1009177     1  0.0000      0.834 1.000 0.000
#> GSM1009191     1  0.2778      0.826 0.952 0.048
#> GSM1009066     1  0.3733      0.813 0.928 0.072
#> GSM1009080     1  0.0000      0.834 1.000 0.000
#> GSM1009094     1  0.7528      0.705 0.784 0.216
#> GSM1009108     1  0.9944     -0.267 0.544 0.456
#> GSM1009122     1  0.0376      0.835 0.996 0.004
#> GSM1009136     1  0.7528      0.705 0.784 0.216
#> GSM1009150     1  0.2603      0.828 0.956 0.044
#> GSM1009164     2  0.7528      1.000 0.216 0.784
#> GSM1009178     1  0.0000      0.834 1.000 0.000
#> GSM1009192     1  0.2603      0.828 0.956 0.044
#> GSM1009067     1  0.3733      0.813 0.928 0.072
#> GSM1009081     1  0.0000      0.834 1.000 0.000
#> GSM1009095     1  0.7528      0.705 0.784 0.216
#> GSM1009109     1  0.9944     -0.267 0.544 0.456
#> GSM1009123     1  0.0376      0.835 0.996 0.004
#> GSM1009137     1  0.7528      0.705 0.784 0.216
#> GSM1009151     1  0.2778      0.827 0.952 0.048
#> GSM1009165     2  0.7528      1.000 0.216 0.784
#> GSM1009179     1  0.0000      0.834 1.000 0.000
#> GSM1009193     1  0.2603      0.828 0.956 0.044
#> GSM1009068     1  0.3733      0.813 0.928 0.072
#> GSM1009082     1  0.0000      0.834 1.000 0.000
#> GSM1009096     1  0.7528      0.705 0.784 0.216
#> GSM1009110     1  0.9944     -0.267 0.544 0.456
#> GSM1009124     1  0.0376      0.835 0.996 0.004
#> GSM1009138     1  0.7528      0.705 0.784 0.216
#> GSM1009152     1  0.2603      0.828 0.956 0.044
#> GSM1009166     2  0.7528      1.000 0.216 0.784
#> GSM1009180     1  0.0000      0.834 1.000 0.000
#> GSM1009194     1  0.2603      0.828 0.956 0.044
#> GSM1009069     1  0.2236      0.830 0.964 0.036
#> GSM1009083     1  0.0000      0.834 1.000 0.000
#> GSM1009097     1  0.7528      0.705 0.784 0.216
#> GSM1009111     1  0.9944     -0.267 0.544 0.456
#> GSM1009125     1  0.0376      0.835 0.996 0.004
#> GSM1009139     1  0.7528      0.705 0.784 0.216
#> GSM1009153     1  0.2778      0.827 0.952 0.048
#> GSM1009167     2  0.7528      1.000 0.216 0.784
#> GSM1009181     1  0.0000      0.834 1.000 0.000
#> GSM1009195     1  0.3431      0.818 0.936 0.064
#> GSM1009070     1  0.3733      0.813 0.928 0.072
#> GSM1009084     1  0.0000      0.834 1.000 0.000
#> GSM1009098     1  0.7528      0.705 0.784 0.216
#> GSM1009112     1  0.9944     -0.267 0.544 0.456
#> GSM1009126     1  0.0376      0.835 0.996 0.004
#> GSM1009140     1  0.7528      0.705 0.784 0.216
#> GSM1009154     1  0.2948      0.825 0.948 0.052
#> GSM1009168     2  0.7528      1.000 0.216 0.784
#> GSM1009182     1  0.0000      0.834 1.000 0.000
#> GSM1009196     1  0.3274      0.820 0.940 0.060
#> GSM1009071     1  0.3733      0.813 0.928 0.072
#> GSM1009085     1  0.0000      0.834 1.000 0.000
#> GSM1009099     1  0.7528      0.705 0.784 0.216
#> GSM1009113     1  0.9944     -0.267 0.544 0.456
#> GSM1009127     1  0.0376      0.835 0.996 0.004
#> GSM1009141     1  0.7528      0.705 0.784 0.216
#> GSM1009155     1  0.3114      0.823 0.944 0.056
#> GSM1009169     2  0.7528      1.000 0.216 0.784
#> GSM1009183     1  0.0000      0.834 1.000 0.000
#> GSM1009197     1  0.2603      0.828 0.956 0.044
#> GSM1009072     1  0.3733      0.813 0.928 0.072
#> GSM1009086     1  0.0000      0.834 1.000 0.000
#> GSM1009100     1  0.7528      0.705 0.784 0.216
#> GSM1009114     1  0.9944     -0.267 0.544 0.456
#> GSM1009128     1  0.0376      0.835 0.996 0.004
#> GSM1009142     1  0.7528      0.705 0.784 0.216
#> GSM1009156     1  0.3431      0.818 0.936 0.064
#> GSM1009170     2  0.7528      1.000 0.216 0.784
#> GSM1009184     1  0.0000      0.834 1.000 0.000
#> GSM1009198     1  0.2603      0.828 0.956 0.044
#> GSM1009073     1  0.3733      0.813 0.928 0.072
#> GSM1009087     1  0.0000      0.834 1.000 0.000
#> GSM1009101     1  0.7528      0.705 0.784 0.216
#> GSM1009115     1  0.9944     -0.267 0.544 0.456
#> GSM1009129     1  0.0938      0.834 0.988 0.012
#> GSM1009143     1  0.7528      0.705 0.784 0.216
#> GSM1009157     1  0.3733      0.813 0.928 0.072
#> GSM1009171     2  0.7528      1.000 0.216 0.784
#> GSM1009185     1  0.0000      0.834 1.000 0.000
#> GSM1009199     1  0.2603      0.828 0.956 0.044
#> GSM1009074     1  0.3733      0.813 0.928 0.072
#> GSM1009088     1  0.0000      0.834 1.000 0.000
#> GSM1009102     1  0.7528      0.705 0.784 0.216
#> GSM1009116     1  0.9944     -0.267 0.544 0.456
#> GSM1009130     1  0.1414      0.833 0.980 0.020
#> GSM1009144     1  0.7528      0.705 0.784 0.216
#> GSM1009158     1  0.3114      0.823 0.944 0.056
#> GSM1009172     2  0.7528      1.000 0.216 0.784
#> GSM1009186     1  0.0000      0.834 1.000 0.000
#> GSM1009200     1  0.2603      0.828 0.956 0.044
#> GSM1009075     1  0.3733      0.813 0.928 0.072
#> GSM1009089     1  0.0000      0.834 1.000 0.000
#> GSM1009103     1  0.7528      0.705 0.784 0.216
#> GSM1009117     1  0.9944     -0.267 0.544 0.456
#> GSM1009131     1  0.0672      0.834 0.992 0.008
#> GSM1009145     1  0.7528      0.705 0.784 0.216
#> GSM1009159     1  0.2603      0.828 0.956 0.044
#> GSM1009173     2  0.7528      1.000 0.216 0.784
#> GSM1009187     1  0.0000      0.834 1.000 0.000
#> GSM1009201     1  0.2603      0.828 0.956 0.044

show/hide code output

cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#>            class entropy silhouette    p1    p2    p3
#> GSM1009062     2  0.0424      0.873 0.008 0.992 0.000
#> GSM1009076     2  0.0000      0.873 0.000 1.000 0.000
#> GSM1009090     1  0.0000      0.996 1.000 0.000 0.000
#> GSM1009104     2  0.3267      0.806 0.000 0.884 0.116
#> GSM1009118     2  0.2878      0.858 0.096 0.904 0.000
#> GSM1009132     1  0.0237      0.996 0.996 0.004 0.000
#> GSM1009146     2  0.5016      0.768 0.240 0.760 0.000
#> GSM1009160     3  0.0000      1.000 0.000 0.000 1.000
#> GSM1009174     2  0.0000      0.873 0.000 1.000 0.000
#> GSM1009188     2  0.5591      0.706 0.304 0.696 0.000
#> GSM1009063     2  0.0424      0.873 0.008 0.992 0.000
#> GSM1009077     2  0.0000      0.873 0.000 1.000 0.000
#> GSM1009091     1  0.0000      0.996 1.000 0.000 0.000
#> GSM1009105     2  0.3267      0.806 0.000 0.884 0.116
#> GSM1009119     2  0.5706      0.691 0.320 0.680 0.000
#> GSM1009133     1  0.0237      0.996 0.996 0.004 0.000
#> GSM1009147     2  0.5465      0.726 0.288 0.712 0.000
#> GSM1009161     3  0.0000      1.000 0.000 0.000 1.000
#> GSM1009175     2  0.0000      0.873 0.000 1.000 0.000
#> GSM1009189     2  0.5465      0.726 0.288 0.712 0.000
#> GSM1009064     2  0.0424      0.873 0.008 0.992 0.000
#> GSM1009078     2  0.0000      0.873 0.000 1.000 0.000
#> GSM1009092     1  0.0000      0.996 1.000 0.000 0.000
#> GSM1009106     2  0.3267      0.806 0.000 0.884 0.116
#> GSM1009120     2  0.2711      0.859 0.088 0.912 0.000
#> GSM1009134     1  0.0237      0.996 0.996 0.004 0.000
#> GSM1009148     2  0.3192      0.850 0.112 0.888 0.000
#> GSM1009162     3  0.0000      1.000 0.000 0.000 1.000
#> GSM1009176     2  0.0000      0.873 0.000 1.000 0.000
#> GSM1009190     2  0.5465      0.726 0.288 0.712 0.000
#> GSM1009065     2  0.0424      0.873 0.008 0.992 0.000
#> GSM1009079     2  0.0000      0.873 0.000 1.000 0.000
#> GSM1009093     1  0.0000      0.996 1.000 0.000 0.000
#> GSM1009107     2  0.3267      0.806 0.000 0.884 0.116
#> GSM1009121     2  0.2878      0.858 0.096 0.904 0.000
#> GSM1009135     1  0.0237      0.996 0.996 0.004 0.000
#> GSM1009149     2  0.4654      0.795 0.208 0.792 0.000
#> GSM1009163     3  0.0000      1.000 0.000 0.000 1.000
#> GSM1009177     2  0.0000      0.873 0.000 1.000 0.000
#> GSM1009191     2  0.5465      0.726 0.288 0.712 0.000
#> GSM1009066     2  0.0424      0.873 0.008 0.992 0.000
#> GSM1009080     2  0.0000      0.873 0.000 1.000 0.000
#> GSM1009094     1  0.0000      0.996 1.000 0.000 0.000
#> GSM1009108     2  0.3267      0.806 0.000 0.884 0.116
#> GSM1009122     2  0.3030      0.859 0.092 0.904 0.004
#> GSM1009136     1  0.0237      0.996 0.996 0.004 0.000
#> GSM1009150     2  0.3482      0.842 0.128 0.872 0.000
#> GSM1009164     3  0.0000      1.000 0.000 0.000 1.000
#> GSM1009178     2  0.0000      0.873 0.000 1.000 0.000
#> GSM1009192     2  0.5465      0.726 0.288 0.712 0.000
#> GSM1009067     2  0.0424      0.873 0.008 0.992 0.000
#> GSM1009081     2  0.0000      0.873 0.000 1.000 0.000
#> GSM1009095     1  0.0424      0.987 0.992 0.008 0.000
#> GSM1009109     2  0.3267      0.806 0.000 0.884 0.116
#> GSM1009123     2  0.6204      0.506 0.424 0.576 0.000
#> GSM1009137     1  0.0237      0.996 0.996 0.004 0.000
#> GSM1009151     2  0.2537      0.861 0.080 0.920 0.000
#> GSM1009165     3  0.0000      1.000 0.000 0.000 1.000
#> GSM1009179     2  0.0000      0.873 0.000 1.000 0.000
#> GSM1009193     2  0.5497      0.722 0.292 0.708 0.000
#> GSM1009068     2  0.0424      0.873 0.008 0.992 0.000
#> GSM1009082     2  0.0000      0.873 0.000 1.000 0.000
#> GSM1009096     1  0.0000      0.996 1.000 0.000 0.000
#> GSM1009110     2  0.3267      0.806 0.000 0.884 0.116
#> GSM1009124     2  0.5650      0.703 0.312 0.688 0.000
#> GSM1009138     1  0.0237      0.996 0.996 0.004 0.000
#> GSM1009152     2  0.3038      0.853 0.104 0.896 0.000
#> GSM1009166     3  0.0000      1.000 0.000 0.000 1.000
#> GSM1009180     2  0.0000      0.873 0.000 1.000 0.000
#> GSM1009194     2  0.5465      0.726 0.288 0.712 0.000
#> GSM1009069     2  0.0424      0.873 0.008 0.992 0.000
#> GSM1009083     2  0.0000      0.873 0.000 1.000 0.000
#> GSM1009097     1  0.0000      0.996 1.000 0.000 0.000
#> GSM1009111     2  0.3267      0.806 0.000 0.884 0.116
#> GSM1009125     2  0.2878      0.858 0.096 0.904 0.000
#> GSM1009139     1  0.0237      0.996 0.996 0.004 0.000
#> GSM1009153     2  0.4842      0.781 0.224 0.776 0.000
#> GSM1009167     3  0.0000      1.000 0.000 0.000 1.000
#> GSM1009181     2  0.0000      0.873 0.000 1.000 0.000
#> GSM1009195     2  0.5465      0.726 0.288 0.712 0.000
#> GSM1009070     2  0.0424      0.873 0.008 0.992 0.000
#> GSM1009084     2  0.0000      0.873 0.000 1.000 0.000
#> GSM1009098     1  0.0000      0.996 1.000 0.000 0.000
#> GSM1009112     2  0.3267      0.806 0.000 0.884 0.116
#> GSM1009126     2  0.5560      0.719 0.300 0.700 0.000
#> GSM1009140     1  0.0237      0.996 0.996 0.004 0.000
#> GSM1009154     2  0.4887      0.778 0.228 0.772 0.000
#> GSM1009168     3  0.0000      1.000 0.000 0.000 1.000
#> GSM1009182     2  0.0000      0.873 0.000 1.000 0.000
#> GSM1009196     2  0.5465      0.726 0.288 0.712 0.000
#> GSM1009071     2  0.0424      0.873 0.008 0.992 0.000
#> GSM1009085     2  0.0000      0.873 0.000 1.000 0.000
#> GSM1009099     1  0.0000      0.996 1.000 0.000 0.000
#> GSM1009113     2  0.3267      0.806 0.000 0.884 0.116
#> GSM1009127     2  0.3551      0.843 0.132 0.868 0.000
#> GSM1009141     1  0.0237      0.996 0.996 0.004 0.000
#> GSM1009155     2  0.5397      0.734 0.280 0.720 0.000
#> GSM1009169     3  0.0000      1.000 0.000 0.000 1.000
#> GSM1009183     2  0.0000      0.873 0.000 1.000 0.000
#> GSM1009197     2  0.5465      0.726 0.288 0.712 0.000
#> GSM1009072     2  0.0424      0.873 0.008 0.992 0.000
#> GSM1009086     2  0.0000      0.873 0.000 1.000 0.000
#> GSM1009100     1  0.0000      0.996 1.000 0.000 0.000
#> GSM1009114     2  0.3267      0.806 0.000 0.884 0.116
#> GSM1009128     2  0.4974      0.778 0.236 0.764 0.000
#> GSM1009142     1  0.0237      0.996 0.996 0.004 0.000
#> GSM1009156     2  0.5465      0.726 0.288 0.712 0.000
#> GSM1009170     3  0.0000      1.000 0.000 0.000 1.000
#> GSM1009184     2  0.0000      0.873 0.000 1.000 0.000
#> GSM1009198     2  0.5529      0.717 0.296 0.704 0.000
#> GSM1009073     2  0.0424      0.873 0.008 0.992 0.000
#> GSM1009087     2  0.0000      0.873 0.000 1.000 0.000
#> GSM1009101     1  0.0000      0.996 1.000 0.000 0.000
#> GSM1009115     2  0.3267      0.806 0.000 0.884 0.116
#> GSM1009129     2  0.3030      0.859 0.092 0.904 0.004
#> GSM1009143     1  0.0237      0.996 0.996 0.004 0.000
#> GSM1009157     2  0.5465      0.726 0.288 0.712 0.000
#> GSM1009171     3  0.0000      1.000 0.000 0.000 1.000
#> GSM1009185     2  0.0000      0.873 0.000 1.000 0.000
#> GSM1009199     2  0.5465      0.726 0.288 0.712 0.000
#> GSM1009074     2  0.0424      0.873 0.008 0.992 0.000
#> GSM1009088     2  0.0000      0.873 0.000 1.000 0.000
#> GSM1009102     1  0.0000      0.996 1.000 0.000 0.000
#> GSM1009116     2  0.3267      0.806 0.000 0.884 0.116
#> GSM1009130     2  0.3030      0.859 0.092 0.904 0.004
#> GSM1009144     1  0.0237      0.996 0.996 0.004 0.000
#> GSM1009158     2  0.5465      0.726 0.288 0.712 0.000
#> GSM1009172     3  0.0000      1.000 0.000 0.000 1.000
#> GSM1009186     2  0.0000      0.873 0.000 1.000 0.000
#> GSM1009200     2  0.5465      0.726 0.288 0.712 0.000
#> GSM1009075     2  0.0424      0.873 0.008 0.992 0.000
#> GSM1009089     2  0.0000      0.873 0.000 1.000 0.000
#> GSM1009103     1  0.0000      0.996 1.000 0.000 0.000
#> GSM1009117     2  0.3267      0.806 0.000 0.884 0.116
#> GSM1009131     2  0.3030      0.859 0.092 0.904 0.004
#> GSM1009145     1  0.0237      0.996 0.996 0.004 0.000
#> GSM1009159     2  0.5291      0.745 0.268 0.732 0.000
#> GSM1009173     3  0.0000      1.000 0.000 0.000 1.000
#> GSM1009187     2  0.0237      0.873 0.004 0.996 0.000
#> GSM1009201     2  0.5465      0.726 0.288 0.712 0.000

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>            class entropy silhouette    p1    p2 p3    p4
#> GSM1009062     1  0.4994     0.8418 0.520 0.480  0 0.000
#> GSM1009076     2  0.0000     0.4781 0.000 1.000  0 0.000
#> GSM1009090     4  0.0000     0.9945 0.000 0.000  0 1.000
#> GSM1009104     2  0.4830     0.3400 0.392 0.608  0 0.000
#> GSM1009118     2  0.4688     0.2891 0.128 0.792  0 0.080
#> GSM1009132     4  0.0336     0.9947 0.008 0.000  0 0.992
#> GSM1009146     1  0.6626     0.7479 0.528 0.384  0 0.088
#> GSM1009160     3  0.0000     1.0000 0.000 0.000  1 0.000
#> GSM1009174     2  0.0336     0.4758 0.008 0.992  0 0.000
#> GSM1009188     2  0.7567    -0.2864 0.276 0.484  0 0.240
#> GSM1009063     1  0.4994     0.8418 0.520 0.480  0 0.000
#> GSM1009077     2  0.0000     0.4781 0.000 1.000  0 0.000
#> GSM1009091     4  0.0000     0.9945 0.000 0.000  0 1.000
#> GSM1009105     2  0.4830     0.3400 0.392 0.608  0 0.000
#> GSM1009119     2  0.6374     0.0955 0.128 0.644  0 0.228
#> GSM1009133     4  0.0336     0.9947 0.008 0.000  0 0.992
#> GSM1009147     2  0.7599    -0.3963 0.344 0.448  0 0.208
#> GSM1009161     3  0.0000     1.0000 0.000 0.000  1 0.000
#> GSM1009175     2  0.0336     0.4758 0.008 0.992  0 0.000
#> GSM1009189     2  0.7613    -0.3922 0.340 0.448  0 0.212
#> GSM1009064     1  0.4994     0.8418 0.520 0.480  0 0.000
#> GSM1009078     2  0.0000     0.4781 0.000 1.000  0 0.000
#> GSM1009092     4  0.0000     0.9945 0.000 0.000  0 1.000
#> GSM1009106     2  0.4830     0.3400 0.392 0.608  0 0.000
#> GSM1009120     2  0.6119     0.1338 0.152 0.680  0 0.168
#> GSM1009134     4  0.0336     0.9947 0.008 0.000  0 0.992
#> GSM1009148     1  0.6376     0.7722 0.536 0.396  0 0.068
#> GSM1009162     3  0.0000     1.0000 0.000 0.000  1 0.000
#> GSM1009176     2  0.0336     0.4758 0.008 0.992  0 0.000
#> GSM1009190     2  0.7582    -0.3825 0.336 0.456  0 0.208
#> GSM1009065     1  0.4994     0.8418 0.520 0.480  0 0.000
#> GSM1009079     2  0.0000     0.4781 0.000 1.000  0 0.000
#> GSM1009093     4  0.0000     0.9945 0.000 0.000  0 1.000
#> GSM1009107     2  0.4830     0.3400 0.392 0.608  0 0.000
#> GSM1009121     2  0.5226     0.2504 0.128 0.756  0 0.116
#> GSM1009135     4  0.0336     0.9947 0.008 0.000  0 0.992
#> GSM1009149     1  0.6985     0.6909 0.480 0.404  0 0.116
#> GSM1009163     3  0.0000     1.0000 0.000 0.000  1 0.000
#> GSM1009177     2  0.0336     0.4758 0.008 0.992  0 0.000
#> GSM1009191     2  0.7591    -0.3897 0.340 0.452  0 0.208
#> GSM1009066     1  0.4992     0.8407 0.524 0.476  0 0.000
#> GSM1009080     2  0.0000     0.4781 0.000 1.000  0 0.000
#> GSM1009094     4  0.0000     0.9945 0.000 0.000  0 1.000
#> GSM1009108     2  0.4830     0.3400 0.392 0.608  0 0.000
#> GSM1009122     2  0.4621     0.2938 0.128 0.796  0 0.076
#> GSM1009136     4  0.0336     0.9947 0.008 0.000  0 0.992
#> GSM1009150     1  0.6426     0.7682 0.536 0.392  0 0.072
#> GSM1009164     3  0.0000     1.0000 0.000 0.000  1 0.000
#> GSM1009178     2  0.0469     0.4723 0.012 0.988  0 0.000
#> GSM1009192     2  0.7599    -0.3963 0.344 0.448  0 0.208
#> GSM1009067     1  0.4994     0.8418 0.520 0.480  0 0.000
#> GSM1009081     2  0.0000     0.4781 0.000 1.000  0 0.000
#> GSM1009095     4  0.0188     0.9916 0.000 0.004  0 0.996
#> GSM1009109     2  0.4830     0.3400 0.392 0.608  0 0.000
#> GSM1009123     2  0.7098     0.0107 0.128 0.472  0 0.400
#> GSM1009137     4  0.0336     0.9947 0.008 0.000  0 0.992
#> GSM1009151     1  0.6376     0.7722 0.536 0.396  0 0.068
#> GSM1009165     3  0.0000     1.0000 0.000 0.000  1 0.000
#> GSM1009179     2  0.0469     0.4723 0.012 0.988  0 0.000
#> GSM1009193     2  0.7669    -0.3792 0.328 0.444  0 0.228
#> GSM1009068     1  0.4994     0.8418 0.520 0.480  0 0.000
#> GSM1009082     2  0.0000     0.4781 0.000 1.000  0 0.000
#> GSM1009096     4  0.0000     0.9945 0.000 0.000  0 1.000
#> GSM1009110     2  0.4790     0.3455 0.380 0.620  0 0.000
#> GSM1009124     2  0.6248     0.1165 0.128 0.660  0 0.212
#> GSM1009138     4  0.0336     0.9947 0.008 0.000  0 0.992
#> GSM1009152     1  0.6376     0.7722 0.536 0.396  0 0.068
#> GSM1009166     3  0.0000     1.0000 0.000 0.000  1 0.000
#> GSM1009180     2  0.0336     0.4758 0.008 0.992  0 0.000
#> GSM1009194     2  0.7599    -0.3963 0.344 0.448  0 0.208
#> GSM1009069     2  0.2530     0.3611 0.100 0.896  0 0.004
#> GSM1009083     2  0.0000     0.4781 0.000 1.000  0 0.000
#> GSM1009097     4  0.0000     0.9945 0.000 0.000  0 1.000
#> GSM1009111     2  0.4830     0.3400 0.392 0.608  0 0.000
#> GSM1009125     2  0.4621     0.2938 0.128 0.796  0 0.076
#> GSM1009139     4  0.0336     0.9947 0.008 0.000  0 0.992
#> GSM1009153     1  0.6552     0.7136 0.484 0.440  0 0.076
#> GSM1009167     3  0.0000     1.0000 0.000 0.000  1 0.000
#> GSM1009181     2  0.0336     0.4758 0.008 0.992  0 0.000
#> GSM1009195     2  0.7464    -0.3063 0.296 0.496  0 0.208
#> GSM1009070     1  0.5165     0.8366 0.512 0.484  0 0.004
#> GSM1009084     2  0.0000     0.4781 0.000 1.000  0 0.000
#> GSM1009098     4  0.0000     0.9945 0.000 0.000  0 1.000
#> GSM1009112     2  0.4830     0.3400 0.392 0.608  0 0.000
#> GSM1009126     2  0.6181     0.1296 0.128 0.668  0 0.204
#> GSM1009140     4  0.0336     0.9947 0.008 0.000  0 0.992
#> GSM1009154     1  0.6474     0.7633 0.536 0.388  0 0.076
#> GSM1009168     3  0.0000     1.0000 0.000 0.000  1 0.000
#> GSM1009182     2  0.0336     0.4758 0.008 0.992  0 0.000
#> GSM1009196     2  0.7599    -0.3963 0.344 0.448  0 0.208
#> GSM1009071     1  0.4994     0.8418 0.520 0.480  0 0.000
#> GSM1009085     2  0.0000     0.4781 0.000 1.000  0 0.000
#> GSM1009099     4  0.0000     0.9945 0.000 0.000  0 1.000
#> GSM1009113     2  0.4830     0.3400 0.392 0.608  0 0.000
#> GSM1009127     2  0.5923     0.1702 0.128 0.696  0 0.176
#> GSM1009141     4  0.0336     0.9947 0.008 0.000  0 0.992
#> GSM1009155     2  0.7265    -0.2846 0.288 0.528  0 0.184
#> GSM1009169     3  0.0000     1.0000 0.000 0.000  1 0.000
#> GSM1009183     2  0.0336     0.4758 0.008 0.992  0 0.000
#> GSM1009197     2  0.7599    -0.3963 0.344 0.448  0 0.208
#> GSM1009072     1  0.4994     0.8418 0.520 0.480  0 0.000
#> GSM1009086     2  0.0000     0.4781 0.000 1.000  0 0.000
#> GSM1009100     4  0.0000     0.9945 0.000 0.000  0 1.000
#> GSM1009114     2  0.4830     0.3400 0.392 0.608  0 0.000
#> GSM1009128     2  0.5923     0.1779 0.128 0.696  0 0.176
#> GSM1009142     4  0.0336     0.9947 0.008 0.000  0 0.992
#> GSM1009156     2  0.7382    -0.2789 0.276 0.516  0 0.208
#> GSM1009170     3  0.0000     1.0000 0.000 0.000  1 0.000
#> GSM1009184     2  0.0336     0.4758 0.008 0.992  0 0.000
#> GSM1009198     2  0.7621    -0.3224 0.296 0.468  0 0.236
#> GSM1009073     1  0.4994     0.8418 0.520 0.480  0 0.000
#> GSM1009087     2  0.0000     0.4781 0.000 1.000  0 0.000
#> GSM1009101     4  0.0000     0.9945 0.000 0.000  0 1.000
#> GSM1009115     2  0.4830     0.3400 0.392 0.608  0 0.000
#> GSM1009129     2  0.4621     0.2938 0.128 0.796  0 0.076
#> GSM1009143     4  0.0336     0.9947 0.008 0.000  0 0.992
#> GSM1009157     2  0.7304    -0.2422 0.260 0.532  0 0.208
#> GSM1009171     3  0.0000     1.0000 0.000 0.000  1 0.000
#> GSM1009185     2  0.0469     0.4723 0.012 0.988  0 0.000
#> GSM1009199     2  0.7591    -0.3897 0.340 0.452  0 0.208
#> GSM1009074     1  0.4994     0.8418 0.520 0.480  0 0.000
#> GSM1009088     2  0.0000     0.4781 0.000 1.000  0 0.000
#> GSM1009102     4  0.0000     0.9945 0.000 0.000  0 1.000
#> GSM1009116     2  0.4830     0.3400 0.392 0.608  0 0.000
#> GSM1009130     2  0.4621     0.2938 0.128 0.796  0 0.076
#> GSM1009144     4  0.0336     0.9947 0.008 0.000  0 0.992
#> GSM1009158     1  0.7292     0.6272 0.460 0.388  0 0.152
#> GSM1009172     3  0.0000     1.0000 0.000 0.000  1 0.000
#> GSM1009186     2  0.0336     0.4758 0.008 0.992  0 0.000
#> GSM1009200     2  0.7564    -0.3685 0.328 0.464  0 0.208
#> GSM1009075     1  0.4994     0.8418 0.520 0.480  0 0.000
#> GSM1009089     2  0.0188     0.4753 0.004 0.996  0 0.000
#> GSM1009103     4  0.0000     0.9945 0.000 0.000  0 1.000
#> GSM1009117     2  0.4830     0.3400 0.392 0.608  0 0.000
#> GSM1009131     2  0.4621     0.2938 0.128 0.796  0 0.076
#> GSM1009145     4  0.0336     0.9947 0.008 0.000  0 0.992
#> GSM1009159     2  0.7454    -0.4668 0.376 0.448  0 0.176
#> GSM1009173     3  0.0000     1.0000 0.000 0.000  1 0.000
#> GSM1009187     2  0.0804     0.4680 0.012 0.980  0 0.008
#> GSM1009201     2  0.7573    -0.3757 0.332 0.460  0 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
#> GSM1009062     1  0.3639    0.76232 0.812 0.044  0 0.000 0.144
#> GSM1009076     2  0.0162    0.83521 0.000 0.996  0 0.000 0.004
#> GSM1009090     4  0.1671    0.92101 0.076 0.000  0 0.924 0.000
#> GSM1009104     5  0.2561    0.99897 0.000 0.144  0 0.000 0.856
#> GSM1009118     2  0.4354    0.46811 0.368 0.624  0 0.008 0.000
#> GSM1009132     4  0.2424    0.93229 0.132 0.000  0 0.868 0.000
#> GSM1009146     1  0.0510    0.82898 0.984 0.000  0 0.016 0.000
#> GSM1009160     3  0.0000    1.00000 0.000 0.000  1 0.000 0.000
#> GSM1009174     2  0.0000    0.83517 0.000 1.000  0 0.000 0.000
#> GSM1009188     1  0.3085    0.80925 0.852 0.032  0 0.116 0.000
#> GSM1009063     1  0.3639    0.76232 0.812 0.044  0 0.000 0.144
#> GSM1009077     2  0.0162    0.83521 0.000 0.996  0 0.000 0.004
#> GSM1009091     4  0.0000    0.89045 0.000 0.000  0 1.000 0.000
#> GSM1009105     5  0.2561    0.99897 0.000 0.144  0 0.000 0.856
#> GSM1009119     1  0.6202    0.23179 0.496 0.356  0 0.148 0.000
#> GSM1009133     4  0.2424    0.93229 0.132 0.000  0 0.868 0.000
#> GSM1009147     1  0.2740    0.82306 0.876 0.028  0 0.096 0.000
#> GSM1009161     3  0.0000    1.00000 0.000 0.000  1 0.000 0.000
#> GSM1009175     2  0.0000    0.83517 0.000 1.000  0 0.000 0.000
#> GSM1009189     1  0.2740    0.82306 0.876 0.028  0 0.096 0.000
#> GSM1009064     1  0.3639    0.76232 0.812 0.044  0 0.000 0.144
#> GSM1009078     2  0.0162    0.83521 0.000 0.996  0 0.000 0.004
#> GSM1009092     4  0.0000    0.89045 0.000 0.000  0 1.000 0.000
#> GSM1009106     5  0.2561    0.99897 0.000 0.144  0 0.000 0.856
#> GSM1009120     1  0.5357    0.54102 0.640 0.264  0 0.096 0.000
#> GSM1009134     4  0.2424    0.93229 0.132 0.000  0 0.868 0.000
#> GSM1009148     1  0.0510    0.82898 0.984 0.000  0 0.016 0.000
#> GSM1009162     3  0.0000    1.00000 0.000 0.000  1 0.000 0.000
#> GSM1009176     2  0.0000    0.83517 0.000 1.000  0 0.000 0.000
#> GSM1009190     1  0.2824    0.82189 0.872 0.032  0 0.096 0.000
#> GSM1009065     1  0.3710    0.76032 0.808 0.048  0 0.000 0.144
#> GSM1009079     2  0.0162    0.83521 0.000 0.996  0 0.000 0.004
#> GSM1009093     4  0.0000    0.89045 0.000 0.000  0 1.000 0.000
#> GSM1009107     5  0.2561    0.99897 0.000 0.144  0 0.000 0.856
#> GSM1009121     2  0.4367    0.46111 0.372 0.620  0 0.008 0.000
#> GSM1009135     4  0.2424    0.93229 0.132 0.000  0 0.868 0.000
#> GSM1009149     1  0.0510    0.82898 0.984 0.000  0 0.016 0.000
#> GSM1009163     3  0.0000    1.00000 0.000 0.000  1 0.000 0.000
#> GSM1009177     2  0.0000    0.83517 0.000 1.000  0 0.000 0.000
#> GSM1009191     1  0.2740    0.82306 0.876 0.028  0 0.096 0.000
#> GSM1009066     1  0.3639    0.76232 0.812 0.044  0 0.000 0.144
#> GSM1009080     2  0.0162    0.83521 0.000 0.996  0 0.000 0.004
#> GSM1009094     4  0.0000    0.89045 0.000 0.000  0 1.000 0.000
#> GSM1009108     5  0.2561    0.99897 0.000 0.144  0 0.000 0.856
#> GSM1009122     2  0.4354    0.46811 0.368 0.624  0 0.008 0.000
#> GSM1009136     4  0.2488    0.93178 0.124 0.004  0 0.872 0.000
#> GSM1009150     1  0.0510    0.82898 0.984 0.000  0 0.016 0.000
#> GSM1009164     3  0.0000    1.00000 0.000 0.000  1 0.000 0.000
#> GSM1009178     2  0.0404    0.83137 0.012 0.988  0 0.000 0.000
#> GSM1009192     1  0.2740    0.82306 0.876 0.028  0 0.096 0.000
#> GSM1009067     1  0.3639    0.76232 0.812 0.044  0 0.000 0.144
#> GSM1009081     2  0.0162    0.83521 0.000 0.996  0 0.000 0.004
#> GSM1009095     4  0.2753    0.91629 0.136 0.008  0 0.856 0.000
#> GSM1009109     5  0.2561    0.99897 0.000 0.144  0 0.000 0.856
#> GSM1009123     1  0.6729    0.00606 0.376 0.372  0 0.252 0.000
#> GSM1009137     4  0.2424    0.93229 0.132 0.000  0 0.868 0.000
#> GSM1009151     1  0.0510    0.82898 0.984 0.000  0 0.016 0.000
#> GSM1009165     3  0.0000    1.00000 0.000 0.000  1 0.000 0.000
#> GSM1009179     2  0.0404    0.83137 0.012 0.988  0 0.000 0.000
#> GSM1009193     1  0.2848    0.81784 0.868 0.028  0 0.104 0.000
#> GSM1009068     1  0.3639    0.76232 0.812 0.044  0 0.000 0.144
#> GSM1009082     2  0.0162    0.83521 0.000 0.996  0 0.000 0.004
#> GSM1009096     4  0.0000    0.89045 0.000 0.000  0 1.000 0.000
#> GSM1009110     5  0.2690    0.98654 0.000 0.156  0 0.000 0.844
#> GSM1009124     2  0.5591    0.25486 0.396 0.528  0 0.076 0.000
#> GSM1009138     4  0.2424    0.93229 0.132 0.000  0 0.868 0.000
#> GSM1009152     1  0.0510    0.82898 0.984 0.000  0 0.016 0.000
#> GSM1009166     3  0.0000    1.00000 0.000 0.000  1 0.000 0.000
#> GSM1009180     2  0.0290    0.83367 0.008 0.992  0 0.000 0.000
#> GSM1009194     1  0.2740    0.82306 0.876 0.028  0 0.096 0.000
#> GSM1009069     1  0.5385    0.17949 0.512 0.432  0 0.000 0.056
#> GSM1009083     2  0.0162    0.83521 0.000 0.996  0 0.000 0.004
#> GSM1009097     4  0.0000    0.89045 0.000 0.000  0 1.000 0.000
#> GSM1009111     5  0.2561    0.99897 0.000 0.144  0 0.000 0.856
#> GSM1009125     2  0.4367    0.46111 0.372 0.620  0 0.008 0.000
#> GSM1009139     4  0.2471    0.92915 0.136 0.000  0 0.864 0.000
#> GSM1009153     1  0.0510    0.82898 0.984 0.000  0 0.016 0.000
#> GSM1009167     3  0.0000    1.00000 0.000 0.000  1 0.000 0.000
#> GSM1009181     2  0.0000    0.83517 0.000 1.000  0 0.000 0.000
#> GSM1009195     1  0.2740    0.82306 0.876 0.028  0 0.096 0.000
#> GSM1009070     1  0.4084    0.77247 0.800 0.044  0 0.016 0.140
#> GSM1009084     2  0.0162    0.83521 0.000 0.996  0 0.000 0.004
#> GSM1009098     4  0.0000    0.89045 0.000 0.000  0 1.000 0.000
#> GSM1009112     5  0.2561    0.99897 0.000 0.144  0 0.000 0.856
#> GSM1009126     2  0.5165    0.37540 0.376 0.576  0 0.048 0.000
#> GSM1009140     4  0.2424    0.93229 0.132 0.000  0 0.868 0.000
#> GSM1009154     1  0.0510    0.82898 0.984 0.000  0 0.016 0.000
#> GSM1009168     3  0.0000    1.00000 0.000 0.000  1 0.000 0.000
#> GSM1009182     2  0.0162    0.83484 0.004 0.996  0 0.000 0.000
#> GSM1009196     1  0.2740    0.82306 0.876 0.028  0 0.096 0.000
#> GSM1009071     1  0.3639    0.76232 0.812 0.044  0 0.000 0.144
#> GSM1009085     2  0.0162    0.83521 0.000 0.996  0 0.000 0.004
#> GSM1009099     4  0.0000    0.89045 0.000 0.000  0 1.000 0.000
#> GSM1009113     5  0.2561    0.99897 0.000 0.144  0 0.000 0.856
#> GSM1009127     1  0.5856    0.16362 0.504 0.396  0 0.100 0.000
#> GSM1009141     4  0.2561    0.92209 0.144 0.000  0 0.856 0.000
#> GSM1009155     1  0.1965    0.81917 0.904 0.000  0 0.096 0.000
#> GSM1009169     3  0.0000    1.00000 0.000 0.000  1 0.000 0.000
#> GSM1009183     2  0.0000    0.83517 0.000 1.000  0 0.000 0.000
#> GSM1009197     1  0.2740    0.82306 0.876 0.028  0 0.096 0.000
#> GSM1009072     1  0.3639    0.76232 0.812 0.044  0 0.000 0.144
#> GSM1009086     2  0.0162    0.83521 0.000 0.996  0 0.000 0.004
#> GSM1009100     4  0.0000    0.89045 0.000 0.000  0 1.000 0.000
#> GSM1009114     5  0.2561    0.99897 0.000 0.144  0 0.000 0.856
#> GSM1009128     2  0.5968    0.23288 0.372 0.512  0 0.116 0.000
#> GSM1009142     4  0.2424    0.93229 0.132 0.000  0 0.868 0.000
#> GSM1009156     1  0.3130    0.81978 0.856 0.048  0 0.096 0.000
#> GSM1009170     3  0.0000    1.00000 0.000 0.000  1 0.000 0.000
#> GSM1009184     2  0.0000    0.83517 0.000 1.000  0 0.000 0.000
#> GSM1009198     1  0.3182    0.80567 0.844 0.032  0 0.124 0.000
#> GSM1009073     1  0.3639    0.76232 0.812 0.044  0 0.000 0.144
#> GSM1009087     2  0.0162    0.83521 0.000 0.996  0 0.000 0.004
#> GSM1009101     4  0.0000    0.89045 0.000 0.000  0 1.000 0.000
#> GSM1009115     5  0.2561    0.99897 0.000 0.144  0 0.000 0.856
#> GSM1009129     2  0.4354    0.46811 0.368 0.624  0 0.008 0.000
#> GSM1009143     4  0.2424    0.93229 0.132 0.000  0 0.868 0.000
#> GSM1009157     1  0.2983    0.82178 0.864 0.040  0 0.096 0.000
#> GSM1009171     3  0.0000    1.00000 0.000 0.000  1 0.000 0.000
#> GSM1009185     2  0.0609    0.82706 0.020 0.980  0 0.000 0.000
#> GSM1009199     1  0.2740    0.82306 0.876 0.028  0 0.096 0.000
#> GSM1009074     1  0.3639    0.76232 0.812 0.044  0 0.000 0.144
#> GSM1009088     2  0.0162    0.83521 0.000 0.996  0 0.000 0.004
#> GSM1009102     4  0.2179    0.92909 0.112 0.000  0 0.888 0.000
#> GSM1009116     5  0.2561    0.99897 0.000 0.144  0 0.000 0.856
#> GSM1009130     2  0.4354    0.46811 0.368 0.624  0 0.008 0.000
#> GSM1009144     4  0.2424    0.93229 0.132 0.000  0 0.868 0.000
#> GSM1009158     1  0.1478    0.82688 0.936 0.000  0 0.064 0.000
#> GSM1009172     3  0.0000    1.00000 0.000 0.000  1 0.000 0.000
#> GSM1009186     2  0.0162    0.83484 0.004 0.996  0 0.000 0.000
#> GSM1009200     1  0.2740    0.82306 0.876 0.028  0 0.096 0.000
#> GSM1009075     1  0.3639    0.76232 0.812 0.044  0 0.000 0.144
#> GSM1009089     2  0.0162    0.83521 0.000 0.996  0 0.000 0.004
#> GSM1009103     4  0.2179    0.92909 0.112 0.000  0 0.888 0.000
#> GSM1009117     5  0.2561    0.99897 0.000 0.144  0 0.000 0.856
#> GSM1009131     2  0.4367    0.46111 0.372 0.620  0 0.008 0.000
#> GSM1009145     4  0.2377    0.93237 0.128 0.000  0 0.872 0.000
#> GSM1009159     1  0.1942    0.82879 0.920 0.012  0 0.068 0.000
#> GSM1009173     3  0.0000    1.00000 0.000 0.000  1 0.000 0.000
#> GSM1009187     2  0.1121    0.80862 0.044 0.956  0 0.000 0.000
#> GSM1009201     1  0.2740    0.82306 0.876 0.028  0 0.096 0.000

show/hide code output

cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#>            class entropy silhouette    p1    p2 p3    p4    p5    p6
#> GSM1009062     6  0.3927      0.618 0.172 0.072  0 0.000 0.000 0.756
#> GSM1009076     2  0.1007      0.953 0.000 0.956  0 0.000 0.000 0.044
#> GSM1009090     4  0.0713      0.940 0.028 0.000  0 0.972 0.000 0.000
#> GSM1009104     5  0.0000      0.996 0.000 0.000  0 0.000 1.000 0.000
#> GSM1009118     6  0.6441      0.326 0.172 0.368  0 0.036 0.000 0.424
#> GSM1009132     4  0.1714      0.941 0.092 0.000  0 0.908 0.000 0.000
#> GSM1009146     1  0.1434      0.850 0.940 0.000  0 0.012 0.000 0.048
#> GSM1009160     3  0.0000      1.000 0.000 0.000  1 0.000 0.000 0.000
#> GSM1009174     2  0.0622      0.973 0.008 0.980  0 0.000 0.000 0.012
#> GSM1009188     1  0.2778      0.712 0.824 0.008  0 0.168 0.000 0.000
#> GSM1009063     6  0.3927      0.618 0.172 0.072  0 0.000 0.000 0.756
#> GSM1009077     2  0.1007      0.953 0.000 0.956  0 0.000 0.000 0.044
#> GSM1009091     4  0.0000      0.939 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009105     5  0.0000      0.996 0.000 0.000  0 0.000 1.000 0.000
#> GSM1009119     1  0.6785     -0.154 0.440 0.128  0 0.096 0.000 0.336
#> GSM1009133     4  0.1501      0.946 0.076 0.000  0 0.924 0.000 0.000
#> GSM1009147     1  0.0790      0.860 0.968 0.000  0 0.032 0.000 0.000
#> GSM1009161     3  0.0000      1.000 0.000 0.000  1 0.000 0.000 0.000
#> GSM1009175     2  0.0622      0.973 0.008 0.980  0 0.000 0.000 0.012
#> GSM1009189     1  0.1204      0.846 0.944 0.000  0 0.056 0.000 0.000
#> GSM1009064     6  0.3927      0.618 0.172 0.072  0 0.000 0.000 0.756
#> GSM1009078     2  0.0000      0.971 0.000 1.000  0 0.000 0.000 0.000
#> GSM1009092     4  0.0000      0.939 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009106     5  0.0000      0.996 0.000 0.000  0 0.000 1.000 0.000
#> GSM1009120     1  0.6681     -0.136 0.456 0.136  0 0.080 0.000 0.328
#> GSM1009134     4  0.1556      0.945 0.080 0.000  0 0.920 0.000 0.000
#> GSM1009148     1  0.1434      0.850 0.940 0.000  0 0.012 0.000 0.048
#> GSM1009162     3  0.0000      1.000 0.000 0.000  1 0.000 0.000 0.000
#> GSM1009176     2  0.0622      0.973 0.008 0.980  0 0.000 0.000 0.012
#> GSM1009190     1  0.1010      0.860 0.960 0.004  0 0.036 0.000 0.000
#> GSM1009065     6  0.3927      0.618 0.172 0.072  0 0.000 0.000 0.756
#> GSM1009079     2  0.0603      0.968 0.004 0.980  0 0.000 0.000 0.016
#> GSM1009093     4  0.0000      0.939 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009107     5  0.0000      0.996 0.000 0.000  0 0.000 1.000 0.000
#> GSM1009121     6  0.6548      0.311 0.332 0.204  0 0.036 0.000 0.428
#> GSM1009135     4  0.1501      0.946 0.076 0.000  0 0.924 0.000 0.000
#> GSM1009149     1  0.1297      0.854 0.948 0.000  0 0.012 0.000 0.040
#> GSM1009163     3  0.0000      1.000 0.000 0.000  1 0.000 0.000 0.000
#> GSM1009177     2  0.0622      0.973 0.008 0.980  0 0.000 0.000 0.012
#> GSM1009191     1  0.0363      0.865 0.988 0.000  0 0.012 0.000 0.000
#> GSM1009066     6  0.3907      0.614 0.176 0.068  0 0.000 0.000 0.756
#> GSM1009080     2  0.0937      0.955 0.000 0.960  0 0.000 0.000 0.040
#> GSM1009094     4  0.0000      0.939 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009108     5  0.0000      0.996 0.000 0.000  0 0.000 1.000 0.000
#> GSM1009122     6  0.6365      0.306 0.156 0.380  0 0.036 0.000 0.428
#> GSM1009136     4  0.1814      0.938 0.100 0.000  0 0.900 0.000 0.000
#> GSM1009150     1  0.1434      0.850 0.940 0.000  0 0.012 0.000 0.048
#> GSM1009164     3  0.0000      1.000 0.000 0.000  1 0.000 0.000 0.000
#> GSM1009178     2  0.0622      0.973 0.008 0.980  0 0.000 0.000 0.012
#> GSM1009192     1  0.0363      0.865 0.988 0.000  0 0.012 0.000 0.000
#> GSM1009067     6  0.3927      0.618 0.172 0.072  0 0.000 0.000 0.756
#> GSM1009081     2  0.0713      0.962 0.000 0.972  0 0.000 0.000 0.028
#> GSM1009095     4  0.2513      0.838 0.140 0.008  0 0.852 0.000 0.000
#> GSM1009109     5  0.0000      0.996 0.000 0.000  0 0.000 1.000 0.000
#> GSM1009123     6  0.6958      0.217 0.260 0.068  0 0.256 0.000 0.416
#> GSM1009137     4  0.1501      0.946 0.076 0.000  0 0.924 0.000 0.000
#> GSM1009151     1  0.1434      0.850 0.940 0.000  0 0.012 0.000 0.048
#> GSM1009165     3  0.0000      1.000 0.000 0.000  1 0.000 0.000 0.000
#> GSM1009179     2  0.0622      0.973 0.008 0.980  0 0.000 0.000 0.012
#> GSM1009193     1  0.1610      0.825 0.916 0.000  0 0.084 0.000 0.000
#> GSM1009068     6  0.3927      0.618 0.172 0.072  0 0.000 0.000 0.756
#> GSM1009082     2  0.1007      0.953 0.000 0.956  0 0.000 0.000 0.044
#> GSM1009096     4  0.0000      0.939 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009110     5  0.1082      0.948 0.004 0.040  0 0.000 0.956 0.000
#> GSM1009124     6  0.6472      0.219 0.384 0.156  0 0.044 0.000 0.416
#> GSM1009138     4  0.1501      0.946 0.076 0.000  0 0.924 0.000 0.000
#> GSM1009152     1  0.1434      0.850 0.940 0.000  0 0.012 0.000 0.048
#> GSM1009166     3  0.0000      1.000 0.000 0.000  1 0.000 0.000 0.000
#> GSM1009180     2  0.0806      0.967 0.008 0.972  0 0.000 0.000 0.020
#> GSM1009194     1  0.0363      0.865 0.988 0.000  0 0.012 0.000 0.000
#> GSM1009069     6  0.5138      0.536 0.168 0.208  0 0.000 0.000 0.624
#> GSM1009083     2  0.0632      0.963 0.000 0.976  0 0.000 0.000 0.024
#> GSM1009097     4  0.0000      0.939 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009111     5  0.0000      0.996 0.000 0.000  0 0.000 1.000 0.000
#> GSM1009125     6  0.6548      0.311 0.332 0.204  0 0.036 0.000 0.428
#> GSM1009139     4  0.1957      0.928 0.112 0.000  0 0.888 0.000 0.000
#> GSM1009153     1  0.1225      0.855 0.952 0.000  0 0.012 0.000 0.036
#> GSM1009167     3  0.0000      1.000 0.000 0.000  1 0.000 0.000 0.000
#> GSM1009181     2  0.0622      0.973 0.008 0.980  0 0.000 0.000 0.012
#> GSM1009195     1  0.0363      0.865 0.988 0.000  0 0.012 0.000 0.000
#> GSM1009070     6  0.4742      0.562 0.240 0.072  0 0.012 0.000 0.676
#> GSM1009084     2  0.1007      0.953 0.000 0.956  0 0.000 0.000 0.044
#> GSM1009098     4  0.0000      0.939 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009112     5  0.0000      0.996 0.000 0.000  0 0.000 1.000 0.000
#> GSM1009126     6  0.6586      0.282 0.348 0.184  0 0.044 0.000 0.424
#> GSM1009140     4  0.1501      0.946 0.076 0.000  0 0.924 0.000 0.000
#> GSM1009154     1  0.1297      0.854 0.948 0.000  0 0.012 0.000 0.040
#> GSM1009168     3  0.0000      1.000 0.000 0.000  1 0.000 0.000 0.000
#> GSM1009182     2  0.0622      0.973 0.008 0.980  0 0.000 0.000 0.012
#> GSM1009196     1  0.0363      0.865 0.988 0.000  0 0.012 0.000 0.000
#> GSM1009071     6  0.3927      0.618 0.172 0.072  0 0.000 0.000 0.756
#> GSM1009085     2  0.1007      0.953 0.000 0.956  0 0.000 0.000 0.044
#> GSM1009099     4  0.0000      0.939 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009113     5  0.0000      0.996 0.000 0.000  0 0.000 1.000 0.000
#> GSM1009127     1  0.6789     -0.174 0.436 0.152  0 0.080 0.000 0.332
#> GSM1009141     4  0.1910      0.929 0.108 0.000  0 0.892 0.000 0.000
#> GSM1009155     1  0.1088      0.859 0.960 0.000  0 0.016 0.000 0.024
#> GSM1009169     3  0.0000      1.000 0.000 0.000  1 0.000 0.000 0.000
#> GSM1009183     2  0.0622      0.973 0.008 0.980  0 0.000 0.000 0.012
#> GSM1009197     1  0.1204      0.845 0.944 0.000  0 0.056 0.000 0.000
#> GSM1009072     6  0.3927      0.618 0.172 0.072  0 0.000 0.000 0.756
#> GSM1009086     2  0.1007      0.953 0.000 0.956  0 0.000 0.000 0.044
#> GSM1009100     4  0.0000      0.939 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009114     5  0.0000      0.996 0.000 0.000  0 0.000 1.000 0.000
#> GSM1009128     6  0.6704      0.196 0.364 0.112  0 0.096 0.000 0.428
#> GSM1009142     4  0.1610      0.944 0.084 0.000  0 0.916 0.000 0.000
#> GSM1009156     1  0.1719      0.823 0.924 0.000  0 0.016 0.000 0.060
#> GSM1009170     3  0.0000      1.000 0.000 0.000  1 0.000 0.000 0.000
#> GSM1009184     2  0.0622      0.973 0.008 0.980  0 0.000 0.000 0.012
#> GSM1009198     1  0.2848      0.700 0.816 0.008  0 0.176 0.000 0.000
#> GSM1009073     6  0.3927      0.618 0.172 0.072  0 0.000 0.000 0.756
#> GSM1009087     2  0.0146      0.970 0.000 0.996  0 0.000 0.000 0.004
#> GSM1009101     4  0.0000      0.939 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009115     5  0.0000      0.996 0.000 0.000  0 0.000 1.000 0.000
#> GSM1009129     6  0.6367      0.298 0.156 0.384  0 0.036 0.000 0.424
#> GSM1009143     4  0.1501      0.946 0.076 0.000  0 0.924 0.000 0.000
#> GSM1009157     1  0.1594      0.832 0.932 0.000  0 0.016 0.000 0.052
#> GSM1009171     3  0.0000      1.000 0.000 0.000  1 0.000 0.000 0.000
#> GSM1009185     2  0.0622      0.973 0.008 0.980  0 0.000 0.000 0.012
#> GSM1009199     1  0.0363      0.865 0.988 0.000  0 0.012 0.000 0.000
#> GSM1009074     6  0.3927      0.618 0.172 0.072  0 0.000 0.000 0.756
#> GSM1009088     2  0.0146      0.970 0.000 0.996  0 0.000 0.000 0.004
#> GSM1009102     4  0.1462      0.931 0.056 0.008  0 0.936 0.000 0.000
#> GSM1009116     5  0.0000      0.996 0.000 0.000  0 0.000 1.000 0.000
#> GSM1009130     6  0.6303      0.274 0.144 0.396  0 0.036 0.000 0.424
#> GSM1009144     4  0.2003      0.928 0.116 0.000  0 0.884 0.000 0.000
#> GSM1009158     1  0.1908      0.847 0.916 0.000  0 0.056 0.000 0.028
#> GSM1009172     3  0.0000      1.000 0.000 0.000  1 0.000 0.000 0.000
#> GSM1009186     2  0.0622      0.973 0.008 0.980  0 0.000 0.000 0.012
#> GSM1009200     1  0.0713      0.863 0.972 0.000  0 0.028 0.000 0.000
#> GSM1009075     6  0.3927      0.618 0.172 0.072  0 0.000 0.000 0.756
#> GSM1009089     2  0.0291      0.972 0.004 0.992  0 0.000 0.000 0.004
#> GSM1009103     4  0.1462      0.931 0.056 0.008  0 0.936 0.000 0.000
#> GSM1009117     5  0.0000      0.996 0.000 0.000  0 0.000 1.000 0.000
#> GSM1009131     6  0.6454      0.337 0.176 0.360  0 0.036 0.000 0.428
#> GSM1009145     4  0.1814      0.938 0.100 0.000  0 0.900 0.000 0.000
#> GSM1009159     1  0.1462      0.853 0.936 0.000  0 0.056 0.000 0.008
#> GSM1009173     3  0.0000      1.000 0.000 0.000  1 0.000 0.000 0.000
#> GSM1009187     2  0.0717      0.970 0.008 0.976  0 0.000 0.000 0.016
#> GSM1009201     1  0.0363      0.865 0.988 0.000  0 0.012 0.000 0.000

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

consensus_heatmap(res, k = 2)

plot of chunk tab-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 temperature(p) time(p) specimen(p) k
#> CV:mclust 126          1.000       1    1.91e-23 2
#> CV:mclust 140          1.000       1    6.13e-49 3
#> CV:mclust  64          0.999       1    7.35e-24 4
#> CV:mclust 126          1.000       1    7.26e-84 5
#> CV:mclust 126          1.000       1   4.05e-107 6

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


CV:NMF**

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

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

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

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

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

collect_plots(res)

plot of chunk CV-NMF-collect-plots

The plots are:

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

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

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

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

select_partition_number(res)

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

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

get_stats(res)
#>   k 1-PAC mean_silhouette concordance area_increased  Rand Jaccard
#> 2 2 0.845           0.926       0.963         0.3918 0.589   0.589
#> 3 3 0.999           0.941       0.979         0.4499 0.719   0.568
#> 4 4 0.736           0.780       0.901         0.2523 0.805   0.567
#> 5 5 0.770           0.842       0.904         0.0777 0.817   0.475
#> 6 6 0.885           0.856       0.908         0.0631 0.928   0.711

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
#> GSM1009062     1  0.0000      0.983 1.000 0.000
#> GSM1009076     2  0.7056      0.819 0.192 0.808
#> GSM1009090     1  0.0000      0.983 1.000 0.000
#> GSM1009104     2  0.3879      0.895 0.076 0.924
#> GSM1009118     1  0.0000      0.983 1.000 0.000
#> GSM1009132     1  0.0000      0.983 1.000 0.000
#> GSM1009146     1  0.0000      0.983 1.000 0.000
#> GSM1009160     2  0.0000      0.901 0.000 1.000
#> GSM1009174     1  0.0000      0.983 1.000 0.000
#> GSM1009188     1  0.0000      0.983 1.000 0.000
#> GSM1009063     1  0.0000      0.983 1.000 0.000
#> GSM1009077     2  0.8267      0.733 0.260 0.740
#> GSM1009091     1  0.0000      0.983 1.000 0.000
#> GSM1009105     2  0.2603      0.906 0.044 0.956
#> GSM1009119     1  0.0000      0.983 1.000 0.000
#> GSM1009133     1  0.0000      0.983 1.000 0.000
#> GSM1009147     1  0.0000      0.983 1.000 0.000
#> GSM1009161     2  0.0000      0.901 0.000 1.000
#> GSM1009175     1  0.0000      0.983 1.000 0.000
#> GSM1009189     1  0.0000      0.983 1.000 0.000
#> GSM1009064     1  0.0000      0.983 1.000 0.000
#> GSM1009078     1  0.0000      0.983 1.000 0.000
#> GSM1009092     1  0.0000      0.983 1.000 0.000
#> GSM1009106     2  0.3879      0.895 0.076 0.924
#> GSM1009120     1  0.0000      0.983 1.000 0.000
#> GSM1009134     1  0.0000      0.983 1.000 0.000
#> GSM1009148     1  0.0000      0.983 1.000 0.000
#> GSM1009162     2  0.0000      0.901 0.000 1.000
#> GSM1009176     1  0.9323      0.381 0.652 0.348
#> GSM1009190     1  0.0000      0.983 1.000 0.000
#> GSM1009065     1  0.0000      0.983 1.000 0.000
#> GSM1009079     2  0.7139      0.816 0.196 0.804
#> GSM1009093     1  0.0000      0.983 1.000 0.000
#> GSM1009107     2  0.2236      0.907 0.036 0.964
#> GSM1009121     1  0.0000      0.983 1.000 0.000
#> GSM1009135     1  0.0000      0.983 1.000 0.000
#> GSM1009149     1  0.0000      0.983 1.000 0.000
#> GSM1009163     2  0.0000      0.901 0.000 1.000
#> GSM1009177     1  0.8207      0.608 0.744 0.256
#> GSM1009191     1  0.0000      0.983 1.000 0.000
#> GSM1009066     1  0.0000      0.983 1.000 0.000
#> GSM1009080     2  0.6887      0.826 0.184 0.816
#> GSM1009094     1  0.0000      0.983 1.000 0.000
#> GSM1009108     2  0.2778      0.905 0.048 0.952
#> GSM1009122     1  0.0000      0.983 1.000 0.000
#> GSM1009136     1  0.0000      0.983 1.000 0.000
#> GSM1009150     1  0.0000      0.983 1.000 0.000
#> GSM1009164     2  0.0000      0.901 0.000 1.000
#> GSM1009178     1  0.0000      0.983 1.000 0.000
#> GSM1009192     1  0.0000      0.983 1.000 0.000
#> GSM1009067     1  0.0000      0.983 1.000 0.000
#> GSM1009081     2  0.7376      0.803 0.208 0.792
#> GSM1009095     1  0.0000      0.983 1.000 0.000
#> GSM1009109     2  0.2423      0.907 0.040 0.960
#> GSM1009123     1  0.0000      0.983 1.000 0.000
#> GSM1009137     1  0.0000      0.983 1.000 0.000
#> GSM1009151     1  0.0000      0.983 1.000 0.000
#> GSM1009165     2  0.0000      0.901 0.000 1.000
#> GSM1009179     1  0.0000      0.983 1.000 0.000
#> GSM1009193     1  0.0000      0.983 1.000 0.000
#> GSM1009068     1  0.0000      0.983 1.000 0.000
#> GSM1009082     2  0.9087      0.626 0.324 0.676
#> GSM1009096     1  0.0000      0.983 1.000 0.000
#> GSM1009110     2  0.1184      0.904 0.016 0.984
#> GSM1009124     1  0.0000      0.983 1.000 0.000
#> GSM1009138     1  0.0000      0.983 1.000 0.000
#> GSM1009152     1  0.0000      0.983 1.000 0.000
#> GSM1009166     2  0.0000      0.901 0.000 1.000
#> GSM1009180     1  0.0000      0.983 1.000 0.000
#> GSM1009194     1  0.0000      0.983 1.000 0.000
#> GSM1009069     1  0.0000      0.983 1.000 0.000
#> GSM1009083     2  1.0000      0.173 0.496 0.504
#> GSM1009097     1  0.0000      0.983 1.000 0.000
#> GSM1009111     2  0.2236      0.907 0.036 0.964
#> GSM1009125     1  0.6712      0.756 0.824 0.176
#> GSM1009139     1  0.0000      0.983 1.000 0.000
#> GSM1009153     1  0.0000      0.983 1.000 0.000
#> GSM1009167     2  0.0000      0.901 0.000 1.000
#> GSM1009181     1  0.9248      0.404 0.660 0.340
#> GSM1009195     1  0.0000      0.983 1.000 0.000
#> GSM1009070     1  0.0000      0.983 1.000 0.000
#> GSM1009084     2  0.7139      0.816 0.196 0.804
#> GSM1009098     1  0.0000      0.983 1.000 0.000
#> GSM1009112     2  0.2236      0.907 0.036 0.964
#> GSM1009126     1  0.0000      0.983 1.000 0.000
#> GSM1009140     1  0.0000      0.983 1.000 0.000
#> GSM1009154     1  0.0000      0.983 1.000 0.000
#> GSM1009168     2  0.0000      0.901 0.000 1.000
#> GSM1009182     1  0.0000      0.983 1.000 0.000
#> GSM1009196     1  0.0000      0.983 1.000 0.000
#> GSM1009071     1  0.0000      0.983 1.000 0.000
#> GSM1009085     2  0.7299      0.807 0.204 0.796
#> GSM1009099     1  0.0000      0.983 1.000 0.000
#> GSM1009113     2  0.2236      0.907 0.036 0.964
#> GSM1009127     1  0.0000      0.983 1.000 0.000
#> GSM1009141     1  0.0000      0.983 1.000 0.000
#> GSM1009155     1  0.0000      0.983 1.000 0.000
#> GSM1009169     2  0.0000      0.901 0.000 1.000
#> GSM1009183     1  0.6148      0.794 0.848 0.152
#> GSM1009197     1  0.0000      0.983 1.000 0.000
#> GSM1009072     1  0.0000      0.983 1.000 0.000
#> GSM1009086     2  0.6343      0.844 0.160 0.840
#> GSM1009100     1  0.0000      0.983 1.000 0.000
#> GSM1009114     2  0.4161      0.891 0.084 0.916
#> GSM1009128     1  0.0000      0.983 1.000 0.000
#> GSM1009142     1  0.0000      0.983 1.000 0.000
#> GSM1009156     1  0.0000      0.983 1.000 0.000
#> GSM1009170     2  0.0000      0.901 0.000 1.000
#> GSM1009184     1  0.0000      0.983 1.000 0.000
#> GSM1009198     1  0.0000      0.983 1.000 0.000
#> GSM1009073     1  0.0000      0.983 1.000 0.000
#> GSM1009087     1  0.0376      0.979 0.996 0.004
#> GSM1009101     1  0.0000      0.983 1.000 0.000
#> GSM1009115     2  0.2423      0.907 0.040 0.960
#> GSM1009129     2  0.9944      0.308 0.456 0.544
#> GSM1009143     1  0.0000      0.983 1.000 0.000
#> GSM1009157     1  0.0000      0.983 1.000 0.000
#> GSM1009171     2  0.0000      0.901 0.000 1.000
#> GSM1009185     1  0.0000      0.983 1.000 0.000
#> GSM1009199     1  0.0000      0.983 1.000 0.000
#> GSM1009074     1  0.0000      0.983 1.000 0.000
#> GSM1009088     1  0.7299      0.710 0.796 0.204
#> GSM1009102     1  0.0000      0.983 1.000 0.000
#> GSM1009116     2  0.2236      0.907 0.036 0.964
#> GSM1009130     2  0.7299      0.807 0.204 0.796
#> GSM1009144     1  0.0000      0.983 1.000 0.000
#> GSM1009158     1  0.0000      0.983 1.000 0.000
#> GSM1009172     2  0.0000      0.901 0.000 1.000
#> GSM1009186     1  0.0000      0.983 1.000 0.000
#> GSM1009200     1  0.0000      0.983 1.000 0.000
#> GSM1009075     1  0.0000      0.983 1.000 0.000
#> GSM1009089     1  0.0000      0.983 1.000 0.000
#> GSM1009103     1  0.0000      0.983 1.000 0.000
#> GSM1009117     2  0.3114      0.903 0.056 0.944
#> GSM1009131     1  0.0000      0.983 1.000 0.000
#> GSM1009145     1  0.0000      0.983 1.000 0.000
#> GSM1009159     1  0.0000      0.983 1.000 0.000
#> GSM1009173     2  0.0000      0.901 0.000 1.000
#> GSM1009187     1  0.0000      0.983 1.000 0.000
#> GSM1009201     1  0.0000      0.983 1.000 0.000

show/hide code output

cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#>            class entropy silhouette    p1    p2    p3
#> GSM1009062     1  0.0000     0.9800 1.000 0.000 0.000
#> GSM1009076     2  0.0000     0.9525 0.000 1.000 0.000
#> GSM1009090     1  0.0000     0.9800 1.000 0.000 0.000
#> GSM1009104     2  0.0000     0.9525 0.000 1.000 0.000
#> GSM1009118     1  0.1643     0.9346 0.956 0.044 0.000
#> GSM1009132     1  0.0000     0.9800 1.000 0.000 0.000
#> GSM1009146     1  0.0000     0.9800 1.000 0.000 0.000
#> GSM1009160     3  0.0000     1.0000 0.000 0.000 1.000
#> GSM1009174     2  0.0000     0.9525 0.000 1.000 0.000
#> GSM1009188     1  0.0000     0.9800 1.000 0.000 0.000
#> GSM1009063     1  0.0237     0.9763 0.996 0.004 0.000
#> GSM1009077     2  0.0000     0.9525 0.000 1.000 0.000
#> GSM1009091     1  0.0000     0.9800 1.000 0.000 0.000
#> GSM1009105     2  0.0000     0.9525 0.000 1.000 0.000
#> GSM1009119     1  0.0000     0.9800 1.000 0.000 0.000
#> GSM1009133     1  0.0000     0.9800 1.000 0.000 0.000
#> GSM1009147     1  0.0000     0.9800 1.000 0.000 0.000
#> GSM1009161     3  0.0000     1.0000 0.000 0.000 1.000
#> GSM1009175     2  0.0000     0.9525 0.000 1.000 0.000
#> GSM1009189     1  0.0000     0.9800 1.000 0.000 0.000
#> GSM1009064     1  0.2625     0.8887 0.916 0.084 0.000
#> GSM1009078     2  0.0000     0.9525 0.000 1.000 0.000
#> GSM1009092     1  0.0000     0.9800 1.000 0.000 0.000
#> GSM1009106     2  0.0000     0.9525 0.000 1.000 0.000
#> GSM1009120     1  0.0000     0.9800 1.000 0.000 0.000
#> GSM1009134     1  0.0000     0.9800 1.000 0.000 0.000
#> GSM1009148     1  0.0000     0.9800 1.000 0.000 0.000
#> GSM1009162     3  0.0000     1.0000 0.000 0.000 1.000
#> GSM1009176     2  0.0000     0.9525 0.000 1.000 0.000
#> GSM1009190     1  0.0000     0.9800 1.000 0.000 0.000
#> GSM1009065     1  0.5497     0.5778 0.708 0.292 0.000
#> GSM1009079     2  0.0000     0.9525 0.000 1.000 0.000
#> GSM1009093     1  0.0000     0.9800 1.000 0.000 0.000
#> GSM1009107     2  0.0000     0.9525 0.000 1.000 0.000
#> GSM1009121     1  0.0000     0.9800 1.000 0.000 0.000
#> GSM1009135     1  0.0000     0.9800 1.000 0.000 0.000
#> GSM1009149     1  0.0000     0.9800 1.000 0.000 0.000
#> GSM1009163     3  0.0000     1.0000 0.000 0.000 1.000
#> GSM1009177     2  0.0000     0.9525 0.000 1.000 0.000
#> GSM1009191     1  0.0000     0.9800 1.000 0.000 0.000
#> GSM1009066     1  0.0592     0.9686 0.988 0.012 0.000
#> GSM1009080     2  0.0000     0.9525 0.000 1.000 0.000
#> GSM1009094     1  0.0000     0.9800 1.000 0.000 0.000
#> GSM1009108     2  0.0000     0.9525 0.000 1.000 0.000
#> GSM1009122     2  0.6260     0.2005 0.448 0.552 0.000
#> GSM1009136     1  0.0000     0.9800 1.000 0.000 0.000
#> GSM1009150     1  0.0000     0.9800 1.000 0.000 0.000
#> GSM1009164     3  0.0000     1.0000 0.000 0.000 1.000
#> GSM1009178     2  0.0000     0.9525 0.000 1.000 0.000
#> GSM1009192     1  0.0000     0.9800 1.000 0.000 0.000
#> GSM1009067     1  0.0000     0.9800 1.000 0.000 0.000
#> GSM1009081     2  0.0000     0.9525 0.000 1.000 0.000
#> GSM1009095     1  0.0000     0.9800 1.000 0.000 0.000
#> GSM1009109     2  0.0000     0.9525 0.000 1.000 0.000
#> GSM1009123     1  0.0000     0.9800 1.000 0.000 0.000
#> GSM1009137     1  0.0000     0.9800 1.000 0.000 0.000
#> GSM1009151     1  0.0000     0.9800 1.000 0.000 0.000
#> GSM1009165     3  0.0000     1.0000 0.000 0.000 1.000
#> GSM1009179     2  0.0000     0.9525 0.000 1.000 0.000
#> GSM1009193     1  0.0000     0.9800 1.000 0.000 0.000
#> GSM1009068     1  0.0000     0.9800 1.000 0.000 0.000
#> GSM1009082     2  0.0000     0.9525 0.000 1.000 0.000
#> GSM1009096     1  0.0000     0.9800 1.000 0.000 0.000
#> GSM1009110     2  0.0000     0.9525 0.000 1.000 0.000
#> GSM1009124     1  0.0000     0.9800 1.000 0.000 0.000
#> GSM1009138     1  0.0000     0.9800 1.000 0.000 0.000
#> GSM1009152     1  0.0000     0.9800 1.000 0.000 0.000
#> GSM1009166     3  0.0000     1.0000 0.000 0.000 1.000
#> GSM1009180     2  0.0000     0.9525 0.000 1.000 0.000
#> GSM1009194     1  0.0000     0.9800 1.000 0.000 0.000
#> GSM1009069     2  0.2356     0.8675 0.072 0.928 0.000
#> GSM1009083     2  0.0000     0.9525 0.000 1.000 0.000
#> GSM1009097     1  0.0000     0.9800 1.000 0.000 0.000
#> GSM1009111     2  0.0000     0.9525 0.000 1.000 0.000
#> GSM1009125     2  0.8209     0.0772 0.456 0.472 0.072
#> GSM1009139     1  0.0000     0.9800 1.000 0.000 0.000
#> GSM1009153     1  0.0000     0.9800 1.000 0.000 0.000
#> GSM1009167     3  0.0000     1.0000 0.000 0.000 1.000
#> GSM1009181     2  0.0000     0.9525 0.000 1.000 0.000
#> GSM1009195     1  0.5988     0.4012 0.632 0.368 0.000
#> GSM1009070     1  0.0000     0.9800 1.000 0.000 0.000
#> GSM1009084     2  0.0000     0.9525 0.000 1.000 0.000
#> GSM1009098     1  0.0000     0.9800 1.000 0.000 0.000
#> GSM1009112     2  0.0000     0.9525 0.000 1.000 0.000
#> GSM1009126     1  0.0000     0.9800 1.000 0.000 0.000
#> GSM1009140     1  0.0000     0.9800 1.000 0.000 0.000
#> GSM1009154     1  0.0000     0.9800 1.000 0.000 0.000
#> GSM1009168     3  0.0000     1.0000 0.000 0.000 1.000
#> GSM1009182     2  0.0000     0.9525 0.000 1.000 0.000
#> GSM1009196     1  0.0000     0.9800 1.000 0.000 0.000
#> GSM1009071     1  0.2878     0.8742 0.904 0.096 0.000
#> GSM1009085     2  0.0000     0.9525 0.000 1.000 0.000
#> GSM1009099     1  0.0000     0.9800 1.000 0.000 0.000
#> GSM1009113     2  0.0000     0.9525 0.000 1.000 0.000
#> GSM1009127     1  0.0000     0.9800 1.000 0.000 0.000
#> GSM1009141     1  0.0000     0.9800 1.000 0.000 0.000
#> GSM1009155     1  0.0000     0.9800 1.000 0.000 0.000
#> GSM1009169     3  0.0000     1.0000 0.000 0.000 1.000
#> GSM1009183     2  0.0000     0.9525 0.000 1.000 0.000
#> GSM1009197     1  0.0000     0.9800 1.000 0.000 0.000
#> GSM1009072     1  0.0000     0.9800 1.000 0.000 0.000
#> GSM1009086     2  0.0000     0.9525 0.000 1.000 0.000
#> GSM1009100     1  0.0000     0.9800 1.000 0.000 0.000
#> GSM1009114     2  0.0000     0.9525 0.000 1.000 0.000
#> GSM1009128     1  0.0000     0.9800 1.000 0.000 0.000
#> GSM1009142     1  0.0000     0.9800 1.000 0.000 0.000
#> GSM1009156     1  0.6095     0.3326 0.608 0.392 0.000
#> GSM1009170     3  0.0000     1.0000 0.000 0.000 1.000
#> GSM1009184     2  0.0000     0.9525 0.000 1.000 0.000
#> GSM1009198     1  0.0000     0.9800 1.000 0.000 0.000
#> GSM1009073     1  0.0237     0.9763 0.996 0.004 0.000
#> GSM1009087     2  0.0000     0.9525 0.000 1.000 0.000
#> GSM1009101     1  0.0000     0.9800 1.000 0.000 0.000
#> GSM1009115     2  0.0000     0.9525 0.000 1.000 0.000
#> GSM1009129     2  0.2448     0.8623 0.076 0.924 0.000
#> GSM1009143     1  0.0000     0.9800 1.000 0.000 0.000
#> GSM1009157     2  0.5926     0.4497 0.356 0.644 0.000
#> GSM1009171     3  0.0000     1.0000 0.000 0.000 1.000
#> GSM1009185     2  0.0000     0.9525 0.000 1.000 0.000
#> GSM1009199     1  0.0424     0.9725 0.992 0.008 0.000
#> GSM1009074     1  0.0000     0.9800 1.000 0.000 0.000
#> GSM1009088     2  0.0000     0.9525 0.000 1.000 0.000
#> GSM1009102     1  0.0000     0.9800 1.000 0.000 0.000
#> GSM1009116     2  0.0000     0.9525 0.000 1.000 0.000
#> GSM1009130     2  0.0237     0.9482 0.004 0.996 0.000
#> GSM1009144     1  0.0000     0.9800 1.000 0.000 0.000
#> GSM1009158     1  0.0000     0.9800 1.000 0.000 0.000
#> GSM1009172     3  0.0000     1.0000 0.000 0.000 1.000
#> GSM1009186     2  0.0000     0.9525 0.000 1.000 0.000
#> GSM1009200     1  0.0000     0.9800 1.000 0.000 0.000
#> GSM1009075     1  0.0000     0.9800 1.000 0.000 0.000
#> GSM1009089     2  0.0000     0.9525 0.000 1.000 0.000
#> GSM1009103     1  0.0000     0.9800 1.000 0.000 0.000
#> GSM1009117     2  0.0000     0.9525 0.000 1.000 0.000
#> GSM1009131     2  0.4062     0.7403 0.164 0.836 0.000
#> GSM1009145     1  0.0000     0.9800 1.000 0.000 0.000
#> GSM1009159     1  0.0000     0.9800 1.000 0.000 0.000
#> GSM1009173     3  0.0000     1.0000 0.000 0.000 1.000
#> GSM1009187     2  0.0000     0.9525 0.000 1.000 0.000
#> GSM1009201     1  0.0000     0.9800 1.000 0.000 0.000

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>            class entropy silhouette    p1    p2    p3    p4
#> GSM1009062     1  0.1302     0.8467 0.956 0.000 0.000 0.044
#> GSM1009076     2  0.0000     0.8671 0.000 1.000 0.000 0.000
#> GSM1009090     4  0.0188     0.8819 0.004 0.000 0.000 0.996
#> GSM1009104     2  0.0000     0.8671 0.000 1.000 0.000 0.000
#> GSM1009118     4  0.4988     0.5498 0.288 0.020 0.000 0.692
#> GSM1009132     4  0.0000     0.8819 0.000 0.000 0.000 1.000
#> GSM1009146     1  0.0188     0.8513 0.996 0.000 0.000 0.004
#> GSM1009160     3  0.0000     1.0000 0.000 0.000 1.000 0.000
#> GSM1009174     2  0.4356     0.6509 0.292 0.708 0.000 0.000
#> GSM1009188     4  0.5000    -0.0750 0.500 0.000 0.000 0.500
#> GSM1009063     1  0.1211     0.8479 0.960 0.000 0.000 0.040
#> GSM1009077     2  0.0000     0.8671 0.000 1.000 0.000 0.000
#> GSM1009091     4  0.0469     0.8797 0.012 0.000 0.000 0.988
#> GSM1009105     2  0.0000     0.8671 0.000 1.000 0.000 0.000
#> GSM1009119     4  0.4916     0.2260 0.424 0.000 0.000 0.576
#> GSM1009133     4  0.0000     0.8819 0.000 0.000 0.000 1.000
#> GSM1009147     1  0.1389     0.8381 0.952 0.000 0.000 0.048
#> GSM1009161     3  0.0000     1.0000 0.000 0.000 1.000 0.000
#> GSM1009175     2  0.3649     0.7565 0.204 0.796 0.000 0.000
#> GSM1009189     1  0.4855     0.3750 0.600 0.000 0.000 0.400
#> GSM1009064     1  0.1302     0.8467 0.956 0.000 0.000 0.044
#> GSM1009078     2  0.3219     0.7899 0.164 0.836 0.000 0.000
#> GSM1009092     4  0.0469     0.8797 0.012 0.000 0.000 0.988
#> GSM1009106     2  0.0000     0.8671 0.000 1.000 0.000 0.000
#> GSM1009120     1  0.4843     0.3858 0.604 0.000 0.000 0.396
#> GSM1009134     4  0.0000     0.8819 0.000 0.000 0.000 1.000
#> GSM1009148     1  0.0000     0.8510 1.000 0.000 0.000 0.000
#> GSM1009162     3  0.0000     1.0000 0.000 0.000 1.000 0.000
#> GSM1009176     2  0.1118     0.8593 0.036 0.964 0.000 0.000
#> GSM1009190     1  0.4761     0.4431 0.628 0.000 0.000 0.372
#> GSM1009065     1  0.1302     0.8467 0.956 0.000 0.000 0.044
#> GSM1009079     2  0.0000     0.8671 0.000 1.000 0.000 0.000
#> GSM1009093     4  0.0469     0.8797 0.012 0.000 0.000 0.988
#> GSM1009107     2  0.0000     0.8671 0.000 1.000 0.000 0.000
#> GSM1009121     4  0.3942     0.6549 0.236 0.000 0.000 0.764
#> GSM1009135     4  0.0000     0.8819 0.000 0.000 0.000 1.000
#> GSM1009149     1  0.3764     0.7030 0.784 0.000 0.000 0.216
#> GSM1009163     3  0.0000     1.0000 0.000 0.000 1.000 0.000
#> GSM1009177     2  0.1118     0.8593 0.036 0.964 0.000 0.000
#> GSM1009191     1  0.3569     0.7257 0.804 0.000 0.000 0.196
#> GSM1009066     1  0.1302     0.8467 0.956 0.000 0.000 0.044
#> GSM1009080     2  0.0000     0.8671 0.000 1.000 0.000 0.000
#> GSM1009094     4  0.0336     0.8813 0.008 0.000 0.000 0.992
#> GSM1009108     2  0.0000     0.8671 0.000 1.000 0.000 0.000
#> GSM1009122     2  0.7773     0.2071 0.264 0.428 0.000 0.308
#> GSM1009136     4  0.0000     0.8819 0.000 0.000 0.000 1.000
#> GSM1009150     1  0.1940     0.8226 0.924 0.000 0.000 0.076
#> GSM1009164     3  0.0000     1.0000 0.000 0.000 1.000 0.000
#> GSM1009178     2  0.4804     0.4906 0.384 0.616 0.000 0.000
#> GSM1009192     1  0.3649     0.7167 0.796 0.000 0.000 0.204
#> GSM1009067     1  0.1211     0.8479 0.960 0.000 0.000 0.040
#> GSM1009081     2  0.0000     0.8671 0.000 1.000 0.000 0.000
#> GSM1009095     4  0.0000     0.8819 0.000 0.000 0.000 1.000
#> GSM1009109     2  0.0000     0.8671 0.000 1.000 0.000 0.000
#> GSM1009123     4  0.4331     0.5713 0.288 0.000 0.000 0.712
#> GSM1009137     4  0.0000     0.8819 0.000 0.000 0.000 1.000
#> GSM1009151     1  0.0000     0.8510 1.000 0.000 0.000 0.000
#> GSM1009165     3  0.0000     1.0000 0.000 0.000 1.000 0.000
#> GSM1009179     2  0.4804     0.4892 0.384 0.616 0.000 0.000
#> GSM1009193     1  0.4817     0.4065 0.612 0.000 0.000 0.388
#> GSM1009068     1  0.1716     0.8325 0.936 0.000 0.000 0.064
#> GSM1009082     2  0.0469     0.8651 0.012 0.988 0.000 0.000
#> GSM1009096     4  0.0336     0.8813 0.008 0.000 0.000 0.992
#> GSM1009110     2  0.0000     0.8671 0.000 1.000 0.000 0.000
#> GSM1009124     4  0.4605     0.4696 0.336 0.000 0.000 0.664
#> GSM1009138     4  0.0000     0.8819 0.000 0.000 0.000 1.000
#> GSM1009152     1  0.0000     0.8510 1.000 0.000 0.000 0.000
#> GSM1009166     3  0.0000     1.0000 0.000 0.000 1.000 0.000
#> GSM1009180     2  0.4431     0.6354 0.304 0.696 0.000 0.000
#> GSM1009194     1  0.0000     0.8510 1.000 0.000 0.000 0.000
#> GSM1009069     1  0.1706     0.8418 0.948 0.016 0.000 0.036
#> GSM1009083     2  0.0336     0.8656 0.008 0.992 0.000 0.000
#> GSM1009097     4  0.0469     0.8797 0.012 0.000 0.000 0.988
#> GSM1009111     2  0.0000     0.8671 0.000 1.000 0.000 0.000
#> GSM1009125     4  0.6890     0.3443 0.104 0.312 0.008 0.576
#> GSM1009139     4  0.0000     0.8819 0.000 0.000 0.000 1.000
#> GSM1009153     1  0.0000     0.8510 1.000 0.000 0.000 0.000
#> GSM1009167     3  0.0000     1.0000 0.000 0.000 1.000 0.000
#> GSM1009181     2  0.0817     0.8623 0.024 0.976 0.000 0.000
#> GSM1009195     1  0.0336     0.8492 0.992 0.008 0.000 0.000
#> GSM1009070     1  0.1211     0.8479 0.960 0.000 0.000 0.040
#> GSM1009084     2  0.0000     0.8671 0.000 1.000 0.000 0.000
#> GSM1009098     4  0.0336     0.8813 0.008 0.000 0.000 0.992
#> GSM1009112     2  0.0000     0.8671 0.000 1.000 0.000 0.000
#> GSM1009126     4  0.4304     0.5787 0.284 0.000 0.000 0.716
#> GSM1009140     4  0.0000     0.8819 0.000 0.000 0.000 1.000
#> GSM1009154     1  0.0000     0.8510 1.000 0.000 0.000 0.000
#> GSM1009168     3  0.0000     1.0000 0.000 0.000 1.000 0.000
#> GSM1009182     2  0.4193     0.6854 0.268 0.732 0.000 0.000
#> GSM1009196     1  0.0188     0.8513 0.996 0.000 0.000 0.004
#> GSM1009071     1  0.1302     0.8467 0.956 0.000 0.000 0.044
#> GSM1009085     2  0.0000     0.8671 0.000 1.000 0.000 0.000
#> GSM1009099     4  0.0469     0.8797 0.012 0.000 0.000 0.988
#> GSM1009113     2  0.0000     0.8671 0.000 1.000 0.000 0.000
#> GSM1009127     4  0.4972     0.1101 0.456 0.000 0.000 0.544
#> GSM1009141     4  0.0000     0.8819 0.000 0.000 0.000 1.000
#> GSM1009155     1  0.0000     0.8510 1.000 0.000 0.000 0.000
#> GSM1009169     3  0.0000     1.0000 0.000 0.000 1.000 0.000
#> GSM1009183     2  0.1118     0.8587 0.036 0.964 0.000 0.000
#> GSM1009197     1  0.4605     0.5166 0.664 0.000 0.000 0.336
#> GSM1009072     1  0.1867     0.8259 0.928 0.000 0.000 0.072
#> GSM1009086     2  0.0000     0.8671 0.000 1.000 0.000 0.000
#> GSM1009100     4  0.0336     0.8813 0.008 0.000 0.000 0.992
#> GSM1009114     2  0.0000     0.8671 0.000 1.000 0.000 0.000
#> GSM1009128     4  0.3266     0.7422 0.168 0.000 0.000 0.832
#> GSM1009142     4  0.0000     0.8819 0.000 0.000 0.000 1.000
#> GSM1009156     1  0.0592     0.8499 0.984 0.000 0.000 0.016
#> GSM1009170     3  0.0000     1.0000 0.000 0.000 1.000 0.000
#> GSM1009184     2  0.4843     0.4625 0.396 0.604 0.000 0.000
#> GSM1009198     1  0.5000     0.0279 0.500 0.000 0.000 0.500
#> GSM1009073     1  0.1302     0.8467 0.956 0.000 0.000 0.044
#> GSM1009087     2  0.2760     0.8125 0.128 0.872 0.000 0.000
#> GSM1009101     4  0.0336     0.8813 0.008 0.000 0.000 0.992
#> GSM1009115     2  0.0000     0.8671 0.000 1.000 0.000 0.000
#> GSM1009129     2  0.3610     0.7526 0.200 0.800 0.000 0.000
#> GSM1009143     4  0.0000     0.8819 0.000 0.000 0.000 1.000
#> GSM1009157     1  0.0000     0.8510 1.000 0.000 0.000 0.000
#> GSM1009171     3  0.0000     1.0000 0.000 0.000 1.000 0.000
#> GSM1009185     2  0.4072     0.7062 0.252 0.748 0.000 0.000
#> GSM1009199     1  0.0336     0.8511 0.992 0.000 0.000 0.008
#> GSM1009074     1  0.1211     0.8479 0.960 0.000 0.000 0.040
#> GSM1009088     2  0.1637     0.8472 0.060 0.940 0.000 0.000
#> GSM1009102     4  0.0188     0.8819 0.004 0.000 0.000 0.996
#> GSM1009116     2  0.0000     0.8671 0.000 1.000 0.000 0.000
#> GSM1009130     2  0.3610     0.7526 0.200 0.800 0.000 0.000
#> GSM1009144     4  0.0000     0.8819 0.000 0.000 0.000 1.000
#> GSM1009158     1  0.0469     0.8507 0.988 0.000 0.000 0.012
#> GSM1009172     3  0.0000     1.0000 0.000 0.000 1.000 0.000
#> GSM1009186     2  0.4804     0.4907 0.384 0.616 0.000 0.000
#> GSM1009200     1  0.4817     0.4065 0.612 0.000 0.000 0.388
#> GSM1009075     1  0.1302     0.8467 0.956 0.000 0.000 0.044
#> GSM1009089     1  0.4972    -0.0141 0.544 0.456 0.000 0.000
#> GSM1009103     4  0.0000     0.8819 0.000 0.000 0.000 1.000
#> GSM1009117     2  0.0000     0.8671 0.000 1.000 0.000 0.000
#> GSM1009131     2  0.5577     0.5381 0.328 0.636 0.000 0.036
#> GSM1009145     4  0.0000     0.8819 0.000 0.000 0.000 1.000
#> GSM1009159     1  0.3837     0.6930 0.776 0.000 0.000 0.224
#> GSM1009173     3  0.0000     1.0000 0.000 0.000 1.000 0.000
#> GSM1009187     1  0.4193     0.5281 0.732 0.268 0.000 0.000
#> GSM1009201     1  0.3528     0.7293 0.808 0.000 0.000 0.192

show/hide code output

cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#>            class entropy silhouette    p1    p2    p3    p4    p5
#> GSM1009062     2  0.0510      1.000 0.016 0.984 0.000 0.000 0.000
#> GSM1009076     5  0.2439      0.826 0.004 0.120 0.000 0.000 0.876
#> GSM1009090     4  0.0290      0.967 0.008 0.000 0.000 0.992 0.000
#> GSM1009104     5  0.0000      0.859 0.000 0.000 0.000 0.000 1.000
#> GSM1009118     1  0.5114      0.651 0.660 0.008 0.000 0.280 0.052
#> GSM1009132     4  0.0000      0.968 0.000 0.000 0.000 1.000 0.000
#> GSM1009146     1  0.2732      0.810 0.840 0.160 0.000 0.000 0.000
#> GSM1009160     3  0.0000      1.000 0.000 0.000 1.000 0.000 0.000
#> GSM1009174     1  0.4249      0.486 0.688 0.016 0.000 0.000 0.296
#> GSM1009188     1  0.2669      0.830 0.876 0.020 0.000 0.104 0.000
#> GSM1009063     2  0.0510      1.000 0.016 0.984 0.000 0.000 0.000
#> GSM1009077     5  0.2488      0.824 0.004 0.124 0.000 0.000 0.872
#> GSM1009091     4  0.0404      0.964 0.012 0.000 0.000 0.988 0.000
#> GSM1009105     5  0.0000      0.859 0.000 0.000 0.000 0.000 1.000
#> GSM1009119     1  0.3412      0.805 0.820 0.028 0.000 0.152 0.000
#> GSM1009133     4  0.0000      0.968 0.000 0.000 0.000 1.000 0.000
#> GSM1009147     1  0.0771      0.830 0.976 0.020 0.000 0.004 0.000
#> GSM1009161     3  0.0000      1.000 0.000 0.000 1.000 0.000 0.000
#> GSM1009175     1  0.4114      0.539 0.712 0.016 0.000 0.000 0.272
#> GSM1009189     1  0.2208      0.837 0.908 0.020 0.000 0.072 0.000
#> GSM1009064     2  0.0510      1.000 0.016 0.984 0.000 0.000 0.000
#> GSM1009078     5  0.3123      0.779 0.004 0.184 0.000 0.000 0.812
#> GSM1009092     4  0.1197      0.928 0.048 0.000 0.000 0.952 0.000
#> GSM1009106     5  0.0000      0.859 0.000 0.000 0.000 0.000 1.000
#> GSM1009120     1  0.3648      0.823 0.824 0.084 0.000 0.092 0.000
#> GSM1009134     4  0.0000      0.968 0.000 0.000 0.000 1.000 0.000
#> GSM1009148     1  0.2732      0.809 0.840 0.160 0.000 0.000 0.000
#> GSM1009162     3  0.0000      1.000 0.000 0.000 1.000 0.000 0.000
#> GSM1009176     5  0.4588      0.433 0.380 0.016 0.000 0.000 0.604
#> GSM1009190     1  0.1943      0.837 0.924 0.020 0.000 0.056 0.000
#> GSM1009065     2  0.0510      1.000 0.016 0.984 0.000 0.000 0.000
#> GSM1009079     5  0.1124      0.845 0.036 0.004 0.000 0.000 0.960
#> GSM1009093     4  0.0290      0.967 0.008 0.000 0.000 0.992 0.000
#> GSM1009107     5  0.0000      0.859 0.000 0.000 0.000 0.000 1.000
#> GSM1009121     1  0.3491      0.747 0.768 0.000 0.000 0.228 0.004
#> GSM1009135     4  0.0000      0.968 0.000 0.000 0.000 1.000 0.000
#> GSM1009149     1  0.3112      0.831 0.856 0.100 0.000 0.044 0.000
#> GSM1009163     3  0.0000      1.000 0.000 0.000 1.000 0.000 0.000
#> GSM1009177     5  0.4599      0.423 0.384 0.016 0.000 0.000 0.600
#> GSM1009191     1  0.0898      0.831 0.972 0.020 0.000 0.008 0.000
#> GSM1009066     2  0.0510      1.000 0.016 0.984 0.000 0.000 0.000
#> GSM1009080     5  0.1740      0.850 0.012 0.056 0.000 0.000 0.932
#> GSM1009094     4  0.0290      0.967 0.008 0.000 0.000 0.992 0.000
#> GSM1009108     5  0.0000      0.859 0.000 0.000 0.000 0.000 1.000
#> GSM1009122     1  0.6132      0.219 0.508 0.000 0.000 0.140 0.352
#> GSM1009136     4  0.0000      0.968 0.000 0.000 0.000 1.000 0.000
#> GSM1009150     1  0.2813      0.806 0.832 0.168 0.000 0.000 0.000
#> GSM1009164     3  0.0000      1.000 0.000 0.000 1.000 0.000 0.000
#> GSM1009178     1  0.1386      0.810 0.952 0.016 0.000 0.000 0.032
#> GSM1009192     1  0.2793      0.835 0.876 0.088 0.000 0.036 0.000
#> GSM1009067     2  0.0510      1.000 0.016 0.984 0.000 0.000 0.000
#> GSM1009081     5  0.1638      0.847 0.004 0.064 0.000 0.000 0.932
#> GSM1009095     4  0.0162      0.968 0.004 0.000 0.000 0.996 0.000
#> GSM1009109     5  0.0000      0.859 0.000 0.000 0.000 0.000 1.000
#> GSM1009123     1  0.3282      0.783 0.804 0.008 0.000 0.188 0.000
#> GSM1009137     4  0.0000      0.968 0.000 0.000 0.000 1.000 0.000
#> GSM1009151     1  0.3143      0.783 0.796 0.204 0.000 0.000 0.000
#> GSM1009165     3  0.0000      1.000 0.000 0.000 1.000 0.000 0.000
#> GSM1009179     1  0.1981      0.794 0.920 0.016 0.000 0.000 0.064
#> GSM1009193     1  0.3130      0.830 0.856 0.048 0.000 0.096 0.000
#> GSM1009068     2  0.0510      1.000 0.016 0.984 0.000 0.000 0.000
#> GSM1009082     5  0.2605      0.810 0.000 0.148 0.000 0.000 0.852
#> GSM1009096     4  0.0290      0.967 0.008 0.000 0.000 0.992 0.000
#> GSM1009110     5  0.0000      0.859 0.000 0.000 0.000 0.000 1.000
#> GSM1009124     1  0.2471      0.815 0.864 0.000 0.000 0.136 0.000
#> GSM1009138     4  0.0000      0.968 0.000 0.000 0.000 1.000 0.000
#> GSM1009152     1  0.3274      0.772 0.780 0.220 0.000 0.000 0.000
#> GSM1009166     3  0.0000      1.000 0.000 0.000 1.000 0.000 0.000
#> GSM1009180     1  0.1300      0.812 0.956 0.016 0.000 0.000 0.028
#> GSM1009194     1  0.2732      0.811 0.840 0.160 0.000 0.000 0.000
#> GSM1009069     2  0.0510      1.000 0.016 0.984 0.000 0.000 0.000
#> GSM1009083     5  0.2852      0.792 0.000 0.172 0.000 0.000 0.828
#> GSM1009097     4  0.0880      0.946 0.032 0.000 0.000 0.968 0.000
#> GSM1009111     5  0.0000      0.859 0.000 0.000 0.000 0.000 1.000
#> GSM1009125     4  0.6728     -0.105 0.368 0.000 0.000 0.380 0.252
#> GSM1009139     4  0.0000      0.968 0.000 0.000 0.000 1.000 0.000
#> GSM1009153     1  0.3508      0.746 0.748 0.252 0.000 0.000 0.000
#> GSM1009167     3  0.0000      1.000 0.000 0.000 1.000 0.000 0.000
#> GSM1009181     5  0.4418      0.535 0.332 0.016 0.000 0.000 0.652
#> GSM1009195     1  0.1197      0.828 0.952 0.048 0.000 0.000 0.000
#> GSM1009070     2  0.0510      1.000 0.016 0.984 0.000 0.000 0.000
#> GSM1009084     5  0.2424      0.819 0.000 0.132 0.000 0.000 0.868
#> GSM1009098     4  0.0290      0.967 0.008 0.000 0.000 0.992 0.000
#> GSM1009112     5  0.0000      0.859 0.000 0.000 0.000 0.000 1.000
#> GSM1009126     1  0.3074      0.776 0.804 0.000 0.000 0.196 0.000
#> GSM1009140     4  0.0000      0.968 0.000 0.000 0.000 1.000 0.000
#> GSM1009154     1  0.2891      0.802 0.824 0.176 0.000 0.000 0.000
#> GSM1009168     3  0.0000      1.000 0.000 0.000 1.000 0.000 0.000
#> GSM1009182     1  0.3663      0.638 0.776 0.016 0.000 0.000 0.208
#> GSM1009196     1  0.1908      0.830 0.908 0.092 0.000 0.000 0.000
#> GSM1009071     2  0.0510      1.000 0.016 0.984 0.000 0.000 0.000
#> GSM1009085     5  0.2516      0.815 0.000 0.140 0.000 0.000 0.860
#> GSM1009099     4  0.0794      0.950 0.028 0.000 0.000 0.972 0.000
#> GSM1009113     5  0.0000      0.859 0.000 0.000 0.000 0.000 1.000
#> GSM1009127     1  0.3309      0.818 0.836 0.036 0.000 0.128 0.000
#> GSM1009141     4  0.0000      0.968 0.000 0.000 0.000 1.000 0.000
#> GSM1009155     1  0.4060      0.608 0.640 0.360 0.000 0.000 0.000
#> GSM1009169     3  0.0000      1.000 0.000 0.000 1.000 0.000 0.000
#> GSM1009183     5  0.4718      0.256 0.444 0.016 0.000 0.000 0.540
#> GSM1009197     1  0.2171      0.838 0.912 0.024 0.000 0.064 0.000
#> GSM1009072     2  0.0510      1.000 0.016 0.984 0.000 0.000 0.000
#> GSM1009086     5  0.1608      0.845 0.000 0.072 0.000 0.000 0.928
#> GSM1009100     4  0.0290      0.967 0.008 0.000 0.000 0.992 0.000
#> GSM1009114     5  0.0000      0.859 0.000 0.000 0.000 0.000 1.000
#> GSM1009128     1  0.3586      0.700 0.736 0.000 0.000 0.264 0.000
#> GSM1009142     4  0.0000      0.968 0.000 0.000 0.000 1.000 0.000
#> GSM1009156     1  0.0955      0.825 0.968 0.028 0.000 0.004 0.000
#> GSM1009170     3  0.0000      1.000 0.000 0.000 1.000 0.000 0.000
#> GSM1009184     1  0.3878      0.590 0.748 0.016 0.000 0.000 0.236
#> GSM1009198     1  0.2464      0.832 0.888 0.016 0.000 0.096 0.000
#> GSM1009073     2  0.0510      1.000 0.016 0.984 0.000 0.000 0.000
#> GSM1009087     5  0.2890      0.801 0.004 0.160 0.000 0.000 0.836
#> GSM1009101     4  0.0290      0.967 0.008 0.000 0.000 0.992 0.000
#> GSM1009115     5  0.0000      0.859 0.000 0.000 0.000 0.000 1.000
#> GSM1009129     5  0.4478      0.386 0.360 0.008 0.004 0.000 0.628
#> GSM1009143     4  0.0000      0.968 0.000 0.000 0.000 1.000 0.000
#> GSM1009157     1  0.3707      0.707 0.716 0.284 0.000 0.000 0.000
#> GSM1009171     3  0.0000      1.000 0.000 0.000 1.000 0.000 0.000
#> GSM1009185     1  0.1914      0.796 0.924 0.016 0.000 0.000 0.060
#> GSM1009199     1  0.0609      0.829 0.980 0.020 0.000 0.000 0.000
#> GSM1009074     2  0.0510      1.000 0.016 0.984 0.000 0.000 0.000
#> GSM1009088     5  0.2813      0.795 0.000 0.168 0.000 0.000 0.832
#> GSM1009102     4  0.0162      0.968 0.004 0.000 0.000 0.996 0.000
#> GSM1009116     5  0.0000      0.859 0.000 0.000 0.000 0.000 1.000
#> GSM1009130     5  0.3852      0.662 0.220 0.020 0.000 0.000 0.760
#> GSM1009144     4  0.0000      0.968 0.000 0.000 0.000 1.000 0.000
#> GSM1009158     1  0.2891      0.801 0.824 0.176 0.000 0.000 0.000
#> GSM1009172     3  0.0000      1.000 0.000 0.000 1.000 0.000 0.000
#> GSM1009186     1  0.4404      0.488 0.684 0.024 0.000 0.000 0.292
#> GSM1009200     1  0.2208      0.837 0.908 0.020 0.000 0.072 0.000
#> GSM1009075     2  0.0510      1.000 0.016 0.984 0.000 0.000 0.000
#> GSM1009089     5  0.5562      0.579 0.156 0.200 0.000 0.000 0.644
#> GSM1009103     4  0.0162      0.968 0.004 0.000 0.000 0.996 0.000
#> GSM1009117     5  0.0000      0.859 0.000 0.000 0.000 0.000 1.000
#> GSM1009131     1  0.4686      0.528 0.644 0.016 0.000 0.008 0.332
#> GSM1009145     4  0.0000      0.968 0.000 0.000 0.000 1.000 0.000
#> GSM1009159     1  0.3506      0.819 0.824 0.132 0.000 0.044 0.000
#> GSM1009173     3  0.0000      1.000 0.000 0.000 1.000 0.000 0.000
#> GSM1009187     1  0.0798      0.817 0.976 0.016 0.000 0.000 0.008
#> GSM1009201     1  0.3037      0.832 0.860 0.100 0.000 0.040 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
#> GSM1009062     6  0.0146      1.000 0.004 0.000  0 0.000 0.000 0.996
#> GSM1009076     5  0.6107      0.440 0.036 0.364  0 0.000 0.480 0.120
#> GSM1009090     4  0.0000      0.983 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009104     5  0.0363      0.795 0.000 0.012  0 0.000 0.988 0.000
#> GSM1009118     1  0.5838      0.347 0.552 0.280  0 0.152 0.012 0.004
#> GSM1009132     4  0.0891      0.982 0.000 0.024  0 0.968 0.000 0.008
#> GSM1009146     1  0.0935      0.902 0.964 0.004  0 0.000 0.000 0.032
#> GSM1009160     3  0.0000      1.000 0.000 0.000  1 0.000 0.000 0.000
#> GSM1009174     2  0.1983      0.857 0.072 0.908  0 0.000 0.020 0.000
#> GSM1009188     1  0.0935      0.906 0.964 0.004  0 0.032 0.000 0.000
#> GSM1009063     6  0.0146      1.000 0.004 0.000  0 0.000 0.000 0.996
#> GSM1009077     5  0.6232      0.325 0.036 0.412  0 0.000 0.420 0.132
#> GSM1009091     4  0.0146      0.983 0.000 0.004  0 0.996 0.000 0.000
#> GSM1009105     5  0.0363      0.795 0.000 0.012  0 0.000 0.988 0.000
#> GSM1009119     1  0.1464      0.901 0.944 0.016  0 0.036 0.000 0.004
#> GSM1009133     4  0.0777      0.983 0.000 0.024  0 0.972 0.000 0.004
#> GSM1009147     1  0.0713      0.900 0.972 0.028  0 0.000 0.000 0.000
#> GSM1009161     3  0.0000      1.000 0.000 0.000  1 0.000 0.000 0.000
#> GSM1009175     2  0.1983      0.857 0.072 0.908  0 0.000 0.020 0.000
#> GSM1009189     1  0.0935      0.906 0.964 0.004  0 0.032 0.000 0.000
#> GSM1009064     6  0.0146      1.000 0.004 0.000  0 0.000 0.000 0.996
#> GSM1009078     5  0.4842      0.731 0.040 0.092  0 0.000 0.720 0.148
#> GSM1009092     4  0.1082      0.946 0.040 0.004  0 0.956 0.000 0.000
#> GSM1009106     5  0.0363      0.795 0.000 0.012  0 0.000 0.988 0.000
#> GSM1009120     1  0.1534      0.900 0.944 0.016  0 0.032 0.004 0.004
#> GSM1009134     4  0.0891      0.982 0.000 0.024  0 0.968 0.000 0.008
#> GSM1009148     1  0.1049      0.902 0.960 0.008  0 0.000 0.000 0.032
#> GSM1009162     3  0.0000      1.000 0.000 0.000  1 0.000 0.000 0.000
#> GSM1009176     2  0.2030      0.828 0.028 0.908  0 0.000 0.064 0.000
#> GSM1009190     1  0.0777      0.907 0.972 0.004  0 0.024 0.000 0.000
#> GSM1009065     6  0.0146      1.000 0.004 0.000  0 0.000 0.000 0.996
#> GSM1009079     2  0.4487      0.440 0.036 0.688  0 0.000 0.256 0.020
#> GSM1009093     4  0.0146      0.983 0.000 0.004  0 0.996 0.000 0.000
#> GSM1009107     5  0.0363      0.795 0.000 0.012  0 0.000 0.988 0.000
#> GSM1009121     1  0.3807      0.769 0.784 0.044  0 0.160 0.008 0.004
#> GSM1009135     4  0.0777      0.983 0.000 0.024  0 0.972 0.000 0.004
#> GSM1009149     1  0.1167      0.907 0.960 0.008  0 0.012 0.000 0.020
#> GSM1009163     3  0.0000      1.000 0.000 0.000  1 0.000 0.000 0.000
#> GSM1009177     2  0.2058      0.835 0.036 0.908  0 0.000 0.056 0.000
#> GSM1009191     1  0.0405      0.905 0.988 0.004  0 0.008 0.000 0.000
#> GSM1009066     6  0.0146      1.000 0.004 0.000  0 0.000 0.000 0.996
#> GSM1009080     2  0.5029      0.381 0.036 0.660  0 0.000 0.248 0.056
#> GSM1009094     4  0.0146      0.983 0.000 0.004  0 0.996 0.000 0.000
#> GSM1009108     5  0.0363      0.795 0.000 0.012  0 0.000 0.988 0.000
#> GSM1009122     2  0.5473      0.148 0.416 0.500  0 0.060 0.020 0.004
#> GSM1009136     4  0.0777      0.983 0.000 0.024  0 0.972 0.000 0.004
#> GSM1009150     1  0.0935      0.904 0.964 0.000  0 0.004 0.000 0.032
#> GSM1009164     3  0.0000      1.000 0.000 0.000  1 0.000 0.000 0.000
#> GSM1009178     2  0.1866      0.855 0.084 0.908  0 0.000 0.008 0.000
#> GSM1009192     1  0.0777      0.907 0.972 0.000  0 0.024 0.000 0.004
#> GSM1009067     6  0.0146      1.000 0.004 0.000  0 0.000 0.000 0.996
#> GSM1009081     5  0.5565      0.316 0.036 0.432  0 0.000 0.476 0.056
#> GSM1009095     4  0.0146      0.983 0.000 0.004  0 0.996 0.000 0.000
#> GSM1009109     5  0.0363      0.795 0.000 0.012  0 0.000 0.988 0.000
#> GSM1009123     1  0.2267      0.879 0.904 0.020  0 0.064 0.008 0.004
#> GSM1009137     4  0.0777      0.983 0.000 0.024  0 0.972 0.000 0.004
#> GSM1009151     1  0.1444      0.886 0.928 0.000  0 0.000 0.000 0.072
#> GSM1009165     3  0.0000      1.000 0.000 0.000  1 0.000 0.000 0.000
#> GSM1009179     2  0.1714      0.851 0.092 0.908  0 0.000 0.000 0.000
#> GSM1009193     1  0.1003      0.907 0.964 0.004  0 0.028 0.000 0.004
#> GSM1009068     6  0.0146      1.000 0.004 0.000  0 0.000 0.000 0.996
#> GSM1009082     5  0.5979      0.591 0.036 0.264  0 0.000 0.560 0.140
#> GSM1009096     4  0.0146      0.983 0.000 0.004  0 0.996 0.000 0.000
#> GSM1009110     5  0.0363      0.795 0.000 0.012  0 0.000 0.988 0.000
#> GSM1009124     1  0.2050      0.887 0.920 0.036  0 0.032 0.008 0.004
#> GSM1009138     4  0.0891      0.982 0.000 0.024  0 0.968 0.000 0.008
#> GSM1009152     1  0.1814      0.869 0.900 0.000  0 0.000 0.000 0.100
#> GSM1009166     3  0.0000      1.000 0.000 0.000  1 0.000 0.000 0.000
#> GSM1009180     2  0.1714      0.851 0.092 0.908  0 0.000 0.000 0.000
#> GSM1009194     1  0.2056      0.880 0.904 0.004  0 0.012 0.000 0.080
#> GSM1009069     6  0.0146      1.000 0.004 0.000  0 0.000 0.000 0.996
#> GSM1009083     5  0.6314      0.568 0.036 0.228  0 0.000 0.516 0.220
#> GSM1009097     4  0.0405      0.978 0.008 0.004  0 0.988 0.000 0.000
#> GSM1009111     5  0.0363      0.795 0.000 0.012  0 0.000 0.988 0.000
#> GSM1009125     2  0.6191      0.271 0.312 0.464  0 0.212 0.008 0.004
#> GSM1009139     4  0.0891      0.982 0.000 0.024  0 0.968 0.000 0.008
#> GSM1009153     1  0.2340      0.831 0.852 0.000  0 0.000 0.000 0.148
#> GSM1009167     3  0.0000      1.000 0.000 0.000  1 0.000 0.000 0.000
#> GSM1009181     2  0.1983      0.819 0.020 0.908  0 0.000 0.072 0.000
#> GSM1009195     1  0.2445      0.800 0.868 0.120  0 0.000 0.004 0.008
#> GSM1009070     6  0.0146      1.000 0.004 0.000  0 0.000 0.000 0.996
#> GSM1009084     5  0.4812      0.731 0.036 0.116  0 0.000 0.724 0.124
#> GSM1009098     4  0.0146      0.983 0.000 0.004  0 0.996 0.000 0.000
#> GSM1009112     5  0.0363      0.795 0.000 0.012  0 0.000 0.988 0.000
#> GSM1009126     1  0.3516      0.803 0.812 0.040  0 0.136 0.008 0.004
#> GSM1009140     4  0.0777      0.983 0.000 0.024  0 0.972 0.000 0.004
#> GSM1009154     1  0.0937      0.901 0.960 0.000  0 0.000 0.000 0.040
#> GSM1009168     3  0.0000      1.000 0.000 0.000  1 0.000 0.000 0.000
#> GSM1009182     2  0.1951      0.857 0.076 0.908  0 0.000 0.016 0.000
#> GSM1009196     1  0.0820      0.908 0.972 0.000  0 0.016 0.000 0.012
#> GSM1009071     6  0.0146      1.000 0.004 0.000  0 0.000 0.000 0.996
#> GSM1009085     5  0.4589      0.739 0.036 0.092  0 0.000 0.744 0.128
#> GSM1009099     4  0.0146      0.983 0.000 0.004  0 0.996 0.000 0.000
#> GSM1009113     5  0.0363      0.795 0.000 0.012  0 0.000 0.988 0.000
#> GSM1009127     1  0.2121      0.886 0.916 0.040  0 0.032 0.008 0.004
#> GSM1009141     4  0.0891      0.982 0.000 0.024  0 0.968 0.000 0.008
#> GSM1009155     1  0.3592      0.565 0.656 0.000  0 0.000 0.000 0.344
#> GSM1009169     3  0.0000      1.000 0.000 0.000  1 0.000 0.000 0.000
#> GSM1009183     2  0.2030      0.828 0.028 0.908  0 0.000 0.064 0.000
#> GSM1009197     1  0.0858      0.907 0.968 0.000  0 0.028 0.000 0.004
#> GSM1009072     6  0.0146      1.000 0.004 0.000  0 0.000 0.000 0.996
#> GSM1009086     5  0.4887      0.697 0.036 0.192  0 0.000 0.700 0.072
#> GSM1009100     4  0.0146      0.983 0.000 0.004  0 0.996 0.000 0.000
#> GSM1009114     5  0.0363      0.795 0.000 0.012  0 0.000 0.988 0.000
#> GSM1009128     1  0.2384      0.878 0.900 0.032  0 0.056 0.008 0.004
#> GSM1009142     4  0.0891      0.982 0.000 0.024  0 0.968 0.000 0.008
#> GSM1009156     1  0.0865      0.897 0.964 0.036  0 0.000 0.000 0.000
#> GSM1009170     3  0.0000      1.000 0.000 0.000  1 0.000 0.000 0.000
#> GSM1009184     2  0.1866      0.855 0.084 0.908  0 0.000 0.008 0.000
#> GSM1009198     1  0.0935      0.906 0.964 0.004  0 0.032 0.000 0.000
#> GSM1009073     6  0.0146      1.000 0.004 0.000  0 0.000 0.000 0.996
#> GSM1009087     5  0.4842      0.731 0.040 0.092  0 0.000 0.720 0.148
#> GSM1009101     4  0.0146      0.983 0.000 0.004  0 0.996 0.000 0.000
#> GSM1009115     5  0.0363      0.795 0.000 0.012  0 0.000 0.988 0.000
#> GSM1009129     5  0.6291      0.187 0.344 0.256  0 0.004 0.392 0.004
#> GSM1009143     4  0.0891      0.982 0.000 0.024  0 0.968 0.000 0.008
#> GSM1009157     1  0.3217      0.747 0.768 0.008  0 0.000 0.000 0.224
#> GSM1009171     3  0.0000      1.000 0.000 0.000  1 0.000 0.000 0.000
#> GSM1009185     2  0.2039      0.856 0.076 0.904  0 0.000 0.020 0.000
#> GSM1009199     1  0.2527      0.749 0.832 0.168  0 0.000 0.000 0.000
#> GSM1009074     6  0.0146      1.000 0.004 0.000  0 0.000 0.000 0.996
#> GSM1009088     5  0.4740      0.733 0.036 0.092  0 0.000 0.728 0.144
#> GSM1009102     4  0.0146      0.983 0.000 0.004  0 0.996 0.000 0.000
#> GSM1009116     5  0.0363      0.795 0.000 0.012  0 0.000 0.988 0.000
#> GSM1009130     5  0.4582      0.617 0.224 0.072  0 0.004 0.696 0.004
#> GSM1009144     4  0.0891      0.982 0.000 0.024  0 0.968 0.000 0.008
#> GSM1009158     1  0.0935      0.903 0.964 0.004  0 0.000 0.000 0.032
#> GSM1009172     3  0.0000      1.000 0.000 0.000  1 0.000 0.000 0.000
#> GSM1009186     2  0.1983      0.857 0.072 0.908  0 0.000 0.020 0.000
#> GSM1009200     1  0.0858      0.907 0.968 0.004  0 0.028 0.000 0.000
#> GSM1009075     6  0.0146      1.000 0.004 0.000  0 0.000 0.000 0.996
#> GSM1009089     5  0.6311      0.613 0.192 0.084  0 0.000 0.572 0.152
#> GSM1009103     4  0.0146      0.983 0.000 0.004  0 0.996 0.000 0.000
#> GSM1009117     5  0.0363      0.795 0.000 0.012  0 0.000 0.988 0.000
#> GSM1009131     1  0.5196      0.387 0.596 0.068  0 0.012 0.320 0.004
#> GSM1009145     4  0.0777      0.983 0.000 0.024  0 0.972 0.000 0.004
#> GSM1009159     1  0.1148      0.908 0.960 0.004  0 0.020 0.000 0.016
#> GSM1009173     3  0.0000      1.000 0.000 0.000  1 0.000 0.000 0.000
#> GSM1009187     2  0.1863      0.841 0.104 0.896  0 0.000 0.000 0.000
#> GSM1009201     1  0.0508      0.907 0.984 0.000  0 0.012 0.000 0.004

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

consensus_heatmap(res, k = 2)

plot of chunk tab-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 temperature(p) time(p) specimen(p) k
#> CV:NMF 136          0.985   0.992    4.02e-21 2
#> CV:NMF 135          0.989   1.000    8.02e-44 3
#> CV:NMF 123          1.000   1.000    6.04e-58 4
#> CV:NMF 132          1.000   1.000    4.42e-86 5
#> CV:NMF 130          1.000   1.000   1.38e-106 6

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


MAD:hclust*

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

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

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

res
#> A 'ConsensusPartition' object with k = 2, 3, 4, 5, 6.
#>   On a matrix with 51941 rows and 140 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.927           0.922       0.968         0.4996 0.500   0.500
#> 3 3 0.812           0.818       0.893         0.1857 0.896   0.793
#> 4 4 0.637           0.804       0.817         0.1072 0.980   0.949
#> 5 5 0.757           0.698       0.820         0.0901 0.987   0.965
#> 6 6 0.897           0.865       0.900         0.1102 0.835   0.551

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
#> GSM1009062     1  0.0000      0.963 1.000 0.000
#> GSM1009076     2  0.0000      0.970 0.000 1.000
#> GSM1009090     1  0.0000      0.963 1.000 0.000
#> GSM1009104     2  0.0000      0.970 0.000 1.000
#> GSM1009118     2  0.0938      0.961 0.012 0.988
#> GSM1009132     1  0.0000      0.963 1.000 0.000
#> GSM1009146     1  0.1184      0.957 0.984 0.016
#> GSM1009160     2  0.0000      0.970 0.000 1.000
#> GSM1009174     2  0.0000      0.970 0.000 1.000
#> GSM1009188     1  0.0000      0.963 1.000 0.000
#> GSM1009063     1  0.0000      0.963 1.000 0.000
#> GSM1009077     2  0.0000      0.970 0.000 1.000
#> GSM1009091     1  0.0000      0.963 1.000 0.000
#> GSM1009105     2  0.0000      0.970 0.000 1.000
#> GSM1009119     1  0.9552      0.411 0.624 0.376
#> GSM1009133     1  0.0000      0.963 1.000 0.000
#> GSM1009147     1  0.1184      0.957 0.984 0.016
#> GSM1009161     2  0.0000      0.970 0.000 1.000
#> GSM1009175     2  0.0000      0.970 0.000 1.000
#> GSM1009189     1  0.1184      0.957 0.984 0.016
#> GSM1009064     1  0.0000      0.963 1.000 0.000
#> GSM1009078     2  0.9710      0.348 0.400 0.600
#> GSM1009092     1  0.0000      0.963 1.000 0.000
#> GSM1009106     2  0.0000      0.970 0.000 1.000
#> GSM1009120     1  0.9552      0.411 0.624 0.376
#> GSM1009134     1  0.0000      0.963 1.000 0.000
#> GSM1009148     1  0.1184      0.957 0.984 0.016
#> GSM1009162     2  0.0000      0.970 0.000 1.000
#> GSM1009176     2  0.0000      0.970 0.000 1.000
#> GSM1009190     1  0.1184      0.957 0.984 0.016
#> GSM1009065     1  0.0000      0.963 1.000 0.000
#> GSM1009079     2  0.0000      0.970 0.000 1.000
#> GSM1009093     1  0.0000      0.963 1.000 0.000
#> GSM1009107     2  0.0000      0.970 0.000 1.000
#> GSM1009121     2  0.0938      0.961 0.012 0.988
#> GSM1009135     1  0.0000      0.963 1.000 0.000
#> GSM1009149     1  0.0000      0.963 1.000 0.000
#> GSM1009163     2  0.0000      0.970 0.000 1.000
#> GSM1009177     2  0.0000      0.970 0.000 1.000
#> GSM1009191     1  0.1184      0.957 0.984 0.016
#> GSM1009066     1  0.0000      0.963 1.000 0.000
#> GSM1009080     2  0.0000      0.970 0.000 1.000
#> GSM1009094     1  0.0000      0.963 1.000 0.000
#> GSM1009108     2  0.0000      0.970 0.000 1.000
#> GSM1009122     2  0.0938      0.961 0.012 0.988
#> GSM1009136     1  0.0000      0.963 1.000 0.000
#> GSM1009150     1  0.0000      0.963 1.000 0.000
#> GSM1009164     2  0.0000      0.970 0.000 1.000
#> GSM1009178     2  0.0000      0.970 0.000 1.000
#> GSM1009192     1  0.0376      0.962 0.996 0.004
#> GSM1009067     1  0.0000      0.963 1.000 0.000
#> GSM1009081     2  0.0000      0.970 0.000 1.000
#> GSM1009095     1  0.0000      0.963 1.000 0.000
#> GSM1009109     2  0.0000      0.970 0.000 1.000
#> GSM1009123     1  0.9552      0.411 0.624 0.376
#> GSM1009137     1  0.0000      0.963 1.000 0.000
#> GSM1009151     1  0.1184      0.957 0.984 0.016
#> GSM1009165     2  0.0000      0.970 0.000 1.000
#> GSM1009179     2  0.0000      0.970 0.000 1.000
#> GSM1009193     1  0.0000      0.963 1.000 0.000
#> GSM1009068     1  0.0000      0.963 1.000 0.000
#> GSM1009082     2  0.0000      0.970 0.000 1.000
#> GSM1009096     1  0.0000      0.963 1.000 0.000
#> GSM1009110     2  0.0000      0.970 0.000 1.000
#> GSM1009124     1  0.9661      0.383 0.608 0.392
#> GSM1009138     1  0.0000      0.963 1.000 0.000
#> GSM1009152     1  0.1184      0.957 0.984 0.016
#> GSM1009166     2  0.0000      0.970 0.000 1.000
#> GSM1009180     2  0.0000      0.970 0.000 1.000
#> GSM1009194     1  0.1184      0.957 0.984 0.016
#> GSM1009069     1  0.0000      0.963 1.000 0.000
#> GSM1009083     2  0.0000      0.970 0.000 1.000
#> GSM1009097     1  0.0000      0.963 1.000 0.000
#> GSM1009111     2  0.0000      0.970 0.000 1.000
#> GSM1009125     2  0.0938      0.961 0.012 0.988
#> GSM1009139     1  0.0000      0.963 1.000 0.000
#> GSM1009153     1  0.1184      0.957 0.984 0.016
#> GSM1009167     2  0.0000      0.970 0.000 1.000
#> GSM1009181     2  0.0000      0.970 0.000 1.000
#> GSM1009195     1  0.1184      0.957 0.984 0.016
#> GSM1009070     1  0.0000      0.963 1.000 0.000
#> GSM1009084     2  0.0000      0.970 0.000 1.000
#> GSM1009098     1  0.0000      0.963 1.000 0.000
#> GSM1009112     2  0.0000      0.970 0.000 1.000
#> GSM1009126     1  0.9661      0.383 0.608 0.392
#> GSM1009140     1  0.0000      0.963 1.000 0.000
#> GSM1009154     1  0.1184      0.957 0.984 0.016
#> GSM1009168     2  0.0000      0.970 0.000 1.000
#> GSM1009182     2  0.0000      0.970 0.000 1.000
#> GSM1009196     1  0.1184      0.957 0.984 0.016
#> GSM1009071     1  0.0000      0.963 1.000 0.000
#> GSM1009085     2  0.0000      0.970 0.000 1.000
#> GSM1009099     1  0.0000      0.963 1.000 0.000
#> GSM1009113     2  0.0000      0.970 0.000 1.000
#> GSM1009127     1  0.9552      0.411 0.624 0.376
#> GSM1009141     1  0.0000      0.963 1.000 0.000
#> GSM1009155     1  0.1184      0.957 0.984 0.016
#> GSM1009169     2  0.0000      0.970 0.000 1.000
#> GSM1009183     2  0.0000      0.970 0.000 1.000
#> GSM1009197     1  0.1184      0.957 0.984 0.016
#> GSM1009072     1  0.0000      0.963 1.000 0.000
#> GSM1009086     2  0.0000      0.970 0.000 1.000
#> GSM1009100     1  0.0000      0.963 1.000 0.000
#> GSM1009114     2  0.0000      0.970 0.000 1.000
#> GSM1009128     2  0.5408      0.839 0.124 0.876
#> GSM1009142     1  0.0000      0.963 1.000 0.000
#> GSM1009156     1  0.1184      0.957 0.984 0.016
#> GSM1009170     2  0.0000      0.970 0.000 1.000
#> GSM1009184     2  0.0000      0.970 0.000 1.000
#> GSM1009198     1  0.0000      0.963 1.000 0.000
#> GSM1009073     1  0.0000      0.963 1.000 0.000
#> GSM1009087     2  0.9710      0.348 0.400 0.600
#> GSM1009101     1  0.0000      0.963 1.000 0.000
#> GSM1009115     2  0.0000      0.970 0.000 1.000
#> GSM1009129     2  0.0938      0.961 0.012 0.988
#> GSM1009143     1  0.0000      0.963 1.000 0.000
#> GSM1009157     1  0.1184      0.957 0.984 0.016
#> GSM1009171     2  0.0000      0.970 0.000 1.000
#> GSM1009185     2  0.0000      0.970 0.000 1.000
#> GSM1009199     1  0.1184      0.957 0.984 0.016
#> GSM1009074     1  0.0000      0.963 1.000 0.000
#> GSM1009088     2  0.9710      0.348 0.400 0.600
#> GSM1009102     1  0.0000      0.963 1.000 0.000
#> GSM1009116     2  0.0000      0.970 0.000 1.000
#> GSM1009130     2  0.0938      0.961 0.012 0.988
#> GSM1009144     1  0.0000      0.963 1.000 0.000
#> GSM1009158     1  0.0000      0.963 1.000 0.000
#> GSM1009172     2  0.0000      0.970 0.000 1.000
#> GSM1009186     2  0.0000      0.970 0.000 1.000
#> GSM1009200     1  0.1184      0.957 0.984 0.016
#> GSM1009075     1  0.0000      0.963 1.000 0.000
#> GSM1009089     2  0.9710      0.348 0.400 0.600
#> GSM1009103     1  0.0000      0.963 1.000 0.000
#> GSM1009117     2  0.0000      0.970 0.000 1.000
#> GSM1009131     2  0.0938      0.961 0.012 0.988
#> GSM1009145     1  0.0000      0.963 1.000 0.000
#> GSM1009159     1  0.0000      0.963 1.000 0.000
#> GSM1009173     2  0.0000      0.970 0.000 1.000
#> GSM1009187     2  0.0000      0.970 0.000 1.000
#> GSM1009201     1  0.1184      0.957 0.984 0.016

show/hide code output

cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#>            class entropy silhouette    p1    p2    p3
#> GSM1009062     1  0.0747      0.951 0.984 0.016 0.000
#> GSM1009076     2  0.1289      0.675 0.000 0.968 0.032
#> GSM1009090     1  0.0424      0.955 0.992 0.008 0.000
#> GSM1009104     3  0.5363      0.754 0.000 0.276 0.724
#> GSM1009118     2  0.5953      0.730 0.012 0.708 0.280
#> GSM1009132     1  0.0424      0.955 0.992 0.008 0.000
#> GSM1009146     1  0.1015      0.950 0.980 0.008 0.012
#> GSM1009160     3  0.0000      0.804 0.000 0.000 1.000
#> GSM1009174     2  0.5363      0.736 0.000 0.724 0.276
#> GSM1009188     1  0.0237      0.954 0.996 0.004 0.000
#> GSM1009063     1  0.0747      0.951 0.984 0.016 0.000
#> GSM1009077     2  0.1289      0.675 0.000 0.968 0.032
#> GSM1009091     1  0.0424      0.955 0.992 0.008 0.000
#> GSM1009105     3  0.5363      0.754 0.000 0.276 0.724
#> GSM1009119     1  0.6045      0.381 0.620 0.380 0.000
#> GSM1009133     1  0.0424      0.955 0.992 0.008 0.000
#> GSM1009147     1  0.1015      0.950 0.980 0.008 0.012
#> GSM1009161     3  0.0000      0.804 0.000 0.000 1.000
#> GSM1009175     2  0.5363      0.736 0.000 0.724 0.276
#> GSM1009189     1  0.1015      0.950 0.980 0.008 0.012
#> GSM1009064     1  0.0747      0.951 0.984 0.016 0.000
#> GSM1009078     2  0.6045      0.258 0.380 0.620 0.000
#> GSM1009092     1  0.0424      0.955 0.992 0.008 0.000
#> GSM1009106     3  0.5363      0.754 0.000 0.276 0.724
#> GSM1009120     1  0.6045      0.381 0.620 0.380 0.000
#> GSM1009134     1  0.0424      0.955 0.992 0.008 0.000
#> GSM1009148     1  0.1015      0.950 0.980 0.008 0.012
#> GSM1009162     3  0.0000      0.804 0.000 0.000 1.000
#> GSM1009176     2  0.5363      0.736 0.000 0.724 0.276
#> GSM1009190     1  0.1015      0.950 0.980 0.008 0.012
#> GSM1009065     1  0.0747      0.951 0.984 0.016 0.000
#> GSM1009079     2  0.1289      0.675 0.000 0.968 0.032
#> GSM1009093     1  0.0424      0.955 0.992 0.008 0.000
#> GSM1009107     3  0.5363      0.754 0.000 0.276 0.724
#> GSM1009121     2  0.5953      0.730 0.012 0.708 0.280
#> GSM1009135     1  0.0424      0.955 0.992 0.008 0.000
#> GSM1009149     1  0.0892      0.951 0.980 0.020 0.000
#> GSM1009163     3  0.0000      0.804 0.000 0.000 1.000
#> GSM1009177     2  0.5363      0.736 0.000 0.724 0.276
#> GSM1009191     1  0.1015      0.950 0.980 0.008 0.012
#> GSM1009066     1  0.0747      0.951 0.984 0.016 0.000
#> GSM1009080     2  0.1289      0.675 0.000 0.968 0.032
#> GSM1009094     1  0.0424      0.955 0.992 0.008 0.000
#> GSM1009108     3  0.5363      0.754 0.000 0.276 0.724
#> GSM1009122     2  0.5953      0.730 0.012 0.708 0.280
#> GSM1009136     1  0.0424      0.955 0.992 0.008 0.000
#> GSM1009150     1  0.0892      0.951 0.980 0.020 0.000
#> GSM1009164     3  0.0000      0.804 0.000 0.000 1.000
#> GSM1009178     2  0.5363      0.736 0.000 0.724 0.276
#> GSM1009192     1  0.0475      0.954 0.992 0.004 0.004
#> GSM1009067     1  0.0747      0.951 0.984 0.016 0.000
#> GSM1009081     2  0.1289      0.675 0.000 0.968 0.032
#> GSM1009095     1  0.0424      0.955 0.992 0.008 0.000
#> GSM1009109     3  0.5363      0.754 0.000 0.276 0.724
#> GSM1009123     1  0.6045      0.381 0.620 0.380 0.000
#> GSM1009137     1  0.0424      0.955 0.992 0.008 0.000
#> GSM1009151     1  0.1015      0.950 0.980 0.008 0.012
#> GSM1009165     3  0.0000      0.804 0.000 0.000 1.000
#> GSM1009179     2  0.5363      0.736 0.000 0.724 0.276
#> GSM1009193     1  0.0237      0.954 0.996 0.004 0.000
#> GSM1009068     1  0.0747      0.951 0.984 0.016 0.000
#> GSM1009082     2  0.1289      0.675 0.000 0.968 0.032
#> GSM1009096     1  0.0424      0.955 0.992 0.008 0.000
#> GSM1009110     3  0.5363      0.754 0.000 0.276 0.724
#> GSM1009124     1  0.6600      0.360 0.604 0.384 0.012
#> GSM1009138     1  0.0424      0.955 0.992 0.008 0.000
#> GSM1009152     1  0.1015      0.950 0.980 0.008 0.012
#> GSM1009166     3  0.0000      0.804 0.000 0.000 1.000
#> GSM1009180     2  0.5363      0.736 0.000 0.724 0.276
#> GSM1009194     1  0.1015      0.950 0.980 0.008 0.012
#> GSM1009069     1  0.0747      0.951 0.984 0.016 0.000
#> GSM1009083     2  0.1289      0.675 0.000 0.968 0.032
#> GSM1009097     1  0.0424      0.955 0.992 0.008 0.000
#> GSM1009111     3  0.5363      0.754 0.000 0.276 0.724
#> GSM1009125     2  0.5953      0.730 0.012 0.708 0.280
#> GSM1009139     1  0.0424      0.955 0.992 0.008 0.000
#> GSM1009153     1  0.1015      0.950 0.980 0.008 0.012
#> GSM1009167     3  0.0000      0.804 0.000 0.000 1.000
#> GSM1009181     2  0.5363      0.736 0.000 0.724 0.276
#> GSM1009195     1  0.1015      0.950 0.980 0.008 0.012
#> GSM1009070     1  0.0747      0.951 0.984 0.016 0.000
#> GSM1009084     2  0.1289      0.675 0.000 0.968 0.032
#> GSM1009098     1  0.0424      0.955 0.992 0.008 0.000
#> GSM1009112     3  0.5363      0.754 0.000 0.276 0.724
#> GSM1009126     1  0.6600      0.360 0.604 0.384 0.012
#> GSM1009140     1  0.0424      0.955 0.992 0.008 0.000
#> GSM1009154     1  0.1015      0.950 0.980 0.008 0.012
#> GSM1009168     3  0.0000      0.804 0.000 0.000 1.000
#> GSM1009182     2  0.5363      0.736 0.000 0.724 0.276
#> GSM1009196     1  0.1015      0.950 0.980 0.008 0.012
#> GSM1009071     1  0.0747      0.951 0.984 0.016 0.000
#> GSM1009085     2  0.1289      0.675 0.000 0.968 0.032
#> GSM1009099     1  0.0424      0.955 0.992 0.008 0.000
#> GSM1009113     3  0.5363      0.754 0.000 0.276 0.724
#> GSM1009127     1  0.6045      0.381 0.620 0.380 0.000
#> GSM1009141     1  0.0424      0.955 0.992 0.008 0.000
#> GSM1009155     1  0.1015      0.950 0.980 0.008 0.012
#> GSM1009169     3  0.0000      0.804 0.000 0.000 1.000
#> GSM1009183     2  0.5363      0.736 0.000 0.724 0.276
#> GSM1009197     1  0.1015      0.950 0.980 0.008 0.012
#> GSM1009072     1  0.0747      0.951 0.984 0.016 0.000
#> GSM1009086     2  0.1289      0.675 0.000 0.968 0.032
#> GSM1009100     1  0.0424      0.955 0.992 0.008 0.000
#> GSM1009114     3  0.5363      0.754 0.000 0.276 0.724
#> GSM1009128     2  0.8202      0.597 0.120 0.620 0.260
#> GSM1009142     1  0.0424      0.955 0.992 0.008 0.000
#> GSM1009156     1  0.1015      0.950 0.980 0.008 0.012
#> GSM1009170     3  0.0000      0.804 0.000 0.000 1.000
#> GSM1009184     2  0.5363      0.736 0.000 0.724 0.276
#> GSM1009198     1  0.0237      0.954 0.996 0.004 0.000
#> GSM1009073     1  0.0747      0.951 0.984 0.016 0.000
#> GSM1009087     2  0.6045      0.258 0.380 0.620 0.000
#> GSM1009101     1  0.0424      0.955 0.992 0.008 0.000
#> GSM1009115     3  0.5363      0.754 0.000 0.276 0.724
#> GSM1009129     2  0.5953      0.730 0.012 0.708 0.280
#> GSM1009143     1  0.0424      0.955 0.992 0.008 0.000
#> GSM1009157     1  0.1015      0.950 0.980 0.008 0.012
#> GSM1009171     3  0.0000      0.804 0.000 0.000 1.000
#> GSM1009185     2  0.5363      0.736 0.000 0.724 0.276
#> GSM1009199     1  0.1015      0.950 0.980 0.008 0.012
#> GSM1009074     1  0.0747      0.951 0.984 0.016 0.000
#> GSM1009088     2  0.6045      0.258 0.380 0.620 0.000
#> GSM1009102     1  0.0424      0.955 0.992 0.008 0.000
#> GSM1009116     3  0.5363      0.754 0.000 0.276 0.724
#> GSM1009130     2  0.5953      0.730 0.012 0.708 0.280
#> GSM1009144     1  0.0424      0.955 0.992 0.008 0.000
#> GSM1009158     1  0.0892      0.951 0.980 0.020 0.000
#> GSM1009172     3  0.0000      0.804 0.000 0.000 1.000
#> GSM1009186     2  0.5363      0.736 0.000 0.724 0.276
#> GSM1009200     1  0.1015      0.950 0.980 0.008 0.012
#> GSM1009075     1  0.0747      0.951 0.984 0.016 0.000
#> GSM1009089     2  0.6045      0.258 0.380 0.620 0.000
#> GSM1009103     1  0.0424      0.955 0.992 0.008 0.000
#> GSM1009117     3  0.5363      0.754 0.000 0.276 0.724
#> GSM1009131     2  0.5953      0.730 0.012 0.708 0.280
#> GSM1009145     1  0.0424      0.955 0.992 0.008 0.000
#> GSM1009159     1  0.0892      0.951 0.980 0.020 0.000
#> GSM1009173     3  0.0000      0.804 0.000 0.000 1.000
#> GSM1009187     2  0.5363      0.736 0.000 0.724 0.276
#> GSM1009201     1  0.1015      0.950 0.980 0.008 0.012

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>            class entropy silhouette    p1    p2    p3    p4
#> GSM1009062     1   0.205      0.862 0.928 0.064 0.000 0.008
#> GSM1009076     2   0.265      0.551 0.000 0.880 0.000 0.120
#> GSM1009090     1   0.292      0.863 0.860 0.000 0.000 0.140
#> GSM1009104     4   0.573      1.000 0.000 0.064 0.264 0.672
#> GSM1009118     2   0.739      0.708 0.000 0.484 0.176 0.340
#> GSM1009132     1   0.292      0.863 0.860 0.000 0.000 0.140
#> GSM1009146     1   0.164      0.876 0.948 0.044 0.000 0.008
#> GSM1009160     3   0.000      1.000 0.000 0.000 1.000 0.000
#> GSM1009174     2   0.732      0.712 0.000 0.500 0.172 0.328
#> GSM1009188     1   0.126      0.876 0.964 0.028 0.000 0.008
#> GSM1009063     1   0.205      0.862 0.928 0.064 0.000 0.008
#> GSM1009077     2   0.265      0.551 0.000 0.880 0.000 0.120
#> GSM1009091     1   0.292      0.863 0.860 0.000 0.000 0.140
#> GSM1009105     4   0.573      1.000 0.000 0.064 0.264 0.672
#> GSM1009119     1   0.558      0.345 0.576 0.400 0.000 0.024
#> GSM1009133     1   0.292      0.863 0.860 0.000 0.000 0.140
#> GSM1009147     1   0.164      0.876 0.948 0.044 0.000 0.008
#> GSM1009161     3   0.000      1.000 0.000 0.000 1.000 0.000
#> GSM1009175     2   0.732      0.712 0.000 0.500 0.172 0.328
#> GSM1009189     1   0.164      0.876 0.948 0.044 0.000 0.008
#> GSM1009064     1   0.205      0.862 0.928 0.064 0.000 0.008
#> GSM1009078     2   0.559      0.226 0.264 0.680 0.000 0.056
#> GSM1009092     1   0.292      0.863 0.860 0.000 0.000 0.140
#> GSM1009106     4   0.573      1.000 0.000 0.064 0.264 0.672
#> GSM1009120     1   0.558      0.345 0.576 0.400 0.000 0.024
#> GSM1009134     1   0.292      0.863 0.860 0.000 0.000 0.140
#> GSM1009148     1   0.164      0.876 0.948 0.044 0.000 0.008
#> GSM1009162     3   0.000      1.000 0.000 0.000 1.000 0.000
#> GSM1009176     2   0.732      0.712 0.000 0.500 0.172 0.328
#> GSM1009190     1   0.164      0.876 0.948 0.044 0.000 0.008
#> GSM1009065     1   0.205      0.862 0.928 0.064 0.000 0.008
#> GSM1009079     2   0.265      0.551 0.000 0.880 0.000 0.120
#> GSM1009093     1   0.292      0.863 0.860 0.000 0.000 0.140
#> GSM1009107     4   0.573      1.000 0.000 0.064 0.264 0.672
#> GSM1009121     2   0.739      0.708 0.000 0.484 0.176 0.340
#> GSM1009135     1   0.292      0.863 0.860 0.000 0.000 0.140
#> GSM1009149     1   0.349      0.841 0.864 0.092 0.000 0.044
#> GSM1009163     3   0.000      1.000 0.000 0.000 1.000 0.000
#> GSM1009177     2   0.732      0.712 0.000 0.500 0.172 0.328
#> GSM1009191     1   0.164      0.876 0.948 0.044 0.000 0.008
#> GSM1009066     1   0.205      0.862 0.928 0.064 0.000 0.008
#> GSM1009080     2   0.265      0.551 0.000 0.880 0.000 0.120
#> GSM1009094     1   0.292      0.863 0.860 0.000 0.000 0.140
#> GSM1009108     4   0.573      1.000 0.000 0.064 0.264 0.672
#> GSM1009122     2   0.739      0.708 0.000 0.484 0.176 0.340
#> GSM1009136     1   0.292      0.863 0.860 0.000 0.000 0.140
#> GSM1009150     1   0.349      0.841 0.864 0.092 0.000 0.044
#> GSM1009164     3   0.000      1.000 0.000 0.000 1.000 0.000
#> GSM1009178     2   0.732      0.712 0.000 0.500 0.172 0.328
#> GSM1009192     1   0.136      0.876 0.960 0.032 0.000 0.008
#> GSM1009067     1   0.205      0.862 0.928 0.064 0.000 0.008
#> GSM1009081     2   0.265      0.551 0.000 0.880 0.000 0.120
#> GSM1009095     1   0.292      0.863 0.860 0.000 0.000 0.140
#> GSM1009109     4   0.573      1.000 0.000 0.064 0.264 0.672
#> GSM1009123     1   0.558      0.345 0.576 0.400 0.000 0.024
#> GSM1009137     1   0.292      0.863 0.860 0.000 0.000 0.140
#> GSM1009151     1   0.164      0.876 0.948 0.044 0.000 0.008
#> GSM1009165     3   0.000      1.000 0.000 0.000 1.000 0.000
#> GSM1009179     2   0.732      0.712 0.000 0.500 0.172 0.328
#> GSM1009193     1   0.126      0.876 0.964 0.028 0.000 0.008
#> GSM1009068     1   0.205      0.862 0.928 0.064 0.000 0.008
#> GSM1009082     2   0.265      0.551 0.000 0.880 0.000 0.120
#> GSM1009096     1   0.292      0.863 0.860 0.000 0.000 0.140
#> GSM1009110     4   0.573      1.000 0.000 0.064 0.264 0.672
#> GSM1009124     1   0.562      0.322 0.560 0.416 0.000 0.024
#> GSM1009138     1   0.292      0.863 0.860 0.000 0.000 0.140
#> GSM1009152     1   0.164      0.876 0.948 0.044 0.000 0.008
#> GSM1009166     3   0.000      1.000 0.000 0.000 1.000 0.000
#> GSM1009180     2   0.732      0.712 0.000 0.500 0.172 0.328
#> GSM1009194     1   0.164      0.876 0.948 0.044 0.000 0.008
#> GSM1009069     1   0.205      0.862 0.928 0.064 0.000 0.008
#> GSM1009083     2   0.265      0.551 0.000 0.880 0.000 0.120
#> GSM1009097     1   0.292      0.863 0.860 0.000 0.000 0.140
#> GSM1009111     4   0.573      1.000 0.000 0.064 0.264 0.672
#> GSM1009125     2   0.739      0.708 0.000 0.484 0.176 0.340
#> GSM1009139     1   0.292      0.863 0.860 0.000 0.000 0.140
#> GSM1009153     1   0.164      0.876 0.948 0.044 0.000 0.008
#> GSM1009167     3   0.000      1.000 0.000 0.000 1.000 0.000
#> GSM1009181     2   0.732      0.712 0.000 0.500 0.172 0.328
#> GSM1009195     1   0.164      0.876 0.948 0.044 0.000 0.008
#> GSM1009070     1   0.205      0.862 0.928 0.064 0.000 0.008
#> GSM1009084     2   0.265      0.551 0.000 0.880 0.000 0.120
#> GSM1009098     1   0.292      0.863 0.860 0.000 0.000 0.140
#> GSM1009112     4   0.573      1.000 0.000 0.064 0.264 0.672
#> GSM1009126     1   0.562      0.322 0.560 0.416 0.000 0.024
#> GSM1009140     1   0.292      0.863 0.860 0.000 0.000 0.140
#> GSM1009154     1   0.164      0.876 0.948 0.044 0.000 0.008
#> GSM1009168     3   0.000      1.000 0.000 0.000 1.000 0.000
#> GSM1009182     2   0.732      0.712 0.000 0.500 0.172 0.328
#> GSM1009196     1   0.164      0.876 0.948 0.044 0.000 0.008
#> GSM1009071     1   0.205      0.862 0.928 0.064 0.000 0.008
#> GSM1009085     2   0.265      0.551 0.000 0.880 0.000 0.120
#> GSM1009099     1   0.292      0.863 0.860 0.000 0.000 0.140
#> GSM1009113     4   0.573      1.000 0.000 0.064 0.264 0.672
#> GSM1009127     1   0.558      0.345 0.576 0.400 0.000 0.024
#> GSM1009141     1   0.292      0.863 0.860 0.000 0.000 0.140
#> GSM1009155     1   0.164      0.876 0.948 0.044 0.000 0.008
#> GSM1009169     3   0.000      1.000 0.000 0.000 1.000 0.000
#> GSM1009183     2   0.732      0.712 0.000 0.500 0.172 0.328
#> GSM1009197     1   0.164      0.876 0.948 0.044 0.000 0.008
#> GSM1009072     1   0.205      0.862 0.928 0.064 0.000 0.008
#> GSM1009086     2   0.265      0.551 0.000 0.880 0.000 0.120
#> GSM1009100     1   0.292      0.863 0.860 0.000 0.000 0.140
#> GSM1009114     4   0.573      1.000 0.000 0.064 0.264 0.672
#> GSM1009128     2   0.865      0.599 0.076 0.492 0.176 0.256
#> GSM1009142     1   0.292      0.863 0.860 0.000 0.000 0.140
#> GSM1009156     1   0.164      0.876 0.948 0.044 0.000 0.008
#> GSM1009170     3   0.000      1.000 0.000 0.000 1.000 0.000
#> GSM1009184     2   0.732      0.712 0.000 0.500 0.172 0.328
#> GSM1009198     1   0.126      0.876 0.964 0.028 0.000 0.008
#> GSM1009073     1   0.205      0.862 0.928 0.064 0.000 0.008
#> GSM1009087     2   0.559      0.226 0.264 0.680 0.000 0.056
#> GSM1009101     1   0.292      0.863 0.860 0.000 0.000 0.140
#> GSM1009115     4   0.573      1.000 0.000 0.064 0.264 0.672
#> GSM1009129     2   0.739      0.708 0.000 0.484 0.176 0.340
#> GSM1009143     1   0.292      0.863 0.860 0.000 0.000 0.140
#> GSM1009157     1   0.164      0.876 0.948 0.044 0.000 0.008
#> GSM1009171     3   0.000      1.000 0.000 0.000 1.000 0.000
#> GSM1009185     2   0.732      0.712 0.000 0.500 0.172 0.328
#> GSM1009199     1   0.164      0.876 0.948 0.044 0.000 0.008
#> GSM1009074     1   0.205      0.862 0.928 0.064 0.000 0.008
#> GSM1009088     2   0.559      0.226 0.264 0.680 0.000 0.056
#> GSM1009102     1   0.292      0.863 0.860 0.000 0.000 0.140
#> GSM1009116     4   0.573      1.000 0.000 0.064 0.264 0.672
#> GSM1009130     2   0.739      0.708 0.000 0.484 0.176 0.340
#> GSM1009144     1   0.292      0.863 0.860 0.000 0.000 0.140
#> GSM1009158     1   0.349      0.841 0.864 0.092 0.000 0.044
#> GSM1009172     3   0.000      1.000 0.000 0.000 1.000 0.000
#> GSM1009186     2   0.732      0.712 0.000 0.500 0.172 0.328
#> GSM1009200     1   0.164      0.876 0.948 0.044 0.000 0.008
#> GSM1009075     1   0.205      0.862 0.928 0.064 0.000 0.008
#> GSM1009089     2   0.559      0.226 0.264 0.680 0.000 0.056
#> GSM1009103     1   0.292      0.863 0.860 0.000 0.000 0.140
#> GSM1009117     4   0.573      1.000 0.000 0.064 0.264 0.672
#> GSM1009131     2   0.739      0.708 0.000 0.484 0.176 0.340
#> GSM1009145     1   0.292      0.863 0.860 0.000 0.000 0.140
#> GSM1009159     1   0.349      0.841 0.864 0.092 0.000 0.044
#> GSM1009173     3   0.000      1.000 0.000 0.000 1.000 0.000
#> GSM1009187     2   0.732      0.712 0.000 0.500 0.172 0.328
#> GSM1009201     1   0.164      0.876 0.948 0.044 0.000 0.008

show/hide code output

cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#>            class entropy silhouette    p1    p2    p3    p4    p5
#> GSM1009062     1  0.2179      0.623 0.888 0.000 0.000 0.112 0.000
#> GSM1009076     2  0.5221      0.384 0.000 0.552 0.000 0.400 0.048
#> GSM1009090     1  0.4297      0.599 0.528 0.000 0.000 0.472 0.000
#> GSM1009104     5  0.0000      1.000 0.000 0.000 0.000 0.000 1.000
#> GSM1009118     2  0.0566      0.787 0.000 0.984 0.004 0.012 0.000
#> GSM1009132     1  0.4297      0.599 0.528 0.000 0.000 0.472 0.000
#> GSM1009146     1  0.0510      0.661 0.984 0.016 0.000 0.000 0.000
#> GSM1009160     3  0.0000      1.000 0.000 0.000 1.000 0.000 0.000
#> GSM1009174     2  0.0404      0.798 0.000 0.988 0.000 0.000 0.012
#> GSM1009188     1  0.0000      0.659 1.000 0.000 0.000 0.000 0.000
#> GSM1009063     1  0.2179      0.623 0.888 0.000 0.000 0.112 0.000
#> GSM1009077     2  0.5221      0.384 0.000 0.552 0.000 0.400 0.048
#> GSM1009091     1  0.4297      0.599 0.528 0.000 0.000 0.472 0.000
#> GSM1009105     5  0.0000      1.000 0.000 0.000 0.000 0.000 1.000
#> GSM1009119     1  0.4482      0.165 0.612 0.376 0.000 0.012 0.000
#> GSM1009133     1  0.4297      0.599 0.528 0.000 0.000 0.472 0.000
#> GSM1009147     1  0.0510      0.661 0.984 0.016 0.000 0.000 0.000
#> GSM1009161     3  0.0000      1.000 0.000 0.000 1.000 0.000 0.000
#> GSM1009175     2  0.0404      0.798 0.000 0.988 0.000 0.000 0.012
#> GSM1009189     1  0.0510      0.661 0.984 0.016 0.000 0.000 0.000
#> GSM1009064     1  0.2179      0.623 0.888 0.000 0.000 0.112 0.000
#> GSM1009078     4  0.6799      1.000 0.284 0.176 0.000 0.516 0.024
#> GSM1009092     1  0.4297      0.599 0.528 0.000 0.000 0.472 0.000
#> GSM1009106     5  0.0000      1.000 0.000 0.000 0.000 0.000 1.000
#> GSM1009120     1  0.4482      0.165 0.612 0.376 0.000 0.012 0.000
#> GSM1009134     1  0.4297      0.599 0.528 0.000 0.000 0.472 0.000
#> GSM1009148     1  0.0510      0.661 0.984 0.016 0.000 0.000 0.000
#> GSM1009162     3  0.0000      1.000 0.000 0.000 1.000 0.000 0.000
#> GSM1009176     2  0.0404      0.798 0.000 0.988 0.000 0.000 0.012
#> GSM1009190     1  0.0510      0.661 0.984 0.016 0.000 0.000 0.000
#> GSM1009065     1  0.2179      0.623 0.888 0.000 0.000 0.112 0.000
#> GSM1009079     2  0.5221      0.384 0.000 0.552 0.000 0.400 0.048
#> GSM1009093     1  0.4297      0.599 0.528 0.000 0.000 0.472 0.000
#> GSM1009107     5  0.0000      1.000 0.000 0.000 0.000 0.000 1.000
#> GSM1009121     2  0.0566      0.787 0.000 0.984 0.004 0.012 0.000
#> GSM1009135     1  0.4297      0.599 0.528 0.000 0.000 0.472 0.000
#> GSM1009149     1  0.2230      0.562 0.884 0.000 0.000 0.116 0.000
#> GSM1009163     3  0.0000      1.000 0.000 0.000 1.000 0.000 0.000
#> GSM1009177     2  0.0404      0.798 0.000 0.988 0.000 0.000 0.012
#> GSM1009191     1  0.0510      0.661 0.984 0.016 0.000 0.000 0.000
#> GSM1009066     1  0.2179      0.623 0.888 0.000 0.000 0.112 0.000
#> GSM1009080     2  0.5221      0.384 0.000 0.552 0.000 0.400 0.048
#> GSM1009094     1  0.4297      0.599 0.528 0.000 0.000 0.472 0.000
#> GSM1009108     5  0.0000      1.000 0.000 0.000 0.000 0.000 1.000
#> GSM1009122     2  0.0566      0.787 0.000 0.984 0.004 0.012 0.000
#> GSM1009136     1  0.4297      0.599 0.528 0.000 0.000 0.472 0.000
#> GSM1009150     1  0.2230      0.562 0.884 0.000 0.000 0.116 0.000
#> GSM1009164     3  0.0000      1.000 0.000 0.000 1.000 0.000 0.000
#> GSM1009178     2  0.0404      0.798 0.000 0.988 0.000 0.000 0.012
#> GSM1009192     1  0.0162      0.659 0.996 0.004 0.000 0.000 0.000
#> GSM1009067     1  0.2179      0.623 0.888 0.000 0.000 0.112 0.000
#> GSM1009081     2  0.5221      0.384 0.000 0.552 0.000 0.400 0.048
#> GSM1009095     1  0.4297      0.599 0.528 0.000 0.000 0.472 0.000
#> GSM1009109     5  0.0000      1.000 0.000 0.000 0.000 0.000 1.000
#> GSM1009123     1  0.4482      0.165 0.612 0.376 0.000 0.012 0.000
#> GSM1009137     1  0.4297      0.599 0.528 0.000 0.000 0.472 0.000
#> GSM1009151     1  0.0510      0.661 0.984 0.016 0.000 0.000 0.000
#> GSM1009165     3  0.0000      1.000 0.000 0.000 1.000 0.000 0.000
#> GSM1009179     2  0.0404      0.798 0.000 0.988 0.000 0.000 0.012
#> GSM1009193     1  0.0000      0.659 1.000 0.000 0.000 0.000 0.000
#> GSM1009068     1  0.2179      0.623 0.888 0.000 0.000 0.112 0.000
#> GSM1009082     2  0.5221      0.384 0.000 0.552 0.000 0.400 0.048
#> GSM1009096     1  0.4297      0.599 0.528 0.000 0.000 0.472 0.000
#> GSM1009110     5  0.0000      1.000 0.000 0.000 0.000 0.000 1.000
#> GSM1009124     1  0.4527      0.163 0.596 0.392 0.000 0.012 0.000
#> GSM1009138     1  0.4297      0.599 0.528 0.000 0.000 0.472 0.000
#> GSM1009152     1  0.0510      0.661 0.984 0.016 0.000 0.000 0.000
#> GSM1009166     3  0.0000      1.000 0.000 0.000 1.000 0.000 0.000
#> GSM1009180     2  0.0404      0.798 0.000 0.988 0.000 0.000 0.012
#> GSM1009194     1  0.0510      0.661 0.984 0.016 0.000 0.000 0.000
#> GSM1009069     1  0.2179      0.623 0.888 0.000 0.000 0.112 0.000
#> GSM1009083     2  0.5221      0.384 0.000 0.552 0.000 0.400 0.048
#> GSM1009097     1  0.4297      0.599 0.528 0.000 0.000 0.472 0.000
#> GSM1009111     5  0.0000      1.000 0.000 0.000 0.000 0.000 1.000
#> GSM1009125     2  0.0566      0.787 0.000 0.984 0.004 0.012 0.000
#> GSM1009139     1  0.4297      0.599 0.528 0.000 0.000 0.472 0.000
#> GSM1009153     1  0.0510      0.661 0.984 0.016 0.000 0.000 0.000
#> GSM1009167     3  0.0000      1.000 0.000 0.000 1.000 0.000 0.000
#> GSM1009181     2  0.0404      0.798 0.000 0.988 0.000 0.000 0.012
#> GSM1009195     1  0.0510      0.661 0.984 0.016 0.000 0.000 0.000
#> GSM1009070     1  0.2179      0.623 0.888 0.000 0.000 0.112 0.000
#> GSM1009084     2  0.5221      0.384 0.000 0.552 0.000 0.400 0.048
#> GSM1009098     1  0.4297      0.599 0.528 0.000 0.000 0.472 0.000
#> GSM1009112     5  0.0000      1.000 0.000 0.000 0.000 0.000 1.000
#> GSM1009126     1  0.4527      0.163 0.596 0.392 0.000 0.012 0.000
#> GSM1009140     1  0.4297      0.599 0.528 0.000 0.000 0.472 0.000
#> GSM1009154     1  0.0510      0.661 0.984 0.016 0.000 0.000 0.000
#> GSM1009168     3  0.0000      1.000 0.000 0.000 1.000 0.000 0.000
#> GSM1009182     2  0.0404      0.798 0.000 0.988 0.000 0.000 0.012
#> GSM1009196     1  0.0510      0.661 0.984 0.016 0.000 0.000 0.000
#> GSM1009071     1  0.2179      0.623 0.888 0.000 0.000 0.112 0.000
#> GSM1009085     2  0.5221      0.384 0.000 0.552 0.000 0.400 0.048
#> GSM1009099     1  0.4297      0.599 0.528 0.000 0.000 0.472 0.000
#> GSM1009113     5  0.0000      1.000 0.000 0.000 0.000 0.000 1.000
#> GSM1009127     1  0.4482      0.165 0.612 0.376 0.000 0.012 0.000
#> GSM1009141     1  0.4297      0.599 0.528 0.000 0.000 0.472 0.000
#> GSM1009155     1  0.0510      0.661 0.984 0.016 0.000 0.000 0.000
#> GSM1009169     3  0.0000      1.000 0.000 0.000 1.000 0.000 0.000
#> GSM1009183     2  0.0404      0.798 0.000 0.988 0.000 0.000 0.012
#> GSM1009197     1  0.0510      0.661 0.984 0.016 0.000 0.000 0.000
#> GSM1009072     1  0.2179      0.623 0.888 0.000 0.000 0.112 0.000
#> GSM1009086     2  0.5221      0.384 0.000 0.552 0.000 0.400 0.048
#> GSM1009100     1  0.4297      0.599 0.528 0.000 0.000 0.472 0.000
#> GSM1009114     5  0.0000      1.000 0.000 0.000 0.000 0.000 1.000
#> GSM1009128     2  0.2733      0.616 0.112 0.872 0.004 0.012 0.000
#> GSM1009142     1  0.4297      0.599 0.528 0.000 0.000 0.472 0.000
#> GSM1009156     1  0.0510      0.661 0.984 0.016 0.000 0.000 0.000
#> GSM1009170     3  0.0000      1.000 0.000 0.000 1.000 0.000 0.000
#> GSM1009184     2  0.0404      0.798 0.000 0.988 0.000 0.000 0.012
#> GSM1009198     1  0.0000      0.659 1.000 0.000 0.000 0.000 0.000
#> GSM1009073     1  0.2179      0.623 0.888 0.000 0.000 0.112 0.000
#> GSM1009087     4  0.6799      1.000 0.284 0.176 0.000 0.516 0.024
#> GSM1009101     1  0.4297      0.599 0.528 0.000 0.000 0.472 0.000
#> GSM1009115     5  0.0000      1.000 0.000 0.000 0.000 0.000 1.000
#> GSM1009129     2  0.0566      0.787 0.000 0.984 0.004 0.012 0.000
#> GSM1009143     1  0.4297      0.599 0.528 0.000 0.000 0.472 0.000
#> GSM1009157     1  0.0510      0.661 0.984 0.016 0.000 0.000 0.000
#> GSM1009171     3  0.0000      1.000 0.000 0.000 1.000 0.000 0.000
#> GSM1009185     2  0.0404      0.798 0.000 0.988 0.000 0.000 0.012
#> GSM1009199     1  0.0510      0.661 0.984 0.016 0.000 0.000 0.000
#> GSM1009074     1  0.2179      0.623 0.888 0.000 0.000 0.112 0.000
#> GSM1009088     4  0.6799      1.000 0.284 0.176 0.000 0.516 0.024
#> GSM1009102     1  0.4297      0.599 0.528 0.000 0.000 0.472 0.000
#> GSM1009116     5  0.0000      1.000 0.000 0.000 0.000 0.000 1.000
#> GSM1009130     2  0.0566      0.787 0.000 0.984 0.004 0.012 0.000
#> GSM1009144     1  0.4297      0.599 0.528 0.000 0.000 0.472 0.000
#> GSM1009158     1  0.2230      0.562 0.884 0.000 0.000 0.116 0.000
#> GSM1009172     3  0.0000      1.000 0.000 0.000 1.000 0.000 0.000
#> GSM1009186     2  0.0404      0.798 0.000 0.988 0.000 0.000 0.012
#> GSM1009200     1  0.0510      0.661 0.984 0.016 0.000 0.000 0.000
#> GSM1009075     1  0.2179      0.623 0.888 0.000 0.000 0.112 0.000
#> GSM1009089     4  0.6799      1.000 0.284 0.176 0.000 0.516 0.024
#> GSM1009103     1  0.4297      0.599 0.528 0.000 0.000 0.472 0.000
#> GSM1009117     5  0.0000      1.000 0.000 0.000 0.000 0.000 1.000
#> GSM1009131     2  0.0566      0.787 0.000 0.984 0.004 0.012 0.000
#> GSM1009145     1  0.4297      0.599 0.528 0.000 0.000 0.472 0.000
#> GSM1009159     1  0.2230      0.562 0.884 0.000 0.000 0.116 0.000
#> GSM1009173     3  0.0000      1.000 0.000 0.000 1.000 0.000 0.000
#> GSM1009187     2  0.0404      0.798 0.000 0.988 0.000 0.000 0.012
#> GSM1009201     1  0.0510      0.661 0.984 0.016 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
#> GSM1009062     1  0.0865      0.847 0.964 0.000 0.000 0.000 0.000 0.036
#> GSM1009076     6  0.4263      0.729 0.000 0.376 0.000 0.000 0.024 0.600
#> GSM1009090     4  0.0000      1.000 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1009104     5  0.0000      1.000 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM1009118     2  0.0146      0.748 0.000 0.996 0.004 0.000 0.000 0.000
#> GSM1009132     4  0.0000      1.000 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1009146     1  0.2095      0.876 0.904 0.016 0.000 0.076 0.000 0.004
#> GSM1009160     3  0.0000      1.000 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM1009174     2  0.2697      0.836 0.000 0.812 0.000 0.000 0.000 0.188
#> GSM1009188     1  0.1951      0.873 0.908 0.000 0.000 0.076 0.000 0.016
#> GSM1009063     1  0.0865      0.847 0.964 0.000 0.000 0.000 0.000 0.036
#> GSM1009077     6  0.4263      0.729 0.000 0.376 0.000 0.000 0.024 0.600
#> GSM1009091     4  0.0000      1.000 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1009105     5  0.0000      1.000 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM1009119     1  0.5410      0.473 0.520 0.388 0.000 0.076 0.000 0.016
#> GSM1009133     4  0.0000      1.000 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1009147     1  0.2095      0.876 0.904 0.016 0.000 0.076 0.000 0.004
#> GSM1009161     3  0.0000      1.000 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM1009175     2  0.2697      0.836 0.000 0.812 0.000 0.000 0.000 0.188
#> GSM1009189     1  0.1951      0.877 0.908 0.016 0.000 0.076 0.000 0.000
#> GSM1009064     1  0.0865      0.847 0.964 0.000 0.000 0.000 0.000 0.036
#> GSM1009078     6  0.0865      0.555 0.036 0.000 0.000 0.000 0.000 0.964
#> GSM1009092     4  0.0000      1.000 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1009106     5  0.0000      1.000 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM1009120     1  0.5410      0.473 0.520 0.388 0.000 0.076 0.000 0.016
#> GSM1009134     4  0.0000      1.000 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1009148     1  0.2095      0.876 0.904 0.016 0.000 0.076 0.000 0.004
#> GSM1009162     3  0.0000      1.000 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM1009176     2  0.2697      0.836 0.000 0.812 0.000 0.000 0.000 0.188
#> GSM1009190     1  0.1951      0.877 0.908 0.016 0.000 0.076 0.000 0.000
#> GSM1009065     1  0.0865      0.847 0.964 0.000 0.000 0.000 0.000 0.036
#> GSM1009079     6  0.4263      0.729 0.000 0.376 0.000 0.000 0.024 0.600
#> GSM1009093     4  0.0000      1.000 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1009107     5  0.0000      1.000 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM1009121     2  0.0146      0.748 0.000 0.996 0.004 0.000 0.000 0.000
#> GSM1009135     4  0.0000      1.000 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1009149     1  0.3659      0.611 0.636 0.000 0.000 0.000 0.000 0.364
#> GSM1009163     3  0.0000      1.000 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM1009177     2  0.2697      0.836 0.000 0.812 0.000 0.000 0.000 0.188
#> GSM1009191     1  0.1951      0.877 0.908 0.016 0.000 0.076 0.000 0.000
#> GSM1009066     1  0.0865      0.847 0.964 0.000 0.000 0.000 0.000 0.036
#> GSM1009080     6  0.4263      0.729 0.000 0.376 0.000 0.000 0.024 0.600
#> GSM1009094     4  0.0000      1.000 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1009108     5  0.0000      1.000 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM1009122     2  0.0146      0.748 0.000 0.996 0.004 0.000 0.000 0.000
#> GSM1009136     4  0.0000      1.000 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1009150     1  0.3659      0.611 0.636 0.000 0.000 0.000 0.000 0.364
#> GSM1009164     3  0.0000      1.000 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM1009178     2  0.2697      0.836 0.000 0.812 0.000 0.000 0.000 0.188
#> GSM1009192     1  0.2002      0.874 0.908 0.004 0.000 0.076 0.000 0.012
#> GSM1009067     1  0.0865      0.847 0.964 0.000 0.000 0.000 0.000 0.036
#> GSM1009081     6  0.4263      0.729 0.000 0.376 0.000 0.000 0.024 0.600
#> GSM1009095     4  0.0000      1.000 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1009109     5  0.0000      1.000 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM1009123     1  0.5410      0.473 0.520 0.388 0.000 0.076 0.000 0.016
#> GSM1009137     4  0.0000      1.000 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1009151     1  0.2095      0.876 0.904 0.016 0.000 0.076 0.000 0.004
#> GSM1009165     3  0.0000      1.000 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM1009179     2  0.2697      0.836 0.000 0.812 0.000 0.000 0.000 0.188
#> GSM1009193     1  0.1951      0.873 0.908 0.000 0.000 0.076 0.000 0.016
#> GSM1009068     1  0.0865      0.847 0.964 0.000 0.000 0.000 0.000 0.036
#> GSM1009082     6  0.4263      0.729 0.000 0.376 0.000 0.000 0.024 0.600
#> GSM1009096     4  0.0000      1.000 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1009110     5  0.0000      1.000 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM1009124     1  0.5034      0.471 0.520 0.404 0.000 0.076 0.000 0.000
#> GSM1009138     4  0.0000      1.000 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1009152     1  0.2095      0.876 0.904 0.016 0.000 0.076 0.000 0.004
#> GSM1009166     3  0.0000      1.000 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM1009180     2  0.2697      0.836 0.000 0.812 0.000 0.000 0.000 0.188
#> GSM1009194     1  0.1951      0.877 0.908 0.016 0.000 0.076 0.000 0.000
#> GSM1009069     1  0.0865      0.847 0.964 0.000 0.000 0.000 0.000 0.036
#> GSM1009083     6  0.4263      0.729 0.000 0.376 0.000 0.000 0.024 0.600
#> GSM1009097     4  0.0000      1.000 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1009111     5  0.0000      1.000 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM1009125     2  0.0146      0.748 0.000 0.996 0.004 0.000 0.000 0.000
#> GSM1009139     4  0.0000      1.000 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1009153     1  0.2095      0.876 0.904 0.016 0.000 0.076 0.000 0.004
#> GSM1009167     3  0.0000      1.000 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM1009181     2  0.2697      0.836 0.000 0.812 0.000 0.000 0.000 0.188
#> GSM1009195     1  0.1951      0.877 0.908 0.016 0.000 0.076 0.000 0.000
#> GSM1009070     1  0.0865      0.847 0.964 0.000 0.000 0.000 0.000 0.036
#> GSM1009084     6  0.4263      0.729 0.000 0.376 0.000 0.000 0.024 0.600
#> GSM1009098     4  0.0000      1.000 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1009112     5  0.0000      1.000 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM1009126     1  0.5034      0.471 0.520 0.404 0.000 0.076 0.000 0.000
#> GSM1009140     4  0.0000      1.000 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1009154     1  0.2095      0.876 0.904 0.016 0.000 0.076 0.000 0.004
#> GSM1009168     3  0.0000      1.000 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM1009182     2  0.2697      0.836 0.000 0.812 0.000 0.000 0.000 0.188
#> GSM1009196     1  0.1951      0.877 0.908 0.016 0.000 0.076 0.000 0.000
#> GSM1009071     1  0.0865      0.847 0.964 0.000 0.000 0.000 0.000 0.036
#> GSM1009085     6  0.4263      0.729 0.000 0.376 0.000 0.000 0.024 0.600
#> GSM1009099     4  0.0000      1.000 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1009113     5  0.0000      1.000 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM1009127     1  0.5410      0.473 0.520 0.388 0.000 0.076 0.000 0.016
#> GSM1009141     4  0.0000      1.000 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1009155     1  0.2095      0.876 0.904 0.016 0.000 0.076 0.000 0.004
#> GSM1009169     3  0.0000      1.000 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM1009183     2  0.2697      0.836 0.000 0.812 0.000 0.000 0.000 0.188
#> GSM1009197     1  0.1951      0.877 0.908 0.016 0.000 0.076 0.000 0.000
#> GSM1009072     1  0.0865      0.847 0.964 0.000 0.000 0.000 0.000 0.036
#> GSM1009086     6  0.4263      0.729 0.000 0.376 0.000 0.000 0.024 0.600
#> GSM1009100     4  0.0000      1.000 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1009114     5  0.0000      1.000 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM1009128     2  0.2493      0.554 0.036 0.884 0.004 0.076 0.000 0.000
#> GSM1009142     4  0.0000      1.000 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1009156     1  0.2095      0.876 0.904 0.016 0.000 0.076 0.000 0.004
#> GSM1009170     3  0.0000      1.000 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM1009184     2  0.2697      0.836 0.000 0.812 0.000 0.000 0.000 0.188
#> GSM1009198     1  0.1951      0.873 0.908 0.000 0.000 0.076 0.000 0.016
#> GSM1009073     1  0.0865      0.847 0.964 0.000 0.000 0.000 0.000 0.036
#> GSM1009087     6  0.0865      0.555 0.036 0.000 0.000 0.000 0.000 0.964
#> GSM1009101     4  0.0000      1.000 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1009115     5  0.0000      1.000 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM1009129     2  0.0146      0.748 0.000 0.996 0.004 0.000 0.000 0.000
#> GSM1009143     4  0.0000      1.000 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1009157     1  0.2095      0.876 0.904 0.016 0.000 0.076 0.000 0.004
#> GSM1009171     3  0.0000      1.000 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM1009185     2  0.2697      0.836 0.000 0.812 0.000 0.000 0.000 0.188
#> GSM1009199     1  0.1951      0.877 0.908 0.016 0.000 0.076 0.000 0.000
#> GSM1009074     1  0.0865      0.847 0.964 0.000 0.000 0.000 0.000 0.036
#> GSM1009088     6  0.0865      0.555 0.036 0.000 0.000 0.000 0.000 0.964
#> GSM1009102     4  0.0000      1.000 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1009116     5  0.0000      1.000 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM1009130     2  0.0146      0.748 0.000 0.996 0.004 0.000 0.000 0.000
#> GSM1009144     4  0.0000      1.000 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1009158     1  0.3659      0.611 0.636 0.000 0.000 0.000 0.000 0.364
#> GSM1009172     3  0.0000      1.000 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM1009186     2  0.2697      0.836 0.000 0.812 0.000 0.000 0.000 0.188
#> GSM1009200     1  0.1951      0.877 0.908 0.016 0.000 0.076 0.000 0.000
#> GSM1009075     1  0.0865      0.847 0.964 0.000 0.000 0.000 0.000 0.036
#> GSM1009089     6  0.0865      0.555 0.036 0.000 0.000 0.000 0.000 0.964
#> GSM1009103     4  0.0000      1.000 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1009117     5  0.0000      1.000 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM1009131     2  0.0146      0.748 0.000 0.996 0.004 0.000 0.000 0.000
#> GSM1009145     4  0.0000      1.000 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1009159     1  0.3659      0.611 0.636 0.000 0.000 0.000 0.000 0.364
#> GSM1009173     3  0.0000      1.000 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM1009187     2  0.2697      0.836 0.000 0.812 0.000 0.000 0.000 0.188
#> GSM1009201     1  0.1951      0.877 0.908 0.016 0.000 0.076 0.000 0.000

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

consensus_heatmap(res, k = 2)

plot of chunk tab-MAD-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 temperature(p) time(p) specimen(p) k
#> MAD:hclust 130          0.996       1    1.19e-23 2
#> MAD:hclust 130          1.000       1    7.50e-45 3
#> MAD:hclust 130          1.000       1    5.41e-66 4
#> MAD:hclust 124          0.966       1    3.02e-82 5
#> MAD:hclust 134          1.000       1   2.83e-112 6

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


MAD:kmeans

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

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

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

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

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

collect_plots(res)

plot of chunk MAD-kmeans-collect-plots

The plots are:

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

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

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

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

select_partition_number(res)

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

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

get_stats(res)
#>   k 1-PAC mean_silhouette concordance area_increased  Rand Jaccard
#> 2 2 0.483           0.895       0.902         0.4493 0.501   0.501
#> 3 3 0.444           0.499       0.673         0.3604 0.884   0.774
#> 4 4 0.460           0.633       0.698         0.1329 0.763   0.495
#> 5 5 0.494           0.472       0.622         0.0881 0.977   0.922
#> 6 6 0.641           0.675       0.646         0.0483 0.897   0.636

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
#> GSM1009062     1  0.3733      0.938 0.928 0.072
#> GSM1009076     2  0.6623      0.888 0.172 0.828
#> GSM1009090     1  0.1414      0.949 0.980 0.020
#> GSM1009104     2  0.4431      0.885 0.092 0.908
#> GSM1009118     2  0.9686      0.588 0.396 0.604
#> GSM1009132     1  0.1414      0.949 0.980 0.020
#> GSM1009146     1  0.2236      0.955 0.964 0.036
#> GSM1009160     2  0.2948      0.853 0.052 0.948
#> GSM1009174     2  0.7376      0.880 0.208 0.792
#> GSM1009188     1  0.2603      0.955 0.956 0.044
#> GSM1009063     1  0.3733      0.938 0.928 0.072
#> GSM1009077     2  0.6623      0.888 0.172 0.828
#> GSM1009091     1  0.1414      0.949 0.980 0.020
#> GSM1009105     2  0.4431      0.885 0.092 0.908
#> GSM1009119     1  0.2423      0.955 0.960 0.040
#> GSM1009133     1  0.1414      0.949 0.980 0.020
#> GSM1009147     1  0.2236      0.955 0.964 0.036
#> GSM1009161     2  0.2948      0.853 0.052 0.948
#> GSM1009175     2  0.7376      0.880 0.208 0.792
#> GSM1009189     1  0.2603      0.955 0.956 0.044
#> GSM1009064     1  0.3733      0.938 0.928 0.072
#> GSM1009078     2  0.7950      0.831 0.240 0.760
#> GSM1009092     1  0.1414      0.949 0.980 0.020
#> GSM1009106     2  0.4431      0.885 0.092 0.908
#> GSM1009120     1  0.2423      0.955 0.960 0.040
#> GSM1009134     1  0.1414      0.949 0.980 0.020
#> GSM1009148     1  0.2236      0.955 0.964 0.036
#> GSM1009162     2  0.2948      0.853 0.052 0.948
#> GSM1009176     2  0.7376      0.880 0.208 0.792
#> GSM1009190     1  0.2603      0.955 0.956 0.044
#> GSM1009065     1  0.3733      0.938 0.928 0.072
#> GSM1009079     2  0.6623      0.888 0.172 0.828
#> GSM1009093     1  0.1414      0.949 0.980 0.020
#> GSM1009107     2  0.4431      0.885 0.092 0.908
#> GSM1009121     2  0.8861      0.765 0.304 0.696
#> GSM1009135     1  0.1414      0.949 0.980 0.020
#> GSM1009149     1  0.2236      0.955 0.964 0.036
#> GSM1009163     2  0.2948      0.853 0.052 0.948
#> GSM1009177     2  0.7376      0.880 0.208 0.792
#> GSM1009191     1  0.2603      0.955 0.956 0.044
#> GSM1009066     1  0.3733      0.938 0.928 0.072
#> GSM1009080     2  0.6623      0.888 0.172 0.828
#> GSM1009094     1  0.1414      0.949 0.980 0.020
#> GSM1009108     2  0.4431      0.885 0.092 0.908
#> GSM1009122     2  0.7528      0.869 0.216 0.784
#> GSM1009136     1  0.1414      0.949 0.980 0.020
#> GSM1009150     1  0.2236      0.955 0.964 0.036
#> GSM1009164     2  0.2948      0.853 0.052 0.948
#> GSM1009178     2  0.7376      0.880 0.208 0.792
#> GSM1009192     1  0.2603      0.955 0.956 0.044
#> GSM1009067     1  0.3733      0.938 0.928 0.072
#> GSM1009081     2  0.6623      0.888 0.172 0.828
#> GSM1009095     1  0.0938      0.950 0.988 0.012
#> GSM1009109     2  0.4431      0.885 0.092 0.908
#> GSM1009123     1  0.2778      0.953 0.952 0.048
#> GSM1009137     1  0.1414      0.949 0.980 0.020
#> GSM1009151     1  0.2236      0.955 0.964 0.036
#> GSM1009165     2  0.2948      0.853 0.052 0.948
#> GSM1009179     2  0.7376      0.880 0.208 0.792
#> GSM1009193     1  0.2603      0.955 0.956 0.044
#> GSM1009068     1  0.3733      0.938 0.928 0.072
#> GSM1009082     2  0.6623      0.888 0.172 0.828
#> GSM1009096     1  0.1414      0.949 0.980 0.020
#> GSM1009110     2  0.4431      0.885 0.092 0.908
#> GSM1009124     1  0.2948      0.952 0.948 0.052
#> GSM1009138     1  0.1414      0.949 0.980 0.020
#> GSM1009152     1  0.2236      0.955 0.964 0.036
#> GSM1009166     2  0.2948      0.853 0.052 0.948
#> GSM1009180     2  0.7376      0.880 0.208 0.792
#> GSM1009194     1  0.2603      0.955 0.956 0.044
#> GSM1009069     1  0.3733      0.938 0.928 0.072
#> GSM1009083     2  0.6623      0.888 0.172 0.828
#> GSM1009097     1  0.1414      0.949 0.980 0.020
#> GSM1009111     2  0.4431      0.885 0.092 0.908
#> GSM1009125     2  0.7528      0.869 0.216 0.784
#> GSM1009139     1  0.1414      0.949 0.980 0.020
#> GSM1009153     1  0.2236      0.955 0.964 0.036
#> GSM1009167     2  0.2948      0.853 0.052 0.948
#> GSM1009181     2  0.7376      0.880 0.208 0.792
#> GSM1009195     1  0.9661      0.178 0.608 0.392
#> GSM1009070     1  0.3733      0.938 0.928 0.072
#> GSM1009084     2  0.6623      0.888 0.172 0.828
#> GSM1009098     1  0.1414      0.949 0.980 0.020
#> GSM1009112     2  0.4431      0.885 0.092 0.908
#> GSM1009126     1  0.2948      0.952 0.948 0.052
#> GSM1009140     1  0.1414      0.949 0.980 0.020
#> GSM1009154     1  0.2236      0.955 0.964 0.036
#> GSM1009168     2  0.2948      0.853 0.052 0.948
#> GSM1009182     2  0.7376      0.880 0.208 0.792
#> GSM1009196     1  0.2603      0.955 0.956 0.044
#> GSM1009071     1  0.3733      0.938 0.928 0.072
#> GSM1009085     2  0.6623      0.888 0.172 0.828
#> GSM1009099     1  0.1414      0.949 0.980 0.020
#> GSM1009113     2  0.4431      0.885 0.092 0.908
#> GSM1009127     1  0.2423      0.955 0.960 0.040
#> GSM1009141     1  0.1414      0.949 0.980 0.020
#> GSM1009155     1  0.2236      0.955 0.964 0.036
#> GSM1009169     2  0.2948      0.853 0.052 0.948
#> GSM1009183     2  0.7376      0.880 0.208 0.792
#> GSM1009197     1  0.2603      0.955 0.956 0.044
#> GSM1009072     1  0.3733      0.938 0.928 0.072
#> GSM1009086     2  0.6623      0.888 0.172 0.828
#> GSM1009100     1  0.1414      0.949 0.980 0.020
#> GSM1009114     2  0.4431      0.885 0.092 0.908
#> GSM1009128     2  0.9909      0.473 0.444 0.556
#> GSM1009142     1  0.1414      0.949 0.980 0.020
#> GSM1009156     1  0.2236      0.955 0.964 0.036
#> GSM1009170     2  0.2948      0.853 0.052 0.948
#> GSM1009184     2  0.7376      0.880 0.208 0.792
#> GSM1009198     1  0.2603      0.955 0.956 0.044
#> GSM1009073     1  0.3733      0.938 0.928 0.072
#> GSM1009087     2  0.7950      0.831 0.240 0.760
#> GSM1009101     1  0.1414      0.949 0.980 0.020
#> GSM1009115     2  0.4431      0.885 0.092 0.908
#> GSM1009129     2  0.7056      0.882 0.192 0.808
#> GSM1009143     1  0.1414      0.949 0.980 0.020
#> GSM1009157     1  0.3879      0.922 0.924 0.076
#> GSM1009171     2  0.2948      0.853 0.052 0.948
#> GSM1009185     2  0.9427      0.672 0.360 0.640
#> GSM1009199     1  0.6887      0.768 0.816 0.184
#> GSM1009074     1  0.3733      0.938 0.928 0.072
#> GSM1009088     2  0.6623      0.888 0.172 0.828
#> GSM1009102     1  0.1414      0.949 0.980 0.020
#> GSM1009116     2  0.4431      0.885 0.092 0.908
#> GSM1009130     2  0.6712      0.887 0.176 0.824
#> GSM1009144     1  0.1414      0.949 0.980 0.020
#> GSM1009158     1  0.2236      0.955 0.964 0.036
#> GSM1009172     2  0.2948      0.853 0.052 0.948
#> GSM1009186     2  0.7376      0.880 0.208 0.792
#> GSM1009200     1  0.2603      0.955 0.956 0.044
#> GSM1009075     1  0.3733      0.938 0.928 0.072
#> GSM1009089     1  0.8713      0.575 0.708 0.292
#> GSM1009103     1  0.1414      0.949 0.980 0.020
#> GSM1009117     2  0.4431      0.885 0.092 0.908
#> GSM1009131     2  0.9661      0.605 0.392 0.608
#> GSM1009145     1  0.1414      0.949 0.980 0.020
#> GSM1009159     1  0.2236      0.955 0.964 0.036
#> GSM1009173     2  0.2948      0.853 0.052 0.948
#> GSM1009187     2  0.9815      0.538 0.420 0.580
#> GSM1009201     1  0.2603      0.955 0.956 0.044

show/hide code output

cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#>            class entropy silhouette    p1    p2    p3
#> GSM1009062     3  0.7067    0.88029 0.468 0.020 0.512
#> GSM1009076     2  0.5843    0.75188 0.016 0.732 0.252
#> GSM1009090     1  0.0237    0.44559 0.996 0.004 0.000
#> GSM1009104     2  0.1337    0.76243 0.012 0.972 0.016
#> GSM1009118     2  0.9759    0.37185 0.284 0.444 0.272
#> GSM1009132     1  0.3644    0.34036 0.872 0.004 0.124
#> GSM1009146     1  0.6282    0.01635 0.612 0.004 0.384
#> GSM1009160     2  0.5578    0.70143 0.012 0.748 0.240
#> GSM1009174     2  0.7600    0.71723 0.056 0.600 0.344
#> GSM1009188     1  0.5656    0.32684 0.712 0.004 0.284
#> GSM1009063     3  0.7067    0.88029 0.468 0.020 0.512
#> GSM1009077     2  0.5843    0.75188 0.016 0.732 0.252
#> GSM1009091     1  0.0237    0.44559 0.996 0.004 0.000
#> GSM1009105     2  0.1337    0.76243 0.012 0.972 0.016
#> GSM1009119     1  0.5465    0.32696 0.712 0.000 0.288
#> GSM1009133     1  0.3644    0.34036 0.872 0.004 0.124
#> GSM1009147     1  0.6314    0.02104 0.604 0.004 0.392
#> GSM1009161     2  0.5578    0.70143 0.012 0.748 0.240
#> GSM1009175     2  0.7685    0.71461 0.060 0.596 0.344
#> GSM1009189     1  0.5656    0.32684 0.712 0.004 0.284
#> GSM1009064     3  0.7067    0.88029 0.468 0.020 0.512
#> GSM1009078     2  0.8355    0.52339 0.084 0.508 0.408
#> GSM1009092     1  0.0237    0.44559 0.996 0.004 0.000
#> GSM1009106     2  0.1337    0.76243 0.012 0.972 0.016
#> GSM1009120     1  0.5465    0.32696 0.712 0.000 0.288
#> GSM1009134     1  0.3644    0.34036 0.872 0.004 0.124
#> GSM1009148     1  0.6282    0.01635 0.612 0.004 0.384
#> GSM1009162     2  0.5578    0.70143 0.012 0.748 0.240
#> GSM1009176     2  0.7537    0.72474 0.056 0.612 0.332
#> GSM1009190     1  0.5656    0.32684 0.712 0.004 0.284
#> GSM1009065     3  0.7067    0.88029 0.468 0.020 0.512
#> GSM1009079     2  0.5763    0.75391 0.016 0.740 0.244
#> GSM1009093     1  0.0237    0.44559 0.996 0.004 0.000
#> GSM1009107     2  0.1337    0.76243 0.012 0.972 0.016
#> GSM1009121     1  0.9843   -0.25293 0.380 0.372 0.248
#> GSM1009135     1  0.3644    0.34036 0.872 0.004 0.124
#> GSM1009149     1  0.6264    0.03020 0.616 0.004 0.380
#> GSM1009163     2  0.5578    0.70143 0.012 0.748 0.240
#> GSM1009177     2  0.7537    0.72474 0.056 0.612 0.332
#> GSM1009191     1  0.5722    0.31076 0.704 0.004 0.292
#> GSM1009066     3  0.7067    0.88029 0.468 0.020 0.512
#> GSM1009080     2  0.5803    0.75293 0.016 0.736 0.248
#> GSM1009094     1  0.0237    0.44559 0.996 0.004 0.000
#> GSM1009108     2  0.1337    0.76243 0.012 0.972 0.016
#> GSM1009122     2  0.8201    0.70739 0.112 0.612 0.276
#> GSM1009136     1  0.3272    0.35691 0.892 0.004 0.104
#> GSM1009150     1  0.6264    0.03020 0.616 0.004 0.380
#> GSM1009164     2  0.5578    0.70143 0.012 0.748 0.240
#> GSM1009178     2  0.7920    0.69508 0.068 0.572 0.360
#> GSM1009192     1  0.5656    0.32684 0.712 0.004 0.284
#> GSM1009067     3  0.7067    0.88029 0.468 0.020 0.512
#> GSM1009081     2  0.5843    0.75188 0.016 0.732 0.252
#> GSM1009095     1  0.0237    0.44559 0.996 0.004 0.000
#> GSM1009109     2  0.1337    0.76243 0.012 0.972 0.016
#> GSM1009123     1  0.5254    0.34239 0.736 0.000 0.264
#> GSM1009137     1  0.3644    0.34036 0.872 0.004 0.124
#> GSM1009151     1  0.6282    0.01635 0.612 0.004 0.384
#> GSM1009165     2  0.5578    0.70143 0.012 0.748 0.240
#> GSM1009179     2  0.7841    0.69851 0.064 0.576 0.360
#> GSM1009193     1  0.5656    0.32684 0.712 0.004 0.284
#> GSM1009068     3  0.7069    0.86512 0.472 0.020 0.508
#> GSM1009082     2  0.5843    0.75188 0.016 0.732 0.252
#> GSM1009096     1  0.0237    0.44559 0.996 0.004 0.000
#> GSM1009110     2  0.1337    0.76243 0.012 0.972 0.016
#> GSM1009124     1  0.5678    0.28730 0.684 0.000 0.316
#> GSM1009138     1  0.3644    0.34036 0.872 0.004 0.124
#> GSM1009152     1  0.6282    0.01635 0.612 0.004 0.384
#> GSM1009166     2  0.5578    0.70143 0.012 0.748 0.240
#> GSM1009180     2  0.7920    0.69508 0.068 0.572 0.360
#> GSM1009194     1  0.5785    0.29597 0.696 0.004 0.300
#> GSM1009069     3  0.7043    0.70319 0.400 0.024 0.576
#> GSM1009083     2  0.5843    0.75188 0.016 0.732 0.252
#> GSM1009097     1  0.0237    0.44559 0.996 0.004 0.000
#> GSM1009111     2  0.1337    0.76243 0.012 0.972 0.016
#> GSM1009125     2  0.7770    0.72994 0.088 0.640 0.272
#> GSM1009139     1  0.3644    0.34036 0.872 0.004 0.124
#> GSM1009153     1  0.6282    0.01635 0.612 0.004 0.384
#> GSM1009167     2  0.5578    0.70143 0.012 0.748 0.240
#> GSM1009181     2  0.7537    0.72474 0.056 0.612 0.332
#> GSM1009195     1  0.9129   -0.11192 0.480 0.148 0.372
#> GSM1009070     1  0.7075   -0.80106 0.492 0.020 0.488
#> GSM1009084     2  0.5843    0.75188 0.016 0.732 0.252
#> GSM1009098     1  0.0237    0.44559 0.996 0.004 0.000
#> GSM1009112     2  0.1337    0.76243 0.012 0.972 0.016
#> GSM1009126     1  0.5706    0.28689 0.680 0.000 0.320
#> GSM1009140     1  0.3644    0.34036 0.872 0.004 0.124
#> GSM1009154     1  0.6282    0.01635 0.612 0.004 0.384
#> GSM1009168     2  0.5578    0.70143 0.012 0.748 0.240
#> GSM1009182     2  0.7705    0.71191 0.060 0.592 0.348
#> GSM1009196     1  0.5722    0.31076 0.704 0.004 0.292
#> GSM1009071     3  0.7067    0.88029 0.468 0.020 0.512
#> GSM1009085     2  0.5843    0.75188 0.016 0.732 0.252
#> GSM1009099     1  0.0237    0.44559 0.996 0.004 0.000
#> GSM1009113     2  0.1337    0.76243 0.012 0.972 0.016
#> GSM1009127     1  0.5497    0.32678 0.708 0.000 0.292
#> GSM1009141     1  0.3644    0.34036 0.872 0.004 0.124
#> GSM1009155     1  0.6282    0.01635 0.612 0.004 0.384
#> GSM1009169     2  0.5578    0.70143 0.012 0.748 0.240
#> GSM1009183     2  0.7537    0.72474 0.056 0.612 0.332
#> GSM1009197     1  0.5656    0.32684 0.712 0.004 0.284
#> GSM1009072     3  0.7067    0.88029 0.468 0.020 0.512
#> GSM1009086     2  0.5843    0.75188 0.016 0.732 0.252
#> GSM1009100     1  0.0237    0.44559 0.996 0.004 0.000
#> GSM1009114     2  0.1337    0.76243 0.012 0.972 0.016
#> GSM1009128     1  0.9641   -0.00446 0.456 0.316 0.228
#> GSM1009142     1  0.3644    0.34036 0.872 0.004 0.124
#> GSM1009156     1  0.6661   -0.01174 0.588 0.012 0.400
#> GSM1009170     2  0.5578    0.70143 0.012 0.748 0.240
#> GSM1009184     2  0.7685    0.71461 0.060 0.596 0.344
#> GSM1009198     1  0.5656    0.32684 0.712 0.004 0.284
#> GSM1009073     3  0.7067    0.88029 0.468 0.020 0.512
#> GSM1009087     2  0.8355    0.52339 0.084 0.508 0.408
#> GSM1009101     1  0.0237    0.44559 0.996 0.004 0.000
#> GSM1009115     2  0.1337    0.76243 0.012 0.972 0.016
#> GSM1009129     2  0.6904    0.75037 0.048 0.684 0.268
#> GSM1009143     1  0.3644    0.34036 0.872 0.004 0.124
#> GSM1009157     1  0.7293   -0.21365 0.496 0.028 0.476
#> GSM1009171     2  0.5578    0.70143 0.012 0.748 0.240
#> GSM1009185     2  0.9217    0.52659 0.152 0.448 0.400
#> GSM1009199     1  0.7141    0.11222 0.600 0.032 0.368
#> GSM1009074     3  0.7067    0.88029 0.468 0.020 0.512
#> GSM1009088     2  0.8220    0.53691 0.076 0.516 0.408
#> GSM1009102     1  0.0237    0.44559 0.996 0.004 0.000
#> GSM1009116     2  0.1337    0.76243 0.012 0.972 0.016
#> GSM1009130     2  0.6201    0.76232 0.044 0.748 0.208
#> GSM1009144     1  0.3644    0.34036 0.872 0.004 0.124
#> GSM1009158     1  0.6264    0.03020 0.616 0.004 0.380
#> GSM1009172     2  0.5578    0.70143 0.012 0.748 0.240
#> GSM1009186     2  0.7685    0.71461 0.060 0.596 0.344
#> GSM1009200     1  0.5656    0.32684 0.712 0.004 0.284
#> GSM1009075     3  0.7067    0.88029 0.468 0.020 0.512
#> GSM1009089     3  0.9693    0.17064 0.292 0.252 0.456
#> GSM1009103     1  0.0237    0.44559 0.996 0.004 0.000
#> GSM1009117     2  0.1337    0.76243 0.012 0.972 0.016
#> GSM1009131     2  0.9907    0.18277 0.356 0.376 0.268
#> GSM1009145     1  0.3272    0.35691 0.892 0.004 0.104
#> GSM1009159     1  0.6247    0.04216 0.620 0.004 0.376
#> GSM1009173     2  0.5578    0.70143 0.012 0.748 0.240
#> GSM1009187     2  0.9221    0.52101 0.152 0.444 0.404
#> GSM1009201     1  0.5656    0.32684 0.712 0.004 0.284

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>            class entropy silhouette    p1    p2    p3    p4
#> GSM1009062     1   0.761     0.4880 0.612 0.068 0.112 0.208
#> GSM1009076     2   0.166     0.6014 0.052 0.944 0.000 0.004
#> GSM1009090     4   0.501     0.8171 0.320 0.004 0.008 0.668
#> GSM1009104     2   0.577     0.2865 0.004 0.676 0.264 0.056
#> GSM1009118     2   0.853     0.2407 0.348 0.452 0.080 0.120
#> GSM1009132     4   0.610     0.8185 0.212 0.000 0.116 0.672
#> GSM1009146     1   0.171     0.6789 0.952 0.004 0.020 0.024
#> GSM1009160     3   0.576     0.9877 0.020 0.328 0.636 0.016
#> GSM1009174     2   0.707     0.5948 0.156 0.668 0.112 0.064
#> GSM1009188     1   0.378     0.6483 0.856 0.016 0.024 0.104
#> GSM1009063     1   0.761     0.4880 0.612 0.068 0.112 0.208
#> GSM1009077     2   0.166     0.6014 0.052 0.944 0.000 0.004
#> GSM1009091     4   0.501     0.8171 0.320 0.004 0.008 0.668
#> GSM1009105     2   0.577     0.2865 0.004 0.676 0.264 0.056
#> GSM1009119     1   0.436     0.6395 0.828 0.016 0.044 0.112
#> GSM1009133     4   0.610     0.8185 0.212 0.000 0.116 0.672
#> GSM1009147     1   0.125     0.6806 0.968 0.004 0.016 0.012
#> GSM1009161     3   0.576     0.9877 0.020 0.328 0.636 0.016
#> GSM1009175     2   0.707     0.5948 0.156 0.668 0.112 0.064
#> GSM1009189     1   0.378     0.6483 0.856 0.016 0.024 0.104
#> GSM1009064     1   0.761     0.4880 0.612 0.068 0.112 0.208
#> GSM1009078     2   0.375     0.5684 0.196 0.800 0.000 0.004
#> GSM1009092     4   0.501     0.8171 0.320 0.004 0.008 0.668
#> GSM1009106     2   0.577     0.2865 0.004 0.676 0.264 0.056
#> GSM1009120     1   0.394     0.6521 0.848 0.016 0.028 0.108
#> GSM1009134     4   0.610     0.8185 0.212 0.000 0.116 0.672
#> GSM1009148     1   0.171     0.6789 0.952 0.004 0.020 0.024
#> GSM1009162     3   0.519     0.9883 0.020 0.324 0.656 0.000
#> GSM1009176     2   0.703     0.5955 0.152 0.672 0.112 0.064
#> GSM1009190     1   0.378     0.6483 0.856 0.016 0.024 0.104
#> GSM1009065     1   0.761     0.4880 0.612 0.068 0.112 0.208
#> GSM1009079     2   0.166     0.6014 0.052 0.944 0.000 0.004
#> GSM1009093     4   0.501     0.8171 0.320 0.004 0.008 0.668
#> GSM1009107     2   0.577     0.2865 0.004 0.676 0.264 0.056
#> GSM1009121     1   0.869     0.0739 0.444 0.336 0.080 0.140
#> GSM1009135     4   0.610     0.8185 0.212 0.000 0.116 0.672
#> GSM1009149     1   0.181     0.6760 0.948 0.004 0.020 0.028
#> GSM1009163     3   0.576     0.9877 0.020 0.328 0.636 0.016
#> GSM1009177     2   0.703     0.5955 0.152 0.672 0.112 0.064
#> GSM1009191     1   0.378     0.6483 0.856 0.016 0.024 0.104
#> GSM1009066     1   0.761     0.4880 0.612 0.068 0.112 0.208
#> GSM1009080     2   0.166     0.6014 0.052 0.944 0.000 0.004
#> GSM1009094     4   0.501     0.8171 0.320 0.004 0.008 0.668
#> GSM1009108     2   0.577     0.2865 0.004 0.676 0.264 0.056
#> GSM1009122     2   0.768     0.4922 0.220 0.604 0.096 0.080
#> GSM1009136     4   0.627     0.8194 0.240 0.000 0.112 0.648
#> GSM1009150     1   0.181     0.6760 0.948 0.004 0.020 0.028
#> GSM1009164     3   0.576     0.9877 0.020 0.328 0.636 0.016
#> GSM1009178     2   0.723     0.5878 0.172 0.652 0.112 0.064
#> GSM1009192     1   0.372     0.6493 0.860 0.016 0.024 0.100
#> GSM1009067     1   0.761     0.4880 0.612 0.068 0.112 0.208
#> GSM1009081     2   0.166     0.6014 0.052 0.944 0.000 0.004
#> GSM1009095     4   0.501     0.8171 0.320 0.004 0.008 0.668
#> GSM1009109     2   0.577     0.2865 0.004 0.676 0.264 0.056
#> GSM1009123     1   0.453     0.6338 0.820 0.020 0.044 0.116
#> GSM1009137     4   0.610     0.8185 0.212 0.000 0.116 0.672
#> GSM1009151     1   0.171     0.6789 0.952 0.004 0.020 0.024
#> GSM1009165     3   0.519     0.9883 0.020 0.324 0.656 0.000
#> GSM1009179     2   0.723     0.5878 0.172 0.652 0.112 0.064
#> GSM1009193     1   0.368     0.6492 0.860 0.016 0.020 0.104
#> GSM1009068     1   0.748     0.4862 0.620 0.060 0.112 0.208
#> GSM1009082     2   0.166     0.6014 0.052 0.944 0.000 0.004
#> GSM1009096     4   0.501     0.8171 0.320 0.004 0.008 0.668
#> GSM1009110     2   0.577     0.2865 0.004 0.676 0.264 0.056
#> GSM1009124     1   0.617     0.5645 0.732 0.068 0.060 0.140
#> GSM1009138     4   0.610     0.8185 0.212 0.000 0.116 0.672
#> GSM1009152     1   0.171     0.6789 0.952 0.004 0.020 0.024
#> GSM1009166     3   0.519     0.9883 0.020 0.324 0.656 0.000
#> GSM1009180     2   0.723     0.5878 0.172 0.652 0.112 0.064
#> GSM1009194     1   0.378     0.6483 0.856 0.016 0.024 0.104
#> GSM1009069     1   0.761     0.4939 0.616 0.072 0.112 0.200
#> GSM1009083     2   0.166     0.6014 0.052 0.944 0.000 0.004
#> GSM1009097     4   0.501     0.8171 0.320 0.004 0.008 0.668
#> GSM1009111     2   0.577     0.2865 0.004 0.676 0.264 0.056
#> GSM1009125     2   0.758     0.4993 0.200 0.620 0.100 0.080
#> GSM1009139     4   0.610     0.8185 0.212 0.000 0.116 0.672
#> GSM1009153     1   0.171     0.6789 0.952 0.004 0.020 0.024
#> GSM1009167     3   0.563     0.9837 0.020 0.324 0.644 0.012
#> GSM1009181     2   0.703     0.5955 0.152 0.672 0.112 0.064
#> GSM1009195     1   0.576     0.6094 0.748 0.132 0.024 0.096
#> GSM1009070     1   0.703     0.4867 0.644 0.036 0.112 0.208
#> GSM1009084     2   0.166     0.6014 0.052 0.944 0.000 0.004
#> GSM1009098     4   0.501     0.8171 0.320 0.004 0.008 0.668
#> GSM1009112     2   0.577     0.2865 0.004 0.676 0.264 0.056
#> GSM1009126     1   0.617     0.5645 0.732 0.068 0.060 0.140
#> GSM1009140     4   0.610     0.8185 0.212 0.000 0.116 0.672
#> GSM1009154     1   0.171     0.6789 0.952 0.004 0.020 0.024
#> GSM1009168     3   0.519     0.9883 0.020 0.324 0.656 0.000
#> GSM1009182     2   0.715     0.5917 0.164 0.660 0.112 0.064
#> GSM1009196     1   0.372     0.6493 0.860 0.016 0.024 0.100
#> GSM1009071     1   0.761     0.4880 0.612 0.068 0.112 0.208
#> GSM1009085     2   0.166     0.6014 0.052 0.944 0.000 0.004
#> GSM1009099     4   0.501     0.8171 0.320 0.004 0.008 0.668
#> GSM1009113     2   0.577     0.2865 0.004 0.676 0.264 0.056
#> GSM1009127     1   0.448     0.6366 0.824 0.020 0.044 0.112
#> GSM1009141     4   0.610     0.8185 0.212 0.000 0.116 0.672
#> GSM1009155     1   0.171     0.6789 0.952 0.004 0.020 0.024
#> GSM1009169     3   0.563     0.9837 0.020 0.324 0.644 0.012
#> GSM1009183     2   0.703     0.5955 0.152 0.672 0.112 0.064
#> GSM1009197     1   0.361     0.6502 0.864 0.016 0.020 0.100
#> GSM1009072     1   0.761     0.4880 0.612 0.068 0.112 0.208
#> GSM1009086     2   0.166     0.6014 0.052 0.944 0.000 0.004
#> GSM1009100     4   0.501     0.8171 0.320 0.004 0.008 0.668
#> GSM1009114     2   0.577     0.2865 0.004 0.676 0.264 0.056
#> GSM1009128     1   0.855     0.2282 0.492 0.284 0.076 0.148
#> GSM1009142     4   0.610     0.8185 0.212 0.000 0.116 0.672
#> GSM1009156     1   0.152     0.6813 0.960 0.016 0.016 0.008
#> GSM1009170     3   0.576     0.9877 0.020 0.328 0.636 0.016
#> GSM1009184     2   0.707     0.5948 0.156 0.668 0.112 0.064
#> GSM1009198     1   0.378     0.6483 0.856 0.016 0.024 0.104
#> GSM1009073     1   0.761     0.4880 0.612 0.068 0.112 0.208
#> GSM1009087     2   0.375     0.5684 0.196 0.800 0.000 0.004
#> GSM1009101     4   0.501     0.8171 0.320 0.004 0.008 0.668
#> GSM1009115     2   0.577     0.2865 0.004 0.676 0.264 0.056
#> GSM1009129     2   0.705     0.5319 0.192 0.656 0.100 0.052
#> GSM1009143     4   0.610     0.8185 0.212 0.000 0.116 0.672
#> GSM1009157     1   0.305     0.6599 0.892 0.080 0.016 0.012
#> GSM1009171     3   0.551     0.9886 0.020 0.324 0.648 0.008
#> GSM1009185     2   0.765     0.5438 0.228 0.600 0.108 0.064
#> GSM1009199     1   0.544     0.6268 0.772 0.096 0.024 0.108
#> GSM1009074     1   0.761     0.4880 0.612 0.068 0.112 0.208
#> GSM1009088     2   0.371     0.5703 0.192 0.804 0.000 0.004
#> GSM1009102     4   0.501     0.8171 0.320 0.004 0.008 0.668
#> GSM1009116     2   0.577     0.2865 0.004 0.676 0.264 0.056
#> GSM1009130     2   0.585     0.5421 0.160 0.736 0.080 0.024
#> GSM1009144     4   0.610     0.8185 0.212 0.000 0.116 0.672
#> GSM1009158     1   0.171     0.6789 0.952 0.004 0.020 0.024
#> GSM1009172     3   0.576     0.9877 0.020 0.328 0.636 0.016
#> GSM1009186     2   0.707     0.5948 0.156 0.668 0.112 0.064
#> GSM1009200     1   0.378     0.6483 0.856 0.016 0.024 0.104
#> GSM1009075     1   0.761     0.4880 0.612 0.068 0.112 0.208
#> GSM1009089     1   0.557     0.1065 0.516 0.468 0.004 0.012
#> GSM1009103     4   0.501     0.8171 0.320 0.004 0.008 0.668
#> GSM1009117     2   0.577     0.2865 0.004 0.676 0.264 0.056
#> GSM1009131     1   0.854     0.1685 0.476 0.312 0.076 0.136
#> GSM1009145     4   0.627     0.8194 0.240 0.000 0.112 0.648
#> GSM1009159     1   0.170     0.6768 0.952 0.004 0.016 0.028
#> GSM1009173     3   0.563     0.9837 0.020 0.324 0.644 0.012
#> GSM1009187     2   0.740     0.5713 0.196 0.632 0.108 0.064
#> GSM1009201     1   0.378     0.6483 0.856 0.016 0.024 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
#> GSM1009062     1   0.728     0.4431 0.572 0.040 0.036 0.140 0.212
#> GSM1009076     2   0.582     0.2713 0.016 0.672 0.084 0.016 0.212
#> GSM1009090     4   0.251     0.7955 0.116 0.008 0.000 0.876 0.000
#> GSM1009104     2   0.679    -1.0000 0.000 0.360 0.280 0.000 0.360
#> GSM1009118     2   0.873    -0.0252 0.312 0.376 0.044 0.116 0.152
#> GSM1009132     4   0.462     0.7977 0.040 0.004 0.004 0.724 0.228
#> GSM1009146     1   0.287     0.6210 0.872 0.024 0.004 0.100 0.000
#> GSM1009160     3   0.208     0.9841 0.008 0.064 0.920 0.004 0.004
#> GSM1009174     2   0.367     0.4491 0.092 0.836 0.060 0.012 0.000
#> GSM1009188     1   0.641     0.5688 0.632 0.048 0.012 0.224 0.084
#> GSM1009063     1   0.728     0.4431 0.572 0.040 0.036 0.140 0.212
#> GSM1009077     2   0.582     0.2713 0.016 0.672 0.084 0.016 0.212
#> GSM1009091     4   0.251     0.7955 0.116 0.008 0.000 0.876 0.000
#> GSM1009105     2   0.679    -1.0000 0.000 0.360 0.280 0.000 0.360
#> GSM1009119     1   0.704     0.5290 0.596 0.056 0.020 0.200 0.128
#> GSM1009133     4   0.450     0.7978 0.040 0.004 0.000 0.724 0.232
#> GSM1009147     1   0.295     0.6214 0.868 0.028 0.004 0.100 0.000
#> GSM1009161     3   0.208     0.9841 0.008 0.064 0.920 0.004 0.004
#> GSM1009175     2   0.367     0.4491 0.092 0.836 0.060 0.012 0.000
#> GSM1009189     1   0.639     0.5705 0.636 0.048 0.012 0.220 0.084
#> GSM1009064     1   0.731     0.4430 0.568 0.040 0.036 0.140 0.216
#> GSM1009078     2   0.619     0.3186 0.076 0.656 0.040 0.016 0.212
#> GSM1009092     4   0.251     0.7955 0.116 0.008 0.000 0.876 0.000
#> GSM1009106     5   0.679     1.0000 0.000 0.360 0.280 0.000 0.360
#> GSM1009120     1   0.691     0.5414 0.612 0.056 0.020 0.192 0.120
#> GSM1009134     4   0.450     0.7978 0.040 0.004 0.000 0.724 0.232
#> GSM1009148     1   0.287     0.6210 0.872 0.024 0.004 0.100 0.000
#> GSM1009162     3   0.236     0.9847 0.008 0.064 0.908 0.000 0.020
#> GSM1009176     2   0.367     0.4491 0.092 0.836 0.060 0.012 0.000
#> GSM1009190     1   0.639     0.5705 0.636 0.048 0.012 0.220 0.084
#> GSM1009065     1   0.731     0.4430 0.568 0.040 0.036 0.140 0.216
#> GSM1009079     2   0.582     0.2713 0.016 0.672 0.084 0.016 0.212
#> GSM1009093     4   0.251     0.7955 0.116 0.008 0.000 0.876 0.000
#> GSM1009107     2   0.679    -0.9896 0.000 0.364 0.284 0.000 0.352
#> GSM1009121     1   0.893     0.2367 0.356 0.288 0.040 0.172 0.144
#> GSM1009135     4   0.450     0.7978 0.040 0.004 0.000 0.724 0.232
#> GSM1009149     1   0.293     0.6175 0.864 0.020 0.004 0.112 0.000
#> GSM1009163     3   0.208     0.9841 0.008 0.064 0.920 0.004 0.004
#> GSM1009177     2   0.367     0.4491 0.092 0.836 0.060 0.012 0.000
#> GSM1009191     1   0.642     0.5720 0.636 0.052 0.012 0.216 0.084
#> GSM1009066     1   0.731     0.4430 0.568 0.040 0.036 0.140 0.216
#> GSM1009080     2   0.582     0.2713 0.016 0.672 0.084 0.016 0.212
#> GSM1009094     4   0.251     0.7955 0.116 0.008 0.000 0.876 0.000
#> GSM1009108     2   0.679    -0.9896 0.000 0.364 0.284 0.000 0.352
#> GSM1009122     2   0.851     0.2703 0.196 0.480 0.072 0.084 0.168
#> GSM1009136     4   0.443     0.7989 0.052 0.000 0.000 0.732 0.216
#> GSM1009150     1   0.293     0.6175 0.864 0.020 0.004 0.112 0.000
#> GSM1009164     3   0.208     0.9841 0.008 0.064 0.920 0.004 0.004
#> GSM1009178     2   0.383     0.4485 0.104 0.824 0.060 0.012 0.000
#> GSM1009192     1   0.639     0.5705 0.636 0.048 0.012 0.220 0.084
#> GSM1009067     1   0.728     0.4431 0.572 0.040 0.036 0.140 0.212
#> GSM1009081     2   0.582     0.2713 0.016 0.672 0.084 0.016 0.212
#> GSM1009095     4   0.251     0.7955 0.116 0.008 0.000 0.876 0.000
#> GSM1009109     2   0.679    -1.0000 0.000 0.360 0.280 0.000 0.360
#> GSM1009123     1   0.712     0.5218 0.584 0.056 0.020 0.212 0.128
#> GSM1009137     4   0.450     0.7978 0.040 0.004 0.000 0.724 0.232
#> GSM1009151     1   0.287     0.6210 0.872 0.024 0.004 0.100 0.000
#> GSM1009165     3   0.246     0.9837 0.008 0.064 0.904 0.000 0.024
#> GSM1009179     2   0.383     0.4485 0.104 0.824 0.060 0.012 0.000
#> GSM1009193     1   0.641     0.5688 0.632 0.048 0.012 0.224 0.084
#> GSM1009068     1   0.728     0.4431 0.572 0.040 0.036 0.140 0.212
#> GSM1009082     2   0.582     0.2713 0.016 0.672 0.084 0.016 0.212
#> GSM1009096     4   0.251     0.7955 0.116 0.008 0.000 0.876 0.000
#> GSM1009110     2   0.693    -0.9866 0.000 0.364 0.284 0.004 0.348
#> GSM1009124     1   0.820     0.4309 0.480 0.176 0.020 0.192 0.132
#> GSM1009138     4   0.450     0.7978 0.040 0.004 0.000 0.724 0.232
#> GSM1009152     1   0.287     0.6210 0.872 0.024 0.004 0.100 0.000
#> GSM1009166     3   0.236     0.9847 0.008 0.064 0.908 0.000 0.020
#> GSM1009180     2   0.383     0.4485 0.104 0.824 0.060 0.012 0.000
#> GSM1009194     1   0.646     0.5744 0.636 0.056 0.012 0.212 0.084
#> GSM1009069     1   0.737     0.4416 0.564 0.044 0.036 0.140 0.216
#> GSM1009083     2   0.586     0.2759 0.020 0.672 0.080 0.016 0.212
#> GSM1009097     4   0.251     0.7955 0.116 0.008 0.000 0.876 0.000
#> GSM1009111     2   0.679    -0.9896 0.000 0.364 0.284 0.000 0.352
#> GSM1009125     2   0.851     0.2689 0.188 0.484 0.080 0.080 0.168
#> GSM1009139     4   0.462     0.7977 0.040 0.004 0.004 0.724 0.228
#> GSM1009153     1   0.287     0.6210 0.872 0.024 0.004 0.100 0.000
#> GSM1009167     3   0.246     0.9837 0.008 0.064 0.904 0.000 0.024
#> GSM1009181     2   0.367     0.4491 0.092 0.836 0.060 0.012 0.000
#> GSM1009195     1   0.716     0.5643 0.604 0.140 0.020 0.152 0.084
#> GSM1009070     1   0.721     0.4426 0.576 0.036 0.036 0.140 0.212
#> GSM1009084     2   0.582     0.2713 0.016 0.672 0.084 0.016 0.212
#> GSM1009098     4   0.251     0.7955 0.116 0.008 0.000 0.876 0.000
#> GSM1009112     2   0.679    -1.0000 0.000 0.360 0.280 0.000 0.360
#> GSM1009126     1   0.820     0.4309 0.480 0.176 0.020 0.192 0.132
#> GSM1009140     4   0.450     0.7978 0.040 0.004 0.000 0.724 0.232
#> GSM1009154     1   0.287     0.6210 0.872 0.024 0.004 0.100 0.000
#> GSM1009168     3   0.236     0.9847 0.008 0.064 0.908 0.000 0.020
#> GSM1009182     2   0.378     0.4491 0.100 0.828 0.060 0.012 0.000
#> GSM1009196     1   0.636     0.5722 0.640 0.048 0.012 0.216 0.084
#> GSM1009071     1   0.731     0.4430 0.568 0.040 0.036 0.140 0.216
#> GSM1009085     2   0.582     0.2713 0.016 0.672 0.084 0.016 0.212
#> GSM1009099     4   0.251     0.7955 0.116 0.008 0.000 0.876 0.000
#> GSM1009113     2   0.679    -0.9896 0.000 0.364 0.284 0.000 0.352
#> GSM1009127     1   0.712     0.5218 0.584 0.056 0.020 0.212 0.128
#> GSM1009141     4   0.462     0.7977 0.040 0.004 0.004 0.724 0.228
#> GSM1009155     1   0.287     0.6210 0.872 0.024 0.004 0.100 0.000
#> GSM1009169     3   0.246     0.9837 0.008 0.064 0.904 0.000 0.024
#> GSM1009183     2   0.367     0.4491 0.092 0.836 0.060 0.012 0.000
#> GSM1009197     1   0.641     0.5688 0.632 0.048 0.012 0.224 0.084
#> GSM1009072     1   0.728     0.4431 0.572 0.040 0.036 0.140 0.212
#> GSM1009086     2   0.582     0.2713 0.016 0.672 0.084 0.016 0.212
#> GSM1009100     4   0.251     0.7955 0.116 0.008 0.000 0.876 0.000
#> GSM1009114     2   0.679    -1.0000 0.000 0.360 0.280 0.000 0.360
#> GSM1009128     1   0.890     0.3296 0.388 0.236 0.040 0.192 0.144
#> GSM1009142     4   0.462     0.7977 0.040 0.004 0.004 0.724 0.228
#> GSM1009156     1   0.306     0.6223 0.864 0.036 0.004 0.096 0.000
#> GSM1009170     3   0.208     0.9841 0.008 0.064 0.920 0.004 0.004
#> GSM1009184     2   0.367     0.4491 0.092 0.836 0.060 0.012 0.000
#> GSM1009198     1   0.641     0.5688 0.632 0.048 0.012 0.224 0.084
#> GSM1009073     1   0.731     0.4430 0.568 0.040 0.036 0.140 0.216
#> GSM1009087     2   0.619     0.3186 0.076 0.656 0.040 0.016 0.212
#> GSM1009101     4   0.251     0.7955 0.116 0.008 0.000 0.876 0.000
#> GSM1009115     5   0.679     1.0000 0.000 0.360 0.280 0.000 0.360
#> GSM1009129     2   0.842     0.2662 0.184 0.492 0.080 0.072 0.172
#> GSM1009143     4   0.450     0.7978 0.040 0.004 0.000 0.724 0.232
#> GSM1009157     1   0.358     0.6133 0.840 0.084 0.008 0.068 0.000
#> GSM1009171     3   0.176     0.9848 0.008 0.064 0.928 0.000 0.000
#> GSM1009185     2   0.423     0.4361 0.132 0.792 0.064 0.012 0.000
#> GSM1009199     1   0.708     0.5665 0.604 0.120 0.016 0.176 0.084
#> GSM1009074     1   0.728     0.4431 0.572 0.040 0.036 0.140 0.212
#> GSM1009088     2   0.619     0.3186 0.076 0.656 0.040 0.016 0.212
#> GSM1009102     4   0.251     0.7955 0.116 0.008 0.000 0.876 0.000
#> GSM1009116     5   0.679     1.0000 0.000 0.360 0.280 0.000 0.360
#> GSM1009130     2   0.855     0.2176 0.172 0.440 0.108 0.040 0.240
#> GSM1009144     4   0.462     0.7977 0.040 0.004 0.004 0.724 0.228
#> GSM1009158     1   0.297     0.6195 0.864 0.024 0.004 0.108 0.000
#> GSM1009172     3   0.208     0.9841 0.008 0.064 0.920 0.004 0.004
#> GSM1009186     2   0.367     0.4491 0.092 0.836 0.060 0.012 0.000
#> GSM1009200     1   0.639     0.5705 0.636 0.048 0.012 0.220 0.084
#> GSM1009075     1   0.728     0.4431 0.572 0.040 0.036 0.140 0.212
#> GSM1009089     2   0.785     0.2464 0.312 0.448 0.020 0.060 0.160
#> GSM1009103     4   0.251     0.7955 0.116 0.008 0.000 0.876 0.000
#> GSM1009117     2   0.679    -0.9946 0.000 0.360 0.284 0.000 0.356
#> GSM1009131     1   0.890     0.2922 0.388 0.256 0.044 0.168 0.144
#> GSM1009145     4   0.443     0.7989 0.052 0.000 0.000 0.732 0.216
#> GSM1009159     1   0.293     0.6175 0.864 0.020 0.004 0.112 0.000
#> GSM1009173     3   0.246     0.9837 0.008 0.064 0.904 0.000 0.024
#> GSM1009187     2   0.414     0.4401 0.124 0.800 0.064 0.012 0.000
#> GSM1009201     1   0.639     0.5705 0.636 0.048 0.012 0.220 0.084

show/hide code output

cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#>            class entropy silhouette    p1    p2    p3    p4    p5    p6
#> GSM1009062     6  0.5054      0.992 0.224 0.008 0.000 0.104 0.004 0.660
#> GSM1009076     2  0.7653      0.423 0.008 0.388 0.100 0.024 0.336 0.144
#> GSM1009090     4  0.7116      0.723 0.208 0.016 0.008 0.508 0.192 0.068
#> GSM1009104     5  0.5704      0.916 0.004 0.136 0.336 0.000 0.520 0.004
#> GSM1009118     1  0.7639      0.107 0.440 0.328 0.024 0.056 0.068 0.084
#> GSM1009132     4  0.2237      0.725 0.068 0.000 0.000 0.896 0.000 0.036
#> GSM1009146     1  0.6159      0.445 0.620 0.060 0.004 0.036 0.056 0.224
#> GSM1009160     3  0.1481      0.969 0.008 0.012 0.952 0.016 0.004 0.008
#> GSM1009174     2  0.3405      0.571 0.068 0.832 0.084 0.000 0.000 0.016
#> GSM1009188     1  0.2067      0.661 0.912 0.016 0.004 0.064 0.004 0.000
#> GSM1009063     6  0.5054      0.992 0.224 0.008 0.000 0.104 0.004 0.660
#> GSM1009077     2  0.7653      0.423 0.008 0.388 0.100 0.024 0.336 0.144
#> GSM1009091     4  0.7116      0.723 0.208 0.016 0.008 0.508 0.192 0.068
#> GSM1009105     5  0.5573      0.918 0.004 0.136 0.336 0.000 0.524 0.000
#> GSM1009119     1  0.4922      0.590 0.764 0.068 0.004 0.060 0.036 0.068
#> GSM1009133     4  0.2237      0.725 0.068 0.000 0.000 0.896 0.000 0.036
#> GSM1009147     1  0.6159      0.445 0.620 0.060 0.004 0.036 0.056 0.224
#> GSM1009161     3  0.1481      0.969 0.008 0.012 0.952 0.016 0.004 0.008
#> GSM1009175     2  0.3405      0.571 0.068 0.832 0.084 0.000 0.000 0.016
#> GSM1009189     1  0.2067      0.661 0.912 0.016 0.004 0.064 0.004 0.000
#> GSM1009064     6  0.5474      0.990 0.224 0.008 0.004 0.104 0.016 0.644
#> GSM1009078     2  0.7869      0.417 0.064 0.384 0.032 0.032 0.344 0.144
#> GSM1009092     4  0.7116      0.723 0.208 0.016 0.008 0.508 0.192 0.068
#> GSM1009106     5  0.5573      0.918 0.004 0.136 0.336 0.000 0.524 0.000
#> GSM1009120     1  0.4750      0.599 0.776 0.064 0.004 0.052 0.036 0.068
#> GSM1009134     4  0.2237      0.725 0.068 0.000 0.000 0.896 0.000 0.036
#> GSM1009148     1  0.6159      0.445 0.620 0.060 0.004 0.036 0.056 0.224
#> GSM1009162     3  0.1777      0.970 0.008 0.020 0.940 0.008 0.008 0.016
#> GSM1009176     2  0.3405      0.571 0.068 0.832 0.084 0.000 0.000 0.016
#> GSM1009190     1  0.2067      0.661 0.912 0.016 0.004 0.064 0.004 0.000
#> GSM1009065     6  0.5474      0.990 0.224 0.008 0.004 0.104 0.016 0.644
#> GSM1009079     2  0.7653      0.423 0.008 0.388 0.100 0.024 0.336 0.144
#> GSM1009093     4  0.7116      0.723 0.208 0.016 0.008 0.508 0.192 0.068
#> GSM1009107     5  0.5573      0.918 0.004 0.136 0.336 0.000 0.524 0.000
#> GSM1009121     1  0.7315      0.297 0.516 0.264 0.020 0.056 0.064 0.080
#> GSM1009135     4  0.2237      0.725 0.068 0.000 0.000 0.896 0.000 0.036
#> GSM1009149     1  0.6106      0.446 0.624 0.056 0.004 0.036 0.056 0.224
#> GSM1009163     3  0.1337      0.968 0.008 0.012 0.956 0.016 0.000 0.008
#> GSM1009177     2  0.3405      0.571 0.068 0.832 0.084 0.000 0.000 0.016
#> GSM1009191     1  0.2154      0.660 0.908 0.020 0.004 0.064 0.004 0.000
#> GSM1009066     6  0.5474      0.990 0.224 0.008 0.004 0.104 0.016 0.644
#> GSM1009080     2  0.7653      0.423 0.008 0.388 0.100 0.024 0.336 0.144
#> GSM1009094     4  0.7116      0.723 0.208 0.016 0.008 0.508 0.192 0.068
#> GSM1009108     5  0.5573      0.918 0.004 0.136 0.336 0.000 0.524 0.000
#> GSM1009122     2  0.8303      0.175 0.328 0.380 0.072 0.044 0.092 0.084
#> GSM1009136     4  0.2342      0.730 0.088 0.004 0.000 0.888 0.000 0.020
#> GSM1009150     1  0.6106      0.446 0.624 0.056 0.004 0.036 0.056 0.224
#> GSM1009164     3  0.1337      0.968 0.008 0.012 0.956 0.016 0.000 0.008
#> GSM1009178     2  0.3459      0.571 0.072 0.832 0.080 0.004 0.000 0.012
#> GSM1009192     1  0.2067      0.661 0.912 0.016 0.004 0.064 0.004 0.000
#> GSM1009067     6  0.4972      0.986 0.228 0.004 0.000 0.104 0.004 0.660
#> GSM1009081     2  0.7653      0.423 0.008 0.388 0.100 0.024 0.336 0.144
#> GSM1009095     4  0.7229      0.720 0.208 0.020 0.008 0.508 0.176 0.080
#> GSM1009109     5  0.5573      0.918 0.004 0.136 0.336 0.000 0.524 0.000
#> GSM1009123     1  0.4922      0.590 0.764 0.068 0.004 0.060 0.036 0.068
#> GSM1009137     4  0.2237      0.725 0.068 0.000 0.000 0.896 0.000 0.036
#> GSM1009151     1  0.6159      0.445 0.620 0.060 0.004 0.036 0.056 0.224
#> GSM1009165     3  0.1664      0.970 0.008 0.020 0.944 0.008 0.004 0.016
#> GSM1009179     2  0.3459      0.571 0.072 0.832 0.080 0.004 0.000 0.012
#> GSM1009193     1  0.2067      0.661 0.912 0.016 0.004 0.064 0.004 0.000
#> GSM1009068     6  0.5054      0.992 0.224 0.008 0.000 0.104 0.004 0.660
#> GSM1009082     2  0.7653      0.423 0.008 0.388 0.100 0.024 0.336 0.144
#> GSM1009096     4  0.7116      0.723 0.208 0.016 0.008 0.508 0.192 0.068
#> GSM1009110     5  0.5935      0.911 0.004 0.136 0.336 0.004 0.512 0.008
#> GSM1009124     1  0.6136      0.525 0.648 0.172 0.004 0.060 0.040 0.076
#> GSM1009138     4  0.2237      0.725 0.068 0.000 0.000 0.896 0.000 0.036
#> GSM1009152     1  0.6159      0.445 0.620 0.060 0.004 0.036 0.056 0.224
#> GSM1009166     3  0.1777      0.970 0.008 0.020 0.940 0.008 0.008 0.016
#> GSM1009180     2  0.3459      0.571 0.072 0.832 0.080 0.004 0.000 0.012
#> GSM1009194     1  0.2154      0.660 0.908 0.020 0.004 0.064 0.004 0.000
#> GSM1009069     6  0.5526      0.985 0.224 0.012 0.004 0.100 0.016 0.644
#> GSM1009083     2  0.7653      0.423 0.008 0.388 0.100 0.024 0.336 0.144
#> GSM1009097     4  0.7116      0.723 0.208 0.016 0.008 0.508 0.192 0.068
#> GSM1009111     5  0.5573      0.918 0.004 0.136 0.336 0.000 0.524 0.000
#> GSM1009125     2  0.8398      0.197 0.316 0.380 0.084 0.044 0.092 0.084
#> GSM1009139     4  0.2237      0.725 0.068 0.000 0.000 0.896 0.000 0.036
#> GSM1009153     1  0.6159      0.445 0.620 0.060 0.004 0.036 0.056 0.224
#> GSM1009167     3  0.2051      0.966 0.008 0.020 0.928 0.008 0.012 0.024
#> GSM1009181     2  0.3405      0.571 0.068 0.832 0.084 0.000 0.000 0.016
#> GSM1009195     1  0.3078      0.631 0.852 0.080 0.004 0.060 0.004 0.000
#> GSM1009070     6  0.5054      0.992 0.224 0.008 0.000 0.104 0.004 0.660
#> GSM1009084     2  0.7653      0.423 0.008 0.388 0.100 0.024 0.336 0.144
#> GSM1009098     4  0.7116      0.723 0.208 0.016 0.008 0.508 0.192 0.068
#> GSM1009112     5  0.5704      0.916 0.004 0.136 0.336 0.000 0.520 0.004
#> GSM1009126     1  0.6136      0.525 0.648 0.172 0.004 0.060 0.040 0.076
#> GSM1009140     4  0.2237      0.725 0.068 0.000 0.000 0.896 0.000 0.036
#> GSM1009154     1  0.6159      0.445 0.620 0.060 0.004 0.036 0.056 0.224
#> GSM1009168     3  0.2051      0.966 0.008 0.020 0.928 0.008 0.012 0.024
#> GSM1009182     2  0.3455      0.571 0.068 0.832 0.084 0.004 0.000 0.012
#> GSM1009196     1  0.2154      0.660 0.908 0.020 0.004 0.064 0.004 0.000
#> GSM1009071     6  0.5474      0.990 0.224 0.008 0.004 0.104 0.016 0.644
#> GSM1009085     2  0.7653      0.423 0.008 0.388 0.100 0.024 0.336 0.144
#> GSM1009099     4  0.7116      0.723 0.208 0.016 0.008 0.508 0.192 0.068
#> GSM1009113     5  0.5573      0.918 0.004 0.136 0.336 0.000 0.524 0.000
#> GSM1009127     1  0.4922      0.590 0.764 0.068 0.004 0.060 0.036 0.068
#> GSM1009141     4  0.2237      0.725 0.068 0.000 0.000 0.896 0.000 0.036
#> GSM1009155     1  0.6159      0.445 0.620 0.060 0.004 0.036 0.056 0.224
#> GSM1009169     3  0.1860      0.968 0.008 0.020 0.936 0.016 0.004 0.016
#> GSM1009183     2  0.3405      0.571 0.068 0.832 0.084 0.000 0.000 0.016
#> GSM1009197     1  0.2067      0.661 0.912 0.016 0.004 0.064 0.004 0.000
#> GSM1009072     6  0.5054      0.992 0.224 0.008 0.000 0.104 0.004 0.660
#> GSM1009086     2  0.7653      0.423 0.008 0.388 0.100 0.024 0.336 0.144
#> GSM1009100     4  0.7116      0.723 0.208 0.016 0.008 0.508 0.192 0.068
#> GSM1009114     5  0.5935      0.912 0.004 0.136 0.336 0.004 0.512 0.008
#> GSM1009128     1  0.7145      0.366 0.552 0.232 0.024 0.048 0.064 0.080
#> GSM1009142     4  0.2237      0.725 0.068 0.000 0.000 0.896 0.000 0.036
#> GSM1009156     1  0.6136      0.450 0.624 0.060 0.004 0.036 0.056 0.220
#> GSM1009170     3  0.1337      0.968 0.008 0.012 0.956 0.016 0.000 0.008
#> GSM1009184     2  0.3405      0.571 0.068 0.832 0.084 0.000 0.000 0.016
#> GSM1009198     1  0.2067      0.661 0.912 0.016 0.004 0.064 0.004 0.000
#> GSM1009073     6  0.5474      0.990 0.224 0.008 0.004 0.104 0.016 0.644
#> GSM1009087     2  0.7869      0.417 0.064 0.384 0.032 0.032 0.344 0.144
#> GSM1009101     4  0.7116      0.723 0.208 0.016 0.008 0.508 0.192 0.068
#> GSM1009115     5  0.5704      0.916 0.004 0.136 0.336 0.000 0.520 0.004
#> GSM1009129     2  0.8413      0.231 0.308 0.380 0.088 0.036 0.104 0.084
#> GSM1009143     4  0.2380      0.725 0.068 0.004 0.000 0.892 0.000 0.036
#> GSM1009157     1  0.6423      0.417 0.600 0.084 0.004 0.036 0.056 0.220
#> GSM1009171     3  0.0912      0.972 0.008 0.012 0.972 0.004 0.004 0.000
#> GSM1009185     2  0.3651      0.553 0.100 0.816 0.068 0.004 0.000 0.012
#> GSM1009199     1  0.2970      0.636 0.860 0.072 0.004 0.060 0.004 0.000
#> GSM1009074     6  0.5054      0.992 0.224 0.008 0.000 0.104 0.004 0.660
#> GSM1009088     2  0.7869      0.417 0.064 0.384 0.032 0.032 0.344 0.144
#> GSM1009102     4  0.7229      0.720 0.208 0.020 0.008 0.508 0.176 0.080
#> GSM1009116     5  0.5573      0.918 0.004 0.136 0.336 0.000 0.524 0.000
#> GSM1009130     2  0.8766      0.251 0.288 0.328 0.108 0.024 0.152 0.100
#> GSM1009144     4  0.2380      0.725 0.068 0.004 0.000 0.892 0.000 0.036
#> GSM1009158     1  0.6106      0.446 0.624 0.056 0.004 0.036 0.056 0.224
#> GSM1009172     3  0.1481      0.969 0.008 0.012 0.952 0.016 0.004 0.008
#> GSM1009186     2  0.3405      0.571 0.068 0.832 0.084 0.000 0.000 0.016
#> GSM1009200     1  0.2067      0.661 0.912 0.016 0.004 0.064 0.004 0.000
#> GSM1009075     6  0.5054      0.992 0.224 0.008 0.000 0.104 0.004 0.660
#> GSM1009089     5  0.8464     -0.351 0.168 0.272 0.020 0.032 0.328 0.180
#> GSM1009103     4  0.7229      0.720 0.208 0.020 0.008 0.508 0.176 0.080
#> GSM1009117     5  0.5935      0.912 0.004 0.136 0.336 0.004 0.512 0.008
#> GSM1009131     1  0.7173      0.366 0.552 0.228 0.024 0.052 0.060 0.084
#> GSM1009145     4  0.2342      0.730 0.088 0.004 0.000 0.888 0.000 0.020
#> GSM1009159     1  0.6106      0.446 0.624 0.056 0.004 0.036 0.056 0.224
#> GSM1009173     3  0.1715      0.970 0.008 0.020 0.940 0.016 0.000 0.016
#> GSM1009187     2  0.3495      0.566 0.080 0.832 0.068 0.004 0.000 0.016
#> GSM1009201     1  0.2067      0.661 0.912 0.016 0.004 0.064 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-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 temperature(p) time(p) specimen(p) k
#> MAD:kmeans 138          0.982   0.990    7.63e-22 2
#> MAD:kmeans  72          0.981   0.997    3.93e-14 3
#> MAD:kmeans 105          1.000   1.000    3.14e-52 4
#> MAD:kmeans  77          0.969   0.994    5.82e-39 5
#> MAD:kmeans 104          1.000   1.000    1.06e-87 6

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


MAD:skmeans**

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

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

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

res
#> A 'ConsensusPartition' object with k = 2, 3, 4, 5, 6.
#>   On a matrix with 51941 rows and 140 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 1.000           0.962       0.986         0.5013 0.499   0.499
#> 3 3 0.860           0.905       0.937         0.2981 0.819   0.648
#> 4 4 0.680           0.816       0.851         0.1341 0.885   0.679
#> 5 5 0.758           0.696       0.777         0.0640 0.937   0.761
#> 6 6 0.858           0.739       0.767         0.0449 0.892   0.558

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
#> GSM1009062     1  0.0000     0.9871 1.000 0.000
#> GSM1009076     2  0.0000     0.9832 0.000 1.000
#> GSM1009090     1  0.0000     0.9871 1.000 0.000
#> GSM1009104     2  0.0000     0.9832 0.000 1.000
#> GSM1009118     2  0.7219     0.7430 0.200 0.800
#> GSM1009132     1  0.0000     0.9871 1.000 0.000
#> GSM1009146     1  0.0000     0.9871 1.000 0.000
#> GSM1009160     2  0.0000     0.9832 0.000 1.000
#> GSM1009174     2  0.0000     0.9832 0.000 1.000
#> GSM1009188     1  0.0000     0.9871 1.000 0.000
#> GSM1009063     1  0.0000     0.9871 1.000 0.000
#> GSM1009077     2  0.0000     0.9832 0.000 1.000
#> GSM1009091     1  0.0000     0.9871 1.000 0.000
#> GSM1009105     2  0.0000     0.9832 0.000 1.000
#> GSM1009119     1  0.0000     0.9871 1.000 0.000
#> GSM1009133     1  0.0000     0.9871 1.000 0.000
#> GSM1009147     1  0.0000     0.9871 1.000 0.000
#> GSM1009161     2  0.0000     0.9832 0.000 1.000
#> GSM1009175     2  0.0000     0.9832 0.000 1.000
#> GSM1009189     1  0.0000     0.9871 1.000 0.000
#> GSM1009064     1  0.0000     0.9871 1.000 0.000
#> GSM1009078     2  0.0000     0.9832 0.000 1.000
#> GSM1009092     1  0.0000     0.9871 1.000 0.000
#> GSM1009106     2  0.0000     0.9832 0.000 1.000
#> GSM1009120     1  0.0000     0.9871 1.000 0.000
#> GSM1009134     1  0.0000     0.9871 1.000 0.000
#> GSM1009148     1  0.0000     0.9871 1.000 0.000
#> GSM1009162     2  0.0000     0.9832 0.000 1.000
#> GSM1009176     2  0.0000     0.9832 0.000 1.000
#> GSM1009190     1  0.0000     0.9871 1.000 0.000
#> GSM1009065     1  0.0000     0.9871 1.000 0.000
#> GSM1009079     2  0.0000     0.9832 0.000 1.000
#> GSM1009093     1  0.0000     0.9871 1.000 0.000
#> GSM1009107     2  0.0000     0.9832 0.000 1.000
#> GSM1009121     2  0.0000     0.9832 0.000 1.000
#> GSM1009135     1  0.0000     0.9871 1.000 0.000
#> GSM1009149     1  0.0000     0.9871 1.000 0.000
#> GSM1009163     2  0.0000     0.9832 0.000 1.000
#> GSM1009177     2  0.0000     0.9832 0.000 1.000
#> GSM1009191     1  0.0000     0.9871 1.000 0.000
#> GSM1009066     1  0.0000     0.9871 1.000 0.000
#> GSM1009080     2  0.0000     0.9832 0.000 1.000
#> GSM1009094     1  0.0000     0.9871 1.000 0.000
#> GSM1009108     2  0.0000     0.9832 0.000 1.000
#> GSM1009122     2  0.0000     0.9832 0.000 1.000
#> GSM1009136     1  0.0000     0.9871 1.000 0.000
#> GSM1009150     1  0.0000     0.9871 1.000 0.000
#> GSM1009164     2  0.0000     0.9832 0.000 1.000
#> GSM1009178     2  0.0000     0.9832 0.000 1.000
#> GSM1009192     1  0.0000     0.9871 1.000 0.000
#> GSM1009067     1  0.0000     0.9871 1.000 0.000
#> GSM1009081     2  0.0000     0.9832 0.000 1.000
#> GSM1009095     1  0.0000     0.9871 1.000 0.000
#> GSM1009109     2  0.0000     0.9832 0.000 1.000
#> GSM1009123     1  0.0000     0.9871 1.000 0.000
#> GSM1009137     1  0.0000     0.9871 1.000 0.000
#> GSM1009151     1  0.0000     0.9871 1.000 0.000
#> GSM1009165     2  0.0000     0.9832 0.000 1.000
#> GSM1009179     2  0.0000     0.9832 0.000 1.000
#> GSM1009193     1  0.0000     0.9871 1.000 0.000
#> GSM1009068     1  0.0000     0.9871 1.000 0.000
#> GSM1009082     2  0.0000     0.9832 0.000 1.000
#> GSM1009096     1  0.0000     0.9871 1.000 0.000
#> GSM1009110     2  0.0000     0.9832 0.000 1.000
#> GSM1009124     1  0.0000     0.9871 1.000 0.000
#> GSM1009138     1  0.0000     0.9871 1.000 0.000
#> GSM1009152     1  0.0000     0.9871 1.000 0.000
#> GSM1009166     2  0.0000     0.9832 0.000 1.000
#> GSM1009180     2  0.0000     0.9832 0.000 1.000
#> GSM1009194     1  0.0000     0.9871 1.000 0.000
#> GSM1009069     1  0.0376     0.9833 0.996 0.004
#> GSM1009083     2  0.0000     0.9832 0.000 1.000
#> GSM1009097     1  0.0000     0.9871 1.000 0.000
#> GSM1009111     2  0.0000     0.9832 0.000 1.000
#> GSM1009125     2  0.0000     0.9832 0.000 1.000
#> GSM1009139     1  0.0000     0.9871 1.000 0.000
#> GSM1009153     1  0.0000     0.9871 1.000 0.000
#> GSM1009167     2  0.0000     0.9832 0.000 1.000
#> GSM1009181     2  0.0000     0.9832 0.000 1.000
#> GSM1009195     2  0.9954     0.1517 0.460 0.540
#> GSM1009070     1  0.0000     0.9871 1.000 0.000
#> GSM1009084     2  0.0000     0.9832 0.000 1.000
#> GSM1009098     1  0.0000     0.9871 1.000 0.000
#> GSM1009112     2  0.0000     0.9832 0.000 1.000
#> GSM1009126     1  0.0000     0.9871 1.000 0.000
#> GSM1009140     1  0.0000     0.9871 1.000 0.000
#> GSM1009154     1  0.0000     0.9871 1.000 0.000
#> GSM1009168     2  0.0000     0.9832 0.000 1.000
#> GSM1009182     2  0.0000     0.9832 0.000 1.000
#> GSM1009196     1  0.0000     0.9871 1.000 0.000
#> GSM1009071     1  0.0000     0.9871 1.000 0.000
#> GSM1009085     2  0.0000     0.9832 0.000 1.000
#> GSM1009099     1  0.0000     0.9871 1.000 0.000
#> GSM1009113     2  0.0000     0.9832 0.000 1.000
#> GSM1009127     1  0.0000     0.9871 1.000 0.000
#> GSM1009141     1  0.0000     0.9871 1.000 0.000
#> GSM1009155     1  0.0000     0.9871 1.000 0.000
#> GSM1009169     2  0.0000     0.9832 0.000 1.000
#> GSM1009183     2  0.0000     0.9832 0.000 1.000
#> GSM1009197     1  0.0000     0.9871 1.000 0.000
#> GSM1009072     1  0.0000     0.9871 1.000 0.000
#> GSM1009086     2  0.0000     0.9832 0.000 1.000
#> GSM1009100     1  0.0000     0.9871 1.000 0.000
#> GSM1009114     2  0.0000     0.9832 0.000 1.000
#> GSM1009128     2  0.0000     0.9832 0.000 1.000
#> GSM1009142     1  0.0000     0.9871 1.000 0.000
#> GSM1009156     1  0.4431     0.8888 0.908 0.092
#> GSM1009170     2  0.0000     0.9832 0.000 1.000
#> GSM1009184     2  0.0000     0.9832 0.000 1.000
#> GSM1009198     1  0.0000     0.9871 1.000 0.000
#> GSM1009073     1  0.0000     0.9871 1.000 0.000
#> GSM1009087     2  0.0000     0.9832 0.000 1.000
#> GSM1009101     1  0.0000     0.9871 1.000 0.000
#> GSM1009115     2  0.0000     0.9832 0.000 1.000
#> GSM1009129     2  0.0000     0.9832 0.000 1.000
#> GSM1009143     1  0.0000     0.9871 1.000 0.000
#> GSM1009157     2  0.9661     0.3552 0.392 0.608
#> GSM1009171     2  0.0000     0.9832 0.000 1.000
#> GSM1009185     2  0.0000     0.9832 0.000 1.000
#> GSM1009199     1  0.9393     0.4307 0.644 0.356
#> GSM1009074     1  0.0000     0.9871 1.000 0.000
#> GSM1009088     2  0.0000     0.9832 0.000 1.000
#> GSM1009102     1  0.0000     0.9871 1.000 0.000
#> GSM1009116     2  0.0000     0.9832 0.000 1.000
#> GSM1009130     2  0.0000     0.9832 0.000 1.000
#> GSM1009144     1  0.0000     0.9871 1.000 0.000
#> GSM1009158     1  0.0000     0.9871 1.000 0.000
#> GSM1009172     2  0.0000     0.9832 0.000 1.000
#> GSM1009186     2  0.0000     0.9832 0.000 1.000
#> GSM1009200     1  0.0000     0.9871 1.000 0.000
#> GSM1009075     1  0.0000     0.9871 1.000 0.000
#> GSM1009089     1  0.9977     0.0977 0.528 0.472
#> GSM1009103     1  0.0000     0.9871 1.000 0.000
#> GSM1009117     2  0.0000     0.9832 0.000 1.000
#> GSM1009131     2  0.0000     0.9832 0.000 1.000
#> GSM1009145     1  0.0000     0.9871 1.000 0.000
#> GSM1009159     1  0.0000     0.9871 1.000 0.000
#> GSM1009173     2  0.0000     0.9832 0.000 1.000
#> GSM1009187     2  0.0000     0.9832 0.000 1.000
#> GSM1009201     1  0.0000     0.9871 1.000 0.000

show/hide code output

cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#>            class entropy silhouette    p1    p2    p3
#> GSM1009062     1  0.2066      0.889 0.940 0.000 0.060
#> GSM1009076     2  0.1163      0.964 0.000 0.972 0.028
#> GSM1009090     3  0.1529      0.962 0.040 0.000 0.960
#> GSM1009104     2  0.0000      0.967 0.000 1.000 0.000
#> GSM1009118     2  0.7285      0.442 0.048 0.632 0.320
#> GSM1009132     3  0.1289      0.960 0.032 0.000 0.968
#> GSM1009146     1  0.0592      0.893 0.988 0.000 0.012
#> GSM1009160     2  0.0000      0.967 0.000 1.000 0.000
#> GSM1009174     2  0.1711      0.961 0.008 0.960 0.032
#> GSM1009188     1  0.3941      0.834 0.844 0.000 0.156
#> GSM1009063     1  0.2066      0.889 0.940 0.000 0.060
#> GSM1009077     2  0.1163      0.964 0.000 0.972 0.028
#> GSM1009091     3  0.1529      0.962 0.040 0.000 0.960
#> GSM1009105     2  0.0000      0.967 0.000 1.000 0.000
#> GSM1009119     1  0.6252      0.262 0.556 0.000 0.444
#> GSM1009133     3  0.1289      0.960 0.032 0.000 0.968
#> GSM1009147     1  0.0592      0.893 0.988 0.000 0.012
#> GSM1009161     2  0.0000      0.967 0.000 1.000 0.000
#> GSM1009175     2  0.1711      0.961 0.008 0.960 0.032
#> GSM1009189     1  0.3941      0.834 0.844 0.000 0.156
#> GSM1009064     1  0.2066      0.889 0.940 0.000 0.060
#> GSM1009078     2  0.5178      0.808 0.164 0.808 0.028
#> GSM1009092     3  0.1529      0.962 0.040 0.000 0.960
#> GSM1009106     2  0.0000      0.967 0.000 1.000 0.000
#> GSM1009120     1  0.3941      0.835 0.844 0.000 0.156
#> GSM1009134     3  0.1289      0.960 0.032 0.000 0.968
#> GSM1009148     1  0.0592      0.893 0.988 0.000 0.012
#> GSM1009162     2  0.0000      0.967 0.000 1.000 0.000
#> GSM1009176     2  0.1711      0.961 0.008 0.960 0.032
#> GSM1009190     1  0.3941      0.834 0.844 0.000 0.156
#> GSM1009065     1  0.2066      0.889 0.940 0.000 0.060
#> GSM1009079     2  0.1163      0.964 0.000 0.972 0.028
#> GSM1009093     3  0.1529      0.962 0.040 0.000 0.960
#> GSM1009107     2  0.0000      0.967 0.000 1.000 0.000
#> GSM1009121     3  0.7337      0.222 0.032 0.428 0.540
#> GSM1009135     3  0.1289      0.960 0.032 0.000 0.968
#> GSM1009149     1  0.0592      0.893 0.988 0.000 0.012
#> GSM1009163     2  0.0000      0.967 0.000 1.000 0.000
#> GSM1009177     2  0.1711      0.961 0.008 0.960 0.032
#> GSM1009191     1  0.3941      0.834 0.844 0.000 0.156
#> GSM1009066     1  0.2066      0.889 0.940 0.000 0.060
#> GSM1009080     2  0.1163      0.964 0.000 0.972 0.028
#> GSM1009094     3  0.1529      0.962 0.040 0.000 0.960
#> GSM1009108     2  0.0000      0.967 0.000 1.000 0.000
#> GSM1009122     2  0.2846      0.912 0.020 0.924 0.056
#> GSM1009136     3  0.1529      0.962 0.040 0.000 0.960
#> GSM1009150     1  0.0592      0.893 0.988 0.000 0.012
#> GSM1009164     2  0.0000      0.967 0.000 1.000 0.000
#> GSM1009178     2  0.1711      0.961 0.008 0.960 0.032
#> GSM1009192     1  0.3941      0.834 0.844 0.000 0.156
#> GSM1009067     1  0.2066      0.889 0.940 0.000 0.060
#> GSM1009081     2  0.1163      0.964 0.000 0.972 0.028
#> GSM1009095     3  0.1529      0.962 0.040 0.000 0.960
#> GSM1009109     2  0.0000      0.967 0.000 1.000 0.000
#> GSM1009123     3  0.3412      0.889 0.124 0.000 0.876
#> GSM1009137     3  0.1289      0.960 0.032 0.000 0.968
#> GSM1009151     1  0.0592      0.893 0.988 0.000 0.012
#> GSM1009165     2  0.0000      0.967 0.000 1.000 0.000
#> GSM1009179     2  0.1711      0.961 0.008 0.960 0.032
#> GSM1009193     1  0.3941      0.834 0.844 0.000 0.156
#> GSM1009068     1  0.2066      0.889 0.940 0.000 0.060
#> GSM1009082     2  0.1163      0.964 0.000 0.972 0.028
#> GSM1009096     3  0.1529      0.962 0.040 0.000 0.960
#> GSM1009110     2  0.0000      0.967 0.000 1.000 0.000
#> GSM1009124     3  0.3340      0.889 0.120 0.000 0.880
#> GSM1009138     3  0.1289      0.960 0.032 0.000 0.968
#> GSM1009152     1  0.0592      0.893 0.988 0.000 0.012
#> GSM1009166     2  0.0000      0.967 0.000 1.000 0.000
#> GSM1009180     2  0.1711      0.961 0.008 0.960 0.032
#> GSM1009194     1  0.3941      0.834 0.844 0.000 0.156
#> GSM1009069     1  0.2711      0.875 0.912 0.000 0.088
#> GSM1009083     2  0.1163      0.964 0.000 0.972 0.028
#> GSM1009097     3  0.1529      0.962 0.040 0.000 0.960
#> GSM1009111     2  0.0000      0.967 0.000 1.000 0.000
#> GSM1009125     2  0.2550      0.918 0.012 0.932 0.056
#> GSM1009139     3  0.1289      0.960 0.032 0.000 0.968
#> GSM1009153     1  0.0592      0.893 0.988 0.000 0.012
#> GSM1009167     2  0.0000      0.967 0.000 1.000 0.000
#> GSM1009181     2  0.1711      0.961 0.008 0.960 0.032
#> GSM1009195     1  0.5585      0.804 0.812 0.092 0.096
#> GSM1009070     1  0.2066      0.889 0.940 0.000 0.060
#> GSM1009084     2  0.1163      0.964 0.000 0.972 0.028
#> GSM1009098     3  0.1529      0.962 0.040 0.000 0.960
#> GSM1009112     2  0.0000      0.967 0.000 1.000 0.000
#> GSM1009126     3  0.3340      0.889 0.120 0.000 0.880
#> GSM1009140     3  0.1289      0.960 0.032 0.000 0.968
#> GSM1009154     1  0.0592      0.893 0.988 0.000 0.012
#> GSM1009168     2  0.0000      0.967 0.000 1.000 0.000
#> GSM1009182     2  0.1711      0.961 0.008 0.960 0.032
#> GSM1009196     1  0.3482      0.850 0.872 0.000 0.128
#> GSM1009071     1  0.2066      0.889 0.940 0.000 0.060
#> GSM1009085     2  0.1163      0.964 0.000 0.972 0.028
#> GSM1009099     3  0.1529      0.962 0.040 0.000 0.960
#> GSM1009113     2  0.0000      0.967 0.000 1.000 0.000
#> GSM1009127     1  0.6095      0.419 0.608 0.000 0.392
#> GSM1009141     3  0.1289      0.960 0.032 0.000 0.968
#> GSM1009155     1  0.0592      0.893 0.988 0.000 0.012
#> GSM1009169     2  0.0000      0.967 0.000 1.000 0.000
#> GSM1009183     2  0.1711      0.961 0.008 0.960 0.032
#> GSM1009197     1  0.3941      0.834 0.844 0.000 0.156
#> GSM1009072     1  0.2066      0.889 0.940 0.000 0.060
#> GSM1009086     2  0.1163      0.964 0.000 0.972 0.028
#> GSM1009100     3  0.1529      0.962 0.040 0.000 0.960
#> GSM1009114     2  0.0000      0.967 0.000 1.000 0.000
#> GSM1009128     3  0.5955      0.727 0.048 0.180 0.772
#> GSM1009142     3  0.1289      0.960 0.032 0.000 0.968
#> GSM1009156     1  0.1267      0.884 0.972 0.004 0.024
#> GSM1009170     2  0.0000      0.967 0.000 1.000 0.000
#> GSM1009184     2  0.1711      0.961 0.008 0.960 0.032
#> GSM1009198     1  0.3941      0.834 0.844 0.000 0.156
#> GSM1009073     1  0.2066      0.889 0.940 0.000 0.060
#> GSM1009087     2  0.5236      0.804 0.168 0.804 0.028
#> GSM1009101     3  0.1529      0.962 0.040 0.000 0.960
#> GSM1009115     2  0.0000      0.967 0.000 1.000 0.000
#> GSM1009129     2  0.0829      0.961 0.012 0.984 0.004
#> GSM1009143     3  0.1289      0.960 0.032 0.000 0.968
#> GSM1009157     1  0.1878      0.873 0.952 0.004 0.044
#> GSM1009171     2  0.0000      0.967 0.000 1.000 0.000
#> GSM1009185     2  0.2176      0.955 0.020 0.948 0.032
#> GSM1009199     1  0.5267      0.826 0.816 0.044 0.140
#> GSM1009074     1  0.2066      0.889 0.940 0.000 0.060
#> GSM1009088     2  0.5178      0.808 0.164 0.808 0.028
#> GSM1009102     3  0.1529      0.962 0.040 0.000 0.960
#> GSM1009116     2  0.0000      0.967 0.000 1.000 0.000
#> GSM1009130     2  0.0592      0.961 0.012 0.988 0.000
#> GSM1009144     3  0.1289      0.960 0.032 0.000 0.968
#> GSM1009158     1  0.0592      0.893 0.988 0.000 0.012
#> GSM1009172     2  0.0000      0.967 0.000 1.000 0.000
#> GSM1009186     2  0.1711      0.961 0.008 0.960 0.032
#> GSM1009200     1  0.3941      0.834 0.844 0.000 0.156
#> GSM1009075     1  0.2066      0.889 0.940 0.000 0.060
#> GSM1009089     1  0.6337      0.591 0.708 0.264 0.028
#> GSM1009103     3  0.1529      0.962 0.040 0.000 0.960
#> GSM1009117     2  0.0000      0.967 0.000 1.000 0.000
#> GSM1009131     2  0.5798      0.727 0.040 0.776 0.184
#> GSM1009145     3  0.1529      0.962 0.040 0.000 0.960
#> GSM1009159     1  0.0592      0.893 0.988 0.000 0.012
#> GSM1009173     2  0.0000      0.967 0.000 1.000 0.000
#> GSM1009187     2  0.1711      0.961 0.008 0.960 0.032
#> GSM1009201     1  0.3941      0.834 0.844 0.000 0.156

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>            class entropy silhouette    p1    p2    p3    p4
#> GSM1009062     1  0.4552      0.768 0.800 0.072 0.000 0.128
#> GSM1009076     2  0.3764      0.805 0.000 0.784 0.216 0.000
#> GSM1009090     4  0.1302      0.932 0.044 0.000 0.000 0.956
#> GSM1009104     3  0.3942      0.832 0.000 0.236 0.764 0.000
#> GSM1009118     3  0.3977      0.612 0.052 0.084 0.852 0.012
#> GSM1009132     4  0.0000      0.926 0.000 0.000 0.000 1.000
#> GSM1009146     1  0.0188      0.823 0.996 0.004 0.000 0.000
#> GSM1009160     3  0.3172      0.865 0.000 0.160 0.840 0.000
#> GSM1009174     2  0.1940      0.850 0.000 0.924 0.076 0.000
#> GSM1009188     1  0.5710      0.745 0.728 0.004 0.140 0.128
#> GSM1009063     1  0.4552      0.768 0.800 0.072 0.000 0.128
#> GSM1009077     2  0.3764      0.805 0.000 0.784 0.216 0.000
#> GSM1009091     4  0.1302      0.932 0.044 0.000 0.000 0.956
#> GSM1009105     3  0.3942      0.832 0.000 0.236 0.764 0.000
#> GSM1009119     1  0.5630      0.739 0.724 0.000 0.140 0.136
#> GSM1009133     4  0.0000      0.926 0.000 0.000 0.000 1.000
#> GSM1009147     1  0.0188      0.823 0.996 0.004 0.000 0.000
#> GSM1009161     3  0.3172      0.865 0.000 0.160 0.840 0.000
#> GSM1009175     2  0.1940      0.850 0.000 0.924 0.076 0.000
#> GSM1009189     1  0.5710      0.745 0.728 0.004 0.140 0.128
#> GSM1009064     1  0.4552      0.768 0.800 0.072 0.000 0.128
#> GSM1009078     2  0.5307      0.753 0.076 0.736 0.188 0.000
#> GSM1009092     4  0.1302      0.932 0.044 0.000 0.000 0.956
#> GSM1009106     3  0.3942      0.832 0.000 0.236 0.764 0.000
#> GSM1009120     1  0.5321      0.755 0.748 0.000 0.140 0.112
#> GSM1009134     4  0.0000      0.926 0.000 0.000 0.000 1.000
#> GSM1009148     1  0.0188      0.823 0.996 0.004 0.000 0.000
#> GSM1009162     3  0.3172      0.865 0.000 0.160 0.840 0.000
#> GSM1009176     2  0.1940      0.850 0.000 0.924 0.076 0.000
#> GSM1009190     1  0.5710      0.745 0.728 0.004 0.140 0.128
#> GSM1009065     1  0.4552      0.768 0.800 0.072 0.000 0.128
#> GSM1009079     2  0.3764      0.805 0.000 0.784 0.216 0.000
#> GSM1009093     4  0.1302      0.932 0.044 0.000 0.000 0.956
#> GSM1009107     3  0.3942      0.832 0.000 0.236 0.764 0.000
#> GSM1009121     3  0.3105      0.656 0.020 0.084 0.888 0.008
#> GSM1009135     4  0.0000      0.926 0.000 0.000 0.000 1.000
#> GSM1009149     1  0.0188      0.823 0.996 0.004 0.000 0.000
#> GSM1009163     3  0.3172      0.865 0.000 0.160 0.840 0.000
#> GSM1009177     2  0.1940      0.850 0.000 0.924 0.076 0.000
#> GSM1009191     1  0.5710      0.745 0.728 0.004 0.140 0.128
#> GSM1009066     1  0.4552      0.768 0.800 0.072 0.000 0.128
#> GSM1009080     2  0.3764      0.805 0.000 0.784 0.216 0.000
#> GSM1009094     4  0.1302      0.932 0.044 0.000 0.000 0.956
#> GSM1009108     3  0.3942      0.832 0.000 0.236 0.764 0.000
#> GSM1009122     3  0.3306      0.761 0.004 0.156 0.840 0.000
#> GSM1009136     4  0.0921      0.931 0.028 0.000 0.000 0.972
#> GSM1009150     1  0.0188      0.823 0.996 0.004 0.000 0.000
#> GSM1009164     3  0.3172      0.865 0.000 0.160 0.840 0.000
#> GSM1009178     2  0.1940      0.850 0.000 0.924 0.076 0.000
#> GSM1009192     1  0.5710      0.745 0.728 0.004 0.140 0.128
#> GSM1009067     1  0.4552      0.768 0.800 0.072 0.000 0.128
#> GSM1009081     2  0.3764      0.805 0.000 0.784 0.216 0.000
#> GSM1009095     4  0.1302      0.932 0.044 0.000 0.000 0.956
#> GSM1009109     3  0.3942      0.832 0.000 0.236 0.764 0.000
#> GSM1009123     4  0.6792      0.436 0.272 0.000 0.140 0.588
#> GSM1009137     4  0.0000      0.926 0.000 0.000 0.000 1.000
#> GSM1009151     1  0.0188      0.823 0.996 0.004 0.000 0.000
#> GSM1009165     3  0.3172      0.865 0.000 0.160 0.840 0.000
#> GSM1009179     2  0.1940      0.850 0.000 0.924 0.076 0.000
#> GSM1009193     1  0.5710      0.745 0.728 0.004 0.140 0.128
#> GSM1009068     1  0.4552      0.768 0.800 0.072 0.000 0.128
#> GSM1009082     2  0.3764      0.805 0.000 0.784 0.216 0.000
#> GSM1009096     4  0.1302      0.932 0.044 0.000 0.000 0.956
#> GSM1009110     3  0.3942      0.832 0.000 0.236 0.764 0.000
#> GSM1009124     4  0.8796      0.383 0.204 0.080 0.236 0.480
#> GSM1009138     4  0.0000      0.926 0.000 0.000 0.000 1.000
#> GSM1009152     1  0.0188      0.823 0.996 0.004 0.000 0.000
#> GSM1009166     3  0.3172      0.865 0.000 0.160 0.840 0.000
#> GSM1009180     2  0.1940      0.850 0.000 0.924 0.076 0.000
#> GSM1009194     1  0.5710      0.745 0.728 0.004 0.140 0.128
#> GSM1009069     1  0.4552      0.768 0.800 0.072 0.000 0.128
#> GSM1009083     2  0.3764      0.805 0.000 0.784 0.216 0.000
#> GSM1009097     4  0.1302      0.932 0.044 0.000 0.000 0.956
#> GSM1009111     3  0.3942      0.832 0.000 0.236 0.764 0.000
#> GSM1009125     3  0.3306      0.761 0.004 0.156 0.840 0.000
#> GSM1009139     4  0.0000      0.926 0.000 0.000 0.000 1.000
#> GSM1009153     1  0.0188      0.823 0.996 0.004 0.000 0.000
#> GSM1009167     3  0.3172      0.865 0.000 0.160 0.840 0.000
#> GSM1009181     2  0.1940      0.850 0.000 0.924 0.076 0.000
#> GSM1009195     1  0.6665      0.738 0.700 0.072 0.148 0.080
#> GSM1009070     1  0.4482      0.769 0.804 0.068 0.000 0.128
#> GSM1009084     2  0.3764      0.805 0.000 0.784 0.216 0.000
#> GSM1009098     4  0.1302      0.932 0.044 0.000 0.000 0.956
#> GSM1009112     3  0.3942      0.832 0.000 0.236 0.764 0.000
#> GSM1009126     4  0.8796      0.383 0.204 0.080 0.236 0.480
#> GSM1009140     4  0.0000      0.926 0.000 0.000 0.000 1.000
#> GSM1009154     1  0.0188      0.823 0.996 0.004 0.000 0.000
#> GSM1009168     3  0.3172      0.865 0.000 0.160 0.840 0.000
#> GSM1009182     2  0.1940      0.850 0.000 0.924 0.076 0.000
#> GSM1009196     1  0.5608      0.750 0.736 0.004 0.140 0.120
#> GSM1009071     1  0.4552      0.768 0.800 0.072 0.000 0.128
#> GSM1009085     2  0.3764      0.805 0.000 0.784 0.216 0.000
#> GSM1009099     4  0.1302      0.932 0.044 0.000 0.000 0.956
#> GSM1009113     3  0.3942      0.832 0.000 0.236 0.764 0.000
#> GSM1009127     1  0.5630      0.739 0.724 0.000 0.140 0.136
#> GSM1009141     4  0.0000      0.926 0.000 0.000 0.000 1.000
#> GSM1009155     1  0.0188      0.823 0.996 0.004 0.000 0.000
#> GSM1009169     3  0.3172      0.865 0.000 0.160 0.840 0.000
#> GSM1009183     2  0.1940      0.850 0.000 0.924 0.076 0.000
#> GSM1009197     1  0.5710      0.745 0.728 0.004 0.140 0.128
#> GSM1009072     1  0.4552      0.768 0.800 0.072 0.000 0.128
#> GSM1009086     2  0.3764      0.805 0.000 0.784 0.216 0.000
#> GSM1009100     4  0.1302      0.932 0.044 0.000 0.000 0.956
#> GSM1009114     3  0.3942      0.832 0.000 0.236 0.764 0.000
#> GSM1009128     3  0.4585      0.582 0.020 0.080 0.824 0.076
#> GSM1009142     4  0.0000      0.926 0.000 0.000 0.000 1.000
#> GSM1009156     1  0.0188      0.823 0.996 0.004 0.000 0.000
#> GSM1009170     3  0.3172      0.865 0.000 0.160 0.840 0.000
#> GSM1009184     2  0.1940      0.850 0.000 0.924 0.076 0.000
#> GSM1009198     1  0.5710      0.745 0.728 0.004 0.140 0.128
#> GSM1009073     1  0.4552      0.768 0.800 0.072 0.000 0.128
#> GSM1009087     2  0.5307      0.753 0.076 0.736 0.188 0.000
#> GSM1009101     4  0.1302      0.932 0.044 0.000 0.000 0.956
#> GSM1009115     3  0.3942      0.832 0.000 0.236 0.764 0.000
#> GSM1009129     3  0.3306      0.761 0.004 0.156 0.840 0.000
#> GSM1009143     4  0.0000      0.926 0.000 0.000 0.000 1.000
#> GSM1009157     1  0.1302      0.810 0.956 0.044 0.000 0.000
#> GSM1009171     3  0.3172      0.865 0.000 0.160 0.840 0.000
#> GSM1009185     2  0.2124      0.843 0.008 0.924 0.068 0.000
#> GSM1009199     1  0.6665      0.739 0.700 0.060 0.140 0.100
#> GSM1009074     1  0.4552      0.768 0.800 0.072 0.000 0.128
#> GSM1009088     2  0.5279      0.756 0.072 0.736 0.192 0.000
#> GSM1009102     4  0.1302      0.932 0.044 0.000 0.000 0.956
#> GSM1009116     3  0.3942      0.832 0.000 0.236 0.764 0.000
#> GSM1009130     3  0.2334      0.803 0.004 0.088 0.908 0.000
#> GSM1009144     4  0.0000      0.926 0.000 0.000 0.000 1.000
#> GSM1009158     1  0.0188      0.823 0.996 0.004 0.000 0.000
#> GSM1009172     3  0.3172      0.865 0.000 0.160 0.840 0.000
#> GSM1009186     2  0.1940      0.850 0.000 0.924 0.076 0.000
#> GSM1009200     1  0.5710      0.745 0.728 0.004 0.140 0.128
#> GSM1009075     1  0.4552      0.768 0.800 0.072 0.000 0.128
#> GSM1009089     2  0.6158      0.545 0.292 0.628 0.080 0.000
#> GSM1009103     4  0.1302      0.932 0.044 0.000 0.000 0.956
#> GSM1009117     3  0.3942      0.832 0.000 0.236 0.764 0.000
#> GSM1009131     3  0.2882      0.658 0.024 0.084 0.892 0.000
#> GSM1009145     4  0.0921      0.931 0.028 0.000 0.000 0.972
#> GSM1009159     1  0.0188      0.823 0.996 0.004 0.000 0.000
#> GSM1009173     3  0.3172      0.865 0.000 0.160 0.840 0.000
#> GSM1009187     2  0.1940      0.850 0.000 0.924 0.076 0.000
#> GSM1009201     1  0.5710      0.745 0.728 0.004 0.140 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
#> GSM1009062     3  0.4550      0.999 0.276 0.000 0.688 0.036 0.000
#> GSM1009076     2  0.6593      0.572 0.028 0.476 0.108 0.000 0.388
#> GSM1009090     4  0.0290      0.987 0.008 0.000 0.000 0.992 0.000
#> GSM1009104     5  0.2280      0.641 0.000 0.120 0.000 0.000 0.880
#> GSM1009118     5  0.7673      0.402 0.332 0.080 0.148 0.004 0.436
#> GSM1009132     4  0.0771      0.984 0.000 0.004 0.020 0.976 0.000
#> GSM1009146     1  0.4633      0.230 0.612 0.008 0.372 0.008 0.000
#> GSM1009160     5  0.4193      0.704 0.000 0.040 0.212 0.000 0.748
#> GSM1009174     2  0.0771      0.692 0.004 0.976 0.000 0.000 0.020
#> GSM1009188     1  0.1041      0.664 0.964 0.004 0.000 0.032 0.000
#> GSM1009063     3  0.4550      0.999 0.276 0.000 0.688 0.036 0.000
#> GSM1009077     2  0.6593      0.572 0.028 0.476 0.108 0.000 0.388
#> GSM1009091     4  0.0290      0.987 0.008 0.000 0.000 0.992 0.000
#> GSM1009105     5  0.2280      0.641 0.000 0.120 0.000 0.000 0.880
#> GSM1009119     1  0.2878      0.617 0.880 0.004 0.048 0.068 0.000
#> GSM1009133     4  0.0771      0.984 0.000 0.004 0.020 0.976 0.000
#> GSM1009147     1  0.4633      0.230 0.612 0.008 0.372 0.008 0.000
#> GSM1009161     5  0.4193      0.704 0.000 0.040 0.212 0.000 0.748
#> GSM1009175     2  0.0771      0.692 0.004 0.976 0.000 0.000 0.020
#> GSM1009189     1  0.1041      0.664 0.964 0.004 0.000 0.032 0.000
#> GSM1009064     3  0.4550      0.999 0.276 0.000 0.688 0.036 0.000
#> GSM1009078     2  0.6789      0.579 0.028 0.476 0.136 0.000 0.360
#> GSM1009092     4  0.0290      0.987 0.008 0.000 0.000 0.992 0.000
#> GSM1009106     5  0.2280      0.641 0.000 0.120 0.000 0.000 0.880
#> GSM1009120     1  0.2679      0.627 0.892 0.004 0.056 0.048 0.000
#> GSM1009134     4  0.0771      0.984 0.000 0.004 0.020 0.976 0.000
#> GSM1009148     1  0.4633      0.230 0.612 0.008 0.372 0.008 0.000
#> GSM1009162     5  0.4193      0.704 0.000 0.040 0.212 0.000 0.748
#> GSM1009176     2  0.0771      0.692 0.004 0.976 0.000 0.000 0.020
#> GSM1009190     1  0.1041      0.664 0.964 0.004 0.000 0.032 0.000
#> GSM1009065     3  0.4550      0.999 0.276 0.000 0.688 0.036 0.000
#> GSM1009079     2  0.6593      0.572 0.028 0.476 0.108 0.000 0.388
#> GSM1009093     4  0.0290      0.987 0.008 0.000 0.000 0.992 0.000
#> GSM1009107     5  0.2280      0.641 0.000 0.120 0.000 0.000 0.880
#> GSM1009121     5  0.7826      0.419 0.308 0.080 0.148 0.012 0.452
#> GSM1009135     4  0.0771      0.984 0.000 0.004 0.020 0.976 0.000
#> GSM1009149     1  0.4633      0.230 0.612 0.008 0.372 0.008 0.000
#> GSM1009163     5  0.4193      0.704 0.000 0.040 0.212 0.000 0.748
#> GSM1009177     2  0.0771      0.692 0.004 0.976 0.000 0.000 0.020
#> GSM1009191     1  0.1041      0.664 0.964 0.004 0.000 0.032 0.000
#> GSM1009066     3  0.4550      0.999 0.276 0.000 0.688 0.036 0.000
#> GSM1009080     2  0.6593      0.572 0.028 0.476 0.108 0.000 0.388
#> GSM1009094     4  0.0290      0.987 0.008 0.000 0.000 0.992 0.000
#> GSM1009108     5  0.2280      0.641 0.000 0.120 0.000 0.000 0.880
#> GSM1009122     5  0.6818      0.563 0.156 0.080 0.148 0.004 0.612
#> GSM1009136     4  0.0324      0.985 0.000 0.004 0.004 0.992 0.000
#> GSM1009150     1  0.4633      0.230 0.612 0.008 0.372 0.008 0.000
#> GSM1009164     5  0.4193      0.704 0.000 0.040 0.212 0.000 0.748
#> GSM1009178     2  0.0771      0.692 0.004 0.976 0.000 0.000 0.020
#> GSM1009192     1  0.1041      0.664 0.964 0.004 0.000 0.032 0.000
#> GSM1009067     3  0.4550      0.999 0.276 0.000 0.688 0.036 0.000
#> GSM1009081     2  0.6593      0.572 0.028 0.476 0.108 0.000 0.388
#> GSM1009095     4  0.0290      0.987 0.008 0.000 0.000 0.992 0.000
#> GSM1009109     5  0.2280      0.641 0.000 0.120 0.000 0.000 0.880
#> GSM1009123     1  0.4858      0.421 0.688 0.004 0.052 0.256 0.000
#> GSM1009137     4  0.0771      0.984 0.000 0.004 0.020 0.976 0.000
#> GSM1009151     1  0.4633      0.230 0.612 0.008 0.372 0.008 0.000
#> GSM1009165     5  0.4193      0.704 0.000 0.040 0.212 0.000 0.748
#> GSM1009179     2  0.0771      0.692 0.004 0.976 0.000 0.000 0.020
#> GSM1009193     1  0.1041      0.664 0.964 0.004 0.000 0.032 0.000
#> GSM1009068     3  0.4550      0.999 0.276 0.000 0.688 0.036 0.000
#> GSM1009082     2  0.6593      0.572 0.028 0.476 0.108 0.000 0.388
#> GSM1009096     4  0.0290      0.987 0.008 0.000 0.000 0.992 0.000
#> GSM1009110     5  0.2280      0.641 0.000 0.120 0.000 0.000 0.880
#> GSM1009124     1  0.7075      0.400 0.632 0.060 0.132 0.124 0.052
#> GSM1009138     4  0.0771      0.984 0.000 0.004 0.020 0.976 0.000
#> GSM1009152     1  0.4633      0.230 0.612 0.008 0.372 0.008 0.000
#> GSM1009166     5  0.4193      0.704 0.000 0.040 0.212 0.000 0.748
#> GSM1009180     2  0.0771      0.692 0.004 0.976 0.000 0.000 0.020
#> GSM1009194     1  0.1041      0.664 0.964 0.004 0.000 0.032 0.000
#> GSM1009069     3  0.4668      0.981 0.276 0.000 0.688 0.028 0.008
#> GSM1009083     2  0.6593      0.572 0.028 0.476 0.108 0.000 0.388
#> GSM1009097     4  0.0290      0.987 0.008 0.000 0.000 0.992 0.000
#> GSM1009111     5  0.2280      0.641 0.000 0.120 0.000 0.000 0.880
#> GSM1009125     5  0.6818      0.563 0.156 0.080 0.148 0.004 0.612
#> GSM1009139     4  0.0771      0.984 0.000 0.004 0.020 0.976 0.000
#> GSM1009153     1  0.4633      0.230 0.612 0.008 0.372 0.008 0.000
#> GSM1009167     5  0.4193      0.704 0.000 0.040 0.212 0.000 0.748
#> GSM1009181     2  0.0771      0.692 0.004 0.976 0.000 0.000 0.020
#> GSM1009195     1  0.0798      0.655 0.976 0.008 0.000 0.016 0.000
#> GSM1009070     3  0.4550      0.999 0.276 0.000 0.688 0.036 0.000
#> GSM1009084     2  0.6593      0.572 0.028 0.476 0.108 0.000 0.388
#> GSM1009098     4  0.0290      0.987 0.008 0.000 0.000 0.992 0.000
#> GSM1009112     5  0.2280      0.641 0.000 0.120 0.000 0.000 0.880
#> GSM1009126     1  0.7075      0.400 0.632 0.060 0.132 0.124 0.052
#> GSM1009140     4  0.0771      0.984 0.000 0.004 0.020 0.976 0.000
#> GSM1009154     1  0.4633      0.230 0.612 0.008 0.372 0.008 0.000
#> GSM1009168     5  0.4193      0.704 0.000 0.040 0.212 0.000 0.748
#> GSM1009182     2  0.0771      0.692 0.004 0.976 0.000 0.000 0.020
#> GSM1009196     1  0.1026      0.660 0.968 0.004 0.004 0.024 0.000
#> GSM1009071     3  0.4550      0.999 0.276 0.000 0.688 0.036 0.000
#> GSM1009085     2  0.6593      0.572 0.028 0.476 0.108 0.000 0.388
#> GSM1009099     4  0.0290      0.987 0.008 0.000 0.000 0.992 0.000
#> GSM1009113     5  0.2280      0.641 0.000 0.120 0.000 0.000 0.880
#> GSM1009127     1  0.2954      0.617 0.876 0.004 0.056 0.064 0.000
#> GSM1009141     4  0.0771      0.984 0.000 0.004 0.020 0.976 0.000
#> GSM1009155     1  0.4633      0.230 0.612 0.008 0.372 0.008 0.000
#> GSM1009169     5  0.4193      0.704 0.000 0.040 0.212 0.000 0.748
#> GSM1009183     2  0.0771      0.692 0.004 0.976 0.000 0.000 0.020
#> GSM1009197     1  0.1041      0.664 0.964 0.004 0.000 0.032 0.000
#> GSM1009072     3  0.4550      0.999 0.276 0.000 0.688 0.036 0.000
#> GSM1009086     2  0.6593      0.572 0.028 0.476 0.108 0.000 0.388
#> GSM1009100     4  0.0290      0.987 0.008 0.000 0.000 0.992 0.000
#> GSM1009114     5  0.2280      0.641 0.000 0.120 0.000 0.000 0.880
#> GSM1009128     5  0.8690      0.380 0.312 0.076 0.148 0.072 0.392
#> GSM1009142     4  0.0771      0.984 0.000 0.004 0.020 0.976 0.000
#> GSM1009156     1  0.4530      0.229 0.612 0.008 0.376 0.004 0.000
#> GSM1009170     5  0.4193      0.704 0.000 0.040 0.212 0.000 0.748
#> GSM1009184     2  0.0771      0.692 0.004 0.976 0.000 0.000 0.020
#> GSM1009198     1  0.1041      0.664 0.964 0.004 0.000 0.032 0.000
#> GSM1009073     3  0.4550      0.999 0.276 0.000 0.688 0.036 0.000
#> GSM1009087     2  0.6789      0.579 0.028 0.476 0.136 0.000 0.360
#> GSM1009101     4  0.0290      0.987 0.008 0.000 0.000 0.992 0.000
#> GSM1009115     5  0.2280      0.641 0.000 0.120 0.000 0.000 0.880
#> GSM1009129     5  0.6783      0.566 0.152 0.080 0.148 0.004 0.616
#> GSM1009143     4  0.0771      0.984 0.000 0.004 0.020 0.976 0.000
#> GSM1009157     1  0.4482      0.224 0.612 0.012 0.376 0.000 0.000
#> GSM1009171     5  0.4193      0.704 0.000 0.040 0.212 0.000 0.748
#> GSM1009185     2  0.0771      0.692 0.004 0.976 0.000 0.000 0.020
#> GSM1009199     1  0.0992      0.660 0.968 0.008 0.000 0.024 0.000
#> GSM1009074     3  0.4550      0.999 0.276 0.000 0.688 0.036 0.000
#> GSM1009088     2  0.6789      0.579 0.028 0.476 0.136 0.000 0.360
#> GSM1009102     4  0.0290      0.987 0.008 0.000 0.000 0.992 0.000
#> GSM1009116     5  0.2280      0.641 0.000 0.120 0.000 0.000 0.880
#> GSM1009130     5  0.5579      0.606 0.132 0.024 0.152 0.000 0.692
#> GSM1009144     4  0.0771      0.984 0.000 0.004 0.020 0.976 0.000
#> GSM1009158     1  0.4633      0.230 0.612 0.008 0.372 0.008 0.000
#> GSM1009172     5  0.4193      0.704 0.000 0.040 0.212 0.000 0.748
#> GSM1009186     2  0.0771      0.692 0.004 0.976 0.000 0.000 0.020
#> GSM1009200     1  0.1041      0.664 0.964 0.004 0.000 0.032 0.000
#> GSM1009075     3  0.4550      0.999 0.276 0.000 0.688 0.036 0.000
#> GSM1009089     2  0.8169      0.484 0.076 0.412 0.280 0.016 0.216
#> GSM1009103     4  0.0290      0.987 0.008 0.000 0.000 0.992 0.000
#> GSM1009117     5  0.2280      0.641 0.000 0.120 0.000 0.000 0.880
#> GSM1009131     5  0.7826      0.419 0.308 0.080 0.148 0.012 0.452
#> GSM1009145     4  0.0324      0.985 0.000 0.004 0.004 0.992 0.000
#> GSM1009159     1  0.4633      0.230 0.612 0.008 0.372 0.008 0.000
#> GSM1009173     5  0.4193      0.704 0.000 0.040 0.212 0.000 0.748
#> GSM1009187     2  0.0771      0.692 0.004 0.976 0.000 0.000 0.020
#> GSM1009201     1  0.1041      0.664 0.964 0.004 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
#> GSM1009062     6  0.0520     0.7050 0.000 0.000 0.000 0.008 0.008 0.984
#> GSM1009076     5  0.5170     0.7379 0.000 0.276 0.056 0.000 0.632 0.036
#> GSM1009090     4  0.1225     0.9745 0.012 0.000 0.000 0.952 0.036 0.000
#> GSM1009104     3  0.5336     0.6277 0.016 0.060 0.544 0.000 0.376 0.004
#> GSM1009118     1  0.6789     0.1694 0.372 0.032 0.260 0.000 0.332 0.004
#> GSM1009132     4  0.0363     0.9739 0.000 0.000 0.000 0.988 0.000 0.012
#> GSM1009146     6  0.5103     0.6011 0.392 0.004 0.000 0.000 0.072 0.532
#> GSM1009160     3  0.0146     0.7032 0.000 0.004 0.996 0.000 0.000 0.000
#> GSM1009174     2  0.0146     1.0000 0.000 0.996 0.004 0.000 0.000 0.000
#> GSM1009188     1  0.1267     0.7640 0.940 0.000 0.000 0.000 0.000 0.060
#> GSM1009063     6  0.0520     0.7050 0.000 0.000 0.000 0.008 0.008 0.984
#> GSM1009077     5  0.5170     0.7379 0.000 0.276 0.056 0.000 0.632 0.036
#> GSM1009091     4  0.1225     0.9745 0.012 0.000 0.000 0.952 0.036 0.000
#> GSM1009105     3  0.5336     0.6277 0.016 0.060 0.544 0.000 0.376 0.004
#> GSM1009119     1  0.3502     0.6980 0.784 0.004 0.000 0.004 0.188 0.020
#> GSM1009133     4  0.0363     0.9739 0.000 0.000 0.000 0.988 0.000 0.012
#> GSM1009147     6  0.5103     0.6011 0.392 0.004 0.000 0.000 0.072 0.532
#> GSM1009161     3  0.0146     0.7032 0.000 0.004 0.996 0.000 0.000 0.000
#> GSM1009175     2  0.0146     1.0000 0.000 0.996 0.004 0.000 0.000 0.000
#> GSM1009189     1  0.1267     0.7640 0.940 0.000 0.000 0.000 0.000 0.060
#> GSM1009064     6  0.0520     0.7050 0.000 0.000 0.000 0.008 0.008 0.984
#> GSM1009078     5  0.4875     0.7190 0.000 0.276 0.036 0.000 0.652 0.036
#> GSM1009092     4  0.1225     0.9745 0.012 0.000 0.000 0.952 0.036 0.000
#> GSM1009106     3  0.5336     0.6277 0.016 0.060 0.544 0.000 0.376 0.004
#> GSM1009120     1  0.3517     0.6978 0.780 0.004 0.000 0.000 0.188 0.028
#> GSM1009134     4  0.0363     0.9739 0.000 0.000 0.000 0.988 0.000 0.012
#> GSM1009148     6  0.5103     0.6011 0.392 0.004 0.000 0.000 0.072 0.532
#> GSM1009162     3  0.0146     0.7032 0.000 0.004 0.996 0.000 0.000 0.000
#> GSM1009176     2  0.0146     1.0000 0.000 0.996 0.004 0.000 0.000 0.000
#> GSM1009190     1  0.1267     0.7640 0.940 0.000 0.000 0.000 0.000 0.060
#> GSM1009065     6  0.0520     0.7050 0.000 0.000 0.000 0.008 0.008 0.984
#> GSM1009079     5  0.5170     0.7379 0.000 0.276 0.056 0.000 0.632 0.036
#> GSM1009093     4  0.1225     0.9745 0.012 0.000 0.000 0.952 0.036 0.000
#> GSM1009107     3  0.5336     0.6277 0.016 0.060 0.544 0.000 0.376 0.004
#> GSM1009121     1  0.6809     0.1766 0.372 0.032 0.280 0.000 0.312 0.004
#> GSM1009135     4  0.0363     0.9739 0.000 0.000 0.000 0.988 0.000 0.012
#> GSM1009149     6  0.5103     0.6011 0.392 0.004 0.000 0.000 0.072 0.532
#> GSM1009163     3  0.0146     0.7032 0.000 0.004 0.996 0.000 0.000 0.000
#> GSM1009177     2  0.0146     1.0000 0.000 0.996 0.004 0.000 0.000 0.000
#> GSM1009191     1  0.1267     0.7640 0.940 0.000 0.000 0.000 0.000 0.060
#> GSM1009066     6  0.0520     0.7050 0.000 0.000 0.000 0.008 0.008 0.984
#> GSM1009080     5  0.5170     0.7379 0.000 0.276 0.056 0.000 0.632 0.036
#> GSM1009094     4  0.1225     0.9745 0.012 0.000 0.000 0.952 0.036 0.000
#> GSM1009108     3  0.5336     0.6277 0.016 0.060 0.544 0.000 0.376 0.004
#> GSM1009122     5  0.6704    -0.0716 0.224 0.032 0.344 0.000 0.396 0.004
#> GSM1009136     4  0.0260     0.9740 0.000 0.000 0.000 0.992 0.000 0.008
#> GSM1009150     6  0.5103     0.6011 0.392 0.004 0.000 0.000 0.072 0.532
#> GSM1009164     3  0.0146     0.7032 0.000 0.004 0.996 0.000 0.000 0.000
#> GSM1009178     2  0.0146     1.0000 0.000 0.996 0.004 0.000 0.000 0.000
#> GSM1009192     1  0.1267     0.7640 0.940 0.000 0.000 0.000 0.000 0.060
#> GSM1009067     6  0.0520     0.7050 0.000 0.000 0.000 0.008 0.008 0.984
#> GSM1009081     5  0.5170     0.7379 0.000 0.276 0.056 0.000 0.632 0.036
#> GSM1009095     4  0.1225     0.9745 0.012 0.000 0.000 0.952 0.036 0.000
#> GSM1009109     3  0.5336     0.6277 0.016 0.060 0.544 0.000 0.376 0.004
#> GSM1009123     1  0.3527     0.6937 0.784 0.004 0.000 0.016 0.188 0.008
#> GSM1009137     4  0.0363     0.9739 0.000 0.000 0.000 0.988 0.000 0.012
#> GSM1009151     6  0.5103     0.6011 0.392 0.004 0.000 0.000 0.072 0.532
#> GSM1009165     3  0.0146     0.7032 0.000 0.004 0.996 0.000 0.000 0.000
#> GSM1009179     2  0.0146     1.0000 0.000 0.996 0.004 0.000 0.000 0.000
#> GSM1009193     1  0.1267     0.7640 0.940 0.000 0.000 0.000 0.000 0.060
#> GSM1009068     6  0.0520     0.7050 0.000 0.000 0.000 0.008 0.008 0.984
#> GSM1009082     5  0.5170     0.7379 0.000 0.276 0.056 0.000 0.632 0.036
#> GSM1009096     4  0.1225     0.9745 0.012 0.000 0.000 0.952 0.036 0.000
#> GSM1009110     3  0.5336     0.6277 0.016 0.060 0.544 0.000 0.376 0.004
#> GSM1009124     1  0.4908     0.6469 0.704 0.032 0.052 0.004 0.204 0.004
#> GSM1009138     4  0.0363     0.9739 0.000 0.000 0.000 0.988 0.000 0.012
#> GSM1009152     6  0.5103     0.6011 0.392 0.004 0.000 0.000 0.072 0.532
#> GSM1009166     3  0.0146     0.7032 0.000 0.004 0.996 0.000 0.000 0.000
#> GSM1009180     2  0.0146     1.0000 0.000 0.996 0.004 0.000 0.000 0.000
#> GSM1009194     1  0.1267     0.7640 0.940 0.000 0.000 0.000 0.000 0.060
#> GSM1009069     6  0.0458     0.7005 0.000 0.000 0.000 0.000 0.016 0.984
#> GSM1009083     5  0.5170     0.7379 0.000 0.276 0.056 0.000 0.632 0.036
#> GSM1009097     4  0.1225     0.9745 0.012 0.000 0.000 0.952 0.036 0.000
#> GSM1009111     3  0.5336     0.6277 0.016 0.060 0.544 0.000 0.376 0.004
#> GSM1009125     5  0.6661    -0.0927 0.208 0.032 0.360 0.000 0.396 0.004
#> GSM1009139     4  0.0363     0.9739 0.000 0.000 0.000 0.988 0.000 0.012
#> GSM1009153     6  0.5103     0.6011 0.392 0.004 0.000 0.000 0.072 0.532
#> GSM1009167     3  0.0146     0.7032 0.000 0.004 0.996 0.000 0.000 0.000
#> GSM1009181     2  0.0146     1.0000 0.000 0.996 0.004 0.000 0.000 0.000
#> GSM1009195     1  0.1267     0.7640 0.940 0.000 0.000 0.000 0.000 0.060
#> GSM1009070     6  0.0520     0.7050 0.000 0.000 0.000 0.008 0.008 0.984
#> GSM1009084     5  0.5170     0.7379 0.000 0.276 0.056 0.000 0.632 0.036
#> GSM1009098     4  0.1225     0.9745 0.012 0.000 0.000 0.952 0.036 0.000
#> GSM1009112     3  0.5336     0.6277 0.016 0.060 0.544 0.000 0.376 0.004
#> GSM1009126     1  0.5197     0.6404 0.692 0.032 0.052 0.016 0.204 0.004
#> GSM1009140     4  0.0363     0.9739 0.000 0.000 0.000 0.988 0.000 0.012
#> GSM1009154     6  0.5103     0.6011 0.392 0.004 0.000 0.000 0.072 0.532
#> GSM1009168     3  0.0146     0.7032 0.000 0.004 0.996 0.000 0.000 0.000
#> GSM1009182     2  0.0146     1.0000 0.000 0.996 0.004 0.000 0.000 0.000
#> GSM1009196     1  0.1267     0.7640 0.940 0.000 0.000 0.000 0.000 0.060
#> GSM1009071     6  0.0520     0.7050 0.000 0.000 0.000 0.008 0.008 0.984
#> GSM1009085     5  0.5170     0.7379 0.000 0.276 0.056 0.000 0.632 0.036
#> GSM1009099     4  0.1225     0.9745 0.012 0.000 0.000 0.952 0.036 0.000
#> GSM1009113     3  0.5336     0.6277 0.016 0.060 0.544 0.000 0.376 0.004
#> GSM1009127     1  0.3581     0.6987 0.780 0.004 0.000 0.004 0.188 0.024
#> GSM1009141     4  0.0363     0.9739 0.000 0.000 0.000 0.988 0.000 0.012
#> GSM1009155     6  0.5103     0.6011 0.392 0.004 0.000 0.000 0.072 0.532
#> GSM1009169     3  0.0146     0.7032 0.000 0.004 0.996 0.000 0.000 0.000
#> GSM1009183     2  0.0146     1.0000 0.000 0.996 0.004 0.000 0.000 0.000
#> GSM1009197     1  0.1267     0.7640 0.940 0.000 0.000 0.000 0.000 0.060
#> GSM1009072     6  0.0520     0.7050 0.000 0.000 0.000 0.008 0.008 0.984
#> GSM1009086     5  0.5170     0.7379 0.000 0.276 0.056 0.000 0.632 0.036
#> GSM1009100     4  0.1225     0.9745 0.012 0.000 0.000 0.952 0.036 0.000
#> GSM1009114     3  0.5336     0.6277 0.016 0.060 0.544 0.000 0.376 0.004
#> GSM1009128     1  0.6977     0.2399 0.396 0.032 0.268 0.008 0.292 0.004
#> GSM1009142     4  0.0363     0.9739 0.000 0.000 0.000 0.988 0.000 0.012
#> GSM1009156     6  0.5103     0.6011 0.392 0.004 0.000 0.000 0.072 0.532
#> GSM1009170     3  0.0146     0.7032 0.000 0.004 0.996 0.000 0.000 0.000
#> GSM1009184     2  0.0146     1.0000 0.000 0.996 0.004 0.000 0.000 0.000
#> GSM1009198     1  0.1267     0.7640 0.940 0.000 0.000 0.000 0.000 0.060
#> GSM1009073     6  0.0520     0.7050 0.000 0.000 0.000 0.008 0.008 0.984
#> GSM1009087     5  0.4875     0.7190 0.000 0.276 0.036 0.000 0.652 0.036
#> GSM1009101     4  0.1225     0.9745 0.012 0.000 0.000 0.952 0.036 0.000
#> GSM1009115     3  0.5336     0.6277 0.016 0.060 0.544 0.000 0.376 0.004
#> GSM1009129     5  0.6644    -0.0858 0.204 0.032 0.356 0.000 0.404 0.004
#> GSM1009143     4  0.0363     0.9739 0.000 0.000 0.000 0.988 0.000 0.012
#> GSM1009157     6  0.5103     0.6011 0.392 0.004 0.000 0.000 0.072 0.532
#> GSM1009171     3  0.0146     0.7032 0.000 0.004 0.996 0.000 0.000 0.000
#> GSM1009185     2  0.0146     1.0000 0.000 0.996 0.004 0.000 0.000 0.000
#> GSM1009199     1  0.1267     0.7640 0.940 0.000 0.000 0.000 0.000 0.060
#> GSM1009074     6  0.0520     0.7050 0.000 0.000 0.000 0.008 0.008 0.984
#> GSM1009088     5  0.4875     0.7190 0.000 0.276 0.036 0.000 0.652 0.036
#> GSM1009102     4  0.1225     0.9745 0.012 0.000 0.000 0.952 0.036 0.000
#> GSM1009116     3  0.5336     0.6277 0.016 0.060 0.544 0.000 0.376 0.004
#> GSM1009130     5  0.5993    -0.0954 0.176 0.004 0.352 0.000 0.464 0.004
#> GSM1009144     4  0.0363     0.9739 0.000 0.000 0.000 0.988 0.000 0.012
#> GSM1009158     6  0.5103     0.6011 0.392 0.004 0.000 0.000 0.072 0.532
#> GSM1009172     3  0.0146     0.7032 0.000 0.004 0.996 0.000 0.000 0.000
#> GSM1009186     2  0.0146     1.0000 0.000 0.996 0.004 0.000 0.000 0.000
#> GSM1009200     1  0.1267     0.7640 0.940 0.000 0.000 0.000 0.000 0.060
#> GSM1009075     6  0.0520     0.7050 0.000 0.000 0.000 0.008 0.008 0.984
#> GSM1009089     5  0.5625     0.5752 0.004 0.232 0.024 0.000 0.616 0.124
#> GSM1009103     4  0.1225     0.9745 0.012 0.000 0.000 0.952 0.036 0.000
#> GSM1009117     3  0.5336     0.6277 0.016 0.060 0.544 0.000 0.376 0.004
#> GSM1009131     1  0.6745     0.1943 0.372 0.028 0.268 0.000 0.328 0.004
#> GSM1009145     4  0.0260     0.9740 0.000 0.000 0.000 0.992 0.000 0.008
#> GSM1009159     6  0.5103     0.6011 0.392 0.004 0.000 0.000 0.072 0.532
#> GSM1009173     3  0.0146     0.7032 0.000 0.004 0.996 0.000 0.000 0.000
#> GSM1009187     2  0.0146     1.0000 0.000 0.996 0.004 0.000 0.000 0.000
#> GSM1009201     1  0.1267     0.7640 0.940 0.000 0.000 0.000 0.000 0.060

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 temperature(p) time(p) specimen(p) k
#> MAD:skmeans 136          0.883   0.984    4.71e-22 2
#> MAD:skmeans 136          1.000   1.000    1.74e-42 3
#> MAD:skmeans 137          1.000   1.000    3.18e-67 4
#> MAD:skmeans 118          1.000   1.000    5.17e-76 5
#> MAD:skmeans 132          1.000   1.000   3.04e-110 6

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


MAD:pam**

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

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

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

res
#> A 'ConsensusPartition' object with k = 2, 3, 4, 5, 6.
#>   On a matrix with 51941 rows and 140 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 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 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.797           0.940       0.971         0.4526 0.556   0.556
#> 3 3 0.638           0.854       0.890         0.2642 0.803   0.673
#> 4 4 0.848           0.889       0.951         0.2307 0.803   0.580
#> 5 5 0.948           0.911       0.966         0.0788 0.926   0.755
#> 6 6 0.993           0.960       0.982         0.0655 0.921   0.690

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] 5

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

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

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

show/hide code output

cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#>            class entropy silhouette    p1    p2
#> GSM1009062     1  0.0000      0.964 1.000 0.000
#> GSM1009076     2  0.0000      0.980 0.000 1.000
#> GSM1009090     1  0.0000      0.964 1.000 0.000
#> GSM1009104     2  0.0000      0.980 0.000 1.000
#> GSM1009118     1  0.2043      0.941 0.968 0.032
#> GSM1009132     1  0.2948      0.926 0.948 0.052
#> GSM1009146     1  0.0000      0.964 1.000 0.000
#> GSM1009160     2  0.0000      0.980 0.000 1.000
#> GSM1009174     1  0.9522      0.464 0.628 0.372
#> GSM1009188     1  0.0000      0.964 1.000 0.000
#> GSM1009063     1  0.0000      0.964 1.000 0.000
#> GSM1009077     2  0.0000      0.980 0.000 1.000
#> GSM1009091     1  0.0000      0.964 1.000 0.000
#> GSM1009105     2  0.0000      0.980 0.000 1.000
#> GSM1009119     1  0.0000      0.964 1.000 0.000
#> GSM1009133     1  0.0000      0.964 1.000 0.000
#> GSM1009147     1  0.0000      0.964 1.000 0.000
#> GSM1009161     2  0.0000      0.980 0.000 1.000
#> GSM1009175     1  0.7602      0.752 0.780 0.220
#> GSM1009189     1  0.0000      0.964 1.000 0.000
#> GSM1009064     1  0.0000      0.964 1.000 0.000
#> GSM1009078     1  0.5294      0.866 0.880 0.120
#> GSM1009092     1  0.0000      0.964 1.000 0.000
#> GSM1009106     2  0.0000      0.980 0.000 1.000
#> GSM1009120     1  0.0000      0.964 1.000 0.000
#> GSM1009134     1  0.0000      0.964 1.000 0.000
#> GSM1009148     1  0.0000      0.964 1.000 0.000
#> GSM1009162     2  0.0000      0.980 0.000 1.000
#> GSM1009176     2  0.0672      0.974 0.008 0.992
#> GSM1009190     1  0.0000      0.964 1.000 0.000
#> GSM1009065     1  0.0000      0.964 1.000 0.000
#> GSM1009079     2  0.0000      0.980 0.000 1.000
#> GSM1009093     1  0.0000      0.964 1.000 0.000
#> GSM1009107     2  0.0000      0.980 0.000 1.000
#> GSM1009121     1  0.1414      0.950 0.980 0.020
#> GSM1009135     1  0.0000      0.964 1.000 0.000
#> GSM1009149     1  0.0000      0.964 1.000 0.000
#> GSM1009163     2  0.0000      0.980 0.000 1.000
#> GSM1009177     2  0.1184      0.967 0.016 0.984
#> GSM1009191     1  0.0000      0.964 1.000 0.000
#> GSM1009066     1  0.0000      0.964 1.000 0.000
#> GSM1009080     2  0.0000      0.980 0.000 1.000
#> GSM1009094     1  0.0000      0.964 1.000 0.000
#> GSM1009108     2  0.0000      0.980 0.000 1.000
#> GSM1009122     2  0.8861      0.543 0.304 0.696
#> GSM1009136     1  0.0000      0.964 1.000 0.000
#> GSM1009150     1  0.0000      0.964 1.000 0.000
#> GSM1009164     2  0.0000      0.980 0.000 1.000
#> GSM1009178     1  0.7602      0.752 0.780 0.220
#> GSM1009192     1  0.0000      0.964 1.000 0.000
#> GSM1009067     1  0.0000      0.964 1.000 0.000
#> GSM1009081     2  0.0000      0.980 0.000 1.000
#> GSM1009095     1  0.0000      0.964 1.000 0.000
#> GSM1009109     2  0.0000      0.980 0.000 1.000
#> GSM1009123     1  0.0000      0.964 1.000 0.000
#> GSM1009137     1  0.0000      0.964 1.000 0.000
#> GSM1009151     1  0.0000      0.964 1.000 0.000
#> GSM1009165     2  0.0000      0.980 0.000 1.000
#> GSM1009179     1  0.7602      0.752 0.780 0.220
#> GSM1009193     1  0.0000      0.964 1.000 0.000
#> GSM1009068     1  0.0000      0.964 1.000 0.000
#> GSM1009082     2  0.0000      0.980 0.000 1.000
#> GSM1009096     1  0.0000      0.964 1.000 0.000
#> GSM1009110     2  0.0000      0.980 0.000 1.000
#> GSM1009124     1  0.0000      0.964 1.000 0.000
#> GSM1009138     1  0.0000      0.964 1.000 0.000
#> GSM1009152     1  0.0000      0.964 1.000 0.000
#> GSM1009166     2  0.0000      0.980 0.000 1.000
#> GSM1009180     1  0.7602      0.752 0.780 0.220
#> GSM1009194     1  0.0000      0.964 1.000 0.000
#> GSM1009069     1  0.6623      0.810 0.828 0.172
#> GSM1009083     2  0.0000      0.980 0.000 1.000
#> GSM1009097     1  0.0000      0.964 1.000 0.000
#> GSM1009111     2  0.0000      0.980 0.000 1.000
#> GSM1009125     2  0.4022      0.904 0.080 0.920
#> GSM1009139     1  0.0000      0.964 1.000 0.000
#> GSM1009153     1  0.0000      0.964 1.000 0.000
#> GSM1009167     2  0.0000      0.980 0.000 1.000
#> GSM1009181     2  0.0376      0.977 0.004 0.996
#> GSM1009195     1  0.0000      0.964 1.000 0.000
#> GSM1009070     1  0.0000      0.964 1.000 0.000
#> GSM1009084     2  0.0000      0.980 0.000 1.000
#> GSM1009098     1  0.0000      0.964 1.000 0.000
#> GSM1009112     2  0.0000      0.980 0.000 1.000
#> GSM1009126     1  0.0000      0.964 1.000 0.000
#> GSM1009140     1  0.0000      0.964 1.000 0.000
#> GSM1009154     1  0.0000      0.964 1.000 0.000
#> GSM1009168     2  0.0000      0.980 0.000 1.000
#> GSM1009182     1  0.7602      0.752 0.780 0.220
#> GSM1009196     1  0.0000      0.964 1.000 0.000
#> GSM1009071     1  0.0000      0.964 1.000 0.000
#> GSM1009085     2  0.0000      0.980 0.000 1.000
#> GSM1009099     1  0.0000      0.964 1.000 0.000
#> GSM1009113     2  0.0000      0.980 0.000 1.000
#> GSM1009127     1  0.0000      0.964 1.000 0.000
#> GSM1009141     1  0.0000      0.964 1.000 0.000
#> GSM1009155     1  0.0000      0.964 1.000 0.000
#> GSM1009169     2  0.5629      0.840 0.132 0.868
#> GSM1009183     2  0.0672      0.974 0.008 0.992
#> GSM1009197     1  0.0000      0.964 1.000 0.000
#> GSM1009072     1  0.0000      0.964 1.000 0.000
#> GSM1009086     2  0.0000      0.980 0.000 1.000
#> GSM1009100     1  0.0000      0.964 1.000 0.000
#> GSM1009114     2  0.0000      0.980 0.000 1.000
#> GSM1009128     1  0.2603      0.933 0.956 0.044
#> GSM1009142     1  0.0000      0.964 1.000 0.000
#> GSM1009156     1  0.0000      0.964 1.000 0.000
#> GSM1009170     2  0.0000      0.980 0.000 1.000
#> GSM1009184     1  0.7602      0.752 0.780 0.220
#> GSM1009198     1  0.0000      0.964 1.000 0.000
#> GSM1009073     1  0.0000      0.964 1.000 0.000
#> GSM1009087     1  0.5294      0.866 0.880 0.120
#> GSM1009101     1  0.0000      0.964 1.000 0.000
#> GSM1009115     2  0.0000      0.980 0.000 1.000
#> GSM1009129     2  0.4161      0.899 0.084 0.916
#> GSM1009143     1  0.0000      0.964 1.000 0.000
#> GSM1009157     1  0.0000      0.964 1.000 0.000
#> GSM1009171     2  0.0000      0.980 0.000 1.000
#> GSM1009185     1  0.7602      0.752 0.780 0.220
#> GSM1009199     1  0.0000      0.964 1.000 0.000
#> GSM1009074     1  0.0000      0.964 1.000 0.000
#> GSM1009088     1  0.6801      0.804 0.820 0.180
#> GSM1009102     1  0.0000      0.964 1.000 0.000
#> GSM1009116     2  0.0000      0.980 0.000 1.000
#> GSM1009130     2  0.7883      0.704 0.236 0.764
#> GSM1009144     1  0.0000      0.964 1.000 0.000
#> GSM1009158     1  0.0000      0.964 1.000 0.000
#> GSM1009172     2  0.0000      0.980 0.000 1.000
#> GSM1009186     1  0.7602      0.752 0.780 0.220
#> GSM1009200     1  0.0000      0.964 1.000 0.000
#> GSM1009075     1  0.0000      0.964 1.000 0.000
#> GSM1009089     1  0.4939      0.876 0.892 0.108
#> GSM1009103     1  0.0000      0.964 1.000 0.000
#> GSM1009117     2  0.0000      0.980 0.000 1.000
#> GSM1009131     1  0.0376      0.961 0.996 0.004
#> GSM1009145     1  0.0000      0.964 1.000 0.000
#> GSM1009159     1  0.0000      0.964 1.000 0.000
#> GSM1009173     2  0.0000      0.980 0.000 1.000
#> GSM1009187     1  0.7602      0.752 0.780 0.220
#> GSM1009201     1  0.0000      0.964 1.000 0.000

show/hide code output

cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#>            class entropy silhouette    p1    p2    p3
#> GSM1009062     1  0.0000      0.894 1.000 0.000 0.000
#> GSM1009076     2  0.0000      0.867 0.000 1.000 0.000
#> GSM1009090     1  0.5216      0.812 0.740 0.000 0.260
#> GSM1009104     2  0.0000      0.867 0.000 1.000 0.000
#> GSM1009118     1  0.6126      0.139 0.600 0.400 0.000
#> GSM1009132     2  0.9646      0.200 0.272 0.468 0.260
#> GSM1009146     1  0.0000      0.894 1.000 0.000 0.000
#> GSM1009160     3  0.5216      1.000 0.000 0.260 0.740
#> GSM1009174     2  0.4235      0.771 0.176 0.824 0.000
#> GSM1009188     1  0.0000      0.894 1.000 0.000 0.000
#> GSM1009063     1  0.0000      0.894 1.000 0.000 0.000
#> GSM1009077     2  0.0000      0.867 0.000 1.000 0.000
#> GSM1009091     1  0.5216      0.812 0.740 0.000 0.260
#> GSM1009105     2  0.0000      0.867 0.000 1.000 0.000
#> GSM1009119     1  0.0000      0.894 1.000 0.000 0.000
#> GSM1009133     1  0.5216      0.812 0.740 0.000 0.260
#> GSM1009147     1  0.0000      0.894 1.000 0.000 0.000
#> GSM1009161     3  0.5216      1.000 0.000 0.260 0.740
#> GSM1009175     2  0.4235      0.771 0.176 0.824 0.000
#> GSM1009189     1  0.0000      0.894 1.000 0.000 0.000
#> GSM1009064     1  0.0000      0.894 1.000 0.000 0.000
#> GSM1009078     1  0.3116      0.830 0.892 0.108 0.000
#> GSM1009092     1  0.5216      0.812 0.740 0.000 0.260
#> GSM1009106     2  0.0000      0.867 0.000 1.000 0.000
#> GSM1009120     1  0.0000      0.894 1.000 0.000 0.000
#> GSM1009134     1  0.5216      0.812 0.740 0.000 0.260
#> GSM1009148     1  0.0000      0.894 1.000 0.000 0.000
#> GSM1009162     3  0.5216      1.000 0.000 0.260 0.740
#> GSM1009176     2  0.1860      0.851 0.052 0.948 0.000
#> GSM1009190     1  0.0000      0.894 1.000 0.000 0.000
#> GSM1009065     1  0.0237      0.892 0.996 0.004 0.000
#> GSM1009079     2  0.0000      0.867 0.000 1.000 0.000
#> GSM1009093     1  0.5216      0.812 0.740 0.000 0.260
#> GSM1009107     2  0.0000      0.867 0.000 1.000 0.000
#> GSM1009121     1  0.5731      0.801 0.804 0.108 0.088
#> GSM1009135     1  0.5216      0.812 0.740 0.000 0.260
#> GSM1009149     1  0.0000      0.894 1.000 0.000 0.000
#> GSM1009163     3  0.5216      1.000 0.000 0.260 0.740
#> GSM1009177     2  0.2625      0.834 0.084 0.916 0.000
#> GSM1009191     1  0.0000      0.894 1.000 0.000 0.000
#> GSM1009066     1  0.0000      0.894 1.000 0.000 0.000
#> GSM1009080     2  0.0000      0.867 0.000 1.000 0.000
#> GSM1009094     1  0.5216      0.812 0.740 0.000 0.260
#> GSM1009108     2  0.0000      0.867 0.000 1.000 0.000
#> GSM1009122     2  0.3752      0.789 0.144 0.856 0.000
#> GSM1009136     1  0.5216      0.812 0.740 0.000 0.260
#> GSM1009150     1  0.0000      0.894 1.000 0.000 0.000
#> GSM1009164     3  0.5216      1.000 0.000 0.260 0.740
#> GSM1009178     2  0.4235      0.771 0.176 0.824 0.000
#> GSM1009192     1  0.0000      0.894 1.000 0.000 0.000
#> GSM1009067     1  0.0000      0.894 1.000 0.000 0.000
#> GSM1009081     2  0.0000      0.867 0.000 1.000 0.000
#> GSM1009095     1  0.5216      0.812 0.740 0.000 0.260
#> GSM1009109     2  0.0000      0.867 0.000 1.000 0.000
#> GSM1009123     1  0.2448      0.873 0.924 0.000 0.076
#> GSM1009137     1  0.5216      0.812 0.740 0.000 0.260
#> GSM1009151     1  0.0000      0.894 1.000 0.000 0.000
#> GSM1009165     3  0.5216      1.000 0.000 0.260 0.740
#> GSM1009179     2  0.4235      0.771 0.176 0.824 0.000
#> GSM1009193     1  0.0000      0.894 1.000 0.000 0.000
#> GSM1009068     1  0.0000      0.894 1.000 0.000 0.000
#> GSM1009082     2  0.0000      0.867 0.000 1.000 0.000
#> GSM1009096     1  0.5216      0.812 0.740 0.000 0.260
#> GSM1009110     2  0.0000      0.867 0.000 1.000 0.000
#> GSM1009124     1  0.0000      0.894 1.000 0.000 0.000
#> GSM1009138     1  0.5216      0.812 0.740 0.000 0.260
#> GSM1009152     1  0.0000      0.894 1.000 0.000 0.000
#> GSM1009166     3  0.5216      1.000 0.000 0.260 0.740
#> GSM1009180     2  0.4235      0.771 0.176 0.824 0.000
#> GSM1009194     1  0.0000      0.894 1.000 0.000 0.000
#> GSM1009069     2  0.5948      0.476 0.360 0.640 0.000
#> GSM1009083     2  0.0592      0.864 0.012 0.988 0.000
#> GSM1009097     1  0.5216      0.812 0.740 0.000 0.260
#> GSM1009111     2  0.0000      0.867 0.000 1.000 0.000
#> GSM1009125     2  0.2173      0.849 0.048 0.944 0.008
#> GSM1009139     1  0.5216      0.812 0.740 0.000 0.260
#> GSM1009153     1  0.0000      0.894 1.000 0.000 0.000
#> GSM1009167     3  0.5216      1.000 0.000 0.260 0.740
#> GSM1009181     2  0.1163      0.860 0.028 0.972 0.000
#> GSM1009195     1  0.0237      0.892 0.996 0.004 0.000
#> GSM1009070     1  0.0000      0.894 1.000 0.000 0.000
#> GSM1009084     2  0.0000      0.867 0.000 1.000 0.000
#> GSM1009098     1  0.5216      0.812 0.740 0.000 0.260
#> GSM1009112     2  0.0000      0.867 0.000 1.000 0.000
#> GSM1009126     1  0.0000      0.894 1.000 0.000 0.000
#> GSM1009140     1  0.5216      0.812 0.740 0.000 0.260
#> GSM1009154     1  0.0000      0.894 1.000 0.000 0.000
#> GSM1009168     3  0.5216      1.000 0.000 0.260 0.740
#> GSM1009182     2  0.4235      0.771 0.176 0.824 0.000
#> GSM1009196     1  0.0000      0.894 1.000 0.000 0.000
#> GSM1009071     1  0.0000      0.894 1.000 0.000 0.000
#> GSM1009085     2  0.0000      0.867 0.000 1.000 0.000
#> GSM1009099     1  0.5216      0.812 0.740 0.000 0.260
#> GSM1009113     2  0.0000      0.867 0.000 1.000 0.000
#> GSM1009127     1  0.0000      0.894 1.000 0.000 0.000
#> GSM1009141     1  0.5216      0.812 0.740 0.000 0.260
#> GSM1009155     1  0.0000      0.894 1.000 0.000 0.000
#> GSM1009169     3  0.5216      1.000 0.000 0.260 0.740
#> GSM1009183     2  0.2261      0.843 0.068 0.932 0.000
#> GSM1009197     1  0.0000      0.894 1.000 0.000 0.000
#> GSM1009072     1  0.0000      0.894 1.000 0.000 0.000
#> GSM1009086     2  0.0000      0.867 0.000 1.000 0.000
#> GSM1009100     1  0.5216      0.812 0.740 0.000 0.260
#> GSM1009114     2  0.0000      0.867 0.000 1.000 0.000
#> GSM1009128     1  0.5737      0.815 0.804 0.092 0.104
#> GSM1009142     1  0.5216      0.812 0.740 0.000 0.260
#> GSM1009156     1  0.0000      0.894 1.000 0.000 0.000
#> GSM1009170     3  0.5216      1.000 0.000 0.260 0.740
#> GSM1009184     2  0.4235      0.771 0.176 0.824 0.000
#> GSM1009198     1  0.0000      0.894 1.000 0.000 0.000
#> GSM1009073     1  0.0000      0.894 1.000 0.000 0.000
#> GSM1009087     1  0.3116      0.830 0.892 0.108 0.000
#> GSM1009101     1  0.5216      0.812 0.740 0.000 0.260
#> GSM1009115     2  0.0000      0.867 0.000 1.000 0.000
#> GSM1009129     2  0.2625      0.824 0.084 0.916 0.000
#> GSM1009143     1  0.5216      0.812 0.740 0.000 0.260
#> GSM1009157     1  0.0000      0.894 1.000 0.000 0.000
#> GSM1009171     3  0.5216      1.000 0.000 0.260 0.740
#> GSM1009185     2  0.4235      0.771 0.176 0.824 0.000
#> GSM1009199     1  0.0237      0.892 0.996 0.004 0.000
#> GSM1009074     1  0.0000      0.894 1.000 0.000 0.000
#> GSM1009088     1  0.4178      0.776 0.828 0.172 0.000
#> GSM1009102     1  0.5216      0.812 0.740 0.000 0.260
#> GSM1009116     2  0.0000      0.867 0.000 1.000 0.000
#> GSM1009130     1  0.4346      0.771 0.816 0.184 0.000
#> GSM1009144     1  0.5216      0.812 0.740 0.000 0.260
#> GSM1009158     1  0.0000      0.894 1.000 0.000 0.000
#> GSM1009172     3  0.5216      1.000 0.000 0.260 0.740
#> GSM1009186     2  0.4235      0.771 0.176 0.824 0.000
#> GSM1009200     1  0.0000      0.894 1.000 0.000 0.000
#> GSM1009075     1  0.0000      0.894 1.000 0.000 0.000
#> GSM1009089     1  0.2711      0.840 0.912 0.088 0.000
#> GSM1009103     1  0.5216      0.812 0.740 0.000 0.260
#> GSM1009117     2  0.0000      0.867 0.000 1.000 0.000
#> GSM1009131     1  0.1529      0.877 0.960 0.040 0.000
#> GSM1009145     1  0.5216      0.812 0.740 0.000 0.260
#> GSM1009159     1  0.0000      0.894 1.000 0.000 0.000
#> GSM1009173     3  0.5216      1.000 0.000 0.260 0.740
#> GSM1009187     2  0.4235      0.771 0.176 0.824 0.000
#> GSM1009201     1  0.0000      0.894 1.000 0.000 0.000

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>            class entropy silhouette    p1    p2    p3    p4
#> GSM1009062     1  0.0000     0.9624 1.000 0.000 0.000 0.000
#> GSM1009076     2  0.0000     0.8607 0.000 1.000 0.000 0.000
#> GSM1009090     4  0.0000     0.9688 0.000 0.000 0.000 1.000
#> GSM1009104     2  0.0000     0.8607 0.000 1.000 0.000 0.000
#> GSM1009118     1  0.4776     0.2671 0.624 0.376 0.000 0.000
#> GSM1009132     4  0.0000     0.9688 0.000 0.000 0.000 1.000
#> GSM1009146     1  0.0000     0.9624 1.000 0.000 0.000 0.000
#> GSM1009160     3  0.0000     1.0000 0.000 0.000 1.000 0.000
#> GSM1009174     2  0.4331     0.6841 0.288 0.712 0.000 0.000
#> GSM1009188     1  0.0000     0.9624 1.000 0.000 0.000 0.000
#> GSM1009063     1  0.0000     0.9624 1.000 0.000 0.000 0.000
#> GSM1009077     2  0.0000     0.8607 0.000 1.000 0.000 0.000
#> GSM1009091     4  0.0000     0.9688 0.000 0.000 0.000 1.000
#> GSM1009105     2  0.0000     0.8607 0.000 1.000 0.000 0.000
#> GSM1009119     1  0.0000     0.9624 1.000 0.000 0.000 0.000
#> GSM1009133     4  0.0000     0.9688 0.000 0.000 0.000 1.000
#> GSM1009147     1  0.0000     0.9624 1.000 0.000 0.000 0.000
#> GSM1009161     3  0.0000     1.0000 0.000 0.000 1.000 0.000
#> GSM1009175     2  0.4331     0.6841 0.288 0.712 0.000 0.000
#> GSM1009189     1  0.0000     0.9624 1.000 0.000 0.000 0.000
#> GSM1009064     1  0.0188     0.9594 0.996 0.004 0.000 0.000
#> GSM1009078     1  0.1211     0.9301 0.960 0.040 0.000 0.000
#> GSM1009092     4  0.0000     0.9688 0.000 0.000 0.000 1.000
#> GSM1009106     2  0.0000     0.8607 0.000 1.000 0.000 0.000
#> GSM1009120     1  0.0000     0.9624 1.000 0.000 0.000 0.000
#> GSM1009134     4  0.0000     0.9688 0.000 0.000 0.000 1.000
#> GSM1009148     1  0.0000     0.9624 1.000 0.000 0.000 0.000
#> GSM1009162     3  0.0000     1.0000 0.000 0.000 1.000 0.000
#> GSM1009176     2  0.1022     0.8495 0.032 0.968 0.000 0.000
#> GSM1009190     1  0.0000     0.9624 1.000 0.000 0.000 0.000
#> GSM1009065     1  0.0469     0.9532 0.988 0.012 0.000 0.000
#> GSM1009079     2  0.0000     0.8607 0.000 1.000 0.000 0.000
#> GSM1009093     4  0.0000     0.9688 0.000 0.000 0.000 1.000
#> GSM1009107     2  0.0000     0.8607 0.000 1.000 0.000 0.000
#> GSM1009121     2  0.7849     0.1827 0.352 0.380 0.000 0.268
#> GSM1009135     4  0.0000     0.9688 0.000 0.000 0.000 1.000
#> GSM1009149     1  0.0000     0.9624 1.000 0.000 0.000 0.000
#> GSM1009163     3  0.0000     1.0000 0.000 0.000 1.000 0.000
#> GSM1009177     2  0.1118     0.8479 0.036 0.964 0.000 0.000
#> GSM1009191     1  0.0000     0.9624 1.000 0.000 0.000 0.000
#> GSM1009066     1  0.0000     0.9624 1.000 0.000 0.000 0.000
#> GSM1009080     2  0.0000     0.8607 0.000 1.000 0.000 0.000
#> GSM1009094     4  0.0000     0.9688 0.000 0.000 0.000 1.000
#> GSM1009108     2  0.0000     0.8607 0.000 1.000 0.000 0.000
#> GSM1009122     2  0.3123     0.7667 0.156 0.844 0.000 0.000
#> GSM1009136     4  0.0000     0.9688 0.000 0.000 0.000 1.000
#> GSM1009150     1  0.0000     0.9624 1.000 0.000 0.000 0.000
#> GSM1009164     3  0.0000     1.0000 0.000 0.000 1.000 0.000
#> GSM1009178     2  0.4356     0.6796 0.292 0.708 0.000 0.000
#> GSM1009192     1  0.0000     0.9624 1.000 0.000 0.000 0.000
#> GSM1009067     1  0.0000     0.9624 1.000 0.000 0.000 0.000
#> GSM1009081     2  0.0000     0.8607 0.000 1.000 0.000 0.000
#> GSM1009095     4  0.0000     0.9688 0.000 0.000 0.000 1.000
#> GSM1009109     2  0.0000     0.8607 0.000 1.000 0.000 0.000
#> GSM1009123     4  0.4776     0.3908 0.376 0.000 0.000 0.624
#> GSM1009137     4  0.0000     0.9688 0.000 0.000 0.000 1.000
#> GSM1009151     1  0.0000     0.9624 1.000 0.000 0.000 0.000
#> GSM1009165     3  0.0000     1.0000 0.000 0.000 1.000 0.000
#> GSM1009179     2  0.4356     0.6796 0.292 0.708 0.000 0.000
#> GSM1009193     1  0.0000     0.9624 1.000 0.000 0.000 0.000
#> GSM1009068     1  0.0000     0.9624 1.000 0.000 0.000 0.000
#> GSM1009082     2  0.0000     0.8607 0.000 1.000 0.000 0.000
#> GSM1009096     4  0.0000     0.9688 0.000 0.000 0.000 1.000
#> GSM1009110     2  0.0000     0.8607 0.000 1.000 0.000 0.000
#> GSM1009124     1  0.0000     0.9624 1.000 0.000 0.000 0.000
#> GSM1009138     4  0.0000     0.9688 0.000 0.000 0.000 1.000
#> GSM1009152     1  0.0000     0.9624 1.000 0.000 0.000 0.000
#> GSM1009166     3  0.0000     1.0000 0.000 0.000 1.000 0.000
#> GSM1009180     2  0.4356     0.6796 0.292 0.708 0.000 0.000
#> GSM1009194     1  0.0000     0.9624 1.000 0.000 0.000 0.000
#> GSM1009069     1  0.1940     0.8878 0.924 0.076 0.000 0.000
#> GSM1009083     2  0.0188     0.8598 0.004 0.996 0.000 0.000
#> GSM1009097     4  0.0000     0.9688 0.000 0.000 0.000 1.000
#> GSM1009111     2  0.0000     0.8607 0.000 1.000 0.000 0.000
#> GSM1009125     2  0.0859     0.8545 0.008 0.980 0.004 0.008
#> GSM1009139     4  0.0000     0.9688 0.000 0.000 0.000 1.000
#> GSM1009153     1  0.0000     0.9624 1.000 0.000 0.000 0.000
#> GSM1009167     3  0.0000     1.0000 0.000 0.000 1.000 0.000
#> GSM1009181     2  0.0592     0.8560 0.016 0.984 0.000 0.000
#> GSM1009195     1  0.2589     0.8355 0.884 0.116 0.000 0.000
#> GSM1009070     1  0.0000     0.9624 1.000 0.000 0.000 0.000
#> GSM1009084     2  0.0000     0.8607 0.000 1.000 0.000 0.000
#> GSM1009098     4  0.0000     0.9688 0.000 0.000 0.000 1.000
#> GSM1009112     2  0.0000     0.8607 0.000 1.000 0.000 0.000
#> GSM1009126     1  0.0000     0.9624 1.000 0.000 0.000 0.000
#> GSM1009140     4  0.0000     0.9688 0.000 0.000 0.000 1.000
#> GSM1009154     1  0.0000     0.9624 1.000 0.000 0.000 0.000
#> GSM1009168     3  0.0000     1.0000 0.000 0.000 1.000 0.000
#> GSM1009182     2  0.4331     0.6841 0.288 0.712 0.000 0.000
#> GSM1009196     1  0.0000     0.9624 1.000 0.000 0.000 0.000
#> GSM1009071     1  0.0000     0.9624 1.000 0.000 0.000 0.000
#> GSM1009085     2  0.0000     0.8607 0.000 1.000 0.000 0.000
#> GSM1009099     4  0.0000     0.9688 0.000 0.000 0.000 1.000
#> GSM1009113     2  0.0000     0.8607 0.000 1.000 0.000 0.000
#> GSM1009127     1  0.0000     0.9624 1.000 0.000 0.000 0.000
#> GSM1009141     4  0.0000     0.9688 0.000 0.000 0.000 1.000
#> GSM1009155     1  0.0000     0.9624 1.000 0.000 0.000 0.000
#> GSM1009169     3  0.0000     1.0000 0.000 0.000 1.000 0.000
#> GSM1009183     2  0.3975     0.7275 0.240 0.760 0.000 0.000
#> GSM1009197     1  0.0000     0.9624 1.000 0.000 0.000 0.000
#> GSM1009072     1  0.0000     0.9624 1.000 0.000 0.000 0.000
#> GSM1009086     2  0.0000     0.8607 0.000 1.000 0.000 0.000
#> GSM1009100     4  0.0000     0.9688 0.000 0.000 0.000 1.000
#> GSM1009114     2  0.0000     0.8607 0.000 1.000 0.000 0.000
#> GSM1009128     4  0.6240     0.5572 0.200 0.136 0.000 0.664
#> GSM1009142     4  0.0000     0.9688 0.000 0.000 0.000 1.000
#> GSM1009156     1  0.0000     0.9624 1.000 0.000 0.000 0.000
#> GSM1009170     3  0.0000     1.0000 0.000 0.000 1.000 0.000
#> GSM1009184     2  0.4331     0.6841 0.288 0.712 0.000 0.000
#> GSM1009198     1  0.4981     0.0919 0.536 0.000 0.000 0.464
#> GSM1009073     1  0.0000     0.9624 1.000 0.000 0.000 0.000
#> GSM1009087     1  0.1211     0.9301 0.960 0.040 0.000 0.000
#> GSM1009101     4  0.0000     0.9688 0.000 0.000 0.000 1.000
#> GSM1009115     2  0.0000     0.8607 0.000 1.000 0.000 0.000
#> GSM1009129     2  0.2814     0.7711 0.132 0.868 0.000 0.000
#> GSM1009143     4  0.0000     0.9688 0.000 0.000 0.000 1.000
#> GSM1009157     1  0.0000     0.9624 1.000 0.000 0.000 0.000
#> GSM1009171     3  0.0000     1.0000 0.000 0.000 1.000 0.000
#> GSM1009185     2  0.4356     0.6796 0.292 0.708 0.000 0.000
#> GSM1009199     1  0.3569     0.7113 0.804 0.196 0.000 0.000
#> GSM1009074     1  0.0000     0.9624 1.000 0.000 0.000 0.000
#> GSM1009088     1  0.3356     0.7600 0.824 0.176 0.000 0.000
#> GSM1009102     4  0.0000     0.9688 0.000 0.000 0.000 1.000
#> GSM1009116     2  0.0000     0.8607 0.000 1.000 0.000 0.000
#> GSM1009130     2  0.4564     0.5141 0.328 0.672 0.000 0.000
#> GSM1009144     4  0.0000     0.9688 0.000 0.000 0.000 1.000
#> GSM1009158     1  0.0000     0.9624 1.000 0.000 0.000 0.000
#> GSM1009172     3  0.0000     1.0000 0.000 0.000 1.000 0.000
#> GSM1009186     2  0.4331     0.6841 0.288 0.712 0.000 0.000
#> GSM1009200     1  0.0000     0.9624 1.000 0.000 0.000 0.000
#> GSM1009075     1  0.0000     0.9624 1.000 0.000 0.000 0.000
#> GSM1009089     1  0.0592     0.9498 0.984 0.016 0.000 0.000
#> GSM1009103     4  0.0000     0.9688 0.000 0.000 0.000 1.000
#> GSM1009117     2  0.0000     0.8607 0.000 1.000 0.000 0.000
#> GSM1009131     1  0.3266     0.7647 0.832 0.168 0.000 0.000
#> GSM1009145     4  0.0000     0.9688 0.000 0.000 0.000 1.000
#> GSM1009159     1  0.0000     0.9624 1.000 0.000 0.000 0.000
#> GSM1009173     3  0.0000     1.0000 0.000 0.000 1.000 0.000
#> GSM1009187     2  0.4356     0.6796 0.292 0.708 0.000 0.000
#> GSM1009201     1  0.0000     0.9624 1.000 0.000 0.000 0.000

show/hide code output

cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#>            class entropy silhouette    p1    p2 p3    p4    p5
#> GSM1009062     1  0.0000     0.9599 1.000 0.000  0 0.000 0.000
#> GSM1009076     2  0.0963     0.9166 0.000 0.964  0 0.000 0.036
#> GSM1009090     4  0.0000     0.9695 0.000 0.000  0 1.000 0.000
#> GSM1009104     5  0.0000     0.9435 0.000 0.000  0 0.000 1.000
#> GSM1009118     2  0.3895     0.5282 0.320 0.680  0 0.000 0.000
#> GSM1009132     4  0.0000     0.9695 0.000 0.000  0 1.000 0.000
#> GSM1009146     1  0.0000     0.9599 1.000 0.000  0 0.000 0.000
#> GSM1009160     3  0.0000     1.0000 0.000 0.000  1 0.000 0.000
#> GSM1009174     2  0.0000     0.9277 0.000 1.000  0 0.000 0.000
#> GSM1009188     1  0.0000     0.9599 1.000 0.000  0 0.000 0.000
#> GSM1009063     1  0.0000     0.9599 1.000 0.000  0 0.000 0.000
#> GSM1009077     2  0.0963     0.9166 0.000 0.964  0 0.000 0.036
#> GSM1009091     4  0.0000     0.9695 0.000 0.000  0 1.000 0.000
#> GSM1009105     5  0.0000     0.9435 0.000 0.000  0 0.000 1.000
#> GSM1009119     1  0.0000     0.9599 1.000 0.000  0 0.000 0.000
#> GSM1009133     4  0.0000     0.9695 0.000 0.000  0 1.000 0.000
#> GSM1009147     1  0.0000     0.9599 1.000 0.000  0 0.000 0.000
#> GSM1009161     3  0.0000     1.0000 0.000 0.000  1 0.000 0.000
#> GSM1009175     2  0.0000     0.9277 0.000 1.000  0 0.000 0.000
#> GSM1009189     1  0.0000     0.9599 1.000 0.000  0 0.000 0.000
#> GSM1009064     1  0.0000     0.9599 1.000 0.000  0 0.000 0.000
#> GSM1009078     1  0.0290     0.9528 0.992 0.000  0 0.000 0.008
#> GSM1009092     4  0.0000     0.9695 0.000 0.000  0 1.000 0.000
#> GSM1009106     5  0.0000     0.9435 0.000 0.000  0 0.000 1.000
#> GSM1009120     1  0.0000     0.9599 1.000 0.000  0 0.000 0.000
#> GSM1009134     4  0.0000     0.9695 0.000 0.000  0 1.000 0.000
#> GSM1009148     1  0.0000     0.9599 1.000 0.000  0 0.000 0.000
#> GSM1009162     3  0.0000     1.0000 0.000 0.000  1 0.000 0.000
#> GSM1009176     2  0.0000     0.9277 0.000 1.000  0 0.000 0.000
#> GSM1009190     1  0.0000     0.9599 1.000 0.000  0 0.000 0.000
#> GSM1009065     1  0.0000     0.9599 1.000 0.000  0 0.000 0.000
#> GSM1009079     2  0.0290     0.9257 0.000 0.992  0 0.000 0.008
#> GSM1009093     4  0.0000     0.9695 0.000 0.000  0 1.000 0.000
#> GSM1009107     5  0.0000     0.9435 0.000 0.000  0 0.000 1.000
#> GSM1009121     1  0.8342    -0.2556 0.320 0.140  0 0.236 0.304
#> GSM1009135     4  0.0000     0.9695 0.000 0.000  0 1.000 0.000
#> GSM1009149     1  0.0000     0.9599 1.000 0.000  0 0.000 0.000
#> GSM1009163     3  0.0000     1.0000 0.000 0.000  1 0.000 0.000
#> GSM1009177     2  0.0000     0.9277 0.000 1.000  0 0.000 0.000
#> GSM1009191     1  0.0000     0.9599 1.000 0.000  0 0.000 0.000
#> GSM1009066     1  0.0000     0.9599 1.000 0.000  0 0.000 0.000
#> GSM1009080     2  0.0963     0.9166 0.000 0.964  0 0.000 0.036
#> GSM1009094     4  0.0000     0.9695 0.000 0.000  0 1.000 0.000
#> GSM1009108     5  0.0000     0.9435 0.000 0.000  0 0.000 1.000
#> GSM1009122     2  0.2561     0.7770 0.144 0.856  0 0.000 0.000
#> GSM1009136     4  0.0000     0.9695 0.000 0.000  0 1.000 0.000
#> GSM1009150     1  0.0000     0.9599 1.000 0.000  0 0.000 0.000
#> GSM1009164     3  0.0000     1.0000 0.000 0.000  1 0.000 0.000
#> GSM1009178     2  0.0000     0.9277 0.000 1.000  0 0.000 0.000
#> GSM1009192     1  0.0000     0.9599 1.000 0.000  0 0.000 0.000
#> GSM1009067     1  0.0000     0.9599 1.000 0.000  0 0.000 0.000
#> GSM1009081     2  0.0963     0.9166 0.000 0.964  0 0.000 0.036
#> GSM1009095     4  0.0000     0.9695 0.000 0.000  0 1.000 0.000
#> GSM1009109     5  0.0000     0.9435 0.000 0.000  0 0.000 1.000
#> GSM1009123     4  0.4015     0.4502 0.348 0.000  0 0.652 0.000
#> GSM1009137     4  0.0000     0.9695 0.000 0.000  0 1.000 0.000
#> GSM1009151     1  0.0000     0.9599 1.000 0.000  0 0.000 0.000
#> GSM1009165     3  0.0000     1.0000 0.000 0.000  1 0.000 0.000
#> GSM1009179     2  0.0000     0.9277 0.000 1.000  0 0.000 0.000
#> GSM1009193     1  0.0000     0.9599 1.000 0.000  0 0.000 0.000
#> GSM1009068     1  0.0000     0.9599 1.000 0.000  0 0.000 0.000
#> GSM1009082     2  0.0963     0.9166 0.000 0.964  0 0.000 0.036
#> GSM1009096     4  0.0000     0.9695 0.000 0.000  0 1.000 0.000
#> GSM1009110     5  0.0000     0.9435 0.000 0.000  0 0.000 1.000
#> GSM1009124     1  0.0000     0.9599 1.000 0.000  0 0.000 0.000
#> GSM1009138     4  0.0000     0.9695 0.000 0.000  0 1.000 0.000
#> GSM1009152     1  0.0000     0.9599 1.000 0.000  0 0.000 0.000
#> GSM1009166     3  0.0000     1.0000 0.000 0.000  1 0.000 0.000
#> GSM1009180     2  0.0000     0.9277 0.000 1.000  0 0.000 0.000
#> GSM1009194     1  0.0000     0.9599 1.000 0.000  0 0.000 0.000
#> GSM1009069     1  0.2127     0.8418 0.892 0.108  0 0.000 0.000
#> GSM1009083     2  0.0963     0.9166 0.000 0.964  0 0.000 0.036
#> GSM1009097     4  0.0000     0.9695 0.000 0.000  0 1.000 0.000
#> GSM1009111     5  0.0000     0.9435 0.000 0.000  0 0.000 1.000
#> GSM1009125     2  0.0000     0.9277 0.000 1.000  0 0.000 0.000
#> GSM1009139     4  0.0000     0.9695 0.000 0.000  0 1.000 0.000
#> GSM1009153     1  0.0000     0.9599 1.000 0.000  0 0.000 0.000
#> GSM1009167     3  0.0000     1.0000 0.000 0.000  1 0.000 0.000
#> GSM1009181     2  0.0000     0.9277 0.000 1.000  0 0.000 0.000
#> GSM1009195     1  0.4045     0.3994 0.644 0.356  0 0.000 0.000
#> GSM1009070     1  0.0000     0.9599 1.000 0.000  0 0.000 0.000
#> GSM1009084     2  0.1270     0.9075 0.000 0.948  0 0.000 0.052
#> GSM1009098     4  0.0000     0.9695 0.000 0.000  0 1.000 0.000
#> GSM1009112     5  0.0000     0.9435 0.000 0.000  0 0.000 1.000
#> GSM1009126     1  0.0794     0.9348 0.972 0.028  0 0.000 0.000
#> GSM1009140     4  0.0000     0.9695 0.000 0.000  0 1.000 0.000
#> GSM1009154     1  0.0000     0.9599 1.000 0.000  0 0.000 0.000
#> GSM1009168     3  0.0000     1.0000 0.000 0.000  1 0.000 0.000
#> GSM1009182     2  0.0000     0.9277 0.000 1.000  0 0.000 0.000
#> GSM1009196     1  0.0000     0.9599 1.000 0.000  0 0.000 0.000
#> GSM1009071     1  0.0000     0.9599 1.000 0.000  0 0.000 0.000
#> GSM1009085     2  0.3274     0.7311 0.000 0.780  0 0.000 0.220
#> GSM1009099     4  0.0000     0.9695 0.000 0.000  0 1.000 0.000
#> GSM1009113     5  0.0000     0.9435 0.000 0.000  0 0.000 1.000
#> GSM1009127     1  0.0000     0.9599 1.000 0.000  0 0.000 0.000
#> GSM1009141     4  0.0000     0.9695 0.000 0.000  0 1.000 0.000
#> GSM1009155     1  0.0000     0.9599 1.000 0.000  0 0.000 0.000
#> GSM1009169     3  0.0000     1.0000 0.000 0.000  1 0.000 0.000
#> GSM1009183     2  0.0000     0.9277 0.000 1.000  0 0.000 0.000
#> GSM1009197     1  0.0000     0.9599 1.000 0.000  0 0.000 0.000
#> GSM1009072     1  0.0000     0.9599 1.000 0.000  0 0.000 0.000
#> GSM1009086     2  0.1478     0.8989 0.000 0.936  0 0.000 0.064
#> GSM1009100     4  0.0000     0.9695 0.000 0.000  0 1.000 0.000
#> GSM1009114     5  0.0000     0.9435 0.000 0.000  0 0.000 1.000
#> GSM1009128     4  0.4840     0.5298 0.268 0.000  0 0.676 0.056
#> GSM1009142     4  0.0000     0.9695 0.000 0.000  0 1.000 0.000
#> GSM1009156     1  0.0000     0.9599 1.000 0.000  0 0.000 0.000
#> GSM1009170     3  0.0000     1.0000 0.000 0.000  1 0.000 0.000
#> GSM1009184     2  0.0000     0.9277 0.000 1.000  0 0.000 0.000
#> GSM1009198     1  0.4294     0.0993 0.532 0.000  0 0.468 0.000
#> GSM1009073     1  0.0000     0.9599 1.000 0.000  0 0.000 0.000
#> GSM1009087     1  0.0510     0.9455 0.984 0.000  0 0.000 0.016
#> GSM1009101     4  0.0000     0.9695 0.000 0.000  0 1.000 0.000
#> GSM1009115     5  0.0000     0.9435 0.000 0.000  0 0.000 1.000
#> GSM1009129     2  0.3573     0.7580 0.152 0.812  0 0.000 0.036
#> GSM1009143     4  0.0000     0.9695 0.000 0.000  0 1.000 0.000
#> GSM1009157     1  0.0000     0.9599 1.000 0.000  0 0.000 0.000
#> GSM1009171     3  0.0000     1.0000 0.000 0.000  1 0.000 0.000
#> GSM1009185     2  0.0000     0.9277 0.000 1.000  0 0.000 0.000
#> GSM1009199     2  0.4262     0.2403 0.440 0.560  0 0.000 0.000
#> GSM1009074     1  0.0000     0.9599 1.000 0.000  0 0.000 0.000
#> GSM1009088     1  0.3495     0.7450 0.816 0.032  0 0.000 0.152
#> GSM1009102     4  0.0000     0.9695 0.000 0.000  0 1.000 0.000
#> GSM1009116     5  0.0000     0.9435 0.000 0.000  0 0.000 1.000
#> GSM1009130     5  0.3074     0.6861 0.196 0.000  0 0.000 0.804
#> GSM1009144     4  0.0000     0.9695 0.000 0.000  0 1.000 0.000
#> GSM1009158     1  0.0000     0.9599 1.000 0.000  0 0.000 0.000
#> GSM1009172     3  0.0000     1.0000 0.000 0.000  1 0.000 0.000
#> GSM1009186     2  0.0000     0.9277 0.000 1.000  0 0.000 0.000
#> GSM1009200     1  0.0000     0.9599 1.000 0.000  0 0.000 0.000
#> GSM1009075     1  0.0000     0.9599 1.000 0.000  0 0.000 0.000
#> GSM1009089     1  0.0000     0.9599 1.000 0.000  0 0.000 0.000
#> GSM1009103     4  0.0000     0.9695 0.000 0.000  0 1.000 0.000
#> GSM1009117     5  0.0000     0.9435 0.000 0.000  0 0.000 1.000
#> GSM1009131     5  0.4045     0.4394 0.356 0.000  0 0.000 0.644
#> GSM1009145     4  0.0000     0.9695 0.000 0.000  0 1.000 0.000
#> GSM1009159     1  0.0000     0.9599 1.000 0.000  0 0.000 0.000
#> GSM1009173     3  0.0000     1.0000 0.000 0.000  1 0.000 0.000
#> GSM1009187     2  0.0000     0.9277 0.000 1.000  0 0.000 0.000
#> GSM1009201     1  0.0000     0.9599 1.000 0.000  0 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
#> GSM1009062     6  0.0260      0.999 0.008 0.000  0 0.00 0.000 0.992
#> GSM1009076     2  0.1124      0.950 0.000 0.956  0 0.00 0.036 0.008
#> GSM1009090     4  0.0000      0.986 0.000 0.000  0 1.00 0.000 0.000
#> GSM1009104     5  0.0000      0.981 0.000 0.000  0 0.00 1.000 0.000
#> GSM1009118     1  0.3851      0.125 0.540 0.460  0 0.00 0.000 0.000
#> GSM1009132     4  0.0000      0.986 0.000 0.000  0 1.00 0.000 0.000
#> GSM1009146     1  0.0000      0.974 1.000 0.000  0 0.00 0.000 0.000
#> GSM1009160     3  0.0000      1.000 0.000 0.000  1 0.00 0.000 0.000
#> GSM1009174     2  0.0000      0.962 0.000 1.000  0 0.00 0.000 0.000
#> GSM1009188     1  0.0000      0.974 1.000 0.000  0 0.00 0.000 0.000
#> GSM1009063     6  0.0260      0.999 0.008 0.000  0 0.00 0.000 0.992
#> GSM1009077     2  0.1124      0.950 0.000 0.956  0 0.00 0.036 0.008
#> GSM1009091     4  0.0000      0.986 0.000 0.000  0 1.00 0.000 0.000
#> GSM1009105     5  0.0000      0.981 0.000 0.000  0 0.00 1.000 0.000
#> GSM1009119     1  0.0000      0.974 1.000 0.000  0 0.00 0.000 0.000
#> GSM1009133     4  0.0000      0.986 0.000 0.000  0 1.00 0.000 0.000
#> GSM1009147     1  0.0000      0.974 1.000 0.000  0 0.00 0.000 0.000
#> GSM1009161     3  0.0000      1.000 0.000 0.000  1 0.00 0.000 0.000
#> GSM1009175     2  0.0000      0.962 0.000 1.000  0 0.00 0.000 0.000
#> GSM1009189     1  0.0000      0.974 1.000 0.000  0 0.00 0.000 0.000
#> GSM1009064     6  0.0260      0.999 0.008 0.000  0 0.00 0.000 0.992
#> GSM1009078     1  0.1398      0.925 0.940 0.000  0 0.00 0.008 0.052
#> GSM1009092     4  0.0000      0.986 0.000 0.000  0 1.00 0.000 0.000
#> GSM1009106     5  0.0000      0.981 0.000 0.000  0 0.00 1.000 0.000
#> GSM1009120     1  0.0000      0.974 1.000 0.000  0 0.00 0.000 0.000
#> GSM1009134     4  0.0000      0.986 0.000 0.000  0 1.00 0.000 0.000
#> GSM1009148     1  0.0000      0.974 1.000 0.000  0 0.00 0.000 0.000
#> GSM1009162     3  0.0000      1.000 0.000 0.000  1 0.00 0.000 0.000
#> GSM1009176     2  0.0000      0.962 0.000 1.000  0 0.00 0.000 0.000
#> GSM1009190     1  0.0000      0.974 1.000 0.000  0 0.00 0.000 0.000
#> GSM1009065     6  0.0146      0.994 0.004 0.000  0 0.00 0.000 0.996
#> GSM1009079     2  0.0520      0.958 0.000 0.984  0 0.00 0.008 0.008
#> GSM1009093     4  0.0000      0.986 0.000 0.000  0 1.00 0.000 0.000
#> GSM1009107     5  0.0000      0.981 0.000 0.000  0 0.00 1.000 0.000
#> GSM1009121     1  0.0713      0.950 0.972 0.028  0 0.00 0.000 0.000
#> GSM1009135     4  0.0000      0.986 0.000 0.000  0 1.00 0.000 0.000
#> GSM1009149     1  0.0000      0.974 1.000 0.000  0 0.00 0.000 0.000
#> GSM1009163     3  0.0000      1.000 0.000 0.000  1 0.00 0.000 0.000
#> GSM1009177     2  0.0000      0.962 0.000 1.000  0 0.00 0.000 0.000
#> GSM1009191     1  0.0000      0.974 1.000 0.000  0 0.00 0.000 0.000
#> GSM1009066     6  0.0260      0.999 0.008 0.000  0 0.00 0.000 0.992
#> GSM1009080     2  0.1124      0.950 0.000 0.956  0 0.00 0.036 0.008
#> GSM1009094     4  0.0000      0.986 0.000 0.000  0 1.00 0.000 0.000
#> GSM1009108     5  0.0000      0.981 0.000 0.000  0 0.00 1.000 0.000
#> GSM1009122     2  0.2378      0.796 0.152 0.848  0 0.00 0.000 0.000
#> GSM1009136     4  0.0000      0.986 0.000 0.000  0 1.00 0.000 0.000
#> GSM1009150     1  0.0000      0.974 1.000 0.000  0 0.00 0.000 0.000
#> GSM1009164     3  0.0000      1.000 0.000 0.000  1 0.00 0.000 0.000
#> GSM1009178     2  0.0000      0.962 0.000 1.000  0 0.00 0.000 0.000
#> GSM1009192     1  0.0000      0.974 1.000 0.000  0 0.00 0.000 0.000
#> GSM1009067     6  0.0260      0.999 0.008 0.000  0 0.00 0.000 0.992
#> GSM1009081     2  0.1124      0.950 0.000 0.956  0 0.00 0.036 0.008
#> GSM1009095     4  0.0000      0.986 0.000 0.000  0 1.00 0.000 0.000
#> GSM1009109     5  0.0000      0.981 0.000 0.000  0 0.00 1.000 0.000
#> GSM1009123     1  0.0000      0.974 1.000 0.000  0 0.00 0.000 0.000
#> GSM1009137     4  0.0000      0.986 0.000 0.000  0 1.00 0.000 0.000
#> GSM1009151     1  0.0000      0.974 1.000 0.000  0 0.00 0.000 0.000
#> GSM1009165     3  0.0000      1.000 0.000 0.000  1 0.00 0.000 0.000
#> GSM1009179     2  0.0000      0.962 0.000 1.000  0 0.00 0.000 0.000
#> GSM1009193     1  0.0000      0.974 1.000 0.000  0 0.00 0.000 0.000
#> GSM1009068     6  0.0260      0.999 0.008 0.000  0 0.00 0.000 0.992
#> GSM1009082     2  0.1124      0.950 0.000 0.956  0 0.00 0.036 0.008
#> GSM1009096     4  0.0000      0.986 0.000 0.000  0 1.00 0.000 0.000
#> GSM1009110     5  0.0000      0.981 0.000 0.000  0 0.00 1.000 0.000
#> GSM1009124     1  0.0000      0.974 1.000 0.000  0 0.00 0.000 0.000
#> GSM1009138     4  0.0000      0.986 0.000 0.000  0 1.00 0.000 0.000
#> GSM1009152     1  0.0000      0.974 1.000 0.000  0 0.00 0.000 0.000
#> GSM1009166     3  0.0000      1.000 0.000 0.000  1 0.00 0.000 0.000
#> GSM1009180     2  0.0000      0.962 0.000 1.000  0 0.00 0.000 0.000
#> GSM1009194     1  0.0000      0.974 1.000 0.000  0 0.00 0.000 0.000
#> GSM1009069     6  0.0000      0.988 0.000 0.000  0 0.00 0.000 1.000
#> GSM1009083     2  0.1124      0.950 0.000 0.956  0 0.00 0.036 0.008
#> GSM1009097     4  0.0000      0.986 0.000 0.000  0 1.00 0.000 0.000
#> GSM1009111     5  0.0000      0.981 0.000 0.000  0 0.00 1.000 0.000
#> GSM1009125     2  0.0000      0.962 0.000 1.000  0 0.00 0.000 0.000
#> GSM1009139     4  0.0000      0.986 0.000 0.000  0 1.00 0.000 0.000
#> GSM1009153     1  0.0000      0.974 1.000 0.000  0 0.00 0.000 0.000
#> GSM1009167     3  0.0000      1.000 0.000 0.000  1 0.00 0.000 0.000
#> GSM1009181     2  0.0000      0.962 0.000 1.000  0 0.00 0.000 0.000
#> GSM1009195     1  0.0000      0.974 1.000 0.000  0 0.00 0.000 0.000
#> GSM1009070     6  0.0260      0.999 0.008 0.000  0 0.00 0.000 0.992
#> GSM1009084     2  0.1398      0.940 0.000 0.940  0 0.00 0.052 0.008
#> GSM1009098     4  0.0000      0.986 0.000 0.000  0 1.00 0.000 0.000
#> GSM1009112     5  0.0000      0.981 0.000 0.000  0 0.00 1.000 0.000
#> GSM1009126     1  0.0000      0.974 1.000 0.000  0 0.00 0.000 0.000
#> GSM1009140     4  0.0000      0.986 0.000 0.000  0 1.00 0.000 0.000
#> GSM1009154     1  0.0000      0.974 1.000 0.000  0 0.00 0.000 0.000
#> GSM1009168     3  0.0000      1.000 0.000 0.000  1 0.00 0.000 0.000
#> GSM1009182     2  0.0000      0.962 0.000 1.000  0 0.00 0.000 0.000
#> GSM1009196     1  0.0000      0.974 1.000 0.000  0 0.00 0.000 0.000
#> GSM1009071     6  0.0260      0.999 0.008 0.000  0 0.00 0.000 0.992
#> GSM1009085     2  0.3161      0.757 0.000 0.776  0 0.00 0.216 0.008
#> GSM1009099     4  0.0000      0.986 0.000 0.000  0 1.00 0.000 0.000
#> GSM1009113     5  0.0000      0.981 0.000 0.000  0 0.00 1.000 0.000
#> GSM1009127     1  0.0000      0.974 1.000 0.000  0 0.00 0.000 0.000
#> GSM1009141     4  0.0000      0.986 0.000 0.000  0 1.00 0.000 0.000
#> GSM1009155     1  0.0000      0.974 1.000 0.000  0 0.00 0.000 0.000
#> GSM1009169     3  0.0000      1.000 0.000 0.000  1 0.00 0.000 0.000
#> GSM1009183     2  0.0000      0.962 0.000 1.000  0 0.00 0.000 0.000
#> GSM1009197     1  0.0000      0.974 1.000 0.000  0 0.00 0.000 0.000
#> GSM1009072     6  0.0260      0.999 0.008 0.000  0 0.00 0.000 0.992
#> GSM1009086     2  0.1524      0.934 0.000 0.932  0 0.00 0.060 0.008
#> GSM1009100     4  0.0000      0.986 0.000 0.000  0 1.00 0.000 0.000
#> GSM1009114     5  0.0000      0.981 0.000 0.000  0 0.00 1.000 0.000
#> GSM1009128     4  0.4309      0.515 0.296 0.000  0 0.66 0.044 0.000
#> GSM1009142     4  0.0000      0.986 0.000 0.000  0 1.00 0.000 0.000
#> GSM1009156     1  0.0000      0.974 1.000 0.000  0 0.00 0.000 0.000
#> GSM1009170     3  0.0000      1.000 0.000 0.000  1 0.00 0.000 0.000
#> GSM1009184     2  0.0000      0.962 0.000 1.000  0 0.00 0.000 0.000
#> GSM1009198     1  0.0000      0.974 1.000 0.000  0 0.00 0.000 0.000
#> GSM1009073     6  0.0260      0.999 0.008 0.000  0 0.00 0.000 0.992
#> GSM1009087     1  0.1168      0.941 0.956 0.000  0 0.00 0.016 0.028
#> GSM1009101     4  0.0000      0.986 0.000 0.000  0 1.00 0.000 0.000
#> GSM1009115     5  0.0000      0.981 0.000 0.000  0 0.00 1.000 0.000
#> GSM1009129     2  0.3385      0.793 0.144 0.812  0 0.00 0.036 0.008
#> GSM1009143     4  0.0000      0.986 0.000 0.000  0 1.00 0.000 0.000
#> GSM1009157     1  0.0000      0.974 1.000 0.000  0 0.00 0.000 0.000
#> GSM1009171     3  0.0000      1.000 0.000 0.000  1 0.00 0.000 0.000
#> GSM1009185     2  0.0000      0.962 0.000 1.000  0 0.00 0.000 0.000
#> GSM1009199     1  0.0000      0.974 1.000 0.000  0 0.00 0.000 0.000
#> GSM1009074     6  0.0260      0.999 0.008 0.000  0 0.00 0.000 0.992
#> GSM1009088     1  0.3603      0.781 0.808 0.008  0 0.00 0.112 0.072
#> GSM1009102     4  0.0000      0.986 0.000 0.000  0 1.00 0.000 0.000
#> GSM1009116     5  0.0000      0.981 0.000 0.000  0 0.00 1.000 0.000
#> GSM1009130     5  0.2948      0.717 0.188 0.000  0 0.00 0.804 0.008
#> GSM1009144     4  0.0000      0.986 0.000 0.000  0 1.00 0.000 0.000
#> GSM1009158     1  0.0000      0.974 1.000 0.000  0 0.00 0.000 0.000
#> GSM1009172     3  0.0000      1.000 0.000 0.000  1 0.00 0.000 0.000
#> GSM1009186     2  0.0000      0.962 0.000 1.000  0 0.00 0.000 0.000
#> GSM1009200     1  0.0000      0.974 1.000 0.000  0 0.00 0.000 0.000
#> GSM1009075     6  0.0260      0.999 0.008 0.000  0 0.00 0.000 0.992
#> GSM1009089     1  0.2762      0.756 0.804 0.000  0 0.00 0.000 0.196
#> GSM1009103     4  0.0000      0.986 0.000 0.000  0 1.00 0.000 0.000
#> GSM1009117     5  0.0000      0.981 0.000 0.000  0 0.00 1.000 0.000
#> GSM1009131     1  0.0000      0.974 1.000 0.000  0 0.00 0.000 0.000
#> GSM1009145     4  0.0000      0.986 0.000 0.000  0 1.00 0.000 0.000
#> GSM1009159     1  0.0000      0.974 1.000 0.000  0 0.00 0.000 0.000
#> GSM1009173     3  0.0000      1.000 0.000 0.000  1 0.00 0.000 0.000
#> GSM1009187     2  0.0000      0.962 0.000 1.000  0 0.00 0.000 0.000
#> GSM1009201     1  0.0000      0.974 1.000 0.000  0 0.00 0.000 0.000

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

consensus_heatmap(res, k = 2)

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

consensus_heatmap(res, k = 3)

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

consensus_heatmap(res, k = 4)

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

consensus_heatmap(res, k = 5)

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

consensus_heatmap(res, k = 6)

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

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

membership_heatmap(res, k = 2)

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

membership_heatmap(res, k = 3)

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

membership_heatmap(res, k = 4)

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

membership_heatmap(res, k = 5)

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

membership_heatmap(res, k = 6)

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

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

Signature heatmaps where rows are scaled:

get_signatures(res, k = 2)

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

get_signatures(res, k = 3)

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

get_signatures(res, k = 4)

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

get_signatures(res, k = 5)

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

get_signatures(res, k = 6)

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

Signature heatmaps where rows are not scaled:

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

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

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

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

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

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

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

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

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

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

Compare the overlap of signatures from different k:

compare_signatures(res)

plot of chunk MAD-pam-signature_compare

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

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

An example of the output of tb is:

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

The columns in tb are:

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

UMAP plot which shows how samples are separated.

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

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

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

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

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

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

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

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

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

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

Following heatmap shows how subgroups are split when increasing k:

collect_classes(res)

plot of chunk MAD-pam-collect-classes

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

test_to_known_factors(res)
#>           n temperature(p) time(p) specimen(p) k
#> MAD:pam 139          0.817   0.997    1.14e-17 2
#> MAD:pam 137          0.983   1.000    1.97e-42 3
#> MAD:pam 136          1.000   1.000    3.30e-62 4
#> MAD:pam 134          1.000   1.000    1.83e-79 5
#> MAD:pam 139          1.000   1.000   3.89e-105 6

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


MAD:mclust**

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

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

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

res
#> A 'ConsensusPartition' object with k = 2, 3, 4, 5, 6.
#>   On a matrix with 51941 rows and 140 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 3.
#> 
#> Following methods can be applied to this 'ConsensusPartition' object:
#>  [1] "cola_report"             "collect_classes"         "collect_plots"          
#>  [4] "collect_stats"           "colnames"                "compare_signatures"     
#>  [7] "consensus_heatmap"       "dimension_reduction"     "functional_enrichment"  
#> [10] "get_anno_col"            "get_anno"                "get_classes"            
#> [13] "get_consensus"           "get_matrix"              "get_membership"         
#> [16] "get_param"               "get_signatures"          "get_stats"              
#> [19] "is_best_k"               "is_stable_k"             "membership_heatmap"     
#> [22] "ncol"                    "nrow"                    "plot_ecdf"              
#> [25] "rownames"                "select_partition_number" "show"                   
#> [28] "suggest_best_k"          "test_to_known_factors"

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

collect_plots(res)

plot of chunk MAD-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.307           0.694       0.801         0.3785 0.602   0.602
#> 3 3 1.000           0.987       0.993         0.2201 0.572   0.456
#> 4 4 0.772           0.893       0.913         0.2832 0.878   0.775
#> 5 5 0.703           0.678       0.818         0.2349 0.900   0.764
#> 6 6 0.819           0.614       0.852         0.0584 0.907   0.717

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
#> GSM1009062     2  0.9775     0.9039 0.412 0.588
#> GSM1009076     2  0.9866     0.8872 0.432 0.568
#> GSM1009090     1  0.8763     0.6323 0.704 0.296
#> GSM1009104     1  0.0000     0.7671 1.000 0.000
#> GSM1009118     1  0.0000     0.7671 1.000 0.000
#> GSM1009132     1  0.8763     0.6323 0.704 0.296
#> GSM1009146     1  0.7674     0.3535 0.776 0.224
#> GSM1009160     2  0.8763     0.8651 0.296 0.704
#> GSM1009174     1  0.3114     0.7229 0.944 0.056
#> GSM1009188     1  0.2778     0.7343 0.952 0.048
#> GSM1009063     2  0.9775     0.9039 0.412 0.588
#> GSM1009077     2  0.9866     0.8872 0.432 0.568
#> GSM1009091     1  0.8763     0.6323 0.704 0.296
#> GSM1009105     1  0.0000     0.7671 1.000 0.000
#> GSM1009119     1  0.0000     0.7671 1.000 0.000
#> GSM1009133     1  0.8763     0.6323 0.704 0.296
#> GSM1009147     1  0.8144     0.2425 0.748 0.252
#> GSM1009161     2  0.8763     0.8651 0.296 0.704
#> GSM1009175     1  0.1184     0.7590 0.984 0.016
#> GSM1009189     1  0.0672     0.7635 0.992 0.008
#> GSM1009064     2  0.9775     0.9039 0.412 0.588
#> GSM1009078     1  0.9988    -0.6960 0.520 0.480
#> GSM1009092     1  0.8763     0.6323 0.704 0.296
#> GSM1009106     1  0.0000     0.7671 1.000 0.000
#> GSM1009120     1  0.0672     0.7645 0.992 0.008
#> GSM1009134     1  0.8763     0.6323 0.704 0.296
#> GSM1009148     1  0.7674     0.3513 0.776 0.224
#> GSM1009162     2  0.8763     0.8651 0.296 0.704
#> GSM1009176     1  0.2778     0.7315 0.952 0.048
#> GSM1009190     1  0.5737     0.6023 0.864 0.136
#> GSM1009065     2  0.9775     0.9039 0.412 0.588
#> GSM1009079     1  0.4815     0.6564 0.896 0.104
#> GSM1009093     1  0.8763     0.6323 0.704 0.296
#> GSM1009107     1  0.0000     0.7671 1.000 0.000
#> GSM1009121     1  0.0000     0.7671 1.000 0.000
#> GSM1009135     1  0.8763     0.6323 0.704 0.296
#> GSM1009149     1  0.2423     0.7399 0.960 0.040
#> GSM1009163     2  0.8763     0.8651 0.296 0.704
#> GSM1009177     1  0.2778     0.7315 0.952 0.048
#> GSM1009191     1  0.6531     0.5297 0.832 0.168
#> GSM1009066     2  0.9775     0.9039 0.412 0.588
#> GSM1009080     1  0.9933    -0.6233 0.548 0.452
#> GSM1009094     1  0.8763     0.6323 0.704 0.296
#> GSM1009108     1  0.0000     0.7671 1.000 0.000
#> GSM1009122     1  0.0000     0.7671 1.000 0.000
#> GSM1009136     1  0.8763     0.6323 0.704 0.296
#> GSM1009150     1  0.5059     0.6409 0.888 0.112
#> GSM1009164     2  0.8763     0.8651 0.296 0.704
#> GSM1009178     1  0.1184     0.7590 0.984 0.016
#> GSM1009192     1  0.0938     0.7621 0.988 0.012
#> GSM1009067     2  0.9775     0.9039 0.412 0.588
#> GSM1009081     1  0.8813     0.0118 0.700 0.300
#> GSM1009095     1  0.8499     0.6404 0.724 0.276
#> GSM1009109     1  0.0000     0.7671 1.000 0.000
#> GSM1009123     1  0.0000     0.7671 1.000 0.000
#> GSM1009137     1  0.8763     0.6323 0.704 0.296
#> GSM1009151     1  0.5178     0.6298 0.884 0.116
#> GSM1009165     2  0.8763     0.8651 0.296 0.704
#> GSM1009179     1  0.1414     0.7562 0.980 0.020
#> GSM1009193     1  0.0672     0.7635 0.992 0.008
#> GSM1009068     2  0.9775     0.9039 0.412 0.588
#> GSM1009082     2  0.9850     0.8908 0.428 0.572
#> GSM1009096     1  0.8763     0.6323 0.704 0.296
#> GSM1009110     1  0.0000     0.7671 1.000 0.000
#> GSM1009124     1  0.0000     0.7671 1.000 0.000
#> GSM1009138     1  0.8763     0.6323 0.704 0.296
#> GSM1009152     1  0.9358    -0.2550 0.648 0.352
#> GSM1009166     2  0.8763     0.8651 0.296 0.704
#> GSM1009180     1  0.0000     0.7671 1.000 0.000
#> GSM1009194     1  0.1843     0.7520 0.972 0.028
#> GSM1009069     2  0.9775     0.9039 0.412 0.588
#> GSM1009083     2  0.9850     0.8908 0.428 0.572
#> GSM1009097     1  0.8763     0.6323 0.704 0.296
#> GSM1009111     1  0.0000     0.7671 1.000 0.000
#> GSM1009125     1  0.0000     0.7671 1.000 0.000
#> GSM1009139     1  0.8763     0.6323 0.704 0.296
#> GSM1009153     1  0.5519     0.6066 0.872 0.128
#> GSM1009167     2  0.8763     0.8651 0.296 0.704
#> GSM1009181     1  0.0672     0.7638 0.992 0.008
#> GSM1009195     1  0.5059     0.6474 0.888 0.112
#> GSM1009070     2  0.9775     0.9039 0.412 0.588
#> GSM1009084     2  0.9866     0.8872 0.432 0.568
#> GSM1009098     1  0.8763     0.6323 0.704 0.296
#> GSM1009112     1  0.0000     0.7671 1.000 0.000
#> GSM1009126     1  0.0000     0.7671 1.000 0.000
#> GSM1009140     1  0.8763     0.6323 0.704 0.296
#> GSM1009154     1  0.8661     0.0764 0.712 0.288
#> GSM1009168     2  0.8763     0.8651 0.296 0.704
#> GSM1009182     1  0.0376     0.7656 0.996 0.004
#> GSM1009196     1  0.2603     0.7387 0.956 0.044
#> GSM1009071     2  0.9775     0.9039 0.412 0.588
#> GSM1009085     2  0.9866     0.8872 0.432 0.568
#> GSM1009099     1  0.8763     0.6323 0.704 0.296
#> GSM1009113     1  0.0000     0.7671 1.000 0.000
#> GSM1009127     1  0.0000     0.7671 1.000 0.000
#> GSM1009141     1  0.8763     0.6323 0.704 0.296
#> GSM1009155     1  0.2423     0.7395 0.960 0.040
#> GSM1009169     2  0.8763     0.8651 0.296 0.704
#> GSM1009183     1  0.0000     0.7671 1.000 0.000
#> GSM1009197     1  0.0938     0.7621 0.988 0.012
#> GSM1009072     2  0.9775     0.9039 0.412 0.588
#> GSM1009086     2  0.9881     0.8811 0.436 0.564
#> GSM1009100     1  0.8763     0.6323 0.704 0.296
#> GSM1009114     1  0.0000     0.7671 1.000 0.000
#> GSM1009128     1  0.0000     0.7671 1.000 0.000
#> GSM1009142     1  0.8763     0.6323 0.704 0.296
#> GSM1009156     2  0.9988     0.7822 0.480 0.520
#> GSM1009170     2  0.8763     0.8651 0.296 0.704
#> GSM1009184     1  0.4690     0.6628 0.900 0.100
#> GSM1009198     1  0.3584     0.7122 0.932 0.068
#> GSM1009073     2  0.9775     0.9039 0.412 0.588
#> GSM1009087     2  0.9850     0.8908 0.428 0.572
#> GSM1009101     1  0.8763     0.6323 0.704 0.296
#> GSM1009115     1  0.0000     0.7671 1.000 0.000
#> GSM1009129     1  0.0000     0.7671 1.000 0.000
#> GSM1009143     1  0.8763     0.6323 0.704 0.296
#> GSM1009157     1  0.7674     0.3600 0.776 0.224
#> GSM1009171     2  0.8763     0.8651 0.296 0.704
#> GSM1009185     1  0.0376     0.7656 0.996 0.004
#> GSM1009199     1  0.4562     0.6734 0.904 0.096
#> GSM1009074     2  0.9775     0.9039 0.412 0.588
#> GSM1009088     2  0.9881     0.8793 0.436 0.564
#> GSM1009102     1  0.8763     0.6323 0.704 0.296
#> GSM1009116     1  0.0000     0.7671 1.000 0.000
#> GSM1009130     1  0.0376     0.7654 0.996 0.004
#> GSM1009144     1  0.8763     0.6323 0.704 0.296
#> GSM1009158     1  0.8081     0.2636 0.752 0.248
#> GSM1009172     2  0.8763     0.8651 0.296 0.704
#> GSM1009186     1  0.3733     0.7033 0.928 0.072
#> GSM1009200     1  0.3431     0.7168 0.936 0.064
#> GSM1009075     2  0.9775     0.9039 0.412 0.588
#> GSM1009089     1  0.9963    -0.6537 0.536 0.464
#> GSM1009103     1  0.8763     0.6323 0.704 0.296
#> GSM1009117     1  0.0000     0.7671 1.000 0.000
#> GSM1009131     1  0.0000     0.7671 1.000 0.000
#> GSM1009145     1  0.8763     0.6323 0.704 0.296
#> GSM1009159     1  0.0938     0.7616 0.988 0.012
#> GSM1009173     2  0.8763     0.8651 0.296 0.704
#> GSM1009187     1  0.0938     0.7614 0.988 0.012
#> GSM1009201     1  0.2948     0.7301 0.948 0.052

show/hide code output

cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#>            class entropy silhouette    p1    p2    p3
#> GSM1009062     2  0.0237      0.989 0.000 0.996 0.004
#> GSM1009076     2  0.0000      0.990 0.000 1.000 0.000
#> GSM1009090     1  0.0000      1.000 1.000 0.000 0.000
#> GSM1009104     2  0.0747      0.982 0.016 0.984 0.000
#> GSM1009118     2  0.0892      0.982 0.020 0.980 0.000
#> GSM1009132     1  0.0000      1.000 1.000 0.000 0.000
#> GSM1009146     2  0.0237      0.990 0.004 0.996 0.000
#> GSM1009160     3  0.0000      1.000 0.000 0.000 1.000
#> GSM1009174     2  0.0000      0.990 0.000 1.000 0.000
#> GSM1009188     2  0.0237      0.990 0.004 0.996 0.000
#> GSM1009063     2  0.0237      0.989 0.000 0.996 0.004
#> GSM1009077     2  0.0000      0.990 0.000 1.000 0.000
#> GSM1009091     1  0.0000      1.000 1.000 0.000 0.000
#> GSM1009105     2  0.0747      0.982 0.016 0.984 0.000
#> GSM1009119     2  0.0237      0.990 0.004 0.996 0.000
#> GSM1009133     1  0.0000      1.000 1.000 0.000 0.000
#> GSM1009147     2  0.0237      0.990 0.004 0.996 0.000
#> GSM1009161     3  0.0000      1.000 0.000 0.000 1.000
#> GSM1009175     2  0.0000      0.990 0.000 1.000 0.000
#> GSM1009189     2  0.0237      0.990 0.004 0.996 0.000
#> GSM1009064     2  0.0237      0.989 0.000 0.996 0.004
#> GSM1009078     2  0.0000      0.990 0.000 1.000 0.000
#> GSM1009092     1  0.0000      1.000 1.000 0.000 0.000
#> GSM1009106     2  0.0747      0.982 0.016 0.984 0.000
#> GSM1009120     2  0.0237      0.990 0.004 0.996 0.000
#> GSM1009134     1  0.0000      1.000 1.000 0.000 0.000
#> GSM1009148     2  0.0237      0.990 0.004 0.996 0.000
#> GSM1009162     3  0.0000      1.000 0.000 0.000 1.000
#> GSM1009176     2  0.0000      0.990 0.000 1.000 0.000
#> GSM1009190     2  0.0237      0.990 0.004 0.996 0.000
#> GSM1009065     2  0.0237      0.989 0.000 0.996 0.004
#> GSM1009079     2  0.0000      0.990 0.000 1.000 0.000
#> GSM1009093     1  0.0000      1.000 1.000 0.000 0.000
#> GSM1009107     2  0.0747      0.982 0.016 0.984 0.000
#> GSM1009121     2  0.0892      0.982 0.020 0.980 0.000
#> GSM1009135     1  0.0000      1.000 1.000 0.000 0.000
#> GSM1009149     2  0.0237      0.990 0.004 0.996 0.000
#> GSM1009163     3  0.0000      1.000 0.000 0.000 1.000
#> GSM1009177     2  0.0000      0.990 0.000 1.000 0.000
#> GSM1009191     2  0.0237      0.990 0.004 0.996 0.000
#> GSM1009066     2  0.0237      0.989 0.000 0.996 0.004
#> GSM1009080     2  0.0000      0.990 0.000 1.000 0.000
#> GSM1009094     1  0.0000      1.000 1.000 0.000 0.000
#> GSM1009108     2  0.0747      0.982 0.016 0.984 0.000
#> GSM1009122     2  0.0892      0.982 0.020 0.980 0.000
#> GSM1009136     1  0.0000      1.000 1.000 0.000 0.000
#> GSM1009150     2  0.0237      0.990 0.004 0.996 0.000
#> GSM1009164     3  0.0000      1.000 0.000 0.000 1.000
#> GSM1009178     2  0.0000      0.990 0.000 1.000 0.000
#> GSM1009192     2  0.0237      0.990 0.004 0.996 0.000
#> GSM1009067     2  0.0237      0.989 0.000 0.996 0.004
#> GSM1009081     2  0.0000      0.990 0.000 1.000 0.000
#> GSM1009095     2  0.6140      0.342 0.404 0.596 0.000
#> GSM1009109     2  0.0747      0.982 0.016 0.984 0.000
#> GSM1009123     2  0.0892      0.982 0.020 0.980 0.000
#> GSM1009137     1  0.0000      1.000 1.000 0.000 0.000
#> GSM1009151     2  0.0237      0.990 0.004 0.996 0.000
#> GSM1009165     3  0.0000      1.000 0.000 0.000 1.000
#> GSM1009179     2  0.0000      0.990 0.000 1.000 0.000
#> GSM1009193     2  0.0237      0.990 0.004 0.996 0.000
#> GSM1009068     2  0.0237      0.989 0.000 0.996 0.004
#> GSM1009082     2  0.0000      0.990 0.000 1.000 0.000
#> GSM1009096     1  0.0000      1.000 1.000 0.000 0.000
#> GSM1009110     2  0.0747      0.982 0.016 0.984 0.000
#> GSM1009124     2  0.0424      0.989 0.008 0.992 0.000
#> GSM1009138     1  0.0000      1.000 1.000 0.000 0.000
#> GSM1009152     2  0.0237      0.990 0.004 0.996 0.000
#> GSM1009166     3  0.0000      1.000 0.000 0.000 1.000
#> GSM1009180     2  0.0000      0.990 0.000 1.000 0.000
#> GSM1009194     2  0.0237      0.990 0.004 0.996 0.000
#> GSM1009069     2  0.0237      0.989 0.000 0.996 0.004
#> GSM1009083     2  0.0000      0.990 0.000 1.000 0.000
#> GSM1009097     1  0.0000      1.000 1.000 0.000 0.000
#> GSM1009111     2  0.0747      0.982 0.016 0.984 0.000
#> GSM1009125     2  0.0892      0.982 0.020 0.980 0.000
#> GSM1009139     1  0.0000      1.000 1.000 0.000 0.000
#> GSM1009153     2  0.0237      0.990 0.004 0.996 0.000
#> GSM1009167     3  0.0000      1.000 0.000 0.000 1.000
#> GSM1009181     2  0.0000      0.990 0.000 1.000 0.000
#> GSM1009195     2  0.0237      0.990 0.004 0.996 0.000
#> GSM1009070     2  0.0237      0.989 0.000 0.996 0.004
#> GSM1009084     2  0.0000      0.990 0.000 1.000 0.000
#> GSM1009098     1  0.0000      1.000 1.000 0.000 0.000
#> GSM1009112     2  0.0747      0.982 0.016 0.984 0.000
#> GSM1009126     2  0.0892      0.982 0.020 0.980 0.000
#> GSM1009140     1  0.0000      1.000 1.000 0.000 0.000
#> GSM1009154     2  0.0237      0.990 0.004 0.996 0.000
#> GSM1009168     3  0.0000      1.000 0.000 0.000 1.000
#> GSM1009182     2  0.0000      0.990 0.000 1.000 0.000
#> GSM1009196     2  0.0237      0.990 0.004 0.996 0.000
#> GSM1009071     2  0.0237      0.989 0.000 0.996 0.004
#> GSM1009085     2  0.0000      0.990 0.000 1.000 0.000
#> GSM1009099     1  0.0000      1.000 1.000 0.000 0.000
#> GSM1009113     2  0.0747      0.982 0.016 0.984 0.000
#> GSM1009127     2  0.0237      0.990 0.004 0.996 0.000
#> GSM1009141     1  0.0000      1.000 1.000 0.000 0.000
#> GSM1009155     2  0.0237      0.990 0.004 0.996 0.000
#> GSM1009169     3  0.0000      1.000 0.000 0.000 1.000
#> GSM1009183     2  0.0000      0.990 0.000 1.000 0.000
#> GSM1009197     2  0.0237      0.990 0.004 0.996 0.000
#> GSM1009072     2  0.0237      0.989 0.000 0.996 0.004
#> GSM1009086     2  0.0000      0.990 0.000 1.000 0.000
#> GSM1009100     1  0.0000      1.000 1.000 0.000 0.000
#> GSM1009114     2  0.0747      0.982 0.016 0.984 0.000
#> GSM1009128     2  0.0892      0.982 0.020 0.980 0.000
#> GSM1009142     1  0.0000      1.000 1.000 0.000 0.000
#> GSM1009156     2  0.0237      0.990 0.004 0.996 0.000
#> GSM1009170     3  0.0000      1.000 0.000 0.000 1.000
#> GSM1009184     2  0.0000      0.990 0.000 1.000 0.000
#> GSM1009198     2  0.0237      0.990 0.004 0.996 0.000
#> GSM1009073     2  0.0237      0.989 0.000 0.996 0.004
#> GSM1009087     2  0.0000      0.990 0.000 1.000 0.000
#> GSM1009101     1  0.0000      1.000 1.000 0.000 0.000
#> GSM1009115     2  0.0747      0.982 0.016 0.984 0.000
#> GSM1009129     2  0.0983      0.982 0.016 0.980 0.004
#> GSM1009143     1  0.0000      1.000 1.000 0.000 0.000
#> GSM1009157     2  0.0237      0.990 0.004 0.996 0.000
#> GSM1009171     3  0.0000      1.000 0.000 0.000 1.000
#> GSM1009185     2  0.0000      0.990 0.000 1.000 0.000
#> GSM1009199     2  0.0237      0.990 0.004 0.996 0.000
#> GSM1009074     2  0.0237      0.989 0.000 0.996 0.004
#> GSM1009088     2  0.0000      0.990 0.000 1.000 0.000
#> GSM1009102     1  0.0000      1.000 1.000 0.000 0.000
#> GSM1009116     2  0.0747      0.982 0.016 0.984 0.000
#> GSM1009130     2  0.0237      0.989 0.000 0.996 0.004
#> GSM1009144     1  0.0000      1.000 1.000 0.000 0.000
#> GSM1009158     2  0.0237      0.990 0.004 0.996 0.000
#> GSM1009172     3  0.0000      1.000 0.000 0.000 1.000
#> GSM1009186     2  0.0000      0.990 0.000 1.000 0.000
#> GSM1009200     2  0.0237      0.990 0.004 0.996 0.000
#> GSM1009075     2  0.0237      0.989 0.000 0.996 0.004
#> GSM1009089     2  0.0000      0.990 0.000 1.000 0.000
#> GSM1009103     1  0.0000      1.000 1.000 0.000 0.000
#> GSM1009117     2  0.0747      0.982 0.016 0.984 0.000
#> GSM1009131     2  0.0829      0.985 0.012 0.984 0.004
#> GSM1009145     1  0.0000      1.000 1.000 0.000 0.000
#> GSM1009159     2  0.0237      0.990 0.004 0.996 0.000
#> GSM1009173     3  0.0000      1.000 0.000 0.000 1.000
#> GSM1009187     2  0.0237      0.989 0.000 0.996 0.004
#> GSM1009201     2  0.0237      0.990 0.004 0.996 0.000

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>            class entropy silhouette    p1    p2 p3    p4
#> GSM1009062     1  0.4564      0.609 0.672 0.328  0 0.000
#> GSM1009076     1  0.1118      0.879 0.964 0.036  0 0.000
#> GSM1009090     4  0.0000      1.000 0.000 0.000  0 1.000
#> GSM1009104     2  0.4564      1.000 0.328 0.672  0 0.000
#> GSM1009118     1  0.0000      0.885 1.000 0.000  0 0.000
#> GSM1009132     4  0.0000      1.000 0.000 0.000  0 1.000
#> GSM1009146     1  0.1940      0.855 0.924 0.076  0 0.000
#> GSM1009160     3  0.0000      1.000 0.000 0.000  1 0.000
#> GSM1009174     1  0.0592      0.879 0.984 0.016  0 0.000
#> GSM1009188     1  0.0469      0.885 0.988 0.012  0 0.000
#> GSM1009063     1  0.4564      0.609 0.672 0.328  0 0.000
#> GSM1009077     1  0.1118      0.879 0.964 0.036  0 0.000
#> GSM1009091     4  0.0000      1.000 0.000 0.000  0 1.000
#> GSM1009105     2  0.4564      1.000 0.328 0.672  0 0.000
#> GSM1009119     1  0.1637      0.864 0.940 0.060  0 0.000
#> GSM1009133     4  0.0000      1.000 0.000 0.000  0 1.000
#> GSM1009147     1  0.0707      0.885 0.980 0.020  0 0.000
#> GSM1009161     3  0.0000      1.000 0.000 0.000  1 0.000
#> GSM1009175     1  0.0592      0.879 0.984 0.016  0 0.000
#> GSM1009189     1  0.0469      0.885 0.988 0.012  0 0.000
#> GSM1009064     1  0.4564      0.609 0.672 0.328  0 0.000
#> GSM1009078     1  0.0592      0.886 0.984 0.016  0 0.000
#> GSM1009092     4  0.0000      1.000 0.000 0.000  0 1.000
#> GSM1009106     2  0.4564      1.000 0.328 0.672  0 0.000
#> GSM1009120     1  0.2011      0.851 0.920 0.080  0 0.000
#> GSM1009134     4  0.0000      1.000 0.000 0.000  0 1.000
#> GSM1009148     1  0.1940      0.855 0.924 0.076  0 0.000
#> GSM1009162     3  0.0000      1.000 0.000 0.000  1 0.000
#> GSM1009176     1  0.0592      0.879 0.984 0.016  0 0.000
#> GSM1009190     1  0.1022      0.881 0.968 0.032  0 0.000
#> GSM1009065     1  0.4564      0.609 0.672 0.328  0 0.000
#> GSM1009079     1  0.0707      0.880 0.980 0.020  0 0.000
#> GSM1009093     4  0.0000      1.000 0.000 0.000  0 1.000
#> GSM1009107     2  0.4564      1.000 0.328 0.672  0 0.000
#> GSM1009121     1  0.0000      0.885 1.000 0.000  0 0.000
#> GSM1009135     4  0.0000      1.000 0.000 0.000  0 1.000
#> GSM1009149     1  0.0921      0.883 0.972 0.028  0 0.000
#> GSM1009163     3  0.0000      1.000 0.000 0.000  1 0.000
#> GSM1009177     1  0.0592      0.879 0.984 0.016  0 0.000
#> GSM1009191     1  0.0592      0.886 0.984 0.016  0 0.000
#> GSM1009066     1  0.4564      0.609 0.672 0.328  0 0.000
#> GSM1009080     1  0.1118      0.879 0.964 0.036  0 0.000
#> GSM1009094     4  0.0000      1.000 0.000 0.000  0 1.000
#> GSM1009108     2  0.4564      1.000 0.328 0.672  0 0.000
#> GSM1009122     1  0.1211      0.858 0.960 0.040  0 0.000
#> GSM1009136     4  0.0000      1.000 0.000 0.000  0 1.000
#> GSM1009150     1  0.1792      0.861 0.932 0.068  0 0.000
#> GSM1009164     3  0.0000      1.000 0.000 0.000  1 0.000
#> GSM1009178     1  0.0000      0.885 1.000 0.000  0 0.000
#> GSM1009192     1  0.0469      0.885 0.988 0.012  0 0.000
#> GSM1009067     1  0.4564      0.609 0.672 0.328  0 0.000
#> GSM1009081     1  0.1022      0.880 0.968 0.032  0 0.000
#> GSM1009095     1  0.6574      0.147 0.532 0.084  0 0.384
#> GSM1009109     2  0.4564      1.000 0.328 0.672  0 0.000
#> GSM1009123     1  0.2412      0.839 0.908 0.084  0 0.008
#> GSM1009137     4  0.0000      1.000 0.000 0.000  0 1.000
#> GSM1009151     1  0.1637      0.866 0.940 0.060  0 0.000
#> GSM1009165     3  0.0000      1.000 0.000 0.000  1 0.000
#> GSM1009179     1  0.0188      0.884 0.996 0.004  0 0.000
#> GSM1009193     1  0.0469      0.885 0.988 0.012  0 0.000
#> GSM1009068     1  0.4564      0.609 0.672 0.328  0 0.000
#> GSM1009082     1  0.1118      0.879 0.964 0.036  0 0.000
#> GSM1009096     4  0.0000      1.000 0.000 0.000  0 1.000
#> GSM1009110     2  0.4564      1.000 0.328 0.672  0 0.000
#> GSM1009124     1  0.0000      0.885 1.000 0.000  0 0.000
#> GSM1009138     4  0.0000      1.000 0.000 0.000  0 1.000
#> GSM1009152     1  0.1940      0.855 0.924 0.076  0 0.000
#> GSM1009166     3  0.0000      1.000 0.000 0.000  1 0.000
#> GSM1009180     1  0.0000      0.885 1.000 0.000  0 0.000
#> GSM1009194     1  0.0188      0.886 0.996 0.004  0 0.000
#> GSM1009069     1  0.4382      0.641 0.704 0.296  0 0.000
#> GSM1009083     1  0.1118      0.879 0.964 0.036  0 0.000
#> GSM1009097     4  0.0000      1.000 0.000 0.000  0 1.000
#> GSM1009111     2  0.4564      1.000 0.328 0.672  0 0.000
#> GSM1009125     1  0.2281      0.781 0.904 0.096  0 0.000
#> GSM1009139     4  0.0000      1.000 0.000 0.000  0 1.000
#> GSM1009153     1  0.1792      0.861 0.932 0.068  0 0.000
#> GSM1009167     3  0.0000      1.000 0.000 0.000  1 0.000
#> GSM1009181     1  0.0592      0.879 0.984 0.016  0 0.000
#> GSM1009195     1  0.0469      0.884 0.988 0.012  0 0.000
#> GSM1009070     1  0.4543      0.614 0.676 0.324  0 0.000
#> GSM1009084     1  0.1118      0.879 0.964 0.036  0 0.000
#> GSM1009098     4  0.0000      1.000 0.000 0.000  0 1.000
#> GSM1009112     2  0.4564      1.000 0.328 0.672  0 0.000
#> GSM1009126     1  0.0000      0.885 1.000 0.000  0 0.000
#> GSM1009140     4  0.0000      1.000 0.000 0.000  0 1.000
#> GSM1009154     1  0.1867      0.858 0.928 0.072  0 0.000
#> GSM1009168     3  0.0000      1.000 0.000 0.000  1 0.000
#> GSM1009182     1  0.0469      0.881 0.988 0.012  0 0.000
#> GSM1009196     1  0.0469      0.885 0.988 0.012  0 0.000
#> GSM1009071     1  0.4564      0.609 0.672 0.328  0 0.000
#> GSM1009085     1  0.1022      0.880 0.968 0.032  0 0.000
#> GSM1009099     4  0.0000      1.000 0.000 0.000  0 1.000
#> GSM1009113     2  0.4564      1.000 0.328 0.672  0 0.000
#> GSM1009127     1  0.2149      0.842 0.912 0.088  0 0.000
#> GSM1009141     4  0.0000      1.000 0.000 0.000  0 1.000
#> GSM1009155     1  0.0817      0.884 0.976 0.024  0 0.000
#> GSM1009169     3  0.0000      1.000 0.000 0.000  1 0.000
#> GSM1009183     1  0.0592      0.879 0.984 0.016  0 0.000
#> GSM1009197     1  0.0469      0.885 0.988 0.012  0 0.000
#> GSM1009072     1  0.4564      0.609 0.672 0.328  0 0.000
#> GSM1009086     1  0.1118      0.879 0.964 0.036  0 0.000
#> GSM1009100     4  0.0000      1.000 0.000 0.000  0 1.000
#> GSM1009114     2  0.4564      1.000 0.328 0.672  0 0.000
#> GSM1009128     1  0.0000      0.885 1.000 0.000  0 0.000
#> GSM1009142     4  0.0000      1.000 0.000 0.000  0 1.000
#> GSM1009156     1  0.1557      0.869 0.944 0.056  0 0.000
#> GSM1009170     3  0.0000      1.000 0.000 0.000  1 0.000
#> GSM1009184     1  0.0592      0.879 0.984 0.016  0 0.000
#> GSM1009198     1  0.0469      0.885 0.988 0.012  0 0.000
#> GSM1009073     1  0.4564      0.609 0.672 0.328  0 0.000
#> GSM1009087     1  0.0336      0.887 0.992 0.008  0 0.000
#> GSM1009101     4  0.0000      1.000 0.000 0.000  0 1.000
#> GSM1009115     2  0.4564      1.000 0.328 0.672  0 0.000
#> GSM1009129     1  0.1637      0.835 0.940 0.060  0 0.000
#> GSM1009143     4  0.0000      1.000 0.000 0.000  0 1.000
#> GSM1009157     1  0.1389      0.874 0.952 0.048  0 0.000
#> GSM1009171     3  0.0000      1.000 0.000 0.000  1 0.000
#> GSM1009185     1  0.0000      0.885 1.000 0.000  0 0.000
#> GSM1009199     1  0.0336      0.886 0.992 0.008  0 0.000
#> GSM1009074     1  0.4564      0.609 0.672 0.328  0 0.000
#> GSM1009088     1  0.0817      0.880 0.976 0.024  0 0.000
#> GSM1009102     4  0.0000      1.000 0.000 0.000  0 1.000
#> GSM1009116     2  0.4564      1.000 0.328 0.672  0 0.000
#> GSM1009130     1  0.0592      0.879 0.984 0.016  0 0.000
#> GSM1009144     4  0.0000      1.000 0.000 0.000  0 1.000
#> GSM1009158     1  0.1637      0.866 0.940 0.060  0 0.000
#> GSM1009172     3  0.0000      1.000 0.000 0.000  1 0.000
#> GSM1009186     1  0.0592      0.879 0.984 0.016  0 0.000
#> GSM1009200     1  0.0188      0.886 0.996 0.004  0 0.000
#> GSM1009075     1  0.4564      0.609 0.672 0.328  0 0.000
#> GSM1009089     1  0.0336      0.887 0.992 0.008  0 0.000
#> GSM1009103     4  0.0000      1.000 0.000 0.000  0 1.000
#> GSM1009117     2  0.4564      1.000 0.328 0.672  0 0.000
#> GSM1009131     1  0.0000      0.885 1.000 0.000  0 0.000
#> GSM1009145     4  0.0000      1.000 0.000 0.000  0 1.000
#> GSM1009159     1  0.0592      0.886 0.984 0.016  0 0.000
#> GSM1009173     3  0.0000      1.000 0.000 0.000  1 0.000
#> GSM1009187     1  0.0000      0.885 1.000 0.000  0 0.000
#> GSM1009201     1  0.0188      0.886 0.996 0.004  0 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
#> GSM1009062     2  0.4273      1.000 0.448 0.552  0 0.000 0.000
#> GSM1009076     1  0.5052      0.143 0.552 0.412  0 0.000 0.036
#> GSM1009090     4  0.0000      0.989 0.000 0.000  0 1.000 0.000
#> GSM1009104     5  0.0000      1.000 0.000 0.000  0 0.000 1.000
#> GSM1009118     1  0.1205      0.469 0.956 0.004  0 0.000 0.040
#> GSM1009132     4  0.0000      0.989 0.000 0.000  0 1.000 0.000
#> GSM1009146     1  0.3999      0.436 0.656 0.344  0 0.000 0.000
#> GSM1009160     3  0.0000      1.000 0.000 0.000  1 0.000 0.000
#> GSM1009174     1  0.4550      0.391 0.688 0.276  0 0.000 0.036
#> GSM1009188     1  0.3508      0.514 0.748 0.252  0 0.000 0.000
#> GSM1009063     2  0.4273      1.000 0.448 0.552  0 0.000 0.000
#> GSM1009077     1  0.5052      0.143 0.552 0.412  0 0.000 0.036
#> GSM1009091     4  0.0000      0.989 0.000 0.000  0 1.000 0.000
#> GSM1009105     5  0.0000      1.000 0.000 0.000  0 0.000 1.000
#> GSM1009119     1  0.0609      0.472 0.980 0.020  0 0.000 0.000
#> GSM1009133     4  0.0000      0.989 0.000 0.000  0 1.000 0.000
#> GSM1009147     1  0.3534      0.512 0.744 0.256  0 0.000 0.000
#> GSM1009161     3  0.0000      1.000 0.000 0.000  1 0.000 0.000
#> GSM1009175     1  0.4269      0.432 0.732 0.232  0 0.000 0.036
#> GSM1009189     1  0.3508      0.514 0.748 0.252  0 0.000 0.000
#> GSM1009064     2  0.4273      1.000 0.448 0.552  0 0.000 0.000
#> GSM1009078     1  0.4849      0.196 0.608 0.360  0 0.000 0.032
#> GSM1009092     4  0.0000      0.989 0.000 0.000  0 1.000 0.000
#> GSM1009106     5  0.0000      1.000 0.000 0.000  0 0.000 1.000
#> GSM1009120     1  0.1478      0.482 0.936 0.064  0 0.000 0.000
#> GSM1009134     4  0.0000      0.989 0.000 0.000  0 1.000 0.000
#> GSM1009148     1  0.3999      0.436 0.656 0.344  0 0.000 0.000
#> GSM1009162     3  0.0000      1.000 0.000 0.000  1 0.000 0.000
#> GSM1009176     1  0.4594      0.381 0.680 0.284  0 0.000 0.036
#> GSM1009190     1  0.3508      0.514 0.748 0.252  0 0.000 0.000
#> GSM1009065     2  0.4273      1.000 0.448 0.552  0 0.000 0.000
#> GSM1009079     1  0.4677      0.361 0.664 0.300  0 0.000 0.036
#> GSM1009093     4  0.0000      0.989 0.000 0.000  0 1.000 0.000
#> GSM1009107     5  0.0000      1.000 0.000 0.000  0 0.000 1.000
#> GSM1009121     1  0.2674      0.373 0.856 0.004  0 0.000 0.140
#> GSM1009135     4  0.0000      0.989 0.000 0.000  0 1.000 0.000
#> GSM1009149     1  0.3999      0.436 0.656 0.344  0 0.000 0.000
#> GSM1009163     3  0.0000      1.000 0.000 0.000  1 0.000 0.000
#> GSM1009177     1  0.4572      0.386 0.684 0.280  0 0.000 0.036
#> GSM1009191     1  0.3561      0.515 0.740 0.260  0 0.000 0.000
#> GSM1009066     2  0.4273      1.000 0.448 0.552  0 0.000 0.000
#> GSM1009080     1  0.5010      0.191 0.572 0.392  0 0.000 0.036
#> GSM1009094     4  0.0000      0.989 0.000 0.000  0 1.000 0.000
#> GSM1009108     5  0.0000      1.000 0.000 0.000  0 0.000 1.000
#> GSM1009122     1  0.2488      0.396 0.872 0.004  0 0.000 0.124
#> GSM1009136     4  0.0000      0.989 0.000 0.000  0 1.000 0.000
#> GSM1009150     1  0.3999      0.436 0.656 0.344  0 0.000 0.000
#> GSM1009164     3  0.0000      1.000 0.000 0.000  1 0.000 0.000
#> GSM1009178     1  0.3883      0.458 0.780 0.184  0 0.000 0.036
#> GSM1009192     1  0.3508      0.514 0.748 0.252  0 0.000 0.000
#> GSM1009067     2  0.4273      1.000 0.448 0.552  0 0.000 0.000
#> GSM1009081     1  0.4958      0.235 0.592 0.372  0 0.000 0.036
#> GSM1009095     4  0.3305      0.664 0.224 0.000  0 0.776 0.000
#> GSM1009109     5  0.0000      1.000 0.000 0.000  0 0.000 1.000
#> GSM1009123     1  0.0162      0.471 0.996 0.004  0 0.000 0.000
#> GSM1009137     4  0.0000      0.989 0.000 0.000  0 1.000 0.000
#> GSM1009151     1  0.3999      0.436 0.656 0.344  0 0.000 0.000
#> GSM1009165     3  0.0000      1.000 0.000 0.000  1 0.000 0.000
#> GSM1009179     1  0.4021      0.452 0.764 0.200  0 0.000 0.036
#> GSM1009193     1  0.3508      0.514 0.748 0.252  0 0.000 0.000
#> GSM1009068     2  0.4273      1.000 0.448 0.552  0 0.000 0.000
#> GSM1009082     1  0.5052      0.143 0.552 0.412  0 0.000 0.036
#> GSM1009096     4  0.0000      0.989 0.000 0.000  0 1.000 0.000
#> GSM1009110     5  0.0000      1.000 0.000 0.000  0 0.000 1.000
#> GSM1009124     1  0.0955      0.473 0.968 0.004  0 0.000 0.028
#> GSM1009138     4  0.0000      0.989 0.000 0.000  0 1.000 0.000
#> GSM1009152     1  0.3999      0.436 0.656 0.344  0 0.000 0.000
#> GSM1009166     3  0.0000      1.000 0.000 0.000  1 0.000 0.000
#> GSM1009180     1  0.3810      0.459 0.788 0.176  0 0.000 0.036
#> GSM1009194     1  0.3508      0.514 0.748 0.252  0 0.000 0.000
#> GSM1009069     1  0.4321     -0.265 0.600 0.396  0 0.000 0.004
#> GSM1009083     1  0.5044      0.147 0.556 0.408  0 0.000 0.036
#> GSM1009097     4  0.0000      0.989 0.000 0.000  0 1.000 0.000
#> GSM1009111     5  0.0000      1.000 0.000 0.000  0 0.000 1.000
#> GSM1009125     1  0.3838      0.101 0.716 0.004  0 0.000 0.280
#> GSM1009139     4  0.0000      0.989 0.000 0.000  0 1.000 0.000
#> GSM1009153     1  0.3999      0.436 0.656 0.344  0 0.000 0.000
#> GSM1009167     3  0.0000      1.000 0.000 0.000  1 0.000 0.000
#> GSM1009181     1  0.4527      0.395 0.692 0.272  0 0.000 0.036
#> GSM1009195     1  0.4428      0.514 0.700 0.268  0 0.000 0.032
#> GSM1009070     1  0.4219     -0.650 0.584 0.416  0 0.000 0.000
#> GSM1009084     1  0.5052      0.143 0.552 0.412  0 0.000 0.036
#> GSM1009098     4  0.0000      0.989 0.000 0.000  0 1.000 0.000
#> GSM1009112     5  0.0000      1.000 0.000 0.000  0 0.000 1.000
#> GSM1009126     1  0.0324      0.473 0.992 0.004  0 0.000 0.004
#> GSM1009140     4  0.0000      0.989 0.000 0.000  0 1.000 0.000
#> GSM1009154     1  0.3999      0.436 0.656 0.344  0 0.000 0.000
#> GSM1009168     3  0.0000      1.000 0.000 0.000  1 0.000 0.000
#> GSM1009182     1  0.4054      0.450 0.760 0.204  0 0.000 0.036
#> GSM1009196     1  0.3508      0.514 0.748 0.252  0 0.000 0.000
#> GSM1009071     2  0.4273      1.000 0.448 0.552  0 0.000 0.000
#> GSM1009085     1  0.4958      0.235 0.592 0.372  0 0.000 0.036
#> GSM1009099     4  0.0000      0.989 0.000 0.000  0 1.000 0.000
#> GSM1009113     5  0.0000      1.000 0.000 0.000  0 0.000 1.000
#> GSM1009127     1  0.0609      0.465 0.980 0.020  0 0.000 0.000
#> GSM1009141     4  0.0000      0.989 0.000 0.000  0 1.000 0.000
#> GSM1009155     1  0.3999      0.436 0.656 0.344  0 0.000 0.000
#> GSM1009169     3  0.0000      1.000 0.000 0.000  1 0.000 0.000
#> GSM1009183     1  0.4297      0.429 0.728 0.236  0 0.000 0.036
#> GSM1009197     1  0.3508      0.514 0.748 0.252  0 0.000 0.000
#> GSM1009072     2  0.4273      1.000 0.448 0.552  0 0.000 0.000
#> GSM1009086     1  0.5052      0.143 0.552 0.412  0 0.000 0.036
#> GSM1009100     4  0.0000      0.989 0.000 0.000  0 1.000 0.000
#> GSM1009114     5  0.0000      1.000 0.000 0.000  0 0.000 1.000
#> GSM1009128     1  0.2674      0.373 0.856 0.004  0 0.000 0.140
#> GSM1009142     4  0.0000      0.989 0.000 0.000  0 1.000 0.000
#> GSM1009156     1  0.3508      0.514 0.748 0.252  0 0.000 0.000
#> GSM1009170     3  0.0000      1.000 0.000 0.000  1 0.000 0.000
#> GSM1009184     1  0.4572      0.386 0.684 0.280  0 0.000 0.036
#> GSM1009198     1  0.3508      0.514 0.748 0.252  0 0.000 0.000
#> GSM1009073     2  0.4273      1.000 0.448 0.552  0 0.000 0.000
#> GSM1009087     1  0.4637      0.335 0.672 0.292  0 0.000 0.036
#> GSM1009101     4  0.0000      0.989 0.000 0.000  0 1.000 0.000
#> GSM1009115     5  0.0000      1.000 0.000 0.000  0 0.000 1.000
#> GSM1009129     1  0.3266      0.270 0.796 0.004  0 0.000 0.200
#> GSM1009143     4  0.0000      0.989 0.000 0.000  0 1.000 0.000
#> GSM1009157     1  0.3508      0.514 0.748 0.252  0 0.000 0.000
#> GSM1009171     3  0.0000      1.000 0.000 0.000  1 0.000 0.000
#> GSM1009185     1  0.3209      0.466 0.812 0.180  0 0.000 0.008
#> GSM1009199     1  0.4380      0.516 0.708 0.260  0 0.000 0.032
#> GSM1009074     2  0.4273      1.000 0.448 0.552  0 0.000 0.000
#> GSM1009088     1  0.4734      0.300 0.652 0.312  0 0.000 0.036
#> GSM1009102     4  0.0000      0.989 0.000 0.000  0 1.000 0.000
#> GSM1009116     5  0.0000      1.000 0.000 0.000  0 0.000 1.000
#> GSM1009130     1  0.1836      0.477 0.932 0.032  0 0.000 0.036
#> GSM1009144     4  0.0000      0.989 0.000 0.000  0 1.000 0.000
#> GSM1009158     1  0.3999      0.436 0.656 0.344  0 0.000 0.000
#> GSM1009172     3  0.0000      1.000 0.000 0.000  1 0.000 0.000
#> GSM1009186     1  0.4572      0.386 0.684 0.280  0 0.000 0.036
#> GSM1009200     1  0.3662      0.515 0.744 0.252  0 0.000 0.004
#> GSM1009075     2  0.4273      1.000 0.448 0.552  0 0.000 0.000
#> GSM1009089     1  0.3366      0.439 0.768 0.232  0 0.000 0.000
#> GSM1009103     4  0.0000      0.989 0.000 0.000  0 1.000 0.000
#> GSM1009117     5  0.0000      1.000 0.000 0.000  0 0.000 1.000
#> GSM1009131     1  0.1124      0.471 0.960 0.004  0 0.000 0.036
#> GSM1009145     4  0.0000      0.989 0.000 0.000  0 1.000 0.000
#> GSM1009159     1  0.3999      0.436 0.656 0.344  0 0.000 0.000
#> GSM1009173     3  0.0000      1.000 0.000 0.000  1 0.000 0.000
#> GSM1009187     1  0.3280      0.466 0.812 0.176  0 0.000 0.012
#> GSM1009201     1  0.3508      0.514 0.748 0.252  0 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
#> GSM1009062     6  0.0000     0.9896 0.000 0.000  0 0.000 0.000 1.000
#> GSM1009076     2  0.3684     0.9044 0.372 0.628  0 0.000 0.000 0.000
#> GSM1009090     4  0.0000     0.9988 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009104     5  0.0000     0.9461 0.000 0.000  0 0.000 1.000 0.000
#> GSM1009118     1  0.3329     0.2125 0.756 0.236  0 0.000 0.004 0.004
#> GSM1009132     4  0.0000     0.9988 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009146     1  0.3819     0.3666 0.624 0.372  0 0.000 0.000 0.004
#> GSM1009160     3  0.0000     1.0000 0.000 0.000  1 0.000 0.000 0.000
#> GSM1009174     2  0.3851     0.8410 0.460 0.540  0 0.000 0.000 0.000
#> GSM1009188     1  0.0146     0.4867 0.996 0.004  0 0.000 0.000 0.000
#> GSM1009063     6  0.0000     0.9896 0.000 0.000  0 0.000 0.000 1.000
#> GSM1009077     2  0.3684     0.9044 0.372 0.628  0 0.000 0.000 0.000
#> GSM1009091     4  0.0000     0.9988 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009105     5  0.0000     0.9461 0.000 0.000  0 0.000 1.000 0.000
#> GSM1009119     1  0.3023     0.2662 0.784 0.212  0 0.000 0.000 0.004
#> GSM1009133     4  0.0000     0.9988 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009147     1  0.0000     0.4872 1.000 0.000  0 0.000 0.000 0.000
#> GSM1009161     3  0.0000     1.0000 0.000 0.000  1 0.000 0.000 0.000
#> GSM1009175     1  0.3854    -0.6013 0.536 0.464  0 0.000 0.000 0.000
#> GSM1009189     1  0.0000     0.4872 1.000 0.000  0 0.000 0.000 0.000
#> GSM1009064     6  0.0000     0.9896 0.000 0.000  0 0.000 0.000 1.000
#> GSM1009078     1  0.3823    -0.4975 0.564 0.436  0 0.000 0.000 0.000
#> GSM1009092     4  0.0000     0.9988 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009106     5  0.0000     0.9461 0.000 0.000  0 0.000 1.000 0.000
#> GSM1009120     1  0.2964     0.2786 0.792 0.204  0 0.000 0.000 0.004
#> GSM1009134     4  0.0000     0.9988 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009148     1  0.3819     0.3666 0.624 0.372  0 0.000 0.000 0.004
#> GSM1009162     3  0.0000     1.0000 0.000 0.000  1 0.000 0.000 0.000
#> GSM1009176     2  0.3828     0.8918 0.440 0.560  0 0.000 0.000 0.000
#> GSM1009190     1  0.0146     0.4867 0.996 0.004  0 0.000 0.000 0.000
#> GSM1009065     6  0.0000     0.9896 0.000 0.000  0 0.000 0.000 1.000
#> GSM1009079     2  0.3828     0.8918 0.440 0.560  0 0.000 0.000 0.000
#> GSM1009093     4  0.0000     0.9988 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009107     5  0.0000     0.9461 0.000 0.000  0 0.000 1.000 0.000
#> GSM1009121     1  0.3437     0.2077 0.752 0.236  0 0.000 0.008 0.004
#> GSM1009135     4  0.0000     0.9988 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009149     1  0.3819     0.3666 0.624 0.372  0 0.000 0.000 0.004
#> GSM1009163     3  0.0000     1.0000 0.000 0.000  1 0.000 0.000 0.000
#> GSM1009177     2  0.3828     0.8918 0.440 0.560  0 0.000 0.000 0.000
#> GSM1009191     1  0.0146     0.4867 0.996 0.004  0 0.000 0.000 0.000
#> GSM1009066     6  0.0000     0.9896 0.000 0.000  0 0.000 0.000 1.000
#> GSM1009080     2  0.3684     0.9044 0.372 0.628  0 0.000 0.000 0.000
#> GSM1009094     4  0.0000     0.9988 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009108     5  0.0000     0.9461 0.000 0.000  0 0.000 1.000 0.000
#> GSM1009122     1  0.3437     0.2077 0.752 0.236  0 0.000 0.008 0.004
#> GSM1009136     4  0.0146     0.9963 0.004 0.000  0 0.996 0.000 0.000
#> GSM1009150     1  0.3819     0.3666 0.624 0.372  0 0.000 0.000 0.004
#> GSM1009164     3  0.0000     1.0000 0.000 0.000  1 0.000 0.000 0.000
#> GSM1009178     1  0.3823    -0.4975 0.564 0.436  0 0.000 0.000 0.000
#> GSM1009192     1  0.0000     0.4872 1.000 0.000  0 0.000 0.000 0.000
#> GSM1009067     6  0.0000     0.9896 0.000 0.000  0 0.000 0.000 1.000
#> GSM1009081     2  0.3789     0.9073 0.416 0.584  0 0.000 0.000 0.000
#> GSM1009095     4  0.0363     0.9872 0.012 0.000  0 0.988 0.000 0.000
#> GSM1009109     5  0.0000     0.9461 0.000 0.000  0 0.000 1.000 0.000
#> GSM1009123     1  0.3023     0.2662 0.784 0.212  0 0.000 0.000 0.004
#> GSM1009137     4  0.0000     0.9988 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009151     1  0.3819     0.3666 0.624 0.372  0 0.000 0.000 0.004
#> GSM1009165     3  0.0000     1.0000 0.000 0.000  1 0.000 0.000 0.000
#> GSM1009179     1  0.3823    -0.4975 0.564 0.436  0 0.000 0.000 0.000
#> GSM1009193     1  0.0000     0.4872 1.000 0.000  0 0.000 0.000 0.000
#> GSM1009068     6  0.0000     0.9896 0.000 0.000  0 0.000 0.000 1.000
#> GSM1009082     2  0.3684     0.9044 0.372 0.628  0 0.000 0.000 0.000
#> GSM1009096     4  0.0000     0.9988 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009110     5  0.0000     0.9461 0.000 0.000  0 0.000 1.000 0.000
#> GSM1009124     1  0.3052     0.2628 0.780 0.216  0 0.000 0.000 0.004
#> GSM1009138     4  0.0000     0.9988 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009152     1  0.3819     0.3666 0.624 0.372  0 0.000 0.000 0.004
#> GSM1009166     3  0.0000     1.0000 0.000 0.000  1 0.000 0.000 0.000
#> GSM1009180     1  0.3817    -0.4861 0.568 0.432  0 0.000 0.000 0.000
#> GSM1009194     1  0.0146     0.4867 0.996 0.004  0 0.000 0.000 0.000
#> GSM1009069     1  0.4675    -0.4693 0.560 0.392  0 0.000 0.000 0.048
#> GSM1009083     1  0.3833    -0.5279 0.556 0.444  0 0.000 0.000 0.000
#> GSM1009097     4  0.0000     0.9988 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009111     5  0.0000     0.9461 0.000 0.000  0 0.000 1.000 0.000
#> GSM1009125     5  0.6095    -0.1197 0.332 0.236  0 0.000 0.428 0.004
#> GSM1009139     4  0.0000     0.9988 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009153     1  0.3819     0.3666 0.624 0.372  0 0.000 0.000 0.004
#> GSM1009167     3  0.0000     1.0000 0.000 0.000  1 0.000 0.000 0.000
#> GSM1009181     2  0.3833     0.8834 0.444 0.556  0 0.000 0.000 0.000
#> GSM1009195     1  0.0632     0.4754 0.976 0.024  0 0.000 0.000 0.000
#> GSM1009070     6  0.1644     0.8721 0.076 0.004  0 0.000 0.000 0.920
#> GSM1009084     2  0.3684     0.9044 0.372 0.628  0 0.000 0.000 0.000
#> GSM1009098     4  0.0000     0.9988 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009112     5  0.0000     0.9461 0.000 0.000  0 0.000 1.000 0.000
#> GSM1009126     1  0.3163     0.2650 0.780 0.212  0 0.000 0.004 0.004
#> GSM1009140     4  0.0000     0.9988 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009154     1  0.3819     0.3666 0.624 0.372  0 0.000 0.000 0.004
#> GSM1009168     3  0.0000     1.0000 0.000 0.000  1 0.000 0.000 0.000
#> GSM1009182     1  0.3823    -0.4975 0.564 0.436  0 0.000 0.000 0.000
#> GSM1009196     1  0.0000     0.4872 1.000 0.000  0 0.000 0.000 0.000
#> GSM1009071     6  0.0000     0.9896 0.000 0.000  0 0.000 0.000 1.000
#> GSM1009085     2  0.3804     0.9045 0.424 0.576  0 0.000 0.000 0.000
#> GSM1009099     4  0.0000     0.9988 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009113     5  0.0000     0.9461 0.000 0.000  0 0.000 1.000 0.000
#> GSM1009127     1  0.3023     0.2662 0.784 0.212  0 0.000 0.000 0.004
#> GSM1009141     4  0.0000     0.9988 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009155     1  0.3819     0.3666 0.624 0.372  0 0.000 0.000 0.004
#> GSM1009169     3  0.0000     1.0000 0.000 0.000  1 0.000 0.000 0.000
#> GSM1009183     1  0.3862    -0.6444 0.524 0.476  0 0.000 0.000 0.000
#> GSM1009197     1  0.0000     0.4872 1.000 0.000  0 0.000 0.000 0.000
#> GSM1009072     6  0.0000     0.9896 0.000 0.000  0 0.000 0.000 1.000
#> GSM1009086     2  0.3684     0.9044 0.372 0.628  0 0.000 0.000 0.000
#> GSM1009100     4  0.0000     0.9988 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009114     5  0.0000     0.9461 0.000 0.000  0 0.000 1.000 0.000
#> GSM1009128     1  0.3437     0.2077 0.752 0.236  0 0.000 0.008 0.004
#> GSM1009142     4  0.0000     0.9988 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009156     1  0.0000     0.4872 1.000 0.000  0 0.000 0.000 0.000
#> GSM1009170     3  0.0000     1.0000 0.000 0.000  1 0.000 0.000 0.000
#> GSM1009184     1  0.3868    -0.7149 0.504 0.496  0 0.000 0.000 0.000
#> GSM1009198     1  0.0146     0.4867 0.996 0.004  0 0.000 0.000 0.000
#> GSM1009073     6  0.0000     0.9896 0.000 0.000  0 0.000 0.000 1.000
#> GSM1009087     1  0.3823    -0.4975 0.564 0.436  0 0.000 0.000 0.000
#> GSM1009101     4  0.0000     0.9988 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009115     5  0.0000     0.9461 0.000 0.000  0 0.000 1.000 0.000
#> GSM1009129     1  0.5401    -0.0846 0.596 0.236  0 0.000 0.164 0.004
#> GSM1009143     4  0.0146     0.9963 0.004 0.000  0 0.996 0.000 0.000
#> GSM1009157     1  0.0000     0.4872 1.000 0.000  0 0.000 0.000 0.000
#> GSM1009171     3  0.0000     1.0000 0.000 0.000  1 0.000 0.000 0.000
#> GSM1009185     1  0.3817    -0.4861 0.568 0.432  0 0.000 0.000 0.000
#> GSM1009199     1  0.0713     0.4727 0.972 0.028  0 0.000 0.000 0.000
#> GSM1009074     6  0.0000     0.9896 0.000 0.000  0 0.000 0.000 1.000
#> GSM1009088     1  0.3823    -0.4975 0.564 0.436  0 0.000 0.000 0.000
#> GSM1009102     4  0.0146     0.9963 0.004 0.000  0 0.996 0.000 0.000
#> GSM1009116     5  0.0000     0.9461 0.000 0.000  0 0.000 1.000 0.000
#> GSM1009130     1  0.3240     0.1985 0.752 0.244  0 0.000 0.000 0.004
#> GSM1009144     4  0.0146     0.9963 0.004 0.000  0 0.996 0.000 0.000
#> GSM1009158     1  0.3819     0.3666 0.624 0.372  0 0.000 0.000 0.004
#> GSM1009172     3  0.0000     1.0000 0.000 0.000  1 0.000 0.000 0.000
#> GSM1009186     1  0.3851    -0.5871 0.540 0.460  0 0.000 0.000 0.000
#> GSM1009200     1  0.0146     0.4867 0.996 0.004  0 0.000 0.000 0.000
#> GSM1009075     6  0.0000     0.9896 0.000 0.000  0 0.000 0.000 1.000
#> GSM1009089     1  0.3817    -0.4863 0.568 0.432  0 0.000 0.000 0.000
#> GSM1009103     4  0.0146     0.9963 0.004 0.000  0 0.996 0.000 0.000
#> GSM1009117     5  0.0000     0.9461 0.000 0.000  0 0.000 1.000 0.000
#> GSM1009131     1  0.3215     0.2094 0.756 0.240  0 0.000 0.000 0.004
#> GSM1009145     4  0.0000     0.9988 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009159     1  0.3819     0.3666 0.624 0.372  0 0.000 0.000 0.004
#> GSM1009173     3  0.0000     1.0000 0.000 0.000  1 0.000 0.000 0.000
#> GSM1009187     1  0.3817    -0.4861 0.568 0.432  0 0.000 0.000 0.000
#> GSM1009201     1  0.0146     0.4867 0.996 0.004  0 0.000 0.000 0.000

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

consensus_heatmap(res, k = 2)

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

consensus_heatmap(res, k = 3)

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

consensus_heatmap(res, k = 4)

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

consensus_heatmap(res, k = 5)

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

consensus_heatmap(res, k = 6)

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

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

membership_heatmap(res, k = 2)

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

membership_heatmap(res, k = 3)

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

membership_heatmap(res, k = 4)

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

membership_heatmap(res, k = 5)

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

membership_heatmap(res, k = 6)

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

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

Signature heatmaps where rows are scaled:

get_signatures(res, k = 2)

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

get_signatures(res, k = 3)

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

get_signatures(res, k = 4)

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

get_signatures(res, k = 5)

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

get_signatures(res, k = 6)

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

Signature heatmaps where rows are not scaled:

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

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

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

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

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

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

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

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

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

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

Compare the overlap of signatures from different k:

compare_signatures(res)

plot of chunk MAD-mclust-signature_compare

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

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

An example of the output of tb is:

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

The columns in tb are:

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

UMAP plot which shows how samples are separated.

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

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

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

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

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

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

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

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

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

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

Following heatmap shows how subgroups are split when increasing k:

collect_classes(res)

plot of chunk MAD-mclust-collect-classes

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

test_to_known_factors(res)
#>              n temperature(p) time(p) specimen(p) k
#> MAD:mclust 129          0.838   0.954    1.03e-21 2
#> MAD:mclust 139          1.000   1.000    1.57e-48 3
#> MAD:mclust 139          1.000   1.000    1.71e-71 4
#> MAD:mclust  85          1.000   1.000    1.36e-57 5
#> MAD:mclust  82          0.993   1.000    3.70e-55 6

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


MAD:NMF

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

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

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

res
#> A 'ConsensusPartition' object with k = 2, 3, 4, 5, 6.
#>   On a matrix with 51941 rows and 140 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.855           0.931       0.971         0.4779 0.526   0.526
#> 3 3 0.651           0.740       0.878         0.3119 0.759   0.575
#> 4 4 0.736           0.811       0.900         0.1466 0.733   0.413
#> 5 5 0.705           0.660       0.778         0.0831 0.845   0.528
#> 6 6 0.841           0.756       0.882         0.0572 0.894   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
#> GSM1009062     1  0.0000      0.966 1.000 0.000
#> GSM1009076     2  0.0000      0.974 0.000 1.000
#> GSM1009090     1  0.0000      0.966 1.000 0.000
#> GSM1009104     2  0.0000      0.974 0.000 1.000
#> GSM1009118     1  0.6148      0.814 0.848 0.152
#> GSM1009132     1  0.0000      0.966 1.000 0.000
#> GSM1009146     1  0.0000      0.966 1.000 0.000
#> GSM1009160     2  0.0000      0.974 0.000 1.000
#> GSM1009174     2  0.0000      0.974 0.000 1.000
#> GSM1009188     1  0.0000      0.966 1.000 0.000
#> GSM1009063     1  0.0000      0.966 1.000 0.000
#> GSM1009077     2  0.0000      0.974 0.000 1.000
#> GSM1009091     1  0.0000      0.966 1.000 0.000
#> GSM1009105     2  0.0000      0.974 0.000 1.000
#> GSM1009119     1  0.0000      0.966 1.000 0.000
#> GSM1009133     1  0.0000      0.966 1.000 0.000
#> GSM1009147     1  0.0000      0.966 1.000 0.000
#> GSM1009161     2  0.0000      0.974 0.000 1.000
#> GSM1009175     2  0.0672      0.967 0.008 0.992
#> GSM1009189     1  0.0000      0.966 1.000 0.000
#> GSM1009064     1  0.0000      0.966 1.000 0.000
#> GSM1009078     1  0.9427      0.463 0.640 0.360
#> GSM1009092     1  0.0000      0.966 1.000 0.000
#> GSM1009106     2  0.0000      0.974 0.000 1.000
#> GSM1009120     1  0.0000      0.966 1.000 0.000
#> GSM1009134     1  0.0000      0.966 1.000 0.000
#> GSM1009148     1  0.0000      0.966 1.000 0.000
#> GSM1009162     2  0.0000      0.974 0.000 1.000
#> GSM1009176     2  0.0000      0.974 0.000 1.000
#> GSM1009190     1  0.0000      0.966 1.000 0.000
#> GSM1009065     1  0.0000      0.966 1.000 0.000
#> GSM1009079     2  0.0000      0.974 0.000 1.000
#> GSM1009093     1  0.0000      0.966 1.000 0.000
#> GSM1009107     2  0.0000      0.974 0.000 1.000
#> GSM1009121     1  0.3879      0.901 0.924 0.076
#> GSM1009135     1  0.0000      0.966 1.000 0.000
#> GSM1009149     1  0.0000      0.966 1.000 0.000
#> GSM1009163     2  0.0000      0.974 0.000 1.000
#> GSM1009177     2  0.0000      0.974 0.000 1.000
#> GSM1009191     1  0.0000      0.966 1.000 0.000
#> GSM1009066     1  0.0000      0.966 1.000 0.000
#> GSM1009080     2  0.0000      0.974 0.000 1.000
#> GSM1009094     1  0.0000      0.966 1.000 0.000
#> GSM1009108     2  0.0000      0.974 0.000 1.000
#> GSM1009122     2  0.5178      0.861 0.116 0.884
#> GSM1009136     1  0.0000      0.966 1.000 0.000
#> GSM1009150     1  0.0000      0.966 1.000 0.000
#> GSM1009164     2  0.0000      0.974 0.000 1.000
#> GSM1009178     1  0.7056      0.769 0.808 0.192
#> GSM1009192     1  0.0000      0.966 1.000 0.000
#> GSM1009067     1  0.0000      0.966 1.000 0.000
#> GSM1009081     2  0.0000      0.974 0.000 1.000
#> GSM1009095     1  0.0000      0.966 1.000 0.000
#> GSM1009109     2  0.0000      0.974 0.000 1.000
#> GSM1009123     1  0.0000      0.966 1.000 0.000
#> GSM1009137     1  0.0000      0.966 1.000 0.000
#> GSM1009151     1  0.0000      0.966 1.000 0.000
#> GSM1009165     2  0.0000      0.974 0.000 1.000
#> GSM1009179     1  0.7528      0.736 0.784 0.216
#> GSM1009193     1  0.0000      0.966 1.000 0.000
#> GSM1009068     1  0.0000      0.966 1.000 0.000
#> GSM1009082     2  0.0000      0.974 0.000 1.000
#> GSM1009096     1  0.0000      0.966 1.000 0.000
#> GSM1009110     2  0.0000      0.974 0.000 1.000
#> GSM1009124     1  0.0000      0.966 1.000 0.000
#> GSM1009138     1  0.0000      0.966 1.000 0.000
#> GSM1009152     1  0.0000      0.966 1.000 0.000
#> GSM1009166     2  0.0000      0.974 0.000 1.000
#> GSM1009180     1  0.4815      0.871 0.896 0.104
#> GSM1009194     1  0.0000      0.966 1.000 0.000
#> GSM1009069     1  0.0000      0.966 1.000 0.000
#> GSM1009083     2  0.0000      0.974 0.000 1.000
#> GSM1009097     1  0.0000      0.966 1.000 0.000
#> GSM1009111     2  0.0000      0.974 0.000 1.000
#> GSM1009125     2  0.0000      0.974 0.000 1.000
#> GSM1009139     1  0.0000      0.966 1.000 0.000
#> GSM1009153     1  0.0000      0.966 1.000 0.000
#> GSM1009167     2  0.0000      0.974 0.000 1.000
#> GSM1009181     2  0.0000      0.974 0.000 1.000
#> GSM1009195     1  0.9044      0.533 0.680 0.320
#> GSM1009070     1  0.0000      0.966 1.000 0.000
#> GSM1009084     2  0.0000      0.974 0.000 1.000
#> GSM1009098     1  0.0000      0.966 1.000 0.000
#> GSM1009112     2  0.0000      0.974 0.000 1.000
#> GSM1009126     1  0.0000      0.966 1.000 0.000
#> GSM1009140     1  0.0000      0.966 1.000 0.000
#> GSM1009154     1  0.0000      0.966 1.000 0.000
#> GSM1009168     2  0.0000      0.974 0.000 1.000
#> GSM1009182     2  0.5059      0.864 0.112 0.888
#> GSM1009196     1  0.0000      0.966 1.000 0.000
#> GSM1009071     1  0.0000      0.966 1.000 0.000
#> GSM1009085     2  0.0000      0.974 0.000 1.000
#> GSM1009099     1  0.0000      0.966 1.000 0.000
#> GSM1009113     2  0.0000      0.974 0.000 1.000
#> GSM1009127     1  0.0000      0.966 1.000 0.000
#> GSM1009141     1  0.0000      0.966 1.000 0.000
#> GSM1009155     1  0.0000      0.966 1.000 0.000
#> GSM1009169     2  0.0000      0.974 0.000 1.000
#> GSM1009183     2  0.0000      0.974 0.000 1.000
#> GSM1009197     1  0.0000      0.966 1.000 0.000
#> GSM1009072     1  0.0000      0.966 1.000 0.000
#> GSM1009086     2  0.0000      0.974 0.000 1.000
#> GSM1009100     1  0.0000      0.966 1.000 0.000
#> GSM1009114     2  0.0000      0.974 0.000 1.000
#> GSM1009128     1  0.9170      0.524 0.668 0.332
#> GSM1009142     1  0.0000      0.966 1.000 0.000
#> GSM1009156     1  0.6973      0.774 0.812 0.188
#> GSM1009170     2  0.0000      0.974 0.000 1.000
#> GSM1009184     2  0.4690      0.878 0.100 0.900
#> GSM1009198     1  0.0000      0.966 1.000 0.000
#> GSM1009073     1  0.0000      0.966 1.000 0.000
#> GSM1009087     1  0.9833      0.292 0.576 0.424
#> GSM1009101     1  0.0000      0.966 1.000 0.000
#> GSM1009115     2  0.0000      0.974 0.000 1.000
#> GSM1009129     2  0.0000      0.974 0.000 1.000
#> GSM1009143     1  0.0000      0.966 1.000 0.000
#> GSM1009157     1  0.2948      0.923 0.948 0.052
#> GSM1009171     2  0.0000      0.974 0.000 1.000
#> GSM1009185     1  0.7528      0.734 0.784 0.216
#> GSM1009199     1  0.0000      0.966 1.000 0.000
#> GSM1009074     1  0.0000      0.966 1.000 0.000
#> GSM1009088     2  0.7299      0.736 0.204 0.796
#> GSM1009102     1  0.0000      0.966 1.000 0.000
#> GSM1009116     2  0.0000      0.974 0.000 1.000
#> GSM1009130     2  0.0000      0.974 0.000 1.000
#> GSM1009144     1  0.0000      0.966 1.000 0.000
#> GSM1009158     1  0.0000      0.966 1.000 0.000
#> GSM1009172     2  0.0000      0.974 0.000 1.000
#> GSM1009186     2  0.8499      0.613 0.276 0.724
#> GSM1009200     1  0.0000      0.966 1.000 0.000
#> GSM1009075     1  0.0000      0.966 1.000 0.000
#> GSM1009089     1  0.7056      0.769 0.808 0.192
#> GSM1009103     1  0.0000      0.966 1.000 0.000
#> GSM1009117     2  0.0000      0.974 0.000 1.000
#> GSM1009131     2  0.9954      0.106 0.460 0.540
#> GSM1009145     1  0.0000      0.966 1.000 0.000
#> GSM1009159     1  0.0000      0.966 1.000 0.000
#> GSM1009173     2  0.0000      0.974 0.000 1.000
#> GSM1009187     1  0.0000      0.966 1.000 0.000
#> GSM1009201     1  0.0000      0.966 1.000 0.000

show/hide code output

cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#>            class entropy silhouette    p1    p2    p3
#> GSM1009062     1  0.6045     0.4509 0.620 0.380 0.000
#> GSM1009076     2  0.1163     0.8074 0.000 0.972 0.028
#> GSM1009090     1  0.1289     0.8946 0.968 0.000 0.032
#> GSM1009104     3  0.5650     0.6643 0.000 0.312 0.688
#> GSM1009118     1  0.7683     0.4634 0.640 0.080 0.280
#> GSM1009132     1  0.1163     0.8967 0.972 0.000 0.028
#> GSM1009146     1  0.2356     0.8695 0.928 0.072 0.000
#> GSM1009160     3  0.0747     0.7731 0.000 0.016 0.984
#> GSM1009174     2  0.0747     0.8125 0.000 0.984 0.016
#> GSM1009188     1  0.0475     0.9010 0.992 0.004 0.004
#> GSM1009063     2  0.6307    -0.0696 0.488 0.512 0.000
#> GSM1009077     2  0.0747     0.8125 0.000 0.984 0.016
#> GSM1009091     1  0.1163     0.8967 0.972 0.000 0.028
#> GSM1009105     3  0.6140     0.5628 0.000 0.404 0.596
#> GSM1009119     1  0.0237     0.9005 0.996 0.004 0.000
#> GSM1009133     1  0.1163     0.8967 0.972 0.000 0.028
#> GSM1009147     1  0.1411     0.8901 0.964 0.036 0.000
#> GSM1009161     3  0.0424     0.7737 0.000 0.008 0.992
#> GSM1009175     2  0.1163     0.8078 0.000 0.972 0.028
#> GSM1009189     1  0.0424     0.8999 0.992 0.008 0.000
#> GSM1009064     2  0.5254     0.5949 0.264 0.736 0.000
#> GSM1009078     2  0.0592     0.8095 0.012 0.988 0.000
#> GSM1009092     1  0.1163     0.8967 0.972 0.000 0.028
#> GSM1009106     3  0.6302     0.4273 0.000 0.480 0.520
#> GSM1009120     1  0.0892     0.8969 0.980 0.020 0.000
#> GSM1009134     1  0.0892     0.8990 0.980 0.000 0.020
#> GSM1009148     1  0.3482     0.8254 0.872 0.128 0.000
#> GSM1009162     3  0.0000     0.7729 0.000 0.000 1.000
#> GSM1009176     2  0.1964     0.7845 0.000 0.944 0.056
#> GSM1009190     1  0.0475     0.9010 0.992 0.004 0.004
#> GSM1009065     2  0.4750     0.6436 0.216 0.784 0.000
#> GSM1009079     2  0.2711     0.7456 0.000 0.912 0.088
#> GSM1009093     1  0.1163     0.8967 0.972 0.000 0.028
#> GSM1009107     3  0.6192     0.5399 0.000 0.420 0.580
#> GSM1009121     1  0.5968     0.4357 0.636 0.000 0.364
#> GSM1009135     1  0.1163     0.8967 0.972 0.000 0.028
#> GSM1009149     1  0.0892     0.8969 0.980 0.020 0.000
#> GSM1009163     3  0.0000     0.7729 0.000 0.000 1.000
#> GSM1009177     2  0.1753     0.7921 0.000 0.952 0.048
#> GSM1009191     1  0.1643     0.8866 0.956 0.044 0.000
#> GSM1009066     2  0.5905     0.4030 0.352 0.648 0.000
#> GSM1009080     2  0.2066     0.7800 0.000 0.940 0.060
#> GSM1009094     1  0.1163     0.8967 0.972 0.000 0.028
#> GSM1009108     2  0.6140    -0.1175 0.000 0.596 0.404
#> GSM1009122     3  0.7960     0.5998 0.120 0.232 0.648
#> GSM1009136     1  0.0237     0.9008 0.996 0.000 0.004
#> GSM1009150     1  0.0892     0.8971 0.980 0.020 0.000
#> GSM1009164     3  0.0747     0.7731 0.000 0.016 0.984
#> GSM1009178     2  0.0424     0.8108 0.008 0.992 0.000
#> GSM1009192     1  0.0892     0.8969 0.980 0.020 0.000
#> GSM1009067     1  0.6026     0.4600 0.624 0.376 0.000
#> GSM1009081     2  0.1289     0.8048 0.000 0.968 0.032
#> GSM1009095     1  0.0237     0.9005 0.996 0.004 0.000
#> GSM1009109     2  0.6280    -0.2996 0.000 0.540 0.460
#> GSM1009123     1  0.0237     0.9005 0.996 0.004 0.000
#> GSM1009137     1  0.1031     0.8980 0.976 0.000 0.024
#> GSM1009151     1  0.4062     0.7902 0.836 0.164 0.000
#> GSM1009165     3  0.0000     0.7729 0.000 0.000 1.000
#> GSM1009179     2  0.0237     0.8117 0.004 0.996 0.000
#> GSM1009193     1  0.0237     0.9005 0.996 0.004 0.000
#> GSM1009068     1  0.5733     0.5641 0.676 0.324 0.000
#> GSM1009082     2  0.0747     0.8125 0.000 0.984 0.016
#> GSM1009096     1  0.1163     0.8967 0.972 0.000 0.028
#> GSM1009110     3  0.6274     0.4763 0.000 0.456 0.544
#> GSM1009124     1  0.0475     0.9010 0.992 0.004 0.004
#> GSM1009138     1  0.1031     0.8980 0.976 0.000 0.024
#> GSM1009152     1  0.3192     0.8391 0.888 0.112 0.000
#> GSM1009166     3  0.0237     0.7735 0.000 0.004 0.996
#> GSM1009180     2  0.1337     0.8115 0.012 0.972 0.016
#> GSM1009194     1  0.3816     0.8067 0.852 0.148 0.000
#> GSM1009069     2  0.2066     0.7836 0.060 0.940 0.000
#> GSM1009083     2  0.0424     0.8129 0.000 0.992 0.008
#> GSM1009097     1  0.1163     0.8967 0.972 0.000 0.028
#> GSM1009111     3  0.6308     0.3990 0.000 0.492 0.508
#> GSM1009125     3  0.1525     0.7720 0.004 0.032 0.964
#> GSM1009139     1  0.0747     0.8998 0.984 0.000 0.016
#> GSM1009153     1  0.4974     0.7038 0.764 0.236 0.000
#> GSM1009167     3  0.0000     0.7729 0.000 0.000 1.000
#> GSM1009181     2  0.2448     0.7614 0.000 0.924 0.076
#> GSM1009195     2  0.6897     0.5435 0.292 0.668 0.040
#> GSM1009070     1  0.5363     0.6454 0.724 0.276 0.000
#> GSM1009084     2  0.0747     0.8125 0.000 0.984 0.016
#> GSM1009098     1  0.1163     0.8967 0.972 0.000 0.028
#> GSM1009112     3  0.5835     0.6377 0.000 0.340 0.660
#> GSM1009126     1  0.0237     0.9010 0.996 0.000 0.004
#> GSM1009140     1  0.0892     0.8990 0.980 0.000 0.020
#> GSM1009154     1  0.2165     0.8745 0.936 0.064 0.000
#> GSM1009168     3  0.0237     0.7735 0.000 0.004 0.996
#> GSM1009182     2  0.1163     0.8078 0.000 0.972 0.028
#> GSM1009196     1  0.2796     0.8548 0.908 0.092 0.000
#> GSM1009071     2  0.5363     0.5718 0.276 0.724 0.000
#> GSM1009085     2  0.0747     0.8125 0.000 0.984 0.016
#> GSM1009099     1  0.1163     0.8967 0.972 0.000 0.028
#> GSM1009113     3  0.6291     0.4534 0.000 0.468 0.532
#> GSM1009127     1  0.0424     0.8999 0.992 0.008 0.000
#> GSM1009141     1  0.0747     0.8998 0.984 0.000 0.016
#> GSM1009155     1  0.6079     0.4336 0.612 0.388 0.000
#> GSM1009169     3  0.0000     0.7729 0.000 0.000 1.000
#> GSM1009183     2  0.2959     0.7295 0.000 0.900 0.100
#> GSM1009197     1  0.0424     0.8999 0.992 0.008 0.000
#> GSM1009072     1  0.6079     0.4325 0.612 0.388 0.000
#> GSM1009086     2  0.1163     0.8074 0.000 0.972 0.028
#> GSM1009100     1  0.1163     0.8967 0.972 0.000 0.028
#> GSM1009114     3  0.5553     0.6925 0.004 0.272 0.724
#> GSM1009128     3  0.5988     0.3132 0.368 0.000 0.632
#> GSM1009142     1  0.1031     0.8980 0.976 0.000 0.024
#> GSM1009156     1  0.6470     0.4549 0.632 0.356 0.012
#> GSM1009170     3  0.0424     0.7737 0.000 0.008 0.992
#> GSM1009184     2  0.0592     0.8128 0.000 0.988 0.012
#> GSM1009198     1  0.0829     0.9010 0.984 0.004 0.012
#> GSM1009073     2  0.6168     0.2234 0.412 0.588 0.000
#> GSM1009087     2  0.0747     0.8079 0.016 0.984 0.000
#> GSM1009101     1  0.1163     0.8967 0.972 0.000 0.028
#> GSM1009115     3  0.5363     0.6898 0.000 0.276 0.724
#> GSM1009129     3  0.4504     0.7246 0.000 0.196 0.804
#> GSM1009143     1  0.0747     0.8998 0.984 0.000 0.016
#> GSM1009157     2  0.4504     0.6629 0.196 0.804 0.000
#> GSM1009171     3  0.0000     0.7729 0.000 0.000 1.000
#> GSM1009185     2  0.3879     0.7064 0.152 0.848 0.000
#> GSM1009199     1  0.6986     0.6067 0.688 0.256 0.056
#> GSM1009074     1  0.6180     0.3602 0.584 0.416 0.000
#> GSM1009088     2  0.0237     0.8117 0.004 0.996 0.000
#> GSM1009102     1  0.0000     0.9007 1.000 0.000 0.000
#> GSM1009116     3  0.6215     0.5278 0.000 0.428 0.572
#> GSM1009130     3  0.5785     0.6245 0.000 0.332 0.668
#> GSM1009144     1  0.0237     0.9008 0.996 0.000 0.004
#> GSM1009158     1  0.1289     0.8920 0.968 0.032 0.000
#> GSM1009172     3  0.0000     0.7729 0.000 0.000 1.000
#> GSM1009186     2  0.0424     0.8132 0.000 0.992 0.008
#> GSM1009200     1  0.0237     0.9005 0.996 0.004 0.000
#> GSM1009075     1  0.6111     0.4125 0.604 0.396 0.000
#> GSM1009089     2  0.1529     0.7963 0.040 0.960 0.000
#> GSM1009103     1  0.0237     0.9008 0.996 0.000 0.004
#> GSM1009117     3  0.5621     0.6674 0.000 0.308 0.692
#> GSM1009131     3  0.6867     0.5202 0.288 0.040 0.672
#> GSM1009145     1  0.0592     0.9002 0.988 0.000 0.012
#> GSM1009159     1  0.0592     0.8992 0.988 0.012 0.000
#> GSM1009173     3  0.0000     0.7729 0.000 0.000 1.000
#> GSM1009187     2  0.3038     0.7520 0.104 0.896 0.000
#> GSM1009201     1  0.0747     0.8982 0.984 0.016 0.000

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>            class entropy silhouette    p1    p2    p3    p4
#> GSM1009062     1  0.1256     0.8927 0.964 0.008 0.000 0.028
#> GSM1009076     2  0.1389     0.8591 0.048 0.952 0.000 0.000
#> GSM1009090     4  0.0000     0.8867 0.000 0.000 0.000 1.000
#> GSM1009104     2  0.0817     0.8544 0.000 0.976 0.024 0.000
#> GSM1009118     4  0.5578     0.3315 0.024 0.348 0.004 0.624
#> GSM1009132     4  0.0188     0.8858 0.000 0.004 0.000 0.996
#> GSM1009146     1  0.0895     0.8887 0.976 0.000 0.004 0.020
#> GSM1009160     3  0.0707     0.9953 0.000 0.020 0.980 0.000
#> GSM1009174     2  0.4313     0.7317 0.260 0.736 0.000 0.004
#> GSM1009188     4  0.4542     0.6788 0.228 0.000 0.020 0.752
#> GSM1009063     1  0.1406     0.8923 0.960 0.016 0.000 0.024
#> GSM1009077     2  0.1716     0.8575 0.064 0.936 0.000 0.000
#> GSM1009091     4  0.0188     0.8865 0.004 0.000 0.000 0.996
#> GSM1009105     2  0.0817     0.8544 0.000 0.976 0.024 0.000
#> GSM1009119     4  0.2987     0.8229 0.104 0.000 0.016 0.880
#> GSM1009133     4  0.0188     0.8858 0.000 0.004 0.000 0.996
#> GSM1009147     1  0.1388     0.8803 0.960 0.000 0.012 0.028
#> GSM1009161     3  0.0707     0.9953 0.000 0.020 0.980 0.000
#> GSM1009175     2  0.4088     0.7617 0.232 0.764 0.000 0.004
#> GSM1009189     4  0.4980     0.5655 0.304 0.000 0.016 0.680
#> GSM1009064     1  0.1510     0.8881 0.956 0.028 0.000 0.016
#> GSM1009078     1  0.4898     0.2200 0.584 0.416 0.000 0.000
#> GSM1009092     4  0.0779     0.8818 0.016 0.000 0.004 0.980
#> GSM1009106     2  0.0817     0.8544 0.000 0.976 0.024 0.000
#> GSM1009120     4  0.5236     0.2594 0.432 0.000 0.008 0.560
#> GSM1009134     4  0.0188     0.8858 0.000 0.004 0.000 0.996
#> GSM1009148     1  0.0336     0.8910 0.992 0.000 0.000 0.008
#> GSM1009162     3  0.0592     0.9972 0.000 0.016 0.984 0.000
#> GSM1009176     2  0.3441     0.8274 0.152 0.840 0.004 0.004
#> GSM1009190     4  0.5615     0.4354 0.356 0.000 0.032 0.612
#> GSM1009065     1  0.1510     0.8881 0.956 0.028 0.000 0.016
#> GSM1009079     2  0.1174     0.8580 0.020 0.968 0.012 0.000
#> GSM1009093     4  0.0376     0.8859 0.004 0.000 0.004 0.992
#> GSM1009107     2  0.0817     0.8544 0.000 0.976 0.024 0.000
#> GSM1009121     4  0.1209     0.8681 0.000 0.004 0.032 0.964
#> GSM1009135     4  0.0188     0.8858 0.000 0.004 0.000 0.996
#> GSM1009149     1  0.4844     0.5456 0.688 0.000 0.012 0.300
#> GSM1009163     3  0.0592     0.9972 0.000 0.016 0.984 0.000
#> GSM1009177     2  0.3448     0.8170 0.168 0.828 0.000 0.004
#> GSM1009191     1  0.4098     0.7012 0.784 0.000 0.012 0.204
#> GSM1009066     1  0.1388     0.8923 0.960 0.012 0.000 0.028
#> GSM1009080     2  0.1209     0.8594 0.032 0.964 0.004 0.000
#> GSM1009094     4  0.0000     0.8867 0.000 0.000 0.000 1.000
#> GSM1009108     2  0.0336     0.8557 0.000 0.992 0.008 0.000
#> GSM1009122     2  0.5866     0.7135 0.020 0.736 0.100 0.144
#> GSM1009136     4  0.0000     0.8867 0.000 0.000 0.000 1.000
#> GSM1009150     1  0.2831     0.8174 0.876 0.000 0.004 0.120
#> GSM1009164     3  0.0707     0.9953 0.000 0.020 0.980 0.000
#> GSM1009178     2  0.4456     0.7032 0.280 0.716 0.000 0.004
#> GSM1009192     1  0.4844     0.5453 0.688 0.000 0.012 0.300
#> GSM1009067     1  0.1256     0.8927 0.964 0.008 0.000 0.028
#> GSM1009081     2  0.0817     0.8591 0.024 0.976 0.000 0.000
#> GSM1009095     4  0.0376     0.8862 0.004 0.000 0.004 0.992
#> GSM1009109     2  0.0592     0.8554 0.000 0.984 0.016 0.000
#> GSM1009123     4  0.1488     0.8724 0.032 0.000 0.012 0.956
#> GSM1009137     4  0.0188     0.8858 0.000 0.004 0.000 0.996
#> GSM1009151     1  0.0592     0.8918 0.984 0.000 0.000 0.016
#> GSM1009165     3  0.0592     0.9972 0.000 0.016 0.984 0.000
#> GSM1009179     2  0.4560     0.6802 0.296 0.700 0.000 0.004
#> GSM1009193     4  0.5331     0.4999 0.332 0.000 0.024 0.644
#> GSM1009068     1  0.1256     0.8927 0.964 0.008 0.000 0.028
#> GSM1009082     2  0.2345     0.8491 0.100 0.900 0.000 0.000
#> GSM1009096     4  0.0000     0.8867 0.000 0.000 0.000 1.000
#> GSM1009110     2  0.0817     0.8544 0.000 0.976 0.024 0.000
#> GSM1009124     4  0.1854     0.8641 0.048 0.000 0.012 0.940
#> GSM1009138     4  0.0188     0.8858 0.000 0.004 0.000 0.996
#> GSM1009152     1  0.0895     0.8920 0.976 0.004 0.000 0.020
#> GSM1009166     3  0.0592     0.9972 0.000 0.016 0.984 0.000
#> GSM1009180     2  0.4053     0.7642 0.228 0.768 0.000 0.004
#> GSM1009194     1  0.0524     0.8911 0.988 0.004 0.000 0.008
#> GSM1009069     1  0.1389     0.8778 0.952 0.048 0.000 0.000
#> GSM1009083     2  0.2647     0.8374 0.120 0.880 0.000 0.000
#> GSM1009097     4  0.0657     0.8831 0.012 0.000 0.004 0.984
#> GSM1009111     2  0.0817     0.8544 0.000 0.976 0.024 0.000
#> GSM1009125     2  0.6267     0.6427 0.008 0.684 0.124 0.184
#> GSM1009139     4  0.0188     0.8858 0.000 0.004 0.000 0.996
#> GSM1009153     1  0.0469     0.8916 0.988 0.000 0.000 0.012
#> GSM1009167     3  0.0469     0.9944 0.000 0.012 0.988 0.000
#> GSM1009181     2  0.2983     0.8465 0.108 0.880 0.008 0.004
#> GSM1009195     1  0.1151     0.8788 0.968 0.024 0.008 0.000
#> GSM1009070     1  0.1042     0.8925 0.972 0.008 0.000 0.020
#> GSM1009084     2  0.1557     0.8579 0.056 0.944 0.000 0.000
#> GSM1009098     4  0.0000     0.8867 0.000 0.000 0.000 1.000
#> GSM1009112     2  0.0817     0.8544 0.000 0.976 0.024 0.000
#> GSM1009126     4  0.0592     0.8839 0.016 0.000 0.000 0.984
#> GSM1009140     4  0.0000     0.8867 0.000 0.000 0.000 1.000
#> GSM1009154     1  0.1209     0.8838 0.964 0.000 0.004 0.032
#> GSM1009168     3  0.0592     0.9972 0.000 0.016 0.984 0.000
#> GSM1009182     2  0.4122     0.7572 0.236 0.760 0.000 0.004
#> GSM1009196     1  0.0895     0.8919 0.976 0.004 0.000 0.020
#> GSM1009071     1  0.1411     0.8913 0.960 0.020 0.000 0.020
#> GSM1009085     2  0.1792     0.8558 0.068 0.932 0.000 0.000
#> GSM1009099     4  0.0779     0.8818 0.016 0.000 0.004 0.980
#> GSM1009113     2  0.0817     0.8544 0.000 0.976 0.024 0.000
#> GSM1009127     4  0.3751     0.7366 0.196 0.000 0.004 0.800
#> GSM1009141     4  0.0188     0.8858 0.000 0.004 0.000 0.996
#> GSM1009155     1  0.0524     0.8912 0.988 0.004 0.000 0.008
#> GSM1009169     3  0.0336     0.9904 0.000 0.008 0.992 0.000
#> GSM1009183     2  0.3727     0.8188 0.164 0.824 0.008 0.004
#> GSM1009197     4  0.5606     0.0654 0.480 0.000 0.020 0.500
#> GSM1009072     1  0.1256     0.8927 0.964 0.008 0.000 0.028
#> GSM1009086     2  0.1118     0.8592 0.036 0.964 0.000 0.000
#> GSM1009100     4  0.0188     0.8865 0.004 0.000 0.000 0.996
#> GSM1009114     2  0.1004     0.8529 0.000 0.972 0.024 0.004
#> GSM1009128     4  0.2161     0.8570 0.016 0.004 0.048 0.932
#> GSM1009142     4  0.0188     0.8858 0.000 0.004 0.000 0.996
#> GSM1009156     1  0.4980     0.5837 0.680 0.000 0.304 0.016
#> GSM1009170     3  0.0707     0.9953 0.000 0.020 0.980 0.000
#> GSM1009184     2  0.5004     0.5029 0.392 0.604 0.000 0.004
#> GSM1009198     4  0.4706     0.6487 0.248 0.000 0.020 0.732
#> GSM1009073     1  0.1406     0.8923 0.960 0.016 0.000 0.024
#> GSM1009087     1  0.3528     0.7285 0.808 0.192 0.000 0.000
#> GSM1009101     4  0.0188     0.8865 0.004 0.000 0.000 0.996
#> GSM1009115     2  0.0817     0.8544 0.000 0.976 0.024 0.000
#> GSM1009129     2  0.3837     0.7207 0.000 0.776 0.224 0.000
#> GSM1009143     4  0.0000     0.8867 0.000 0.000 0.000 1.000
#> GSM1009157     1  0.0336     0.8870 0.992 0.008 0.000 0.000
#> GSM1009171     3  0.0592     0.9972 0.000 0.016 0.984 0.000
#> GSM1009185     2  0.6498     0.6123 0.272 0.624 0.004 0.100
#> GSM1009199     1  0.1617     0.8816 0.956 0.024 0.008 0.012
#> GSM1009074     1  0.1284     0.8929 0.964 0.012 0.000 0.024
#> GSM1009088     1  0.3907     0.6714 0.768 0.232 0.000 0.000
#> GSM1009102     4  0.0188     0.8866 0.000 0.000 0.004 0.996
#> GSM1009116     2  0.0817     0.8544 0.000 0.976 0.024 0.000
#> GSM1009130     2  0.3975     0.7016 0.000 0.760 0.240 0.000
#> GSM1009144     4  0.0000     0.8867 0.000 0.000 0.000 1.000
#> GSM1009158     1  0.2101     0.8636 0.928 0.000 0.012 0.060
#> GSM1009172     3  0.0592     0.9972 0.000 0.016 0.984 0.000
#> GSM1009186     2  0.5004     0.5035 0.392 0.604 0.000 0.004
#> GSM1009200     4  0.5173     0.5278 0.320 0.000 0.020 0.660
#> GSM1009075     1  0.1256     0.8927 0.964 0.008 0.000 0.028
#> GSM1009089     1  0.1118     0.8825 0.964 0.036 0.000 0.000
#> GSM1009103     4  0.0188     0.8866 0.000 0.000 0.004 0.996
#> GSM1009117     2  0.0817     0.8544 0.000 0.976 0.024 0.000
#> GSM1009131     4  0.7666     0.3295 0.012 0.272 0.192 0.524
#> GSM1009145     4  0.0000     0.8867 0.000 0.000 0.000 1.000
#> GSM1009159     1  0.5326     0.3441 0.604 0.000 0.016 0.380
#> GSM1009173     3  0.0469     0.9944 0.000 0.012 0.988 0.000
#> GSM1009187     1  0.3672     0.7283 0.824 0.164 0.000 0.012
#> GSM1009201     1  0.5203     0.2463 0.576 0.000 0.008 0.416

show/hide code output

cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#>            class entropy silhouette    p1    p2    p3    p4    p5
#> GSM1009062     1  0.4297     0.6006 0.528 0.472 0.000 0.000 0.000
#> GSM1009076     5  0.2890     0.6506 0.004 0.160 0.000 0.000 0.836
#> GSM1009090     4  0.0404     0.8912 0.012 0.000 0.000 0.988 0.000
#> GSM1009104     5  0.0290     0.7712 0.000 0.000 0.000 0.008 0.992
#> GSM1009118     4  0.5016     0.6953 0.064 0.136 0.000 0.752 0.048
#> GSM1009132     4  0.0162     0.8892 0.000 0.000 0.000 0.996 0.004
#> GSM1009146     1  0.1082     0.5809 0.964 0.028 0.000 0.008 0.000
#> GSM1009160     3  0.0000     1.0000 0.000 0.000 1.000 0.000 0.000
#> GSM1009174     2  0.5425     0.6302 0.060 0.520 0.000 0.000 0.420
#> GSM1009188     1  0.5102     0.0837 0.580 0.044 0.000 0.376 0.000
#> GSM1009063     1  0.4297     0.6006 0.528 0.472 0.000 0.000 0.000
#> GSM1009077     5  0.3010     0.6337 0.004 0.172 0.000 0.000 0.824
#> GSM1009091     4  0.1341     0.8780 0.056 0.000 0.000 0.944 0.000
#> GSM1009105     5  0.0162     0.7728 0.000 0.000 0.000 0.004 0.996
#> GSM1009119     1  0.4288     0.1081 0.612 0.004 0.000 0.384 0.000
#> GSM1009133     4  0.0162     0.8892 0.000 0.000 0.000 0.996 0.004
#> GSM1009147     1  0.3366     0.4610 0.828 0.140 0.000 0.032 0.000
#> GSM1009161     3  0.0000     1.0000 0.000 0.000 1.000 0.000 0.000
#> GSM1009175     2  0.5820     0.6735 0.100 0.524 0.000 0.000 0.376
#> GSM1009189     1  0.4206     0.3417 0.696 0.016 0.000 0.288 0.000
#> GSM1009064     1  0.4297     0.6006 0.528 0.472 0.000 0.000 0.000
#> GSM1009078     5  0.5572     0.3420 0.124 0.248 0.000 0.000 0.628
#> GSM1009092     4  0.3452     0.7156 0.244 0.000 0.000 0.756 0.000
#> GSM1009106     5  0.0162     0.7728 0.000 0.000 0.000 0.004 0.996
#> GSM1009120     1  0.3663     0.4940 0.776 0.016 0.000 0.208 0.000
#> GSM1009134     4  0.0162     0.8892 0.000 0.000 0.000 0.996 0.004
#> GSM1009148     1  0.2848     0.6063 0.840 0.156 0.000 0.004 0.000
#> GSM1009162     3  0.0000     1.0000 0.000 0.000 1.000 0.000 0.000
#> GSM1009176     2  0.4894     0.5557 0.024 0.520 0.000 0.000 0.456
#> GSM1009190     1  0.5891     0.3204 0.624 0.108 0.016 0.252 0.000
#> GSM1009065     1  0.4297     0.6006 0.528 0.472 0.000 0.000 0.000
#> GSM1009079     5  0.3534     0.4646 0.000 0.256 0.000 0.000 0.744
#> GSM1009093     4  0.1965     0.8549 0.096 0.000 0.000 0.904 0.000
#> GSM1009107     5  0.0162     0.7728 0.000 0.000 0.000 0.004 0.996
#> GSM1009121     4  0.4246     0.7760 0.088 0.008 0.004 0.800 0.100
#> GSM1009135     4  0.0162     0.8892 0.000 0.000 0.000 0.996 0.004
#> GSM1009149     1  0.2124     0.5521 0.900 0.004 0.000 0.096 0.000
#> GSM1009163     3  0.0000     1.0000 0.000 0.000 1.000 0.000 0.000
#> GSM1009177     2  0.5032     0.5769 0.032 0.520 0.000 0.000 0.448
#> GSM1009191     1  0.5355     0.3376 0.688 0.184 0.008 0.120 0.000
#> GSM1009066     1  0.4297     0.6006 0.528 0.472 0.000 0.000 0.000
#> GSM1009080     5  0.3424     0.5031 0.000 0.240 0.000 0.000 0.760
#> GSM1009094     4  0.0963     0.8862 0.036 0.000 0.000 0.964 0.000
#> GSM1009108     5  0.0162     0.7728 0.000 0.000 0.000 0.004 0.996
#> GSM1009122     5  0.8243    -0.0992 0.012 0.244 0.092 0.244 0.408
#> GSM1009136     4  0.0404     0.8911 0.012 0.000 0.000 0.988 0.000
#> GSM1009150     1  0.1251     0.5731 0.956 0.008 0.000 0.036 0.000
#> GSM1009164     3  0.0000     1.0000 0.000 0.000 1.000 0.000 0.000
#> GSM1009178     2  0.6188     0.6739 0.160 0.524 0.000 0.000 0.316
#> GSM1009192     1  0.2193     0.5515 0.900 0.008 0.000 0.092 0.000
#> GSM1009067     1  0.4297     0.6006 0.528 0.472 0.000 0.000 0.000
#> GSM1009081     5  0.2536     0.6910 0.004 0.128 0.000 0.000 0.868
#> GSM1009095     4  0.0609     0.8903 0.020 0.000 0.000 0.980 0.000
#> GSM1009109     5  0.0162     0.7728 0.000 0.000 0.000 0.004 0.996
#> GSM1009123     4  0.4410     0.3860 0.440 0.004 0.000 0.556 0.000
#> GSM1009137     4  0.0162     0.8892 0.000 0.000 0.000 0.996 0.004
#> GSM1009151     1  0.3636     0.6158 0.728 0.272 0.000 0.000 0.000
#> GSM1009165     3  0.0000     1.0000 0.000 0.000 1.000 0.000 0.000
#> GSM1009179     2  0.6133     0.6776 0.148 0.524 0.000 0.000 0.328
#> GSM1009193     1  0.3491     0.4566 0.768 0.004 0.000 0.228 0.000
#> GSM1009068     1  0.4297     0.6006 0.528 0.472 0.000 0.000 0.000
#> GSM1009082     5  0.2886     0.6866 0.008 0.148 0.000 0.000 0.844
#> GSM1009096     4  0.1043     0.8849 0.040 0.000 0.000 0.960 0.000
#> GSM1009110     5  0.0162     0.7728 0.000 0.000 0.000 0.004 0.996
#> GSM1009124     4  0.4542     0.3442 0.456 0.008 0.000 0.536 0.000
#> GSM1009138     4  0.0162     0.8892 0.000 0.000 0.000 0.996 0.004
#> GSM1009152     1  0.3906     0.6155 0.704 0.292 0.000 0.004 0.000
#> GSM1009166     3  0.0000     1.0000 0.000 0.000 1.000 0.000 0.000
#> GSM1009180     2  0.6312     0.6525 0.200 0.524 0.000 0.000 0.276
#> GSM1009194     1  0.4173     0.6151 0.688 0.300 0.000 0.012 0.000
#> GSM1009069     1  0.4443     0.5975 0.524 0.472 0.000 0.000 0.004
#> GSM1009083     5  0.3039     0.6921 0.012 0.152 0.000 0.000 0.836
#> GSM1009097     4  0.3143     0.7597 0.204 0.000 0.000 0.796 0.000
#> GSM1009111     5  0.0324     0.7718 0.000 0.000 0.004 0.004 0.992
#> GSM1009125     4  0.7197     0.0325 0.012 0.196 0.020 0.488 0.284
#> GSM1009139     4  0.0162     0.8892 0.000 0.000 0.000 0.996 0.004
#> GSM1009153     1  0.3837     0.6135 0.692 0.308 0.000 0.000 0.000
#> GSM1009167     3  0.0000     1.0000 0.000 0.000 1.000 0.000 0.000
#> GSM1009181     2  0.4894     0.5557 0.024 0.520 0.000 0.000 0.456
#> GSM1009195     2  0.5681    -0.0700 0.360 0.572 0.024 0.000 0.044
#> GSM1009070     1  0.4297     0.6006 0.528 0.472 0.000 0.000 0.000
#> GSM1009084     5  0.2011     0.7270 0.004 0.088 0.000 0.000 0.908
#> GSM1009098     4  0.0609     0.8901 0.020 0.000 0.000 0.980 0.000
#> GSM1009112     5  0.0290     0.7712 0.000 0.000 0.000 0.008 0.992
#> GSM1009126     4  0.2389     0.8356 0.116 0.004 0.000 0.880 0.000
#> GSM1009140     4  0.0324     0.8901 0.004 0.000 0.000 0.992 0.004
#> GSM1009154     1  0.2124     0.6011 0.900 0.096 0.000 0.004 0.000
#> GSM1009168     3  0.0000     1.0000 0.000 0.000 1.000 0.000 0.000
#> GSM1009182     2  0.5913     0.6774 0.112 0.524 0.000 0.000 0.364
#> GSM1009196     1  0.3562     0.6088 0.788 0.196 0.000 0.016 0.000
#> GSM1009071     1  0.4297     0.6006 0.528 0.472 0.000 0.000 0.000
#> GSM1009085     5  0.1830     0.7424 0.008 0.068 0.000 0.000 0.924
#> GSM1009099     4  0.3210     0.7535 0.212 0.000 0.000 0.788 0.000
#> GSM1009113     5  0.0324     0.7718 0.000 0.000 0.004 0.004 0.992
#> GSM1009127     1  0.4380     0.3234 0.676 0.020 0.000 0.304 0.000
#> GSM1009141     4  0.0162     0.8892 0.000 0.000 0.000 0.996 0.004
#> GSM1009155     1  0.4101     0.6092 0.628 0.372 0.000 0.000 0.000
#> GSM1009169     3  0.0000     1.0000 0.000 0.000 1.000 0.000 0.000
#> GSM1009183     2  0.5216     0.6032 0.044 0.520 0.000 0.000 0.436
#> GSM1009197     1  0.3513     0.4966 0.800 0.020 0.000 0.180 0.000
#> GSM1009072     1  0.4297     0.6006 0.528 0.472 0.000 0.000 0.000
#> GSM1009086     5  0.2389     0.7035 0.004 0.116 0.000 0.000 0.880
#> GSM1009100     4  0.0963     0.8863 0.036 0.000 0.000 0.964 0.000
#> GSM1009114     5  0.0290     0.7712 0.000 0.000 0.000 0.008 0.992
#> GSM1009128     4  0.4714     0.5076 0.372 0.004 0.016 0.608 0.000
#> GSM1009142     4  0.0162     0.8892 0.000 0.000 0.000 0.996 0.004
#> GSM1009156     1  0.5386     0.2819 0.680 0.168 0.148 0.004 0.000
#> GSM1009170     3  0.0000     1.0000 0.000 0.000 1.000 0.000 0.000
#> GSM1009184     2  0.5639     0.6598 0.080 0.524 0.000 0.000 0.396
#> GSM1009198     1  0.5922     0.0692 0.532 0.116 0.000 0.352 0.000
#> GSM1009073     1  0.4297     0.6006 0.528 0.472 0.000 0.000 0.000
#> GSM1009087     5  0.6636     0.0834 0.232 0.336 0.000 0.000 0.432
#> GSM1009101     4  0.1197     0.8819 0.048 0.000 0.000 0.952 0.000
#> GSM1009115     5  0.0162     0.7728 0.000 0.000 0.000 0.004 0.996
#> GSM1009129     5  0.4204     0.5569 0.000 0.048 0.196 0.000 0.756
#> GSM1009143     4  0.0451     0.8907 0.008 0.000 0.000 0.988 0.004
#> GSM1009157     1  0.4537     0.5833 0.592 0.396 0.012 0.000 0.000
#> GSM1009171     3  0.0000     1.0000 0.000 0.000 1.000 0.000 0.000
#> GSM1009185     2  0.4961     0.3762 0.448 0.524 0.000 0.000 0.028
#> GSM1009199     2  0.5090     0.4345 0.264 0.668 0.000 0.004 0.064
#> GSM1009074     1  0.4297     0.6006 0.528 0.472 0.000 0.000 0.000
#> GSM1009088     5  0.6432     0.1819 0.204 0.304 0.000 0.000 0.492
#> GSM1009102     4  0.0510     0.8909 0.016 0.000 0.000 0.984 0.000
#> GSM1009116     5  0.0162     0.7728 0.000 0.000 0.000 0.004 0.996
#> GSM1009130     5  0.3461     0.5461 0.000 0.004 0.224 0.000 0.772
#> GSM1009144     4  0.0324     0.8901 0.004 0.000 0.000 0.992 0.004
#> GSM1009158     1  0.0798     0.5804 0.976 0.016 0.000 0.008 0.000
#> GSM1009172     3  0.0000     1.0000 0.000 0.000 1.000 0.000 0.000
#> GSM1009186     2  0.5556     0.6512 0.072 0.524 0.000 0.000 0.404
#> GSM1009200     1  0.5203     0.3214 0.648 0.080 0.000 0.272 0.000
#> GSM1009075     1  0.4297     0.6006 0.528 0.472 0.000 0.000 0.000
#> GSM1009089     1  0.4295     0.5863 0.740 0.216 0.000 0.000 0.044
#> GSM1009103     4  0.0404     0.8912 0.012 0.000 0.000 0.988 0.000
#> GSM1009117     5  0.0290     0.7712 0.000 0.000 0.000 0.008 0.992
#> GSM1009131     5  0.6565     0.3536 0.096 0.004 0.184 0.084 0.632
#> GSM1009145     4  0.0290     0.8908 0.008 0.000 0.000 0.992 0.000
#> GSM1009159     1  0.1908     0.5556 0.908 0.000 0.000 0.092 0.000
#> GSM1009173     3  0.0000     1.0000 0.000 0.000 1.000 0.000 0.000
#> GSM1009187     2  0.4627     0.3513 0.444 0.544 0.000 0.000 0.012
#> GSM1009201     1  0.2971     0.5189 0.836 0.008 0.000 0.156 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
#> GSM1009062     6  0.1082     0.8256 0.040 0.000 0.000 0.004 0.000 0.956
#> GSM1009076     2  0.5213     0.4039 0.024 0.564 0.000 0.000 0.360 0.052
#> GSM1009090     4  0.0547     0.8889 0.020 0.000 0.000 0.980 0.000 0.000
#> GSM1009104     5  0.0146     0.8412 0.000 0.004 0.000 0.000 0.996 0.000
#> GSM1009118     4  0.5113     0.4197 0.352 0.064 0.000 0.572 0.000 0.012
#> GSM1009132     4  0.0000     0.8876 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1009146     1  0.2214     0.8304 0.888 0.016 0.000 0.000 0.000 0.096
#> GSM1009160     3  0.0000     1.0000 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM1009174     2  0.0405     0.8419 0.004 0.988 0.000 0.000 0.008 0.000
#> GSM1009188     1  0.0858     0.8836 0.968 0.004 0.000 0.028 0.000 0.000
#> GSM1009063     6  0.0937     0.8264 0.040 0.000 0.000 0.000 0.000 0.960
#> GSM1009077     2  0.5452     0.4111 0.024 0.560 0.000 0.000 0.340 0.076
#> GSM1009091     4  0.1219     0.8816 0.048 0.004 0.000 0.948 0.000 0.000
#> GSM1009105     5  0.0146     0.8412 0.000 0.004 0.000 0.000 0.996 0.000
#> GSM1009119     1  0.0937     0.8754 0.960 0.000 0.000 0.040 0.000 0.000
#> GSM1009133     4  0.0000     0.8876 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1009147     1  0.1498     0.8751 0.940 0.028 0.000 0.000 0.000 0.032
#> GSM1009161     3  0.0000     1.0000 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM1009175     2  0.0508     0.8420 0.004 0.984 0.000 0.000 0.012 0.000
#> GSM1009189     1  0.0862     0.8870 0.972 0.008 0.000 0.016 0.000 0.004
#> GSM1009064     6  0.0790     0.8219 0.032 0.000 0.000 0.000 0.000 0.968
#> GSM1009078     5  0.4852     0.4385 0.024 0.024 0.000 0.000 0.564 0.388
#> GSM1009092     4  0.3575     0.6409 0.284 0.008 0.000 0.708 0.000 0.000
#> GSM1009106     5  0.0146     0.8412 0.000 0.004 0.000 0.000 0.996 0.000
#> GSM1009120     1  0.0725     0.8869 0.976 0.000 0.000 0.012 0.000 0.012
#> GSM1009134     4  0.0146     0.8870 0.000 0.000 0.000 0.996 0.000 0.004
#> GSM1009148     1  0.3403     0.6723 0.768 0.020 0.000 0.000 0.000 0.212
#> GSM1009162     3  0.0000     1.0000 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM1009176     2  0.0547     0.8408 0.000 0.980 0.000 0.000 0.020 0.000
#> GSM1009190     1  0.0806     0.8841 0.972 0.008 0.000 0.020 0.000 0.000
#> GSM1009065     6  0.0790     0.8219 0.032 0.000 0.000 0.000 0.000 0.968
#> GSM1009079     2  0.4087     0.6944 0.024 0.764 0.000 0.000 0.168 0.044
#> GSM1009093     4  0.1753     0.8616 0.084 0.004 0.000 0.912 0.000 0.000
#> GSM1009107     5  0.0146     0.8412 0.000 0.004 0.000 0.000 0.996 0.000
#> GSM1009121     4  0.4662     0.3710 0.388 0.008 0.000 0.576 0.024 0.004
#> GSM1009135     4  0.0000     0.8876 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1009149     1  0.1297     0.8759 0.948 0.012 0.000 0.000 0.000 0.040
#> GSM1009163     3  0.0000     1.0000 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM1009177     2  0.0632     0.8399 0.000 0.976 0.000 0.000 0.024 0.000
#> GSM1009191     1  0.0767     0.8844 0.976 0.012 0.000 0.008 0.000 0.004
#> GSM1009066     6  0.0937     0.8264 0.040 0.000 0.000 0.000 0.000 0.960
#> GSM1009080     2  0.4476     0.6392 0.024 0.712 0.000 0.000 0.220 0.044
#> GSM1009094     4  0.0713     0.8887 0.028 0.000 0.000 0.972 0.000 0.000
#> GSM1009108     5  0.0146     0.8412 0.000 0.004 0.000 0.000 0.996 0.000
#> GSM1009122     4  0.7580     0.1133 0.212 0.288 0.000 0.388 0.088 0.024
#> GSM1009136     4  0.0508     0.8896 0.012 0.000 0.000 0.984 0.000 0.004
#> GSM1009150     1  0.1434     0.8706 0.940 0.012 0.000 0.000 0.000 0.048
#> GSM1009164     3  0.0000     1.0000 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM1009178     2  0.0603     0.8423 0.004 0.980 0.000 0.000 0.016 0.000
#> GSM1009192     1  0.0922     0.8845 0.968 0.004 0.000 0.004 0.000 0.024
#> GSM1009067     6  0.1007     0.8259 0.044 0.000 0.000 0.000 0.000 0.956
#> GSM1009081     2  0.5234     0.3175 0.024 0.532 0.000 0.000 0.396 0.048
#> GSM1009095     4  0.1075     0.8838 0.048 0.000 0.000 0.952 0.000 0.000
#> GSM1009109     5  0.0146     0.8412 0.000 0.004 0.000 0.000 0.996 0.000
#> GSM1009123     1  0.1327     0.8551 0.936 0.000 0.000 0.064 0.000 0.000
#> GSM1009137     4  0.0000     0.8876 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1009151     6  0.3915     0.3581 0.412 0.004 0.000 0.000 0.000 0.584
#> GSM1009165     3  0.0000     1.0000 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM1009179     2  0.0508     0.8420 0.004 0.984 0.000 0.000 0.012 0.000
#> GSM1009193     1  0.0622     0.8867 0.980 0.000 0.000 0.012 0.000 0.008
#> GSM1009068     6  0.1152     0.8255 0.044 0.000 0.000 0.004 0.000 0.952
#> GSM1009082     2  0.6242     0.2680 0.024 0.476 0.000 0.000 0.316 0.184
#> GSM1009096     4  0.0790     0.8881 0.032 0.000 0.000 0.968 0.000 0.000
#> GSM1009110     5  0.0146     0.8412 0.000 0.004 0.000 0.000 0.996 0.000
#> GSM1009124     1  0.2883     0.8121 0.864 0.068 0.000 0.060 0.000 0.008
#> GSM1009138     4  0.0000     0.8876 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1009152     6  0.3852     0.4218 0.384 0.004 0.000 0.000 0.000 0.612
#> GSM1009166     3  0.0000     1.0000 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM1009180     2  0.0622     0.8414 0.008 0.980 0.000 0.000 0.012 0.000
#> GSM1009194     6  0.4258     0.1793 0.468 0.016 0.000 0.000 0.000 0.516
#> GSM1009069     6  0.0713     0.8181 0.028 0.000 0.000 0.000 0.000 0.972
#> GSM1009083     5  0.6602     0.0510 0.024 0.320 0.000 0.000 0.356 0.300
#> GSM1009097     4  0.2980     0.7622 0.192 0.008 0.000 0.800 0.000 0.000
#> GSM1009111     5  0.0146     0.8412 0.000 0.004 0.000 0.000 0.996 0.000
#> GSM1009125     4  0.6957     0.2253 0.176 0.296 0.000 0.452 0.068 0.008
#> GSM1009139     4  0.0291     0.8886 0.004 0.000 0.000 0.992 0.000 0.004
#> GSM1009153     6  0.3699     0.5225 0.336 0.004 0.000 0.000 0.000 0.660
#> GSM1009167     3  0.0000     1.0000 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM1009181     2  0.0632     0.8399 0.000 0.976 0.000 0.000 0.024 0.000
#> GSM1009195     1  0.5344    -0.0200 0.468 0.448 0.012 0.000 0.000 0.072
#> GSM1009070     6  0.1007     0.8259 0.044 0.000 0.000 0.000 0.000 0.956
#> GSM1009084     5  0.4187     0.6766 0.024 0.140 0.000 0.000 0.768 0.068
#> GSM1009098     4  0.0790     0.8880 0.032 0.000 0.000 0.968 0.000 0.000
#> GSM1009112     5  0.0146     0.8412 0.000 0.004 0.000 0.000 0.996 0.000
#> GSM1009126     4  0.4209     0.3981 0.384 0.020 0.000 0.596 0.000 0.000
#> GSM1009140     4  0.0146     0.8886 0.004 0.000 0.000 0.996 0.000 0.000
#> GSM1009154     1  0.3653     0.5091 0.692 0.008 0.000 0.000 0.000 0.300
#> GSM1009168     3  0.0000     1.0000 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM1009182     2  0.0603     0.8423 0.004 0.980 0.000 0.000 0.016 0.000
#> GSM1009196     1  0.4062     0.0475 0.552 0.008 0.000 0.000 0.000 0.440
#> GSM1009071     6  0.0790     0.8219 0.032 0.000 0.000 0.000 0.000 0.968
#> GSM1009085     5  0.3732     0.7326 0.024 0.084 0.000 0.000 0.812 0.080
#> GSM1009099     4  0.2848     0.7821 0.176 0.008 0.000 0.816 0.000 0.000
#> GSM1009113     5  0.0146     0.8412 0.000 0.004 0.000 0.000 0.996 0.000
#> GSM1009127     1  0.1196     0.8748 0.952 0.000 0.000 0.040 0.000 0.008
#> GSM1009141     4  0.0146     0.8870 0.000 0.000 0.000 0.996 0.000 0.004
#> GSM1009155     6  0.2941     0.6820 0.220 0.000 0.000 0.000 0.000 0.780
#> GSM1009169     3  0.0000     1.0000 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM1009183     2  0.0547     0.8412 0.000 0.980 0.000 0.000 0.020 0.000
#> GSM1009197     1  0.0748     0.8858 0.976 0.004 0.000 0.004 0.000 0.016
#> GSM1009072     6  0.1082     0.8256 0.040 0.000 0.000 0.004 0.000 0.956
#> GSM1009086     5  0.5287     0.0858 0.024 0.396 0.000 0.000 0.528 0.052
#> GSM1009100     4  0.0865     0.8874 0.036 0.000 0.000 0.964 0.000 0.000
#> GSM1009114     5  0.0291     0.8383 0.000 0.004 0.000 0.004 0.992 0.000
#> GSM1009128     1  0.2068     0.8351 0.904 0.008 0.000 0.080 0.008 0.000
#> GSM1009142     4  0.0000     0.8876 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM1009156     1  0.2007     0.8646 0.920 0.032 0.012 0.000 0.000 0.036
#> GSM1009170     3  0.0000     1.0000 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM1009184     2  0.0405     0.8419 0.004 0.988 0.000 0.000 0.008 0.000
#> GSM1009198     1  0.0891     0.8833 0.968 0.008 0.000 0.024 0.000 0.000
#> GSM1009073     6  0.0937     0.8264 0.040 0.000 0.000 0.000 0.000 0.960
#> GSM1009087     5  0.4983     0.3468 0.024 0.028 0.000 0.000 0.520 0.428
#> GSM1009101     4  0.0935     0.8868 0.032 0.004 0.000 0.964 0.000 0.000
#> GSM1009115     5  0.0146     0.8412 0.000 0.004 0.000 0.000 0.996 0.000
#> GSM1009129     5  0.5922     0.6052 0.164 0.112 0.024 0.016 0.660 0.024
#> GSM1009143     4  0.0291     0.8886 0.004 0.000 0.000 0.992 0.000 0.004
#> GSM1009157     6  0.3957     0.5935 0.280 0.020 0.004 0.000 0.000 0.696
#> GSM1009171     3  0.0000     1.0000 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM1009185     2  0.0458     0.8324 0.016 0.984 0.000 0.000 0.000 0.000
#> GSM1009199     2  0.3955     0.1704 0.436 0.560 0.000 0.004 0.000 0.000
#> GSM1009074     6  0.0937     0.8264 0.040 0.000 0.000 0.000 0.000 0.960
#> GSM1009088     6  0.5070    -0.2971 0.024 0.032 0.000 0.000 0.472 0.472
#> GSM1009102     4  0.0865     0.8876 0.036 0.000 0.000 0.964 0.000 0.000
#> GSM1009116     5  0.0146     0.8412 0.000 0.004 0.000 0.000 0.996 0.000
#> GSM1009130     5  0.3916     0.7254 0.132 0.016 0.028 0.000 0.800 0.024
#> GSM1009144     4  0.0508     0.8896 0.012 0.000 0.000 0.984 0.000 0.004
#> GSM1009158     1  0.1967     0.8432 0.904 0.012 0.000 0.000 0.000 0.084
#> GSM1009172     3  0.0000     1.0000 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM1009186     2  0.0405     0.8419 0.004 0.988 0.000 0.000 0.008 0.000
#> GSM1009200     1  0.0891     0.8837 0.968 0.008 0.000 0.024 0.000 0.000
#> GSM1009075     6  0.1082     0.8256 0.040 0.000 0.000 0.004 0.000 0.956
#> GSM1009089     6  0.5006     0.0802 0.460 0.028 0.000 0.000 0.024 0.488
#> GSM1009103     4  0.0458     0.8896 0.016 0.000 0.000 0.984 0.000 0.000
#> GSM1009117     5  0.0146     0.8412 0.000 0.004 0.000 0.000 0.996 0.000
#> GSM1009131     5  0.4616     0.5764 0.260 0.012 0.004 0.016 0.688 0.020
#> GSM1009145     4  0.0363     0.8899 0.012 0.000 0.000 0.988 0.000 0.000
#> GSM1009159     1  0.1297     0.8759 0.948 0.012 0.000 0.000 0.000 0.040
#> GSM1009173     3  0.0000     1.0000 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM1009187     2  0.0363     0.8351 0.012 0.988 0.000 0.000 0.000 0.000
#> GSM1009201     1  0.1218     0.8835 0.956 0.004 0.000 0.012 0.000 0.028

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

consensus_heatmap(res, k = 2)

plot of chunk tab-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 temperature(p) time(p) specimen(p) k
#> MAD:NMF 137          0.987   0.974    4.32e-19 2
#> MAD:NMF 121          0.787   0.990    4.88e-34 3
#> MAD:NMF 131          1.000   1.000    1.82e-55 4
#> MAD:NMF 114          1.000   1.000    1.62e-70 5
#> MAD:NMF 119          0.997   1.000    1.30e-84 6

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


ATC:hclust**

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

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

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

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

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

collect_plots(res)

plot of chunk ATC-hclust-collect-plots

The plots are:

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

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

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

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

select_partition_number(res)

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

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

get_stats(res)
#>   k 1-PAC mean_silhouette concordance area_increased  Rand Jaccard
#> 2 2 0.956           0.954       0.979         0.4742 0.534   0.534
#> 3 3 0.731           0.910       0.906         0.3858 0.797   0.620
#> 4 4 0.688           0.771       0.849         0.1060 0.938   0.811
#> 5 5 0.731           0.722       0.829         0.0540 0.919   0.718
#> 6 6 0.841           0.881       0.911         0.0455 0.965   0.846

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
#> GSM1009062     1  0.0000      0.969 1.000 0.000
#> GSM1009076     2  0.0000      0.994 0.000 1.000
#> GSM1009090     1  0.0000      0.969 1.000 0.000
#> GSM1009104     2  0.0000      0.994 0.000 1.000
#> GSM1009118     2  0.0000      0.994 0.000 1.000
#> GSM1009132     1  0.4939      0.875 0.892 0.108
#> GSM1009146     1  0.0000      0.969 1.000 0.000
#> GSM1009160     2  0.0000      0.994 0.000 1.000
#> GSM1009174     2  0.2778      0.950 0.048 0.952
#> GSM1009188     1  0.0000      0.969 1.000 0.000
#> GSM1009063     1  0.0000      0.969 1.000 0.000
#> GSM1009077     2  0.0000      0.994 0.000 1.000
#> GSM1009091     1  0.0000      0.969 1.000 0.000
#> GSM1009105     2  0.0000      0.994 0.000 1.000
#> GSM1009119     1  0.0000      0.969 1.000 0.000
#> GSM1009133     1  0.0000      0.969 1.000 0.000
#> GSM1009147     1  0.0000      0.969 1.000 0.000
#> GSM1009161     2  0.0000      0.994 0.000 1.000
#> GSM1009175     2  0.3431      0.933 0.064 0.936
#> GSM1009189     1  0.0672      0.964 0.992 0.008
#> GSM1009064     1  0.0000      0.969 1.000 0.000
#> GSM1009078     1  0.0000      0.969 1.000 0.000
#> GSM1009092     1  0.0000      0.969 1.000 0.000
#> GSM1009106     2  0.0000      0.994 0.000 1.000
#> GSM1009120     1  0.0000      0.969 1.000 0.000
#> GSM1009134     1  0.0000      0.969 1.000 0.000
#> GSM1009148     1  0.0000      0.969 1.000 0.000
#> GSM1009162     2  0.0000      0.994 0.000 1.000
#> GSM1009176     2  0.0000      0.994 0.000 1.000
#> GSM1009190     1  0.0672      0.964 0.992 0.008
#> GSM1009065     1  0.0000      0.969 1.000 0.000
#> GSM1009079     2  0.0000      0.994 0.000 1.000
#> GSM1009093     1  0.0000      0.969 1.000 0.000
#> GSM1009107     2  0.0000      0.994 0.000 1.000
#> GSM1009121     1  0.5946      0.839 0.856 0.144
#> GSM1009135     1  0.0000      0.969 1.000 0.000
#> GSM1009149     1  0.0000      0.969 1.000 0.000
#> GSM1009163     2  0.0000      0.994 0.000 1.000
#> GSM1009177     2  0.0000      0.994 0.000 1.000
#> GSM1009191     1  0.9087      0.560 0.676 0.324
#> GSM1009066     1  0.0000      0.969 1.000 0.000
#> GSM1009080     2  0.0000      0.994 0.000 1.000
#> GSM1009094     1  0.0000      0.969 1.000 0.000
#> GSM1009108     2  0.0000      0.994 0.000 1.000
#> GSM1009122     2  0.0000      0.994 0.000 1.000
#> GSM1009136     1  0.0000      0.969 1.000 0.000
#> GSM1009150     1  0.0000      0.969 1.000 0.000
#> GSM1009164     2  0.0000      0.994 0.000 1.000
#> GSM1009178     1  0.1633      0.952 0.976 0.024
#> GSM1009192     1  0.0672      0.964 0.992 0.008
#> GSM1009067     1  0.0000      0.969 1.000 0.000
#> GSM1009081     2  0.0000      0.994 0.000 1.000
#> GSM1009095     1  0.0000      0.969 1.000 0.000
#> GSM1009109     2  0.0000      0.994 0.000 1.000
#> GSM1009123     1  0.0000      0.969 1.000 0.000
#> GSM1009137     1  0.0000      0.969 1.000 0.000
#> GSM1009151     1  0.0000      0.969 1.000 0.000
#> GSM1009165     2  0.0000      0.994 0.000 1.000
#> GSM1009179     1  0.8861      0.597 0.696 0.304
#> GSM1009193     1  0.0000      0.969 1.000 0.000
#> GSM1009068     1  0.0000      0.969 1.000 0.000
#> GSM1009082     2  0.0000      0.994 0.000 1.000
#> GSM1009096     1  0.0000      0.969 1.000 0.000
#> GSM1009110     2  0.0000      0.994 0.000 1.000
#> GSM1009124     1  0.0938      0.962 0.988 0.012
#> GSM1009138     1  0.0000      0.969 1.000 0.000
#> GSM1009152     1  0.0000      0.969 1.000 0.000
#> GSM1009166     2  0.0000      0.994 0.000 1.000
#> GSM1009180     1  0.1633      0.952 0.976 0.024
#> GSM1009194     1  0.9393      0.493 0.644 0.356
#> GSM1009069     1  0.0000      0.969 1.000 0.000
#> GSM1009083     2  0.0000      0.994 0.000 1.000
#> GSM1009097     1  0.0000      0.969 1.000 0.000
#> GSM1009111     2  0.0000      0.994 0.000 1.000
#> GSM1009125     2  0.0000      0.994 0.000 1.000
#> GSM1009139     1  0.4939      0.875 0.892 0.108
#> GSM1009153     1  0.0000      0.969 1.000 0.000
#> GSM1009167     2  0.0000      0.994 0.000 1.000
#> GSM1009181     2  0.0000      0.994 0.000 1.000
#> GSM1009195     1  0.9393      0.493 0.644 0.356
#> GSM1009070     1  0.0000      0.969 1.000 0.000
#> GSM1009084     2  0.0000      0.994 0.000 1.000
#> GSM1009098     1  0.0000      0.969 1.000 0.000
#> GSM1009112     2  0.0000      0.994 0.000 1.000
#> GSM1009126     1  0.0938      0.962 0.988 0.012
#> GSM1009140     1  0.0000      0.969 1.000 0.000
#> GSM1009154     1  0.0000      0.969 1.000 0.000
#> GSM1009168     2  0.0000      0.994 0.000 1.000
#> GSM1009182     1  0.8861      0.597 0.696 0.304
#> GSM1009196     1  0.0000      0.969 1.000 0.000
#> GSM1009071     1  0.0000      0.969 1.000 0.000
#> GSM1009085     2  0.0000      0.994 0.000 1.000
#> GSM1009099     1  0.0000      0.969 1.000 0.000
#> GSM1009113     2  0.0000      0.994 0.000 1.000
#> GSM1009127     1  0.0000      0.969 1.000 0.000
#> GSM1009141     1  0.4939      0.875 0.892 0.108
#> GSM1009155     1  0.0000      0.969 1.000 0.000
#> GSM1009169     2  0.0000      0.994 0.000 1.000
#> GSM1009183     2  0.3431      0.933 0.064 0.936
#> GSM1009197     1  0.0000      0.969 1.000 0.000
#> GSM1009072     1  0.0000      0.969 1.000 0.000
#> GSM1009086     2  0.0000      0.994 0.000 1.000
#> GSM1009100     1  0.0000      0.969 1.000 0.000
#> GSM1009114     2  0.0000      0.994 0.000 1.000
#> GSM1009128     1  0.0938      0.962 0.988 0.012
#> GSM1009142     1  0.4161      0.899 0.916 0.084
#> GSM1009156     1  0.0000      0.969 1.000 0.000
#> GSM1009170     2  0.0000      0.994 0.000 1.000
#> GSM1009184     2  0.2948      0.946 0.052 0.948
#> GSM1009198     1  0.0000      0.969 1.000 0.000
#> GSM1009073     1  0.0000      0.969 1.000 0.000
#> GSM1009087     1  0.0000      0.969 1.000 0.000
#> GSM1009101     1  0.0000      0.969 1.000 0.000
#> GSM1009115     2  0.0000      0.994 0.000 1.000
#> GSM1009129     2  0.0000      0.994 0.000 1.000
#> GSM1009143     1  0.0000      0.969 1.000 0.000
#> GSM1009157     1  0.0000      0.969 1.000 0.000
#> GSM1009171     2  0.0000      0.994 0.000 1.000
#> GSM1009185     1  0.0000      0.969 1.000 0.000
#> GSM1009199     1  0.9393      0.493 0.644 0.356
#> GSM1009074     1  0.0000      0.969 1.000 0.000
#> GSM1009088     1  0.0000      0.969 1.000 0.000
#> GSM1009102     1  0.0000      0.969 1.000 0.000
#> GSM1009116     2  0.0000      0.994 0.000 1.000
#> GSM1009130     2  0.0000      0.994 0.000 1.000
#> GSM1009144     1  0.0000      0.969 1.000 0.000
#> GSM1009158     1  0.0000      0.969 1.000 0.000
#> GSM1009172     2  0.0000      0.994 0.000 1.000
#> GSM1009186     2  0.2948      0.946 0.052 0.948
#> GSM1009200     1  0.1414      0.956 0.980 0.020
#> GSM1009075     1  0.0000      0.969 1.000 0.000
#> GSM1009089     1  0.0000      0.969 1.000 0.000
#> GSM1009103     1  0.0000      0.969 1.000 0.000
#> GSM1009117     2  0.0000      0.994 0.000 1.000
#> GSM1009131     1  0.0938      0.962 0.988 0.012
#> GSM1009145     1  0.0000      0.969 1.000 0.000
#> GSM1009159     1  0.0000      0.969 1.000 0.000
#> GSM1009173     2  0.0000      0.994 0.000 1.000
#> GSM1009187     1  0.0000      0.969 1.000 0.000
#> GSM1009201     1  0.1414      0.956 0.980 0.020

show/hide code output

cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#>            class entropy silhouette    p1    p2    p3
#> GSM1009062     1  0.4654      0.866 0.792 0.000 0.208
#> GSM1009076     2  0.3267      0.935 0.116 0.884 0.000
#> GSM1009090     3  0.2066      0.955 0.060 0.000 0.940
#> GSM1009104     2  0.0000      0.950 0.000 1.000 0.000
#> GSM1009118     2  0.3267      0.935 0.116 0.884 0.000
#> GSM1009132     1  0.0829      0.844 0.984 0.004 0.012
#> GSM1009146     3  0.2066      0.955 0.060 0.000 0.940
#> GSM1009160     2  0.0000      0.950 0.000 1.000 0.000
#> GSM1009174     2  0.4062      0.900 0.164 0.836 0.000
#> GSM1009188     3  0.2066      0.955 0.060 0.000 0.940
#> GSM1009063     1  0.4654      0.866 0.792 0.000 0.208
#> GSM1009077     2  0.3267      0.935 0.116 0.884 0.000
#> GSM1009091     3  0.2066      0.955 0.060 0.000 0.940
#> GSM1009105     2  0.0000      0.950 0.000 1.000 0.000
#> GSM1009119     3  0.1860      0.957 0.052 0.000 0.948
#> GSM1009133     1  0.3752      0.899 0.856 0.000 0.144
#> GSM1009147     3  0.2066      0.955 0.060 0.000 0.940
#> GSM1009161     2  0.0000      0.950 0.000 1.000 0.000
#> GSM1009175     2  0.4291      0.886 0.180 0.820 0.000
#> GSM1009189     1  0.3192      0.907 0.888 0.000 0.112
#> GSM1009064     1  0.3267      0.906 0.884 0.000 0.116
#> GSM1009078     3  0.2711      0.933 0.088 0.000 0.912
#> GSM1009092     3  0.0000      0.950 0.000 0.000 1.000
#> GSM1009106     2  0.0000      0.950 0.000 1.000 0.000
#> GSM1009120     3  0.1860      0.957 0.052 0.000 0.948
#> GSM1009134     1  0.3752      0.899 0.856 0.000 0.144
#> GSM1009148     3  0.2066      0.955 0.060 0.000 0.940
#> GSM1009162     2  0.0000      0.950 0.000 1.000 0.000
#> GSM1009176     2  0.3267      0.935 0.116 0.884 0.000
#> GSM1009190     1  0.3192      0.907 0.888 0.000 0.112
#> GSM1009065     1  0.3267      0.906 0.884 0.000 0.116
#> GSM1009079     2  0.3267      0.935 0.116 0.884 0.000
#> GSM1009093     3  0.0000      0.950 0.000 0.000 1.000
#> GSM1009107     2  0.0000      0.950 0.000 1.000 0.000
#> GSM1009121     1  0.2116      0.826 0.948 0.040 0.012
#> GSM1009135     1  0.3752      0.899 0.856 0.000 0.144
#> GSM1009149     3  0.0000      0.950 0.000 0.000 1.000
#> GSM1009163     2  0.0000      0.950 0.000 1.000 0.000
#> GSM1009177     2  0.3267      0.935 0.116 0.884 0.000
#> GSM1009191     1  0.4654      0.617 0.792 0.208 0.000
#> GSM1009066     1  0.3267      0.906 0.884 0.000 0.116
#> GSM1009080     2  0.3267      0.935 0.116 0.884 0.000
#> GSM1009094     3  0.2066      0.955 0.060 0.000 0.940
#> GSM1009108     2  0.0000      0.950 0.000 1.000 0.000
#> GSM1009122     2  0.3267      0.935 0.116 0.884 0.000
#> GSM1009136     3  0.0000      0.950 0.000 0.000 1.000
#> GSM1009150     3  0.0000      0.950 0.000 0.000 1.000
#> GSM1009164     2  0.0000      0.950 0.000 1.000 0.000
#> GSM1009178     1  0.2796      0.901 0.908 0.000 0.092
#> GSM1009192     1  0.3192      0.907 0.888 0.000 0.112
#> GSM1009067     1  0.4654      0.866 0.792 0.000 0.208
#> GSM1009081     2  0.3267      0.935 0.116 0.884 0.000
#> GSM1009095     3  0.1289      0.955 0.032 0.000 0.968
#> GSM1009109     2  0.0000      0.950 0.000 1.000 0.000
#> GSM1009123     3  0.1860      0.957 0.052 0.000 0.948
#> GSM1009137     1  0.3752      0.899 0.856 0.000 0.144
#> GSM1009151     3  0.2066      0.955 0.060 0.000 0.940
#> GSM1009165     2  0.0000      0.950 0.000 1.000 0.000
#> GSM1009179     1  0.6012      0.640 0.748 0.220 0.032
#> GSM1009193     3  0.1860      0.957 0.052 0.000 0.948
#> GSM1009068     1  0.4654      0.866 0.792 0.000 0.208
#> GSM1009082     2  0.3267      0.935 0.116 0.884 0.000
#> GSM1009096     3  0.2066      0.955 0.060 0.000 0.940
#> GSM1009110     2  0.0000      0.950 0.000 1.000 0.000
#> GSM1009124     1  0.3038      0.906 0.896 0.000 0.104
#> GSM1009138     1  0.3752      0.899 0.856 0.000 0.144
#> GSM1009152     3  0.2066      0.955 0.060 0.000 0.940
#> GSM1009166     2  0.0000      0.950 0.000 1.000 0.000
#> GSM1009180     1  0.2796      0.901 0.908 0.000 0.092
#> GSM1009194     1  0.5016      0.560 0.760 0.240 0.000
#> GSM1009069     1  0.3267      0.906 0.884 0.000 0.116
#> GSM1009083     2  0.3267      0.935 0.116 0.884 0.000
#> GSM1009097     3  0.0000      0.950 0.000 0.000 1.000
#> GSM1009111     2  0.0000      0.950 0.000 1.000 0.000
#> GSM1009125     2  0.3267      0.935 0.116 0.884 0.000
#> GSM1009139     1  0.0829      0.844 0.984 0.004 0.012
#> GSM1009153     3  0.2066      0.955 0.060 0.000 0.940
#> GSM1009167     2  0.0000      0.950 0.000 1.000 0.000
#> GSM1009181     2  0.3267      0.935 0.116 0.884 0.000
#> GSM1009195     1  0.5016      0.560 0.760 0.240 0.000
#> GSM1009070     3  0.0000      0.950 0.000 0.000 1.000
#> GSM1009084     2  0.3267      0.935 0.116 0.884 0.000
#> GSM1009098     3  0.0000      0.950 0.000 0.000 1.000
#> GSM1009112     2  0.0000      0.950 0.000 1.000 0.000
#> GSM1009126     1  0.3038      0.906 0.896 0.000 0.104
#> GSM1009140     1  0.3752      0.899 0.856 0.000 0.144
#> GSM1009154     3  0.2066      0.955 0.060 0.000 0.940
#> GSM1009168     2  0.0000      0.950 0.000 1.000 0.000
#> GSM1009182     1  0.6012      0.640 0.748 0.220 0.032
#> GSM1009196     3  0.2356      0.948 0.072 0.000 0.928
#> GSM1009071     1  0.3267      0.906 0.884 0.000 0.116
#> GSM1009085     2  0.3267      0.935 0.116 0.884 0.000
#> GSM1009099     3  0.0000      0.950 0.000 0.000 1.000
#> GSM1009113     2  0.0000      0.950 0.000 1.000 0.000
#> GSM1009127     3  0.1860      0.957 0.052 0.000 0.948
#> GSM1009141     1  0.0829      0.844 0.984 0.004 0.012
#> GSM1009155     3  0.5926      0.447 0.356 0.000 0.644
#> GSM1009169     2  0.0000      0.950 0.000 1.000 0.000
#> GSM1009183     2  0.4291      0.886 0.180 0.820 0.000
#> GSM1009197     3  0.2165      0.953 0.064 0.000 0.936
#> GSM1009072     1  0.4654      0.866 0.792 0.000 0.208
#> GSM1009086     2  0.3267      0.935 0.116 0.884 0.000
#> GSM1009100     3  0.0000      0.950 0.000 0.000 1.000
#> GSM1009114     2  0.0237      0.949 0.004 0.996 0.000
#> GSM1009128     1  0.3038      0.906 0.896 0.000 0.104
#> GSM1009142     1  0.1647      0.862 0.960 0.004 0.036
#> GSM1009156     1  0.3267      0.906 0.884 0.000 0.116
#> GSM1009170     2  0.0000      0.950 0.000 1.000 0.000
#> GSM1009184     2  0.4121      0.897 0.168 0.832 0.000
#> GSM1009198     3  0.2066      0.955 0.060 0.000 0.940
#> GSM1009073     1  0.3482      0.905 0.872 0.000 0.128
#> GSM1009087     3  0.2711      0.933 0.088 0.000 0.912
#> GSM1009101     3  0.0000      0.950 0.000 0.000 1.000
#> GSM1009115     2  0.0000      0.950 0.000 1.000 0.000
#> GSM1009129     2  0.3267      0.935 0.116 0.884 0.000
#> GSM1009143     1  0.3752      0.899 0.856 0.000 0.144
#> GSM1009157     1  0.3267      0.906 0.884 0.000 0.116
#> GSM1009171     2  0.0000      0.950 0.000 1.000 0.000
#> GSM1009185     1  0.3686      0.900 0.860 0.000 0.140
#> GSM1009199     1  0.5016      0.560 0.760 0.240 0.000
#> GSM1009074     1  0.4654      0.866 0.792 0.000 0.208
#> GSM1009088     3  0.2711      0.933 0.088 0.000 0.912
#> GSM1009102     3  0.0000      0.950 0.000 0.000 1.000
#> GSM1009116     2  0.0000      0.950 0.000 1.000 0.000
#> GSM1009130     2  0.3267      0.935 0.116 0.884 0.000
#> GSM1009144     1  0.3752      0.899 0.856 0.000 0.144
#> GSM1009158     3  0.0000      0.950 0.000 0.000 1.000
#> GSM1009172     2  0.0000      0.950 0.000 1.000 0.000
#> GSM1009186     2  0.4121      0.897 0.168 0.832 0.000
#> GSM1009200     1  0.2878      0.903 0.904 0.000 0.096
#> GSM1009075     1  0.4654      0.866 0.792 0.000 0.208
#> GSM1009089     3  0.0000      0.950 0.000 0.000 1.000
#> GSM1009103     3  0.0000      0.950 0.000 0.000 1.000
#> GSM1009117     2  0.0237      0.949 0.004 0.996 0.000
#> GSM1009131     1  0.3038      0.906 0.896 0.000 0.104
#> GSM1009145     3  0.0000      0.950 0.000 0.000 1.000
#> GSM1009159     3  0.0000      0.950 0.000 0.000 1.000
#> GSM1009173     2  0.0000      0.950 0.000 1.000 0.000
#> GSM1009187     1  0.3686      0.900 0.860 0.000 0.140
#> GSM1009201     1  0.2878      0.903 0.904 0.000 0.096

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>            class entropy silhouette    p1    p2    p3    p4
#> GSM1009062     1  0.4731     0.8051 0.780 0.000 0.060 0.160
#> GSM1009076     3  0.3873     0.6774 0.000 0.228 0.772 0.000
#> GSM1009090     4  0.3123     0.9093 0.156 0.000 0.000 0.844
#> GSM1009104     2  0.0000     0.8015 0.000 1.000 0.000 0.000
#> GSM1009118     2  0.4998     0.0784 0.000 0.512 0.488 0.000
#> GSM1009132     1  0.2704     0.8374 0.876 0.000 0.124 0.000
#> GSM1009146     4  0.3219     0.9067 0.164 0.000 0.000 0.836
#> GSM1009160     3  0.4605     0.5902 0.000 0.336 0.664 0.000
#> GSM1009174     3  0.4540     0.6424 0.032 0.196 0.772 0.000
#> GSM1009188     4  0.3123     0.9090 0.156 0.000 0.000 0.844
#> GSM1009063     1  0.4731     0.8051 0.780 0.000 0.060 0.160
#> GSM1009077     3  0.3873     0.6774 0.000 0.228 0.772 0.000
#> GSM1009091     4  0.3123     0.9093 0.156 0.000 0.000 0.844
#> GSM1009105     2  0.0000     0.8015 0.000 1.000 0.000 0.000
#> GSM1009119     4  0.3024     0.9106 0.148 0.000 0.000 0.852
#> GSM1009133     1  0.0921     0.8857 0.972 0.000 0.000 0.028
#> GSM1009147     4  0.3219     0.9067 0.164 0.000 0.000 0.836
#> GSM1009161     3  0.4605     0.5902 0.000 0.336 0.664 0.000
#> GSM1009175     3  0.4842     0.6297 0.048 0.192 0.760 0.000
#> GSM1009189     1  0.0779     0.8892 0.980 0.000 0.016 0.004
#> GSM1009064     1  0.1637     0.8797 0.940 0.000 0.060 0.000
#> GSM1009078     4  0.3810     0.8804 0.188 0.000 0.008 0.804
#> GSM1009092     4  0.0000     0.8854 0.000 0.000 0.000 1.000
#> GSM1009106     2  0.0000     0.8015 0.000 1.000 0.000 0.000
#> GSM1009120     4  0.3024     0.9106 0.148 0.000 0.000 0.852
#> GSM1009134     1  0.0921     0.8857 0.972 0.000 0.000 0.028
#> GSM1009148     4  0.3219     0.9067 0.164 0.000 0.000 0.836
#> GSM1009162     3  0.4605     0.5902 0.000 0.336 0.664 0.000
#> GSM1009176     3  0.3837     0.6758 0.000 0.224 0.776 0.000
#> GSM1009190     1  0.0779     0.8892 0.980 0.000 0.016 0.004
#> GSM1009065     1  0.1637     0.8797 0.940 0.000 0.060 0.000
#> GSM1009079     3  0.3873     0.6774 0.000 0.228 0.772 0.000
#> GSM1009093     4  0.0000     0.8854 0.000 0.000 0.000 1.000
#> GSM1009107     2  0.0000     0.8015 0.000 1.000 0.000 0.000
#> GSM1009121     1  0.3552     0.8177 0.848 0.024 0.128 0.000
#> GSM1009135     1  0.0921     0.8857 0.972 0.000 0.000 0.028
#> GSM1009149     4  0.0000     0.8854 0.000 0.000 0.000 1.000
#> GSM1009163     3  0.4605     0.5902 0.000 0.336 0.664 0.000
#> GSM1009177     3  0.3837     0.6758 0.000 0.224 0.776 0.000
#> GSM1009191     1  0.6198     0.5952 0.660 0.116 0.224 0.000
#> GSM1009066     1  0.1637     0.8797 0.940 0.000 0.060 0.000
#> GSM1009080     3  0.3873     0.6774 0.000 0.228 0.772 0.000
#> GSM1009094     4  0.3123     0.9093 0.156 0.000 0.000 0.844
#> GSM1009108     2  0.0000     0.8015 0.000 1.000 0.000 0.000
#> GSM1009122     2  0.4998     0.0784 0.000 0.512 0.488 0.000
#> GSM1009136     4  0.0000     0.8854 0.000 0.000 0.000 1.000
#> GSM1009150     4  0.0000     0.8854 0.000 0.000 0.000 1.000
#> GSM1009164     3  0.4605     0.5902 0.000 0.336 0.664 0.000
#> GSM1009178     1  0.1211     0.8847 0.960 0.000 0.040 0.000
#> GSM1009192     1  0.0779     0.8892 0.980 0.000 0.016 0.004
#> GSM1009067     1  0.4731     0.8051 0.780 0.000 0.060 0.160
#> GSM1009081     3  0.3873     0.6774 0.000 0.228 0.772 0.000
#> GSM1009095     4  0.2281     0.9048 0.096 0.000 0.000 0.904
#> GSM1009109     2  0.0000     0.8015 0.000 1.000 0.000 0.000
#> GSM1009123     4  0.3024     0.9106 0.148 0.000 0.000 0.852
#> GSM1009137     1  0.0921     0.8857 0.972 0.000 0.000 0.028
#> GSM1009151     4  0.3219     0.9067 0.164 0.000 0.000 0.836
#> GSM1009165     3  0.4605     0.5902 0.000 0.336 0.664 0.000
#> GSM1009179     1  0.4891     0.6279 0.680 0.012 0.308 0.000
#> GSM1009193     4  0.3024     0.9106 0.148 0.000 0.000 0.852
#> GSM1009068     1  0.4731     0.8051 0.780 0.000 0.060 0.160
#> GSM1009082     3  0.3873     0.6774 0.000 0.228 0.772 0.000
#> GSM1009096     4  0.3123     0.9093 0.156 0.000 0.000 0.844
#> GSM1009110     2  0.0000     0.8015 0.000 1.000 0.000 0.000
#> GSM1009124     1  0.0707     0.8885 0.980 0.000 0.020 0.000
#> GSM1009138     1  0.0921     0.8857 0.972 0.000 0.000 0.028
#> GSM1009152     4  0.3219     0.9067 0.164 0.000 0.000 0.836
#> GSM1009166     3  0.4605     0.5902 0.000 0.336 0.664 0.000
#> GSM1009180     1  0.1211     0.8847 0.960 0.000 0.040 0.000
#> GSM1009194     1  0.6506     0.5439 0.628 0.132 0.240 0.000
#> GSM1009069     1  0.1637     0.8797 0.940 0.000 0.060 0.000
#> GSM1009083     3  0.3873     0.6774 0.000 0.228 0.772 0.000
#> GSM1009097     4  0.0000     0.8854 0.000 0.000 0.000 1.000
#> GSM1009111     2  0.0000     0.8015 0.000 1.000 0.000 0.000
#> GSM1009125     2  0.4998     0.0784 0.000 0.512 0.488 0.000
#> GSM1009139     1  0.2704     0.8374 0.876 0.000 0.124 0.000
#> GSM1009153     4  0.3219     0.9067 0.164 0.000 0.000 0.836
#> GSM1009167     3  0.4605     0.5902 0.000 0.336 0.664 0.000
#> GSM1009181     3  0.3837     0.6758 0.000 0.224 0.776 0.000
#> GSM1009195     1  0.6506     0.5439 0.628 0.132 0.240 0.000
#> GSM1009070     4  0.0000     0.8854 0.000 0.000 0.000 1.000
#> GSM1009084     3  0.3873     0.6774 0.000 0.228 0.772 0.000
#> GSM1009098     4  0.0000     0.8854 0.000 0.000 0.000 1.000
#> GSM1009112     2  0.0000     0.8015 0.000 1.000 0.000 0.000
#> GSM1009126     1  0.0707     0.8885 0.980 0.000 0.020 0.000
#> GSM1009140     1  0.0921     0.8857 0.972 0.000 0.000 0.028
#> GSM1009154     4  0.3219     0.9067 0.164 0.000 0.000 0.836
#> GSM1009168     3  0.4605     0.5902 0.000 0.336 0.664 0.000
#> GSM1009182     1  0.4891     0.6279 0.680 0.012 0.308 0.000
#> GSM1009196     4  0.3356     0.8993 0.176 0.000 0.000 0.824
#> GSM1009071     1  0.1637     0.8797 0.940 0.000 0.060 0.000
#> GSM1009085     3  0.3873     0.6774 0.000 0.228 0.772 0.000
#> GSM1009099     4  0.0000     0.8854 0.000 0.000 0.000 1.000
#> GSM1009113     2  0.0000     0.8015 0.000 1.000 0.000 0.000
#> GSM1009127     4  0.3024     0.9106 0.148 0.000 0.000 0.852
#> GSM1009141     1  0.2704     0.8374 0.876 0.000 0.124 0.000
#> GSM1009155     4  0.5281     0.3849 0.464 0.000 0.008 0.528
#> GSM1009169     3  0.4605     0.5902 0.000 0.336 0.664 0.000
#> GSM1009183     3  0.4842     0.6297 0.048 0.192 0.760 0.000
#> GSM1009197     4  0.3266     0.9042 0.168 0.000 0.000 0.832
#> GSM1009072     1  0.4731     0.8051 0.780 0.000 0.060 0.160
#> GSM1009086     3  0.3873     0.6774 0.000 0.228 0.772 0.000
#> GSM1009100     4  0.0000     0.8854 0.000 0.000 0.000 1.000
#> GSM1009114     2  0.0188     0.7984 0.000 0.996 0.004 0.000
#> GSM1009128     1  0.0707     0.8885 0.980 0.000 0.020 0.000
#> GSM1009142     1  0.2281     0.8553 0.904 0.000 0.096 0.000
#> GSM1009156     1  0.0336     0.8875 0.992 0.000 0.008 0.000
#> GSM1009170     3  0.4605     0.5902 0.000 0.336 0.664 0.000
#> GSM1009184     3  0.4590     0.6406 0.036 0.192 0.772 0.000
#> GSM1009198     4  0.3123     0.9090 0.156 0.000 0.000 0.844
#> GSM1009073     1  0.2101     0.8770 0.928 0.000 0.060 0.012
#> GSM1009087     4  0.3810     0.8804 0.188 0.000 0.008 0.804
#> GSM1009101     4  0.0000     0.8854 0.000 0.000 0.000 1.000
#> GSM1009115     2  0.0000     0.8015 0.000 1.000 0.000 0.000
#> GSM1009129     2  0.4998     0.0784 0.000 0.512 0.488 0.000
#> GSM1009143     1  0.0921     0.8857 0.972 0.000 0.000 0.028
#> GSM1009157     1  0.0336     0.8875 0.992 0.000 0.008 0.000
#> GSM1009171     3  0.4605     0.5902 0.000 0.336 0.664 0.000
#> GSM1009185     1  0.0817     0.8867 0.976 0.000 0.000 0.024
#> GSM1009199     1  0.6506     0.5439 0.628 0.132 0.240 0.000
#> GSM1009074     1  0.4731     0.8051 0.780 0.000 0.060 0.160
#> GSM1009088     4  0.3810     0.8804 0.188 0.000 0.008 0.804
#> GSM1009102     4  0.0000     0.8854 0.000 0.000 0.000 1.000
#> GSM1009116     2  0.0000     0.8015 0.000 1.000 0.000 0.000
#> GSM1009130     2  0.4998     0.0784 0.000 0.512 0.488 0.000
#> GSM1009144     1  0.0921     0.8857 0.972 0.000 0.000 0.028
#> GSM1009158     4  0.0000     0.8854 0.000 0.000 0.000 1.000
#> GSM1009172     3  0.4605     0.5902 0.000 0.336 0.664 0.000
#> GSM1009186     3  0.4590     0.6406 0.036 0.192 0.772 0.000
#> GSM1009200     1  0.1118     0.8866 0.964 0.000 0.036 0.000
#> GSM1009075     1  0.4731     0.8051 0.780 0.000 0.060 0.160
#> GSM1009089     4  0.0592     0.8894 0.016 0.000 0.000 0.984
#> GSM1009103     4  0.0000     0.8854 0.000 0.000 0.000 1.000
#> GSM1009117     2  0.0188     0.7984 0.000 0.996 0.004 0.000
#> GSM1009131     1  0.0707     0.8885 0.980 0.000 0.020 0.000
#> GSM1009145     4  0.0000     0.8854 0.000 0.000 0.000 1.000
#> GSM1009159     4  0.0000     0.8854 0.000 0.000 0.000 1.000
#> GSM1009173     3  0.4605     0.5902 0.000 0.336 0.664 0.000
#> GSM1009187     1  0.0817     0.8867 0.976 0.000 0.000 0.024
#> GSM1009201     1  0.1118     0.8866 0.964 0.000 0.036 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
#> GSM1009062     3  0.6132     -0.164 0.388 0.000 0.480 0.132 0.000
#> GSM1009076     2  0.0703      0.871 0.000 0.976 0.000 0.000 0.024
#> GSM1009090     4  0.2629      0.903 0.136 0.000 0.004 0.860 0.000
#> GSM1009104     5  0.0000      0.999 0.000 0.000 0.000 0.000 1.000
#> GSM1009118     2  0.3837      0.616 0.000 0.692 0.000 0.000 0.308
#> GSM1009132     1  0.2329      0.744 0.876 0.124 0.000 0.000 0.000
#> GSM1009146     4  0.2719      0.900 0.144 0.000 0.004 0.852 0.000
#> GSM1009160     3  0.4653      0.408 0.000 0.472 0.516 0.000 0.012
#> GSM1009174     2  0.0880      0.840 0.032 0.968 0.000 0.000 0.000
#> GSM1009188     4  0.2629      0.902 0.136 0.000 0.004 0.860 0.000
#> GSM1009063     3  0.6132     -0.164 0.388 0.000 0.480 0.132 0.000
#> GSM1009077     2  0.0703      0.871 0.000 0.976 0.000 0.000 0.024
#> GSM1009091     4  0.2629      0.903 0.136 0.000 0.004 0.860 0.000
#> GSM1009105     5  0.0000      0.999 0.000 0.000 0.000 0.000 1.000
#> GSM1009119     4  0.2536      0.904 0.128 0.000 0.004 0.868 0.000
#> GSM1009133     1  0.1282      0.794 0.952 0.000 0.004 0.044 0.000
#> GSM1009147     4  0.2719      0.900 0.144 0.000 0.004 0.852 0.000
#> GSM1009161     3  0.4653      0.408 0.000 0.472 0.516 0.000 0.012
#> GSM1009175     2  0.1197      0.824 0.048 0.952 0.000 0.000 0.000
#> GSM1009189     1  0.0579      0.804 0.984 0.008 0.000 0.008 0.000
#> GSM1009064     1  0.4815      0.353 0.524 0.000 0.456 0.020 0.000
#> GSM1009078     4  0.3039      0.873 0.192 0.000 0.000 0.808 0.000
#> GSM1009092     4  0.0703      0.879 0.000 0.000 0.024 0.976 0.000
#> GSM1009106     5  0.0000      0.999 0.000 0.000 0.000 0.000 1.000
#> GSM1009120     4  0.2536      0.904 0.128 0.000 0.004 0.868 0.000
#> GSM1009134     1  0.1282      0.794 0.952 0.000 0.004 0.044 0.000
#> GSM1009148     4  0.2719      0.900 0.144 0.000 0.004 0.852 0.000
#> GSM1009162     3  0.4653      0.408 0.000 0.472 0.516 0.000 0.012
#> GSM1009176     2  0.0609      0.869 0.000 0.980 0.000 0.000 0.020
#> GSM1009190     1  0.0579      0.804 0.984 0.008 0.000 0.008 0.000
#> GSM1009065     1  0.4815      0.353 0.524 0.000 0.456 0.020 0.000
#> GSM1009079     2  0.0703      0.871 0.000 0.976 0.000 0.000 0.024
#> GSM1009093     4  0.0703      0.879 0.000 0.000 0.024 0.976 0.000
#> GSM1009107     5  0.0000      0.999 0.000 0.000 0.000 0.000 1.000
#> GSM1009121     1  0.2921      0.729 0.856 0.124 0.000 0.000 0.020
#> GSM1009135     1  0.1282      0.794 0.952 0.000 0.004 0.044 0.000
#> GSM1009149     4  0.0703      0.879 0.000 0.000 0.024 0.976 0.000
#> GSM1009163     3  0.4653      0.408 0.000 0.472 0.516 0.000 0.012
#> GSM1009177     2  0.0609      0.869 0.000 0.980 0.000 0.000 0.020
#> GSM1009191     1  0.3983      0.503 0.660 0.340 0.000 0.000 0.000
#> GSM1009066     1  0.4815      0.353 0.524 0.000 0.456 0.020 0.000
#> GSM1009080     2  0.0703      0.871 0.000 0.976 0.000 0.000 0.024
#> GSM1009094     4  0.2629      0.903 0.136 0.000 0.004 0.860 0.000
#> GSM1009108     5  0.0000      0.999 0.000 0.000 0.000 0.000 1.000
#> GSM1009122     2  0.3837      0.616 0.000 0.692 0.000 0.000 0.308
#> GSM1009136     4  0.0703      0.879 0.000 0.000 0.024 0.976 0.000
#> GSM1009150     4  0.0703      0.879 0.000 0.000 0.024 0.976 0.000
#> GSM1009164     3  0.4653      0.408 0.000 0.472 0.516 0.000 0.012
#> GSM1009178     1  0.1043      0.797 0.960 0.040 0.000 0.000 0.000
#> GSM1009192     1  0.0579      0.804 0.984 0.008 0.000 0.008 0.000
#> GSM1009067     3  0.6132     -0.164 0.388 0.000 0.480 0.132 0.000
#> GSM1009081     2  0.0703      0.871 0.000 0.976 0.000 0.000 0.024
#> GSM1009095     4  0.2293      0.898 0.084 0.000 0.016 0.900 0.000
#> GSM1009109     5  0.0000      0.999 0.000 0.000 0.000 0.000 1.000
#> GSM1009123     4  0.2536      0.904 0.128 0.000 0.004 0.868 0.000
#> GSM1009137     1  0.1282      0.794 0.952 0.000 0.004 0.044 0.000
#> GSM1009151     4  0.2719      0.900 0.144 0.000 0.004 0.852 0.000
#> GSM1009165     3  0.4653      0.408 0.000 0.472 0.516 0.000 0.012
#> GSM1009179     1  0.3895      0.543 0.680 0.320 0.000 0.000 0.000
#> GSM1009193     4  0.2536      0.904 0.128 0.000 0.004 0.868 0.000
#> GSM1009068     3  0.6132     -0.164 0.388 0.000 0.480 0.132 0.000
#> GSM1009082     2  0.0703      0.871 0.000 0.976 0.000 0.000 0.024
#> GSM1009096     4  0.2629      0.903 0.136 0.000 0.004 0.860 0.000
#> GSM1009110     5  0.0000      0.999 0.000 0.000 0.000 0.000 1.000
#> GSM1009124     1  0.0510      0.804 0.984 0.016 0.000 0.000 0.000
#> GSM1009138     1  0.1282      0.794 0.952 0.000 0.004 0.044 0.000
#> GSM1009152     4  0.2719      0.900 0.144 0.000 0.004 0.852 0.000
#> GSM1009166     3  0.4653      0.408 0.000 0.472 0.516 0.000 0.012
#> GSM1009180     1  0.1043      0.797 0.960 0.040 0.000 0.000 0.000
#> GSM1009194     1  0.4101      0.443 0.628 0.372 0.000 0.000 0.000
#> GSM1009069     1  0.4815      0.353 0.524 0.000 0.456 0.020 0.000
#> GSM1009083     2  0.0703      0.871 0.000 0.976 0.000 0.000 0.024
#> GSM1009097     4  0.0703      0.879 0.000 0.000 0.024 0.976 0.000
#> GSM1009111     5  0.0000      0.999 0.000 0.000 0.000 0.000 1.000
#> GSM1009125     2  0.3837      0.616 0.000 0.692 0.000 0.000 0.308
#> GSM1009139     1  0.2329      0.744 0.876 0.124 0.000 0.000 0.000
#> GSM1009153     4  0.2719      0.900 0.144 0.000 0.004 0.852 0.000
#> GSM1009167     3  0.4653      0.408 0.000 0.472 0.516 0.000 0.012
#> GSM1009181     2  0.0609      0.869 0.000 0.980 0.000 0.000 0.020
#> GSM1009195     1  0.4101      0.443 0.628 0.372 0.000 0.000 0.000
#> GSM1009070     4  0.0703      0.879 0.000 0.000 0.024 0.976 0.000
#> GSM1009084     2  0.0703      0.871 0.000 0.976 0.000 0.000 0.024
#> GSM1009098     4  0.0703      0.879 0.000 0.000 0.024 0.976 0.000
#> GSM1009112     5  0.0000      0.999 0.000 0.000 0.000 0.000 1.000
#> GSM1009126     1  0.0510      0.804 0.984 0.016 0.000 0.000 0.000
#> GSM1009140     1  0.1282      0.794 0.952 0.000 0.004 0.044 0.000
#> GSM1009154     4  0.2719      0.900 0.144 0.000 0.004 0.852 0.000
#> GSM1009168     3  0.4653      0.408 0.000 0.472 0.516 0.000 0.012
#> GSM1009182     1  0.3895      0.543 0.680 0.320 0.000 0.000 0.000
#> GSM1009196     4  0.2848      0.893 0.156 0.000 0.004 0.840 0.000
#> GSM1009071     1  0.4815      0.353 0.524 0.000 0.456 0.020 0.000
#> GSM1009085     2  0.0703      0.871 0.000 0.976 0.000 0.000 0.024
#> GSM1009099     4  0.0703      0.879 0.000 0.000 0.024 0.976 0.000
#> GSM1009113     5  0.0000      0.999 0.000 0.000 0.000 0.000 1.000
#> GSM1009127     4  0.2536      0.904 0.128 0.000 0.004 0.868 0.000
#> GSM1009141     1  0.2329      0.744 0.876 0.124 0.000 0.000 0.000
#> GSM1009155     4  0.4294      0.367 0.468 0.000 0.000 0.532 0.000
#> GSM1009169     3  0.4653      0.408 0.000 0.472 0.516 0.000 0.012
#> GSM1009183     2  0.1197      0.824 0.048 0.952 0.000 0.000 0.000
#> GSM1009197     4  0.2763      0.898 0.148 0.000 0.004 0.848 0.000
#> GSM1009072     3  0.6132     -0.164 0.388 0.000 0.480 0.132 0.000
#> GSM1009086     2  0.0703      0.871 0.000 0.976 0.000 0.000 0.024
#> GSM1009100     4  0.0703      0.879 0.000 0.000 0.024 0.976 0.000
#> GSM1009114     5  0.0162      0.995 0.000 0.004 0.000 0.000 0.996
#> GSM1009128     1  0.0510      0.804 0.984 0.016 0.000 0.000 0.000
#> GSM1009142     1  0.1908      0.765 0.908 0.092 0.000 0.000 0.000
#> GSM1009156     1  0.0162      0.802 0.996 0.000 0.000 0.004 0.000
#> GSM1009170     3  0.4653      0.408 0.000 0.472 0.516 0.000 0.012
#> GSM1009184     2  0.0963      0.837 0.036 0.964 0.000 0.000 0.000
#> GSM1009198     4  0.2629      0.902 0.136 0.000 0.004 0.860 0.000
#> GSM1009073     1  0.4900      0.341 0.512 0.000 0.464 0.024 0.000
#> GSM1009087     4  0.3039      0.873 0.192 0.000 0.000 0.808 0.000
#> GSM1009101     4  0.0703      0.879 0.000 0.000 0.024 0.976 0.000
#> GSM1009115     5  0.0000      0.999 0.000 0.000 0.000 0.000 1.000
#> GSM1009129     2  0.3837      0.616 0.000 0.692 0.000 0.000 0.308
#> GSM1009143     1  0.1282      0.794 0.952 0.000 0.004 0.044 0.000
#> GSM1009157     1  0.0162      0.802 0.996 0.000 0.000 0.004 0.000
#> GSM1009171     3  0.4653      0.408 0.000 0.472 0.516 0.000 0.012
#> GSM1009185     1  0.1205      0.795 0.956 0.000 0.004 0.040 0.000
#> GSM1009199     1  0.4101      0.443 0.628 0.372 0.000 0.000 0.000
#> GSM1009074     3  0.6132     -0.164 0.388 0.000 0.480 0.132 0.000
#> GSM1009088     4  0.3039      0.873 0.192 0.000 0.000 0.808 0.000
#> GSM1009102     4  0.0703      0.879 0.000 0.000 0.024 0.976 0.000
#> GSM1009116     5  0.0000      0.999 0.000 0.000 0.000 0.000 1.000
#> GSM1009130     2  0.3837      0.616 0.000 0.692 0.000 0.000 0.308
#> GSM1009144     1  0.1282      0.794 0.952 0.000 0.004 0.044 0.000
#> GSM1009158     4  0.0703      0.879 0.000 0.000 0.024 0.976 0.000
#> GSM1009172     3  0.4653      0.408 0.000 0.472 0.516 0.000 0.012
#> GSM1009186     2  0.0963      0.837 0.036 0.964 0.000 0.000 0.000
#> GSM1009200     1  0.0963      0.799 0.964 0.036 0.000 0.000 0.000
#> GSM1009075     3  0.6132     -0.164 0.388 0.000 0.480 0.132 0.000
#> GSM1009089     4  0.1211      0.883 0.016 0.000 0.024 0.960 0.000
#> GSM1009103     4  0.0703      0.879 0.000 0.000 0.024 0.976 0.000
#> GSM1009117     5  0.0162      0.995 0.000 0.004 0.000 0.000 0.996
#> GSM1009131     1  0.0510      0.804 0.984 0.016 0.000 0.000 0.000
#> GSM1009145     4  0.0703      0.879 0.000 0.000 0.024 0.976 0.000
#> GSM1009159     4  0.0703      0.879 0.000 0.000 0.024 0.976 0.000
#> GSM1009173     3  0.4653      0.408 0.000 0.472 0.516 0.000 0.012
#> GSM1009187     1  0.1205      0.795 0.956 0.000 0.004 0.040 0.000
#> GSM1009201     1  0.0963      0.799 0.964 0.036 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
#> GSM1009062     6  0.1765      0.912 0.096 0.000 0.000 0.000 0.000 0.904
#> GSM1009076     2  0.0146      0.913 0.000 0.996 0.000 0.000 0.004 0.000
#> GSM1009090     1  0.2118      0.895 0.888 0.000 0.000 0.104 0.000 0.008
#> GSM1009104     5  0.0000      0.999 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM1009118     2  0.3351      0.673 0.000 0.712 0.000 0.000 0.288 0.000
#> GSM1009132     4  0.2250      0.824 0.000 0.092 0.000 0.888 0.000 0.020
#> GSM1009146     1  0.2266      0.892 0.880 0.000 0.000 0.108 0.000 0.012
#> GSM1009160     3  0.0363      1.000 0.000 0.012 0.988 0.000 0.000 0.000
#> GSM1009174     2  0.1333      0.888 0.000 0.944 0.000 0.048 0.000 0.008
#> GSM1009188     1  0.2053      0.895 0.888 0.000 0.000 0.108 0.000 0.004
#> GSM1009063     6  0.1765      0.912 0.096 0.000 0.000 0.000 0.000 0.904
#> GSM1009077     2  0.0146      0.913 0.000 0.996 0.000 0.000 0.004 0.000
#> GSM1009091     1  0.2118      0.895 0.888 0.000 0.000 0.104 0.000 0.008
#> GSM1009105     5  0.0000      0.999 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM1009119     1  0.1958      0.896 0.896 0.000 0.000 0.100 0.000 0.004
#> GSM1009133     4  0.1838      0.862 0.068 0.000 0.000 0.916 0.000 0.016
#> GSM1009147     1  0.2266      0.892 0.880 0.000 0.000 0.108 0.000 0.012
#> GSM1009161     3  0.0363      1.000 0.000 0.012 0.988 0.000 0.000 0.000
#> GSM1009175     2  0.1584      0.877 0.000 0.928 0.000 0.064 0.000 0.008
#> GSM1009189     4  0.0972      0.876 0.028 0.000 0.000 0.964 0.000 0.008
#> GSM1009064     6  0.2007      0.894 0.036 0.000 0.012 0.032 0.000 0.920
#> GSM1009078     1  0.2706      0.865 0.832 0.000 0.000 0.160 0.000 0.008
#> GSM1009092     1  0.1267      0.866 0.940 0.000 0.000 0.000 0.000 0.060
#> GSM1009106     5  0.0000      0.999 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM1009120     1  0.1958      0.896 0.896 0.000 0.000 0.100 0.000 0.004
#> GSM1009134     4  0.1838      0.862 0.068 0.000 0.000 0.916 0.000 0.016
#> GSM1009148     1  0.2266      0.892 0.880 0.000 0.000 0.108 0.000 0.012
#> GSM1009162     3  0.0363      1.000 0.000 0.012 0.988 0.000 0.000 0.000
#> GSM1009176     2  0.0146      0.911 0.000 0.996 0.000 0.000 0.000 0.004
#> GSM1009190     4  0.0972      0.876 0.028 0.000 0.000 0.964 0.000 0.008
#> GSM1009065     6  0.2007      0.894 0.036 0.000 0.012 0.032 0.000 0.920
#> GSM1009079     2  0.0146      0.913 0.000 0.996 0.000 0.000 0.004 0.000
#> GSM1009093     1  0.1267      0.866 0.940 0.000 0.000 0.000 0.000 0.060
#> GSM1009107     5  0.0000      0.999 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM1009121     4  0.2219      0.810 0.000 0.136 0.000 0.864 0.000 0.000
#> GSM1009135     4  0.1838      0.862 0.068 0.000 0.000 0.916 0.000 0.016
#> GSM1009149     1  0.1267      0.866 0.940 0.000 0.000 0.000 0.000 0.060
#> GSM1009163     3  0.0363      1.000 0.000 0.012 0.988 0.000 0.000 0.000
#> GSM1009177     2  0.0146      0.911 0.000 0.996 0.000 0.000 0.000 0.004
#> GSM1009191     4  0.3898      0.581 0.000 0.296 0.000 0.684 0.000 0.020
#> GSM1009066     6  0.2007      0.894 0.036 0.000 0.012 0.032 0.000 0.920
#> GSM1009080     2  0.0146      0.913 0.000 0.996 0.000 0.000 0.004 0.000
#> GSM1009094     1  0.2118      0.895 0.888 0.000 0.000 0.104 0.000 0.008
#> GSM1009108     5  0.0000      0.999 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM1009122     2  0.3351      0.673 0.000 0.712 0.000 0.000 0.288 0.000
#> GSM1009136     1  0.1267      0.866 0.940 0.000 0.000 0.000 0.000 0.060
#> GSM1009150     1  0.1267      0.866 0.940 0.000 0.000 0.000 0.000 0.060
#> GSM1009164     3  0.0363      1.000 0.000 0.012 0.988 0.000 0.000 0.000
#> GSM1009178     4  0.1262      0.871 0.008 0.020 0.000 0.956 0.000 0.016
#> GSM1009192     4  0.0972      0.876 0.028 0.000 0.000 0.964 0.000 0.008
#> GSM1009067     6  0.1765      0.912 0.096 0.000 0.000 0.000 0.000 0.904
#> GSM1009081     2  0.0146      0.913 0.000 0.996 0.000 0.000 0.004 0.000
#> GSM1009095     1  0.2499      0.888 0.880 0.000 0.000 0.072 0.000 0.048
#> GSM1009109     5  0.0000      0.999 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM1009123     1  0.1958      0.896 0.896 0.000 0.000 0.100 0.000 0.004
#> GSM1009137     4  0.1838      0.862 0.068 0.000 0.000 0.916 0.000 0.016
#> GSM1009151     1  0.2266      0.892 0.880 0.000 0.000 0.108 0.000 0.012
#> GSM1009165     3  0.0363      1.000 0.000 0.012 0.988 0.000 0.000 0.000
#> GSM1009179     4  0.3729      0.596 0.000 0.296 0.000 0.692 0.000 0.012
#> GSM1009193     1  0.1958      0.896 0.896 0.000 0.000 0.100 0.000 0.004
#> GSM1009068     6  0.1765      0.912 0.096 0.000 0.000 0.000 0.000 0.904
#> GSM1009082     2  0.0146      0.913 0.000 0.996 0.000 0.000 0.004 0.000
#> GSM1009096     1  0.2118      0.895 0.888 0.000 0.000 0.104 0.000 0.008
#> GSM1009110     5  0.0000      0.999 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM1009124     4  0.0458      0.876 0.016 0.000 0.000 0.984 0.000 0.000
#> GSM1009138     4  0.1838      0.862 0.068 0.000 0.000 0.916 0.000 0.016
#> GSM1009152     1  0.2266      0.892 0.880 0.000 0.000 0.108 0.000 0.012
#> GSM1009166     3  0.0363      1.000 0.000 0.012 0.988 0.000 0.000 0.000
#> GSM1009180     4  0.1262      0.871 0.008 0.020 0.000 0.956 0.000 0.016
#> GSM1009194     4  0.4034      0.524 0.000 0.328 0.000 0.652 0.000 0.020
#> GSM1009069     6  0.2007      0.894 0.036 0.000 0.012 0.032 0.000 0.920
#> GSM1009083     2  0.0146      0.913 0.000 0.996 0.000 0.000 0.004 0.000
#> GSM1009097     1  0.1267      0.866 0.940 0.000 0.000 0.000 0.000 0.060
#> GSM1009111     5  0.0000      0.999 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM1009125     2  0.3351      0.673 0.000 0.712 0.000 0.000 0.288 0.000
#> GSM1009139     4  0.2250      0.824 0.000 0.092 0.000 0.888 0.000 0.020
#> GSM1009153     1  0.2266      0.892 0.880 0.000 0.000 0.108 0.000 0.012
#> GSM1009167     3  0.0363      1.000 0.000 0.012 0.988 0.000 0.000 0.000
#> GSM1009181     2  0.0146      0.911 0.000 0.996 0.000 0.000 0.000 0.004
#> GSM1009195     4  0.4034      0.524 0.000 0.328 0.000 0.652 0.000 0.020
#> GSM1009070     1  0.1267      0.866 0.940 0.000 0.000 0.000 0.000 0.060
#> GSM1009084     2  0.0146      0.913 0.000 0.996 0.000 0.000 0.004 0.000
#> GSM1009098     1  0.1267      0.866 0.940 0.000 0.000 0.000 0.000 0.060
#> GSM1009112     5  0.0000      0.999 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM1009126     4  0.0458      0.876 0.016 0.000 0.000 0.984 0.000 0.000
#> GSM1009140     4  0.1838      0.862 0.068 0.000 0.000 0.916 0.000 0.016
#> GSM1009154     1  0.2266      0.892 0.880 0.000 0.000 0.108 0.000 0.012
#> GSM1009168     3  0.0363      1.000 0.000 0.012 0.988 0.000 0.000 0.000
#> GSM1009182     4  0.3729      0.596 0.000 0.296 0.000 0.692 0.000 0.012
#> GSM1009196     1  0.2450      0.885 0.868 0.000 0.000 0.116 0.000 0.016
#> GSM1009071     6  0.2007      0.894 0.036 0.000 0.012 0.032 0.000 0.920
#> GSM1009085     2  0.0146      0.913 0.000 0.996 0.000 0.000 0.004 0.000
#> GSM1009099     1  0.1267      0.866 0.940 0.000 0.000 0.000 0.000 0.060
#> GSM1009113     5  0.0000      0.999 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM1009127     1  0.1958      0.896 0.896 0.000 0.000 0.100 0.000 0.004
#> GSM1009141     4  0.2250      0.824 0.000 0.092 0.000 0.888 0.000 0.020
#> GSM1009155     1  0.4218      0.385 0.556 0.000 0.000 0.428 0.000 0.016
#> GSM1009169     3  0.0363      1.000 0.000 0.012 0.988 0.000 0.000 0.000
#> GSM1009183     2  0.1584      0.877 0.000 0.928 0.000 0.064 0.000 0.008
#> GSM1009197     1  0.2358      0.890 0.876 0.000 0.000 0.108 0.000 0.016
#> GSM1009072     6  0.1765      0.912 0.096 0.000 0.000 0.000 0.000 0.904
#> GSM1009086     2  0.0146      0.913 0.000 0.996 0.000 0.000 0.004 0.000
#> GSM1009100     1  0.1267      0.866 0.940 0.000 0.000 0.000 0.000 0.060
#> GSM1009114     5  0.0146      0.996 0.000 0.004 0.000 0.000 0.996 0.000
#> GSM1009128     4  0.0458      0.876 0.016 0.000 0.000 0.984 0.000 0.000
#> GSM1009142     4  0.2182      0.843 0.008 0.068 0.000 0.904 0.000 0.020
#> GSM1009156     4  0.1168      0.874 0.028 0.000 0.000 0.956 0.000 0.016
#> GSM1009170     3  0.0363      1.000 0.000 0.012 0.988 0.000 0.000 0.000
#> GSM1009184     2  0.1398      0.885 0.000 0.940 0.000 0.052 0.000 0.008
#> GSM1009198     1  0.2053      0.895 0.888 0.000 0.000 0.108 0.000 0.004
#> GSM1009073     6  0.1777      0.895 0.032 0.000 0.012 0.024 0.000 0.932
#> GSM1009087     1  0.2706      0.865 0.832 0.000 0.000 0.160 0.000 0.008
#> GSM1009101     1  0.1267      0.866 0.940 0.000 0.000 0.000 0.000 0.060
#> GSM1009115     5  0.0000      0.999 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM1009129     2  0.3351      0.673 0.000 0.712 0.000 0.000 0.288 0.000
#> GSM1009143     4  0.1838      0.862 0.068 0.000 0.000 0.916 0.000 0.016
#> GSM1009157     4  0.1168      0.874 0.028 0.000 0.000 0.956 0.000 0.016
#> GSM1009171     3  0.0363      1.000 0.000 0.012 0.988 0.000 0.000 0.000
#> GSM1009185     4  0.1867      0.864 0.064 0.000 0.000 0.916 0.000 0.020
#> GSM1009199     4  0.4034      0.524 0.000 0.328 0.000 0.652 0.000 0.020
#> GSM1009074     6  0.1765      0.912 0.096 0.000 0.000 0.000 0.000 0.904
#> GSM1009088     1  0.2706      0.865 0.832 0.000 0.000 0.160 0.000 0.008
#> GSM1009102     1  0.1267      0.866 0.940 0.000 0.000 0.000 0.000 0.060
#> GSM1009116     5  0.0000      0.999 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM1009130     2  0.3351      0.673 0.000 0.712 0.000 0.000 0.288 0.000
#> GSM1009144     4  0.1838      0.862 0.068 0.000 0.000 0.916 0.000 0.016
#> GSM1009158     1  0.1267      0.866 0.940 0.000 0.000 0.000 0.000 0.060
#> GSM1009172     3  0.0363      1.000 0.000 0.012 0.988 0.000 0.000 0.000
#> GSM1009186     2  0.1398      0.885 0.000 0.940 0.000 0.052 0.000 0.008
#> GSM1009200     4  0.0458      0.872 0.000 0.000 0.000 0.984 0.000 0.016
#> GSM1009075     6  0.1765      0.912 0.096 0.000 0.000 0.000 0.000 0.904
#> GSM1009089     1  0.1657      0.871 0.928 0.000 0.000 0.016 0.000 0.056
#> GSM1009103     1  0.1267      0.866 0.940 0.000 0.000 0.000 0.000 0.060
#> GSM1009117     5  0.0146      0.996 0.000 0.004 0.000 0.000 0.996 0.000
#> GSM1009131     4  0.0458      0.876 0.016 0.000 0.000 0.984 0.000 0.000
#> GSM1009145     1  0.1267      0.866 0.940 0.000 0.000 0.000 0.000 0.060
#> GSM1009159     1  0.1267      0.866 0.940 0.000 0.000 0.000 0.000 0.060
#> GSM1009173     3  0.0363      1.000 0.000 0.012 0.988 0.000 0.000 0.000
#> GSM1009187     4  0.1867      0.864 0.064 0.000 0.000 0.916 0.000 0.020
#> GSM1009201     4  0.0458      0.872 0.000 0.000 0.000 0.984 0.000 0.016

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

consensus_heatmap(res, k = 2)

plot of chunk tab-ATC-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 temperature(p) time(p) specimen(p) k
#> ATC:hclust 137          0.785   0.947    8.61e-17 2
#> ATC:hclust 139          0.923   0.985    8.08e-26 3
#> ATC:hclust 134          0.989   1.000    3.20e-47 4
#> ATC:hclust 109          0.968   0.999    8.76e-31 5
#> ATC:hclust 139          0.999   1.000    9.49e-84 6

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


ATC:kmeans**

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

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

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

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

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

collect_plots(res)

plot of chunk ATC-kmeans-collect-plots

The plots are:

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

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

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

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

select_partition_number(res)

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

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

get_stats(res)
#>   k 1-PAC mean_silhouette concordance area_increased  Rand Jaccard
#> 2 2 1.000           0.974       0.990         0.4831 0.520   0.520
#> 3 3 0.602           0.683       0.833         0.3325 0.751   0.547
#> 4 4 0.592           0.708       0.747         0.1160 0.827   0.547
#> 5 5 0.674           0.756       0.808         0.0754 0.927   0.732
#> 6 6 0.768           0.710       0.792         0.0509 0.981   0.914

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
#> GSM1009062     1   0.000      0.986 1.000 0.000
#> GSM1009076     2   0.000      0.994 0.000 1.000
#> GSM1009090     1   0.000      0.986 1.000 0.000
#> GSM1009104     2   0.000      0.994 0.000 1.000
#> GSM1009118     2   0.000      0.994 0.000 1.000
#> GSM1009132     1   0.969      0.356 0.604 0.396
#> GSM1009146     1   0.000      0.986 1.000 0.000
#> GSM1009160     2   0.000      0.994 0.000 1.000
#> GSM1009174     2   0.000      0.994 0.000 1.000
#> GSM1009188     1   0.000      0.986 1.000 0.000
#> GSM1009063     1   0.000      0.986 1.000 0.000
#> GSM1009077     2   0.000      0.994 0.000 1.000
#> GSM1009091     1   0.000      0.986 1.000 0.000
#> GSM1009105     2   0.000      0.994 0.000 1.000
#> GSM1009119     1   0.000      0.986 1.000 0.000
#> GSM1009133     1   0.000      0.986 1.000 0.000
#> GSM1009147     1   0.000      0.986 1.000 0.000
#> GSM1009161     2   0.000      0.994 0.000 1.000
#> GSM1009175     2   0.000      0.994 0.000 1.000
#> GSM1009189     1   0.000      0.986 1.000 0.000
#> GSM1009064     1   0.000      0.986 1.000 0.000
#> GSM1009078     1   0.000      0.986 1.000 0.000
#> GSM1009092     1   0.000      0.986 1.000 0.000
#> GSM1009106     2   0.000      0.994 0.000 1.000
#> GSM1009120     1   0.000      0.986 1.000 0.000
#> GSM1009134     1   0.000      0.986 1.000 0.000
#> GSM1009148     1   0.000      0.986 1.000 0.000
#> GSM1009162     2   0.000      0.994 0.000 1.000
#> GSM1009176     2   0.000      0.994 0.000 1.000
#> GSM1009190     1   0.000      0.986 1.000 0.000
#> GSM1009065     1   0.000      0.986 1.000 0.000
#> GSM1009079     2   0.000      0.994 0.000 1.000
#> GSM1009093     1   0.000      0.986 1.000 0.000
#> GSM1009107     2   0.000      0.994 0.000 1.000
#> GSM1009121     2   0.000      0.994 0.000 1.000
#> GSM1009135     1   0.000      0.986 1.000 0.000
#> GSM1009149     1   0.000      0.986 1.000 0.000
#> GSM1009163     2   0.000      0.994 0.000 1.000
#> GSM1009177     2   0.000      0.994 0.000 1.000
#> GSM1009191     1   0.653      0.795 0.832 0.168
#> GSM1009066     1   0.000      0.986 1.000 0.000
#> GSM1009080     2   0.000      0.994 0.000 1.000
#> GSM1009094     1   0.000      0.986 1.000 0.000
#> GSM1009108     2   0.000      0.994 0.000 1.000
#> GSM1009122     2   0.000      0.994 0.000 1.000
#> GSM1009136     1   0.000      0.986 1.000 0.000
#> GSM1009150     1   0.000      0.986 1.000 0.000
#> GSM1009164     2   0.000      0.994 0.000 1.000
#> GSM1009178     1   0.000      0.986 1.000 0.000
#> GSM1009192     1   0.000      0.986 1.000 0.000
#> GSM1009067     1   0.000      0.986 1.000 0.000
#> GSM1009081     2   0.000      0.994 0.000 1.000
#> GSM1009095     1   0.000      0.986 1.000 0.000
#> GSM1009109     2   0.000      0.994 0.000 1.000
#> GSM1009123     1   0.000      0.986 1.000 0.000
#> GSM1009137     1   0.000      0.986 1.000 0.000
#> GSM1009151     1   0.000      0.986 1.000 0.000
#> GSM1009165     2   0.000      0.994 0.000 1.000
#> GSM1009179     1   0.000      0.986 1.000 0.000
#> GSM1009193     1   0.000      0.986 1.000 0.000
#> GSM1009068     1   0.000      0.986 1.000 0.000
#> GSM1009082     2   0.000      0.994 0.000 1.000
#> GSM1009096     1   0.000      0.986 1.000 0.000
#> GSM1009110     2   0.000      0.994 0.000 1.000
#> GSM1009124     1   0.000      0.986 1.000 0.000
#> GSM1009138     1   0.000      0.986 1.000 0.000
#> GSM1009152     1   0.000      0.986 1.000 0.000
#> GSM1009166     2   0.000      0.994 0.000 1.000
#> GSM1009180     1   0.000      0.986 1.000 0.000
#> GSM1009194     1   0.653      0.795 0.832 0.168
#> GSM1009069     1   0.000      0.986 1.000 0.000
#> GSM1009083     2   0.000      0.994 0.000 1.000
#> GSM1009097     1   0.000      0.986 1.000 0.000
#> GSM1009111     2   0.000      0.994 0.000 1.000
#> GSM1009125     2   0.000      0.994 0.000 1.000
#> GSM1009139     1   0.969      0.356 0.604 0.396
#> GSM1009153     1   0.000      0.986 1.000 0.000
#> GSM1009167     2   0.000      0.994 0.000 1.000
#> GSM1009181     2   0.000      0.994 0.000 1.000
#> GSM1009195     2   0.000      0.994 0.000 1.000
#> GSM1009070     1   0.000      0.986 1.000 0.000
#> GSM1009084     2   0.000      0.994 0.000 1.000
#> GSM1009098     1   0.000      0.986 1.000 0.000
#> GSM1009112     2   0.000      0.994 0.000 1.000
#> GSM1009126     1   0.000      0.986 1.000 0.000
#> GSM1009140     1   0.000      0.986 1.000 0.000
#> GSM1009154     1   0.000      0.986 1.000 0.000
#> GSM1009168     2   0.000      0.994 0.000 1.000
#> GSM1009182     2   0.921      0.480 0.336 0.664
#> GSM1009196     1   0.000      0.986 1.000 0.000
#> GSM1009071     1   0.000      0.986 1.000 0.000
#> GSM1009085     2   0.000      0.994 0.000 1.000
#> GSM1009099     1   0.000      0.986 1.000 0.000
#> GSM1009113     2   0.000      0.994 0.000 1.000
#> GSM1009127     1   0.000      0.986 1.000 0.000
#> GSM1009141     1   0.000      0.986 1.000 0.000
#> GSM1009155     1   0.000      0.986 1.000 0.000
#> GSM1009169     2   0.000      0.994 0.000 1.000
#> GSM1009183     2   0.000      0.994 0.000 1.000
#> GSM1009197     1   0.000      0.986 1.000 0.000
#> GSM1009072     1   0.000      0.986 1.000 0.000
#> GSM1009086     2   0.000      0.994 0.000 1.000
#> GSM1009100     1   0.000      0.986 1.000 0.000
#> GSM1009114     2   0.000      0.994 0.000 1.000
#> GSM1009128     1   0.000      0.986 1.000 0.000
#> GSM1009142     1   0.000      0.986 1.000 0.000
#> GSM1009156     1   0.000      0.986 1.000 0.000
#> GSM1009170     2   0.000      0.994 0.000 1.000
#> GSM1009184     2   0.000      0.994 0.000 1.000
#> GSM1009198     1   0.000      0.986 1.000 0.000
#> GSM1009073     1   0.000      0.986 1.000 0.000
#> GSM1009087     1   0.000      0.986 1.000 0.000
#> GSM1009101     1   0.000      0.986 1.000 0.000
#> GSM1009115     2   0.000      0.994 0.000 1.000
#> GSM1009129     2   0.000      0.994 0.000 1.000
#> GSM1009143     1   0.000      0.986 1.000 0.000
#> GSM1009157     1   0.000      0.986 1.000 0.000
#> GSM1009171     2   0.000      0.994 0.000 1.000
#> GSM1009185     1   0.000      0.986 1.000 0.000
#> GSM1009199     2   0.000      0.994 0.000 1.000
#> GSM1009074     1   0.000      0.986 1.000 0.000
#> GSM1009088     1   0.000      0.986 1.000 0.000
#> GSM1009102     1   0.000      0.986 1.000 0.000
#> GSM1009116     2   0.000      0.994 0.000 1.000
#> GSM1009130     2   0.000      0.994 0.000 1.000
#> GSM1009144     1   0.000      0.986 1.000 0.000
#> GSM1009158     1   0.000      0.986 1.000 0.000
#> GSM1009172     2   0.000      0.994 0.000 1.000
#> GSM1009186     2   0.000      0.994 0.000 1.000
#> GSM1009200     1   0.000      0.986 1.000 0.000
#> GSM1009075     1   0.000      0.986 1.000 0.000
#> GSM1009089     1   0.000      0.986 1.000 0.000
#> GSM1009103     1   0.000      0.986 1.000 0.000
#> GSM1009117     2   0.000      0.994 0.000 1.000
#> GSM1009131     1   0.000      0.986 1.000 0.000
#> GSM1009145     1   0.000      0.986 1.000 0.000
#> GSM1009159     1   0.000      0.986 1.000 0.000
#> GSM1009173     2   0.000      0.994 0.000 1.000
#> GSM1009187     1   0.000      0.986 1.000 0.000
#> GSM1009201     1   0.000      0.986 1.000 0.000

show/hide code output

cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#>            class entropy silhouette    p1    p2    p3
#> GSM1009062     1  0.1411      0.849 0.964 0.000 0.036
#> GSM1009076     2  0.6126      0.731 0.000 0.600 0.400
#> GSM1009090     3  0.6244      0.423 0.440 0.000 0.560
#> GSM1009104     2  0.3038      0.848 0.000 0.896 0.104
#> GSM1009118     2  0.6126      0.724 0.000 0.600 0.400
#> GSM1009132     3  0.1647      0.675 0.036 0.004 0.960
#> GSM1009146     1  0.0237      0.864 0.996 0.000 0.004
#> GSM1009160     2  0.0424      0.826 0.000 0.992 0.008
#> GSM1009174     3  0.3482      0.488 0.000 0.128 0.872
#> GSM1009188     1  0.6274     -0.138 0.544 0.000 0.456
#> GSM1009063     1  0.1411      0.849 0.964 0.000 0.036
#> GSM1009077     2  0.6140      0.728 0.000 0.596 0.404
#> GSM1009091     1  0.1031      0.867 0.976 0.000 0.024
#> GSM1009105     2  0.3038      0.848 0.000 0.896 0.104
#> GSM1009119     1  0.6309     -0.267 0.504 0.000 0.496
#> GSM1009133     3  0.6235      0.426 0.436 0.000 0.564
#> GSM1009147     1  0.4235      0.685 0.824 0.000 0.176
#> GSM1009161     2  0.0424      0.826 0.000 0.992 0.008
#> GSM1009175     3  0.2066      0.601 0.000 0.060 0.940
#> GSM1009189     3  0.6244      0.423 0.440 0.000 0.560
#> GSM1009064     3  0.3619      0.699 0.136 0.000 0.864
#> GSM1009078     3  0.6305      0.291 0.484 0.000 0.516
#> GSM1009092     1  0.1031      0.867 0.976 0.000 0.024
#> GSM1009106     2  0.3038      0.848 0.000 0.896 0.104
#> GSM1009120     1  0.1031      0.867 0.976 0.000 0.024
#> GSM1009134     3  0.6235      0.426 0.436 0.000 0.564
#> GSM1009148     1  0.0424      0.865 0.992 0.000 0.008
#> GSM1009162     2  0.0424      0.826 0.000 0.992 0.008
#> GSM1009176     2  0.6126      0.731 0.000 0.600 0.400
#> GSM1009190     3  0.6026      0.520 0.376 0.000 0.624
#> GSM1009065     3  0.6225      0.409 0.432 0.000 0.568
#> GSM1009079     2  0.6126      0.731 0.000 0.600 0.400
#> GSM1009093     1  0.1031      0.867 0.976 0.000 0.024
#> GSM1009107     2  0.3038      0.848 0.000 0.896 0.104
#> GSM1009121     3  0.1964      0.617 0.000 0.056 0.944
#> GSM1009135     3  0.6235      0.426 0.436 0.000 0.564
#> GSM1009149     1  0.0000      0.865 1.000 0.000 0.000
#> GSM1009163     2  0.0424      0.826 0.000 0.992 0.008
#> GSM1009177     2  0.6154      0.723 0.000 0.592 0.408
#> GSM1009191     3  0.1765      0.675 0.040 0.004 0.956
#> GSM1009066     3  0.6225      0.409 0.432 0.000 0.568
#> GSM1009080     2  0.5397      0.795 0.000 0.720 0.280
#> GSM1009094     1  0.1031      0.867 0.976 0.000 0.024
#> GSM1009108     2  0.3038      0.848 0.000 0.896 0.104
#> GSM1009122     2  0.6095      0.731 0.000 0.608 0.392
#> GSM1009136     1  0.0892      0.867 0.980 0.000 0.020
#> GSM1009150     1  0.0237      0.864 0.996 0.000 0.004
#> GSM1009164     2  0.0424      0.826 0.000 0.992 0.008
#> GSM1009178     3  0.3686      0.708 0.140 0.000 0.860
#> GSM1009192     1  0.6308     -0.254 0.508 0.000 0.492
#> GSM1009067     1  0.1411      0.849 0.964 0.000 0.036
#> GSM1009081     2  0.6126      0.731 0.000 0.600 0.400
#> GSM1009095     1  0.1031      0.867 0.976 0.000 0.024
#> GSM1009109     2  0.3038      0.848 0.000 0.896 0.104
#> GSM1009123     1  0.1031      0.867 0.976 0.000 0.024
#> GSM1009137     3  0.6235      0.426 0.436 0.000 0.564
#> GSM1009151     1  0.0592      0.863 0.988 0.000 0.012
#> GSM1009165     2  0.0424      0.826 0.000 0.992 0.008
#> GSM1009179     3  0.1529      0.678 0.040 0.000 0.960
#> GSM1009193     1  0.1031      0.867 0.976 0.000 0.024
#> GSM1009068     1  0.1411      0.849 0.964 0.000 0.036
#> GSM1009082     2  0.6126      0.731 0.000 0.600 0.400
#> GSM1009096     1  0.1031      0.867 0.976 0.000 0.024
#> GSM1009110     2  0.3038      0.848 0.000 0.896 0.104
#> GSM1009124     3  0.3752      0.708 0.144 0.000 0.856
#> GSM1009138     3  0.6235      0.426 0.436 0.000 0.564
#> GSM1009152     1  0.0592      0.863 0.988 0.000 0.012
#> GSM1009166     2  0.0424      0.826 0.000 0.992 0.008
#> GSM1009180     3  0.3752      0.708 0.144 0.000 0.856
#> GSM1009194     3  0.1647      0.675 0.036 0.004 0.960
#> GSM1009069     3  0.3619      0.699 0.136 0.000 0.864
#> GSM1009083     2  0.6140      0.728 0.000 0.596 0.404
#> GSM1009097     1  0.1031      0.867 0.976 0.000 0.024
#> GSM1009111     2  0.3038      0.848 0.000 0.896 0.104
#> GSM1009125     2  0.5016      0.809 0.000 0.760 0.240
#> GSM1009139     3  0.1647      0.675 0.036 0.004 0.960
#> GSM1009153     1  0.0592      0.863 0.988 0.000 0.012
#> GSM1009167     2  0.0424      0.826 0.000 0.992 0.008
#> GSM1009181     2  0.6154      0.723 0.000 0.592 0.408
#> GSM1009195     3  0.5291      0.110 0.000 0.268 0.732
#> GSM1009070     1  0.1163      0.850 0.972 0.000 0.028
#> GSM1009084     2  0.6126      0.731 0.000 0.600 0.400
#> GSM1009098     1  0.1031      0.867 0.976 0.000 0.024
#> GSM1009112     2  0.3038      0.848 0.000 0.896 0.104
#> GSM1009126     3  0.3752      0.708 0.144 0.000 0.856
#> GSM1009140     1  0.1163      0.866 0.972 0.000 0.028
#> GSM1009154     1  0.0424      0.865 0.992 0.000 0.008
#> GSM1009168     2  0.0424      0.826 0.000 0.992 0.008
#> GSM1009182     3  0.1585      0.641 0.008 0.028 0.964
#> GSM1009196     1  0.6305     -0.213 0.516 0.000 0.484
#> GSM1009071     1  0.3340      0.782 0.880 0.000 0.120
#> GSM1009085     2  0.6140      0.728 0.000 0.596 0.404
#> GSM1009099     1  0.1031      0.867 0.976 0.000 0.024
#> GSM1009113     2  0.3038      0.848 0.000 0.896 0.104
#> GSM1009127     1  0.1163      0.866 0.972 0.000 0.028
#> GSM1009141     3  0.3686      0.708 0.140 0.000 0.860
#> GSM1009155     1  0.6267     -0.153 0.548 0.000 0.452
#> GSM1009169     2  0.0424      0.826 0.000 0.992 0.008
#> GSM1009183     3  0.2165      0.595 0.000 0.064 0.936
#> GSM1009197     1  0.1031      0.867 0.976 0.000 0.024
#> GSM1009072     1  0.1411      0.849 0.964 0.000 0.036
#> GSM1009086     2  0.6126      0.731 0.000 0.600 0.400
#> GSM1009100     1  0.1031      0.867 0.976 0.000 0.024
#> GSM1009114     2  0.3038      0.848 0.000 0.896 0.104
#> GSM1009128     3  0.5678      0.587 0.316 0.000 0.684
#> GSM1009142     3  0.3686      0.708 0.140 0.000 0.860
#> GSM1009156     1  0.6305     -0.213 0.516 0.000 0.484
#> GSM1009170     2  0.0424      0.826 0.000 0.992 0.008
#> GSM1009184     3  0.2066      0.601 0.000 0.060 0.940
#> GSM1009198     1  0.6274     -0.138 0.544 0.000 0.456
#> GSM1009073     1  0.1411      0.849 0.964 0.000 0.036
#> GSM1009087     3  0.6302      0.304 0.480 0.000 0.520
#> GSM1009101     1  0.1031      0.867 0.976 0.000 0.024
#> GSM1009115     2  0.3038      0.848 0.000 0.896 0.104
#> GSM1009129     2  0.5016      0.809 0.000 0.760 0.240
#> GSM1009143     1  0.1964      0.846 0.944 0.000 0.056
#> GSM1009157     3  0.3619      0.708 0.136 0.000 0.864
#> GSM1009171     2  0.0424      0.826 0.000 0.992 0.008
#> GSM1009185     1  0.6305     -0.226 0.516 0.000 0.484
#> GSM1009199     3  0.5016      0.206 0.000 0.240 0.760
#> GSM1009074     1  0.1411      0.849 0.964 0.000 0.036
#> GSM1009088     3  0.6280      0.363 0.460 0.000 0.540
#> GSM1009102     1  0.0237      0.866 0.996 0.000 0.004
#> GSM1009116     2  0.3038      0.848 0.000 0.896 0.104
#> GSM1009130     2  0.6111      0.728 0.000 0.604 0.396
#> GSM1009144     3  0.6235      0.426 0.436 0.000 0.564
#> GSM1009158     1  0.0237      0.864 0.996 0.000 0.004
#> GSM1009172     2  0.0424      0.826 0.000 0.992 0.008
#> GSM1009186     3  0.2066      0.601 0.000 0.060 0.940
#> GSM1009200     3  0.1643      0.678 0.044 0.000 0.956
#> GSM1009075     1  0.1411      0.849 0.964 0.000 0.036
#> GSM1009089     1  0.0892      0.867 0.980 0.000 0.020
#> GSM1009103     1  0.0237      0.866 0.996 0.000 0.004
#> GSM1009117     2  0.3038      0.848 0.000 0.896 0.104
#> GSM1009131     3  0.4452      0.684 0.192 0.000 0.808
#> GSM1009145     1  0.0892      0.867 0.980 0.000 0.020
#> GSM1009159     1  0.0000      0.865 1.000 0.000 0.000
#> GSM1009173     2  0.0424      0.826 0.000 0.992 0.008
#> GSM1009187     3  0.6235      0.423 0.436 0.000 0.564
#> GSM1009201     3  0.5882      0.554 0.348 0.000 0.652

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>            class entropy silhouette    p1    p2    p3    p4
#> GSM1009062     4  0.6285     0.6755 0.168 0.000 0.168 0.664
#> GSM1009076     2  0.0469     0.7640 0.012 0.988 0.000 0.000
#> GSM1009090     1  0.4134     0.7258 0.740 0.000 0.000 0.260
#> GSM1009104     3  0.6788     0.7851 0.096 0.424 0.480 0.000
#> GSM1009118     2  0.0895     0.7630 0.020 0.976 0.004 0.000
#> GSM1009132     1  0.5141     0.5411 0.700 0.268 0.032 0.000
#> GSM1009146     4  0.0376     0.8628 0.004 0.000 0.004 0.992
#> GSM1009160     3  0.4356     0.8066 0.000 0.292 0.708 0.000
#> GSM1009174     2  0.4838     0.6057 0.252 0.724 0.024 0.000
#> GSM1009188     1  0.4697     0.6399 0.644 0.000 0.000 0.356
#> GSM1009063     4  0.6362     0.6679 0.168 0.000 0.176 0.656
#> GSM1009077     2  0.0469     0.7640 0.012 0.988 0.000 0.000
#> GSM1009091     4  0.0921     0.8660 0.028 0.000 0.000 0.972
#> GSM1009105     3  0.6788     0.7851 0.096 0.424 0.480 0.000
#> GSM1009119     1  0.4477     0.6885 0.688 0.000 0.000 0.312
#> GSM1009133     1  0.5156     0.7296 0.720 0.000 0.044 0.236
#> GSM1009147     1  0.5838     0.4369 0.524 0.000 0.032 0.444
#> GSM1009161     3  0.4356     0.8066 0.000 0.292 0.708 0.000
#> GSM1009175     2  0.5872     0.3185 0.384 0.576 0.040 0.000
#> GSM1009189     1  0.3942     0.7361 0.764 0.000 0.000 0.236
#> GSM1009064     1  0.6779     0.5318 0.652 0.108 0.216 0.024
#> GSM1009078     1  0.5836     0.6863 0.640 0.000 0.056 0.304
#> GSM1009092     4  0.0921     0.8660 0.028 0.000 0.000 0.972
#> GSM1009106     3  0.6788     0.7851 0.096 0.424 0.480 0.000
#> GSM1009120     4  0.0921     0.8660 0.028 0.000 0.000 0.972
#> GSM1009134     1  0.5156     0.7296 0.720 0.000 0.044 0.236
#> GSM1009148     4  0.3697     0.8039 0.048 0.000 0.100 0.852
#> GSM1009162     3  0.4356     0.8066 0.000 0.292 0.708 0.000
#> GSM1009176     2  0.0469     0.7640 0.012 0.988 0.000 0.000
#> GSM1009190     1  0.3837     0.7401 0.776 0.000 0.000 0.224
#> GSM1009065     1  0.6695     0.5353 0.616 0.000 0.220 0.164
#> GSM1009079     2  0.0469     0.7640 0.012 0.988 0.000 0.000
#> GSM1009093     4  0.0921     0.8660 0.028 0.000 0.000 0.972
#> GSM1009107     3  0.6788     0.7851 0.096 0.424 0.480 0.000
#> GSM1009121     2  0.5147     0.1932 0.460 0.536 0.004 0.000
#> GSM1009135     1  0.5156     0.7296 0.720 0.000 0.044 0.236
#> GSM1009149     4  0.0188     0.8635 0.000 0.000 0.004 0.996
#> GSM1009163     3  0.4356     0.8066 0.000 0.292 0.708 0.000
#> GSM1009177     2  0.1211     0.7569 0.040 0.960 0.000 0.000
#> GSM1009191     1  0.4222     0.5403 0.728 0.272 0.000 0.000
#> GSM1009066     1  0.6695     0.5353 0.616 0.000 0.220 0.164
#> GSM1009080     2  0.1004     0.7029 0.004 0.972 0.024 0.000
#> GSM1009094     4  0.0921     0.8660 0.028 0.000 0.000 0.972
#> GSM1009108     3  0.6788     0.7851 0.096 0.424 0.480 0.000
#> GSM1009122     2  0.0804     0.7604 0.012 0.980 0.008 0.000
#> GSM1009136     4  0.0707     0.8665 0.020 0.000 0.000 0.980
#> GSM1009150     4  0.0376     0.8628 0.004 0.000 0.004 0.992
#> GSM1009164     3  0.4356     0.8066 0.000 0.292 0.708 0.000
#> GSM1009178     1  0.5496     0.6112 0.724 0.220 0.040 0.016
#> GSM1009192     1  0.4454     0.6918 0.692 0.000 0.000 0.308
#> GSM1009067     4  0.6285     0.6755 0.168 0.000 0.168 0.664
#> GSM1009081     2  0.0469     0.7640 0.012 0.988 0.000 0.000
#> GSM1009095     4  0.0817     0.8661 0.024 0.000 0.000 0.976
#> GSM1009109     3  0.6788     0.7851 0.096 0.424 0.480 0.000
#> GSM1009123     4  0.0921     0.8660 0.028 0.000 0.000 0.972
#> GSM1009137     1  0.5156     0.7296 0.720 0.000 0.044 0.236
#> GSM1009151     4  0.3697     0.8039 0.048 0.000 0.100 0.852
#> GSM1009165     3  0.4356     0.8066 0.000 0.292 0.708 0.000
#> GSM1009179     1  0.5557     0.4730 0.652 0.308 0.040 0.000
#> GSM1009193     4  0.0921     0.8660 0.028 0.000 0.000 0.972
#> GSM1009068     4  0.6245     0.6777 0.164 0.000 0.168 0.668
#> GSM1009082     2  0.0469     0.7640 0.012 0.988 0.000 0.000
#> GSM1009096     4  0.0921     0.8660 0.028 0.000 0.000 0.972
#> GSM1009110     3  0.6788     0.7851 0.096 0.424 0.480 0.000
#> GSM1009124     1  0.4544     0.6137 0.760 0.220 0.004 0.016
#> GSM1009138     1  0.5156     0.7296 0.720 0.000 0.044 0.236
#> GSM1009152     4  0.3697     0.8039 0.048 0.000 0.100 0.852
#> GSM1009166     3  0.4356     0.8066 0.000 0.292 0.708 0.000
#> GSM1009180     1  0.5496     0.6112 0.724 0.220 0.040 0.016
#> GSM1009194     1  0.4222     0.5403 0.728 0.272 0.000 0.000
#> GSM1009069     1  0.6830     0.5279 0.648 0.112 0.216 0.024
#> GSM1009083     2  0.0469     0.7640 0.012 0.988 0.000 0.000
#> GSM1009097     4  0.0921     0.8660 0.028 0.000 0.000 0.972
#> GSM1009111     3  0.6788     0.7851 0.096 0.424 0.480 0.000
#> GSM1009125     2  0.2483     0.6139 0.052 0.916 0.032 0.000
#> GSM1009139     1  0.5312     0.5406 0.692 0.268 0.040 0.000
#> GSM1009153     4  0.3899     0.7959 0.052 0.000 0.108 0.840
#> GSM1009167     3  0.4356     0.8066 0.000 0.292 0.708 0.000
#> GSM1009181     2  0.1211     0.7569 0.040 0.960 0.000 0.000
#> GSM1009195     2  0.3764     0.6704 0.216 0.784 0.000 0.000
#> GSM1009070     4  0.2048     0.8311 0.064 0.000 0.008 0.928
#> GSM1009084     2  0.0469     0.7640 0.012 0.988 0.000 0.000
#> GSM1009098     4  0.0921     0.8660 0.028 0.000 0.000 0.972
#> GSM1009112     3  0.6788     0.7851 0.096 0.424 0.480 0.000
#> GSM1009126     1  0.4544     0.6137 0.760 0.220 0.004 0.016
#> GSM1009140     4  0.5546     0.4136 0.292 0.000 0.044 0.664
#> GSM1009154     4  0.3697     0.8039 0.048 0.000 0.100 0.852
#> GSM1009168     3  0.4356     0.8066 0.000 0.292 0.708 0.000
#> GSM1009182     1  0.6000     0.0682 0.508 0.452 0.040 0.000
#> GSM1009196     1  0.6033     0.6657 0.620 0.000 0.064 0.316
#> GSM1009071     1  0.7457     0.3077 0.504 0.000 0.220 0.276
#> GSM1009085     2  0.0469     0.7640 0.012 0.988 0.000 0.000
#> GSM1009099     4  0.0921     0.8660 0.028 0.000 0.000 0.972
#> GSM1009113     3  0.6788     0.7851 0.096 0.424 0.480 0.000
#> GSM1009127     4  0.1716     0.8462 0.064 0.000 0.000 0.936
#> GSM1009141     1  0.5245     0.6283 0.748 0.196 0.044 0.012
#> GSM1009155     1  0.6968     0.5849 0.552 0.000 0.140 0.308
#> GSM1009169     3  0.4356     0.8066 0.000 0.292 0.708 0.000
#> GSM1009183     2  0.5496     0.3802 0.372 0.604 0.024 0.000
#> GSM1009197     4  0.0921     0.8660 0.028 0.000 0.000 0.972
#> GSM1009072     4  0.6285     0.6755 0.168 0.000 0.168 0.664
#> GSM1009086     2  0.0469     0.7640 0.012 0.988 0.000 0.000
#> GSM1009100     4  0.0921     0.8660 0.028 0.000 0.000 0.972
#> GSM1009114     3  0.6788     0.7851 0.096 0.424 0.480 0.000
#> GSM1009128     1  0.4798     0.7420 0.760 0.032 0.004 0.204
#> GSM1009142     1  0.5245     0.6283 0.748 0.196 0.044 0.012
#> GSM1009156     1  0.5717     0.6698 0.632 0.000 0.044 0.324
#> GSM1009170     3  0.4356     0.8066 0.000 0.292 0.708 0.000
#> GSM1009184     2  0.5872     0.3185 0.384 0.576 0.040 0.000
#> GSM1009198     1  0.4713     0.6368 0.640 0.000 0.000 0.360
#> GSM1009073     4  0.6908     0.5926 0.188 0.000 0.220 0.592
#> GSM1009087     1  0.5836     0.6863 0.640 0.000 0.056 0.304
#> GSM1009101     4  0.0921     0.8660 0.028 0.000 0.000 0.972
#> GSM1009115     3  0.6788     0.7851 0.096 0.424 0.480 0.000
#> GSM1009129     2  0.2483     0.6139 0.052 0.916 0.032 0.000
#> GSM1009143     4  0.6082    -0.3038 0.476 0.000 0.044 0.480
#> GSM1009157     1  0.5461     0.6133 0.728 0.216 0.040 0.016
#> GSM1009171     3  0.4356     0.8066 0.000 0.292 0.708 0.000
#> GSM1009185     1  0.5677     0.6646 0.628 0.000 0.040 0.332
#> GSM1009199     2  0.3907     0.6608 0.232 0.768 0.000 0.000
#> GSM1009074     4  0.6285     0.6755 0.168 0.000 0.168 0.664
#> GSM1009088     1  0.5792     0.6935 0.648 0.000 0.056 0.296
#> GSM1009102     4  0.0336     0.8658 0.008 0.000 0.000 0.992
#> GSM1009116     3  0.6788     0.7851 0.096 0.424 0.480 0.000
#> GSM1009130     2  0.0804     0.7604 0.012 0.980 0.008 0.000
#> GSM1009144     1  0.5123     0.7312 0.724 0.000 0.044 0.232
#> GSM1009158     4  0.0376     0.8628 0.004 0.000 0.004 0.992
#> GSM1009172     3  0.4356     0.8066 0.000 0.292 0.708 0.000
#> GSM1009186     2  0.5872     0.3185 0.384 0.576 0.040 0.000
#> GSM1009200     1  0.3942     0.5936 0.764 0.236 0.000 0.000
#> GSM1009075     4  0.6285     0.6755 0.168 0.000 0.168 0.664
#> GSM1009089     4  0.1042     0.8654 0.020 0.000 0.008 0.972
#> GSM1009103     4  0.0336     0.8658 0.008 0.000 0.000 0.992
#> GSM1009117     3  0.6788     0.7851 0.096 0.424 0.480 0.000
#> GSM1009131     1  0.5223     0.6901 0.764 0.136 0.004 0.096
#> GSM1009145     4  0.0707     0.8665 0.020 0.000 0.000 0.980
#> GSM1009159     4  0.0188     0.8635 0.000 0.000 0.004 0.996
#> GSM1009173     3  0.4356     0.8066 0.000 0.292 0.708 0.000
#> GSM1009187     1  0.5444     0.7182 0.688 0.000 0.048 0.264
#> GSM1009201     1  0.3870     0.7437 0.788 0.004 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
#> GSM1009062     3  0.4707      0.639 0.020 0.000 0.588 0.392 0.000
#> GSM1009076     2  0.1908      0.857 0.000 0.908 0.000 0.000 0.092
#> GSM1009090     1  0.2733      0.807 0.872 0.004 0.012 0.112 0.000
#> GSM1009104     5  0.6414      0.776 0.040 0.164 0.180 0.000 0.616
#> GSM1009118     2  0.2233      0.855 0.016 0.904 0.000 0.000 0.080
#> GSM1009132     1  0.4676      0.715 0.740 0.140 0.120 0.000 0.000
#> GSM1009146     4  0.1893      0.859 0.012 0.028 0.024 0.936 0.000
#> GSM1009160     5  0.1493      0.790 0.000 0.028 0.024 0.000 0.948
#> GSM1009174     2  0.3647      0.789 0.132 0.816 0.052 0.000 0.000
#> GSM1009188     1  0.3674      0.786 0.816 0.024 0.012 0.148 0.000
#> GSM1009063     3  0.4776      0.651 0.020 0.004 0.612 0.364 0.000
#> GSM1009077     2  0.1908      0.857 0.000 0.908 0.000 0.000 0.092
#> GSM1009091     4  0.1116      0.873 0.028 0.004 0.004 0.964 0.000
#> GSM1009105     5  0.6414      0.776 0.040 0.164 0.180 0.000 0.616
#> GSM1009119     1  0.3639      0.793 0.828 0.028 0.016 0.128 0.000
#> GSM1009133     1  0.4803      0.772 0.772 0.040 0.092 0.096 0.000
#> GSM1009147     1  0.5525      0.672 0.680 0.028 0.076 0.216 0.000
#> GSM1009161     5  0.1493      0.790 0.000 0.028 0.024 0.000 0.948
#> GSM1009175     2  0.4555      0.719 0.200 0.732 0.068 0.000 0.000
#> GSM1009189     1  0.2464      0.807 0.892 0.012 0.004 0.092 0.000
#> GSM1009064     3  0.4494      0.523 0.244 0.012 0.720 0.024 0.000
#> GSM1009078     1  0.5307      0.725 0.716 0.032 0.080 0.172 0.000
#> GSM1009092     4  0.0451      0.887 0.008 0.004 0.000 0.988 0.000
#> GSM1009106     5  0.6414      0.776 0.040 0.164 0.180 0.000 0.616
#> GSM1009120     4  0.1377      0.875 0.020 0.020 0.004 0.956 0.000
#> GSM1009134     1  0.4855      0.770 0.768 0.040 0.096 0.096 0.000
#> GSM1009148     4  0.4848      0.448 0.016 0.028 0.272 0.684 0.000
#> GSM1009162     5  0.0794      0.790 0.000 0.028 0.000 0.000 0.972
#> GSM1009176     2  0.2664      0.854 0.004 0.884 0.020 0.000 0.092
#> GSM1009190     1  0.2189      0.808 0.904 0.012 0.000 0.084 0.000
#> GSM1009065     3  0.4482      0.540 0.252 0.004 0.712 0.032 0.000
#> GSM1009079     2  0.1908      0.857 0.000 0.908 0.000 0.000 0.092
#> GSM1009093     4  0.0451      0.887 0.008 0.004 0.000 0.988 0.000
#> GSM1009107     5  0.6414      0.776 0.040 0.164 0.180 0.000 0.616
#> GSM1009121     2  0.5175      0.172 0.464 0.496 0.040 0.000 0.000
#> GSM1009135     1  0.4803      0.772 0.772 0.040 0.092 0.096 0.000
#> GSM1009149     4  0.0968      0.876 0.012 0.004 0.012 0.972 0.000
#> GSM1009163     5  0.1493      0.790 0.000 0.028 0.024 0.000 0.948
#> GSM1009177     2  0.3423      0.845 0.016 0.852 0.040 0.000 0.092
#> GSM1009191     1  0.3064      0.749 0.856 0.108 0.036 0.000 0.000
#> GSM1009066     3  0.4482      0.540 0.252 0.004 0.712 0.032 0.000
#> GSM1009080     2  0.2352      0.848 0.004 0.896 0.008 0.000 0.092
#> GSM1009094     4  0.1569      0.853 0.044 0.004 0.008 0.944 0.000
#> GSM1009108     5  0.6414      0.776 0.040 0.164 0.180 0.000 0.616
#> GSM1009122     2  0.1908      0.855 0.000 0.908 0.000 0.000 0.092
#> GSM1009136     4  0.0290      0.887 0.008 0.000 0.000 0.992 0.000
#> GSM1009150     4  0.0968      0.876 0.012 0.004 0.012 0.972 0.000
#> GSM1009164     5  0.1493      0.790 0.000 0.028 0.024 0.000 0.948
#> GSM1009178     1  0.4028      0.754 0.816 0.084 0.084 0.016 0.000
#> GSM1009192     1  0.3491      0.794 0.836 0.028 0.012 0.124 0.000
#> GSM1009067     3  0.4707      0.639 0.020 0.000 0.588 0.392 0.000
#> GSM1009081     2  0.1908      0.857 0.000 0.908 0.000 0.000 0.092
#> GSM1009095     4  0.0613      0.887 0.008 0.004 0.004 0.984 0.000
#> GSM1009109     5  0.6414      0.776 0.040 0.164 0.180 0.000 0.616
#> GSM1009123     4  0.1442      0.870 0.032 0.012 0.004 0.952 0.000
#> GSM1009137     1  0.4803      0.772 0.772 0.040 0.092 0.096 0.000
#> GSM1009151     4  0.4824      0.456 0.016 0.028 0.268 0.688 0.000
#> GSM1009165     5  0.0794      0.790 0.000 0.028 0.000 0.000 0.972
#> GSM1009179     1  0.4930      0.606 0.696 0.220 0.084 0.000 0.000
#> GSM1009193     4  0.1173      0.880 0.020 0.012 0.004 0.964 0.000
#> GSM1009068     3  0.4707      0.639 0.020 0.000 0.588 0.392 0.000
#> GSM1009082     2  0.1908      0.857 0.000 0.908 0.000 0.000 0.092
#> GSM1009096     4  0.0727      0.885 0.012 0.004 0.004 0.980 0.000
#> GSM1009110     5  0.6483      0.775 0.048 0.164 0.172 0.000 0.616
#> GSM1009124     1  0.2590      0.794 0.900 0.060 0.012 0.028 0.000
#> GSM1009138     1  0.4855      0.770 0.768 0.040 0.096 0.096 0.000
#> GSM1009152     4  0.4824      0.456 0.016 0.028 0.268 0.688 0.000
#> GSM1009166     5  0.0794      0.790 0.000 0.028 0.000 0.000 0.972
#> GSM1009180     1  0.3790      0.766 0.832 0.068 0.084 0.016 0.000
#> GSM1009194     1  0.3289      0.744 0.844 0.108 0.048 0.000 0.000
#> GSM1009069     3  0.4505      0.513 0.244 0.020 0.720 0.016 0.000
#> GSM1009083     2  0.1908      0.857 0.000 0.908 0.000 0.000 0.092
#> GSM1009097     4  0.0451      0.887 0.008 0.004 0.000 0.988 0.000
#> GSM1009111     5  0.6414      0.776 0.040 0.164 0.180 0.000 0.616
#> GSM1009125     2  0.3003      0.820 0.020 0.872 0.016 0.000 0.092
#> GSM1009139     1  0.4720      0.713 0.736 0.140 0.124 0.000 0.000
#> GSM1009153     4  0.5025      0.399 0.020 0.028 0.288 0.664 0.000
#> GSM1009167     5  0.1300      0.789 0.000 0.028 0.016 0.000 0.956
#> GSM1009181     2  0.3423      0.845 0.016 0.852 0.040 0.000 0.092
#> GSM1009195     2  0.3573      0.803 0.124 0.832 0.032 0.000 0.012
#> GSM1009070     4  0.1518      0.840 0.004 0.004 0.048 0.944 0.000
#> GSM1009084     2  0.1908      0.857 0.000 0.908 0.000 0.000 0.092
#> GSM1009098     4  0.0451      0.887 0.008 0.004 0.000 0.988 0.000
#> GSM1009112     5  0.6414      0.776 0.040 0.164 0.180 0.000 0.616
#> GSM1009126     1  0.2590      0.794 0.900 0.060 0.012 0.028 0.000
#> GSM1009140     1  0.6715      0.417 0.516 0.044 0.104 0.336 0.000
#> GSM1009154     4  0.4824      0.456 0.016 0.028 0.268 0.688 0.000
#> GSM1009168     5  0.1082      0.790 0.000 0.028 0.008 0.000 0.964
#> GSM1009182     2  0.5558      0.411 0.360 0.560 0.080 0.000 0.000
#> GSM1009196     1  0.5235      0.723 0.716 0.024 0.084 0.176 0.000
#> GSM1009071     3  0.5004      0.589 0.224 0.004 0.696 0.076 0.000
#> GSM1009085     2  0.1908      0.857 0.000 0.908 0.000 0.000 0.092
#> GSM1009099     4  0.0451      0.887 0.008 0.004 0.000 0.988 0.000
#> GSM1009113     5  0.6414      0.776 0.040 0.164 0.180 0.000 0.616
#> GSM1009127     4  0.4877      0.372 0.312 0.024 0.012 0.652 0.000
#> GSM1009141     1  0.4696      0.744 0.768 0.096 0.116 0.020 0.000
#> GSM1009155     1  0.6814      0.268 0.508 0.028 0.308 0.156 0.000
#> GSM1009169     5  0.1806      0.788 0.016 0.028 0.016 0.000 0.940
#> GSM1009183     2  0.4495      0.721 0.200 0.736 0.064 0.000 0.000
#> GSM1009197     4  0.1179      0.880 0.016 0.016 0.004 0.964 0.000
#> GSM1009072     3  0.4707      0.639 0.020 0.000 0.588 0.392 0.000
#> GSM1009086     2  0.1908      0.857 0.000 0.908 0.000 0.000 0.092
#> GSM1009100     4  0.0451      0.887 0.008 0.004 0.000 0.988 0.000
#> GSM1009114     5  0.6481      0.773 0.044 0.164 0.180 0.000 0.612
#> GSM1009128     1  0.2727      0.808 0.888 0.020 0.012 0.080 0.000
#> GSM1009142     1  0.4763      0.746 0.768 0.088 0.116 0.028 0.000
#> GSM1009156     1  0.5195      0.726 0.724 0.032 0.072 0.172 0.000
#> GSM1009170     5  0.1493      0.790 0.000 0.028 0.024 0.000 0.948
#> GSM1009184     2  0.4555      0.719 0.200 0.732 0.068 0.000 0.000
#> GSM1009198     1  0.3674      0.786 0.816 0.024 0.012 0.148 0.000
#> GSM1009073     3  0.4915      0.674 0.064 0.004 0.696 0.236 0.000
#> GSM1009087     1  0.5307      0.725 0.716 0.032 0.080 0.172 0.000
#> GSM1009101     4  0.0451      0.887 0.008 0.004 0.000 0.988 0.000
#> GSM1009115     5  0.6414      0.776 0.040 0.164 0.180 0.000 0.616
#> GSM1009129     2  0.3003      0.820 0.020 0.872 0.016 0.000 0.092
#> GSM1009143     1  0.6115      0.696 0.660 0.060 0.104 0.176 0.000
#> GSM1009157     1  0.4191      0.753 0.804 0.084 0.096 0.016 0.000
#> GSM1009171     5  0.0794      0.790 0.000 0.028 0.000 0.000 0.972
#> GSM1009185     1  0.4767      0.733 0.736 0.028 0.036 0.200 0.000
#> GSM1009199     2  0.3433      0.798 0.132 0.832 0.032 0.000 0.004
#> GSM1009074     3  0.4707      0.639 0.020 0.000 0.588 0.392 0.000
#> GSM1009088     1  0.5307      0.725 0.716 0.032 0.080 0.172 0.000
#> GSM1009102     4  0.0613      0.883 0.004 0.004 0.008 0.984 0.000
#> GSM1009116     5  0.6414      0.776 0.040 0.164 0.180 0.000 0.616
#> GSM1009130     2  0.1908      0.855 0.000 0.908 0.000 0.000 0.092
#> GSM1009144     1  0.4751      0.773 0.776 0.040 0.092 0.092 0.000
#> GSM1009158     4  0.0968      0.876 0.012 0.004 0.012 0.972 0.000
#> GSM1009172     5  0.1082      0.790 0.000 0.028 0.008 0.000 0.964
#> GSM1009186     2  0.4555      0.719 0.200 0.732 0.068 0.000 0.000
#> GSM1009200     1  0.2879      0.756 0.868 0.100 0.032 0.000 0.000
#> GSM1009075     3  0.4707      0.639 0.020 0.000 0.588 0.392 0.000
#> GSM1009089     4  0.1299      0.881 0.020 0.012 0.008 0.960 0.000
#> GSM1009103     4  0.0613      0.883 0.004 0.004 0.008 0.984 0.000
#> GSM1009117     5  0.6450      0.775 0.044 0.164 0.176 0.000 0.616
#> GSM1009131     1  0.2701      0.802 0.896 0.044 0.012 0.048 0.000
#> GSM1009145     4  0.0290      0.887 0.008 0.000 0.000 0.992 0.000
#> GSM1009159     4  0.0613      0.878 0.004 0.004 0.008 0.984 0.000
#> GSM1009173     5  0.1806      0.788 0.016 0.028 0.016 0.000 0.940
#> GSM1009187     1  0.4806      0.753 0.760 0.024 0.084 0.132 0.000
#> GSM1009201     1  0.1830      0.808 0.924 0.008 0.000 0.068 0.000

show/hide code output

cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#>            class entropy silhouette    p1    p2 p3    p4    p5    p6
#> GSM1009062     6  0.3126    0.74343 0.000 0.000 NA 0.248 0.000 0.752
#> GSM1009076     2  0.0713    0.87211 0.000 0.972 NA 0.000 0.028 0.000
#> GSM1009090     1  0.3001    0.72695 0.868 0.004 NA 0.060 0.000 0.020
#> GSM1009104     5  0.5756    0.73328 0.000 0.160 NA 0.000 0.492 0.004
#> GSM1009118     2  0.1198    0.86451 0.004 0.960 NA 0.000 0.020 0.012
#> GSM1009132     1  0.5712    0.58428 0.552 0.020 NA 0.000 0.000 0.120
#> GSM1009146     4  0.3485    0.75015 0.028 0.000 NA 0.824 0.000 0.036
#> GSM1009160     5  0.0436    0.73701 0.004 0.004 NA 0.000 0.988 0.000
#> GSM1009174     2  0.4772    0.76687 0.044 0.708 NA 0.000 0.000 0.052
#> GSM1009188     1  0.2058    0.72430 0.916 0.004 NA 0.056 0.000 0.008
#> GSM1009063     6  0.3314    0.75247 0.000 0.000 NA 0.224 0.000 0.764
#> GSM1009077     2  0.0713    0.87211 0.000 0.972 NA 0.000 0.028 0.000
#> GSM1009091     4  0.1138    0.85063 0.024 0.004 NA 0.960 0.000 0.000
#> GSM1009105     5  0.5609    0.73599 0.000 0.156 NA 0.000 0.496 0.000
#> GSM1009119     1  0.2022    0.72440 0.916 0.000 NA 0.052 0.000 0.008
#> GSM1009133     1  0.5480    0.63455 0.636 0.000 NA 0.040 0.000 0.100
#> GSM1009147     1  0.5886    0.56308 0.632 0.000 NA 0.124 0.000 0.092
#> GSM1009161     5  0.0436    0.73701 0.004 0.004 NA 0.000 0.988 0.000
#> GSM1009175     2  0.5428    0.72674 0.076 0.656 NA 0.000 0.000 0.064
#> GSM1009189     1  0.1036    0.73064 0.964 0.004 NA 0.024 0.000 0.008
#> GSM1009064     6  0.2867    0.70615 0.076 0.016 NA 0.000 0.000 0.868
#> GSM1009078     1  0.5750    0.60453 0.656 0.008 NA 0.076 0.000 0.092
#> GSM1009092     4  0.0405    0.86275 0.000 0.004 NA 0.988 0.000 0.000
#> GSM1009106     5  0.5609    0.73599 0.000 0.156 NA 0.000 0.496 0.000
#> GSM1009120     4  0.1167    0.85869 0.012 0.000 NA 0.960 0.000 0.008
#> GSM1009134     1  0.5561    0.63154 0.628 0.000 NA 0.040 0.000 0.108
#> GSM1009148     4  0.5963    0.05630 0.032 0.000 NA 0.488 0.000 0.372
#> GSM1009162     5  0.1036    0.73695 0.000 0.004 NA 0.000 0.964 0.024
#> GSM1009176     2  0.3184    0.84459 0.000 0.836 NA 0.000 0.028 0.016
#> GSM1009190     1  0.1036    0.73116 0.964 0.004 NA 0.024 0.000 0.000
#> GSM1009065     6  0.3097    0.72290 0.088 0.004 NA 0.016 0.000 0.856
#> GSM1009079     2  0.0713    0.87211 0.000 0.972 NA 0.000 0.028 0.000
#> GSM1009093     4  0.0405    0.86275 0.000 0.004 NA 0.988 0.000 0.000
#> GSM1009107     5  0.5609    0.73599 0.000 0.156 NA 0.000 0.496 0.000
#> GSM1009121     1  0.5939    0.01955 0.484 0.388 NA 0.000 0.000 0.044
#> GSM1009135     1  0.5561    0.63154 0.628 0.000 NA 0.040 0.000 0.108
#> GSM1009149     4  0.1572    0.84830 0.000 0.000 NA 0.936 0.000 0.028
#> GSM1009163     5  0.0436    0.73701 0.004 0.004 NA 0.000 0.988 0.000
#> GSM1009177     2  0.3912    0.82753 0.008 0.784 NA 0.000 0.028 0.020
#> GSM1009191     1  0.3089    0.69322 0.856 0.024 NA 0.000 0.000 0.040
#> GSM1009066     6  0.3097    0.72290 0.088 0.004 NA 0.016 0.000 0.856
#> GSM1009080     2  0.0713    0.87211 0.000 0.972 NA 0.000 0.028 0.000
#> GSM1009094     4  0.2058    0.80908 0.056 0.004 NA 0.916 0.000 0.008
#> GSM1009108     5  0.5609    0.73599 0.000 0.156 NA 0.000 0.496 0.000
#> GSM1009122     2  0.1198    0.86451 0.004 0.960 NA 0.000 0.020 0.012
#> GSM1009136     4  0.0725    0.86155 0.000 0.000 NA 0.976 0.000 0.012
#> GSM1009150     4  0.1649    0.84621 0.000 0.000 NA 0.932 0.000 0.032
#> GSM1009164     5  0.0436    0.73701 0.004 0.004 NA 0.000 0.988 0.000
#> GSM1009178     1  0.5361    0.58219 0.608 0.032 NA 0.000 0.000 0.072
#> GSM1009192     1  0.1994    0.72477 0.920 0.004 NA 0.052 0.000 0.008
#> GSM1009067     6  0.3126    0.74343 0.000 0.000 NA 0.248 0.000 0.752
#> GSM1009081     2  0.0713    0.87211 0.000 0.972 NA 0.000 0.028 0.000
#> GSM1009095     4  0.0508    0.86260 0.000 0.004 NA 0.984 0.000 0.000
#> GSM1009109     5  0.5634    0.73333 0.000 0.160 NA 0.000 0.492 0.000
#> GSM1009123     4  0.1346    0.85282 0.024 0.000 NA 0.952 0.000 0.008
#> GSM1009137     1  0.5480    0.63455 0.636 0.000 NA 0.040 0.000 0.100
#> GSM1009151     4  0.5957    0.06776 0.032 0.000 NA 0.492 0.000 0.368
#> GSM1009165     5  0.1036    0.73695 0.000 0.004 NA 0.000 0.964 0.024
#> GSM1009179     1  0.6362    0.48934 0.524 0.120 NA 0.000 0.000 0.072
#> GSM1009193     4  0.1078    0.85965 0.012 0.000 NA 0.964 0.000 0.008
#> GSM1009068     6  0.3126    0.74343 0.000 0.000 NA 0.248 0.000 0.752
#> GSM1009082     2  0.0713    0.87211 0.000 0.972 NA 0.000 0.028 0.000
#> GSM1009096     4  0.1053    0.85355 0.020 0.004 NA 0.964 0.000 0.000
#> GSM1009110     5  0.6189    0.73375 0.012 0.156 NA 0.000 0.496 0.012
#> GSM1009124     1  0.1785    0.72706 0.936 0.012 NA 0.008 0.000 0.016
#> GSM1009138     1  0.5561    0.63154 0.628 0.000 NA 0.040 0.000 0.108
#> GSM1009152     4  0.5957    0.06776 0.032 0.000 NA 0.492 0.000 0.368
#> GSM1009166     5  0.1036    0.73695 0.000 0.004 NA 0.000 0.964 0.024
#> GSM1009180     1  0.5361    0.58219 0.608 0.032 NA 0.000 0.000 0.072
#> GSM1009194     1  0.3208    0.69057 0.848 0.024 NA 0.000 0.000 0.044
#> GSM1009069     6  0.3031    0.69476 0.072 0.020 NA 0.000 0.000 0.860
#> GSM1009083     2  0.0713    0.87211 0.000 0.972 NA 0.000 0.028 0.000
#> GSM1009097     4  0.0405    0.86275 0.000 0.004 NA 0.988 0.000 0.000
#> GSM1009111     5  0.5609    0.73599 0.000 0.156 NA 0.000 0.496 0.000
#> GSM1009125     2  0.1198    0.86451 0.004 0.960 NA 0.000 0.020 0.012
#> GSM1009139     1  0.5712    0.58428 0.552 0.020 NA 0.000 0.000 0.120
#> GSM1009153     4  0.5984    0.00780 0.032 0.000 NA 0.472 0.000 0.388
#> GSM1009167     5  0.1194    0.73653 0.000 0.004 NA 0.000 0.956 0.032
#> GSM1009181     2  0.3912    0.82753 0.008 0.784 NA 0.000 0.028 0.020
#> GSM1009195     2  0.3654    0.82720 0.056 0.820 NA 0.000 0.004 0.020
#> GSM1009070     4  0.1908    0.83570 0.000 0.000 NA 0.916 0.000 0.056
#> GSM1009084     2  0.0713    0.87211 0.000 0.972 NA 0.000 0.028 0.000
#> GSM1009098     4  0.0405    0.86275 0.000 0.004 NA 0.988 0.000 0.000
#> GSM1009112     5  0.5756    0.73328 0.000 0.160 NA 0.000 0.492 0.004
#> GSM1009126     1  0.1785    0.72706 0.936 0.012 NA 0.008 0.000 0.016
#> GSM1009140     1  0.6437    0.56676 0.552 0.000 NA 0.116 0.000 0.108
#> GSM1009154     4  0.5957    0.06776 0.032 0.000 NA 0.492 0.000 0.368
#> GSM1009168     5  0.0146    0.73715 0.000 0.004 NA 0.000 0.996 0.000
#> GSM1009182     2  0.6758    0.41414 0.240 0.468 NA 0.000 0.000 0.064
#> GSM1009196     1  0.5442    0.61622 0.680 0.000 NA 0.092 0.000 0.100
#> GSM1009071     6  0.3538    0.73268 0.092 0.004 NA 0.036 0.000 0.832
#> GSM1009085     2  0.0858    0.87203 0.000 0.968 NA 0.000 0.028 0.000
#> GSM1009099     4  0.0405    0.86275 0.000 0.004 NA 0.988 0.000 0.000
#> GSM1009113     5  0.5609    0.73599 0.000 0.156 NA 0.000 0.496 0.000
#> GSM1009127     1  0.5603    0.25927 0.504 0.000 NA 0.384 0.000 0.016
#> GSM1009141     1  0.5573    0.61182 0.596 0.020 NA 0.000 0.000 0.128
#> GSM1009155     6  0.6797    0.00787 0.380 0.000 NA 0.084 0.000 0.396
#> GSM1009169     5  0.1340    0.73647 0.000 0.004 NA 0.000 0.948 0.040
#> GSM1009183     2  0.5428    0.72674 0.076 0.656 NA 0.000 0.000 0.064
#> GSM1009197     4  0.0951    0.86058 0.004 0.000 NA 0.968 0.000 0.008
#> GSM1009072     6  0.3126    0.74343 0.000 0.000 NA 0.248 0.000 0.752
#> GSM1009086     2  0.0713    0.87211 0.000 0.972 NA 0.000 0.028 0.000
#> GSM1009100     4  0.0405    0.86275 0.000 0.004 NA 0.988 0.000 0.000
#> GSM1009114     5  0.6224    0.72884 0.012 0.160 NA 0.000 0.488 0.012
#> GSM1009128     1  0.1536    0.73109 0.944 0.000 NA 0.024 0.000 0.012
#> GSM1009142     1  0.5540    0.61747 0.608 0.016 NA 0.004 0.000 0.120
#> GSM1009156     1  0.5750    0.59948 0.660 0.008 NA 0.084 0.000 0.092
#> GSM1009170     5  0.0436    0.73701 0.004 0.004 NA 0.000 0.988 0.000
#> GSM1009184     2  0.5428    0.72674 0.076 0.656 NA 0.000 0.000 0.064
#> GSM1009198     1  0.2058    0.72430 0.916 0.004 NA 0.056 0.000 0.008
#> GSM1009073     6  0.3278    0.76668 0.020 0.004 NA 0.108 0.000 0.840
#> GSM1009087     1  0.5750    0.60453 0.656 0.008 NA 0.076 0.000 0.092
#> GSM1009101     4  0.0405    0.86275 0.000 0.004 NA 0.988 0.000 0.000
#> GSM1009115     5  0.5731    0.73581 0.000 0.156 NA 0.000 0.496 0.004
#> GSM1009129     2  0.1198    0.86451 0.004 0.960 NA 0.000 0.020 0.012
#> GSM1009143     1  0.5780    0.62540 0.608 0.000 NA 0.052 0.000 0.108
#> GSM1009157     1  0.5463    0.61351 0.640 0.032 NA 0.000 0.000 0.124
#> GSM1009171     5  0.1036    0.73695 0.000 0.004 NA 0.000 0.964 0.024
#> GSM1009185     1  0.5140    0.64103 0.704 0.008 NA 0.116 0.000 0.032
#> GSM1009199     2  0.3654    0.82720 0.056 0.820 NA 0.000 0.004 0.020
#> GSM1009074     6  0.3126    0.74343 0.000 0.000 NA 0.248 0.000 0.752
#> GSM1009088     1  0.5750    0.60453 0.656 0.008 NA 0.076 0.000 0.092
#> GSM1009102     4  0.0665    0.86181 0.000 0.004 NA 0.980 0.000 0.008
#> GSM1009116     5  0.5609    0.73599 0.000 0.156 NA 0.000 0.496 0.000
#> GSM1009130     2  0.1198    0.86451 0.004 0.960 NA 0.000 0.020 0.012
#> GSM1009144     1  0.5325    0.63563 0.644 0.000 NA 0.028 0.000 0.104
#> GSM1009158     4  0.1649    0.84621 0.000 0.000 NA 0.932 0.000 0.032
#> GSM1009172     5  0.0146    0.73715 0.000 0.004 NA 0.000 0.996 0.000
#> GSM1009186     2  0.5428    0.72674 0.076 0.656 NA 0.000 0.000 0.064
#> GSM1009200     1  0.2335    0.71406 0.904 0.024 NA 0.000 0.000 0.028
#> GSM1009075     6  0.3126    0.74343 0.000 0.000 NA 0.248 0.000 0.752
#> GSM1009089     4  0.1333    0.85161 0.000 0.000 NA 0.944 0.000 0.008
#> GSM1009103     4  0.0767    0.86168 0.000 0.004 NA 0.976 0.000 0.008
#> GSM1009117     5  0.6214    0.73135 0.012 0.160 NA 0.000 0.492 0.012
#> GSM1009131     1  0.1611    0.72934 0.944 0.008 NA 0.012 0.000 0.012
#> GSM1009145     4  0.0725    0.86155 0.000 0.000 NA 0.976 0.000 0.012
#> GSM1009159     4  0.1176    0.85540 0.000 0.000 NA 0.956 0.000 0.020
#> GSM1009173     5  0.1340    0.73647 0.000 0.004 NA 0.000 0.948 0.040
#> GSM1009187     1  0.5513    0.62501 0.680 0.008 NA 0.060 0.000 0.104
#> GSM1009201     1  0.1053    0.73119 0.964 0.004 NA 0.020 0.000 0.000

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

consensus_heatmap(res, k = 2)

plot of chunk tab-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 temperature(p) time(p) specimen(p) k
#> ATC:kmeans 137          0.690   0.804    1.23e-15 2
#> ATC:kmeans 115          0.922   0.944    1.18e-20 3
#> ATC:kmeans 129          0.968   0.882    6.42e-34 4
#> ATC:kmeans 130          0.993   0.975    9.10e-54 5
#> ATC:kmeans 130          0.994   0.958    2.00e-54 6

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


ATC:skmeans**

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

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

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

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

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

collect_plots(res)

plot of chunk ATC-skmeans-collect-plots

The plots are:

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

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

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

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

select_partition_number(res)

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

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

get_stats(res)
#>   k 1-PAC mean_silhouette concordance area_increased  Rand Jaccard
#> 2 2 1.000           0.979       0.993         0.4974 0.503   0.503
#> 3 3 0.725           0.813       0.864         0.2656 0.861   0.726
#> 4 4 0.651           0.702       0.814         0.1129 0.923   0.794
#> 5 5 0.786           0.750       0.847         0.0700 0.943   0.818
#> 6 6 0.775           0.815       0.864         0.0506 0.938   0.775

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
#> GSM1009062     1   0.000     0.9935 1.000 0.000
#> GSM1009076     2   0.000     0.9919 0.000 1.000
#> GSM1009090     1   0.000     0.9935 1.000 0.000
#> GSM1009104     2   0.000     0.9919 0.000 1.000
#> GSM1009118     2   0.000     0.9919 0.000 1.000
#> GSM1009132     2   0.000     0.9919 0.000 1.000
#> GSM1009146     1   0.000     0.9935 1.000 0.000
#> GSM1009160     2   0.000     0.9919 0.000 1.000
#> GSM1009174     2   0.000     0.9919 0.000 1.000
#> GSM1009188     1   0.000     0.9935 1.000 0.000
#> GSM1009063     1   0.000     0.9935 1.000 0.000
#> GSM1009077     2   0.000     0.9919 0.000 1.000
#> GSM1009091     1   0.000     0.9935 1.000 0.000
#> GSM1009105     2   0.000     0.9919 0.000 1.000
#> GSM1009119     1   0.000     0.9935 1.000 0.000
#> GSM1009133     1   0.000     0.9935 1.000 0.000
#> GSM1009147     1   0.000     0.9935 1.000 0.000
#> GSM1009161     2   0.000     0.9919 0.000 1.000
#> GSM1009175     2   0.000     0.9919 0.000 1.000
#> GSM1009189     1   0.000     0.9935 1.000 0.000
#> GSM1009064     1   0.000     0.9935 1.000 0.000
#> GSM1009078     1   0.000     0.9935 1.000 0.000
#> GSM1009092     1   0.000     0.9935 1.000 0.000
#> GSM1009106     2   0.000     0.9919 0.000 1.000
#> GSM1009120     1   0.000     0.9935 1.000 0.000
#> GSM1009134     1   0.000     0.9935 1.000 0.000
#> GSM1009148     1   0.000     0.9935 1.000 0.000
#> GSM1009162     2   0.000     0.9919 0.000 1.000
#> GSM1009176     2   0.000     0.9919 0.000 1.000
#> GSM1009190     1   0.000     0.9935 1.000 0.000
#> GSM1009065     1   0.000     0.9935 1.000 0.000
#> GSM1009079     2   0.000     0.9919 0.000 1.000
#> GSM1009093     1   0.000     0.9935 1.000 0.000
#> GSM1009107     2   0.000     0.9919 0.000 1.000
#> GSM1009121     2   0.000     0.9919 0.000 1.000
#> GSM1009135     1   0.000     0.9935 1.000 0.000
#> GSM1009149     1   0.000     0.9935 1.000 0.000
#> GSM1009163     2   0.000     0.9919 0.000 1.000
#> GSM1009177     2   0.000     0.9919 0.000 1.000
#> GSM1009191     2   0.000     0.9919 0.000 1.000
#> GSM1009066     1   0.000     0.9935 1.000 0.000
#> GSM1009080     2   0.000     0.9919 0.000 1.000
#> GSM1009094     1   0.000     0.9935 1.000 0.000
#> GSM1009108     2   0.000     0.9919 0.000 1.000
#> GSM1009122     2   0.000     0.9919 0.000 1.000
#> GSM1009136     1   0.000     0.9935 1.000 0.000
#> GSM1009150     1   0.000     0.9935 1.000 0.000
#> GSM1009164     2   0.000     0.9919 0.000 1.000
#> GSM1009178     1   0.000     0.9935 1.000 0.000
#> GSM1009192     1   0.000     0.9935 1.000 0.000
#> GSM1009067     1   0.000     0.9935 1.000 0.000
#> GSM1009081     2   0.000     0.9919 0.000 1.000
#> GSM1009095     1   0.000     0.9935 1.000 0.000
#> GSM1009109     2   0.000     0.9919 0.000 1.000
#> GSM1009123     1   0.000     0.9935 1.000 0.000
#> GSM1009137     1   0.000     0.9935 1.000 0.000
#> GSM1009151     1   0.000     0.9935 1.000 0.000
#> GSM1009165     2   0.000     0.9919 0.000 1.000
#> GSM1009179     2   0.000     0.9919 0.000 1.000
#> GSM1009193     1   0.000     0.9935 1.000 0.000
#> GSM1009068     1   0.000     0.9935 1.000 0.000
#> GSM1009082     2   0.000     0.9919 0.000 1.000
#> GSM1009096     1   0.000     0.9935 1.000 0.000
#> GSM1009110     2   0.000     0.9919 0.000 1.000
#> GSM1009124     1   0.118     0.9775 0.984 0.016
#> GSM1009138     1   0.000     0.9935 1.000 0.000
#> GSM1009152     1   0.000     0.9935 1.000 0.000
#> GSM1009166     2   0.000     0.9919 0.000 1.000
#> GSM1009180     1   0.000     0.9935 1.000 0.000
#> GSM1009194     2   0.000     0.9919 0.000 1.000
#> GSM1009069     2   1.000     0.0347 0.488 0.512
#> GSM1009083     2   0.000     0.9919 0.000 1.000
#> GSM1009097     1   0.000     0.9935 1.000 0.000
#> GSM1009111     2   0.000     0.9919 0.000 1.000
#> GSM1009125     2   0.000     0.9919 0.000 1.000
#> GSM1009139     2   0.000     0.9919 0.000 1.000
#> GSM1009153     1   0.000     0.9935 1.000 0.000
#> GSM1009167     2   0.000     0.9919 0.000 1.000
#> GSM1009181     2   0.000     0.9919 0.000 1.000
#> GSM1009195     2   0.000     0.9919 0.000 1.000
#> GSM1009070     1   0.000     0.9935 1.000 0.000
#> GSM1009084     2   0.000     0.9919 0.000 1.000
#> GSM1009098     1   0.000     0.9935 1.000 0.000
#> GSM1009112     2   0.000     0.9919 0.000 1.000
#> GSM1009126     1   0.000     0.9935 1.000 0.000
#> GSM1009140     1   0.000     0.9935 1.000 0.000
#> GSM1009154     1   0.000     0.9935 1.000 0.000
#> GSM1009168     2   0.000     0.9919 0.000 1.000
#> GSM1009182     2   0.000     0.9919 0.000 1.000
#> GSM1009196     1   0.000     0.9935 1.000 0.000
#> GSM1009071     1   0.000     0.9935 1.000 0.000
#> GSM1009085     2   0.000     0.9919 0.000 1.000
#> GSM1009099     1   0.000     0.9935 1.000 0.000
#> GSM1009113     2   0.000     0.9919 0.000 1.000
#> GSM1009127     1   0.000     0.9935 1.000 0.000
#> GSM1009141     1   0.000     0.9935 1.000 0.000
#> GSM1009155     1   0.000     0.9935 1.000 0.000
#> GSM1009169     2   0.000     0.9919 0.000 1.000
#> GSM1009183     2   0.000     0.9919 0.000 1.000
#> GSM1009197     1   0.000     0.9935 1.000 0.000
#> GSM1009072     1   0.000     0.9935 1.000 0.000
#> GSM1009086     2   0.000     0.9919 0.000 1.000
#> GSM1009100     1   0.000     0.9935 1.000 0.000
#> GSM1009114     2   0.000     0.9919 0.000 1.000
#> GSM1009128     1   0.000     0.9935 1.000 0.000
#> GSM1009142     1   0.000     0.9935 1.000 0.000
#> GSM1009156     1   0.000     0.9935 1.000 0.000
#> GSM1009170     2   0.000     0.9919 0.000 1.000
#> GSM1009184     2   0.000     0.9919 0.000 1.000
#> GSM1009198     1   0.000     0.9935 1.000 0.000
#> GSM1009073     1   0.000     0.9935 1.000 0.000
#> GSM1009087     1   0.000     0.9935 1.000 0.000
#> GSM1009101     1   0.000     0.9935 1.000 0.000
#> GSM1009115     2   0.000     0.9919 0.000 1.000
#> GSM1009129     2   0.000     0.9919 0.000 1.000
#> GSM1009143     1   0.000     0.9935 1.000 0.000
#> GSM1009157     1   0.999     0.0621 0.520 0.480
#> GSM1009171     2   0.000     0.9919 0.000 1.000
#> GSM1009185     1   0.000     0.9935 1.000 0.000
#> GSM1009199     2   0.000     0.9919 0.000 1.000
#> GSM1009074     1   0.000     0.9935 1.000 0.000
#> GSM1009088     1   0.000     0.9935 1.000 0.000
#> GSM1009102     1   0.000     0.9935 1.000 0.000
#> GSM1009116     2   0.000     0.9919 0.000 1.000
#> GSM1009130     2   0.000     0.9919 0.000 1.000
#> GSM1009144     1   0.000     0.9935 1.000 0.000
#> GSM1009158     1   0.000     0.9935 1.000 0.000
#> GSM1009172     2   0.000     0.9919 0.000 1.000
#> GSM1009186     2   0.000     0.9919 0.000 1.000
#> GSM1009200     2   0.000     0.9919 0.000 1.000
#> GSM1009075     1   0.000     0.9935 1.000 0.000
#> GSM1009089     1   0.000     0.9935 1.000 0.000
#> GSM1009103     1   0.000     0.9935 1.000 0.000
#> GSM1009117     2   0.000     0.9919 0.000 1.000
#> GSM1009131     1   0.000     0.9935 1.000 0.000
#> GSM1009145     1   0.000     0.9935 1.000 0.000
#> GSM1009159     1   0.000     0.9935 1.000 0.000
#> GSM1009173     2   0.000     0.9919 0.000 1.000
#> GSM1009187     1   0.000     0.9935 1.000 0.000
#> GSM1009201     1   0.000     0.9935 1.000 0.000

show/hide code output

cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#>            class entropy silhouette    p1    p2    p3
#> GSM1009062     3  0.4750      0.760 0.216 0.000 0.784
#> GSM1009076     2  0.0237      0.958 0.000 0.996 0.004
#> GSM1009090     1  0.0000      0.805 1.000 0.000 0.000
#> GSM1009104     2  0.0000      0.959 0.000 1.000 0.000
#> GSM1009118     2  0.0000      0.959 0.000 1.000 0.000
#> GSM1009132     2  0.5560      0.621 0.000 0.700 0.300
#> GSM1009146     1  0.5254      0.676 0.736 0.000 0.264
#> GSM1009160     2  0.0000      0.959 0.000 1.000 0.000
#> GSM1009174     2  0.4235      0.849 0.000 0.824 0.176
#> GSM1009188     1  0.0747      0.794 0.984 0.000 0.016
#> GSM1009063     3  0.4750      0.760 0.216 0.000 0.784
#> GSM1009077     2  0.0237      0.958 0.000 0.996 0.004
#> GSM1009091     1  0.0000      0.805 1.000 0.000 0.000
#> GSM1009105     2  0.0000      0.959 0.000 1.000 0.000
#> GSM1009119     1  0.0237      0.803 0.996 0.000 0.004
#> GSM1009133     3  0.6280      0.656 0.460 0.000 0.540
#> GSM1009147     1  0.5254      0.676 0.736 0.000 0.264
#> GSM1009161     2  0.0000      0.959 0.000 1.000 0.000
#> GSM1009175     2  0.4235      0.849 0.000 0.824 0.176
#> GSM1009189     1  0.1031      0.787 0.976 0.000 0.024
#> GSM1009064     3  0.3412      0.700 0.124 0.000 0.876
#> GSM1009078     1  0.5254      0.676 0.736 0.000 0.264
#> GSM1009092     1  0.0000      0.805 1.000 0.000 0.000
#> GSM1009106     2  0.0000      0.959 0.000 1.000 0.000
#> GSM1009120     1  0.0000      0.805 1.000 0.000 0.000
#> GSM1009134     3  0.6267      0.664 0.452 0.000 0.548
#> GSM1009148     1  0.5291      0.672 0.732 0.000 0.268
#> GSM1009162     2  0.0000      0.959 0.000 1.000 0.000
#> GSM1009176     2  0.2711      0.910 0.000 0.912 0.088
#> GSM1009190     1  0.1031      0.787 0.976 0.000 0.024
#> GSM1009065     3  0.4750      0.760 0.216 0.000 0.784
#> GSM1009079     2  0.0237      0.958 0.000 0.996 0.004
#> GSM1009093     1  0.0000      0.805 1.000 0.000 0.000
#> GSM1009107     2  0.0000      0.959 0.000 1.000 0.000
#> GSM1009121     2  0.0000      0.959 0.000 1.000 0.000
#> GSM1009135     3  0.6267      0.664 0.452 0.000 0.548
#> GSM1009149     1  0.4974      0.694 0.764 0.000 0.236
#> GSM1009163     2  0.0000      0.959 0.000 1.000 0.000
#> GSM1009177     2  0.4178      0.852 0.000 0.828 0.172
#> GSM1009191     2  0.1163      0.945 0.000 0.972 0.028
#> GSM1009066     3  0.4750      0.760 0.216 0.000 0.784
#> GSM1009080     2  0.0237      0.958 0.000 0.996 0.004
#> GSM1009094     1  0.0000      0.805 1.000 0.000 0.000
#> GSM1009108     2  0.0000      0.959 0.000 1.000 0.000
#> GSM1009122     2  0.0000      0.959 0.000 1.000 0.000
#> GSM1009136     1  0.0000      0.805 1.000 0.000 0.000
#> GSM1009150     1  0.5254      0.676 0.736 0.000 0.264
#> GSM1009164     2  0.0000      0.959 0.000 1.000 0.000
#> GSM1009178     1  0.6252      0.432 0.556 0.000 0.444
#> GSM1009192     1  0.0237      0.803 0.996 0.000 0.004
#> GSM1009067     3  0.4750      0.760 0.216 0.000 0.784
#> GSM1009081     2  0.0237      0.958 0.000 0.996 0.004
#> GSM1009095     1  0.0000      0.805 1.000 0.000 0.000
#> GSM1009109     2  0.0000      0.959 0.000 1.000 0.000
#> GSM1009123     1  0.0000      0.805 1.000 0.000 0.000
#> GSM1009137     3  0.6280      0.656 0.460 0.000 0.540
#> GSM1009151     1  0.5291      0.672 0.732 0.000 0.268
#> GSM1009165     2  0.0000      0.959 0.000 1.000 0.000
#> GSM1009179     2  0.4235      0.849 0.000 0.824 0.176
#> GSM1009193     1  0.0000      0.805 1.000 0.000 0.000
#> GSM1009068     3  0.4750      0.760 0.216 0.000 0.784
#> GSM1009082     2  0.0237      0.958 0.000 0.996 0.004
#> GSM1009096     1  0.0000      0.805 1.000 0.000 0.000
#> GSM1009110     2  0.0000      0.959 0.000 1.000 0.000
#> GSM1009124     1  0.2261      0.744 0.932 0.000 0.068
#> GSM1009138     3  0.6267      0.664 0.452 0.000 0.548
#> GSM1009152     1  0.5291      0.672 0.732 0.000 0.268
#> GSM1009166     2  0.0000      0.959 0.000 1.000 0.000
#> GSM1009180     1  0.6244      0.438 0.560 0.000 0.440
#> GSM1009194     2  0.1643      0.938 0.000 0.956 0.044
#> GSM1009069     3  0.2165      0.653 0.064 0.000 0.936
#> GSM1009083     2  0.0237      0.958 0.000 0.996 0.004
#> GSM1009097     1  0.0000      0.805 1.000 0.000 0.000
#> GSM1009111     2  0.0000      0.959 0.000 1.000 0.000
#> GSM1009125     2  0.0000      0.959 0.000 1.000 0.000
#> GSM1009139     2  0.5948      0.496 0.000 0.640 0.360
#> GSM1009153     1  0.5431      0.650 0.716 0.000 0.284
#> GSM1009167     2  0.0000      0.959 0.000 1.000 0.000
#> GSM1009181     2  0.4178      0.852 0.000 0.828 0.172
#> GSM1009195     2  0.0237      0.958 0.000 0.996 0.004
#> GSM1009070     1  0.5254      0.676 0.736 0.000 0.264
#> GSM1009084     2  0.0237      0.958 0.000 0.996 0.004
#> GSM1009098     1  0.0000      0.805 1.000 0.000 0.000
#> GSM1009112     2  0.0000      0.959 0.000 1.000 0.000
#> GSM1009126     1  0.1753      0.763 0.952 0.000 0.048
#> GSM1009140     3  0.6299      0.651 0.476 0.000 0.524
#> GSM1009154     1  0.5291      0.672 0.732 0.000 0.268
#> GSM1009168     2  0.0000      0.959 0.000 1.000 0.000
#> GSM1009182     2  0.4235      0.849 0.000 0.824 0.176
#> GSM1009196     1  0.5327      0.667 0.728 0.000 0.272
#> GSM1009071     3  0.4750      0.760 0.216 0.000 0.784
#> GSM1009085     2  0.0237      0.958 0.000 0.996 0.004
#> GSM1009099     1  0.0000      0.805 1.000 0.000 0.000
#> GSM1009113     2  0.0000      0.959 0.000 1.000 0.000
#> GSM1009127     1  0.0000      0.805 1.000 0.000 0.000
#> GSM1009141     3  0.6252      0.669 0.444 0.000 0.556
#> GSM1009155     1  0.6126      0.399 0.600 0.000 0.400
#> GSM1009169     2  0.0000      0.959 0.000 1.000 0.000
#> GSM1009183     2  0.4235      0.849 0.000 0.824 0.176
#> GSM1009197     1  0.0000      0.805 1.000 0.000 0.000
#> GSM1009072     3  0.4750      0.760 0.216 0.000 0.784
#> GSM1009086     2  0.0237      0.958 0.000 0.996 0.004
#> GSM1009100     1  0.0000      0.805 1.000 0.000 0.000
#> GSM1009114     2  0.0000      0.959 0.000 1.000 0.000
#> GSM1009128     1  0.1289      0.780 0.968 0.000 0.032
#> GSM1009142     3  0.6267      0.664 0.452 0.000 0.548
#> GSM1009156     1  0.5254      0.676 0.736 0.000 0.264
#> GSM1009170     2  0.0000      0.959 0.000 1.000 0.000
#> GSM1009184     2  0.4235      0.849 0.000 0.824 0.176
#> GSM1009198     1  0.0747      0.794 0.984 0.000 0.016
#> GSM1009073     3  0.4750      0.760 0.216 0.000 0.784
#> GSM1009087     1  0.5254      0.676 0.736 0.000 0.264
#> GSM1009101     1  0.0000      0.805 1.000 0.000 0.000
#> GSM1009115     2  0.0000      0.959 0.000 1.000 0.000
#> GSM1009129     2  0.0000      0.959 0.000 1.000 0.000
#> GSM1009143     3  0.6299      0.651 0.476 0.000 0.524
#> GSM1009157     3  0.1643      0.635 0.044 0.000 0.956
#> GSM1009171     2  0.0000      0.959 0.000 1.000 0.000
#> GSM1009185     1  0.5058      0.689 0.756 0.000 0.244
#> GSM1009199     2  0.0237      0.958 0.000 0.996 0.004
#> GSM1009074     3  0.4750      0.760 0.216 0.000 0.784
#> GSM1009088     1  0.5291      0.672 0.732 0.000 0.268
#> GSM1009102     1  0.0000      0.805 1.000 0.000 0.000
#> GSM1009116     2  0.0000      0.959 0.000 1.000 0.000
#> GSM1009130     2  0.0000      0.959 0.000 1.000 0.000
#> GSM1009144     3  0.6274      0.661 0.456 0.000 0.544
#> GSM1009158     1  0.5254      0.676 0.736 0.000 0.264
#> GSM1009172     2  0.0000      0.959 0.000 1.000 0.000
#> GSM1009186     2  0.4235      0.849 0.000 0.824 0.176
#> GSM1009200     2  0.5524      0.739 0.164 0.796 0.040
#> GSM1009075     3  0.4750      0.760 0.216 0.000 0.784
#> GSM1009089     1  0.4974      0.694 0.764 0.000 0.236
#> GSM1009103     1  0.0000      0.805 1.000 0.000 0.000
#> GSM1009117     2  0.0000      0.959 0.000 1.000 0.000
#> GSM1009131     1  0.1289      0.780 0.968 0.000 0.032
#> GSM1009145     1  0.0000      0.805 1.000 0.000 0.000
#> GSM1009159     1  0.0000      0.805 1.000 0.000 0.000
#> GSM1009173     2  0.0000      0.959 0.000 1.000 0.000
#> GSM1009187     1  0.5327      0.667 0.728 0.000 0.272
#> GSM1009201     1  0.1529      0.769 0.960 0.000 0.040

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>            class entropy silhouette    p1    p2    p3    p4
#> GSM1009062     4  0.4072     0.5819 0.252 0.000 0.000 0.748
#> GSM1009076     2  0.3688     0.7375 0.000 0.792 0.208 0.000
#> GSM1009090     1  0.0000     0.7903 1.000 0.000 0.000 0.000
#> GSM1009104     2  0.0000     0.9028 0.000 1.000 0.000 0.000
#> GSM1009118     2  0.0000     0.9028 0.000 1.000 0.000 0.000
#> GSM1009132     3  0.7860     0.1897 0.000 0.276 0.384 0.340
#> GSM1009146     1  0.3873     0.6437 0.772 0.000 0.000 0.228
#> GSM1009160     2  0.0000     0.9028 0.000 1.000 0.000 0.000
#> GSM1009174     3  0.3219     0.8803 0.000 0.164 0.836 0.000
#> GSM1009188     1  0.3694     0.6657 0.844 0.000 0.032 0.124
#> GSM1009063     4  0.4040     0.5869 0.248 0.000 0.000 0.752
#> GSM1009077     2  0.3688     0.7375 0.000 0.792 0.208 0.000
#> GSM1009091     1  0.0000     0.7903 1.000 0.000 0.000 0.000
#> GSM1009105     2  0.0000     0.9028 0.000 1.000 0.000 0.000
#> GSM1009119     1  0.1151     0.7729 0.968 0.000 0.008 0.024
#> GSM1009133     4  0.7073     0.4504 0.364 0.000 0.132 0.504
#> GSM1009147     1  0.3873     0.6437 0.772 0.000 0.000 0.228
#> GSM1009161     2  0.0000     0.9028 0.000 1.000 0.000 0.000
#> GSM1009175     3  0.3219     0.8803 0.000 0.164 0.836 0.000
#> GSM1009189     1  0.4008     0.6376 0.820 0.000 0.032 0.148
#> GSM1009064     4  0.4786     0.5616 0.104 0.000 0.108 0.788
#> GSM1009078     1  0.3907     0.6396 0.768 0.000 0.000 0.232
#> GSM1009092     1  0.0000     0.7903 1.000 0.000 0.000 0.000
#> GSM1009106     2  0.0000     0.9028 0.000 1.000 0.000 0.000
#> GSM1009120     1  0.0000     0.7903 1.000 0.000 0.000 0.000
#> GSM1009134     4  0.6752     0.5377 0.280 0.000 0.132 0.588
#> GSM1009148     1  0.4605     0.5043 0.664 0.000 0.000 0.336
#> GSM1009162     2  0.0000     0.9028 0.000 1.000 0.000 0.000
#> GSM1009176     3  0.4543     0.6343 0.000 0.324 0.676 0.000
#> GSM1009190     1  0.4008     0.6376 0.820 0.000 0.032 0.148
#> GSM1009065     4  0.3764     0.6032 0.216 0.000 0.000 0.784
#> GSM1009079     2  0.3688     0.7375 0.000 0.792 0.208 0.000
#> GSM1009093     1  0.0000     0.7903 1.000 0.000 0.000 0.000
#> GSM1009107     2  0.0000     0.9028 0.000 1.000 0.000 0.000
#> GSM1009121     2  0.0000     0.9028 0.000 1.000 0.000 0.000
#> GSM1009135     4  0.6752     0.5377 0.280 0.000 0.132 0.588
#> GSM1009149     1  0.1118     0.7771 0.964 0.000 0.000 0.036
#> GSM1009163     2  0.0000     0.9028 0.000 1.000 0.000 0.000
#> GSM1009177     3  0.3219     0.8803 0.000 0.164 0.836 0.000
#> GSM1009191     2  0.6552     0.4788 0.000 0.628 0.228 0.144
#> GSM1009066     4  0.3764     0.6032 0.216 0.000 0.000 0.784
#> GSM1009080     2  0.3688     0.7375 0.000 0.792 0.208 0.000
#> GSM1009094     1  0.0000     0.7903 1.000 0.000 0.000 0.000
#> GSM1009108     2  0.0000     0.9028 0.000 1.000 0.000 0.000
#> GSM1009122     2  0.0000     0.9028 0.000 1.000 0.000 0.000
#> GSM1009136     1  0.0000     0.7903 1.000 0.000 0.000 0.000
#> GSM1009150     1  0.3873     0.6437 0.772 0.000 0.000 0.228
#> GSM1009164     2  0.0000     0.9028 0.000 1.000 0.000 0.000
#> GSM1009178     3  0.3931     0.6390 0.128 0.000 0.832 0.040
#> GSM1009192     1  0.2224     0.7446 0.928 0.000 0.032 0.040
#> GSM1009067     4  0.4040     0.5869 0.248 0.000 0.000 0.752
#> GSM1009081     2  0.3688     0.7375 0.000 0.792 0.208 0.000
#> GSM1009095     1  0.0000     0.7903 1.000 0.000 0.000 0.000
#> GSM1009109     2  0.0000     0.9028 0.000 1.000 0.000 0.000
#> GSM1009123     1  0.0000     0.7903 1.000 0.000 0.000 0.000
#> GSM1009137     4  0.7073     0.4504 0.364 0.000 0.132 0.504
#> GSM1009151     1  0.4605     0.5043 0.664 0.000 0.000 0.336
#> GSM1009165     2  0.0000     0.9028 0.000 1.000 0.000 0.000
#> GSM1009179     3  0.3219     0.8803 0.000 0.164 0.836 0.000
#> GSM1009193     1  0.0672     0.7824 0.984 0.000 0.008 0.008
#> GSM1009068     4  0.4072     0.5819 0.252 0.000 0.000 0.748
#> GSM1009082     2  0.3688     0.7375 0.000 0.792 0.208 0.000
#> GSM1009096     1  0.0000     0.7903 1.000 0.000 0.000 0.000
#> GSM1009110     2  0.0000     0.9028 0.000 1.000 0.000 0.000
#> GSM1009124     1  0.4707     0.5511 0.760 0.000 0.036 0.204
#> GSM1009138     4  0.6752     0.5377 0.280 0.000 0.132 0.588
#> GSM1009152     1  0.4605     0.5043 0.664 0.000 0.000 0.336
#> GSM1009166     2  0.0000     0.9028 0.000 1.000 0.000 0.000
#> GSM1009180     3  0.3400     0.6034 0.180 0.000 0.820 0.000
#> GSM1009194     2  0.6915     0.3100 0.000 0.564 0.296 0.140
#> GSM1009069     4  0.4589     0.4865 0.048 0.000 0.168 0.784
#> GSM1009083     2  0.3688     0.7375 0.000 0.792 0.208 0.000
#> GSM1009097     1  0.0000     0.7903 1.000 0.000 0.000 0.000
#> GSM1009111     2  0.0000     0.9028 0.000 1.000 0.000 0.000
#> GSM1009125     2  0.0000     0.9028 0.000 1.000 0.000 0.000
#> GSM1009139     4  0.7799    -0.1647 0.000 0.368 0.248 0.384
#> GSM1009153     1  0.4948     0.2739 0.560 0.000 0.000 0.440
#> GSM1009167     2  0.0000     0.9028 0.000 1.000 0.000 0.000
#> GSM1009181     3  0.3219     0.8803 0.000 0.164 0.836 0.000
#> GSM1009195     2  0.3649     0.7404 0.000 0.796 0.204 0.000
#> GSM1009070     1  0.4193     0.6003 0.732 0.000 0.000 0.268
#> GSM1009084     2  0.3688     0.7375 0.000 0.792 0.208 0.000
#> GSM1009098     1  0.0000     0.7903 1.000 0.000 0.000 0.000
#> GSM1009112     2  0.0000     0.9028 0.000 1.000 0.000 0.000
#> GSM1009126     1  0.6595     0.3386 0.628 0.000 0.160 0.212
#> GSM1009140     4  0.7135     0.4336 0.400 0.000 0.132 0.468
#> GSM1009154     1  0.4605     0.5043 0.664 0.000 0.000 0.336
#> GSM1009168     2  0.0000     0.9028 0.000 1.000 0.000 0.000
#> GSM1009182     3  0.3219     0.8803 0.000 0.164 0.836 0.000
#> GSM1009196     1  0.4454     0.5467 0.692 0.000 0.000 0.308
#> GSM1009071     4  0.3837     0.6004 0.224 0.000 0.000 0.776
#> GSM1009085     2  0.3688     0.7375 0.000 0.792 0.208 0.000
#> GSM1009099     1  0.0000     0.7903 1.000 0.000 0.000 0.000
#> GSM1009113     2  0.0000     0.9028 0.000 1.000 0.000 0.000
#> GSM1009127     1  0.0000     0.7903 1.000 0.000 0.000 0.000
#> GSM1009141     4  0.6661     0.5455 0.264 0.000 0.132 0.604
#> GSM1009155     1  0.4994     0.1532 0.520 0.000 0.000 0.480
#> GSM1009169     2  0.0000     0.9028 0.000 1.000 0.000 0.000
#> GSM1009183     3  0.3219     0.8803 0.000 0.164 0.836 0.000
#> GSM1009197     1  0.0000     0.7903 1.000 0.000 0.000 0.000
#> GSM1009072     4  0.4040     0.5869 0.248 0.000 0.000 0.752
#> GSM1009086     2  0.3688     0.7375 0.000 0.792 0.208 0.000
#> GSM1009100     1  0.0000     0.7903 1.000 0.000 0.000 0.000
#> GSM1009114     2  0.0000     0.9028 0.000 1.000 0.000 0.000
#> GSM1009128     1  0.3907     0.6479 0.828 0.000 0.032 0.140
#> GSM1009142     4  0.6730     0.5363 0.276 0.000 0.132 0.592
#> GSM1009156     1  0.3873     0.6437 0.772 0.000 0.000 0.228
#> GSM1009170     2  0.0000     0.9028 0.000 1.000 0.000 0.000
#> GSM1009184     3  0.3219     0.8803 0.000 0.164 0.836 0.000
#> GSM1009198     1  0.3694     0.6657 0.844 0.000 0.032 0.124
#> GSM1009073     4  0.3942     0.5945 0.236 0.000 0.000 0.764
#> GSM1009087     1  0.3907     0.6396 0.768 0.000 0.000 0.232
#> GSM1009101     1  0.0000     0.7903 1.000 0.000 0.000 0.000
#> GSM1009115     2  0.0000     0.9028 0.000 1.000 0.000 0.000
#> GSM1009129     2  0.0000     0.9028 0.000 1.000 0.000 0.000
#> GSM1009143     4  0.7135     0.4336 0.400 0.000 0.132 0.468
#> GSM1009157     4  0.5607    -0.0804 0.020 0.000 0.488 0.492
#> GSM1009171     2  0.0000     0.9028 0.000 1.000 0.000 0.000
#> GSM1009185     1  0.1118     0.7771 0.964 0.000 0.000 0.036
#> GSM1009199     2  0.3649     0.7404 0.000 0.796 0.204 0.000
#> GSM1009074     4  0.4040     0.5869 0.248 0.000 0.000 0.752
#> GSM1009088     1  0.4008     0.6273 0.756 0.000 0.000 0.244
#> GSM1009102     1  0.0000     0.7903 1.000 0.000 0.000 0.000
#> GSM1009116     2  0.0000     0.9028 0.000 1.000 0.000 0.000
#> GSM1009130     2  0.0000     0.9028 0.000 1.000 0.000 0.000
#> GSM1009144     4  0.7063     0.4558 0.360 0.000 0.132 0.508
#> GSM1009158     1  0.3873     0.6437 0.772 0.000 0.000 0.228
#> GSM1009172     2  0.0000     0.9028 0.000 1.000 0.000 0.000
#> GSM1009186     3  0.3219     0.8803 0.000 0.164 0.836 0.000
#> GSM1009200     2  0.7211     0.3218 0.012 0.596 0.184 0.208
#> GSM1009075     4  0.4040     0.5869 0.248 0.000 0.000 0.752
#> GSM1009089     1  0.1211     0.7752 0.960 0.000 0.000 0.040
#> GSM1009103     1  0.0000     0.7903 1.000 0.000 0.000 0.000
#> GSM1009117     2  0.0000     0.9028 0.000 1.000 0.000 0.000
#> GSM1009131     1  0.3907     0.6479 0.828 0.000 0.032 0.140
#> GSM1009145     1  0.0000     0.7903 1.000 0.000 0.000 0.000
#> GSM1009159     1  0.0000     0.7903 1.000 0.000 0.000 0.000
#> GSM1009173     2  0.0000     0.9028 0.000 1.000 0.000 0.000
#> GSM1009187     1  0.5883     0.3260 0.572 0.000 0.040 0.388
#> GSM1009201     1  0.6664     0.3217 0.620 0.000 0.164 0.216

show/hide code output

cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#>            class entropy silhouette    p1    p2    p3    p4    p5
#> GSM1009062     3  0.5091     0.8737 0.236 0.000 0.676 0.088 0.000
#> GSM1009076     5  0.3996     0.7257 0.000 0.228 0.012 0.008 0.752
#> GSM1009090     1  0.0290     0.8024 0.992 0.000 0.000 0.008 0.000
#> GSM1009104     5  0.0000     0.8865 0.000 0.000 0.000 0.000 1.000
#> GSM1009118     5  0.0693     0.8826 0.000 0.000 0.012 0.008 0.980
#> GSM1009132     4  0.2992     0.7648 0.000 0.044 0.008 0.876 0.072
#> GSM1009146     1  0.1341     0.7726 0.944 0.000 0.056 0.000 0.000
#> GSM1009160     5  0.1503     0.8794 0.000 0.020 0.020 0.008 0.952
#> GSM1009174     2  0.1478     0.9465 0.000 0.936 0.000 0.000 0.064
#> GSM1009188     1  0.6096     0.5131 0.600 0.056 0.292 0.052 0.000
#> GSM1009063     3  0.5091     0.8737 0.236 0.000 0.676 0.088 0.000
#> GSM1009077     5  0.3996     0.7257 0.000 0.228 0.012 0.008 0.752
#> GSM1009091     1  0.0290     0.8024 0.992 0.000 0.000 0.008 0.000
#> GSM1009105     5  0.0000     0.8865 0.000 0.000 0.000 0.000 1.000
#> GSM1009119     1  0.4578     0.6525 0.748 0.028 0.196 0.028 0.000
#> GSM1009133     4  0.1732     0.8583 0.080 0.000 0.000 0.920 0.000
#> GSM1009147     1  0.1341     0.7726 0.944 0.000 0.056 0.000 0.000
#> GSM1009161     5  0.1503     0.8794 0.000 0.020 0.020 0.008 0.952
#> GSM1009175     2  0.1478     0.9465 0.000 0.936 0.000 0.000 0.064
#> GSM1009189     1  0.6428     0.4857 0.576 0.056 0.292 0.076 0.000
#> GSM1009064     3  0.5958     0.7174 0.072 0.080 0.676 0.172 0.000
#> GSM1009078     1  0.1341     0.7726 0.944 0.000 0.056 0.000 0.000
#> GSM1009092     1  0.0290     0.8024 0.992 0.000 0.000 0.008 0.000
#> GSM1009106     5  0.0000     0.8865 0.000 0.000 0.000 0.000 1.000
#> GSM1009120     1  0.2270     0.7619 0.904 0.000 0.076 0.020 0.000
#> GSM1009134     4  0.2036     0.8572 0.056 0.000 0.024 0.920 0.000
#> GSM1009148     1  0.4287    -0.2887 0.540 0.000 0.460 0.000 0.000
#> GSM1009162     5  0.1503     0.8794 0.000 0.020 0.020 0.008 0.952
#> GSM1009176     2  0.3461     0.7233 0.000 0.772 0.004 0.000 0.224
#> GSM1009190     1  0.6376     0.4913 0.580 0.056 0.292 0.072 0.000
#> GSM1009065     3  0.5309     0.8260 0.164 0.000 0.676 0.160 0.000
#> GSM1009079     5  0.3996     0.7257 0.000 0.228 0.012 0.008 0.752
#> GSM1009093     1  0.0290     0.8024 0.992 0.000 0.000 0.008 0.000
#> GSM1009107     5  0.0000     0.8865 0.000 0.000 0.000 0.000 1.000
#> GSM1009121     5  0.0693     0.8826 0.000 0.000 0.012 0.008 0.980
#> GSM1009135     4  0.2036     0.8572 0.056 0.000 0.024 0.920 0.000
#> GSM1009149     1  0.0510     0.7963 0.984 0.000 0.016 0.000 0.000
#> GSM1009163     5  0.1503     0.8794 0.000 0.020 0.020 0.008 0.952
#> GSM1009177     2  0.1478     0.9465 0.000 0.936 0.000 0.000 0.064
#> GSM1009191     5  0.7916     0.0347 0.000 0.216 0.304 0.088 0.392
#> GSM1009066     3  0.5307     0.8166 0.156 0.000 0.676 0.168 0.000
#> GSM1009080     5  0.3966     0.7298 0.000 0.224 0.012 0.008 0.756
#> GSM1009094     1  0.0290     0.8024 0.992 0.000 0.000 0.008 0.000
#> GSM1009108     5  0.0000     0.8865 0.000 0.000 0.000 0.000 1.000
#> GSM1009122     5  0.0693     0.8826 0.000 0.000 0.012 0.008 0.980
#> GSM1009136     1  0.0290     0.8024 0.992 0.000 0.000 0.008 0.000
#> GSM1009150     1  0.1270     0.7755 0.948 0.000 0.052 0.000 0.000
#> GSM1009164     5  0.1503     0.8794 0.000 0.020 0.020 0.008 0.952
#> GSM1009178     2  0.1831     0.8376 0.076 0.920 0.004 0.000 0.000
#> GSM1009192     1  0.5594     0.5782 0.656 0.044 0.256 0.044 0.000
#> GSM1009067     3  0.5091     0.8737 0.236 0.000 0.676 0.088 0.000
#> GSM1009081     5  0.3966     0.7298 0.000 0.224 0.012 0.008 0.756
#> GSM1009095     1  0.0290     0.8024 0.992 0.000 0.000 0.008 0.000
#> GSM1009109     5  0.0000     0.8865 0.000 0.000 0.000 0.000 1.000
#> GSM1009123     1  0.2362     0.7600 0.900 0.000 0.076 0.024 0.000
#> GSM1009137     4  0.1732     0.8583 0.080 0.000 0.000 0.920 0.000
#> GSM1009151     1  0.4287    -0.2887 0.540 0.000 0.460 0.000 0.000
#> GSM1009165     5  0.1503     0.8794 0.000 0.020 0.020 0.008 0.952
#> GSM1009179     2  0.1478     0.9465 0.000 0.936 0.000 0.000 0.064
#> GSM1009193     1  0.4121     0.6827 0.788 0.024 0.164 0.024 0.000
#> GSM1009068     3  0.5039     0.8675 0.244 0.000 0.676 0.080 0.000
#> GSM1009082     5  0.3996     0.7257 0.000 0.228 0.012 0.008 0.752
#> GSM1009096     1  0.0290     0.8024 0.992 0.000 0.000 0.008 0.000
#> GSM1009110     5  0.0000     0.8865 0.000 0.000 0.000 0.000 1.000
#> GSM1009124     1  0.6747     0.4427 0.548 0.056 0.292 0.104 0.000
#> GSM1009138     4  0.2036     0.8572 0.056 0.000 0.024 0.920 0.000
#> GSM1009152     1  0.4287    -0.2887 0.540 0.000 0.460 0.000 0.000
#> GSM1009166     5  0.1503     0.8794 0.000 0.020 0.020 0.008 0.952
#> GSM1009180     2  0.2074     0.8009 0.104 0.896 0.000 0.000 0.000
#> GSM1009194     5  0.8127    -0.1639 0.000 0.280 0.304 0.096 0.320
#> GSM1009069     3  0.5871     0.6805 0.048 0.108 0.680 0.164 0.000
#> GSM1009083     5  0.3996     0.7257 0.000 0.228 0.012 0.008 0.752
#> GSM1009097     1  0.0290     0.8024 0.992 0.000 0.000 0.008 0.000
#> GSM1009111     5  0.0000     0.8865 0.000 0.000 0.000 0.000 1.000
#> GSM1009125     5  0.0693     0.8826 0.000 0.000 0.012 0.008 0.980
#> GSM1009139     4  0.2577     0.7680 0.000 0.016 0.008 0.892 0.084
#> GSM1009153     3  0.4210     0.6269 0.412 0.000 0.588 0.000 0.000
#> GSM1009167     5  0.1503     0.8794 0.000 0.020 0.020 0.008 0.952
#> GSM1009181     2  0.1478     0.9465 0.000 0.936 0.000 0.000 0.064
#> GSM1009195     5  0.3883     0.7678 0.000 0.160 0.012 0.028 0.800
#> GSM1009070     1  0.3039     0.5866 0.808 0.000 0.192 0.000 0.000
#> GSM1009084     5  0.3996     0.7257 0.000 0.228 0.012 0.008 0.752
#> GSM1009098     1  0.0290     0.8024 0.992 0.000 0.000 0.008 0.000
#> GSM1009112     5  0.0000     0.8865 0.000 0.000 0.000 0.000 1.000
#> GSM1009126     4  0.6662     0.5490 0.096 0.056 0.292 0.556 0.000
#> GSM1009140     4  0.1792     0.8564 0.084 0.000 0.000 0.916 0.000
#> GSM1009154     1  0.4287    -0.2887 0.540 0.000 0.460 0.000 0.000
#> GSM1009168     5  0.1503     0.8794 0.000 0.020 0.020 0.008 0.952
#> GSM1009182     2  0.1478     0.9465 0.000 0.936 0.000 0.000 0.064
#> GSM1009196     1  0.3857     0.2969 0.688 0.000 0.312 0.000 0.000
#> GSM1009071     3  0.5283     0.8486 0.188 0.000 0.676 0.136 0.000
#> GSM1009085     5  0.3996     0.7257 0.000 0.228 0.012 0.008 0.752
#> GSM1009099     1  0.0290     0.8024 0.992 0.000 0.000 0.008 0.000
#> GSM1009113     5  0.0000     0.8865 0.000 0.000 0.000 0.000 1.000
#> GSM1009127     1  0.2362     0.7600 0.900 0.000 0.076 0.024 0.000
#> GSM1009141     4  0.1668     0.8421 0.028 0.000 0.032 0.940 0.000
#> GSM1009155     3  0.3966     0.7530 0.336 0.000 0.664 0.000 0.000
#> GSM1009169     5  0.1503     0.8794 0.000 0.020 0.020 0.008 0.952
#> GSM1009183     2  0.1478     0.9465 0.000 0.936 0.000 0.000 0.064
#> GSM1009197     1  0.0162     0.8018 0.996 0.000 0.000 0.004 0.000
#> GSM1009072     3  0.5091     0.8737 0.236 0.000 0.676 0.088 0.000
#> GSM1009086     5  0.3996     0.7257 0.000 0.228 0.012 0.008 0.752
#> GSM1009100     1  0.0290     0.8024 0.992 0.000 0.000 0.008 0.000
#> GSM1009114     5  0.0000     0.8865 0.000 0.000 0.000 0.000 1.000
#> GSM1009128     1  0.6096     0.5131 0.600 0.056 0.292 0.052 0.000
#> GSM1009142     4  0.1661     0.8498 0.036 0.000 0.024 0.940 0.000
#> GSM1009156     1  0.1341     0.7726 0.944 0.000 0.056 0.000 0.000
#> GSM1009170     5  0.1503     0.8794 0.000 0.020 0.020 0.008 0.952
#> GSM1009184     2  0.1478     0.9465 0.000 0.936 0.000 0.000 0.064
#> GSM1009198     1  0.6096     0.5131 0.600 0.056 0.292 0.052 0.000
#> GSM1009073     3  0.5240     0.8594 0.204 0.000 0.676 0.120 0.000
#> GSM1009087     1  0.1341     0.7726 0.944 0.000 0.056 0.000 0.000
#> GSM1009101     1  0.0290     0.8024 0.992 0.000 0.000 0.008 0.000
#> GSM1009115     5  0.0000     0.8865 0.000 0.000 0.000 0.000 1.000
#> GSM1009129     5  0.0693     0.8826 0.000 0.000 0.012 0.008 0.980
#> GSM1009143     4  0.1792     0.8564 0.084 0.000 0.000 0.916 0.000
#> GSM1009157     3  0.4588     0.4772 0.012 0.308 0.668 0.012 0.000
#> GSM1009171     5  0.1503     0.8794 0.000 0.020 0.020 0.008 0.952
#> GSM1009185     1  0.0510     0.7963 0.984 0.000 0.016 0.000 0.000
#> GSM1009199     5  0.3922     0.7643 0.000 0.164 0.012 0.028 0.796
#> GSM1009074     3  0.5091     0.8737 0.236 0.000 0.676 0.088 0.000
#> GSM1009088     1  0.1732     0.7508 0.920 0.000 0.080 0.000 0.000
#> GSM1009102     1  0.0290     0.8024 0.992 0.000 0.000 0.008 0.000
#> GSM1009116     5  0.0000     0.8865 0.000 0.000 0.000 0.000 1.000
#> GSM1009130     5  0.0693     0.8826 0.000 0.000 0.012 0.008 0.980
#> GSM1009144     4  0.1732     0.8583 0.080 0.000 0.000 0.920 0.000
#> GSM1009158     1  0.1270     0.7755 0.948 0.000 0.052 0.000 0.000
#> GSM1009172     5  0.1503     0.8794 0.000 0.020 0.020 0.008 0.952
#> GSM1009186     2  0.1478     0.9465 0.000 0.936 0.000 0.000 0.064
#> GSM1009200     4  0.6131     0.5620 0.000 0.056 0.300 0.592 0.052
#> GSM1009075     3  0.5091     0.8737 0.236 0.000 0.676 0.088 0.000
#> GSM1009089     1  0.0510     0.7963 0.984 0.000 0.016 0.000 0.000
#> GSM1009103     1  0.0290     0.8024 0.992 0.000 0.000 0.008 0.000
#> GSM1009117     5  0.0000     0.8865 0.000 0.000 0.000 0.000 1.000
#> GSM1009131     1  0.6096     0.5131 0.600 0.056 0.292 0.052 0.000
#> GSM1009145     1  0.0290     0.8024 0.992 0.000 0.000 0.008 0.000
#> GSM1009159     1  0.0000     0.8012 1.000 0.000 0.000 0.000 0.000
#> GSM1009173     5  0.1503     0.8794 0.000 0.020 0.020 0.008 0.952
#> GSM1009187     3  0.4767     0.5996 0.420 0.020 0.560 0.000 0.000
#> GSM1009201     4  0.6156     0.5815 0.056 0.056 0.292 0.596 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
#> GSM1009062     6  0.2346      0.942 0.124 0.000 0.000 0.008 0.000 0.868
#> GSM1009076     5  0.6420      0.648 0.000 0.196 0.116 0.040 0.600 0.048
#> GSM1009090     1  0.0622      0.887 0.980 0.000 0.012 0.008 0.000 0.000
#> GSM1009104     5  0.0000      0.810 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM1009118     5  0.3296      0.773 0.000 0.000 0.084 0.036 0.844 0.036
#> GSM1009132     4  0.0922      0.921 0.000 0.004 0.004 0.968 0.024 0.000
#> GSM1009146     1  0.1176      0.880 0.956 0.000 0.024 0.000 0.000 0.020
#> GSM1009160     5  0.4442      0.763 0.000 0.012 0.128 0.020 0.764 0.076
#> GSM1009174     2  0.0260      0.966 0.000 0.992 0.000 0.000 0.008 0.000
#> GSM1009188     3  0.3314      0.812 0.256 0.000 0.740 0.004 0.000 0.000
#> GSM1009063     6  0.2346      0.942 0.124 0.000 0.000 0.008 0.000 0.868
#> GSM1009077     5  0.6420      0.648 0.000 0.196 0.116 0.040 0.600 0.048
#> GSM1009091     1  0.0622      0.887 0.980 0.000 0.012 0.008 0.000 0.000
#> GSM1009105     5  0.0000      0.810 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM1009119     1  0.4076      0.236 0.636 0.000 0.348 0.004 0.000 0.012
#> GSM1009133     4  0.1418      0.977 0.024 0.000 0.000 0.944 0.000 0.032
#> GSM1009147     1  0.1176      0.880 0.956 0.000 0.024 0.000 0.000 0.020
#> GSM1009161     5  0.4442      0.763 0.000 0.012 0.128 0.020 0.764 0.076
#> GSM1009175     2  0.0260      0.966 0.000 0.992 0.000 0.000 0.008 0.000
#> GSM1009189     3  0.3314      0.812 0.256 0.000 0.740 0.004 0.000 0.000
#> GSM1009064     6  0.2972      0.871 0.032 0.052 0.000 0.048 0.000 0.868
#> GSM1009078     1  0.1257      0.879 0.952 0.000 0.028 0.000 0.000 0.020
#> GSM1009092     1  0.0622      0.887 0.980 0.000 0.012 0.008 0.000 0.000
#> GSM1009106     5  0.0000      0.810 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM1009120     1  0.1757      0.831 0.916 0.000 0.076 0.000 0.000 0.008
#> GSM1009134     4  0.1391      0.977 0.016 0.000 0.000 0.944 0.000 0.040
#> GSM1009148     1  0.3619      0.658 0.744 0.000 0.024 0.000 0.000 0.232
#> GSM1009162     5  0.4442      0.763 0.000 0.012 0.128 0.020 0.764 0.076
#> GSM1009176     2  0.3445      0.743 0.000 0.816 0.016 0.012 0.144 0.012
#> GSM1009190     3  0.3314      0.812 0.256 0.000 0.740 0.004 0.000 0.000
#> GSM1009065     6  0.2647      0.927 0.088 0.000 0.000 0.044 0.000 0.868
#> GSM1009079     5  0.6420      0.648 0.000 0.196 0.116 0.040 0.600 0.048
#> GSM1009093     1  0.0622      0.887 0.980 0.000 0.012 0.008 0.000 0.000
#> GSM1009107     5  0.0000      0.810 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM1009121     5  0.3411      0.771 0.000 0.000 0.088 0.032 0.836 0.044
#> GSM1009135     4  0.1391      0.977 0.016 0.000 0.000 0.944 0.000 0.040
#> GSM1009149     1  0.0806      0.884 0.972 0.000 0.020 0.000 0.000 0.008
#> GSM1009163     5  0.4442      0.763 0.000 0.012 0.128 0.020 0.764 0.076
#> GSM1009177     2  0.0405      0.964 0.000 0.988 0.000 0.004 0.008 0.000
#> GSM1009191     3  0.3214      0.594 0.000 0.016 0.812 0.004 0.164 0.004
#> GSM1009066     6  0.2660      0.924 0.084 0.000 0.000 0.048 0.000 0.868
#> GSM1009080     5  0.6420      0.648 0.000 0.196 0.116 0.040 0.600 0.048
#> GSM1009094     1  0.0622      0.887 0.980 0.000 0.012 0.008 0.000 0.000
#> GSM1009108     5  0.0000      0.810 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM1009122     5  0.3296      0.773 0.000 0.000 0.084 0.036 0.844 0.036
#> GSM1009136     1  0.0622      0.886 0.980 0.000 0.012 0.008 0.000 0.000
#> GSM1009150     1  0.1088      0.881 0.960 0.000 0.024 0.000 0.000 0.016
#> GSM1009164     5  0.4442      0.763 0.000 0.012 0.128 0.020 0.764 0.076
#> GSM1009178     2  0.0935      0.926 0.032 0.964 0.004 0.000 0.000 0.000
#> GSM1009192     3  0.3742      0.684 0.348 0.000 0.648 0.004 0.000 0.000
#> GSM1009067     6  0.2346      0.942 0.124 0.000 0.000 0.008 0.000 0.868
#> GSM1009081     5  0.6420      0.648 0.000 0.196 0.116 0.040 0.600 0.048
#> GSM1009095     1  0.0622      0.887 0.980 0.000 0.012 0.008 0.000 0.000
#> GSM1009109     5  0.0000      0.810 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM1009123     1  0.1901      0.828 0.912 0.000 0.076 0.004 0.000 0.008
#> GSM1009137     4  0.1418      0.977 0.024 0.000 0.000 0.944 0.000 0.032
#> GSM1009151     1  0.3645      0.652 0.740 0.000 0.024 0.000 0.000 0.236
#> GSM1009165     5  0.4442      0.763 0.000 0.012 0.128 0.020 0.764 0.076
#> GSM1009179     2  0.0260      0.966 0.000 0.992 0.000 0.000 0.008 0.000
#> GSM1009193     1  0.3668      0.333 0.668 0.000 0.328 0.004 0.000 0.000
#> GSM1009068     6  0.2431      0.933 0.132 0.000 0.000 0.008 0.000 0.860
#> GSM1009082     5  0.6420      0.648 0.000 0.196 0.116 0.040 0.600 0.048
#> GSM1009096     1  0.0622      0.887 0.980 0.000 0.012 0.008 0.000 0.000
#> GSM1009110     5  0.0000      0.810 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM1009124     3  0.3780      0.806 0.244 0.000 0.732 0.008 0.000 0.016
#> GSM1009138     4  0.1391      0.977 0.016 0.000 0.000 0.944 0.000 0.040
#> GSM1009152     1  0.3645      0.652 0.740 0.000 0.024 0.000 0.000 0.236
#> GSM1009166     5  0.4442      0.763 0.000 0.012 0.128 0.020 0.764 0.076
#> GSM1009180     2  0.0935      0.926 0.032 0.964 0.004 0.000 0.000 0.000
#> GSM1009194     3  0.3214      0.594 0.000 0.016 0.812 0.004 0.164 0.004
#> GSM1009069     6  0.2972      0.871 0.032 0.052 0.000 0.048 0.000 0.868
#> GSM1009083     5  0.6420      0.648 0.000 0.196 0.116 0.040 0.600 0.048
#> GSM1009097     1  0.0622      0.887 0.980 0.000 0.012 0.008 0.000 0.000
#> GSM1009111     5  0.0000      0.810 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM1009125     5  0.3191      0.776 0.000 0.000 0.076 0.036 0.852 0.036
#> GSM1009139     4  0.0922      0.921 0.000 0.004 0.004 0.968 0.024 0.000
#> GSM1009153     1  0.4237      0.274 0.584 0.000 0.020 0.000 0.000 0.396
#> GSM1009167     5  0.4442      0.763 0.000 0.012 0.128 0.020 0.764 0.076
#> GSM1009181     2  0.0405      0.964 0.000 0.988 0.000 0.004 0.008 0.000
#> GSM1009195     5  0.5364      0.704 0.000 0.112 0.092 0.036 0.716 0.044
#> GSM1009070     1  0.2445      0.820 0.872 0.000 0.020 0.000 0.000 0.108
#> GSM1009084     5  0.6420      0.648 0.000 0.196 0.116 0.040 0.600 0.048
#> GSM1009098     1  0.0622      0.887 0.980 0.000 0.012 0.008 0.000 0.000
#> GSM1009112     5  0.0000      0.810 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM1009126     3  0.4252      0.613 0.040 0.000 0.724 0.220 0.000 0.016
#> GSM1009140     4  0.1418      0.977 0.024 0.000 0.000 0.944 0.000 0.032
#> GSM1009154     1  0.3645      0.652 0.740 0.000 0.024 0.000 0.000 0.236
#> GSM1009168     5  0.4442      0.763 0.000 0.012 0.128 0.020 0.764 0.076
#> GSM1009182     2  0.0260      0.966 0.000 0.992 0.000 0.000 0.008 0.000
#> GSM1009196     1  0.2667      0.800 0.852 0.000 0.020 0.000 0.000 0.128
#> GSM1009071     6  0.2609      0.933 0.096 0.000 0.000 0.036 0.000 0.868
#> GSM1009085     5  0.6420      0.648 0.000 0.196 0.116 0.040 0.600 0.048
#> GSM1009099     1  0.0622      0.887 0.980 0.000 0.012 0.008 0.000 0.000
#> GSM1009113     5  0.0000      0.810 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM1009127     1  0.1901      0.828 0.912 0.000 0.076 0.004 0.000 0.008
#> GSM1009141     4  0.1605      0.973 0.016 0.000 0.004 0.936 0.000 0.044
#> GSM1009155     6  0.3315      0.833 0.200 0.000 0.020 0.000 0.000 0.780
#> GSM1009169     5  0.4442      0.763 0.000 0.012 0.128 0.020 0.764 0.076
#> GSM1009183     2  0.0260      0.966 0.000 0.992 0.000 0.000 0.008 0.000
#> GSM1009197     1  0.0458      0.884 0.984 0.000 0.016 0.000 0.000 0.000
#> GSM1009072     6  0.2346      0.942 0.124 0.000 0.000 0.008 0.000 0.868
#> GSM1009086     5  0.6420      0.648 0.000 0.196 0.116 0.040 0.600 0.048
#> GSM1009100     1  0.0622      0.887 0.980 0.000 0.012 0.008 0.000 0.000
#> GSM1009114     5  0.0000      0.810 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM1009128     3  0.3833      0.796 0.272 0.000 0.708 0.004 0.000 0.016
#> GSM1009142     4  0.1536      0.975 0.016 0.000 0.004 0.940 0.000 0.040
#> GSM1009156     1  0.1176      0.880 0.956 0.000 0.024 0.000 0.000 0.020
#> GSM1009170     5  0.4442      0.763 0.000 0.012 0.128 0.020 0.764 0.076
#> GSM1009184     2  0.0260      0.966 0.000 0.992 0.000 0.000 0.008 0.000
#> GSM1009198     3  0.3314      0.812 0.256 0.000 0.740 0.004 0.000 0.000
#> GSM1009073     6  0.2558      0.937 0.104 0.000 0.000 0.028 0.000 0.868
#> GSM1009087     1  0.1421      0.875 0.944 0.000 0.028 0.000 0.000 0.028
#> GSM1009101     1  0.0622      0.887 0.980 0.000 0.012 0.008 0.000 0.000
#> GSM1009115     5  0.0000      0.810 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM1009129     5  0.3191      0.776 0.000 0.000 0.076 0.036 0.852 0.036
#> GSM1009143     4  0.1418      0.977 0.024 0.000 0.000 0.944 0.000 0.032
#> GSM1009157     6  0.3428      0.787 0.024 0.152 0.016 0.000 0.000 0.808
#> GSM1009171     5  0.4442      0.763 0.000 0.012 0.128 0.020 0.764 0.076
#> GSM1009185     1  0.0806      0.884 0.972 0.000 0.020 0.000 0.000 0.008
#> GSM1009199     5  0.5484      0.694 0.000 0.124 0.092 0.036 0.704 0.044
#> GSM1009074     6  0.2346      0.942 0.124 0.000 0.000 0.008 0.000 0.868
#> GSM1009088     1  0.1498      0.873 0.940 0.000 0.028 0.000 0.000 0.032
#> GSM1009102     1  0.0622      0.887 0.980 0.000 0.012 0.008 0.000 0.000
#> GSM1009116     5  0.0000      0.810 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM1009130     5  0.3191      0.776 0.000 0.000 0.076 0.036 0.852 0.036
#> GSM1009144     4  0.1418      0.977 0.024 0.000 0.000 0.944 0.000 0.032
#> GSM1009158     1  0.1088      0.881 0.960 0.000 0.024 0.000 0.000 0.016
#> GSM1009172     5  0.4442      0.763 0.000 0.012 0.128 0.020 0.764 0.076
#> GSM1009186     2  0.0260      0.966 0.000 0.992 0.000 0.000 0.008 0.000
#> GSM1009200     3  0.4056      0.590 0.000 0.000 0.748 0.184 0.064 0.004
#> GSM1009075     6  0.2346      0.942 0.124 0.000 0.000 0.008 0.000 0.868
#> GSM1009089     1  0.0993      0.883 0.964 0.000 0.024 0.000 0.000 0.012
#> GSM1009103     1  0.0622      0.887 0.980 0.000 0.012 0.008 0.000 0.000
#> GSM1009117     5  0.0000      0.810 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM1009131     3  0.3833      0.796 0.272 0.000 0.708 0.004 0.000 0.016
#> GSM1009145     1  0.0622      0.886 0.980 0.000 0.012 0.008 0.000 0.000
#> GSM1009159     1  0.0291      0.886 0.992 0.000 0.004 0.000 0.000 0.004
#> GSM1009173     5  0.4442      0.763 0.000 0.012 0.128 0.020 0.764 0.076
#> GSM1009187     1  0.4660      0.469 0.644 0.028 0.024 0.000 0.000 0.304
#> GSM1009201     3  0.3583      0.544 0.008 0.000 0.728 0.260 0.000 0.004

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

consensus_heatmap(res, k = 2)

plot of chunk tab-ATC-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 temperature(p) time(p) specimen(p) k
#> ATC:skmeans 138          0.582   0.620    1.05e-13 2
#> ATC:skmeans 136          0.907   0.960    2.99e-29 3
#> ATC:skmeans 123          0.990   1.000    1.20e-46 4
#> ATC:skmeans 129          0.973   1.000    6.92e-57 5
#> ATC:skmeans 136          1.000   0.999    1.73e-78 6

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


ATC:pam**

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

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

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

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

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

collect_plots(res)

plot of chunk ATC-pam-collect-plots

The plots are:

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

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

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

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

select_partition_number(res)

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

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

get_stats(res)
#>   k 1-PAC mean_silhouette concordance area_increased  Rand Jaccard
#> 2 2 1.000           0.985       0.994         0.4974 0.503   0.503
#> 3 3 0.816           0.877       0.949         0.2350 0.799   0.630
#> 4 4 0.844           0.920       0.951         0.0837 0.947   0.865
#> 5 5 0.753           0.800       0.833         0.1418 0.851   0.585
#> 6 6 0.855           0.897       0.946         0.0706 0.840   0.441

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
#> GSM1009062     1  0.0000      0.995 1.000 0.000
#> GSM1009076     2  0.0000      0.993 0.000 1.000
#> GSM1009090     1  0.0000      0.995 1.000 0.000
#> GSM1009104     2  0.0000      0.993 0.000 1.000
#> GSM1009118     2  0.0000      0.993 0.000 1.000
#> GSM1009132     2  0.0000      0.993 0.000 1.000
#> GSM1009146     1  0.0000      0.995 1.000 0.000
#> GSM1009160     2  0.0000      0.993 0.000 1.000
#> GSM1009174     2  0.0000      0.993 0.000 1.000
#> GSM1009188     1  0.0000      0.995 1.000 0.000
#> GSM1009063     1  0.0000      0.995 1.000 0.000
#> GSM1009077     2  0.0000      0.993 0.000 1.000
#> GSM1009091     1  0.0000      0.995 1.000 0.000
#> GSM1009105     2  0.0000      0.993 0.000 1.000
#> GSM1009119     1  0.0000      0.995 1.000 0.000
#> GSM1009133     1  0.0000      0.995 1.000 0.000
#> GSM1009147     1  0.0000      0.995 1.000 0.000
#> GSM1009161     2  0.0000      0.993 0.000 1.000
#> GSM1009175     2  0.0000      0.993 0.000 1.000
#> GSM1009189     1  0.0000      0.995 1.000 0.000
#> GSM1009064     1  0.0000      0.995 1.000 0.000
#> GSM1009078     1  0.0000      0.995 1.000 0.000
#> GSM1009092     1  0.0000      0.995 1.000 0.000
#> GSM1009106     2  0.0000      0.993 0.000 1.000
#> GSM1009120     1  0.0000      0.995 1.000 0.000
#> GSM1009134     1  0.0000      0.995 1.000 0.000
#> GSM1009148     1  0.0000      0.995 1.000 0.000
#> GSM1009162     2  0.0000      0.993 0.000 1.000
#> GSM1009176     2  0.0000      0.993 0.000 1.000
#> GSM1009190     1  0.0000      0.995 1.000 0.000
#> GSM1009065     1  0.0000      0.995 1.000 0.000
#> GSM1009079     2  0.0000      0.993 0.000 1.000
#> GSM1009093     1  0.0000      0.995 1.000 0.000
#> GSM1009107     2  0.0000      0.993 0.000 1.000
#> GSM1009121     2  0.0000      0.993 0.000 1.000
#> GSM1009135     1  0.0000      0.995 1.000 0.000
#> GSM1009149     1  0.0000      0.995 1.000 0.000
#> GSM1009163     2  0.0000      0.993 0.000 1.000
#> GSM1009177     2  0.0000      0.993 0.000 1.000
#> GSM1009191     2  0.0000      0.993 0.000 1.000
#> GSM1009066     1  0.0000      0.995 1.000 0.000
#> GSM1009080     2  0.0000      0.993 0.000 1.000
#> GSM1009094     1  0.0000      0.995 1.000 0.000
#> GSM1009108     2  0.0000      0.993 0.000 1.000
#> GSM1009122     2  0.0000      0.993 0.000 1.000
#> GSM1009136     1  0.0000      0.995 1.000 0.000
#> GSM1009150     1  0.0000      0.995 1.000 0.000
#> GSM1009164     2  0.0000      0.993 0.000 1.000
#> GSM1009178     1  0.0376      0.991 0.996 0.004
#> GSM1009192     1  0.0000      0.995 1.000 0.000
#> GSM1009067     1  0.0000      0.995 1.000 0.000
#> GSM1009081     2  0.0000      0.993 0.000 1.000
#> GSM1009095     1  0.0000      0.995 1.000 0.000
#> GSM1009109     2  0.0000      0.993 0.000 1.000
#> GSM1009123     1  0.0000      0.995 1.000 0.000
#> GSM1009137     1  0.0000      0.995 1.000 0.000
#> GSM1009151     1  0.0000      0.995 1.000 0.000
#> GSM1009165     2  0.0000      0.993 0.000 1.000
#> GSM1009179     2  0.0000      0.993 0.000 1.000
#> GSM1009193     1  0.0000      0.995 1.000 0.000
#> GSM1009068     1  0.0000      0.995 1.000 0.000
#> GSM1009082     2  0.0000      0.993 0.000 1.000
#> GSM1009096     1  0.0000      0.995 1.000 0.000
#> GSM1009110     2  0.0000      0.993 0.000 1.000
#> GSM1009124     2  0.9286      0.473 0.344 0.656
#> GSM1009138     1  0.0000      0.995 1.000 0.000
#> GSM1009152     1  0.0000      0.995 1.000 0.000
#> GSM1009166     2  0.0000      0.993 0.000 1.000
#> GSM1009180     1  0.0376      0.991 0.996 0.004
#> GSM1009194     2  0.0000      0.993 0.000 1.000
#> GSM1009069     2  0.4298      0.900 0.088 0.912
#> GSM1009083     2  0.0000      0.993 0.000 1.000
#> GSM1009097     1  0.0000      0.995 1.000 0.000
#> GSM1009111     2  0.0000      0.993 0.000 1.000
#> GSM1009125     2  0.0000      0.993 0.000 1.000
#> GSM1009139     2  0.0000      0.993 0.000 1.000
#> GSM1009153     1  0.0000      0.995 1.000 0.000
#> GSM1009167     2  0.0000      0.993 0.000 1.000
#> GSM1009181     2  0.0000      0.993 0.000 1.000
#> GSM1009195     2  0.0000      0.993 0.000 1.000
#> GSM1009070     1  0.0000      0.995 1.000 0.000
#> GSM1009084     2  0.0000      0.993 0.000 1.000
#> GSM1009098     1  0.0000      0.995 1.000 0.000
#> GSM1009112     2  0.0000      0.993 0.000 1.000
#> GSM1009126     1  0.1633      0.971 0.976 0.024
#> GSM1009140     1  0.0000      0.995 1.000 0.000
#> GSM1009154     1  0.0000      0.995 1.000 0.000
#> GSM1009168     2  0.0000      0.993 0.000 1.000
#> GSM1009182     2  0.0000      0.993 0.000 1.000
#> GSM1009196     1  0.0000      0.995 1.000 0.000
#> GSM1009071     1  0.0000      0.995 1.000 0.000
#> GSM1009085     2  0.0000      0.993 0.000 1.000
#> GSM1009099     1  0.0000      0.995 1.000 0.000
#> GSM1009113     2  0.0000      0.993 0.000 1.000
#> GSM1009127     1  0.0000      0.995 1.000 0.000
#> GSM1009141     1  0.0000      0.995 1.000 0.000
#> GSM1009155     1  0.0000      0.995 1.000 0.000
#> GSM1009169     2  0.0000      0.993 0.000 1.000
#> GSM1009183     2  0.0000      0.993 0.000 1.000
#> GSM1009197     1  0.0000      0.995 1.000 0.000
#> GSM1009072     1  0.0000      0.995 1.000 0.000
#> GSM1009086     2  0.0000      0.993 0.000 1.000
#> GSM1009100     1  0.0000      0.995 1.000 0.000
#> GSM1009114     2  0.0000      0.993 0.000 1.000
#> GSM1009128     1  0.0000      0.995 1.000 0.000
#> GSM1009142     1  0.0672      0.987 0.992 0.008
#> GSM1009156     1  0.0000      0.995 1.000 0.000
#> GSM1009170     2  0.0000      0.993 0.000 1.000
#> GSM1009184     2  0.0000      0.993 0.000 1.000
#> GSM1009198     1  0.0000      0.995 1.000 0.000
#> GSM1009073     1  0.0000      0.995 1.000 0.000
#> GSM1009087     1  0.0000      0.995 1.000 0.000
#> GSM1009101     1  0.0000      0.995 1.000 0.000
#> GSM1009115     2  0.0000      0.993 0.000 1.000
#> GSM1009129     2  0.0000      0.993 0.000 1.000
#> GSM1009143     1  0.0000      0.995 1.000 0.000
#> GSM1009157     1  0.0000      0.995 1.000 0.000
#> GSM1009171     2  0.0000      0.993 0.000 1.000
#> GSM1009185     1  0.0000      0.995 1.000 0.000
#> GSM1009199     2  0.0000      0.993 0.000 1.000
#> GSM1009074     1  0.0000      0.995 1.000 0.000
#> GSM1009088     1  0.0000      0.995 1.000 0.000
#> GSM1009102     1  0.0000      0.995 1.000 0.000
#> GSM1009116     2  0.0000      0.993 0.000 1.000
#> GSM1009130     2  0.0000      0.993 0.000 1.000
#> GSM1009144     1  0.0000      0.995 1.000 0.000
#> GSM1009158     1  0.0000      0.995 1.000 0.000
#> GSM1009172     2  0.0000      0.993 0.000 1.000
#> GSM1009186     2  0.0000      0.993 0.000 1.000
#> GSM1009200     1  0.9460      0.424 0.636 0.364
#> GSM1009075     1  0.0000      0.995 1.000 0.000
#> GSM1009089     1  0.0000      0.995 1.000 0.000
#> GSM1009103     1  0.0000      0.995 1.000 0.000
#> GSM1009117     2  0.0000      0.993 0.000 1.000
#> GSM1009131     1  0.0672      0.987 0.992 0.008
#> GSM1009145     1  0.0000      0.995 1.000 0.000
#> GSM1009159     1  0.0000      0.995 1.000 0.000
#> GSM1009173     2  0.0000      0.993 0.000 1.000
#> GSM1009187     1  0.0000      0.995 1.000 0.000
#> GSM1009201     1  0.0000      0.995 1.000 0.000

show/hide code output

cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#>            class entropy silhouette    p1    p2    p3
#> GSM1009062     1  0.0000     0.9925 1.000 0.000 0.000
#> GSM1009076     2  0.0237     0.8708 0.000 0.996 0.004
#> GSM1009090     1  0.0000     0.9925 1.000 0.000 0.000
#> GSM1009104     2  0.5760     0.4900 0.000 0.672 0.328
#> GSM1009118     2  0.0000     0.8729 0.000 1.000 0.000
#> GSM1009132     2  0.0000     0.8729 0.000 1.000 0.000
#> GSM1009146     1  0.0000     0.9925 1.000 0.000 0.000
#> GSM1009160     3  0.0000     0.8814 0.000 0.000 1.000
#> GSM1009174     2  0.0000     0.8729 0.000 1.000 0.000
#> GSM1009188     1  0.0000     0.9925 1.000 0.000 0.000
#> GSM1009063     1  0.0000     0.9925 1.000 0.000 0.000
#> GSM1009077     2  0.0000     0.8729 0.000 1.000 0.000
#> GSM1009091     1  0.0000     0.9925 1.000 0.000 0.000
#> GSM1009105     3  0.5529     0.5974 0.000 0.296 0.704
#> GSM1009119     1  0.0000     0.9925 1.000 0.000 0.000
#> GSM1009133     1  0.0000     0.9925 1.000 0.000 0.000
#> GSM1009147     1  0.0000     0.9925 1.000 0.000 0.000
#> GSM1009161     3  0.0000     0.8814 0.000 0.000 1.000
#> GSM1009175     2  0.0000     0.8729 0.000 1.000 0.000
#> GSM1009189     1  0.0237     0.9896 0.996 0.004 0.000
#> GSM1009064     2  0.6244     0.2379 0.440 0.560 0.000
#> GSM1009078     1  0.0000     0.9925 1.000 0.000 0.000
#> GSM1009092     1  0.0000     0.9925 1.000 0.000 0.000
#> GSM1009106     3  0.3686     0.8217 0.000 0.140 0.860
#> GSM1009120     1  0.0000     0.9925 1.000 0.000 0.000
#> GSM1009134     1  0.0000     0.9925 1.000 0.000 0.000
#> GSM1009148     1  0.0000     0.9925 1.000 0.000 0.000
#> GSM1009162     3  0.0000     0.8814 0.000 0.000 1.000
#> GSM1009176     2  0.0000     0.8729 0.000 1.000 0.000
#> GSM1009190     1  0.4931     0.6894 0.768 0.232 0.000
#> GSM1009065     1  0.0237     0.9896 0.996 0.004 0.000
#> GSM1009079     2  0.0000     0.8729 0.000 1.000 0.000
#> GSM1009093     1  0.0000     0.9925 1.000 0.000 0.000
#> GSM1009107     3  0.3686     0.8217 0.000 0.140 0.860
#> GSM1009121     2  0.0000     0.8729 0.000 1.000 0.000
#> GSM1009135     1  0.0000     0.9925 1.000 0.000 0.000
#> GSM1009149     1  0.0000     0.9925 1.000 0.000 0.000
#> GSM1009163     3  0.0000     0.8814 0.000 0.000 1.000
#> GSM1009177     2  0.0000     0.8729 0.000 1.000 0.000
#> GSM1009191     2  0.0000     0.8729 0.000 1.000 0.000
#> GSM1009066     1  0.0237     0.9896 0.996 0.004 0.000
#> GSM1009080     2  0.5760     0.4900 0.000 0.672 0.328
#> GSM1009094     1  0.0000     0.9925 1.000 0.000 0.000
#> GSM1009108     3  0.3619     0.8242 0.000 0.136 0.864
#> GSM1009122     2  0.0237     0.8708 0.000 0.996 0.004
#> GSM1009136     1  0.0000     0.9925 1.000 0.000 0.000
#> GSM1009150     1  0.0000     0.9925 1.000 0.000 0.000
#> GSM1009164     3  0.0000     0.8814 0.000 0.000 1.000
#> GSM1009178     2  0.1643     0.8414 0.044 0.956 0.000
#> GSM1009192     1  0.0000     0.9925 1.000 0.000 0.000
#> GSM1009067     1  0.0000     0.9925 1.000 0.000 0.000
#> GSM1009081     2  0.0237     0.8708 0.000 0.996 0.004
#> GSM1009095     1  0.0000     0.9925 1.000 0.000 0.000
#> GSM1009109     2  0.5760     0.4900 0.000 0.672 0.328
#> GSM1009123     1  0.0000     0.9925 1.000 0.000 0.000
#> GSM1009137     1  0.0237     0.9896 0.996 0.004 0.000
#> GSM1009151     1  0.0000     0.9925 1.000 0.000 0.000
#> GSM1009165     3  0.0000     0.8814 0.000 0.000 1.000
#> GSM1009179     2  0.0000     0.8729 0.000 1.000 0.000
#> GSM1009193     1  0.0000     0.9925 1.000 0.000 0.000
#> GSM1009068     1  0.0000     0.9925 1.000 0.000 0.000
#> GSM1009082     2  0.0237     0.8708 0.000 0.996 0.004
#> GSM1009096     1  0.0000     0.9925 1.000 0.000 0.000
#> GSM1009110     3  0.1643     0.8675 0.000 0.044 0.956
#> GSM1009124     2  0.2959     0.7909 0.100 0.900 0.000
#> GSM1009138     1  0.0000     0.9925 1.000 0.000 0.000
#> GSM1009152     1  0.0000     0.9925 1.000 0.000 0.000
#> GSM1009166     3  0.0000     0.8814 0.000 0.000 1.000
#> GSM1009180     2  0.1643     0.8414 0.044 0.956 0.000
#> GSM1009194     2  0.0000     0.8729 0.000 1.000 0.000
#> GSM1009069     2  0.0000     0.8729 0.000 1.000 0.000
#> GSM1009083     2  0.0000     0.8729 0.000 1.000 0.000
#> GSM1009097     1  0.0000     0.9925 1.000 0.000 0.000
#> GSM1009111     3  0.3686     0.8217 0.000 0.140 0.860
#> GSM1009125     2  0.5760     0.4900 0.000 0.672 0.328
#> GSM1009139     2  0.0000     0.8729 0.000 1.000 0.000
#> GSM1009153     1  0.0000     0.9925 1.000 0.000 0.000
#> GSM1009167     3  0.0000     0.8814 0.000 0.000 1.000
#> GSM1009181     2  0.0000     0.8729 0.000 1.000 0.000
#> GSM1009195     2  0.0000     0.8729 0.000 1.000 0.000
#> GSM1009070     1  0.0000     0.9925 1.000 0.000 0.000
#> GSM1009084     2  0.0000     0.8729 0.000 1.000 0.000
#> GSM1009098     1  0.0000     0.9925 1.000 0.000 0.000
#> GSM1009112     2  0.5760     0.4900 0.000 0.672 0.328
#> GSM1009126     2  0.3686     0.7485 0.140 0.860 0.000
#> GSM1009140     1  0.0000     0.9925 1.000 0.000 0.000
#> GSM1009154     1  0.0000     0.9925 1.000 0.000 0.000
#> GSM1009168     3  0.0000     0.8814 0.000 0.000 1.000
#> GSM1009182     2  0.0000     0.8729 0.000 1.000 0.000
#> GSM1009196     1  0.0000     0.9925 1.000 0.000 0.000
#> GSM1009071     1  0.0000     0.9925 1.000 0.000 0.000
#> GSM1009085     2  0.0000     0.8729 0.000 1.000 0.000
#> GSM1009099     1  0.0000     0.9925 1.000 0.000 0.000
#> GSM1009113     3  0.3686     0.8217 0.000 0.140 0.860
#> GSM1009127     1  0.0000     0.9925 1.000 0.000 0.000
#> GSM1009141     2  0.3686     0.7485 0.140 0.860 0.000
#> GSM1009155     1  0.0000     0.9925 1.000 0.000 0.000
#> GSM1009169     3  0.5760     0.4862 0.000 0.328 0.672
#> GSM1009183     2  0.0000     0.8729 0.000 1.000 0.000
#> GSM1009197     1  0.0000     0.9925 1.000 0.000 0.000
#> GSM1009072     1  0.0000     0.9925 1.000 0.000 0.000
#> GSM1009086     2  0.0237     0.8708 0.000 0.996 0.004
#> GSM1009100     1  0.0000     0.9925 1.000 0.000 0.000
#> GSM1009114     2  0.5760     0.4900 0.000 0.672 0.328
#> GSM1009128     2  0.4062     0.7171 0.164 0.836 0.000
#> GSM1009142     2  0.3686     0.7485 0.140 0.860 0.000
#> GSM1009156     1  0.0237     0.9896 0.996 0.004 0.000
#> GSM1009170     3  0.0000     0.8814 0.000 0.000 1.000
#> GSM1009184     2  0.0000     0.8729 0.000 1.000 0.000
#> GSM1009198     1  0.0000     0.9925 1.000 0.000 0.000
#> GSM1009073     1  0.0000     0.9925 1.000 0.000 0.000
#> GSM1009087     1  0.0237     0.9896 0.996 0.004 0.000
#> GSM1009101     1  0.0000     0.9925 1.000 0.000 0.000
#> GSM1009115     2  0.5785     0.4816 0.000 0.668 0.332
#> GSM1009129     2  0.5760     0.4900 0.000 0.672 0.328
#> GSM1009143     1  0.0000     0.9925 1.000 0.000 0.000
#> GSM1009157     2  0.3686     0.7485 0.140 0.860 0.000
#> GSM1009171     3  0.0000     0.8814 0.000 0.000 1.000
#> GSM1009185     1  0.0237     0.9896 0.996 0.004 0.000
#> GSM1009199     2  0.0000     0.8729 0.000 1.000 0.000
#> GSM1009074     1  0.0000     0.9925 1.000 0.000 0.000
#> GSM1009088     1  0.1643     0.9437 0.956 0.044 0.000
#> GSM1009102     1  0.0000     0.9925 1.000 0.000 0.000
#> GSM1009116     3  0.6305     0.0659 0.000 0.484 0.516
#> GSM1009130     2  0.0000     0.8729 0.000 1.000 0.000
#> GSM1009144     1  0.0237     0.9896 0.996 0.004 0.000
#> GSM1009158     1  0.0000     0.9925 1.000 0.000 0.000
#> GSM1009172     3  0.0000     0.8814 0.000 0.000 1.000
#> GSM1009186     2  0.0000     0.8729 0.000 1.000 0.000
#> GSM1009200     2  0.2448     0.8130 0.076 0.924 0.000
#> GSM1009075     1  0.0000     0.9925 1.000 0.000 0.000
#> GSM1009089     1  0.0000     0.9925 1.000 0.000 0.000
#> GSM1009103     1  0.0000     0.9925 1.000 0.000 0.000
#> GSM1009117     2  0.5760     0.4900 0.000 0.672 0.328
#> GSM1009131     2  0.3816     0.7386 0.148 0.852 0.000
#> GSM1009145     1  0.0000     0.9925 1.000 0.000 0.000
#> GSM1009159     1  0.0000     0.9925 1.000 0.000 0.000
#> GSM1009173     3  0.5706     0.5004 0.000 0.320 0.680
#> GSM1009187     1  0.0237     0.9896 0.996 0.004 0.000
#> GSM1009201     1  0.3551     0.8374 0.868 0.132 0.000

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>            class entropy silhouette    p1    p2    p3    p4
#> GSM1009062     1  0.0000      0.960 1.000 0.000 0.000 0.000
#> GSM1009076     2  0.3123      0.875 0.000 0.844 0.000 0.156
#> GSM1009090     1  0.2011      0.918 0.920 0.080 0.000 0.000
#> GSM1009104     4  0.0469      0.947 0.000 0.000 0.012 0.988
#> GSM1009118     2  0.3074      0.878 0.000 0.848 0.000 0.152
#> GSM1009132     2  0.0000      0.900 0.000 1.000 0.000 0.000
#> GSM1009146     1  0.0000      0.960 1.000 0.000 0.000 0.000
#> GSM1009160     3  0.0000      0.997 0.000 0.000 1.000 0.000
#> GSM1009174     2  0.0817      0.902 0.000 0.976 0.000 0.024
#> GSM1009188     1  0.0707      0.952 0.980 0.020 0.000 0.000
#> GSM1009063     1  0.0000      0.960 1.000 0.000 0.000 0.000
#> GSM1009077     2  0.3074      0.878 0.000 0.848 0.000 0.152
#> GSM1009091     1  0.0000      0.960 1.000 0.000 0.000 0.000
#> GSM1009105     4  0.0817      0.942 0.000 0.000 0.024 0.976
#> GSM1009119     1  0.3024      0.872 0.852 0.148 0.000 0.000
#> GSM1009133     1  0.3074      0.868 0.848 0.152 0.000 0.000
#> GSM1009147     1  0.1867      0.923 0.928 0.072 0.000 0.000
#> GSM1009161     3  0.0000      0.997 0.000 0.000 1.000 0.000
#> GSM1009175     2  0.0707      0.902 0.000 0.980 0.000 0.020
#> GSM1009189     1  0.3123      0.865 0.844 0.156 0.000 0.000
#> GSM1009064     2  0.4898      0.178 0.416 0.584 0.000 0.000
#> GSM1009078     1  0.3074      0.868 0.848 0.152 0.000 0.000
#> GSM1009092     1  0.0000      0.960 1.000 0.000 0.000 0.000
#> GSM1009106     4  0.3074      0.838 0.000 0.000 0.152 0.848
#> GSM1009120     1  0.0000      0.960 1.000 0.000 0.000 0.000
#> GSM1009134     1  0.0000      0.960 1.000 0.000 0.000 0.000
#> GSM1009148     1  0.0000      0.960 1.000 0.000 0.000 0.000
#> GSM1009162     3  0.0000      0.997 0.000 0.000 1.000 0.000
#> GSM1009176     2  0.3074      0.878 0.000 0.848 0.000 0.152
#> GSM1009190     1  0.4164      0.732 0.736 0.264 0.000 0.000
#> GSM1009065     1  0.1940      0.921 0.924 0.076 0.000 0.000
#> GSM1009079     2  0.3074      0.878 0.000 0.848 0.000 0.152
#> GSM1009093     1  0.0000      0.960 1.000 0.000 0.000 0.000
#> GSM1009107     4  0.2868      0.855 0.000 0.000 0.136 0.864
#> GSM1009121     2  0.0000      0.900 0.000 1.000 0.000 0.000
#> GSM1009135     1  0.2081      0.918 0.916 0.084 0.000 0.000
#> GSM1009149     1  0.0000      0.960 1.000 0.000 0.000 0.000
#> GSM1009163     3  0.0000      0.997 0.000 0.000 1.000 0.000
#> GSM1009177     2  0.3074      0.878 0.000 0.848 0.000 0.152
#> GSM1009191     2  0.0000      0.900 0.000 1.000 0.000 0.000
#> GSM1009066     1  0.1940      0.921 0.924 0.076 0.000 0.000
#> GSM1009080     2  0.4149      0.847 0.000 0.804 0.028 0.168
#> GSM1009094     1  0.0000      0.960 1.000 0.000 0.000 0.000
#> GSM1009108     4  0.3074      0.838 0.000 0.000 0.152 0.848
#> GSM1009122     2  0.3123      0.875 0.000 0.844 0.000 0.156
#> GSM1009136     1  0.0000      0.960 1.000 0.000 0.000 0.000
#> GSM1009150     1  0.0000      0.960 1.000 0.000 0.000 0.000
#> GSM1009164     3  0.0000      0.997 0.000 0.000 1.000 0.000
#> GSM1009178     2  0.0000      0.900 0.000 1.000 0.000 0.000
#> GSM1009192     1  0.0921      0.949 0.972 0.028 0.000 0.000
#> GSM1009067     1  0.0000      0.960 1.000 0.000 0.000 0.000
#> GSM1009081     2  0.3123      0.875 0.000 0.844 0.000 0.156
#> GSM1009095     1  0.0000      0.960 1.000 0.000 0.000 0.000
#> GSM1009109     4  0.0469      0.947 0.000 0.000 0.012 0.988
#> GSM1009123     1  0.0000      0.960 1.000 0.000 0.000 0.000
#> GSM1009137     1  0.3074      0.868 0.848 0.152 0.000 0.000
#> GSM1009151     1  0.0000      0.960 1.000 0.000 0.000 0.000
#> GSM1009165     3  0.0000      0.997 0.000 0.000 1.000 0.000
#> GSM1009179     2  0.0000      0.900 0.000 1.000 0.000 0.000
#> GSM1009193     1  0.0707      0.952 0.980 0.020 0.000 0.000
#> GSM1009068     1  0.0000      0.960 1.000 0.000 0.000 0.000
#> GSM1009082     2  0.3074      0.878 0.000 0.848 0.000 0.152
#> GSM1009096     1  0.0000      0.960 1.000 0.000 0.000 0.000
#> GSM1009110     4  0.3074      0.838 0.000 0.000 0.152 0.848
#> GSM1009124     2  0.0000      0.900 0.000 1.000 0.000 0.000
#> GSM1009138     1  0.0000      0.960 1.000 0.000 0.000 0.000
#> GSM1009152     1  0.0000      0.960 1.000 0.000 0.000 0.000
#> GSM1009166     3  0.0000      0.997 0.000 0.000 1.000 0.000
#> GSM1009180     2  0.0000      0.900 0.000 1.000 0.000 0.000
#> GSM1009194     2  0.0000      0.900 0.000 1.000 0.000 0.000
#> GSM1009069     2  0.0469      0.902 0.000 0.988 0.000 0.012
#> GSM1009083     2  0.3074      0.878 0.000 0.848 0.000 0.152
#> GSM1009097     1  0.0000      0.960 1.000 0.000 0.000 0.000
#> GSM1009111     4  0.0469      0.947 0.000 0.000 0.012 0.988
#> GSM1009125     4  0.0336      0.944 0.000 0.000 0.008 0.992
#> GSM1009139     2  0.0336      0.901 0.000 0.992 0.000 0.008
#> GSM1009153     1  0.0000      0.960 1.000 0.000 0.000 0.000
#> GSM1009167     3  0.0000      0.997 0.000 0.000 1.000 0.000
#> GSM1009181     2  0.3074      0.878 0.000 0.848 0.000 0.152
#> GSM1009195     2  0.3074      0.878 0.000 0.848 0.000 0.152
#> GSM1009070     1  0.0000      0.960 1.000 0.000 0.000 0.000
#> GSM1009084     2  0.3123      0.875 0.000 0.844 0.000 0.156
#> GSM1009098     1  0.0000      0.960 1.000 0.000 0.000 0.000
#> GSM1009112     4  0.0469      0.947 0.000 0.000 0.012 0.988
#> GSM1009126     2  0.0000      0.900 0.000 1.000 0.000 0.000
#> GSM1009140     1  0.0000      0.960 1.000 0.000 0.000 0.000
#> GSM1009154     1  0.0000      0.960 1.000 0.000 0.000 0.000
#> GSM1009168     3  0.0000      0.997 0.000 0.000 1.000 0.000
#> GSM1009182     2  0.0336      0.901 0.000 0.992 0.000 0.008
#> GSM1009196     1  0.0469      0.955 0.988 0.012 0.000 0.000
#> GSM1009071     1  0.0000      0.960 1.000 0.000 0.000 0.000
#> GSM1009085     2  0.3074      0.878 0.000 0.848 0.000 0.152
#> GSM1009099     1  0.0000      0.960 1.000 0.000 0.000 0.000
#> GSM1009113     4  0.1474      0.925 0.000 0.000 0.052 0.948
#> GSM1009127     1  0.0000      0.960 1.000 0.000 0.000 0.000
#> GSM1009141     2  0.0000      0.900 0.000 1.000 0.000 0.000
#> GSM1009155     1  0.1867      0.923 0.928 0.072 0.000 0.000
#> GSM1009169     3  0.0469      0.981 0.000 0.012 0.988 0.000
#> GSM1009183     2  0.0707      0.902 0.000 0.980 0.000 0.020
#> GSM1009197     1  0.0000      0.960 1.000 0.000 0.000 0.000
#> GSM1009072     1  0.0000      0.960 1.000 0.000 0.000 0.000
#> GSM1009086     2  0.3123      0.875 0.000 0.844 0.000 0.156
#> GSM1009100     1  0.0000      0.960 1.000 0.000 0.000 0.000
#> GSM1009114     4  0.0469      0.947 0.000 0.000 0.012 0.988
#> GSM1009128     2  0.1792      0.828 0.068 0.932 0.000 0.000
#> GSM1009142     2  0.0000      0.900 0.000 1.000 0.000 0.000
#> GSM1009156     1  0.1867      0.923 0.928 0.072 0.000 0.000
#> GSM1009170     3  0.0000      0.997 0.000 0.000 1.000 0.000
#> GSM1009184     2  0.0707      0.902 0.000 0.980 0.000 0.020
#> GSM1009198     1  0.1118      0.944 0.964 0.036 0.000 0.000
#> GSM1009073     1  0.0000      0.960 1.000 0.000 0.000 0.000
#> GSM1009087     1  0.3123      0.865 0.844 0.156 0.000 0.000
#> GSM1009101     1  0.0000      0.960 1.000 0.000 0.000 0.000
#> GSM1009115     4  0.0469      0.947 0.000 0.000 0.012 0.988
#> GSM1009129     4  0.0000      0.936 0.000 0.000 0.000 1.000
#> GSM1009143     1  0.0000      0.960 1.000 0.000 0.000 0.000
#> GSM1009157     2  0.0188      0.897 0.004 0.996 0.000 0.000
#> GSM1009171     3  0.0000      0.997 0.000 0.000 1.000 0.000
#> GSM1009185     1  0.2973      0.873 0.856 0.144 0.000 0.000
#> GSM1009199     2  0.3074      0.878 0.000 0.848 0.000 0.152
#> GSM1009074     1  0.0000      0.960 1.000 0.000 0.000 0.000
#> GSM1009088     1  0.3123      0.865 0.844 0.156 0.000 0.000
#> GSM1009102     1  0.0000      0.960 1.000 0.000 0.000 0.000
#> GSM1009116     4  0.0469      0.947 0.000 0.000 0.012 0.988
#> GSM1009130     2  0.3837      0.813 0.000 0.776 0.000 0.224
#> GSM1009144     1  0.3123      0.865 0.844 0.156 0.000 0.000
#> GSM1009158     1  0.0000      0.960 1.000 0.000 0.000 0.000
#> GSM1009172     3  0.0000      0.997 0.000 0.000 1.000 0.000
#> GSM1009186     2  0.0707      0.902 0.000 0.980 0.000 0.020
#> GSM1009200     2  0.0000      0.900 0.000 1.000 0.000 0.000
#> GSM1009075     1  0.0000      0.960 1.000 0.000 0.000 0.000
#> GSM1009089     1  0.0000      0.960 1.000 0.000 0.000 0.000
#> GSM1009103     1  0.0000      0.960 1.000 0.000 0.000 0.000
#> GSM1009117     4  0.0469      0.947 0.000 0.000 0.012 0.988
#> GSM1009131     2  0.0707      0.884 0.020 0.980 0.000 0.000
#> GSM1009145     1  0.0000      0.960 1.000 0.000 0.000 0.000
#> GSM1009159     1  0.0000      0.960 1.000 0.000 0.000 0.000
#> GSM1009173     3  0.0469      0.984 0.000 0.000 0.988 0.012
#> GSM1009187     1  0.2868      0.878 0.864 0.136 0.000 0.000
#> GSM1009201     1  0.3569      0.822 0.804 0.196 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
#> GSM1009062     1  0.4150      0.782 0.612 0.000  0 0.388 0.000
#> GSM1009076     2  0.0000      0.779 0.000 1.000  0 0.000 0.000
#> GSM1009090     4  0.3816      0.546 0.304 0.000  0 0.696 0.000
#> GSM1009104     5  0.0000      0.956 0.000 0.000  0 0.000 1.000
#> GSM1009118     2  0.0000      0.779 0.000 1.000  0 0.000 0.000
#> GSM1009132     2  0.4114      0.801 0.376 0.624  0 0.000 0.000
#> GSM1009146     1  0.4150      0.782 0.612 0.000  0 0.388 0.000
#> GSM1009160     3  0.0000      1.000 0.000 0.000  1 0.000 0.000
#> GSM1009174     2  0.3395      0.812 0.236 0.764  0 0.000 0.000
#> GSM1009188     4  0.2127      0.799 0.108 0.000  0 0.892 0.000
#> GSM1009063     1  0.4114      0.786 0.624 0.000  0 0.376 0.000
#> GSM1009077     2  0.0000      0.779 0.000 1.000  0 0.000 0.000
#> GSM1009091     4  0.0000      0.887 0.000 0.000  0 1.000 0.000
#> GSM1009105     5  0.0000      0.956 0.000 0.000  0 0.000 1.000
#> GSM1009119     1  0.3109      0.723 0.800 0.000  0 0.200 0.000
#> GSM1009133     4  0.3109      0.688 0.200 0.000  0 0.800 0.000
#> GSM1009147     1  0.3837      0.784 0.692 0.000  0 0.308 0.000
#> GSM1009161     3  0.0000      1.000 0.000 0.000  1 0.000 0.000
#> GSM1009175     2  0.3684      0.813 0.280 0.720  0 0.000 0.000
#> GSM1009189     1  0.3003      0.724 0.812 0.000  0 0.188 0.000
#> GSM1009064     1  0.1965      0.637 0.904 0.000  0 0.096 0.000
#> GSM1009078     1  0.3003      0.724 0.812 0.000  0 0.188 0.000
#> GSM1009092     4  0.0000      0.887 0.000 0.000  0 1.000 0.000
#> GSM1009106     5  0.0000      0.956 0.000 0.000  0 0.000 1.000
#> GSM1009120     4  0.0000      0.887 0.000 0.000  0 1.000 0.000
#> GSM1009134     4  0.0404      0.879 0.012 0.000  0 0.988 0.000
#> GSM1009148     1  0.4114      0.786 0.624 0.000  0 0.376 0.000
#> GSM1009162     3  0.0000      1.000 0.000 0.000  1 0.000 0.000
#> GSM1009176     2  0.0000      0.779 0.000 1.000  0 0.000 0.000
#> GSM1009190     1  0.0000      0.566 1.000 0.000  0 0.000 0.000
#> GSM1009065     1  0.3837      0.784 0.692 0.000  0 0.308 0.000
#> GSM1009079     2  0.0000      0.779 0.000 1.000  0 0.000 0.000
#> GSM1009093     4  0.0000      0.887 0.000 0.000  0 1.000 0.000
#> GSM1009107     5  0.0000      0.956 0.000 0.000  0 0.000 1.000
#> GSM1009121     2  0.4114      0.801 0.376 0.624  0 0.000 0.000
#> GSM1009135     4  0.2471      0.769 0.136 0.000  0 0.864 0.000
#> GSM1009149     1  0.4150      0.782 0.612 0.000  0 0.388 0.000
#> GSM1009163     3  0.0000      1.000 0.000 0.000  1 0.000 0.000
#> GSM1009177     2  0.3003      0.807 0.188 0.812  0 0.000 0.000
#> GSM1009191     2  0.4150      0.796 0.388 0.612  0 0.000 0.000
#> GSM1009066     1  0.3837      0.784 0.692 0.000  0 0.308 0.000
#> GSM1009080     2  0.0000      0.779 0.000 1.000  0 0.000 0.000
#> GSM1009094     4  0.0162      0.885 0.004 0.000  0 0.996 0.000
#> GSM1009108     5  0.0000      0.956 0.000 0.000  0 0.000 1.000
#> GSM1009122     2  0.0000      0.779 0.000 1.000  0 0.000 0.000
#> GSM1009136     4  0.0000      0.887 0.000 0.000  0 1.000 0.000
#> GSM1009150     1  0.4150      0.782 0.612 0.000  0 0.388 0.000
#> GSM1009164     3  0.0000      1.000 0.000 0.000  1 0.000 0.000
#> GSM1009178     2  0.4150      0.796 0.388 0.612  0 0.000 0.000
#> GSM1009192     1  0.3684      0.751 0.720 0.000  0 0.280 0.000
#> GSM1009067     1  0.4150      0.782 0.612 0.000  0 0.388 0.000
#> GSM1009081     2  0.0000      0.779 0.000 1.000  0 0.000 0.000
#> GSM1009095     4  0.0000      0.887 0.000 0.000  0 1.000 0.000
#> GSM1009109     5  0.0000      0.956 0.000 0.000  0 0.000 1.000
#> GSM1009123     4  0.0000      0.887 0.000 0.000  0 1.000 0.000
#> GSM1009137     4  0.3586      0.628 0.264 0.000  0 0.736 0.000
#> GSM1009151     1  0.4114      0.786 0.624 0.000  0 0.376 0.000
#> GSM1009165     3  0.0000      1.000 0.000 0.000  1 0.000 0.000
#> GSM1009179     2  0.4126      0.799 0.380 0.620  0 0.000 0.000
#> GSM1009193     4  0.2074      0.803 0.104 0.000  0 0.896 0.000
#> GSM1009068     1  0.4150      0.782 0.612 0.000  0 0.388 0.000
#> GSM1009082     2  0.0000      0.779 0.000 1.000  0 0.000 0.000
#> GSM1009096     4  0.0000      0.887 0.000 0.000  0 1.000 0.000
#> GSM1009110     5  0.0000      0.956 0.000 0.000  0 0.000 1.000
#> GSM1009124     2  0.4150      0.796 0.388 0.612  0 0.000 0.000
#> GSM1009138     4  0.0404      0.879 0.012 0.000  0 0.988 0.000
#> GSM1009152     1  0.4150      0.782 0.612 0.000  0 0.388 0.000
#> GSM1009166     3  0.0000      1.000 0.000 0.000  1 0.000 0.000
#> GSM1009180     2  0.4150      0.796 0.388 0.612  0 0.000 0.000
#> GSM1009194     2  0.4150      0.796 0.388 0.612  0 0.000 0.000
#> GSM1009069     1  0.4307     -0.594 0.500 0.500  0 0.000 0.000
#> GSM1009083     2  0.0000      0.779 0.000 1.000  0 0.000 0.000
#> GSM1009097     4  0.0000      0.887 0.000 0.000  0 1.000 0.000
#> GSM1009111     5  0.0000      0.956 0.000 0.000  0 0.000 1.000
#> GSM1009125     5  0.3561      0.712 0.000 0.260  0 0.000 0.740
#> GSM1009139     2  0.4114      0.801 0.376 0.624  0 0.000 0.000
#> GSM1009153     1  0.4114      0.786 0.624 0.000  0 0.376 0.000
#> GSM1009167     3  0.0000      1.000 0.000 0.000  1 0.000 0.000
#> GSM1009181     2  0.3003      0.807 0.188 0.812  0 0.000 0.000
#> GSM1009195     2  0.0000      0.779 0.000 1.000  0 0.000 0.000
#> GSM1009070     4  0.4161     -0.271 0.392 0.000  0 0.608 0.000
#> GSM1009084     2  0.0000      0.779 0.000 1.000  0 0.000 0.000
#> GSM1009098     4  0.0000      0.887 0.000 0.000  0 1.000 0.000
#> GSM1009112     5  0.0000      0.956 0.000 0.000  0 0.000 1.000
#> GSM1009126     2  0.4161      0.793 0.392 0.608  0 0.000 0.000
#> GSM1009140     4  0.0000      0.887 0.000 0.000  0 1.000 0.000
#> GSM1009154     1  0.4150      0.782 0.612 0.000  0 0.388 0.000
#> GSM1009168     3  0.0000      1.000 0.000 0.000  1 0.000 0.000
#> GSM1009182     2  0.4074      0.803 0.364 0.636  0 0.000 0.000
#> GSM1009196     1  0.3999      0.782 0.656 0.000  0 0.344 0.000
#> GSM1009071     1  0.4114      0.786 0.624 0.000  0 0.376 0.000
#> GSM1009085     2  0.0000      0.779 0.000 1.000  0 0.000 0.000
#> GSM1009099     4  0.0000      0.887 0.000 0.000  0 1.000 0.000
#> GSM1009113     5  0.0000      0.956 0.000 0.000  0 0.000 1.000
#> GSM1009127     1  0.4114      0.786 0.624 0.000  0 0.376 0.000
#> GSM1009141     2  0.4150      0.796 0.388 0.612  0 0.000 0.000
#> GSM1009155     1  0.3837      0.784 0.692 0.000  0 0.308 0.000
#> GSM1009169     3  0.0000      1.000 0.000 0.000  1 0.000 0.000
#> GSM1009183     2  0.3684      0.813 0.280 0.720  0 0.000 0.000
#> GSM1009197     4  0.0404      0.879 0.012 0.000  0 0.988 0.000
#> GSM1009072     1  0.4150      0.782 0.612 0.000  0 0.388 0.000
#> GSM1009086     2  0.0000      0.779 0.000 1.000  0 0.000 0.000
#> GSM1009100     4  0.0000      0.887 0.000 0.000  0 1.000 0.000
#> GSM1009114     5  0.0000      0.956 0.000 0.000  0 0.000 1.000
#> GSM1009128     4  0.5922      0.204 0.388 0.108  0 0.504 0.000
#> GSM1009142     2  0.4150      0.796 0.388 0.612  0 0.000 0.000
#> GSM1009156     1  0.3837      0.784 0.692 0.000  0 0.308 0.000
#> GSM1009170     3  0.0000      1.000 0.000 0.000  1 0.000 0.000
#> GSM1009184     2  0.3684      0.813 0.280 0.720  0 0.000 0.000
#> GSM1009198     4  0.2127      0.799 0.108 0.000  0 0.892 0.000
#> GSM1009073     1  0.4114      0.786 0.624 0.000  0 0.376 0.000
#> GSM1009087     1  0.3003      0.724 0.812 0.000  0 0.188 0.000
#> GSM1009101     4  0.0000      0.887 0.000 0.000  0 1.000 0.000
#> GSM1009115     5  0.0000      0.956 0.000 0.000  0 0.000 1.000
#> GSM1009129     5  0.4045      0.605 0.000 0.356  0 0.000 0.644
#> GSM1009143     4  0.3395      0.445 0.236 0.000  0 0.764 0.000
#> GSM1009157     1  0.0000      0.566 1.000 0.000  0 0.000 0.000
#> GSM1009171     3  0.0000      1.000 0.000 0.000  1 0.000 0.000
#> GSM1009185     1  0.1121      0.607 0.956 0.000  0 0.044 0.000
#> GSM1009199     2  0.0000      0.779 0.000 1.000  0 0.000 0.000
#> GSM1009074     1  0.4150      0.782 0.612 0.000  0 0.388 0.000
#> GSM1009088     1  0.0510      0.590 0.984 0.000  0 0.016 0.000
#> GSM1009102     4  0.0000      0.887 0.000 0.000  0 1.000 0.000
#> GSM1009116     5  0.0000      0.956 0.000 0.000  0 0.000 1.000
#> GSM1009130     2  0.1544      0.716 0.000 0.932  0 0.000 0.068
#> GSM1009144     1  0.3003      0.724 0.812 0.000  0 0.188 0.000
#> GSM1009158     1  0.4150      0.782 0.612 0.000  0 0.388 0.000
#> GSM1009172     3  0.0000      1.000 0.000 0.000  1 0.000 0.000
#> GSM1009186     2  0.3684      0.813 0.280 0.720  0 0.000 0.000
#> GSM1009200     2  0.4150      0.796 0.388 0.612  0 0.000 0.000
#> GSM1009075     1  0.4150      0.782 0.612 0.000  0 0.388 0.000
#> GSM1009089     4  0.0000      0.887 0.000 0.000  0 1.000 0.000
#> GSM1009103     4  0.0000      0.887 0.000 0.000  0 1.000 0.000
#> GSM1009117     5  0.0000      0.956 0.000 0.000  0 0.000 1.000
#> GSM1009131     2  0.4150      0.796 0.388 0.612  0 0.000 0.000
#> GSM1009145     4  0.0000      0.887 0.000 0.000  0 1.000 0.000
#> GSM1009159     4  0.0000      0.887 0.000 0.000  0 1.000 0.000
#> GSM1009173     3  0.0000      1.000 0.000 0.000  1 0.000 0.000
#> GSM1009187     1  0.1965      0.637 0.904 0.000  0 0.096 0.000
#> GSM1009201     1  0.0898      0.548 0.972 0.008  0 0.020 0.000

show/hide code output

cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#>            class entropy silhouette    p1    p2 p3    p4    p5    p6
#> GSM1009062     6  0.0000     0.9670 0.000 0.000  0 0.000 0.000 1.000
#> GSM1009076     2  0.0000     0.9674 0.000 1.000  0 0.000 0.000 0.000
#> GSM1009090     4  0.0000     0.9107 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009104     5  0.0000     1.0000 0.000 0.000  0 0.000 1.000 0.000
#> GSM1009118     2  0.0000     0.9674 0.000 1.000  0 0.000 0.000 0.000
#> GSM1009132     1  0.2454     0.8104 0.840 0.160  0 0.000 0.000 0.000
#> GSM1009146     4  0.2454     0.8410 0.160 0.000  0 0.840 0.000 0.000
#> GSM1009160     3  0.0000     1.0000 0.000 0.000  1 0.000 0.000 0.000
#> GSM1009174     1  0.3446     0.6408 0.692 0.308  0 0.000 0.000 0.000
#> GSM1009188     4  0.3288     0.7341 0.276 0.000  0 0.724 0.000 0.000
#> GSM1009063     6  0.0000     0.9670 0.000 0.000  0 0.000 0.000 1.000
#> GSM1009077     2  0.0000     0.9674 0.000 1.000  0 0.000 0.000 0.000
#> GSM1009091     4  0.0000     0.9107 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009105     5  0.0000     1.0000 0.000 0.000  0 0.000 1.000 0.000
#> GSM1009119     4  0.3727     0.5458 0.388 0.000  0 0.612 0.000 0.000
#> GSM1009133     4  0.3647     0.6015 0.360 0.000  0 0.640 0.000 0.000
#> GSM1009147     1  0.0713     0.8664 0.972 0.000  0 0.028 0.000 0.000
#> GSM1009161     3  0.0000     1.0000 0.000 0.000  1 0.000 0.000 0.000
#> GSM1009175     1  0.3288     0.6898 0.724 0.276  0 0.000 0.000 0.000
#> GSM1009189     1  0.0000     0.8807 1.000 0.000  0 0.000 0.000 0.000
#> GSM1009064     6  0.0000     0.9670 0.000 0.000  0 0.000 0.000 1.000
#> GSM1009078     1  0.0260     0.8756 0.992 0.000  0 0.008 0.000 0.000
#> GSM1009092     4  0.0000     0.9107 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009106     5  0.0000     1.0000 0.000 0.000  0 0.000 1.000 0.000
#> GSM1009120     4  0.2454     0.8410 0.160 0.000  0 0.840 0.000 0.000
#> GSM1009134     4  0.0547     0.9036 0.020 0.000  0 0.980 0.000 0.000
#> GSM1009148     6  0.2454     0.8067 0.160 0.000  0 0.000 0.000 0.840
#> GSM1009162     3  0.0000     1.0000 0.000 0.000  1 0.000 0.000 0.000
#> GSM1009176     2  0.0146     0.9645 0.004 0.996  0 0.000 0.000 0.000
#> GSM1009190     1  0.0000     0.8807 1.000 0.000  0 0.000 0.000 0.000
#> GSM1009065     6  0.0000     0.9670 0.000 0.000  0 0.000 0.000 1.000
#> GSM1009079     2  0.0000     0.9674 0.000 1.000  0 0.000 0.000 0.000
#> GSM1009093     4  0.0000     0.9107 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009107     5  0.0000     1.0000 0.000 0.000  0 0.000 1.000 0.000
#> GSM1009121     1  0.3072     0.8131 0.840 0.076  0 0.000 0.084 0.000
#> GSM1009135     4  0.2793     0.7945 0.200 0.000  0 0.800 0.000 0.000
#> GSM1009149     4  0.0000     0.9107 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009163     3  0.0000     1.0000 0.000 0.000  1 0.000 0.000 0.000
#> GSM1009177     2  0.2135     0.8229 0.128 0.872  0 0.000 0.000 0.000
#> GSM1009191     1  0.0000     0.8807 1.000 0.000  0 0.000 0.000 0.000
#> GSM1009066     6  0.0000     0.9670 0.000 0.000  0 0.000 0.000 1.000
#> GSM1009080     2  0.0000     0.9674 0.000 1.000  0 0.000 0.000 0.000
#> GSM1009094     4  0.0000     0.9107 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009108     5  0.0000     1.0000 0.000 0.000  0 0.000 1.000 0.000
#> GSM1009122     2  0.0000     0.9674 0.000 1.000  0 0.000 0.000 0.000
#> GSM1009136     4  0.0000     0.9107 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009150     4  0.0000     0.9107 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009164     3  0.0000     1.0000 0.000 0.000  1 0.000 0.000 0.000
#> GSM1009178     1  0.2454     0.8104 0.840 0.160  0 0.000 0.000 0.000
#> GSM1009192     4  0.3351     0.7184 0.288 0.000  0 0.712 0.000 0.000
#> GSM1009067     6  0.0000     0.9670 0.000 0.000  0 0.000 0.000 1.000
#> GSM1009081     2  0.0000     0.9674 0.000 1.000  0 0.000 0.000 0.000
#> GSM1009095     4  0.0000     0.9107 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009109     5  0.0000     1.0000 0.000 0.000  0 0.000 1.000 0.000
#> GSM1009123     4  0.0000     0.9107 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009137     1  0.3823    -0.0437 0.564 0.000  0 0.436 0.000 0.000
#> GSM1009151     6  0.0000     0.9670 0.000 0.000  0 0.000 0.000 1.000
#> GSM1009165     3  0.0000     1.0000 0.000 0.000  1 0.000 0.000 0.000
#> GSM1009179     1  0.2454     0.8104 0.840 0.160  0 0.000 0.000 0.000
#> GSM1009193     4  0.2454     0.8410 0.160 0.000  0 0.840 0.000 0.000
#> GSM1009068     6  0.0000     0.9670 0.000 0.000  0 0.000 0.000 1.000
#> GSM1009082     2  0.0000     0.9674 0.000 1.000  0 0.000 0.000 0.000
#> GSM1009096     4  0.0000     0.9107 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009110     5  0.0000     1.0000 0.000 0.000  0 0.000 1.000 0.000
#> GSM1009124     1  0.0000     0.8807 1.000 0.000  0 0.000 0.000 0.000
#> GSM1009138     4  0.0146     0.9094 0.004 0.000  0 0.996 0.000 0.000
#> GSM1009152     6  0.0000     0.9670 0.000 0.000  0 0.000 0.000 1.000
#> GSM1009166     3  0.0000     1.0000 0.000 0.000  1 0.000 0.000 0.000
#> GSM1009180     1  0.2454     0.8104 0.840 0.160  0 0.000 0.000 0.000
#> GSM1009194     1  0.0000     0.8807 1.000 0.000  0 0.000 0.000 0.000
#> GSM1009069     6  0.0000     0.9670 0.000 0.000  0 0.000 0.000 1.000
#> GSM1009083     2  0.0000     0.9674 0.000 1.000  0 0.000 0.000 0.000
#> GSM1009097     4  0.0000     0.9107 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009111     5  0.0000     1.0000 0.000 0.000  0 0.000 1.000 0.000
#> GSM1009125     2  0.2941     0.7252 0.000 0.780  0 0.000 0.220 0.000
#> GSM1009139     1  0.2300     0.8213 0.856 0.144  0 0.000 0.000 0.000
#> GSM1009153     6  0.0000     0.9670 0.000 0.000  0 0.000 0.000 1.000
#> GSM1009167     3  0.0000     1.0000 0.000 0.000  1 0.000 0.000 0.000
#> GSM1009181     2  0.0260     0.9612 0.008 0.992  0 0.000 0.000 0.000
#> GSM1009195     2  0.0000     0.9674 0.000 1.000  0 0.000 0.000 0.000
#> GSM1009070     6  0.0000     0.9670 0.000 0.000  0 0.000 0.000 1.000
#> GSM1009084     2  0.0000     0.9674 0.000 1.000  0 0.000 0.000 0.000
#> GSM1009098     4  0.0000     0.9107 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009112     5  0.0000     1.0000 0.000 0.000  0 0.000 1.000 0.000
#> GSM1009126     1  0.0000     0.8807 1.000 0.000  0 0.000 0.000 0.000
#> GSM1009140     4  0.0000     0.9107 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009154     6  0.3247     0.7826 0.156 0.000  0 0.036 0.000 0.808
#> GSM1009168     3  0.0000     1.0000 0.000 0.000  1 0.000 0.000 0.000
#> GSM1009182     1  0.2664     0.7911 0.816 0.184  0 0.000 0.000 0.000
#> GSM1009196     4  0.3512     0.7337 0.272 0.000  0 0.720 0.000 0.008
#> GSM1009071     6  0.0000     0.9670 0.000 0.000  0 0.000 0.000 1.000
#> GSM1009085     2  0.0000     0.9674 0.000 1.000  0 0.000 0.000 0.000
#> GSM1009099     4  0.0000     0.9107 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009113     5  0.0000     1.0000 0.000 0.000  0 0.000 1.000 0.000
#> GSM1009127     4  0.2454     0.8410 0.160 0.000  0 0.840 0.000 0.000
#> GSM1009141     1  0.0000     0.8807 1.000 0.000  0 0.000 0.000 0.000
#> GSM1009155     6  0.2454     0.8067 0.160 0.000  0 0.000 0.000 0.840
#> GSM1009169     3  0.0000     1.0000 0.000 0.000  1 0.000 0.000 0.000
#> GSM1009183     1  0.3288     0.6898 0.724 0.276  0 0.000 0.000 0.000
#> GSM1009197     4  0.2454     0.8410 0.160 0.000  0 0.840 0.000 0.000
#> GSM1009072     6  0.0000     0.9670 0.000 0.000  0 0.000 0.000 1.000
#> GSM1009086     2  0.0000     0.9674 0.000 1.000  0 0.000 0.000 0.000
#> GSM1009100     4  0.0000     0.9107 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009114     5  0.0000     1.0000 0.000 0.000  0 0.000 1.000 0.000
#> GSM1009128     1  0.0000     0.8807 1.000 0.000  0 0.000 0.000 0.000
#> GSM1009142     1  0.0000     0.8807 1.000 0.000  0 0.000 0.000 0.000
#> GSM1009156     1  0.0000     0.8807 1.000 0.000  0 0.000 0.000 0.000
#> GSM1009170     3  0.0000     1.0000 0.000 0.000  1 0.000 0.000 0.000
#> GSM1009184     1  0.3288     0.6898 0.724 0.276  0 0.000 0.000 0.000
#> GSM1009198     4  0.3288     0.7341 0.276 0.000  0 0.724 0.000 0.000
#> GSM1009073     6  0.0000     0.9670 0.000 0.000  0 0.000 0.000 1.000
#> GSM1009087     1  0.0000     0.8807 1.000 0.000  0 0.000 0.000 0.000
#> GSM1009101     4  0.0000     0.9107 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009115     5  0.0000     1.0000 0.000 0.000  0 0.000 1.000 0.000
#> GSM1009129     2  0.1863     0.8747 0.000 0.896  0 0.000 0.104 0.000
#> GSM1009143     4  0.2454     0.8410 0.160 0.000  0 0.840 0.000 0.000
#> GSM1009157     1  0.1204     0.8639 0.944 0.056  0 0.000 0.000 0.000
#> GSM1009171     3  0.0000     1.0000 0.000 0.000  1 0.000 0.000 0.000
#> GSM1009185     1  0.0000     0.8807 1.000 0.000  0 0.000 0.000 0.000
#> GSM1009199     2  0.0000     0.9674 0.000 1.000  0 0.000 0.000 0.000
#> GSM1009074     6  0.0000     0.9670 0.000 0.000  0 0.000 0.000 1.000
#> GSM1009088     1  0.0000     0.8807 1.000 0.000  0 0.000 0.000 0.000
#> GSM1009102     4  0.0000     0.9107 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009116     5  0.0000     1.0000 0.000 0.000  0 0.000 1.000 0.000
#> GSM1009130     2  0.1714     0.8779 0.000 0.908  0 0.000 0.092 0.000
#> GSM1009144     1  0.2378     0.7231 0.848 0.000  0 0.152 0.000 0.000
#> GSM1009158     4  0.0000     0.9107 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009172     3  0.0000     1.0000 0.000 0.000  1 0.000 0.000 0.000
#> GSM1009186     1  0.3288     0.6898 0.724 0.276  0 0.000 0.000 0.000
#> GSM1009200     1  0.0000     0.8807 1.000 0.000  0 0.000 0.000 0.000
#> GSM1009075     6  0.0000     0.9670 0.000 0.000  0 0.000 0.000 1.000
#> GSM1009089     4  0.0000     0.9107 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009103     4  0.0000     0.9107 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009117     5  0.0000     1.0000 0.000 0.000  0 0.000 1.000 0.000
#> GSM1009131     1  0.0000     0.8807 1.000 0.000  0 0.000 0.000 0.000
#> GSM1009145     4  0.0000     0.9107 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009159     4  0.0000     0.9107 0.000 0.000  0 1.000 0.000 0.000
#> GSM1009173     3  0.0000     1.0000 0.000 0.000  1 0.000 0.000 0.000
#> GSM1009187     1  0.3536     0.8068 0.832 0.052  0 0.072 0.000 0.044
#> GSM1009201     1  0.0000     0.8807 1.000 0.000  0 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 temperature(p) time(p) specimen(p) k
#> ATC:pam 138          0.393   0.666    1.78e-13 2
#> ATC:pam 128          0.582   0.970    1.27e-28 3
#> ATC:pam 139          0.947   0.999    3.30e-51 4
#> ATC:pam 136          0.961   0.999    1.09e-62 5
#> ATC:pam 139          0.969   1.000    3.15e-74 6

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


ATC:mclust**

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

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

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

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

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

collect_plots(res)

plot of chunk ATC-mclust-collect-plots

The plots are:

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

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

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

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

select_partition_number(res)

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

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

get_stats(res)
#>   k 1-PAC mean_silhouette concordance area_increased  Rand Jaccard
#> 2 2 1.000           0.999       0.999         0.1830 0.819   0.819
#> 3 3 0.481           0.820       0.893         2.1232 0.592   0.502
#> 4 4 0.810           0.874       0.907         0.2027 0.705   0.406
#> 5 5 0.709           0.871       0.919        -0.0589 0.710   0.383
#> 6 6 0.854           0.897       0.937         0.2138 0.829   0.535

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
#> GSM1009062     1  0.0000      0.999 1.000 0.000
#> GSM1009076     1  0.0000      0.999 1.000 0.000
#> GSM1009090     1  0.0000      0.999 1.000 0.000
#> GSM1009104     1  0.0672      0.993 0.992 0.008
#> GSM1009118     1  0.0000      0.999 1.000 0.000
#> GSM1009132     1  0.0000      0.999 1.000 0.000
#> GSM1009146     1  0.0000      0.999 1.000 0.000
#> GSM1009160     2  0.0000      1.000 0.000 1.000
#> GSM1009174     1  0.0000      0.999 1.000 0.000
#> GSM1009188     1  0.0000      0.999 1.000 0.000
#> GSM1009063     1  0.0000      0.999 1.000 0.000
#> GSM1009077     1  0.0000      0.999 1.000 0.000
#> GSM1009091     1  0.0000      0.999 1.000 0.000
#> GSM1009105     1  0.0672      0.993 0.992 0.008
#> GSM1009119     1  0.0000      0.999 1.000 0.000
#> GSM1009133     1  0.0000      0.999 1.000 0.000
#> GSM1009147     1  0.0000      0.999 1.000 0.000
#> GSM1009161     2  0.0000      1.000 0.000 1.000
#> GSM1009175     1  0.0000      0.999 1.000 0.000
#> GSM1009189     1  0.0000      0.999 1.000 0.000
#> GSM1009064     1  0.0000      0.999 1.000 0.000
#> GSM1009078     1  0.0000      0.999 1.000 0.000
#> GSM1009092     1  0.0000      0.999 1.000 0.000
#> GSM1009106     1  0.0672      0.993 0.992 0.008
#> GSM1009120     1  0.0000      0.999 1.000 0.000
#> GSM1009134     1  0.0000      0.999 1.000 0.000
#> GSM1009148     1  0.0000      0.999 1.000 0.000
#> GSM1009162     2  0.0000      1.000 0.000 1.000
#> GSM1009176     1  0.0000      0.999 1.000 0.000
#> GSM1009190     1  0.0000      0.999 1.000 0.000
#> GSM1009065     1  0.0000      0.999 1.000 0.000
#> GSM1009079     1  0.0000      0.999 1.000 0.000
#> GSM1009093     1  0.0000      0.999 1.000 0.000
#> GSM1009107     1  0.0672      0.993 0.992 0.008
#> GSM1009121     1  0.0000      0.999 1.000 0.000
#> GSM1009135     1  0.0000      0.999 1.000 0.000
#> GSM1009149     1  0.0000      0.999 1.000 0.000
#> GSM1009163     2  0.0000      1.000 0.000 1.000
#> GSM1009177     1  0.0000      0.999 1.000 0.000
#> GSM1009191     1  0.0000      0.999 1.000 0.000
#> GSM1009066     1  0.0000      0.999 1.000 0.000
#> GSM1009080     1  0.0000      0.999 1.000 0.000
#> GSM1009094     1  0.0000      0.999 1.000 0.000
#> GSM1009108     1  0.0672      0.993 0.992 0.008
#> GSM1009122     1  0.0000      0.999 1.000 0.000
#> GSM1009136     1  0.0000      0.999 1.000 0.000
#> GSM1009150     1  0.0000      0.999 1.000 0.000
#> GSM1009164     2  0.0000      1.000 0.000 1.000
#> GSM1009178     1  0.0000      0.999 1.000 0.000
#> GSM1009192     1  0.0000      0.999 1.000 0.000
#> GSM1009067     1  0.0000      0.999 1.000 0.000
#> GSM1009081     1  0.0000      0.999 1.000 0.000
#> GSM1009095     1  0.0000      0.999 1.000 0.000
#> GSM1009109     1  0.0000      0.999 1.000 0.000
#> GSM1009123     1  0.0000      0.999 1.000 0.000
#> GSM1009137     1  0.0000      0.999 1.000 0.000
#> GSM1009151     1  0.0000      0.999 1.000 0.000
#> GSM1009165     2  0.0000      1.000 0.000 1.000
#> GSM1009179     1  0.0000      0.999 1.000 0.000
#> GSM1009193     1  0.0000      0.999 1.000 0.000
#> GSM1009068     1  0.0000      0.999 1.000 0.000
#> GSM1009082     1  0.0000      0.999 1.000 0.000
#> GSM1009096     1  0.0000      0.999 1.000 0.000
#> GSM1009110     1  0.0672      0.993 0.992 0.008
#> GSM1009124     1  0.0000      0.999 1.000 0.000
#> GSM1009138     1  0.0000      0.999 1.000 0.000
#> GSM1009152     1  0.0000      0.999 1.000 0.000
#> GSM1009166     2  0.0000      1.000 0.000 1.000
#> GSM1009180     1  0.0000      0.999 1.000 0.000
#> GSM1009194     1  0.0000      0.999 1.000 0.000
#> GSM1009069     1  0.0000      0.999 1.000 0.000
#> GSM1009083     1  0.0000      0.999 1.000 0.000
#> GSM1009097     1  0.0000      0.999 1.000 0.000
#> GSM1009111     1  0.0672      0.993 0.992 0.008
#> GSM1009125     1  0.0000      0.999 1.000 0.000
#> GSM1009139     1  0.0000      0.999 1.000 0.000
#> GSM1009153     1  0.0000      0.999 1.000 0.000
#> GSM1009167     2  0.0000      1.000 0.000 1.000
#> GSM1009181     1  0.0000      0.999 1.000 0.000
#> GSM1009195     1  0.0000      0.999 1.000 0.000
#> GSM1009070     1  0.0000      0.999 1.000 0.000
#> GSM1009084     1  0.0000      0.999 1.000 0.000
#> GSM1009098     1  0.0000      0.999 1.000 0.000
#> GSM1009112     1  0.0672      0.993 0.992 0.008
#> GSM1009126     1  0.0000      0.999 1.000 0.000
#> GSM1009140     1  0.0000      0.999 1.000 0.000
#> GSM1009154     1  0.0000      0.999 1.000 0.000
#> GSM1009168     2  0.0000      1.000 0.000 1.000
#> GSM1009182     1  0.0000      0.999 1.000 0.000
#> GSM1009196     1  0.0000      0.999 1.000 0.000
#> GSM1009071     1  0.0000      0.999 1.000 0.000
#> GSM1009085     1  0.0000      0.999 1.000 0.000
#> GSM1009099     1  0.0000      0.999 1.000 0.000
#> GSM1009113     1  0.0672      0.993 0.992 0.008
#> GSM1009127     1  0.0000      0.999 1.000 0.000
#> GSM1009141     1  0.0000      0.999 1.000 0.000
#> GSM1009155     1  0.0000      0.999 1.000 0.000
#> GSM1009169     2  0.0000      1.000 0.000 1.000
#> GSM1009183     1  0.0000      0.999 1.000 0.000
#> GSM1009197     1  0.0000      0.999 1.000 0.000
#> GSM1009072     1  0.0000      0.999 1.000 0.000
#> GSM1009086     1  0.0000      0.999 1.000 0.000
#> GSM1009100     1  0.0000      0.999 1.000 0.000
#> GSM1009114     1  0.0000      0.999 1.000 0.000
#> GSM1009128     1  0.0000      0.999 1.000 0.000
#> GSM1009142     1  0.0000      0.999 1.000 0.000
#> GSM1009156     1  0.0000      0.999 1.000 0.000
#> GSM1009170     2  0.0000      1.000 0.000 1.000
#> GSM1009184     1  0.0000      0.999 1.000 0.000
#> GSM1009198     1  0.0000      0.999 1.000 0.000
#> GSM1009073     1  0.0000      0.999 1.000 0.000
#> GSM1009087     1  0.0000      0.999 1.000 0.000
#> GSM1009101     1  0.0000      0.999 1.000 0.000
#> GSM1009115     1  0.0672      0.993 0.992 0.008
#> GSM1009129     1  0.0000      0.999 1.000 0.000
#> GSM1009143     1  0.0000      0.999 1.000 0.000
#> GSM1009157     1  0.0000      0.999 1.000 0.000
#> GSM1009171     2  0.0000      1.000 0.000 1.000
#> GSM1009185     1  0.0000      0.999 1.000 0.000
#> GSM1009199     1  0.0000      0.999 1.000 0.000
#> GSM1009074     1  0.0000      0.999 1.000 0.000
#> GSM1009088     1  0.0000      0.999 1.000 0.000
#> GSM1009102     1  0.0000      0.999 1.000 0.000
#> GSM1009116     1  0.0672      0.993 0.992 0.008
#> GSM1009130     1  0.0000      0.999 1.000 0.000
#> GSM1009144     1  0.0000      0.999 1.000 0.000
#> GSM1009158     1  0.0000      0.999 1.000 0.000
#> GSM1009172     2  0.0000      1.000 0.000 1.000
#> GSM1009186     1  0.0000      0.999 1.000 0.000
#> GSM1009200     1  0.0000      0.999 1.000 0.000
#> GSM1009075     1  0.0000      0.999 1.000 0.000
#> GSM1009089     1  0.0000      0.999 1.000 0.000
#> GSM1009103     1  0.0000      0.999 1.000 0.000
#> GSM1009117     1  0.0672      0.993 0.992 0.008
#> GSM1009131     1  0.0000      0.999 1.000 0.000
#> GSM1009145     1  0.0000      0.999 1.000 0.000
#> GSM1009159     1  0.0000      0.999 1.000 0.000
#> GSM1009173     2  0.0000      1.000 0.000 1.000
#> GSM1009187     1  0.0000      0.999 1.000 0.000
#> GSM1009201     1  0.0000      0.999 1.000 0.000

show/hide code output

cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#>            class entropy silhouette    p1    p2 p3
#> GSM1009062     2  0.5465     0.6966 0.288 0.712  0
#> GSM1009076     2  0.3551     0.7965 0.132 0.868  0
#> GSM1009090     1  0.0000     0.8988 1.000 0.000  0
#> GSM1009104     2  0.0237     0.8090 0.004 0.996  0
#> GSM1009118     2  0.0592     0.8083 0.012 0.988  0
#> GSM1009132     2  0.5988     0.4854 0.368 0.632  0
#> GSM1009146     1  0.0000     0.8988 1.000 0.000  0
#> GSM1009160     3  0.0000     1.0000 0.000 0.000  1
#> GSM1009174     2  0.3551     0.7965 0.132 0.868  0
#> GSM1009188     1  0.2261     0.8941 0.932 0.068  0
#> GSM1009063     2  0.5465     0.6966 0.288 0.712  0
#> GSM1009077     2  0.3551     0.7965 0.132 0.868  0
#> GSM1009091     1  0.0000     0.8988 1.000 0.000  0
#> GSM1009105     2  0.0237     0.8090 0.004 0.996  0
#> GSM1009119     1  0.3340     0.8791 0.880 0.120  0
#> GSM1009133     1  0.3340     0.8791 0.880 0.120  0
#> GSM1009147     1  0.0000     0.8988 1.000 0.000  0
#> GSM1009161     3  0.0000     1.0000 0.000 0.000  1
#> GSM1009175     2  0.5591     0.7211 0.304 0.696  0
#> GSM1009189     1  0.3340     0.8791 0.880 0.120  0
#> GSM1009064     2  0.5465     0.6966 0.288 0.712  0
#> GSM1009078     1  0.0424     0.8985 0.992 0.008  0
#> GSM1009092     1  0.0000     0.8988 1.000 0.000  0
#> GSM1009106     2  0.0237     0.8090 0.004 0.996  0
#> GSM1009120     1  0.3340     0.8791 0.880 0.120  0
#> GSM1009134     1  0.3816     0.8571 0.852 0.148  0
#> GSM1009148     1  0.4121     0.8203 0.832 0.168  0
#> GSM1009162     3  0.0000     1.0000 0.000 0.000  1
#> GSM1009176     2  0.3551     0.7965 0.132 0.868  0
#> GSM1009190     1  0.2711     0.8935 0.912 0.088  0
#> GSM1009065     2  0.5465     0.6966 0.288 0.712  0
#> GSM1009079     2  0.3551     0.7965 0.132 0.868  0
#> GSM1009093     1  0.0000     0.8988 1.000 0.000  0
#> GSM1009107     2  0.0237     0.8090 0.004 0.996  0
#> GSM1009121     2  0.5016     0.7049 0.240 0.760  0
#> GSM1009135     1  0.3482     0.8736 0.872 0.128  0
#> GSM1009149     1  0.0237     0.8993 0.996 0.004  0
#> GSM1009163     3  0.0000     1.0000 0.000 0.000  1
#> GSM1009177     2  0.3551     0.7965 0.132 0.868  0
#> GSM1009191     2  0.5431     0.6729 0.284 0.716  0
#> GSM1009066     2  0.5465     0.6966 0.288 0.712  0
#> GSM1009080     2  0.3551     0.7965 0.132 0.868  0
#> GSM1009094     1  0.0000     0.8988 1.000 0.000  0
#> GSM1009108     2  0.0237     0.8090 0.004 0.996  0
#> GSM1009122     2  0.0237     0.8090 0.004 0.996  0
#> GSM1009136     1  0.3340     0.8791 0.880 0.120  0
#> GSM1009150     1  0.3412     0.8665 0.876 0.124  0
#> GSM1009164     3  0.0000     1.0000 0.000 0.000  1
#> GSM1009178     1  0.4654     0.6844 0.792 0.208  0
#> GSM1009192     1  0.2165     0.8972 0.936 0.064  0
#> GSM1009067     2  0.5465     0.6966 0.288 0.712  0
#> GSM1009081     2  0.3551     0.7965 0.132 0.868  0
#> GSM1009095     1  0.0000     0.8988 1.000 0.000  0
#> GSM1009109     2  0.0237     0.8090 0.004 0.996  0
#> GSM1009123     1  0.3340     0.8791 0.880 0.120  0
#> GSM1009137     1  0.3412     0.8765 0.876 0.124  0
#> GSM1009151     1  0.5835     0.4903 0.660 0.340  0
#> GSM1009165     3  0.0000     1.0000 0.000 0.000  1
#> GSM1009179     2  0.5733     0.7014 0.324 0.676  0
#> GSM1009193     1  0.1753     0.8948 0.952 0.048  0
#> GSM1009068     2  0.5465     0.6966 0.288 0.712  0
#> GSM1009082     2  0.3551     0.7965 0.132 0.868  0
#> GSM1009096     1  0.0000     0.8988 1.000 0.000  0
#> GSM1009110     2  0.0237     0.8090 0.004 0.996  0
#> GSM1009124     1  0.3879     0.8639 0.848 0.152  0
#> GSM1009138     1  0.3816     0.8571 0.852 0.148  0
#> GSM1009152     2  0.6095     0.4985 0.392 0.608  0
#> GSM1009166     3  0.0000     1.0000 0.000 0.000  1
#> GSM1009180     1  0.3116     0.8282 0.892 0.108  0
#> GSM1009194     2  0.5216     0.6821 0.260 0.740  0
#> GSM1009069     2  0.5016     0.7518 0.240 0.760  0
#> GSM1009083     2  0.2165     0.8121 0.064 0.936  0
#> GSM1009097     1  0.0000     0.8988 1.000 0.000  0
#> GSM1009111     2  0.0237     0.8090 0.004 0.996  0
#> GSM1009125     2  0.0237     0.8090 0.004 0.996  0
#> GSM1009139     1  0.3879     0.8548 0.848 0.152  0
#> GSM1009153     2  0.6286     0.3057 0.464 0.536  0
#> GSM1009167     3  0.0000     1.0000 0.000 0.000  1
#> GSM1009181     2  0.3551     0.7965 0.132 0.868  0
#> GSM1009195     2  0.1411     0.8109 0.036 0.964  0
#> GSM1009070     1  0.2356     0.8821 0.928 0.072  0
#> GSM1009084     2  0.2878     0.8076 0.096 0.904  0
#> GSM1009098     1  0.0000     0.8988 1.000 0.000  0
#> GSM1009112     2  0.0237     0.8090 0.004 0.996  0
#> GSM1009126     1  0.3340     0.8791 0.880 0.120  0
#> GSM1009140     1  0.3340     0.8791 0.880 0.120  0
#> GSM1009154     1  0.3192     0.8674 0.888 0.112  0
#> GSM1009168     3  0.0000     1.0000 0.000 0.000  1
#> GSM1009182     2  0.5733     0.7014 0.324 0.676  0
#> GSM1009196     1  0.0592     0.8958 0.988 0.012  0
#> GSM1009071     2  0.5465     0.6966 0.288 0.712  0
#> GSM1009085     2  0.3551     0.7965 0.132 0.868  0
#> GSM1009099     1  0.0000     0.8988 1.000 0.000  0
#> GSM1009113     2  0.0237     0.8090 0.004 0.996  0
#> GSM1009127     1  0.3340     0.8791 0.880 0.120  0
#> GSM1009141     1  0.4399     0.8240 0.812 0.188  0
#> GSM1009155     1  0.6111     0.0475 0.604 0.396  0
#> GSM1009169     3  0.0000     1.0000 0.000 0.000  1
#> GSM1009183     2  0.3752     0.7950 0.144 0.856  0
#> GSM1009197     1  0.0000     0.8988 1.000 0.000  0
#> GSM1009072     2  0.5465     0.6966 0.288 0.712  0
#> GSM1009086     2  0.3551     0.7965 0.132 0.868  0
#> GSM1009100     1  0.0000     0.8988 1.000 0.000  0
#> GSM1009114     2  0.0424     0.8097 0.008 0.992  0
#> GSM1009128     1  0.3340     0.8692 0.880 0.120  0
#> GSM1009142     1  0.3816     0.8571 0.852 0.148  0
#> GSM1009156     1  0.1289     0.8818 0.968 0.032  0
#> GSM1009170     3  0.0000     1.0000 0.000 0.000  1
#> GSM1009184     2  0.4291     0.7953 0.180 0.820  0
#> GSM1009198     1  0.1753     0.8948 0.952 0.048  0
#> GSM1009073     2  0.5465     0.6966 0.288 0.712  0
#> GSM1009087     1  0.1643     0.8804 0.956 0.044  0
#> GSM1009101     1  0.0000     0.8988 1.000 0.000  0
#> GSM1009115     2  0.0237     0.8090 0.004 0.996  0
#> GSM1009129     2  0.0237     0.8090 0.004 0.996  0
#> GSM1009143     1  0.3340     0.8791 0.880 0.120  0
#> GSM1009157     1  0.5678     0.4232 0.684 0.316  0
#> GSM1009171     3  0.0000     1.0000 0.000 0.000  1
#> GSM1009185     1  0.0000     0.8988 1.000 0.000  0
#> GSM1009199     2  0.0592     0.8099 0.012 0.988  0
#> GSM1009074     2  0.5465     0.6966 0.288 0.712  0
#> GSM1009088     1  0.2711     0.8446 0.912 0.088  0
#> GSM1009102     1  0.0000     0.8988 1.000 0.000  0
#> GSM1009116     2  0.0237     0.8090 0.004 0.996  0
#> GSM1009130     2  0.0424     0.8094 0.008 0.992  0
#> GSM1009144     1  0.3686     0.8642 0.860 0.140  0
#> GSM1009158     1  0.0000     0.8988 1.000 0.000  0
#> GSM1009172     3  0.0000     1.0000 0.000 0.000  1
#> GSM1009186     2  0.3816     0.7979 0.148 0.852  0
#> GSM1009200     2  0.6045     0.4725 0.380 0.620  0
#> GSM1009075     2  0.5465     0.6966 0.288 0.712  0
#> GSM1009089     1  0.0000     0.8988 1.000 0.000  0
#> GSM1009103     1  0.0000     0.8988 1.000 0.000  0
#> GSM1009117     2  0.0237     0.8090 0.004 0.996  0
#> GSM1009131     1  0.3267     0.8762 0.884 0.116  0
#> GSM1009145     1  0.1964     0.8947 0.944 0.056  0
#> GSM1009159     1  0.0000     0.8988 1.000 0.000  0
#> GSM1009173     3  0.0000     1.0000 0.000 0.000  1
#> GSM1009187     1  0.5058     0.5782 0.756 0.244  0
#> GSM1009201     1  0.3340     0.8791 0.880 0.120  0

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>            class entropy silhouette    p1    p2 p3    p4
#> GSM1009062     1  0.1576      0.917 0.948 0.048  0 0.004
#> GSM1009076     2  0.5152      0.727 0.316 0.664  0 0.020
#> GSM1009090     1  0.2048      0.938 0.928 0.008  0 0.064
#> GSM1009104     2  0.1557      0.692 0.000 0.944  0 0.056
#> GSM1009118     4  0.0937      0.950 0.012 0.012  0 0.976
#> GSM1009132     4  0.0469      0.971 0.012 0.000  0 0.988
#> GSM1009146     1  0.1807      0.945 0.940 0.008  0 0.052
#> GSM1009160     3  0.0000      1.000 0.000 0.000  1 0.000
#> GSM1009174     2  0.5250      0.725 0.316 0.660  0 0.024
#> GSM1009188     4  0.0817      0.965 0.024 0.000  0 0.976
#> GSM1009063     1  0.1389      0.915 0.952 0.048  0 0.000
#> GSM1009077     2  0.5250      0.725 0.316 0.660  0 0.024
#> GSM1009091     1  0.1722      0.946 0.944 0.008  0 0.048
#> GSM1009105     2  0.1557      0.692 0.000 0.944  0 0.056
#> GSM1009119     4  0.0336      0.971 0.008 0.000  0 0.992
#> GSM1009133     4  0.0336      0.971 0.008 0.000  0 0.992
#> GSM1009147     1  0.1389      0.948 0.952 0.000  0 0.048
#> GSM1009161     3  0.0000      1.000 0.000 0.000  1 0.000
#> GSM1009175     2  0.5403      0.684 0.348 0.628  0 0.024
#> GSM1009189     4  0.0592      0.969 0.016 0.000  0 0.984
#> GSM1009064     1  0.1389      0.915 0.952 0.048  0 0.000
#> GSM1009078     1  0.2101      0.943 0.928 0.012  0 0.060
#> GSM1009092     1  0.1890      0.941 0.936 0.008  0 0.056
#> GSM1009106     2  0.1557      0.692 0.000 0.944  0 0.056
#> GSM1009120     4  0.0336      0.971 0.008 0.000  0 0.992
#> GSM1009134     4  0.0336      0.971 0.008 0.000  0 0.992
#> GSM1009148     1  0.1854      0.947 0.940 0.012  0 0.048
#> GSM1009162     3  0.0000      1.000 0.000 0.000  1 0.000
#> GSM1009176     2  0.5152      0.727 0.316 0.664  0 0.020
#> GSM1009190     4  0.0921      0.962 0.028 0.000  0 0.972
#> GSM1009065     1  0.1389      0.915 0.952 0.048  0 0.000
#> GSM1009079     2  0.5349      0.708 0.336 0.640  0 0.024
#> GSM1009093     1  0.1722      0.946 0.944 0.008  0 0.048
#> GSM1009107     2  0.1557      0.692 0.000 0.944  0 0.056
#> GSM1009121     4  0.0469      0.971 0.012 0.000  0 0.988
#> GSM1009135     4  0.0336      0.971 0.008 0.000  0 0.992
#> GSM1009149     1  0.1807      0.945 0.940 0.008  0 0.052
#> GSM1009163     3  0.0000      1.000 0.000 0.000  1 0.000
#> GSM1009177     2  0.5250      0.725 0.316 0.660  0 0.024
#> GSM1009191     4  0.0592      0.969 0.016 0.000  0 0.984
#> GSM1009066     1  0.1389      0.915 0.952 0.048  0 0.000
#> GSM1009080     2  0.5291      0.716 0.324 0.652  0 0.024
#> GSM1009094     1  0.1722      0.946 0.944 0.008  0 0.048
#> GSM1009108     2  0.1557      0.692 0.000 0.944  0 0.056
#> GSM1009122     4  0.5105      0.473 0.028 0.276  0 0.696
#> GSM1009136     4  0.0336      0.971 0.008 0.000  0 0.992
#> GSM1009150     1  0.1807      0.945 0.940 0.008  0 0.052
#> GSM1009164     3  0.0000      1.000 0.000 0.000  1 0.000
#> GSM1009178     1  0.1854      0.945 0.940 0.012  0 0.048
#> GSM1009192     4  0.2704      0.848 0.124 0.000  0 0.876
#> GSM1009067     1  0.1389      0.915 0.952 0.048  0 0.000
#> GSM1009081     2  0.5152      0.727 0.316 0.664  0 0.020
#> GSM1009095     1  0.1389      0.948 0.952 0.000  0 0.048
#> GSM1009109     2  0.2345      0.687 0.000 0.900  0 0.100
#> GSM1009123     4  0.0336      0.971 0.008 0.000  0 0.992
#> GSM1009137     4  0.0336      0.971 0.008 0.000  0 0.992
#> GSM1009151     1  0.1388      0.942 0.960 0.012  0 0.028
#> GSM1009165     3  0.0000      1.000 0.000 0.000  1 0.000
#> GSM1009179     1  0.2494      0.911 0.916 0.048  0 0.036
#> GSM1009193     4  0.0921      0.962 0.028 0.000  0 0.972
#> GSM1009068     1  0.1576      0.917 0.948 0.048  0 0.004
#> GSM1009082     2  0.5152      0.727 0.316 0.664  0 0.020
#> GSM1009096     1  0.1722      0.946 0.944 0.008  0 0.048
#> GSM1009110     2  0.1557      0.692 0.000 0.944  0 0.056
#> GSM1009124     4  0.0469      0.971 0.012 0.000  0 0.988
#> GSM1009138     4  0.0336      0.971 0.008 0.000  0 0.992
#> GSM1009152     1  0.1584      0.945 0.952 0.012  0 0.036
#> GSM1009166     3  0.0000      1.000 0.000 0.000  1 0.000
#> GSM1009180     1  0.1970      0.943 0.932 0.008  0 0.060
#> GSM1009194     4  0.1297      0.956 0.016 0.020  0 0.964
#> GSM1009069     1  0.3801      0.639 0.780 0.220  0 0.000
#> GSM1009083     2  0.5250      0.725 0.316 0.660  0 0.024
#> GSM1009097     1  0.1722      0.946 0.944 0.008  0 0.048
#> GSM1009111     2  0.1557      0.692 0.000 0.944  0 0.056
#> GSM1009125     2  0.5231      0.580 0.028 0.676  0 0.296
#> GSM1009139     4  0.0336      0.971 0.008 0.000  0 0.992
#> GSM1009153     1  0.0657      0.932 0.984 0.012  0 0.004
#> GSM1009167     3  0.0000      1.000 0.000 0.000  1 0.000
#> GSM1009181     2  0.5250      0.725 0.316 0.660  0 0.024
#> GSM1009195     2  0.6098      0.572 0.068 0.616  0 0.316
#> GSM1009070     1  0.1389      0.948 0.952 0.000  0 0.048
#> GSM1009084     2  0.5623      0.730 0.292 0.660  0 0.048
#> GSM1009098     1  0.1722      0.946 0.944 0.008  0 0.048
#> GSM1009112     2  0.1557      0.692 0.000 0.944  0 0.056
#> GSM1009126     4  0.0336      0.971 0.008 0.000  0 0.992
#> GSM1009140     4  0.0336      0.971 0.008 0.000  0 0.992
#> GSM1009154     1  0.1854      0.947 0.940 0.012  0 0.048
#> GSM1009168     3  0.0000      1.000 0.000 0.000  1 0.000
#> GSM1009182     1  0.4399      0.599 0.768 0.212  0 0.020
#> GSM1009196     1  0.1059      0.938 0.972 0.012  0 0.016
#> GSM1009071     1  0.1389      0.915 0.952 0.048  0 0.000
#> GSM1009085     2  0.5250      0.725 0.316 0.660  0 0.024
#> GSM1009099     1  0.1722      0.946 0.944 0.008  0 0.048
#> GSM1009113     2  0.1557      0.692 0.000 0.944  0 0.056
#> GSM1009127     4  0.0336      0.971 0.008 0.000  0 0.992
#> GSM1009141     4  0.1118      0.943 0.036 0.000  0 0.964
#> GSM1009155     1  0.0657      0.932 0.984 0.012  0 0.004
#> GSM1009169     3  0.0000      1.000 0.000 0.000  1 0.000
#> GSM1009183     2  0.5311      0.711 0.328 0.648  0 0.024
#> GSM1009197     1  0.1722      0.946 0.944 0.008  0 0.048
#> GSM1009072     1  0.1389      0.915 0.952 0.048  0 0.000
#> GSM1009086     2  0.5152      0.727 0.316 0.664  0 0.020
#> GSM1009100     1  0.1722      0.946 0.944 0.008  0 0.048
#> GSM1009114     2  0.1557      0.692 0.000 0.944  0 0.056
#> GSM1009128     4  0.2345      0.868 0.100 0.000  0 0.900
#> GSM1009142     4  0.0336      0.971 0.008 0.000  0 0.992
#> GSM1009156     1  0.1389      0.948 0.952 0.000  0 0.048
#> GSM1009170     3  0.0000      1.000 0.000 0.000  1 0.000
#> GSM1009184     2  0.5233      0.707 0.332 0.648  0 0.020
#> GSM1009198     4  0.1302      0.946 0.044 0.000  0 0.956
#> GSM1009073     1  0.1389      0.915 0.952 0.048  0 0.000
#> GSM1009087     1  0.2101      0.943 0.928 0.012  0 0.060
#> GSM1009101     1  0.1722      0.946 0.944 0.008  0 0.048
#> GSM1009115     2  0.1557      0.692 0.000 0.944  0 0.056
#> GSM1009129     2  0.5300      0.576 0.028 0.664  0 0.308
#> GSM1009143     4  0.0336      0.971 0.008 0.000  0 0.992
#> GSM1009157     1  0.0657      0.932 0.984 0.012  0 0.004
#> GSM1009171     3  0.0000      1.000 0.000 0.000  1 0.000
#> GSM1009185     1  0.1389      0.948 0.952 0.000  0 0.048
#> GSM1009199     2  0.5764      0.310 0.028 0.520  0 0.452
#> GSM1009074     1  0.1389      0.915 0.952 0.048  0 0.000
#> GSM1009088     1  0.1059      0.938 0.972 0.012  0 0.016
#> GSM1009102     1  0.1576      0.947 0.948 0.004  0 0.048
#> GSM1009116     2  0.1557      0.692 0.000 0.944  0 0.056
#> GSM1009130     2  0.6162      0.595 0.076 0.620  0 0.304
#> GSM1009144     4  0.0336      0.971 0.008 0.000  0 0.992
#> GSM1009158     1  0.1389      0.948 0.952 0.000  0 0.048
#> GSM1009172     3  0.0000      1.000 0.000 0.000  1 0.000
#> GSM1009186     2  0.5193      0.717 0.324 0.656  0 0.020
#> GSM1009200     4  0.0469      0.971 0.012 0.000  0 0.988
#> GSM1009075     1  0.1389      0.915 0.952 0.048  0 0.000
#> GSM1009089     1  0.1389      0.948 0.952 0.000  0 0.048
#> GSM1009103     1  0.1722      0.946 0.944 0.008  0 0.048
#> GSM1009117     2  0.1557      0.692 0.000 0.944  0 0.056
#> GSM1009131     4  0.1211      0.949 0.040 0.000  0 0.960
#> GSM1009145     4  0.0817      0.965 0.024 0.000  0 0.976
#> GSM1009159     1  0.1807      0.945 0.940 0.008  0 0.052
#> GSM1009173     3  0.0000      1.000 0.000 0.000  1 0.000
#> GSM1009187     1  0.0657      0.932 0.984 0.012  0 0.004
#> GSM1009201     4  0.0469      0.971 0.012 0.000  0 0.988

show/hide code output

cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#>            class entropy silhouette    p1    p2 p3    p4    p5
#> GSM1009062     4  0.0000      0.999 0.000 0.000  0 1.000 0.000
#> GSM1009076     2  0.0000      0.763 0.000 1.000  0 0.000 0.000
#> GSM1009090     1  0.3732      0.865 0.820 0.056  0 0.120 0.004
#> GSM1009104     5  0.0162      0.999 0.004 0.000  0 0.000 0.996
#> GSM1009118     1  0.1012      0.863 0.968 0.020  0 0.000 0.012
#> GSM1009132     1  0.0404      0.876 0.988 0.000  0 0.000 0.012
#> GSM1009146     1  0.3634      0.867 0.820 0.040  0 0.136 0.004
#> GSM1009160     3  0.0000      1.000 0.000 0.000  1 0.000 0.000
#> GSM1009174     2  0.2424      0.754 0.132 0.868  0 0.000 0.000
#> GSM1009188     1  0.0404      0.876 0.988 0.000  0 0.000 0.012
#> GSM1009063     4  0.0000      0.999 0.000 0.000  0 1.000 0.000
#> GSM1009077     2  0.0000      0.763 0.000 1.000  0 0.000 0.000
#> GSM1009091     1  0.3732      0.865 0.820 0.056  0 0.120 0.004
#> GSM1009105     5  0.0162      0.999 0.004 0.000  0 0.000 0.996
#> GSM1009119     1  0.0404      0.876 0.988 0.000  0 0.000 0.012
#> GSM1009133     1  0.0404      0.876 0.988 0.000  0 0.000 0.012
#> GSM1009147     1  0.3641      0.864 0.820 0.060  0 0.120 0.000
#> GSM1009161     3  0.0000      1.000 0.000 0.000  1 0.000 0.000
#> GSM1009175     2  0.2707      0.750 0.132 0.860  0 0.008 0.000
#> GSM1009189     1  0.0404      0.876 0.988 0.000  0 0.000 0.012
#> GSM1009064     4  0.0162      0.993 0.004 0.000  0 0.996 0.000
#> GSM1009078     1  0.3641      0.864 0.820 0.060  0 0.120 0.000
#> GSM1009092     1  0.3732      0.865 0.820 0.056  0 0.120 0.004
#> GSM1009106     5  0.0162      0.999 0.004 0.000  0 0.000 0.996
#> GSM1009120     1  0.0404      0.876 0.988 0.000  0 0.000 0.012
#> GSM1009134     1  0.0404      0.876 0.988 0.000  0 0.000 0.012
#> GSM1009148     1  0.3048      0.861 0.820 0.000  0 0.176 0.004
#> GSM1009162     3  0.0000      1.000 0.000 0.000  1 0.000 0.000
#> GSM1009176     2  0.0162      0.763 0.004 0.996  0 0.000 0.000
#> GSM1009190     1  0.0404      0.876 0.988 0.000  0 0.000 0.012
#> GSM1009065     4  0.0000      0.999 0.000 0.000  0 1.000 0.000
#> GSM1009079     2  0.2329      0.758 0.124 0.876  0 0.000 0.000
#> GSM1009093     1  0.3732      0.865 0.820 0.056  0 0.120 0.004
#> GSM1009107     5  0.0162      0.999 0.004 0.000  0 0.000 0.996
#> GSM1009121     1  0.0404      0.876 0.988 0.000  0 0.000 0.012
#> GSM1009135     1  0.0404      0.876 0.988 0.000  0 0.000 0.012
#> GSM1009149     1  0.3634      0.866 0.820 0.040  0 0.136 0.004
#> GSM1009163     3  0.0000      1.000 0.000 0.000  1 0.000 0.000
#> GSM1009177     2  0.0000      0.763 0.000 1.000  0 0.000 0.000
#> GSM1009191     1  0.0404      0.876 0.988 0.000  0 0.000 0.012
#> GSM1009066     4  0.0000      0.999 0.000 0.000  0 1.000 0.000
#> GSM1009080     2  0.2329      0.758 0.124 0.876  0 0.000 0.000
#> GSM1009094     1  0.3732      0.865 0.820 0.056  0 0.120 0.004
#> GSM1009108     5  0.0162      0.999 0.004 0.000  0 0.000 0.996
#> GSM1009122     1  0.2624      0.769 0.872 0.116  0 0.000 0.012
#> GSM1009136     1  0.0404      0.876 0.988 0.000  0 0.000 0.012
#> GSM1009150     1  0.3048      0.861 0.820 0.000  0 0.176 0.004
#> GSM1009164     3  0.0000      1.000 0.000 0.000  1 0.000 0.000
#> GSM1009178     1  0.3682      0.861 0.820 0.072  0 0.108 0.000
#> GSM1009192     1  0.1087      0.877 0.968 0.016  0 0.008 0.008
#> GSM1009067     4  0.0000      0.999 0.000 0.000  0 1.000 0.000
#> GSM1009081     2  0.0000      0.763 0.000 1.000  0 0.000 0.000
#> GSM1009095     1  0.3132      0.862 0.820 0.008  0 0.172 0.000
#> GSM1009109     5  0.0510      0.982 0.016 0.000  0 0.000 0.984
#> GSM1009123     1  0.0404      0.876 0.988 0.000  0 0.000 0.012
#> GSM1009137     1  0.0404      0.876 0.988 0.000  0 0.000 0.012
#> GSM1009151     1  0.2929      0.860 0.820 0.000  0 0.180 0.000
#> GSM1009165     3  0.0000      1.000 0.000 0.000  1 0.000 0.000
#> GSM1009179     2  0.5725      0.180 0.428 0.488  0 0.084 0.000
#> GSM1009193     1  0.0404      0.876 0.988 0.000  0 0.000 0.012
#> GSM1009068     4  0.0000      0.999 0.000 0.000  0 1.000 0.000
#> GSM1009082     2  0.0000      0.763 0.000 1.000  0 0.000 0.000
#> GSM1009096     1  0.3712      0.865 0.820 0.052  0 0.124 0.004
#> GSM1009110     5  0.0162      0.999 0.004 0.000  0 0.000 0.996
#> GSM1009124     1  0.0404      0.876 0.988 0.000  0 0.000 0.012
#> GSM1009138     1  0.0404      0.876 0.988 0.000  0 0.000 0.012
#> GSM1009152     1  0.2929      0.860 0.820 0.000  0 0.180 0.000
#> GSM1009166     3  0.0000      1.000 0.000 0.000  1 0.000 0.000
#> GSM1009180     1  0.3682      0.861 0.820 0.072  0 0.108 0.000
#> GSM1009194     1  0.0404      0.876 0.988 0.000  0 0.000 0.012
#> GSM1009069     1  0.3109      0.851 0.800 0.000  0 0.200 0.000
#> GSM1009083     2  0.3752      0.582 0.292 0.708  0 0.000 0.000
#> GSM1009097     1  0.3732      0.865 0.820 0.056  0 0.120 0.004
#> GSM1009111     5  0.0162      0.999 0.004 0.000  0 0.000 0.996
#> GSM1009125     1  0.3586      0.710 0.792 0.020  0 0.000 0.188
#> GSM1009139     1  0.0404      0.876 0.988 0.000  0 0.000 0.012
#> GSM1009153     1  0.2929      0.860 0.820 0.000  0 0.180 0.000
#> GSM1009167     3  0.0000      1.000 0.000 0.000  1 0.000 0.000
#> GSM1009181     2  0.0000      0.763 0.000 1.000  0 0.000 0.000
#> GSM1009195     1  0.3098      0.734 0.836 0.148  0 0.000 0.016
#> GSM1009070     1  0.3048      0.861 0.820 0.000  0 0.176 0.004
#> GSM1009084     2  0.1197      0.770 0.048 0.952  0 0.000 0.000
#> GSM1009098     1  0.3732      0.865 0.820 0.056  0 0.120 0.004
#> GSM1009112     5  0.0162      0.999 0.004 0.000  0 0.000 0.996
#> GSM1009126     1  0.0404      0.876 0.988 0.000  0 0.000 0.012
#> GSM1009140     1  0.0404      0.876 0.988 0.000  0 0.000 0.012
#> GSM1009154     1  0.2929      0.860 0.820 0.000  0 0.180 0.000
#> GSM1009168     3  0.0000      1.000 0.000 0.000  1 0.000 0.000
#> GSM1009182     2  0.4113      0.689 0.140 0.784  0 0.076 0.000
#> GSM1009196     1  0.3203      0.863 0.820 0.012  0 0.168 0.000
#> GSM1009071     4  0.0000      0.999 0.000 0.000  0 1.000 0.000
#> GSM1009085     2  0.0000      0.763 0.000 1.000  0 0.000 0.000
#> GSM1009099     1  0.3712      0.865 0.820 0.052  0 0.124 0.004
#> GSM1009113     5  0.0162      0.999 0.004 0.000  0 0.000 0.996
#> GSM1009127     1  0.0404      0.876 0.988 0.000  0 0.000 0.012
#> GSM1009141     1  0.0404      0.876 0.988 0.000  0 0.000 0.012
#> GSM1009155     1  0.3132      0.862 0.820 0.008  0 0.172 0.000
#> GSM1009169     3  0.0000      1.000 0.000 0.000  1 0.000 0.000
#> GSM1009183     2  0.1041      0.769 0.032 0.964  0 0.004 0.000
#> GSM1009197     1  0.3732      0.865 0.820 0.056  0 0.120 0.004
#> GSM1009072     4  0.0000      0.999 0.000 0.000  0 1.000 0.000
#> GSM1009086     2  0.0000      0.763 0.000 1.000  0 0.000 0.000
#> GSM1009100     1  0.3732      0.865 0.820 0.056  0 0.120 0.004
#> GSM1009114     5  0.0162      0.999 0.004 0.000  0 0.000 0.996
#> GSM1009128     1  0.0912      0.877 0.972 0.000  0 0.016 0.012
#> GSM1009142     1  0.0404      0.876 0.988 0.000  0 0.000 0.012
#> GSM1009156     1  0.3622      0.865 0.820 0.056  0 0.124 0.000
#> GSM1009170     3  0.0000      1.000 0.000 0.000  1 0.000 0.000
#> GSM1009184     2  0.4376      0.668 0.144 0.764  0 0.092 0.000
#> GSM1009198     1  0.0693      0.877 0.980 0.000  0 0.008 0.012
#> GSM1009073     4  0.0000      0.999 0.000 0.000  0 1.000 0.000
#> GSM1009087     1  0.3657      0.863 0.820 0.064  0 0.116 0.000
#> GSM1009101     1  0.3712      0.865 0.820 0.052  0 0.124 0.004
#> GSM1009115     5  0.0162      0.999 0.004 0.000  0 0.000 0.996
#> GSM1009129     1  0.3526      0.753 0.832 0.072  0 0.000 0.096
#> GSM1009143     1  0.0404      0.876 0.988 0.000  0 0.000 0.012
#> GSM1009157     2  0.6124      0.170 0.412 0.460  0 0.128 0.000
#> GSM1009171     3  0.0000      1.000 0.000 0.000  1 0.000 0.000
#> GSM1009185     1  0.3641      0.864 0.820 0.060  0 0.120 0.000
#> GSM1009199     1  0.2351      0.801 0.896 0.088  0 0.000 0.016
#> GSM1009074     4  0.0000      0.999 0.000 0.000  0 1.000 0.000
#> GSM1009088     1  0.3622      0.865 0.820 0.056  0 0.124 0.000
#> GSM1009102     1  0.3048      0.861 0.820 0.000  0 0.176 0.004
#> GSM1009116     5  0.0162      0.999 0.004 0.000  0 0.000 0.996
#> GSM1009130     1  0.2873      0.758 0.860 0.120  0 0.000 0.020
#> GSM1009144     1  0.0404      0.876 0.988 0.000  0 0.000 0.012
#> GSM1009158     1  0.3203      0.863 0.820 0.012  0 0.168 0.000
#> GSM1009172     3  0.0000      1.000 0.000 0.000  1 0.000 0.000
#> GSM1009186     2  0.5815      0.374 0.356 0.540  0 0.104 0.000
#> GSM1009200     1  0.0404      0.876 0.988 0.000  0 0.000 0.012
#> GSM1009075     4  0.0000      0.999 0.000 0.000  0 1.000 0.000
#> GSM1009089     1  0.3521      0.866 0.820 0.040  0 0.140 0.000
#> GSM1009103     1  0.3048      0.861 0.820 0.000  0 0.176 0.004
#> GSM1009117     5  0.0162      0.999 0.004 0.000  0 0.000 0.996
#> GSM1009131     1  0.0404      0.876 0.988 0.000  0 0.000 0.012
#> GSM1009145     1  0.0404      0.876 0.988 0.000  0 0.000 0.012
#> GSM1009159     1  0.3663      0.866 0.820 0.044  0 0.132 0.004
#> GSM1009173     3  0.0000      1.000 0.000 0.000  1 0.000 0.000
#> GSM1009187     1  0.3203      0.863 0.820 0.012  0 0.168 0.000
#> GSM1009201     1  0.0404      0.876 0.988 0.000  0 0.000 0.012

show/hide code output

cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#>            class entropy silhouette    p1    p2 p3    p4    p5    p6
#> GSM1009062     6  0.0260      0.962 0.000 0.000  0 0.008 0.000 0.992
#> GSM1009076     2  0.0000      0.808 0.000 1.000  0 0.000 0.000 0.000
#> GSM1009090     4  0.2454      0.819 0.160 0.000  0 0.840 0.000 0.000
#> GSM1009104     5  0.0000      0.993 0.000 0.000  0 0.000 1.000 0.000
#> GSM1009118     1  0.1895      0.928 0.912 0.016  0 0.072 0.000 0.000
#> GSM1009132     1  0.1501      0.931 0.924 0.000  0 0.076 0.000 0.000
#> GSM1009146     4  0.0937      0.925 0.040 0.000  0 0.960 0.000 0.000
#> GSM1009160     3  0.0000      1.000 0.000 0.000  1 0.000 0.000 0.000
#> GSM1009174     2  0.1542      0.815 0.004 0.936  0 0.052 0.008 0.000
#> GSM1009188     1  0.1556      0.930 0.920 0.000  0 0.080 0.000 0.000
#> GSM1009063     6  0.0000      0.967 0.000 0.000  0 0.000 0.000 1.000
#> GSM1009077     2  0.0000      0.808 0.000 1.000  0 0.000 0.000 0.000
#> GSM1009091     4  0.2378      0.820 0.152 0.000  0 0.848 0.000 0.000
#> GSM1009105     5  0.0000      0.993 0.000 0.000  0 0.000 1.000 0.000
#> GSM1009119     1  0.0000      0.918 1.000 0.000  0 0.000 0.000 0.000
#> GSM1009133     1  0.0000      0.918 1.000 0.000  0 0.000 0.000 0.000
#> GSM1009147     4  0.0692      0.924 0.020 0.004  0 0.976 0.000 0.000
#> GSM1009161     3  0.0000      1.000 0.000 0.000  1 0.000 0.000 0.000
#> GSM1009175     2  0.2980      0.765 0.008 0.800  0 0.192 0.000 0.000
#> GSM1009189     1  0.1501      0.931 0.924 0.000  0 0.076 0.000 0.000
#> GSM1009064     6  0.0146      0.963 0.000 0.000  0 0.004 0.000 0.996
#> GSM1009078     4  0.0692      0.925 0.020 0.004  0 0.976 0.000 0.000
#> GSM1009092     4  0.2562      0.803 0.172 0.000  0 0.828 0.000 0.000
#> GSM1009106     5  0.0000      0.993 0.000 0.000  0 0.000 1.000 0.000
#> GSM1009120     1  0.0146      0.920 0.996 0.000  0 0.004 0.000 0.000
#> GSM1009134     1  0.0000      0.918 1.000 0.000  0 0.000 0.000 0.000
#> GSM1009148     4  0.1010      0.923 0.036 0.000  0 0.960 0.000 0.004
#> GSM1009162     3  0.0000      1.000 0.000 0.000  1 0.000 0.000 0.000
#> GSM1009176     2  0.0405      0.812 0.008 0.988  0 0.004 0.000 0.000
#> GSM1009190     1  0.1501      0.931 0.924 0.000  0 0.076 0.000 0.000
#> GSM1009065     6  0.0000      0.967 0.000 0.000  0 0.000 0.000 1.000
#> GSM1009079     2  0.2933      0.761 0.004 0.796  0 0.200 0.000 0.000
#> GSM1009093     4  0.2048      0.857 0.120 0.000  0 0.880 0.000 0.000
#> GSM1009107     5  0.0000      0.993 0.000 0.000  0 0.000 1.000 0.000
#> GSM1009121     1  0.1501      0.931 0.924 0.000  0 0.076 0.000 0.000
#> GSM1009135     1  0.0000      0.918 1.000 0.000  0 0.000 0.000 0.000
#> GSM1009149     4  0.0865      0.924 0.036 0.000  0 0.964 0.000 0.000
#> GSM1009163     3  0.0000      1.000 0.000 0.000  1 0.000 0.000 0.000
#> GSM1009177     2  0.0291      0.812 0.004 0.992  0 0.004 0.000 0.000
#> GSM1009191     1  0.1501      0.931 0.924 0.000  0 0.076 0.000 0.000
#> GSM1009066     6  0.0000      0.967 0.000 0.000  0 0.000 0.000 1.000
#> GSM1009080     2  0.1644      0.816 0.004 0.920  0 0.076 0.000 0.000
#> GSM1009094     4  0.2048      0.857 0.120 0.000  0 0.880 0.000 0.000
#> GSM1009108     5  0.0146      0.990 0.000 0.004  0 0.000 0.996 0.000
#> GSM1009122     1  0.2978      0.886 0.856 0.084  0 0.052 0.008 0.000
#> GSM1009136     1  0.1075      0.929 0.952 0.000  0 0.048 0.000 0.000
#> GSM1009150     4  0.1010      0.923 0.036 0.000  0 0.960 0.000 0.004
#> GSM1009164     3  0.0000      1.000 0.000 0.000  1 0.000 0.000 0.000
#> GSM1009178     4  0.1829      0.889 0.024 0.056  0 0.920 0.000 0.000
#> GSM1009192     1  0.2793      0.808 0.800 0.000  0 0.200 0.000 0.000
#> GSM1009067     6  0.0000      0.967 0.000 0.000  0 0.000 0.000 1.000
#> GSM1009081     2  0.0000      0.808 0.000 1.000  0 0.000 0.000 0.000
#> GSM1009095     4  0.0790      0.925 0.032 0.000  0 0.968 0.000 0.000
#> GSM1009109     5  0.1434      0.925 0.048 0.012  0 0.000 0.940 0.000
#> GSM1009123     1  0.1141      0.929 0.948 0.000  0 0.052 0.000 0.000
#> GSM1009137     1  0.0000      0.918 1.000 0.000  0 0.000 0.000 0.000
#> GSM1009151     4  0.1010      0.923 0.036 0.000  0 0.960 0.000 0.004
#> GSM1009165     3  0.0000      1.000 0.000 0.000  1 0.000 0.000 0.000
#> GSM1009179     2  0.4157      0.403 0.012 0.544  0 0.444 0.000 0.000
#> GSM1009193     1  0.1556      0.930 0.920 0.000  0 0.080 0.000 0.000
#> GSM1009068     6  0.0260      0.962 0.000 0.000  0 0.008 0.000 0.992
#> GSM1009082     2  0.0000      0.808 0.000 1.000  0 0.000 0.000 0.000
#> GSM1009096     4  0.2092      0.853 0.124 0.000  0 0.876 0.000 0.000
#> GSM1009110     5  0.0363      0.983 0.000 0.012  0 0.000 0.988 0.000
#> GSM1009124     1  0.1501      0.931 0.924 0.000  0 0.076 0.000 0.000
#> GSM1009138     1  0.0000      0.918 1.000 0.000  0 0.000 0.000 0.000
#> GSM1009152     4  0.1010      0.923 0.036 0.000  0 0.960 0.000 0.004
#> GSM1009166     3  0.0000      1.000 0.000 0.000  1 0.000 0.000 0.000
#> GSM1009180     4  0.1649      0.903 0.032 0.036  0 0.932 0.000 0.000
#> GSM1009194     1  0.3522      0.849 0.800 0.128  0 0.072 0.000 0.000
#> GSM1009069     6  0.4231      0.579 0.028 0.012  0 0.224 0.008 0.728
#> GSM1009083     2  0.1841      0.814 0.008 0.920  0 0.064 0.008 0.000
#> GSM1009097     4  0.2048      0.857 0.120 0.000  0 0.880 0.000 0.000
#> GSM1009111     5  0.0000      0.993 0.000 0.000  0 0.000 1.000 0.000
#> GSM1009125     1  0.4494      0.765 0.732 0.036  0 0.048 0.184 0.000
#> GSM1009139     1  0.0713      0.927 0.972 0.000  0 0.028 0.000 0.000
#> GSM1009153     4  0.1124      0.922 0.036 0.000  0 0.956 0.000 0.008
#> GSM1009167     3  0.0000      1.000 0.000 0.000  1 0.000 0.000 0.000
#> GSM1009181     2  0.0260      0.812 0.000 0.992  0 0.008 0.000 0.000
#> GSM1009195     1  0.4643      0.606 0.640 0.304  0 0.048 0.008 0.000
#> GSM1009070     4  0.0790      0.924 0.032 0.000  0 0.968 0.000 0.000
#> GSM1009084     2  0.2078      0.794 0.044 0.912  0 0.040 0.004 0.000
#> GSM1009098     4  0.2048      0.857 0.120 0.000  0 0.880 0.000 0.000
#> GSM1009112     5  0.0000      0.993 0.000 0.000  0 0.000 1.000 0.000
#> GSM1009126     1  0.1444      0.931 0.928 0.000  0 0.072 0.000 0.000
#> GSM1009140     1  0.0000      0.918 1.000 0.000  0 0.000 0.000 0.000
#> GSM1009154     4  0.1010      0.923 0.036 0.000  0 0.960 0.000 0.004
#> GSM1009168     3  0.0000      1.000 0.000 0.000  1 0.000 0.000 0.000
#> GSM1009182     2  0.3690      0.640 0.008 0.684  0 0.308 0.000 0.000
#> GSM1009196     4  0.0692      0.925 0.020 0.004  0 0.976 0.000 0.000
#> GSM1009071     6  0.0000      0.967 0.000 0.000  0 0.000 0.000 1.000
#> GSM1009085     2  0.1957      0.799 0.000 0.888  0 0.112 0.000 0.000
#> GSM1009099     4  0.0260      0.920 0.008 0.000  0 0.992 0.000 0.000
#> GSM1009113     5  0.0000      0.993 0.000 0.000  0 0.000 1.000 0.000
#> GSM1009127     1  0.0000      0.918 1.000 0.000  0 0.000 0.000 0.000
#> GSM1009141     1  0.1141      0.929 0.948 0.000  0 0.052 0.000 0.000
#> GSM1009155     4  0.1080      0.924 0.032 0.004  0 0.960 0.000 0.004
#> GSM1009169     3  0.0000      1.000 0.000 0.000  1 0.000 0.000 0.000
#> GSM1009183     2  0.2513      0.790 0.008 0.852  0 0.140 0.000 0.000
#> GSM1009197     4  0.1610      0.890 0.084 0.000  0 0.916 0.000 0.000
#> GSM1009072     6  0.0000      0.967 0.000 0.000  0 0.000 0.000 1.000
#> GSM1009086     2  0.0000      0.808 0.000 1.000  0 0.000 0.000 0.000
#> GSM1009100     4  0.2048      0.857 0.120 0.000  0 0.880 0.000 0.000
#> GSM1009114     5  0.0000      0.993 0.000 0.000  0 0.000 1.000 0.000
#> GSM1009128     1  0.2542      0.913 0.876 0.000  0 0.080 0.044 0.000
#> GSM1009142     1  0.0146      0.920 0.996 0.000  0 0.004 0.000 0.000
#> GSM1009156     4  0.0603      0.923 0.016 0.004  0 0.980 0.000 0.000
#> GSM1009170     3  0.0000      1.000 0.000 0.000  1 0.000 0.000 0.000
#> GSM1009184     2  0.4076      0.391 0.008 0.540  0 0.452 0.000 0.000
#> GSM1009198     1  0.1556      0.930 0.920 0.000  0 0.080 0.000 0.000
#> GSM1009073     6  0.0000      0.967 0.000 0.000  0 0.000 0.000 1.000
#> GSM1009087     4  0.0806      0.925 0.020 0.008  0 0.972 0.000 0.000
#> GSM1009101     4  0.2048      0.857 0.120 0.000  0 0.880 0.000 0.000
#> GSM1009115     5  0.0000      0.993 0.000 0.000  0 0.000 1.000 0.000
#> GSM1009129     1  0.4467      0.805 0.756 0.064  0 0.048 0.132 0.000
#> GSM1009143     1  0.0000      0.918 1.000 0.000  0 0.000 0.000 0.000
#> GSM1009157     4  0.2896      0.755 0.016 0.160  0 0.824 0.000 0.000
#> GSM1009171     3  0.0000      1.000 0.000 0.000  1 0.000 0.000 0.000
#> GSM1009185     4  0.0603      0.923 0.016 0.004  0 0.980 0.000 0.000
#> GSM1009199     1  0.3895      0.805 0.768 0.172  0 0.052 0.008 0.000
#> GSM1009074     6  0.0000      0.967 0.000 0.000  0 0.000 0.000 1.000
#> GSM1009088     4  0.0806      0.925 0.020 0.008  0 0.972 0.000 0.000
#> GSM1009102     4  0.0713      0.925 0.028 0.000  0 0.972 0.000 0.000
#> GSM1009116     5  0.0000      0.993 0.000 0.000  0 0.000 1.000 0.000
#> GSM1009130     1  0.3681      0.824 0.796 0.144  0 0.048 0.012 0.000
#> GSM1009144     1  0.0000      0.918 1.000 0.000  0 0.000 0.000 0.000
#> GSM1009158     4  0.0777      0.925 0.024 0.004  0 0.972 0.000 0.000
#> GSM1009172     3  0.0000      1.000 0.000 0.000  1 0.000 0.000 0.000
#> GSM1009186     2  0.4389      0.393 0.012 0.536  0 0.444 0.008 0.000
#> GSM1009200     1  0.1501      0.931 0.924 0.000  0 0.076 0.000 0.000
#> GSM1009075     6  0.0000      0.967 0.000 0.000  0 0.000 0.000 1.000
#> GSM1009089     4  0.0291      0.920 0.004 0.004  0 0.992 0.000 0.000
#> GSM1009103     4  0.0713      0.925 0.028 0.000  0 0.972 0.000 0.000
#> GSM1009117     5  0.0000      0.993 0.000 0.000  0 0.000 1.000 0.000
#> GSM1009131     1  0.1501      0.931 0.924 0.000  0 0.076 0.000 0.000
#> GSM1009145     1  0.1387      0.927 0.932 0.000  0 0.068 0.000 0.000
#> GSM1009159     4  0.0790      0.924 0.032 0.000  0 0.968 0.000 0.000
#> GSM1009173     3  0.0000      1.000 0.000 0.000  1 0.000 0.000 0.000
#> GSM1009187     4  0.0748      0.925 0.016 0.004  0 0.976 0.000 0.004
#> GSM1009201     1  0.1501      0.931 0.924 0.000  0 0.076 0.000 0.000

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

consensus_heatmap(res, k = 2)

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

consensus_heatmap(res, k = 3)

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

consensus_heatmap(res, k = 4)

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

consensus_heatmap(res, k = 5)

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

consensus_heatmap(res, k = 6)

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

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

membership_heatmap(res, k = 2)

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

membership_heatmap(res, k = 3)

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

membership_heatmap(res, k = 4)

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

membership_heatmap(res, k = 5)

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

membership_heatmap(res, k = 6)

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

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

Signature heatmaps where rows are scaled:

get_signatures(res, k = 2)

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

get_signatures(res, k = 3)

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

get_signatures(res, k = 4)

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

get_signatures(res, k = 5)

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

get_signatures(res, k = 6)

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

Signature heatmaps where rows are not scaled:

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

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

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

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

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

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

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

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

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

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

Compare the overlap of signatures from different k:

compare_signatures(res)

plot of chunk ATC-mclust-signature_compare

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

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

An example of the output of tb is:

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

The columns in tb are:

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

UMAP plot which shows how samples are separated.

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

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

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

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

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

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

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

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

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

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

Following heatmap shows how subgroups are split when increasing k:

collect_classes(res)

plot of chunk ATC-mclust-collect-classes

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

test_to_known_factors(res)
#>              n temperature(p) time(p) specimen(p) k
#> ATC:mclust 140          1.000   1.000    1.03e-25 2
#> ATC:mclust 133          0.961   0.997    1.99e-34 3
#> ATC:mclust 138          0.994   1.000    1.49e-55 4
#> ATC:mclust 137          0.982   1.000    9.07e-78 5
#> ATC:mclust 137          0.980   1.000    1.32e-97 6

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


ATC:NMF**

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

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

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

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

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

collect_plots(res)

plot of chunk ATC-NMF-collect-plots

The plots are:

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

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

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

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

select_partition_number(res)

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

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

get_stats(res)
#>   k 1-PAC mean_silhouette concordance area_increased  Rand Jaccard
#> 2 2 1.000           0.971       0.988         0.4896 0.509   0.509
#> 3 3 0.789           0.863       0.921         0.3092 0.805   0.630
#> 4 4 0.791           0.820       0.905         0.1091 0.873   0.673
#> 5 5 0.766           0.812       0.881         0.0865 0.849   0.550
#> 6 6 0.802           0.815       0.887         0.0556 0.907   0.630

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
#> GSM1009062     1   0.000      0.993 1.000 0.000
#> GSM1009076     2   0.000      0.979 0.000 1.000
#> GSM1009090     1   0.000      0.993 1.000 0.000
#> GSM1009104     2   0.000      0.979 0.000 1.000
#> GSM1009118     2   0.000      0.979 0.000 1.000
#> GSM1009132     2   0.821      0.667 0.256 0.744
#> GSM1009146     1   0.000      0.993 1.000 0.000
#> GSM1009160     2   0.000      0.979 0.000 1.000
#> GSM1009174     2   0.000      0.979 0.000 1.000
#> GSM1009188     1   0.000      0.993 1.000 0.000
#> GSM1009063     1   0.000      0.993 1.000 0.000
#> GSM1009077     2   0.000      0.979 0.000 1.000
#> GSM1009091     1   0.000      0.993 1.000 0.000
#> GSM1009105     2   0.000      0.979 0.000 1.000
#> GSM1009119     1   0.000      0.993 1.000 0.000
#> GSM1009133     1   0.000      0.993 1.000 0.000
#> GSM1009147     1   0.000      0.993 1.000 0.000
#> GSM1009161     2   0.000      0.979 0.000 1.000
#> GSM1009175     2   0.000      0.979 0.000 1.000
#> GSM1009189     1   0.000      0.993 1.000 0.000
#> GSM1009064     1   0.000      0.993 1.000 0.000
#> GSM1009078     1   0.000      0.993 1.000 0.000
#> GSM1009092     1   0.000      0.993 1.000 0.000
#> GSM1009106     2   0.000      0.979 0.000 1.000
#> GSM1009120     1   0.000      0.993 1.000 0.000
#> GSM1009134     1   0.000      0.993 1.000 0.000
#> GSM1009148     1   0.000      0.993 1.000 0.000
#> GSM1009162     2   0.000      0.979 0.000 1.000
#> GSM1009176     2   0.000      0.979 0.000 1.000
#> GSM1009190     1   0.000      0.993 1.000 0.000
#> GSM1009065     1   0.000      0.993 1.000 0.000
#> GSM1009079     2   0.000      0.979 0.000 1.000
#> GSM1009093     1   0.000      0.993 1.000 0.000
#> GSM1009107     2   0.000      0.979 0.000 1.000
#> GSM1009121     2   0.000      0.979 0.000 1.000
#> GSM1009135     1   0.000      0.993 1.000 0.000
#> GSM1009149     1   0.000      0.993 1.000 0.000
#> GSM1009163     2   0.000      0.979 0.000 1.000
#> GSM1009177     2   0.000      0.979 0.000 1.000
#> GSM1009191     2   0.886      0.579 0.304 0.696
#> GSM1009066     1   0.000      0.993 1.000 0.000
#> GSM1009080     2   0.000      0.979 0.000 1.000
#> GSM1009094     1   0.000      0.993 1.000 0.000
#> GSM1009108     2   0.000      0.979 0.000 1.000
#> GSM1009122     2   0.000      0.979 0.000 1.000
#> GSM1009136     1   0.000      0.993 1.000 0.000
#> GSM1009150     1   0.000      0.993 1.000 0.000
#> GSM1009164     2   0.000      0.979 0.000 1.000
#> GSM1009178     1   0.000      0.993 1.000 0.000
#> GSM1009192     1   0.000      0.993 1.000 0.000
#> GSM1009067     1   0.000      0.993 1.000 0.000
#> GSM1009081     2   0.000      0.979 0.000 1.000
#> GSM1009095     1   0.000      0.993 1.000 0.000
#> GSM1009109     2   0.000      0.979 0.000 1.000
#> GSM1009123     1   0.000      0.993 1.000 0.000
#> GSM1009137     1   0.000      0.993 1.000 0.000
#> GSM1009151     1   0.000      0.993 1.000 0.000
#> GSM1009165     2   0.000      0.979 0.000 1.000
#> GSM1009179     1   0.767      0.702 0.776 0.224
#> GSM1009193     1   0.000      0.993 1.000 0.000
#> GSM1009068     1   0.000      0.993 1.000 0.000
#> GSM1009082     2   0.000      0.979 0.000 1.000
#> GSM1009096     1   0.000      0.993 1.000 0.000
#> GSM1009110     2   0.000      0.979 0.000 1.000
#> GSM1009124     1   0.000      0.993 1.000 0.000
#> GSM1009138     1   0.000      0.993 1.000 0.000
#> GSM1009152     1   0.000      0.993 1.000 0.000
#> GSM1009166     2   0.000      0.979 0.000 1.000
#> GSM1009180     1   0.000      0.993 1.000 0.000
#> GSM1009194     2   0.932      0.485 0.348 0.652
#> GSM1009069     1   0.000      0.993 1.000 0.000
#> GSM1009083     2   0.000      0.979 0.000 1.000
#> GSM1009097     1   0.000      0.993 1.000 0.000
#> GSM1009111     2   0.000      0.979 0.000 1.000
#> GSM1009125     2   0.000      0.979 0.000 1.000
#> GSM1009139     2   0.781      0.706 0.232 0.768
#> GSM1009153     1   0.000      0.993 1.000 0.000
#> GSM1009167     2   0.000      0.979 0.000 1.000
#> GSM1009181     2   0.000      0.979 0.000 1.000
#> GSM1009195     2   0.000      0.979 0.000 1.000
#> GSM1009070     1   0.000      0.993 1.000 0.000
#> GSM1009084     2   0.000      0.979 0.000 1.000
#> GSM1009098     1   0.000      0.993 1.000 0.000
#> GSM1009112     2   0.000      0.979 0.000 1.000
#> GSM1009126     1   0.000      0.993 1.000 0.000
#> GSM1009140     1   0.000      0.993 1.000 0.000
#> GSM1009154     1   0.000      0.993 1.000 0.000
#> GSM1009168     2   0.000      0.979 0.000 1.000
#> GSM1009182     2   0.278      0.935 0.048 0.952
#> GSM1009196     1   0.000      0.993 1.000 0.000
#> GSM1009071     1   0.000      0.993 1.000 0.000
#> GSM1009085     2   0.000      0.979 0.000 1.000
#> GSM1009099     1   0.000      0.993 1.000 0.000
#> GSM1009113     2   0.000      0.979 0.000 1.000
#> GSM1009127     1   0.000      0.993 1.000 0.000
#> GSM1009141     1   0.000      0.993 1.000 0.000
#> GSM1009155     1   0.000      0.993 1.000 0.000
#> GSM1009169     2   0.000      0.979 0.000 1.000
#> GSM1009183     2   0.000      0.979 0.000 1.000
#> GSM1009197     1   0.000      0.993 1.000 0.000
#> GSM1009072     1   0.000      0.993 1.000 0.000
#> GSM1009086     2   0.000      0.979 0.000 1.000
#> GSM1009100     1   0.000      0.993 1.000 0.000
#> GSM1009114     2   0.000      0.979 0.000 1.000
#> GSM1009128     1   0.000      0.993 1.000 0.000
#> GSM1009142     1   0.000      0.993 1.000 0.000
#> GSM1009156     1   0.000      0.993 1.000 0.000
#> GSM1009170     2   0.000      0.979 0.000 1.000
#> GSM1009184     2   0.000      0.979 0.000 1.000
#> GSM1009198     1   0.000      0.993 1.000 0.000
#> GSM1009073     1   0.000      0.993 1.000 0.000
#> GSM1009087     1   0.000      0.993 1.000 0.000
#> GSM1009101     1   0.000      0.993 1.000 0.000
#> GSM1009115     2   0.000      0.979 0.000 1.000
#> GSM1009129     2   0.000      0.979 0.000 1.000
#> GSM1009143     1   0.000      0.993 1.000 0.000
#> GSM1009157     1   0.000      0.993 1.000 0.000
#> GSM1009171     2   0.000      0.979 0.000 1.000
#> GSM1009185     1   0.000      0.993 1.000 0.000
#> GSM1009199     2   0.000      0.979 0.000 1.000
#> GSM1009074     1   0.000      0.993 1.000 0.000
#> GSM1009088     1   0.000      0.993 1.000 0.000
#> GSM1009102     1   0.000      0.993 1.000 0.000
#> GSM1009116     2   0.000      0.979 0.000 1.000
#> GSM1009130     2   0.000      0.979 0.000 1.000
#> GSM1009144     1   0.000      0.993 1.000 0.000
#> GSM1009158     1   0.000      0.993 1.000 0.000
#> GSM1009172     2   0.000      0.979 0.000 1.000
#> GSM1009186     2   0.000      0.979 0.000 1.000
#> GSM1009200     1   0.871      0.575 0.708 0.292
#> GSM1009075     1   0.000      0.993 1.000 0.000
#> GSM1009089     1   0.000      0.993 1.000 0.000
#> GSM1009103     1   0.000      0.993 1.000 0.000
#> GSM1009117     2   0.000      0.979 0.000 1.000
#> GSM1009131     1   0.000      0.993 1.000 0.000
#> GSM1009145     1   0.000      0.993 1.000 0.000
#> GSM1009159     1   0.000      0.993 1.000 0.000
#> GSM1009173     2   0.000      0.979 0.000 1.000
#> GSM1009187     1   0.000      0.993 1.000 0.000
#> GSM1009201     1   0.000      0.993 1.000 0.000

show/hide code output

cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#>            class entropy silhouette    p1    p2    p3
#> GSM1009062     3  0.2959      0.848 0.100 0.000 0.900
#> GSM1009076     2  0.2537      0.896 0.000 0.920 0.080
#> GSM1009090     1  0.0000      0.966 1.000 0.000 0.000
#> GSM1009104     2  0.0000      0.921 0.000 1.000 0.000
#> GSM1009118     2  0.0747      0.919 0.000 0.984 0.016
#> GSM1009132     2  0.0424      0.921 0.000 0.992 0.008
#> GSM1009146     1  0.1529      0.953 0.960 0.000 0.040
#> GSM1009160     2  0.2261      0.913 0.000 0.932 0.068
#> GSM1009174     3  0.5905      0.328 0.000 0.352 0.648
#> GSM1009188     1  0.0000      0.966 1.000 0.000 0.000
#> GSM1009063     3  0.2537      0.853 0.080 0.000 0.920
#> GSM1009077     2  0.6235      0.382 0.000 0.564 0.436
#> GSM1009091     1  0.0000      0.966 1.000 0.000 0.000
#> GSM1009105     2  0.0000      0.921 0.000 1.000 0.000
#> GSM1009119     1  0.0000      0.966 1.000 0.000 0.000
#> GSM1009133     1  0.0424      0.961 0.992 0.008 0.000
#> GSM1009147     1  0.1163      0.960 0.972 0.000 0.028
#> GSM1009161     2  0.2261      0.913 0.000 0.932 0.068
#> GSM1009175     3  0.6309     -0.211 0.000 0.496 0.504
#> GSM1009189     1  0.0424      0.966 0.992 0.000 0.008
#> GSM1009064     3  0.2261      0.850 0.068 0.000 0.932
#> GSM1009078     1  0.1964      0.940 0.944 0.000 0.056
#> GSM1009092     1  0.0000      0.966 1.000 0.000 0.000
#> GSM1009106     2  0.0000      0.921 0.000 1.000 0.000
#> GSM1009120     1  0.0000      0.966 1.000 0.000 0.000
#> GSM1009134     1  0.1289      0.958 0.968 0.000 0.032
#> GSM1009148     1  0.6045      0.296 0.620 0.000 0.380
#> GSM1009162     2  0.2261      0.913 0.000 0.932 0.068
#> GSM1009176     2  0.2878      0.898 0.000 0.904 0.096
#> GSM1009190     1  0.0237      0.964 0.996 0.004 0.000
#> GSM1009065     3  0.2356      0.851 0.072 0.000 0.928
#> GSM1009079     2  0.2878      0.908 0.000 0.904 0.096
#> GSM1009093     1  0.0000      0.966 1.000 0.000 0.000
#> GSM1009107     2  0.0000      0.921 0.000 1.000 0.000
#> GSM1009121     2  0.0237      0.921 0.000 0.996 0.004
#> GSM1009135     1  0.1585      0.959 0.964 0.008 0.028
#> GSM1009149     1  0.0892      0.963 0.980 0.000 0.020
#> GSM1009163     2  0.2261      0.913 0.000 0.932 0.068
#> GSM1009177     2  0.4002      0.855 0.000 0.840 0.160
#> GSM1009191     2  0.0475      0.920 0.004 0.992 0.004
#> GSM1009066     3  0.2261      0.850 0.068 0.000 0.932
#> GSM1009080     2  0.2356      0.913 0.000 0.928 0.072
#> GSM1009094     1  0.0000      0.966 1.000 0.000 0.000
#> GSM1009108     2  0.0237      0.921 0.000 0.996 0.004
#> GSM1009122     2  0.1031      0.917 0.000 0.976 0.024
#> GSM1009136     1  0.0000      0.966 1.000 0.000 0.000
#> GSM1009150     1  0.1529      0.952 0.960 0.000 0.040
#> GSM1009164     2  0.2261      0.913 0.000 0.932 0.068
#> GSM1009178     3  0.8226      0.568 0.320 0.096 0.584
#> GSM1009192     1  0.1031      0.962 0.976 0.000 0.024
#> GSM1009067     3  0.2959      0.848 0.100 0.000 0.900
#> GSM1009081     2  0.2796      0.886 0.000 0.908 0.092
#> GSM1009095     1  0.1163      0.960 0.972 0.000 0.028
#> GSM1009109     2  0.0000      0.921 0.000 1.000 0.000
#> GSM1009123     1  0.0000      0.966 1.000 0.000 0.000
#> GSM1009137     1  0.0661      0.963 0.988 0.008 0.004
#> GSM1009151     3  0.6267      0.297 0.452 0.000 0.548
#> GSM1009165     2  0.2261      0.913 0.000 0.932 0.068
#> GSM1009179     3  0.6229      0.721 0.064 0.172 0.764
#> GSM1009193     1  0.0000      0.966 1.000 0.000 0.000
#> GSM1009068     3  0.4399      0.783 0.188 0.000 0.812
#> GSM1009082     2  0.4452      0.814 0.000 0.808 0.192
#> GSM1009096     1  0.0000      0.966 1.000 0.000 0.000
#> GSM1009110     2  0.0000      0.921 0.000 1.000 0.000
#> GSM1009124     1  0.1031      0.947 0.976 0.024 0.000
#> GSM1009138     1  0.1643      0.950 0.956 0.000 0.044
#> GSM1009152     3  0.6309      0.135 0.500 0.000 0.500
#> GSM1009166     2  0.2261      0.913 0.000 0.932 0.068
#> GSM1009180     1  0.2845      0.921 0.920 0.012 0.068
#> GSM1009194     2  0.6286      0.125 0.000 0.536 0.464
#> GSM1009069     3  0.1753      0.840 0.048 0.000 0.952
#> GSM1009083     3  0.4887      0.637 0.000 0.228 0.772
#> GSM1009097     1  0.0000      0.966 1.000 0.000 0.000
#> GSM1009111     2  0.0237      0.921 0.000 0.996 0.004
#> GSM1009125     2  0.0237      0.921 0.000 0.996 0.004
#> GSM1009139     2  0.5926      0.449 0.000 0.644 0.356
#> GSM1009153     3  0.4887      0.741 0.228 0.000 0.772
#> GSM1009167     2  0.2261      0.913 0.000 0.932 0.068
#> GSM1009181     2  0.5216      0.737 0.000 0.740 0.260
#> GSM1009195     2  0.1289      0.915 0.000 0.968 0.032
#> GSM1009070     1  0.2261      0.929 0.932 0.000 0.068
#> GSM1009084     2  0.3116      0.875 0.000 0.892 0.108
#> GSM1009098     1  0.0000      0.966 1.000 0.000 0.000
#> GSM1009112     2  0.0000      0.921 0.000 1.000 0.000
#> GSM1009126     1  0.2486      0.907 0.932 0.060 0.008
#> GSM1009140     1  0.0237      0.966 0.996 0.000 0.004
#> GSM1009154     1  0.3192      0.879 0.888 0.000 0.112
#> GSM1009168     2  0.2261      0.913 0.000 0.932 0.068
#> GSM1009182     3  0.4937      0.711 0.028 0.148 0.824
#> GSM1009196     1  0.3038      0.889 0.896 0.000 0.104
#> GSM1009071     3  0.2356      0.851 0.072 0.000 0.928
#> GSM1009085     2  0.3686      0.874 0.000 0.860 0.140
#> GSM1009099     1  0.0000      0.966 1.000 0.000 0.000
#> GSM1009113     2  0.0237      0.921 0.000 0.996 0.004
#> GSM1009127     1  0.0592      0.965 0.988 0.000 0.012
#> GSM1009141     3  0.2261      0.801 0.000 0.068 0.932
#> GSM1009155     3  0.3267      0.841 0.116 0.000 0.884
#> GSM1009169     2  0.3141      0.904 0.020 0.912 0.068
#> GSM1009183     2  0.5016      0.774 0.000 0.760 0.240
#> GSM1009197     1  0.0424      0.966 0.992 0.000 0.008
#> GSM1009072     3  0.3038      0.846 0.104 0.000 0.896
#> GSM1009086     2  0.4121      0.834 0.000 0.832 0.168
#> GSM1009100     1  0.0000      0.966 1.000 0.000 0.000
#> GSM1009114     2  0.0237      0.920 0.004 0.996 0.000
#> GSM1009128     1  0.0592      0.959 0.988 0.012 0.000
#> GSM1009142     1  0.5449      0.800 0.816 0.116 0.068
#> GSM1009156     1  0.0892      0.963 0.980 0.000 0.020
#> GSM1009170     2  0.2261      0.913 0.000 0.932 0.068
#> GSM1009184     3  0.1411      0.788 0.000 0.036 0.964
#> GSM1009198     1  0.0000      0.966 1.000 0.000 0.000
#> GSM1009073     3  0.2448      0.852 0.076 0.000 0.924
#> GSM1009087     1  0.3340      0.871 0.880 0.000 0.120
#> GSM1009101     1  0.0000      0.966 1.000 0.000 0.000
#> GSM1009115     2  0.0237      0.921 0.000 0.996 0.004
#> GSM1009129     2  0.0237      0.921 0.000 0.996 0.004
#> GSM1009143     1  0.0592      0.965 0.988 0.000 0.012
#> GSM1009157     3  0.2165      0.848 0.064 0.000 0.936
#> GSM1009171     2  0.2261      0.913 0.000 0.932 0.068
#> GSM1009185     1  0.0424      0.966 0.992 0.000 0.008
#> GSM1009199     2  0.1031      0.917 0.000 0.976 0.024
#> GSM1009074     3  0.2711      0.851 0.088 0.000 0.912
#> GSM1009088     3  0.5529      0.649 0.296 0.000 0.704
#> GSM1009102     1  0.0747      0.964 0.984 0.000 0.016
#> GSM1009116     2  0.0000      0.921 0.000 1.000 0.000
#> GSM1009130     2  0.0237      0.921 0.000 0.996 0.004
#> GSM1009144     1  0.1832      0.954 0.956 0.008 0.036
#> GSM1009158     1  0.1163      0.960 0.972 0.000 0.028
#> GSM1009172     2  0.2261      0.913 0.000 0.932 0.068
#> GSM1009186     3  0.1411      0.791 0.000 0.036 0.964
#> GSM1009200     2  0.4974      0.625 0.236 0.764 0.000
#> GSM1009075     3  0.3038      0.846 0.104 0.000 0.896
#> GSM1009089     1  0.0747      0.964 0.984 0.000 0.016
#> GSM1009103     1  0.0592      0.965 0.988 0.000 0.012
#> GSM1009117     2  0.0000      0.921 0.000 1.000 0.000
#> GSM1009131     1  0.0237      0.964 0.996 0.004 0.000
#> GSM1009145     1  0.0000      0.966 1.000 0.000 0.000
#> GSM1009159     1  0.0747      0.964 0.984 0.000 0.016
#> GSM1009173     2  0.2261      0.913 0.000 0.932 0.068
#> GSM1009187     3  0.3116      0.846 0.108 0.000 0.892
#> GSM1009201     1  0.1877      0.943 0.956 0.032 0.012

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>            class entropy silhouette    p1    p2    p3    p4
#> GSM1009062     1  0.1302      0.811 0.956 0.000 0.000 0.044
#> GSM1009076     2  0.5464      0.668 0.064 0.708 0.228 0.000
#> GSM1009090     4  0.0188      0.924 0.004 0.000 0.000 0.996
#> GSM1009104     2  0.0707      0.891 0.000 0.980 0.020 0.000
#> GSM1009118     2  0.0469      0.884 0.000 0.988 0.012 0.000
#> GSM1009132     2  0.0779      0.890 0.000 0.980 0.016 0.004
#> GSM1009146     4  0.1474      0.911 0.052 0.000 0.000 0.948
#> GSM1009160     3  0.0921      1.000 0.000 0.028 0.972 0.000
#> GSM1009174     1  0.4100      0.742 0.816 0.148 0.036 0.000
#> GSM1009188     4  0.0188      0.923 0.004 0.000 0.000 0.996
#> GSM1009063     1  0.0188      0.824 0.996 0.000 0.000 0.004
#> GSM1009077     1  0.6310      0.371 0.576 0.352 0.072 0.000
#> GSM1009091     4  0.0188      0.923 0.004 0.000 0.000 0.996
#> GSM1009105     2  0.0817      0.891 0.000 0.976 0.024 0.000
#> GSM1009119     4  0.0336      0.924 0.008 0.000 0.000 0.992
#> GSM1009133     4  0.1488      0.909 0.012 0.032 0.000 0.956
#> GSM1009147     4  0.1118      0.918 0.036 0.000 0.000 0.964
#> GSM1009161     3  0.0921      1.000 0.000 0.028 0.972 0.000
#> GSM1009175     1  0.4834      0.731 0.784 0.096 0.120 0.000
#> GSM1009189     4  0.0188      0.924 0.004 0.000 0.000 0.996
#> GSM1009064     1  0.0188      0.824 0.996 0.000 0.000 0.004
#> GSM1009078     4  0.3127      0.882 0.060 0.016 0.028 0.896
#> GSM1009092     4  0.0188      0.923 0.004 0.000 0.000 0.996
#> GSM1009106     2  0.0817      0.891 0.000 0.976 0.024 0.000
#> GSM1009120     4  0.0188      0.924 0.004 0.000 0.000 0.996
#> GSM1009134     4  0.3015      0.880 0.092 0.024 0.000 0.884
#> GSM1009148     4  0.4454      0.595 0.308 0.000 0.000 0.692
#> GSM1009162     3  0.0921      1.000 0.000 0.028 0.972 0.000
#> GSM1009176     2  0.5380      0.708 0.120 0.744 0.136 0.000
#> GSM1009190     4  0.0188      0.923 0.004 0.000 0.000 0.996
#> GSM1009065     1  0.0188      0.824 0.996 0.000 0.000 0.004
#> GSM1009079     2  0.5838      0.294 0.032 0.524 0.444 0.000
#> GSM1009093     4  0.0000      0.924 0.000 0.000 0.000 1.000
#> GSM1009107     2  0.0817      0.891 0.000 0.976 0.024 0.000
#> GSM1009121     2  0.0524      0.888 0.000 0.988 0.004 0.008
#> GSM1009135     4  0.3547      0.861 0.064 0.072 0.000 0.864
#> GSM1009149     4  0.0817      0.922 0.024 0.000 0.000 0.976
#> GSM1009163     3  0.0921      1.000 0.000 0.028 0.972 0.000
#> GSM1009177     1  0.7561      0.125 0.424 0.384 0.192 0.000
#> GSM1009191     2  0.0779      0.885 0.000 0.980 0.004 0.016
#> GSM1009066     1  0.0188      0.824 0.996 0.000 0.000 0.004
#> GSM1009080     2  0.5112      0.357 0.004 0.560 0.436 0.000
#> GSM1009094     4  0.0000      0.924 0.000 0.000 0.000 1.000
#> GSM1009108     2  0.0817      0.891 0.000 0.976 0.024 0.000
#> GSM1009122     2  0.0469      0.886 0.000 0.988 0.012 0.000
#> GSM1009136     4  0.0000      0.924 0.000 0.000 0.000 1.000
#> GSM1009150     4  0.1557      0.909 0.056 0.000 0.000 0.944
#> GSM1009164     3  0.0921      1.000 0.000 0.028 0.972 0.000
#> GSM1009178     1  0.6480      0.334 0.568 0.024 0.036 0.372
#> GSM1009192     4  0.0921      0.921 0.028 0.000 0.000 0.972
#> GSM1009067     1  0.0188      0.824 0.996 0.000 0.000 0.004
#> GSM1009081     2  0.5849      0.668 0.132 0.704 0.164 0.000
#> GSM1009095     4  0.1389      0.913 0.048 0.000 0.000 0.952
#> GSM1009109     2  0.0592      0.891 0.000 0.984 0.016 0.000
#> GSM1009123     4  0.0188      0.923 0.004 0.000 0.000 0.996
#> GSM1009137     4  0.2706      0.871 0.020 0.080 0.000 0.900
#> GSM1009151     4  0.4948      0.289 0.440 0.000 0.000 0.560
#> GSM1009165     3  0.0921      1.000 0.000 0.028 0.972 0.000
#> GSM1009179     1  0.2830      0.801 0.900 0.040 0.060 0.000
#> GSM1009193     4  0.0000      0.924 0.000 0.000 0.000 1.000
#> GSM1009068     1  0.2973      0.732 0.856 0.000 0.000 0.144
#> GSM1009082     2  0.6468      0.338 0.348 0.568 0.084 0.000
#> GSM1009096     4  0.0188      0.923 0.004 0.000 0.000 0.996
#> GSM1009110     2  0.0921      0.887 0.000 0.972 0.028 0.000
#> GSM1009124     4  0.5039      0.322 0.004 0.404 0.000 0.592
#> GSM1009138     4  0.3080      0.877 0.096 0.024 0.000 0.880
#> GSM1009152     4  0.4776      0.468 0.376 0.000 0.000 0.624
#> GSM1009166     3  0.0921      1.000 0.000 0.028 0.972 0.000
#> GSM1009180     4  0.3600      0.867 0.068 0.028 0.028 0.876
#> GSM1009194     2  0.0817      0.885 0.024 0.976 0.000 0.000
#> GSM1009069     1  0.0188      0.824 0.996 0.000 0.000 0.004
#> GSM1009083     1  0.5728      0.379 0.600 0.364 0.036 0.000
#> GSM1009097     4  0.0188      0.923 0.004 0.000 0.000 0.996
#> GSM1009111     2  0.0817      0.891 0.000 0.976 0.024 0.000
#> GSM1009125     2  0.0469      0.889 0.000 0.988 0.012 0.000
#> GSM1009139     2  0.1211      0.875 0.040 0.960 0.000 0.000
#> GSM1009153     1  0.3801      0.648 0.780 0.000 0.000 0.220
#> GSM1009167     3  0.0921      1.000 0.000 0.028 0.972 0.000
#> GSM1009181     1  0.5875      0.635 0.692 0.204 0.104 0.000
#> GSM1009195     2  0.1510      0.883 0.028 0.956 0.016 0.000
#> GSM1009070     4  0.2921      0.850 0.140 0.000 0.000 0.860
#> GSM1009084     2  0.4832      0.707 0.176 0.768 0.056 0.000
#> GSM1009098     4  0.0000      0.924 0.000 0.000 0.000 1.000
#> GSM1009112     2  0.0817      0.891 0.000 0.976 0.024 0.000
#> GSM1009126     2  0.2466      0.807 0.004 0.900 0.000 0.096
#> GSM1009140     4  0.0779      0.924 0.016 0.004 0.000 0.980
#> GSM1009154     4  0.3123      0.832 0.156 0.000 0.000 0.844
#> GSM1009168     3  0.0921      1.000 0.000 0.028 0.972 0.000
#> GSM1009182     1  0.2660      0.804 0.908 0.036 0.056 0.000
#> GSM1009196     4  0.2469      0.874 0.108 0.000 0.000 0.892
#> GSM1009071     1  0.0188      0.824 0.996 0.000 0.000 0.004
#> GSM1009085     2  0.7155      0.346 0.292 0.540 0.168 0.000
#> GSM1009099     4  0.0000      0.924 0.000 0.000 0.000 1.000
#> GSM1009113     2  0.0817      0.891 0.000 0.976 0.024 0.000
#> GSM1009127     4  0.0817      0.922 0.024 0.000 0.000 0.976
#> GSM1009141     1  0.4843      0.328 0.604 0.396 0.000 0.000
#> GSM1009155     1  0.2216      0.780 0.908 0.000 0.000 0.092
#> GSM1009169     3  0.0921      1.000 0.000 0.028 0.972 0.000
#> GSM1009183     1  0.6115      0.646 0.680 0.148 0.172 0.000
#> GSM1009197     4  0.0336      0.924 0.008 0.000 0.000 0.992
#> GSM1009072     1  0.1557      0.805 0.944 0.000 0.000 0.056
#> GSM1009086     2  0.6764      0.465 0.260 0.596 0.144 0.000
#> GSM1009100     4  0.0000      0.924 0.000 0.000 0.000 1.000
#> GSM1009114     2  0.1004      0.890 0.004 0.972 0.024 0.000
#> GSM1009128     4  0.0188      0.923 0.004 0.000 0.000 0.996
#> GSM1009142     2  0.2075      0.862 0.044 0.936 0.004 0.016
#> GSM1009156     4  0.0707      0.923 0.020 0.000 0.000 0.980
#> GSM1009170     3  0.0921      1.000 0.000 0.028 0.972 0.000
#> GSM1009184     1  0.2131      0.811 0.932 0.036 0.032 0.000
#> GSM1009198     4  0.0188      0.923 0.004 0.000 0.000 0.996
#> GSM1009073     1  0.0188      0.824 0.996 0.000 0.000 0.004
#> GSM1009087     4  0.3279      0.876 0.068 0.016 0.028 0.888
#> GSM1009101     4  0.0188      0.923 0.004 0.000 0.000 0.996
#> GSM1009115     2  0.0817      0.891 0.000 0.976 0.024 0.000
#> GSM1009129     2  0.0469      0.891 0.000 0.988 0.012 0.000
#> GSM1009143     4  0.1109      0.921 0.028 0.004 0.000 0.968
#> GSM1009157     1  0.1229      0.821 0.968 0.008 0.020 0.004
#> GSM1009171     3  0.0921      1.000 0.000 0.028 0.972 0.000
#> GSM1009185     4  0.0804      0.924 0.012 0.000 0.008 0.980
#> GSM1009199     2  0.0336      0.888 0.000 0.992 0.008 0.000
#> GSM1009074     1  0.0188      0.824 0.996 0.000 0.000 0.004
#> GSM1009088     4  0.6369      0.115 0.444 0.020 0.028 0.508
#> GSM1009102     4  0.0707      0.923 0.020 0.000 0.000 0.980
#> GSM1009116     2  0.0817      0.891 0.000 0.976 0.024 0.000
#> GSM1009130     2  0.0592      0.891 0.000 0.984 0.016 0.000
#> GSM1009144     4  0.3471      0.866 0.060 0.072 0.000 0.868
#> GSM1009158     4  0.1302      0.915 0.044 0.000 0.000 0.956
#> GSM1009172     3  0.0921      1.000 0.000 0.028 0.972 0.000
#> GSM1009186     1  0.2032      0.812 0.936 0.036 0.028 0.000
#> GSM1009200     2  0.0804      0.889 0.000 0.980 0.012 0.008
#> GSM1009075     1  0.1716      0.800 0.936 0.000 0.000 0.064
#> GSM1009089     4  0.0592      0.924 0.016 0.000 0.000 0.984
#> GSM1009103     4  0.0592      0.924 0.016 0.000 0.000 0.984
#> GSM1009117     2  0.0921      0.889 0.000 0.972 0.028 0.000
#> GSM1009131     4  0.0188      0.923 0.004 0.000 0.000 0.996
#> GSM1009145     4  0.0000      0.924 0.000 0.000 0.000 1.000
#> GSM1009159     4  0.0592      0.924 0.016 0.000 0.000 0.984
#> GSM1009173     3  0.0921      1.000 0.000 0.028 0.972 0.000
#> GSM1009187     1  0.4482      0.735 0.808 0.016 0.028 0.148
#> GSM1009201     4  0.5040      0.454 0.008 0.364 0.000 0.628

show/hide code output

cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#>            class entropy silhouette    p1    p2    p3    p4    p5
#> GSM1009062     1  0.3037      0.830 0.860 0.100 0.000 0.040 0.000
#> GSM1009076     2  0.2707      0.839 0.008 0.860 0.000 0.000 0.132
#> GSM1009090     4  0.1768      0.895 0.072 0.000 0.000 0.924 0.004
#> GSM1009104     5  0.1205      0.848 0.000 0.040 0.004 0.000 0.956
#> GSM1009118     5  0.2690      0.816 0.000 0.156 0.000 0.000 0.844
#> GSM1009132     5  0.2763      0.708 0.148 0.000 0.000 0.004 0.848
#> GSM1009146     4  0.0609      0.917 0.020 0.000 0.000 0.980 0.000
#> GSM1009160     3  0.0290      0.997 0.000 0.008 0.992 0.000 0.000
#> GSM1009174     2  0.1502      0.861 0.004 0.940 0.000 0.000 0.056
#> GSM1009188     4  0.1106      0.917 0.024 0.000 0.000 0.964 0.012
#> GSM1009063     1  0.2536      0.828 0.868 0.128 0.000 0.004 0.000
#> GSM1009077     2  0.2248      0.863 0.012 0.900 0.000 0.000 0.088
#> GSM1009091     4  0.0510      0.914 0.016 0.000 0.000 0.984 0.000
#> GSM1009105     5  0.1502      0.853 0.000 0.056 0.004 0.000 0.940
#> GSM1009119     4  0.0162      0.917 0.004 0.000 0.000 0.996 0.000
#> GSM1009133     5  0.6586      0.119 0.300 0.004 0.000 0.208 0.488
#> GSM1009147     4  0.0865      0.908 0.024 0.004 0.000 0.972 0.000
#> GSM1009161     3  0.0290      0.997 0.000 0.008 0.992 0.000 0.000
#> GSM1009175     2  0.1408      0.857 0.008 0.948 0.000 0.000 0.044
#> GSM1009189     4  0.1830      0.907 0.040 0.000 0.000 0.932 0.028
#> GSM1009064     1  0.3074      0.777 0.804 0.196 0.000 0.000 0.000
#> GSM1009078     2  0.4781      0.249 0.020 0.552 0.000 0.428 0.000
#> GSM1009092     4  0.0000      0.916 0.000 0.000 0.000 1.000 0.000
#> GSM1009106     5  0.2124      0.849 0.000 0.096 0.004 0.000 0.900
#> GSM1009120     4  0.0404      0.917 0.012 0.000 0.000 0.988 0.000
#> GSM1009134     1  0.4303      0.682 0.772 0.004 0.004 0.048 0.172
#> GSM1009148     4  0.3639      0.795 0.044 0.144 0.000 0.812 0.000
#> GSM1009162     3  0.0162      0.997 0.000 0.004 0.996 0.000 0.000
#> GSM1009176     2  0.2488      0.845 0.004 0.872 0.000 0.000 0.124
#> GSM1009190     4  0.0955      0.914 0.004 0.000 0.000 0.968 0.028
#> GSM1009065     1  0.2648      0.815 0.848 0.152 0.000 0.000 0.000
#> GSM1009079     2  0.2570      0.853 0.004 0.880 0.008 0.000 0.108
#> GSM1009093     4  0.0404      0.918 0.012 0.000 0.000 0.988 0.000
#> GSM1009107     5  0.1704      0.853 0.000 0.068 0.004 0.000 0.928
#> GSM1009121     5  0.1608      0.854 0.000 0.072 0.000 0.000 0.928
#> GSM1009135     1  0.5411      0.299 0.552 0.004 0.000 0.052 0.392
#> GSM1009149     4  0.0794      0.916 0.028 0.000 0.000 0.972 0.000
#> GSM1009163     3  0.0290      0.997 0.000 0.008 0.992 0.000 0.000
#> GSM1009177     2  0.1851      0.862 0.000 0.912 0.000 0.000 0.088
#> GSM1009191     5  0.2516      0.830 0.000 0.140 0.000 0.000 0.860
#> GSM1009066     1  0.2516      0.821 0.860 0.140 0.000 0.000 0.000
#> GSM1009080     2  0.3694      0.783 0.000 0.796 0.032 0.000 0.172
#> GSM1009094     4  0.0510      0.914 0.016 0.000 0.000 0.984 0.000
#> GSM1009108     5  0.2513      0.841 0.000 0.116 0.008 0.000 0.876
#> GSM1009122     5  0.3109      0.768 0.000 0.200 0.000 0.000 0.800
#> GSM1009136     4  0.2329      0.867 0.124 0.000 0.000 0.876 0.000
#> GSM1009150     4  0.1270      0.910 0.052 0.000 0.000 0.948 0.000
#> GSM1009164     3  0.0290      0.997 0.000 0.008 0.992 0.000 0.000
#> GSM1009178     2  0.1331      0.813 0.008 0.952 0.000 0.040 0.000
#> GSM1009192     4  0.1544      0.904 0.068 0.000 0.000 0.932 0.000
#> GSM1009067     1  0.2864      0.832 0.864 0.112 0.000 0.024 0.000
#> GSM1009081     2  0.3805      0.766 0.016 0.784 0.008 0.000 0.192
#> GSM1009095     4  0.1270      0.913 0.052 0.000 0.000 0.948 0.000
#> GSM1009109     5  0.1282      0.850 0.000 0.044 0.004 0.000 0.952
#> GSM1009123     4  0.0510      0.918 0.016 0.000 0.000 0.984 0.000
#> GSM1009137     5  0.5699      0.300 0.308 0.000 0.000 0.108 0.584
#> GSM1009151     4  0.4901      0.666 0.104 0.184 0.000 0.712 0.000
#> GSM1009165     3  0.0162      0.997 0.000 0.004 0.996 0.000 0.000
#> GSM1009179     2  0.0727      0.832 0.012 0.980 0.000 0.004 0.004
#> GSM1009193     4  0.0880      0.916 0.032 0.000 0.000 0.968 0.000
#> GSM1009068     1  0.3201      0.826 0.852 0.096 0.000 0.052 0.000
#> GSM1009082     2  0.2824      0.850 0.020 0.864 0.000 0.000 0.116
#> GSM1009096     4  0.0404      0.914 0.012 0.000 0.000 0.988 0.000
#> GSM1009110     5  0.1357      0.852 0.000 0.048 0.004 0.000 0.948
#> GSM1009124     4  0.3891      0.777 0.020 0.076 0.000 0.828 0.076
#> GSM1009138     1  0.4044      0.696 0.792 0.004 0.004 0.040 0.160
#> GSM1009152     4  0.5264      0.592 0.196 0.128 0.000 0.676 0.000
#> GSM1009166     3  0.0162      0.997 0.000 0.004 0.996 0.000 0.000
#> GSM1009180     2  0.3293      0.800 0.012 0.852 0.000 0.108 0.028
#> GSM1009194     5  0.3106      0.777 0.132 0.024 0.000 0.000 0.844
#> GSM1009069     1  0.3305      0.746 0.776 0.224 0.000 0.000 0.000
#> GSM1009083     2  0.2813      0.855 0.024 0.868 0.000 0.000 0.108
#> GSM1009097     4  0.0000      0.916 0.000 0.000 0.000 1.000 0.000
#> GSM1009111     5  0.2439      0.840 0.000 0.120 0.004 0.000 0.876
#> GSM1009125     5  0.2806      0.820 0.000 0.152 0.004 0.000 0.844
#> GSM1009139     5  0.3109      0.657 0.200 0.000 0.000 0.000 0.800
#> GSM1009153     1  0.5700      0.672 0.628 0.196 0.000 0.176 0.000
#> GSM1009167     3  0.0162      0.997 0.000 0.004 0.996 0.000 0.000
#> GSM1009181     2  0.2017      0.863 0.008 0.912 0.000 0.000 0.080
#> GSM1009195     5  0.3304      0.823 0.052 0.092 0.004 0.000 0.852
#> GSM1009070     1  0.4339      0.479 0.652 0.012 0.000 0.336 0.000
#> GSM1009084     2  0.3011      0.831 0.016 0.844 0.000 0.000 0.140
#> GSM1009098     4  0.1341      0.912 0.056 0.000 0.000 0.944 0.000
#> GSM1009112     5  0.1502      0.853 0.000 0.056 0.004 0.000 0.940
#> GSM1009126     5  0.4352      0.603 0.000 0.036 0.000 0.244 0.720
#> GSM1009140     4  0.5799      0.396 0.324 0.000 0.000 0.564 0.112
#> GSM1009154     4  0.4972      0.437 0.336 0.044 0.000 0.620 0.000
#> GSM1009168     3  0.0290      0.997 0.000 0.008 0.992 0.000 0.000
#> GSM1009182     2  0.0880      0.813 0.032 0.968 0.000 0.000 0.000
#> GSM1009196     4  0.2450      0.875 0.028 0.076 0.000 0.896 0.000
#> GSM1009071     1  0.2280      0.828 0.880 0.120 0.000 0.000 0.000
#> GSM1009085     2  0.2193      0.861 0.008 0.900 0.000 0.000 0.092
#> GSM1009099     4  0.0404      0.914 0.012 0.000 0.000 0.988 0.000
#> GSM1009113     5  0.2389      0.842 0.000 0.116 0.004 0.000 0.880
#> GSM1009127     4  0.0794      0.916 0.028 0.000 0.000 0.972 0.000
#> GSM1009141     1  0.2771      0.729 0.860 0.000 0.000 0.012 0.128
#> GSM1009155     1  0.4325      0.730 0.724 0.240 0.000 0.036 0.000
#> GSM1009169     3  0.0162      0.997 0.000 0.004 0.996 0.000 0.000
#> GSM1009183     2  0.1638      0.863 0.000 0.932 0.004 0.000 0.064
#> GSM1009197     4  0.0703      0.917 0.024 0.000 0.000 0.976 0.000
#> GSM1009072     1  0.2972      0.826 0.872 0.084 0.004 0.040 0.000
#> GSM1009086     2  0.2777      0.848 0.016 0.864 0.000 0.000 0.120
#> GSM1009100     4  0.0162      0.916 0.004 0.000 0.000 0.996 0.000
#> GSM1009114     5  0.1282      0.850 0.000 0.044 0.004 0.000 0.952
#> GSM1009128     4  0.1173      0.902 0.020 0.012 0.000 0.964 0.004
#> GSM1009142     5  0.4213      0.467 0.308 0.000 0.000 0.012 0.680
#> GSM1009156     4  0.0703      0.910 0.024 0.000 0.000 0.976 0.000
#> GSM1009170     3  0.0290      0.997 0.000 0.008 0.992 0.000 0.000
#> GSM1009184     2  0.1121      0.807 0.044 0.956 0.000 0.000 0.000
#> GSM1009198     4  0.0566      0.917 0.004 0.000 0.000 0.984 0.012
#> GSM1009073     1  0.2280      0.828 0.880 0.120 0.000 0.000 0.000
#> GSM1009087     2  0.3878      0.634 0.016 0.748 0.000 0.236 0.000
#> GSM1009101     4  0.0000      0.916 0.000 0.000 0.000 1.000 0.000
#> GSM1009115     5  0.2068      0.850 0.000 0.092 0.004 0.000 0.904
#> GSM1009129     5  0.3081      0.814 0.000 0.156 0.012 0.000 0.832
#> GSM1009143     4  0.6084      0.253 0.360 0.000 0.000 0.508 0.132
#> GSM1009157     2  0.3280      0.655 0.184 0.808 0.004 0.004 0.000
#> GSM1009171     3  0.0162      0.997 0.000 0.004 0.996 0.000 0.000
#> GSM1009185     4  0.3550      0.722 0.020 0.184 0.000 0.796 0.000
#> GSM1009199     5  0.3790      0.623 0.004 0.272 0.000 0.000 0.724
#> GSM1009074     1  0.2813      0.832 0.868 0.108 0.000 0.024 0.000
#> GSM1009088     2  0.2727      0.736 0.016 0.868 0.000 0.116 0.000
#> GSM1009102     4  0.1341      0.910 0.056 0.000 0.000 0.944 0.000
#> GSM1009116     5  0.1831      0.853 0.000 0.076 0.004 0.000 0.920
#> GSM1009130     5  0.2719      0.826 0.000 0.144 0.004 0.000 0.852
#> GSM1009144     1  0.5492      0.275 0.536 0.000 0.000 0.068 0.396
#> GSM1009158     4  0.1043      0.914 0.040 0.000 0.000 0.960 0.000
#> GSM1009172     3  0.0290      0.997 0.000 0.008 0.992 0.000 0.000
#> GSM1009186     2  0.1792      0.778 0.084 0.916 0.000 0.000 0.000
#> GSM1009200     5  0.1671      0.768 0.076 0.000 0.000 0.000 0.924
#> GSM1009075     1  0.2813      0.827 0.876 0.084 0.000 0.040 0.000
#> GSM1009089     4  0.0609      0.912 0.020 0.000 0.000 0.980 0.000
#> GSM1009103     4  0.1544      0.904 0.068 0.000 0.000 0.932 0.000
#> GSM1009117     5  0.1205      0.849 0.000 0.040 0.004 0.000 0.956
#> GSM1009131     4  0.1725      0.884 0.000 0.020 0.000 0.936 0.044
#> GSM1009145     4  0.1671      0.902 0.076 0.000 0.000 0.924 0.000
#> GSM1009159     4  0.1121      0.913 0.044 0.000 0.000 0.956 0.000
#> GSM1009173     3  0.0162      0.997 0.000 0.004 0.996 0.000 0.000
#> GSM1009187     2  0.3267      0.707 0.044 0.844 0.000 0.112 0.000
#> GSM1009201     5  0.4119      0.593 0.212 0.000 0.000 0.036 0.752

show/hide code output

cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#>            class entropy silhouette    p1    p2    p3    p4    p5    p6
#> GSM1009062     6  0.0508     0.9136 0.012 0.000 0.000 0.004 0.000 0.984
#> GSM1009076     2  0.2999     0.8649 0.000 0.852 0.000 0.072 0.072 0.004
#> GSM1009090     4  0.4323     0.3947 0.312 0.032 0.000 0.652 0.004 0.000
#> GSM1009104     5  0.0713     0.8714 0.000 0.000 0.000 0.028 0.972 0.000
#> GSM1009118     5  0.4382     0.7269 0.000 0.124 0.000 0.156 0.720 0.000
#> GSM1009132     4  0.2488     0.8126 0.000 0.008 0.000 0.864 0.124 0.004
#> GSM1009146     1  0.0767     0.8694 0.976 0.004 0.000 0.012 0.000 0.008
#> GSM1009160     3  0.0458     0.9887 0.000 0.000 0.984 0.000 0.016 0.000
#> GSM1009174     2  0.0748     0.8823 0.000 0.976 0.000 0.004 0.016 0.004
#> GSM1009188     1  0.0653     0.8732 0.980 0.004 0.000 0.012 0.004 0.000
#> GSM1009063     6  0.0436     0.9130 0.004 0.004 0.000 0.004 0.000 0.988
#> GSM1009077     2  0.2853     0.8695 0.000 0.868 0.000 0.072 0.048 0.012
#> GSM1009091     1  0.2810     0.8305 0.832 0.008 0.000 0.156 0.000 0.004
#> GSM1009105     5  0.0291     0.8754 0.000 0.004 0.000 0.004 0.992 0.000
#> GSM1009119     1  0.0146     0.8724 0.996 0.000 0.000 0.004 0.000 0.000
#> GSM1009133     4  0.2624     0.8476 0.020 0.000 0.000 0.884 0.068 0.028
#> GSM1009147     1  0.0725     0.8712 0.976 0.012 0.000 0.012 0.000 0.000
#> GSM1009161     3  0.0363     0.9924 0.000 0.000 0.988 0.000 0.012 0.000
#> GSM1009175     2  0.0363     0.8822 0.000 0.988 0.000 0.000 0.012 0.000
#> GSM1009189     1  0.3232     0.8044 0.844 0.008 0.000 0.088 0.056 0.004
#> GSM1009064     6  0.0291     0.9117 0.000 0.004 0.000 0.004 0.000 0.992
#> GSM1009078     1  0.5206     0.6479 0.696 0.176 0.000 0.080 0.036 0.012
#> GSM1009092     1  0.2001     0.8596 0.900 0.004 0.000 0.092 0.000 0.004
#> GSM1009106     5  0.0405     0.8760 0.000 0.008 0.000 0.004 0.988 0.000
#> GSM1009120     1  0.0508     0.8691 0.984 0.004 0.000 0.012 0.000 0.000
#> GSM1009134     4  0.3181     0.8320 0.020 0.000 0.000 0.840 0.028 0.112
#> GSM1009148     1  0.4401     0.1015 0.512 0.024 0.000 0.000 0.000 0.464
#> GSM1009162     3  0.0146     0.9963 0.000 0.000 0.996 0.000 0.004 0.000
#> GSM1009176     2  0.0858     0.8831 0.000 0.968 0.000 0.004 0.028 0.000
#> GSM1009190     1  0.0820     0.8719 0.972 0.000 0.000 0.012 0.016 0.000
#> GSM1009065     6  0.0291     0.9117 0.000 0.004 0.000 0.004 0.000 0.992
#> GSM1009079     2  0.2692     0.8732 0.000 0.880 0.004 0.072 0.036 0.008
#> GSM1009093     1  0.2810     0.8305 0.832 0.008 0.000 0.156 0.000 0.004
#> GSM1009107     5  0.0405     0.8758 0.000 0.008 0.000 0.004 0.988 0.000
#> GSM1009121     5  0.2744     0.8052 0.000 0.016 0.000 0.144 0.840 0.000
#> GSM1009135     4  0.2775     0.8495 0.016 0.000 0.000 0.876 0.052 0.056
#> GSM1009149     1  0.0653     0.8690 0.980 0.004 0.000 0.012 0.000 0.004
#> GSM1009163     3  0.0146     0.9963 0.000 0.000 0.996 0.000 0.004 0.000
#> GSM1009177     2  0.0922     0.8831 0.000 0.968 0.004 0.004 0.024 0.000
#> GSM1009191     5  0.3676     0.8037 0.012 0.088 0.000 0.092 0.808 0.000
#> GSM1009066     6  0.0405     0.9116 0.000 0.004 0.000 0.008 0.000 0.988
#> GSM1009080     2  0.3469     0.8560 0.000 0.824 0.012 0.072 0.092 0.000
#> GSM1009094     1  0.3884     0.7077 0.708 0.012 0.000 0.272 0.004 0.004
#> GSM1009108     5  0.0405     0.8760 0.000 0.008 0.000 0.004 0.988 0.000
#> GSM1009122     5  0.4963     0.6079 0.000 0.240 0.000 0.124 0.636 0.000
#> GSM1009136     1  0.3615     0.6587 0.700 0.000 0.000 0.292 0.000 0.008
#> GSM1009150     1  0.2101     0.8332 0.892 0.004 0.000 0.004 0.000 0.100
#> GSM1009164     3  0.0363     0.9924 0.000 0.000 0.988 0.000 0.012 0.000
#> GSM1009178     2  0.0810     0.8777 0.008 0.976 0.000 0.004 0.008 0.004
#> GSM1009192     1  0.1572     0.8662 0.936 0.000 0.000 0.028 0.000 0.036
#> GSM1009067     6  0.0622     0.9138 0.012 0.000 0.000 0.008 0.000 0.980
#> GSM1009081     2  0.3754     0.8134 0.000 0.776 0.000 0.072 0.152 0.000
#> GSM1009095     1  0.3451     0.7886 0.776 0.004 0.000 0.204 0.004 0.012
#> GSM1009109     5  0.0790     0.8685 0.000 0.000 0.000 0.032 0.968 0.000
#> GSM1009123     1  0.0508     0.8733 0.984 0.004 0.000 0.012 0.000 0.000
#> GSM1009137     4  0.2647     0.8421 0.016 0.000 0.000 0.876 0.088 0.020
#> GSM1009151     6  0.3541     0.6403 0.260 0.012 0.000 0.000 0.000 0.728
#> GSM1009165     3  0.0146     0.9963 0.000 0.000 0.996 0.000 0.004 0.000
#> GSM1009179     2  0.0363     0.8822 0.000 0.988 0.000 0.000 0.012 0.000
#> GSM1009193     1  0.0291     0.8720 0.992 0.004 0.000 0.004 0.000 0.000
#> GSM1009068     6  0.0767     0.9130 0.012 0.004 0.000 0.008 0.000 0.976
#> GSM1009082     2  0.3473     0.8561 0.000 0.824 0.000 0.076 0.088 0.012
#> GSM1009096     1  0.2531     0.8444 0.860 0.008 0.000 0.128 0.000 0.004
#> GSM1009110     5  0.1556     0.8463 0.000 0.000 0.000 0.080 0.920 0.000
#> GSM1009124     1  0.3577     0.7698 0.816 0.088 0.000 0.012 0.084 0.000
#> GSM1009138     4  0.2961     0.8176 0.008 0.000 0.000 0.840 0.020 0.132
#> GSM1009152     6  0.3133     0.7125 0.212 0.008 0.000 0.000 0.000 0.780
#> GSM1009166     3  0.0146     0.9963 0.000 0.000 0.996 0.000 0.004 0.000
#> GSM1009180     2  0.1026     0.8766 0.008 0.968 0.000 0.008 0.012 0.004
#> GSM1009194     5  0.6132     0.5749 0.004 0.108 0.000 0.188 0.608 0.092
#> GSM1009069     6  0.0363     0.9061 0.000 0.012 0.000 0.000 0.000 0.988
#> GSM1009083     2  0.4000     0.8284 0.000 0.780 0.000 0.072 0.132 0.016
#> GSM1009097     1  0.1845     0.8646 0.916 0.008 0.000 0.072 0.000 0.004
#> GSM1009111     5  0.0363     0.8743 0.000 0.012 0.000 0.000 0.988 0.000
#> GSM1009125     5  0.2965     0.8301 0.000 0.080 0.000 0.072 0.848 0.000
#> GSM1009139     4  0.2389     0.8118 0.000 0.000 0.000 0.864 0.128 0.008
#> GSM1009153     6  0.1204     0.8886 0.056 0.000 0.000 0.000 0.000 0.944
#> GSM1009167     3  0.0146     0.9963 0.000 0.000 0.996 0.000 0.004 0.000
#> GSM1009181     2  0.0603     0.8831 0.000 0.980 0.000 0.004 0.016 0.000
#> GSM1009195     5  0.5502     0.4483 0.000 0.100 0.004 0.308 0.576 0.012
#> GSM1009070     6  0.1531     0.8783 0.068 0.004 0.000 0.000 0.000 0.928
#> GSM1009084     2  0.4166     0.7693 0.000 0.728 0.000 0.076 0.196 0.000
#> GSM1009098     1  0.3421     0.7393 0.736 0.008 0.000 0.256 0.000 0.000
#> GSM1009112     5  0.0291     0.8754 0.000 0.004 0.000 0.004 0.992 0.000
#> GSM1009126     5  0.6517    -0.0648 0.220 0.028 0.000 0.356 0.396 0.000
#> GSM1009140     4  0.2888     0.8031 0.092 0.000 0.000 0.852 0.000 0.056
#> GSM1009154     6  0.2738     0.7625 0.176 0.000 0.000 0.004 0.000 0.820
#> GSM1009168     3  0.0146     0.9963 0.000 0.000 0.996 0.000 0.004 0.000
#> GSM1009182     2  0.0260     0.8821 0.000 0.992 0.000 0.000 0.008 0.000
#> GSM1009196     1  0.3801     0.7843 0.800 0.136 0.000 0.036 0.004 0.024
#> GSM1009071     6  0.0405     0.9116 0.000 0.004 0.000 0.008 0.000 0.988
#> GSM1009085     2  0.3656     0.8437 0.000 0.804 0.000 0.076 0.112 0.008
#> GSM1009099     1  0.2261     0.8552 0.884 0.008 0.000 0.104 0.000 0.004
#> GSM1009113     5  0.0260     0.8749 0.000 0.008 0.000 0.000 0.992 0.000
#> GSM1009127     1  0.0653     0.8690 0.980 0.004 0.000 0.012 0.000 0.004
#> GSM1009141     4  0.2750     0.8167 0.000 0.000 0.000 0.844 0.020 0.136
#> GSM1009155     6  0.0935     0.9044 0.032 0.004 0.000 0.000 0.000 0.964
#> GSM1009169     3  0.0000     0.9938 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM1009183     2  0.0748     0.8825 0.000 0.976 0.004 0.004 0.016 0.000
#> GSM1009197     1  0.0363     0.8729 0.988 0.000 0.000 0.012 0.000 0.000
#> GSM1009072     6  0.0806     0.9092 0.008 0.000 0.000 0.020 0.000 0.972
#> GSM1009086     2  0.3369     0.8588 0.000 0.832 0.000 0.072 0.084 0.012
#> GSM1009100     1  0.2062     0.8602 0.900 0.008 0.000 0.088 0.000 0.004
#> GSM1009114     5  0.0935     0.8714 0.000 0.004 0.000 0.032 0.964 0.000
#> GSM1009128     1  0.1067     0.8701 0.964 0.004 0.000 0.024 0.004 0.004
#> GSM1009142     4  0.2383     0.8372 0.000 0.000 0.000 0.880 0.096 0.024
#> GSM1009156     1  0.0363     0.8701 0.988 0.000 0.000 0.012 0.000 0.000
#> GSM1009170     3  0.0363     0.9924 0.000 0.000 0.988 0.000 0.012 0.000
#> GSM1009184     2  0.0458     0.8777 0.000 0.984 0.000 0.000 0.000 0.016
#> GSM1009198     1  0.0603     0.8730 0.980 0.004 0.000 0.016 0.000 0.000
#> GSM1009073     6  0.0405     0.9116 0.000 0.004 0.000 0.008 0.000 0.988
#> GSM1009087     1  0.6375     0.0281 0.456 0.400 0.000 0.080 0.044 0.020
#> GSM1009101     1  0.2308     0.8531 0.880 0.008 0.000 0.108 0.000 0.004
#> GSM1009115     5  0.0458     0.8730 0.000 0.016 0.000 0.000 0.984 0.000
#> GSM1009129     5  0.2452     0.8540 0.000 0.044 0.008 0.056 0.892 0.000
#> GSM1009143     4  0.3025     0.8182 0.080 0.000 0.000 0.856 0.012 0.052
#> GSM1009157     6  0.4488     0.4122 0.012 0.360 0.008 0.004 0.004 0.612
#> GSM1009171     3  0.0146     0.9963 0.000 0.000 0.996 0.000 0.004 0.000
#> GSM1009185     2  0.4199     0.0728 0.444 0.544 0.000 0.008 0.000 0.004
#> GSM1009199     2  0.5614     0.2776 0.000 0.544 0.000 0.160 0.292 0.004
#> GSM1009074     6  0.0622     0.9138 0.012 0.000 0.000 0.008 0.000 0.980
#> GSM1009088     2  0.5355     0.7415 0.120 0.716 0.000 0.080 0.052 0.032
#> GSM1009102     1  0.3010     0.8311 0.828 0.004 0.000 0.148 0.000 0.020
#> GSM1009116     5  0.0405     0.8756 0.000 0.008 0.000 0.004 0.988 0.000
#> GSM1009130     5  0.1562     0.8533 0.000 0.024 0.004 0.032 0.940 0.000
#> GSM1009144     4  0.2800     0.8500 0.020 0.000 0.000 0.876 0.052 0.052
#> GSM1009158     1  0.1218     0.8656 0.956 0.004 0.000 0.012 0.000 0.028
#> GSM1009172     3  0.0146     0.9963 0.000 0.000 0.996 0.000 0.004 0.000
#> GSM1009186     2  0.0692     0.8790 0.000 0.976 0.000 0.004 0.000 0.020
#> GSM1009200     4  0.4126    -0.0324 0.004 0.004 0.000 0.512 0.480 0.000
#> GSM1009075     6  0.0622     0.9138 0.012 0.000 0.000 0.008 0.000 0.980
#> GSM1009089     1  0.0862     0.8714 0.972 0.008 0.000 0.016 0.000 0.004
#> GSM1009103     1  0.3000     0.8292 0.824 0.004 0.000 0.156 0.000 0.016
#> GSM1009117     5  0.0777     0.8737 0.000 0.004 0.000 0.024 0.972 0.000
#> GSM1009131     1  0.3265     0.6591 0.748 0.004 0.000 0.000 0.248 0.000
#> GSM1009145     1  0.2946     0.7981 0.808 0.004 0.000 0.184 0.000 0.004
#> GSM1009159     1  0.0291     0.8716 0.992 0.004 0.000 0.000 0.000 0.004
#> GSM1009173     3  0.0000     0.9938 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM1009187     2  0.1440     0.8605 0.012 0.948 0.000 0.004 0.004 0.032
#> GSM1009201     4  0.3539     0.7247 0.008 0.000 0.000 0.768 0.208 0.016

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

consensus_heatmap(res, k = 2)

plot of chunk tab-ATC-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 temperature(p) time(p) specimen(p) k
#> ATC:NMF 139          0.477   0.611    3.42e-14 2
#> ATC:NMF 132          0.850   0.948    1.00e-22 3
#> ATC:NMF 125          0.959   0.996    4.50e-42 4
#> ATC:NMF 130          0.991   0.994    3.23e-64 5
#> ATC:NMF 131          0.996   1.000    3.22e-84 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