cola Report for recount2:ERP008967
Date: 2019-12-25 22:32:01 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 15818 rows and 107 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)
Dimension of the input matrix:
mat = get_matrix(res_list)
dim(mat)
#> [1] 15818 107
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, ylab = "value", cluster_columns = TRUE, show_column_names = FALSE,
mc.cores = 4)

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)
**: 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)

Consensus heatmap
Consensus heatmaps for all methods. (What is a consensus heatmap?)
collect_plots(res_list, k = 2, fun = consensus_heatmap, mc.cores = 4)

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

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

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

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

Membership heatmap
Membership heatmaps for all methods. (What is a membership heatmap?)
collect_plots(res_list, k = 2, fun = membership_heatmap, mc.cores = 4)

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

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

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

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

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)

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

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

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

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

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.905 0.918 0.968 0.467 0.538 0.538
#> CV:NMF 2 0.847 0.889 0.954 0.490 0.501 0.501
#> MAD:NMF 2 1.000 0.945 0.978 0.503 0.495 0.495
#> ATC:NMF 2 0.999 0.966 0.985 0.503 0.496 0.496
#> SD:skmeans 2 1.000 0.995 0.997 0.498 0.503 0.503
#> CV:skmeans 2 1.000 1.000 1.000 0.498 0.503 0.503
#> MAD:skmeans 2 1.000 0.977 0.991 0.504 0.496 0.496
#> ATC:skmeans 2 1.000 0.968 0.986 0.493 0.503 0.503
#> SD:mclust 2 0.880 0.936 0.951 0.296 0.649 0.649
#> CV:mclust 2 0.781 0.925 0.953 0.242 0.718 0.718
#> MAD:mclust 2 0.685 0.868 0.930 0.264 0.718 0.718
#> ATC:mclust 2 0.887 0.956 0.972 0.244 0.730 0.730
#> SD:kmeans 2 0.718 0.937 0.945 0.395 0.549 0.549
#> CV:kmeans 2 0.461 0.934 0.951 0.339 0.649 0.649
#> MAD:kmeans 2 0.636 0.916 0.935 0.454 0.503 0.503
#> ATC:kmeans 2 0.623 0.942 0.953 0.404 0.549 0.549
#> SD:pam 2 0.704 0.962 0.960 0.322 0.649 0.649
#> CV:pam 2 1.000 0.993 0.994 0.351 0.649 0.649
#> MAD:pam 2 0.526 0.667 0.867 0.434 0.577 0.577
#> ATC:pam 2 1.000 0.998 0.999 0.353 0.649 0.649
#> SD:hclust 2 1.000 0.996 0.993 0.341 0.649 0.649
#> CV:hclust 2 0.704 0.987 0.978 0.322 0.649 0.649
#> MAD:hclust 2 0.580 0.858 0.914 0.389 0.649 0.649
#> ATC:hclust 2 0.535 0.888 0.906 0.249 0.649 0.649
get_stats(res_list, k = 3)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> SD:NMF 3 0.751 0.890 0.942 0.287 0.611 0.405
#> CV:NMF 3 0.765 0.845 0.932 0.218 0.759 0.576
#> MAD:NMF 3 0.868 0.928 0.966 0.234 0.664 0.443
#> ATC:NMF 3 0.909 0.894 0.954 0.212 0.640 0.421
#> SD:skmeans 3 0.843 0.842 0.923 0.230 0.835 0.683
#> CV:skmeans 3 0.744 0.789 0.890 0.234 0.867 0.741
#> MAD:skmeans 3 0.793 0.901 0.921 0.221 0.883 0.764
#> ATC:skmeans 3 1.000 0.995 0.997 0.155 0.930 0.861
#> SD:mclust 3 0.454 0.667 0.811 0.755 0.598 0.474
#> CV:mclust 3 0.412 0.670 0.784 1.357 0.523 0.402
#> MAD:mclust 3 0.353 0.429 0.729 1.144 0.541 0.437
#> ATC:mclust 3 0.435 0.722 0.836 1.238 0.681 0.576
#> SD:kmeans 3 0.470 0.763 0.851 0.408 0.716 0.556
#> CV:kmeans 3 0.533 0.840 0.901 0.551 0.665 0.535
#> MAD:kmeans 3 0.571 0.785 0.866 0.326 0.745 0.548
#> ATC:kmeans 3 0.892 0.932 0.959 0.434 0.715 0.542
#> SD:pam 3 0.632 0.942 0.960 0.232 0.981 0.971
#> CV:pam 3 0.859 0.848 0.948 0.220 0.865 0.799
#> MAD:pam 3 0.694 0.900 0.922 0.447 0.664 0.467
#> ATC:pam 3 0.615 0.851 0.916 0.221 0.981 0.971
#> SD:hclust 3 1.000 0.982 0.986 0.110 0.981 0.971
#> CV:hclust 3 0.892 0.962 0.974 0.212 0.981 0.971
#> MAD:hclust 3 0.552 0.758 0.843 0.245 0.919 0.874
#> ATC:hclust 3 0.526 0.640 0.872 0.894 0.793 0.698
get_stats(res_list, k = 4)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> SD:NMF 4 0.462 0.550 0.768 0.1515 0.756 0.472
#> CV:NMF 4 0.704 0.755 0.865 0.1618 0.745 0.462
#> MAD:NMF 4 0.572 0.693 0.827 0.1355 0.789 0.521
#> ATC:NMF 4 0.551 0.517 0.747 0.1601 0.862 0.673
#> SD:skmeans 4 0.773 0.794 0.864 0.1213 0.939 0.841
#> CV:skmeans 4 0.711 0.810 0.875 0.1005 0.939 0.846
#> MAD:skmeans 4 0.723 0.844 0.801 0.1444 0.886 0.703
#> ATC:skmeans 4 0.848 0.855 0.898 0.1358 0.943 0.868
#> SD:mclust 4 0.492 0.586 0.747 0.2747 0.840 0.681
#> CV:mclust 4 0.475 0.602 0.725 0.1418 0.807 0.591
#> MAD:mclust 4 0.446 0.514 0.716 0.1652 0.655 0.398
#> ATC:mclust 4 0.512 0.709 0.786 0.1781 0.874 0.741
#> SD:kmeans 4 0.670 0.656 0.784 0.1491 0.855 0.708
#> CV:kmeans 4 0.679 0.336 0.631 0.2153 0.647 0.392
#> MAD:kmeans 4 0.635 0.694 0.776 0.1362 0.924 0.794
#> ATC:kmeans 4 0.585 0.447 0.758 0.1469 0.818 0.633
#> SD:pam 4 0.820 0.930 0.966 0.6721 0.702 0.526
#> CV:pam 4 0.808 0.891 0.946 0.4396 0.798 0.650
#> MAD:pam 4 0.776 0.899 0.951 0.0540 0.981 0.946
#> ATC:pam 4 0.658 0.847 0.921 0.4820 0.724 0.561
#> SD:hclust 4 1.000 0.984 0.984 0.2179 0.919 0.871
#> CV:hclust 4 0.783 0.940 0.950 0.2317 0.919 0.871
#> MAD:hclust 4 0.608 0.818 0.852 0.0771 0.981 0.966
#> ATC:hclust 4 0.638 0.751 0.852 0.3316 0.719 0.503
get_stats(res_list, k = 5)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> SD:NMF 5 0.851 0.818 0.916 0.0738 0.835 0.550
#> CV:NMF 5 0.666 0.774 0.860 0.1056 0.803 0.453
#> MAD:NMF 5 0.759 0.730 0.877 0.0684 0.787 0.439
#> ATC:NMF 5 0.720 0.755 0.861 0.0759 0.769 0.412
#> SD:skmeans 5 0.822 0.889 0.912 0.1063 0.886 0.662
#> CV:skmeans 5 0.683 0.723 0.822 0.0759 0.942 0.829
#> MAD:skmeans 5 0.775 0.902 0.908 0.0759 0.953 0.828
#> ATC:skmeans 5 0.765 0.749 0.850 0.1130 0.892 0.718
#> SD:mclust 5 0.767 0.764 0.860 0.1051 0.734 0.410
#> CV:mclust 5 0.712 0.787 0.809 0.0874 0.711 0.374
#> MAD:mclust 5 0.803 0.806 0.904 0.0879 0.711 0.358
#> ATC:mclust 5 0.594 0.722 0.808 0.0903 0.888 0.730
#> SD:kmeans 5 0.636 0.578 0.669 0.1297 0.763 0.460
#> CV:kmeans 5 0.689 0.823 0.855 0.1150 0.787 0.500
#> MAD:kmeans 5 0.615 0.456 0.640 0.0807 0.823 0.539
#> ATC:kmeans 5 0.651 0.763 0.812 0.0959 0.763 0.460
#> SD:pam 5 0.824 0.931 0.965 0.0519 0.968 0.904
#> CV:pam 5 0.735 0.861 0.910 0.0547 0.987 0.968
#> MAD:pam 5 0.788 0.902 0.946 0.0552 0.968 0.904
#> ATC:pam 5 0.705 0.851 0.904 0.1323 0.880 0.676
#> SD:hclust 5 1.000 0.969 0.987 0.5162 0.749 0.541
#> CV:hclust 5 0.737 0.876 0.905 0.3499 0.762 0.566
#> MAD:hclust 5 0.955 0.973 0.988 0.3460 0.749 0.541
#> ATC:hclust 5 0.619 0.760 0.825 0.1020 0.904 0.736
get_stats(res_list, k = 6)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> SD:NMF 6 0.647 0.556 0.720 0.0728 0.847 0.511
#> CV:NMF 6 0.601 0.567 0.719 0.0493 0.974 0.885
#> MAD:NMF 6 0.664 0.596 0.752 0.0694 0.896 0.620
#> ATC:NMF 6 0.703 0.632 0.791 0.0511 0.913 0.658
#> SD:skmeans 6 0.887 0.863 0.881 0.0424 0.987 0.943
#> CV:skmeans 6 0.635 0.613 0.771 0.0501 0.987 0.956
#> MAD:skmeans 6 0.823 0.867 0.878 0.0375 1.000 1.000
#> ATC:skmeans 6 0.753 0.799 0.818 0.0608 0.905 0.675
#> SD:mclust 6 0.872 0.574 0.741 0.0380 0.874 0.581
#> CV:mclust 6 0.726 0.774 0.838 0.0572 0.940 0.796
#> MAD:mclust 6 0.758 0.802 0.831 0.0692 0.913 0.706
#> ATC:mclust 6 0.632 0.673 0.770 0.0982 0.841 0.546
#> SD:kmeans 6 0.672 0.696 0.741 0.0648 0.892 0.611
#> CV:kmeans 6 0.753 0.667 0.778 0.0738 0.994 0.979
#> MAD:kmeans 6 0.685 0.632 0.699 0.0564 0.861 0.568
#> ATC:kmeans 6 0.746 0.739 0.792 0.0747 0.968 0.867
#> SD:pam 6 0.966 0.968 0.978 0.0291 0.987 0.958
#> CV:pam 6 0.814 0.890 0.918 0.0596 0.942 0.847
#> MAD:pam 6 0.820 0.937 0.942 0.0387 0.987 0.958
#> ATC:pam 6 0.876 0.881 0.951 0.0471 0.814 0.464
#> SD:hclust 6 1.000 0.970 0.990 0.0206 0.987 0.957
#> CV:hclust 6 0.811 0.833 0.909 0.0665 0.965 0.892
#> MAD:hclust 6 0.948 0.964 0.974 0.0306 0.987 0.957
#> ATC:hclust 6 0.799 0.823 0.905 0.0677 0.961 0.875
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)

collect_stats(res_list, k = 3)

collect_stats(res_list, k = 4)

collect_stats(res_list, k = 5)

collect_stats(res_list, k = 6)

Partition from all methods
Collect partitions from all methods:
collect_classes(res_list, k = 2)

collect_classes(res_list, k = 3)

collect_classes(res_list, k = 4)

collect_classes(res_list, k = 5)

collect_classes(res_list, k = 6)

Top rows overlap
Overlap of top rows from different top-row methods:
top_rows_overlap(res_list, top_n = 1000, method = "euler")

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

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

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

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

Also visualize the correspondance of rankings between different top-row methods:
top_rows_overlap(res_list, top_n = 1000, method = "correspondance")

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

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

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

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

Heatmaps of the top rows:
top_rows_heatmap(res_list, top_n = 1000)

top_rows_heatmap(res_list, top_n = 2000)

top_rows_heatmap(res_list, top_n = 3000)

top_rows_heatmap(res_list, top_n = 4000)

top_rows_heatmap(res_list, top_n = 5000)

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"]
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 15818 rows and 107 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 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)

The plots are:
- The first row: a plot of the ECDF (empirical cumulative distribution
function) curves of the consensus matrix for each
k
and the heatmap of
predicted classes for each k
.
- The second row: heatmaps of the consensus matrix for each
k
.
- The third row: heatmaps of the membership matrix for each
k
.
- The fouth row: heatmaps of the signatures for each
k
.
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:
- ECDF curves of the consensus matrix for each
k
;
- 1-PAC. The PAC
score
measures the proportion of the ambiguous subgrouping.
- Mean silhouette score.
- Concordance. The mean probability of fiting the consensus class ids in all
partitions.
- Area increased. Denote \(A_k\) as the area under the ECDF curve for current
k
, the area increased is defined as \(A_k - A_{k-1}\).
- Rand index. The percent of pairs of samples that are both in a same cluster
or both are not in a same cluster in the partition of k and k-1.
- Jaccard index. The ratio of pairs of samples are both in a same cluster in
the partition of k and k-1 and the pairs of samples are both in a same
cluster in the partition k or k-1.
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)

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 0.996 0.993 0.3414 0.649 0.649
#> 3 3 1 0.982 0.986 0.1098 0.981 0.971
#> 4 4 1 0.984 0.984 0.2179 0.919 0.871
#> 5 5 1 0.969 0.987 0.5162 0.749 0.541
#> 6 6 1 0.970 0.990 0.0206 0.987 0.957
suggest_best_k()
suggests the best \(k\) based on these statistics. The rules are as follows:
- All \(k\) with Jaccard index larger than 0.95 are removed because increasing
\(k\) does not provide enough extra information. If all \(k\) are removed, it is
marked as no subgroup is detected.
- For all \(k\) with 1-PAC score larger than 0.9, the maximal \(k\) is taken as
the best \(k\), and other \(k\) are marked as optional \(k\).
- If it does not fit the second rule. The \(k\) with the maximal vote of the
highest 1-PAC score, highest mean silhouette, and highest concordance is
taken as the best \(k\).
suggest_best_k(res)
#> [1] 5
#> attr(,"optional")
#> [1] 2 4
There is also optional best \(k\) = 2 4 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
#> ERR862939 1 0.26 0.988 0.956 0.044
#> ERR862957 1 0.26 0.988 0.956 0.044
#> ERR878007 1 0.26 0.988 0.956 0.044
#> ERR862940 1 0.26 0.988 0.956 0.044
#> ERR862958 1 0.26 0.988 0.956 0.044
#> ERR878008 1 0.26 0.988 0.956 0.044
#> ERR862941 2 0.00 1.000 0.000 1.000
#> ERR862959 2 0.00 1.000 0.000 1.000
#> ERR878009 2 0.00 1.000 0.000 1.000
#> ERR862942 2 0.00 1.000 0.000 1.000
#> ERR862960 2 0.00 1.000 0.000 1.000
#> ERR878010 2 0.00 1.000 0.000 1.000
#> ERR862943 1 0.26 0.988 0.956 0.044
#> ERR862961 1 0.26 0.988 0.956 0.044
#> ERR878011 1 0.26 0.988 0.956 0.044
#> ERR862944 1 0.26 0.988 0.956 0.044
#> ERR862962 1 0.26 0.988 0.956 0.044
#> ERR878012 1 0.26 0.988 0.956 0.044
#> ERR862945 1 0.00 0.965 1.000 0.000
#> ERR862963 1 0.00 0.965 1.000 0.000
#> ERR878013 1 0.00 0.965 1.000 0.000
#> ERR862946 1 0.00 0.965 1.000 0.000
#> ERR862964 1 0.00 0.965 1.000 0.000
#> ERR878014 1 0.00 0.965 1.000 0.000
#> ERR862947 2 0.00 1.000 0.000 1.000
#> ERR862965 2 0.00 1.000 0.000 1.000
#> ERR878015 2 0.00 1.000 0.000 1.000
#> ERR862948 2 0.00 1.000 0.000 1.000
#> ERR862966 2 0.00 1.000 0.000 1.000
#> ERR878016 2 0.00 1.000 0.000 1.000
#> ERR862949 2 0.00 1.000 0.000 1.000
#> ERR862967 2 0.00 1.000 0.000 1.000
#> ERR878017 2 0.00 1.000 0.000 1.000
#> ERR862950 2 0.00 1.000 0.000 1.000
#> ERR862968 2 0.00 1.000 0.000 1.000
#> ERR878018 2 0.00 1.000 0.000 1.000
#> ERR862951 2 0.00 1.000 0.000 1.000
#> ERR862969 2 0.00 1.000 0.000 1.000
#> ERR878019 2 0.00 1.000 0.000 1.000
#> ERR862952 2 0.00 1.000 0.000 1.000
#> ERR862970 2 0.00 1.000 0.000 1.000
#> ERR878020 2 0.00 1.000 0.000 1.000
#> ERR862953 2 0.00 1.000 0.000 1.000
#> ERR862971 2 0.00 1.000 0.000 1.000
#> ERR878021 2 0.00 1.000 0.000 1.000
#> ERR862954 2 0.00 1.000 0.000 1.000
#> ERR862972 2 0.00 1.000 0.000 1.000
#> ERR878022 2 0.00 1.000 0.000 1.000
#> ERR862955 2 0.00 1.000 0.000 1.000
#> ERR862973 2 0.00 1.000 0.000 1.000
#> ERR878023 2 0.00 1.000 0.000 1.000
#> ERR862956 2 0.00 1.000 0.000 1.000
#> ERR862974 2 0.00 1.000 0.000 1.000
#> ERR878024 2 0.00 1.000 0.000 1.000
#> ERR862975 2 0.00 1.000 0.000 1.000
#> ERR866150 2 0.00 1.000 0.000 1.000
#> ERR866168 2 0.00 1.000 0.000 1.000
#> ERR862976 2 0.00 1.000 0.000 1.000
#> ERR866151 2 0.00 1.000 0.000 1.000
#> ERR866169 2 0.00 1.000 0.000 1.000
#> ERR862977 2 0.00 1.000 0.000 1.000
#> ERR866152 2 0.00 1.000 0.000 1.000
#> ERR866170 2 0.00 1.000 0.000 1.000
#> ERR862978 2 0.00 1.000 0.000 1.000
#> ERR866153 2 0.00 1.000 0.000 1.000
#> ERR866171 2 0.00 1.000 0.000 1.000
#> ERR862979 2 0.00 1.000 0.000 1.000
#> ERR866154 2 0.00 1.000 0.000 1.000
#> ERR866172 2 0.00 1.000 0.000 1.000
#> ERR862980 2 0.00 1.000 0.000 1.000
#> ERR866155 2 0.00 1.000 0.000 1.000
#> ERR866173 2 0.00 1.000 0.000 1.000
#> ERR862981 2 0.00 1.000 0.000 1.000
#> ERR866156 2 0.00 1.000 0.000 1.000
#> ERR866174 2 0.00 1.000 0.000 1.000
#> ERR866157 2 0.00 1.000 0.000 1.000
#> ERR866175 2 0.00 1.000 0.000 1.000
#> ERR862983 1 0.26 0.988 0.956 0.044
#> ERR866158 1 0.26 0.988 0.956 0.044
#> ERR866176 1 0.26 0.988 0.956 0.044
#> ERR862984 1 0.26 0.988 0.956 0.044
#> ERR866159 1 0.26 0.988 0.956 0.044
#> ERR866177 1 0.26 0.988 0.956 0.044
#> ERR862985 2 0.00 1.000 0.000 1.000
#> ERR866160 2 0.00 1.000 0.000 1.000
#> ERR866178 2 0.00 1.000 0.000 1.000
#> ERR862986 2 0.00 1.000 0.000 1.000
#> ERR866161 2 0.00 1.000 0.000 1.000
#> ERR866179 2 0.00 1.000 0.000 1.000
#> ERR862987 2 0.00 1.000 0.000 1.000
#> ERR866162 2 0.00 1.000 0.000 1.000
#> ERR866180 2 0.00 1.000 0.000 1.000
#> ERR862988 2 0.00 1.000 0.000 1.000
#> ERR866163 2 0.00 1.000 0.000 1.000
#> ERR866181 2 0.00 1.000 0.000 1.000
#> ERR862989 2 0.00 1.000 0.000 1.000
#> ERR866164 2 0.00 1.000 0.000 1.000
#> ERR866182 2 0.00 1.000 0.000 1.000
#> ERR862990 2 0.00 1.000 0.000 1.000
#> ERR866165 2 0.00 1.000 0.000 1.000
#> ERR866183 2 0.00 1.000 0.000 1.000
#> ERR862991 2 0.00 1.000 0.000 1.000
#> ERR866166 2 0.00 1.000 0.000 1.000
#> ERR866184 2 0.00 1.000 0.000 1.000
#> ERR862992 2 0.00 1.000 0.000 1.000
#> ERR866167 2 0.00 1.000 0.000 1.000
#> ERR866185 2 0.00 1.000 0.000 1.000
show/hide code output
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> ERR862939 1 0.000 1.000 1.000 0.000 0
#> ERR862957 1 0.000 1.000 1.000 0.000 0
#> ERR878007 1 0.000 1.000 1.000 0.000 0
#> ERR862940 1 0.000 1.000 1.000 0.000 0
#> ERR862958 1 0.000 1.000 1.000 0.000 0
#> ERR878008 1 0.000 1.000 1.000 0.000 0
#> ERR862941 2 0.000 0.980 0.000 1.000 0
#> ERR862959 2 0.000 0.980 0.000 1.000 0
#> ERR878009 2 0.000 0.980 0.000 1.000 0
#> ERR862942 2 0.000 0.980 0.000 1.000 0
#> ERR862960 2 0.000 0.980 0.000 1.000 0
#> ERR878010 2 0.000 0.980 0.000 1.000 0
#> ERR862943 1 0.000 1.000 1.000 0.000 0
#> ERR862961 1 0.000 1.000 1.000 0.000 0
#> ERR878011 1 0.000 1.000 1.000 0.000 0
#> ERR862944 1 0.000 1.000 1.000 0.000 0
#> ERR862962 1 0.000 1.000 1.000 0.000 0
#> ERR878012 1 0.000 1.000 1.000 0.000 0
#> ERR862945 3 0.000 1.000 0.000 0.000 1
#> ERR862963 3 0.000 1.000 0.000 0.000 1
#> ERR878013 3 0.000 1.000 0.000 0.000 1
#> ERR862946 3 0.000 1.000 0.000 0.000 1
#> ERR862964 3 0.000 1.000 0.000 0.000 1
#> ERR878014 3 0.000 1.000 0.000 0.000 1
#> ERR862947 2 0.000 0.980 0.000 1.000 0
#> ERR862965 2 0.000 0.980 0.000 1.000 0
#> ERR878015 2 0.000 0.980 0.000 1.000 0
#> ERR862948 2 0.000 0.980 0.000 1.000 0
#> ERR862966 2 0.000 0.980 0.000 1.000 0
#> ERR878016 2 0.000 0.980 0.000 1.000 0
#> ERR862949 2 0.000 0.980 0.000 1.000 0
#> ERR862967 2 0.000 0.980 0.000 1.000 0
#> ERR878017 2 0.000 0.980 0.000 1.000 0
#> ERR862950 2 0.000 0.980 0.000 1.000 0
#> ERR862968 2 0.000 0.980 0.000 1.000 0
#> ERR878018 2 0.000 0.980 0.000 1.000 0
#> ERR862951 2 0.164 0.972 0.044 0.956 0
#> ERR862969 2 0.164 0.972 0.044 0.956 0
#> ERR878019 2 0.164 0.972 0.044 0.956 0
#> ERR862952 2 0.164 0.972 0.044 0.956 0
#> ERR862970 2 0.164 0.972 0.044 0.956 0
#> ERR878020 2 0.164 0.972 0.044 0.956 0
#> ERR862953 2 0.153 0.973 0.040 0.960 0
#> ERR862971 2 0.153 0.973 0.040 0.960 0
#> ERR878021 2 0.129 0.975 0.032 0.968 0
#> ERR862954 2 0.153 0.973 0.040 0.960 0
#> ERR862972 2 0.153 0.973 0.040 0.960 0
#> ERR878022 2 0.129 0.975 0.032 0.968 0
#> ERR862955 2 0.000 0.980 0.000 1.000 0
#> ERR862973 2 0.000 0.980 0.000 1.000 0
#> ERR878023 2 0.000 0.980 0.000 1.000 0
#> ERR862956 2 0.000 0.980 0.000 1.000 0
#> ERR862974 2 0.000 0.980 0.000 1.000 0
#> ERR878024 2 0.000 0.980 0.000 1.000 0
#> ERR862975 2 0.164 0.972 0.044 0.956 0
#> ERR866150 2 0.164 0.972 0.044 0.956 0
#> ERR866168 2 0.164 0.972 0.044 0.956 0
#> ERR862976 2 0.164 0.972 0.044 0.956 0
#> ERR866151 2 0.164 0.972 0.044 0.956 0
#> ERR866169 2 0.164 0.972 0.044 0.956 0
#> ERR862977 2 0.000 0.980 0.000 1.000 0
#> ERR866152 2 0.000 0.980 0.000 1.000 0
#> ERR866170 2 0.000 0.980 0.000 1.000 0
#> ERR862978 2 0.000 0.980 0.000 1.000 0
#> ERR866153 2 0.000 0.980 0.000 1.000 0
#> ERR866171 2 0.000 0.980 0.000 1.000 0
#> ERR862979 2 0.000 0.980 0.000 1.000 0
#> ERR866154 2 0.000 0.980 0.000 1.000 0
#> ERR866172 2 0.000 0.980 0.000 1.000 0
#> ERR862980 2 0.000 0.980 0.000 1.000 0
#> ERR866155 2 0.000 0.980 0.000 1.000 0
#> ERR866173 2 0.000 0.980 0.000 1.000 0
#> ERR862981 2 0.164 0.972 0.044 0.956 0
#> ERR866156 2 0.164 0.972 0.044 0.956 0
#> ERR866174 2 0.164 0.972 0.044 0.956 0
#> ERR866157 2 0.164 0.972 0.044 0.956 0
#> ERR866175 2 0.164 0.972 0.044 0.956 0
#> ERR862983 1 0.000 1.000 1.000 0.000 0
#> ERR866158 1 0.000 1.000 1.000 0.000 0
#> ERR866176 1 0.000 1.000 1.000 0.000 0
#> ERR862984 1 0.000 1.000 1.000 0.000 0
#> ERR866159 1 0.000 1.000 1.000 0.000 0
#> ERR866177 1 0.000 1.000 1.000 0.000 0
#> ERR862985 2 0.164 0.972 0.044 0.956 0
#> ERR866160 2 0.164 0.972 0.044 0.956 0
#> ERR866178 2 0.164 0.972 0.044 0.956 0
#> ERR862986 2 0.164 0.972 0.044 0.956 0
#> ERR866161 2 0.164 0.972 0.044 0.956 0
#> ERR866179 2 0.164 0.972 0.044 0.956 0
#> ERR862987 2 0.000 0.980 0.000 1.000 0
#> ERR866162 2 0.000 0.980 0.000 1.000 0
#> ERR866180 2 0.000 0.980 0.000 1.000 0
#> ERR862988 2 0.000 0.980 0.000 1.000 0
#> ERR866163 2 0.000 0.980 0.000 1.000 0
#> ERR866181 2 0.000 0.980 0.000 1.000 0
#> ERR862989 2 0.164 0.972 0.044 0.956 0
#> ERR866164 2 0.164 0.972 0.044 0.956 0
#> ERR866182 2 0.164 0.972 0.044 0.956 0
#> ERR862990 2 0.164 0.972 0.044 0.956 0
#> ERR866165 2 0.164 0.972 0.044 0.956 0
#> ERR866183 2 0.164 0.972 0.044 0.956 0
#> ERR862991 2 0.000 0.980 0.000 1.000 0
#> ERR866166 2 0.000 0.980 0.000 1.000 0
#> ERR866184 2 0.000 0.980 0.000 1.000 0
#> ERR862992 2 0.000 0.980 0.000 1.000 0
#> ERR866167 2 0.000 0.980 0.000 1.000 0
#> ERR866185 2 0.000 0.980 0.000 1.000 0
show/hide code output
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> ERR862939 3 0.000 1.000 0.000 0.000 1 0
#> ERR862957 3 0.000 1.000 0.000 0.000 1 0
#> ERR878007 3 0.000 1.000 0.000 0.000 1 0
#> ERR862940 3 0.000 1.000 0.000 0.000 1 0
#> ERR862958 3 0.000 1.000 0.000 0.000 1 0
#> ERR878008 3 0.000 1.000 0.000 0.000 1 0
#> ERR862941 2 0.000 0.980 0.000 1.000 0 0
#> ERR862959 2 0.000 0.980 0.000 1.000 0 0
#> ERR878009 2 0.000 0.980 0.000 1.000 0 0
#> ERR862942 2 0.000 0.980 0.000 1.000 0 0
#> ERR862960 2 0.000 0.980 0.000 1.000 0 0
#> ERR878010 2 0.000 0.980 0.000 1.000 0 0
#> ERR862943 3 0.000 1.000 0.000 0.000 1 0
#> ERR862961 3 0.000 1.000 0.000 0.000 1 0
#> ERR878011 3 0.000 1.000 0.000 0.000 1 0
#> ERR862944 3 0.000 1.000 0.000 0.000 1 0
#> ERR862962 3 0.000 1.000 0.000 0.000 1 0
#> ERR878012 3 0.000 1.000 0.000 0.000 1 0
#> ERR862945 4 0.000 1.000 0.000 0.000 0 1
#> ERR862963 4 0.000 1.000 0.000 0.000 0 1
#> ERR878013 4 0.000 1.000 0.000 0.000 0 1
#> ERR862946 4 0.000 1.000 0.000 0.000 0 1
#> ERR862964 4 0.000 1.000 0.000 0.000 0 1
#> ERR878014 4 0.000 1.000 0.000 0.000 0 1
#> ERR862947 1 0.130 1.000 0.956 0.044 0 0
#> ERR862965 1 0.130 1.000 0.956 0.044 0 0
#> ERR878015 1 0.130 1.000 0.956 0.044 0 0
#> ERR862948 1 0.130 1.000 0.956 0.044 0 0
#> ERR862966 1 0.130 1.000 0.956 0.044 0 0
#> ERR878016 1 0.130 1.000 0.956 0.044 0 0
#> ERR862949 2 0.000 0.980 0.000 1.000 0 0
#> ERR862967 2 0.000 0.980 0.000 1.000 0 0
#> ERR878017 2 0.000 0.980 0.000 1.000 0 0
#> ERR862950 2 0.000 0.980 0.000 1.000 0 0
#> ERR862968 2 0.000 0.980 0.000 1.000 0 0
#> ERR878018 2 0.000 0.980 0.000 1.000 0 0
#> ERR862951 2 0.130 0.974 0.044 0.956 0 0
#> ERR862969 2 0.130 0.974 0.044 0.956 0 0
#> ERR878019 2 0.130 0.974 0.044 0.956 0 0
#> ERR862952 2 0.130 0.974 0.044 0.956 0 0
#> ERR862970 2 0.130 0.974 0.044 0.956 0 0
#> ERR878020 2 0.130 0.974 0.044 0.956 0 0
#> ERR862953 2 0.121 0.975 0.040 0.960 0 0
#> ERR862971 2 0.121 0.975 0.040 0.960 0 0
#> ERR878021 2 0.102 0.976 0.032 0.968 0 0
#> ERR862954 2 0.121 0.975 0.040 0.960 0 0
#> ERR862972 2 0.121 0.975 0.040 0.960 0 0
#> ERR878022 2 0.102 0.976 0.032 0.968 0 0
#> ERR862955 2 0.000 0.980 0.000 1.000 0 0
#> ERR862973 2 0.000 0.980 0.000 1.000 0 0
#> ERR878023 2 0.000 0.980 0.000 1.000 0 0
#> ERR862956 2 0.000 0.980 0.000 1.000 0 0
#> ERR862974 2 0.000 0.980 0.000 1.000 0 0
#> ERR878024 2 0.000 0.980 0.000 1.000 0 0
#> ERR862975 2 0.130 0.974 0.044 0.956 0 0
#> ERR866150 2 0.130 0.974 0.044 0.956 0 0
#> ERR866168 2 0.130 0.974 0.044 0.956 0 0
#> ERR862976 2 0.130 0.974 0.044 0.956 0 0
#> ERR866151 2 0.130 0.974 0.044 0.956 0 0
#> ERR866169 2 0.130 0.974 0.044 0.956 0 0
#> ERR862977 2 0.000 0.980 0.000 1.000 0 0
#> ERR866152 2 0.000 0.980 0.000 1.000 0 0
#> ERR866170 2 0.000 0.980 0.000 1.000 0 0
#> ERR862978 2 0.000 0.980 0.000 1.000 0 0
#> ERR866153 2 0.000 0.980 0.000 1.000 0 0
#> ERR866171 2 0.000 0.980 0.000 1.000 0 0
#> ERR862979 2 0.000 0.980 0.000 1.000 0 0
#> ERR866154 2 0.000 0.980 0.000 1.000 0 0
#> ERR866172 2 0.000 0.980 0.000 1.000 0 0
#> ERR862980 2 0.000 0.980 0.000 1.000 0 0
#> ERR866155 2 0.000 0.980 0.000 1.000 0 0
#> ERR866173 2 0.000 0.980 0.000 1.000 0 0
#> ERR862981 2 0.130 0.974 0.044 0.956 0 0
#> ERR866156 2 0.130 0.974 0.044 0.956 0 0
#> ERR866174 2 0.130 0.974 0.044 0.956 0 0
#> ERR866157 2 0.130 0.974 0.044 0.956 0 0
#> ERR866175 2 0.130 0.974 0.044 0.956 0 0
#> ERR862983 3 0.000 1.000 0.000 0.000 1 0
#> ERR866158 3 0.000 1.000 0.000 0.000 1 0
#> ERR866176 3 0.000 1.000 0.000 0.000 1 0
#> ERR862984 3 0.000 1.000 0.000 0.000 1 0
#> ERR866159 3 0.000 1.000 0.000 0.000 1 0
#> ERR866177 3 0.000 1.000 0.000 0.000 1 0
#> ERR862985 2 0.130 0.974 0.044 0.956 0 0
#> ERR866160 2 0.130 0.974 0.044 0.956 0 0
#> ERR866178 2 0.130 0.974 0.044 0.956 0 0
#> ERR862986 2 0.130 0.974 0.044 0.956 0 0
#> ERR866161 2 0.130 0.974 0.044 0.956 0 0
#> ERR866179 2 0.130 0.974 0.044 0.956 0 0
#> ERR862987 2 0.000 0.980 0.000 1.000 0 0
#> ERR866162 2 0.000 0.980 0.000 1.000 0 0
#> ERR866180 2 0.000 0.980 0.000 1.000 0 0
#> ERR862988 2 0.000 0.980 0.000 1.000 0 0
#> ERR866163 2 0.000 0.980 0.000 1.000 0 0
#> ERR866181 2 0.000 0.980 0.000 1.000 0 0
#> ERR862989 2 0.130 0.974 0.044 0.956 0 0
#> ERR866164 2 0.130 0.974 0.044 0.956 0 0
#> ERR866182 2 0.130 0.974 0.044 0.956 0 0
#> ERR862990 2 0.130 0.974 0.044 0.956 0 0
#> ERR866165 2 0.130 0.974 0.044 0.956 0 0
#> ERR866183 2 0.130 0.974 0.044 0.956 0 0
#> ERR862991 2 0.000 0.980 0.000 1.000 0 0
#> ERR866166 2 0.000 0.980 0.000 1.000 0 0
#> ERR866184 2 0.000 0.980 0.000 1.000 0 0
#> ERR862992 2 0.000 0.980 0.000 1.000 0 0
#> ERR866167 2 0.000 0.980 0.000 1.000 0 0
#> ERR866185 2 0.000 0.980 0.000 1.000 0 0
show/hide code output
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> ERR862939 3 0.029 0.995 0.008 0.000 0.992 0 0
#> ERR862957 3 0.029 0.995 0.008 0.000 0.992 0 0
#> ERR878007 3 0.029 0.995 0.008 0.000 0.992 0 0
#> ERR862940 3 0.029 0.995 0.008 0.000 0.992 0 0
#> ERR862958 3 0.029 0.995 0.008 0.000 0.992 0 0
#> ERR878008 3 0.029 0.995 0.008 0.000 0.992 0 0
#> ERR862941 2 0.000 0.995 0.000 1.000 0.000 0 0
#> ERR862959 2 0.000 0.995 0.000 1.000 0.000 0 0
#> ERR878009 2 0.000 0.995 0.000 1.000 0.000 0 0
#> ERR862942 2 0.000 0.995 0.000 1.000 0.000 0 0
#> ERR862960 2 0.000 0.995 0.000 1.000 0.000 0 0
#> ERR878010 2 0.000 0.995 0.000 1.000 0.000 0 0
#> ERR862943 3 0.000 0.998 0.000 0.000 1.000 0 0
#> ERR862961 3 0.000 0.998 0.000 0.000 1.000 0 0
#> ERR878011 3 0.000 0.998 0.000 0.000 1.000 0 0
#> ERR862944 3 0.000 0.998 0.000 0.000 1.000 0 0
#> ERR862962 3 0.000 0.998 0.000 0.000 1.000 0 0
#> ERR878012 3 0.000 0.998 0.000 0.000 1.000 0 0
#> ERR862945 4 0.000 1.000 0.000 0.000 0.000 1 0
#> ERR862963 4 0.000 1.000 0.000 0.000 0.000 1 0
#> ERR878013 4 0.000 1.000 0.000 0.000 0.000 1 0
#> ERR862946 4 0.000 1.000 0.000 0.000 0.000 1 0
#> ERR862964 4 0.000 1.000 0.000 0.000 0.000 1 0
#> ERR878014 4 0.000 1.000 0.000 0.000 0.000 1 0
#> ERR862947 5 0.000 1.000 0.000 0.000 0.000 0 1
#> ERR862965 5 0.000 1.000 0.000 0.000 0.000 0 1
#> ERR878015 5 0.000 1.000 0.000 0.000 0.000 0 1
#> ERR862948 5 0.000 1.000 0.000 0.000 0.000 0 1
#> ERR862966 5 0.000 1.000 0.000 0.000 0.000 0 1
#> ERR878016 5 0.000 1.000 0.000 0.000 0.000 0 1
#> ERR862949 2 0.000 0.995 0.000 1.000 0.000 0 0
#> ERR862967 2 0.000 0.995 0.000 1.000 0.000 0 0
#> ERR878017 2 0.000 0.995 0.000 1.000 0.000 0 0
#> ERR862950 2 0.000 0.995 0.000 1.000 0.000 0 0
#> ERR862968 2 0.000 0.995 0.000 1.000 0.000 0 0
#> ERR878018 2 0.000 0.995 0.000 1.000 0.000 0 0
#> ERR862951 1 0.029 0.957 0.992 0.008 0.000 0 0
#> ERR862969 1 0.029 0.957 0.992 0.008 0.000 0 0
#> ERR878019 1 0.029 0.957 0.992 0.008 0.000 0 0
#> ERR862952 1 0.029 0.957 0.992 0.008 0.000 0 0
#> ERR862970 1 0.029 0.957 0.992 0.008 0.000 0 0
#> ERR878020 1 0.029 0.957 0.992 0.008 0.000 0 0
#> ERR862953 2 0.120 0.944 0.048 0.952 0.000 0 0
#> ERR862971 2 0.120 0.944 0.048 0.952 0.000 0 0
#> ERR878021 1 0.427 0.233 0.556 0.444 0.000 0 0
#> ERR862954 2 0.120 0.944 0.048 0.952 0.000 0 0
#> ERR862972 2 0.120 0.944 0.048 0.952 0.000 0 0
#> ERR878022 1 0.427 0.233 0.556 0.444 0.000 0 0
#> ERR862955 2 0.000 0.995 0.000 1.000 0.000 0 0
#> ERR862973 2 0.000 0.995 0.000 1.000 0.000 0 0
#> ERR878023 2 0.000 0.995 0.000 1.000 0.000 0 0
#> ERR862956 2 0.000 0.995 0.000 1.000 0.000 0 0
#> ERR862974 2 0.000 0.995 0.000 1.000 0.000 0 0
#> ERR878024 2 0.000 0.995 0.000 1.000 0.000 0 0
#> ERR862975 1 0.029 0.957 0.992 0.008 0.000 0 0
#> ERR866150 1 0.029 0.957 0.992 0.008 0.000 0 0
#> ERR866168 1 0.029 0.957 0.992 0.008 0.000 0 0
#> ERR862976 1 0.029 0.957 0.992 0.008 0.000 0 0
#> ERR866151 1 0.029 0.957 0.992 0.008 0.000 0 0
#> ERR866169 1 0.029 0.957 0.992 0.008 0.000 0 0
#> ERR862977 2 0.000 0.995 0.000 1.000 0.000 0 0
#> ERR866152 2 0.000 0.995 0.000 1.000 0.000 0 0
#> ERR866170 2 0.000 0.995 0.000 1.000 0.000 0 0
#> ERR862978 2 0.000 0.995 0.000 1.000 0.000 0 0
#> ERR866153 2 0.000 0.995 0.000 1.000 0.000 0 0
#> ERR866171 2 0.000 0.995 0.000 1.000 0.000 0 0
#> ERR862979 2 0.000 0.995 0.000 1.000 0.000 0 0
#> ERR866154 2 0.000 0.995 0.000 1.000 0.000 0 0
#> ERR866172 2 0.000 0.995 0.000 1.000 0.000 0 0
#> ERR862980 2 0.000 0.995 0.000 1.000 0.000 0 0
#> ERR866155 2 0.000 0.995 0.000 1.000 0.000 0 0
#> ERR866173 2 0.000 0.995 0.000 1.000 0.000 0 0
#> ERR862981 1 0.029 0.957 0.992 0.008 0.000 0 0
#> ERR866156 1 0.029 0.957 0.992 0.008 0.000 0 0
#> ERR866174 1 0.029 0.957 0.992 0.008 0.000 0 0
#> ERR866157 1 0.029 0.957 0.992 0.008 0.000 0 0
#> ERR866175 1 0.029 0.957 0.992 0.008 0.000 0 0
#> ERR862983 3 0.000 0.998 0.000 0.000 1.000 0 0
#> ERR866158 3 0.000 0.998 0.000 0.000 1.000 0 0
#> ERR866176 3 0.000 0.998 0.000 0.000 1.000 0 0
#> ERR862984 3 0.000 0.998 0.000 0.000 1.000 0 0
#> ERR866159 3 0.000 0.998 0.000 0.000 1.000 0 0
#> ERR866177 3 0.000 0.998 0.000 0.000 1.000 0 0
#> ERR862985 1 0.029 0.957 0.992 0.008 0.000 0 0
#> ERR866160 1 0.029 0.957 0.992 0.008 0.000 0 0
#> ERR866178 1 0.029 0.957 0.992 0.008 0.000 0 0
#> ERR862986 1 0.029 0.957 0.992 0.008 0.000 0 0
#> ERR866161 1 0.029 0.957 0.992 0.008 0.000 0 0
#> ERR866179 1 0.029 0.957 0.992 0.008 0.000 0 0
#> ERR862987 2 0.000 0.995 0.000 1.000 0.000 0 0
#> ERR866162 2 0.000 0.995 0.000 1.000 0.000 0 0
#> ERR866180 2 0.000 0.995 0.000 1.000 0.000 0 0
#> ERR862988 2 0.000 0.995 0.000 1.000 0.000 0 0
#> ERR866163 2 0.000 0.995 0.000 1.000 0.000 0 0
#> ERR866181 2 0.000 0.995 0.000 1.000 0.000 0 0
#> ERR862989 1 0.029 0.957 0.992 0.008 0.000 0 0
#> ERR866164 1 0.029 0.957 0.992 0.008 0.000 0 0
#> ERR866182 1 0.029 0.957 0.992 0.008 0.000 0 0
#> ERR862990 1 0.029 0.957 0.992 0.008 0.000 0 0
#> ERR866165 1 0.029 0.957 0.992 0.008 0.000 0 0
#> ERR866183 1 0.029 0.957 0.992 0.008 0.000 0 0
#> ERR862991 2 0.000 0.995 0.000 1.000 0.000 0 0
#> ERR866166 2 0.000 0.995 0.000 1.000 0.000 0 0
#> ERR866184 2 0.000 0.995 0.000 1.000 0.000 0 0
#> ERR862992 2 0.000 0.995 0.000 1.000 0.000 0 0
#> ERR866167 2 0.000 0.995 0.000 1.000 0.000 0 0
#> ERR866185 2 0.000 0.995 0.000 1.000 0.000 0 0
show/hide code output
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> ERR862939 6 0.000 1.000 0.000 0.000 0 0 0 1
#> ERR862957 6 0.000 1.000 0.000 0.000 0 0 0 1
#> ERR878007 6 0.000 1.000 0.000 0.000 0 0 0 1
#> ERR862940 6 0.000 1.000 0.000 0.000 0 0 0 1
#> ERR862958 6 0.000 1.000 0.000 0.000 0 0 0 1
#> ERR878008 6 0.000 1.000 0.000 0.000 0 0 0 1
#> ERR862941 2 0.000 0.995 0.000 1.000 0 0 0 0
#> ERR862959 2 0.000 0.995 0.000 1.000 0 0 0 0
#> ERR878009 2 0.000 0.995 0.000 1.000 0 0 0 0
#> ERR862942 2 0.000 0.995 0.000 1.000 0 0 0 0
#> ERR862960 2 0.000 0.995 0.000 1.000 0 0 0 0
#> ERR878010 2 0.000 0.995 0.000 1.000 0 0 0 0
#> ERR862943 3 0.000 1.000 0.000 0.000 1 0 0 0
#> ERR862961 3 0.000 1.000 0.000 0.000 1 0 0 0
#> ERR878011 3 0.000 1.000 0.000 0.000 1 0 0 0
#> ERR862944 3 0.000 1.000 0.000 0.000 1 0 0 0
#> ERR862962 3 0.000 1.000 0.000 0.000 1 0 0 0
#> ERR878012 3 0.000 1.000 0.000 0.000 1 0 0 0
#> ERR862945 4 0.000 1.000 0.000 0.000 0 1 0 0
#> ERR862963 4 0.000 1.000 0.000 0.000 0 1 0 0
#> ERR878013 4 0.000 1.000 0.000 0.000 0 1 0 0
#> ERR862946 4 0.000 1.000 0.000 0.000 0 1 0 0
#> ERR862964 4 0.000 1.000 0.000 0.000 0 1 0 0
#> ERR878014 4 0.000 1.000 0.000 0.000 0 1 0 0
#> ERR862947 5 0.000 1.000 0.000 0.000 0 0 1 0
#> ERR862965 5 0.000 1.000 0.000 0.000 0 0 1 0
#> ERR878015 5 0.000 1.000 0.000 0.000 0 0 1 0
#> ERR862948 5 0.000 1.000 0.000 0.000 0 0 1 0
#> ERR862966 5 0.000 1.000 0.000 0.000 0 0 1 0
#> ERR878016 5 0.000 1.000 0.000 0.000 0 0 1 0
#> ERR862949 2 0.000 0.995 0.000 1.000 0 0 0 0
#> ERR862967 2 0.000 0.995 0.000 1.000 0 0 0 0
#> ERR878017 2 0.000 0.995 0.000 1.000 0 0 0 0
#> ERR862950 2 0.000 0.995 0.000 1.000 0 0 0 0
#> ERR862968 2 0.000 0.995 0.000 1.000 0 0 0 0
#> ERR878018 2 0.000 0.995 0.000 1.000 0 0 0 0
#> ERR862951 1 0.000 0.957 1.000 0.000 0 0 0 0
#> ERR862969 1 0.000 0.957 1.000 0.000 0 0 0 0
#> ERR878019 1 0.000 0.957 1.000 0.000 0 0 0 0
#> ERR862952 1 0.000 0.957 1.000 0.000 0 0 0 0
#> ERR862970 1 0.000 0.957 1.000 0.000 0 0 0 0
#> ERR878020 1 0.000 0.957 1.000 0.000 0 0 0 0
#> ERR862953 2 0.107 0.944 0.048 0.952 0 0 0 0
#> ERR862971 2 0.107 0.944 0.048 0.952 0 0 0 0
#> ERR878021 1 0.382 0.244 0.564 0.436 0 0 0 0
#> ERR862954 2 0.107 0.944 0.048 0.952 0 0 0 0
#> ERR862972 2 0.107 0.944 0.048 0.952 0 0 0 0
#> ERR878022 1 0.382 0.244 0.564 0.436 0 0 0 0
#> ERR862955 2 0.000 0.995 0.000 1.000 0 0 0 0
#> ERR862973 2 0.000 0.995 0.000 1.000 0 0 0 0
#> ERR878023 2 0.000 0.995 0.000 1.000 0 0 0 0
#> ERR862956 2 0.000 0.995 0.000 1.000 0 0 0 0
#> ERR862974 2 0.000 0.995 0.000 1.000 0 0 0 0
#> ERR878024 2 0.000 0.995 0.000 1.000 0 0 0 0
#> ERR862975 1 0.000 0.957 1.000 0.000 0 0 0 0
#> ERR866150 1 0.000 0.957 1.000 0.000 0 0 0 0
#> ERR866168 1 0.000 0.957 1.000 0.000 0 0 0 0
#> ERR862976 1 0.000 0.957 1.000 0.000 0 0 0 0
#> ERR866151 1 0.000 0.957 1.000 0.000 0 0 0 0
#> ERR866169 1 0.000 0.957 1.000 0.000 0 0 0 0
#> ERR862977 2 0.000 0.995 0.000 1.000 0 0 0 0
#> ERR866152 2 0.000 0.995 0.000 1.000 0 0 0 0
#> ERR866170 2 0.000 0.995 0.000 1.000 0 0 0 0
#> ERR862978 2 0.000 0.995 0.000 1.000 0 0 0 0
#> ERR866153 2 0.000 0.995 0.000 1.000 0 0 0 0
#> ERR866171 2 0.000 0.995 0.000 1.000 0 0 0 0
#> ERR862979 2 0.000 0.995 0.000 1.000 0 0 0 0
#> ERR866154 2 0.000 0.995 0.000 1.000 0 0 0 0
#> ERR866172 2 0.000 0.995 0.000 1.000 0 0 0 0
#> ERR862980 2 0.000 0.995 0.000 1.000 0 0 0 0
#> ERR866155 2 0.000 0.995 0.000 1.000 0 0 0 0
#> ERR866173 2 0.000 0.995 0.000 1.000 0 0 0 0
#> ERR862981 1 0.000 0.957 1.000 0.000 0 0 0 0
#> ERR866156 1 0.000 0.957 1.000 0.000 0 0 0 0
#> ERR866174 1 0.000 0.957 1.000 0.000 0 0 0 0
#> ERR866157 1 0.000 0.957 1.000 0.000 0 0 0 0
#> ERR866175 1 0.000 0.957 1.000 0.000 0 0 0 0
#> ERR862983 3 0.000 1.000 0.000 0.000 1 0 0 0
#> ERR866158 3 0.000 1.000 0.000 0.000 1 0 0 0
#> ERR866176 3 0.000 1.000 0.000 0.000 1 0 0 0
#> ERR862984 3 0.000 1.000 0.000 0.000 1 0 0 0
#> ERR866159 3 0.000 1.000 0.000 0.000 1 0 0 0
#> ERR866177 3 0.000 1.000 0.000 0.000 1 0 0 0
#> ERR862985 1 0.000 0.957 1.000 0.000 0 0 0 0
#> ERR866160 1 0.000 0.957 1.000 0.000 0 0 0 0
#> ERR866178 1 0.000 0.957 1.000 0.000 0 0 0 0
#> ERR862986 1 0.000 0.957 1.000 0.000 0 0 0 0
#> ERR866161 1 0.000 0.957 1.000 0.000 0 0 0 0
#> ERR866179 1 0.000 0.957 1.000 0.000 0 0 0 0
#> ERR862987 2 0.000 0.995 0.000 1.000 0 0 0 0
#> ERR866162 2 0.000 0.995 0.000 1.000 0 0 0 0
#> ERR866180 2 0.000 0.995 0.000 1.000 0 0 0 0
#> ERR862988 2 0.000 0.995 0.000 1.000 0 0 0 0
#> ERR866163 2 0.000 0.995 0.000 1.000 0 0 0 0
#> ERR866181 2 0.000 0.995 0.000 1.000 0 0 0 0
#> ERR862989 1 0.000 0.957 1.000 0.000 0 0 0 0
#> ERR866164 1 0.000 0.957 1.000 0.000 0 0 0 0
#> ERR866182 1 0.000 0.957 1.000 0.000 0 0 0 0
#> ERR862990 1 0.000 0.957 1.000 0.000 0 0 0 0
#> ERR866165 1 0.000 0.957 1.000 0.000 0 0 0 0
#> ERR866183 1 0.000 0.957 1.000 0.000 0 0 0 0
#> ERR862991 2 0.000 0.995 0.000 1.000 0 0 0 0
#> ERR866166 2 0.000 0.995 0.000 1.000 0 0 0 0
#> ERR866184 2 0.000 0.995 0.000 1.000 0 0 0 0
#> ERR862992 2 0.000 0.995 0.000 1.000 0 0 0 0
#> ERR866167 2 0.000 0.995 0.000 1.000 0 0 0 0
#> ERR866185 2 0.000 0.995 0.000 1.000 0 0 0 0
Heatmaps for the consensus matrix. It visualizes the probability of two
samples to be in a same group.
consensus_heatmap(res, k = 2)

consensus_heatmap(res, k = 3)

consensus_heatmap(res, k = 4)

consensus_heatmap(res, k = 5)

consensus_heatmap(res, k = 6)

Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)

membership_heatmap(res, k = 3)

membership_heatmap(res, k = 4)

membership_heatmap(res, k = 5)

membership_heatmap(res, k = 6)

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)

get_signatures(res, k = 3)

get_signatures(res, k = 4)

get_signatures(res, k = 5)

get_signatures(res, k = 6)

Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)

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

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

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

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

Compare the overlap of signatures from different k:
compare_signatures(res)

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.
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:
which_row
: row indices corresponding to the input matrix.
fdr
: FDR for the differential test.
mean_x
: The mean value in group x.
scaled_mean_x
: The mean value in group x after rows are scaled.
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")

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

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

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

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

Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)

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"]
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 15818 rows and 107 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'SD' method.
#> Subgroups are detected by 'kmeans' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 3.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)

The plots are:
- The first row: a plot of the ECDF (empirical cumulative distribution
function) curves of the consensus matrix for each
k
and the heatmap of
predicted classes for each k
.
- The second row: heatmaps of the consensus matrix for each
k
.
- The third row: heatmaps of the membership matrix for each
k
.
- The fouth row: heatmaps of the signatures for each
k
.
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:
- ECDF curves of the consensus matrix for each
k
;
- 1-PAC. The PAC
score
measures the proportion of the ambiguous subgrouping.
- Mean silhouette score.
- Concordance. The mean probability of fiting the consensus class ids in all
partitions.
- Area increased. Denote \(A_k\) as the area under the ECDF curve for current
k
, the area increased is defined as \(A_k - A_{k-1}\).
- Rand index. The percent of pairs of samples that are both in a same cluster
or both are not in a same cluster in the partition of k and k-1.
- Jaccard index. The ratio of pairs of samples are both in a same cluster in
the partition of k and k-1 and the pairs of samples are both in a same
cluster in the partition k or k-1.
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)

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.718 0.937 0.945 0.3950 0.549 0.549
#> 3 3 0.470 0.763 0.851 0.4084 0.716 0.556
#> 4 4 0.670 0.656 0.784 0.1491 0.855 0.708
#> 5 5 0.636 0.578 0.669 0.1297 0.763 0.460
#> 6 6 0.672 0.696 0.741 0.0648 0.892 0.611
suggest_best_k()
suggests the best \(k\) based on these statistics. The rules are as follows:
- All \(k\) with Jaccard index larger than 0.95 are removed because increasing
\(k\) does not provide enough extra information. If all \(k\) are removed, it is
marked as no subgroup is detected.
- For all \(k\) with 1-PAC score larger than 0.9, the maximal \(k\) is taken as
the best \(k\), and other \(k\) are marked as optional \(k\).
- If it does not fit the second rule. The \(k\) with the maximal vote of the
highest 1-PAC score, highest mean silhouette, and highest concordance is
taken as the best \(k\).
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
#> ERR862939 1 0.4690 0.879 0.900 0.100
#> ERR862957 1 0.4690 0.879 0.900 0.100
#> ERR878007 1 0.4690 0.879 0.900 0.100
#> ERR862940 1 0.4690 0.879 0.900 0.100
#> ERR862958 1 0.4562 0.879 0.904 0.096
#> ERR878008 1 0.4690 0.879 0.900 0.100
#> ERR862941 2 0.0000 0.998 0.000 1.000
#> ERR862959 2 0.0000 0.998 0.000 1.000
#> ERR878009 2 0.0000 0.998 0.000 1.000
#> ERR862942 2 0.0000 0.998 0.000 1.000
#> ERR862960 2 0.0000 0.998 0.000 1.000
#> ERR878010 2 0.0000 0.998 0.000 1.000
#> ERR862943 1 0.4161 0.876 0.916 0.084
#> ERR862961 1 0.4161 0.876 0.916 0.084
#> ERR878011 1 0.4161 0.876 0.916 0.084
#> ERR862944 1 0.4161 0.876 0.916 0.084
#> ERR862962 1 0.4161 0.876 0.916 0.084
#> ERR878012 1 0.4161 0.876 0.916 0.084
#> ERR862945 1 0.0000 0.828 1.000 0.000
#> ERR862963 1 0.0000 0.828 1.000 0.000
#> ERR878013 1 0.0000 0.828 1.000 0.000
#> ERR862946 1 0.0000 0.828 1.000 0.000
#> ERR862964 1 0.0000 0.828 1.000 0.000
#> ERR878014 1 0.0000 0.828 1.000 0.000
#> ERR862947 2 0.0000 0.998 0.000 1.000
#> ERR862965 2 0.0000 0.998 0.000 1.000
#> ERR878015 2 0.0000 0.998 0.000 1.000
#> ERR862948 2 0.0000 0.998 0.000 1.000
#> ERR862966 2 0.0000 0.998 0.000 1.000
#> ERR878016 2 0.0000 0.998 0.000 1.000
#> ERR862949 2 0.0000 0.998 0.000 1.000
#> ERR862967 2 0.0000 0.998 0.000 1.000
#> ERR878017 2 0.0000 0.998 0.000 1.000
#> ERR862950 2 0.0000 0.998 0.000 1.000
#> ERR862968 2 0.0000 0.998 0.000 1.000
#> ERR878018 2 0.0000 0.998 0.000 1.000
#> ERR862951 2 0.0000 0.998 0.000 1.000
#> ERR862969 2 0.0000 0.998 0.000 1.000
#> ERR878019 2 0.0000 0.998 0.000 1.000
#> ERR862952 2 0.0000 0.998 0.000 1.000
#> ERR862970 2 0.0000 0.998 0.000 1.000
#> ERR878020 2 0.0000 0.998 0.000 1.000
#> ERR862953 2 0.0000 0.998 0.000 1.000
#> ERR862971 2 0.0000 0.998 0.000 1.000
#> ERR878021 2 0.0000 0.998 0.000 1.000
#> ERR862954 2 0.0000 0.998 0.000 1.000
#> ERR862972 2 0.0000 0.998 0.000 1.000
#> ERR878022 2 0.0000 0.998 0.000 1.000
#> ERR862955 2 0.0000 0.998 0.000 1.000
#> ERR862973 2 0.0000 0.998 0.000 1.000
#> ERR878023 2 0.0000 0.998 0.000 1.000
#> ERR862956 2 0.0000 0.998 0.000 1.000
#> ERR862974 2 0.0000 0.998 0.000 1.000
#> ERR878024 2 0.0000 0.998 0.000 1.000
#> ERR862975 1 0.9286 0.719 0.656 0.344
#> ERR866150 1 0.9286 0.719 0.656 0.344
#> ERR866168 1 0.9286 0.719 0.656 0.344
#> ERR862976 1 0.9286 0.719 0.656 0.344
#> ERR866151 1 0.9286 0.719 0.656 0.344
#> ERR866169 1 0.9286 0.719 0.656 0.344
#> ERR862977 2 0.0000 0.998 0.000 1.000
#> ERR866152 2 0.0000 0.998 0.000 1.000
#> ERR866170 2 0.0000 0.998 0.000 1.000
#> ERR862978 2 0.0000 0.998 0.000 1.000
#> ERR866153 2 0.0000 0.998 0.000 1.000
#> ERR866171 2 0.0000 0.998 0.000 1.000
#> ERR862979 2 0.0000 0.998 0.000 1.000
#> ERR866154 2 0.0000 0.998 0.000 1.000
#> ERR866172 2 0.0000 0.998 0.000 1.000
#> ERR862980 2 0.0000 0.998 0.000 1.000
#> ERR866155 2 0.0000 0.998 0.000 1.000
#> ERR866173 2 0.0000 0.998 0.000 1.000
#> ERR862981 2 0.0672 0.991 0.008 0.992
#> ERR866156 2 0.0672 0.991 0.008 0.992
#> ERR866174 2 0.0672 0.991 0.008 0.992
#> ERR866157 2 0.0672 0.991 0.008 0.992
#> ERR866175 2 0.0672 0.991 0.008 0.992
#> ERR862983 1 0.4562 0.879 0.904 0.096
#> ERR866158 1 0.4562 0.879 0.904 0.096
#> ERR866176 1 0.4562 0.879 0.904 0.096
#> ERR862984 1 0.4562 0.879 0.904 0.096
#> ERR866159 1 0.4562 0.879 0.904 0.096
#> ERR866177 1 0.4562 0.879 0.904 0.096
#> ERR862985 2 0.0672 0.991 0.008 0.992
#> ERR866160 2 0.0672 0.991 0.008 0.992
#> ERR866178 2 0.0672 0.991 0.008 0.992
#> ERR862986 2 0.0672 0.991 0.008 0.992
#> ERR866161 2 0.0672 0.991 0.008 0.992
#> ERR866179 2 0.0672 0.991 0.008 0.992
#> ERR862987 2 0.0000 0.998 0.000 1.000
#> ERR866162 2 0.0000 0.998 0.000 1.000
#> ERR866180 2 0.0000 0.998 0.000 1.000
#> ERR862988 2 0.0000 0.998 0.000 1.000
#> ERR866163 2 0.0000 0.998 0.000 1.000
#> ERR866181 2 0.0000 0.998 0.000 1.000
#> ERR862989 1 0.9286 0.719 0.656 0.344
#> ERR866164 1 0.9286 0.719 0.656 0.344
#> ERR866182 1 0.9286 0.719 0.656 0.344
#> ERR862990 1 0.9286 0.719 0.656 0.344
#> ERR866165 1 0.9286 0.719 0.656 0.344
#> ERR866183 1 0.9286 0.719 0.656 0.344
#> ERR862991 2 0.0000 0.998 0.000 1.000
#> ERR866166 2 0.0000 0.998 0.000 1.000
#> ERR866184 2 0.0000 0.998 0.000 1.000
#> ERR862992 2 0.0000 0.998 0.000 1.000
#> ERR866167 2 0.0000 0.998 0.000 1.000
#> ERR866185 2 0.0000 0.998 0.000 1.000
show/hide code output
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> ERR862939 1 0.0661 0.517 0.988 0.008 0.004
#> ERR862957 1 0.0661 0.517 0.988 0.008 0.004
#> ERR878007 1 0.0661 0.517 0.988 0.008 0.004
#> ERR862940 1 0.0661 0.517 0.988 0.008 0.004
#> ERR862958 1 0.0661 0.517 0.988 0.008 0.004
#> ERR878008 1 0.0661 0.517 0.988 0.008 0.004
#> ERR862941 2 0.0000 0.876 0.000 1.000 0.000
#> ERR862959 2 0.0000 0.876 0.000 1.000 0.000
#> ERR878009 2 0.0000 0.876 0.000 1.000 0.000
#> ERR862942 2 0.0000 0.876 0.000 1.000 0.000
#> ERR862960 2 0.0000 0.876 0.000 1.000 0.000
#> ERR878010 2 0.0000 0.876 0.000 1.000 0.000
#> ERR862943 1 0.0237 0.510 0.996 0.004 0.000
#> ERR862961 1 0.0237 0.510 0.996 0.004 0.000
#> ERR878011 1 0.0237 0.510 0.996 0.004 0.000
#> ERR862944 1 0.0237 0.510 0.996 0.004 0.000
#> ERR862962 1 0.0237 0.510 0.996 0.004 0.000
#> ERR878012 1 0.0237 0.510 0.996 0.004 0.000
#> ERR862945 3 0.6079 0.999 0.388 0.000 0.612
#> ERR862963 3 0.6062 0.999 0.384 0.000 0.616
#> ERR878013 3 0.6062 0.999 0.384 0.000 0.616
#> ERR862946 3 0.6079 0.999 0.388 0.000 0.612
#> ERR862964 3 0.6062 0.999 0.384 0.000 0.616
#> ERR878014 3 0.6062 0.999 0.384 0.000 0.616
#> ERR862947 2 0.4062 0.743 0.000 0.836 0.164
#> ERR862965 2 0.4062 0.743 0.000 0.836 0.164
#> ERR878015 2 0.4062 0.743 0.000 0.836 0.164
#> ERR862948 2 0.4062 0.743 0.000 0.836 0.164
#> ERR862966 2 0.4062 0.743 0.000 0.836 0.164
#> ERR878016 2 0.4062 0.743 0.000 0.836 0.164
#> ERR862949 2 0.0000 0.876 0.000 1.000 0.000
#> ERR862967 2 0.0000 0.876 0.000 1.000 0.000
#> ERR878017 2 0.0000 0.876 0.000 1.000 0.000
#> ERR862950 2 0.0000 0.876 0.000 1.000 0.000
#> ERR862968 2 0.0000 0.876 0.000 1.000 0.000
#> ERR878018 2 0.0000 0.876 0.000 1.000 0.000
#> ERR862951 1 0.9283 0.689 0.524 0.260 0.216
#> ERR862969 1 0.9283 0.689 0.524 0.260 0.216
#> ERR878019 1 0.9379 0.663 0.508 0.276 0.216
#> ERR862952 1 0.9283 0.689 0.524 0.260 0.216
#> ERR862970 1 0.9258 0.693 0.528 0.256 0.216
#> ERR878020 1 0.9309 0.684 0.520 0.264 0.216
#> ERR862953 2 0.4750 0.773 0.000 0.784 0.216
#> ERR862971 2 0.4750 0.773 0.000 0.784 0.216
#> ERR878021 2 0.4750 0.773 0.000 0.784 0.216
#> ERR862954 2 0.4750 0.773 0.000 0.784 0.216
#> ERR862972 2 0.4750 0.773 0.000 0.784 0.216
#> ERR878022 2 0.4750 0.773 0.000 0.784 0.216
#> ERR862955 2 0.4750 0.773 0.000 0.784 0.216
#> ERR862973 2 0.4750 0.773 0.000 0.784 0.216
#> ERR878023 2 0.4750 0.773 0.000 0.784 0.216
#> ERR862956 2 0.4750 0.773 0.000 0.784 0.216
#> ERR862974 2 0.4750 0.773 0.000 0.784 0.216
#> ERR878024 2 0.4750 0.773 0.000 0.784 0.216
#> ERR862975 1 0.8504 0.772 0.612 0.172 0.216
#> ERR866150 1 0.8504 0.772 0.612 0.172 0.216
#> ERR866168 1 0.8504 0.772 0.612 0.172 0.216
#> ERR862976 1 0.8504 0.772 0.612 0.172 0.216
#> ERR866151 1 0.8504 0.772 0.612 0.172 0.216
#> ERR866169 1 0.8504 0.772 0.612 0.172 0.216
#> ERR862977 2 0.4750 0.773 0.000 0.784 0.216
#> ERR866152 2 0.4750 0.773 0.000 0.784 0.216
#> ERR866170 2 0.4750 0.773 0.000 0.784 0.216
#> ERR862978 2 0.4750 0.773 0.000 0.784 0.216
#> ERR866153 2 0.4750 0.773 0.000 0.784 0.216
#> ERR866171 2 0.4750 0.773 0.000 0.784 0.216
#> ERR862979 2 0.0000 0.876 0.000 1.000 0.000
#> ERR866154 2 0.0000 0.876 0.000 1.000 0.000
#> ERR866172 2 0.0000 0.876 0.000 1.000 0.000
#> ERR862980 2 0.0000 0.876 0.000 1.000 0.000
#> ERR866155 2 0.0000 0.876 0.000 1.000 0.000
#> ERR866173 2 0.0000 0.876 0.000 1.000 0.000
#> ERR862981 1 0.8504 0.772 0.612 0.172 0.216
#> ERR866156 1 0.8504 0.772 0.612 0.172 0.216
#> ERR866174 1 0.8504 0.772 0.612 0.172 0.216
#> ERR866157 1 0.8504 0.772 0.612 0.172 0.216
#> ERR866175 1 0.8504 0.772 0.612 0.172 0.216
#> ERR862983 1 0.0424 0.517 0.992 0.008 0.000
#> ERR866158 1 0.0424 0.517 0.992 0.008 0.000
#> ERR866176 1 0.0424 0.517 0.992 0.008 0.000
#> ERR862984 1 0.0424 0.517 0.992 0.008 0.000
#> ERR866159 1 0.0424 0.517 0.992 0.008 0.000
#> ERR866177 1 0.0424 0.517 0.992 0.008 0.000
#> ERR862985 1 0.8504 0.772 0.612 0.172 0.216
#> ERR866160 1 0.8504 0.772 0.612 0.172 0.216
#> ERR866178 1 0.8504 0.772 0.612 0.172 0.216
#> ERR862986 1 0.8504 0.772 0.612 0.172 0.216
#> ERR866161 1 0.8504 0.772 0.612 0.172 0.216
#> ERR866179 1 0.8504 0.772 0.612 0.172 0.216
#> ERR862987 2 0.1529 0.862 0.000 0.960 0.040
#> ERR866162 2 0.1529 0.862 0.000 0.960 0.040
#> ERR866180 2 0.1529 0.862 0.000 0.960 0.040
#> ERR862988 2 0.1529 0.862 0.000 0.960 0.040
#> ERR866163 2 0.1529 0.862 0.000 0.960 0.040
#> ERR866181 2 0.1529 0.862 0.000 0.960 0.040
#> ERR862989 1 0.8504 0.772 0.612 0.172 0.216
#> ERR866164 1 0.8504 0.772 0.612 0.172 0.216
#> ERR866182 1 0.8504 0.772 0.612 0.172 0.216
#> ERR862990 1 0.8504 0.772 0.612 0.172 0.216
#> ERR866165 1 0.8504 0.772 0.612 0.172 0.216
#> ERR866183 1 0.8504 0.772 0.612 0.172 0.216
#> ERR862991 2 0.1529 0.862 0.000 0.960 0.040
#> ERR866166 2 0.1529 0.862 0.000 0.960 0.040
#> ERR866184 2 0.1529 0.862 0.000 0.960 0.040
#> ERR862992 2 0.1529 0.862 0.000 0.960 0.040
#> ERR866167 2 0.1529 0.862 0.000 0.960 0.040
#> ERR866185 2 0.1529 0.862 0.000 0.960 0.040
show/hide code output
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> ERR862939 1 0.4905 0.697 0.632 0.000 0.004 0.364
#> ERR862957 1 0.4905 0.697 0.632 0.000 0.004 0.364
#> ERR878007 1 0.4905 0.697 0.632 0.000 0.004 0.364
#> ERR862940 1 0.4905 0.697 0.632 0.000 0.004 0.364
#> ERR862958 1 0.4905 0.697 0.632 0.000 0.004 0.364
#> ERR878008 1 0.4905 0.697 0.632 0.000 0.004 0.364
#> ERR862941 2 0.0817 0.594 0.000 0.976 0.024 0.000
#> ERR862959 2 0.0817 0.594 0.000 0.976 0.024 0.000
#> ERR878009 2 0.0817 0.594 0.000 0.976 0.024 0.000
#> ERR862942 2 0.0817 0.594 0.000 0.976 0.024 0.000
#> ERR862960 2 0.0817 0.594 0.000 0.976 0.024 0.000
#> ERR878010 2 0.0817 0.594 0.000 0.976 0.024 0.000
#> ERR862943 1 0.4761 0.693 0.628 0.000 0.000 0.372
#> ERR862961 1 0.4761 0.693 0.628 0.000 0.000 0.372
#> ERR878011 1 0.4761 0.693 0.628 0.000 0.000 0.372
#> ERR862944 1 0.4761 0.693 0.628 0.000 0.000 0.372
#> ERR862962 1 0.4761 0.693 0.628 0.000 0.000 0.372
#> ERR878012 1 0.4761 0.693 0.628 0.000 0.000 0.372
#> ERR862945 4 0.4790 0.996 0.000 0.000 0.380 0.620
#> ERR862963 4 0.4761 0.996 0.000 0.000 0.372 0.628
#> ERR878013 4 0.4761 0.996 0.000 0.000 0.372 0.628
#> ERR862946 4 0.4817 0.994 0.000 0.000 0.388 0.612
#> ERR862964 4 0.4817 0.995 0.000 0.000 0.388 0.612
#> ERR878014 4 0.4776 0.996 0.000 0.000 0.376 0.624
#> ERR862947 3 0.4998 1.000 0.000 0.488 0.512 0.000
#> ERR862965 3 0.4998 1.000 0.000 0.488 0.512 0.000
#> ERR878015 3 0.4998 1.000 0.000 0.488 0.512 0.000
#> ERR862948 3 0.4998 1.000 0.000 0.488 0.512 0.000
#> ERR862966 3 0.4998 1.000 0.000 0.488 0.512 0.000
#> ERR878016 3 0.4998 1.000 0.000 0.488 0.512 0.000
#> ERR862949 2 0.0817 0.594 0.000 0.976 0.024 0.000
#> ERR862967 2 0.0817 0.594 0.000 0.976 0.024 0.000
#> ERR878017 2 0.0817 0.594 0.000 0.976 0.024 0.000
#> ERR862950 2 0.0817 0.594 0.000 0.976 0.024 0.000
#> ERR862968 2 0.0817 0.594 0.000 0.976 0.024 0.000
#> ERR878018 2 0.0817 0.594 0.000 0.976 0.024 0.000
#> ERR862951 2 0.6741 0.326 0.424 0.484 0.092 0.000
#> ERR862969 2 0.6727 0.341 0.412 0.496 0.092 0.000
#> ERR878019 2 0.6727 0.341 0.412 0.496 0.092 0.000
#> ERR862952 2 0.6727 0.341 0.412 0.496 0.092 0.000
#> ERR862970 2 0.6733 0.336 0.416 0.492 0.092 0.000
#> ERR878020 2 0.6727 0.341 0.412 0.496 0.092 0.000
#> ERR862953 2 0.6648 0.374 0.372 0.536 0.092 0.000
#> ERR862971 2 0.6648 0.374 0.372 0.536 0.092 0.000
#> ERR878021 2 0.6648 0.374 0.372 0.536 0.092 0.000
#> ERR862954 2 0.6648 0.374 0.372 0.536 0.092 0.000
#> ERR862972 2 0.6648 0.374 0.372 0.536 0.092 0.000
#> ERR878022 2 0.6648 0.374 0.372 0.536 0.092 0.000
#> ERR862955 2 0.3399 0.603 0.040 0.868 0.092 0.000
#> ERR862973 2 0.3399 0.603 0.040 0.868 0.092 0.000
#> ERR878023 2 0.3399 0.603 0.040 0.868 0.092 0.000
#> ERR862956 2 0.3399 0.603 0.040 0.868 0.092 0.000
#> ERR862974 2 0.3399 0.603 0.040 0.868 0.092 0.000
#> ERR878024 2 0.3399 0.603 0.040 0.868 0.092 0.000
#> ERR862975 1 0.0779 0.802 0.980 0.016 0.000 0.004
#> ERR866150 1 0.0779 0.802 0.980 0.016 0.000 0.004
#> ERR866168 1 0.0779 0.802 0.980 0.016 0.000 0.004
#> ERR862976 1 0.0779 0.802 0.980 0.016 0.000 0.004
#> ERR866151 1 0.0779 0.802 0.980 0.016 0.000 0.004
#> ERR866169 1 0.0779 0.802 0.980 0.016 0.000 0.004
#> ERR862977 2 0.3399 0.603 0.040 0.868 0.092 0.000
#> ERR866152 2 0.3399 0.603 0.040 0.868 0.092 0.000
#> ERR866170 2 0.3399 0.603 0.040 0.868 0.092 0.000
#> ERR862978 2 0.3399 0.603 0.040 0.868 0.092 0.000
#> ERR866153 2 0.3399 0.603 0.040 0.868 0.092 0.000
#> ERR866171 2 0.3399 0.603 0.040 0.868 0.092 0.000
#> ERR862979 2 0.0188 0.604 0.000 0.996 0.004 0.000
#> ERR866154 2 0.0188 0.604 0.000 0.996 0.004 0.000
#> ERR866172 2 0.0000 0.603 0.000 1.000 0.000 0.000
#> ERR862980 2 0.0000 0.603 0.000 1.000 0.000 0.000
#> ERR866155 2 0.0000 0.603 0.000 1.000 0.000 0.000
#> ERR866173 2 0.0000 0.603 0.000 1.000 0.000 0.000
#> ERR862981 1 0.1920 0.788 0.944 0.024 0.028 0.004
#> ERR866156 1 0.1920 0.788 0.944 0.024 0.028 0.004
#> ERR866174 1 0.1920 0.788 0.944 0.024 0.028 0.004
#> ERR866157 1 0.1920 0.788 0.944 0.024 0.028 0.004
#> ERR866175 1 0.1920 0.788 0.944 0.024 0.028 0.004
#> ERR862983 1 0.4277 0.741 0.720 0.000 0.000 0.280
#> ERR866158 1 0.4277 0.741 0.720 0.000 0.000 0.280
#> ERR866176 1 0.4277 0.741 0.720 0.000 0.000 0.280
#> ERR862984 1 0.4277 0.741 0.720 0.000 0.000 0.280
#> ERR866159 1 0.4277 0.741 0.720 0.000 0.000 0.280
#> ERR866177 1 0.4277 0.741 0.720 0.000 0.000 0.280
#> ERR862985 1 0.1920 0.788 0.944 0.024 0.028 0.004
#> ERR866160 1 0.1920 0.788 0.944 0.024 0.028 0.004
#> ERR866178 1 0.1920 0.788 0.944 0.024 0.028 0.004
#> ERR862986 1 0.1920 0.788 0.944 0.024 0.028 0.004
#> ERR866161 1 0.1920 0.788 0.944 0.024 0.028 0.004
#> ERR866179 1 0.1920 0.788 0.944 0.024 0.028 0.004
#> ERR862987 2 0.2921 0.409 0.000 0.860 0.140 0.000
#> ERR866162 2 0.2921 0.409 0.000 0.860 0.140 0.000
#> ERR866180 2 0.2921 0.409 0.000 0.860 0.140 0.000
#> ERR862988 2 0.2921 0.409 0.000 0.860 0.140 0.000
#> ERR866163 2 0.2921 0.409 0.000 0.860 0.140 0.000
#> ERR866181 2 0.2921 0.409 0.000 0.860 0.140 0.000
#> ERR862989 1 0.0592 0.802 0.984 0.016 0.000 0.000
#> ERR866164 1 0.0592 0.802 0.984 0.016 0.000 0.000
#> ERR866182 1 0.0592 0.802 0.984 0.016 0.000 0.000
#> ERR862990 1 0.0592 0.802 0.984 0.016 0.000 0.000
#> ERR866165 1 0.0592 0.802 0.984 0.016 0.000 0.000
#> ERR866183 1 0.0592 0.802 0.984 0.016 0.000 0.000
#> ERR862991 2 0.2921 0.409 0.000 0.860 0.140 0.000
#> ERR866166 2 0.2921 0.409 0.000 0.860 0.140 0.000
#> ERR866184 2 0.2921 0.409 0.000 0.860 0.140 0.000
#> ERR862992 2 0.2921 0.409 0.000 0.860 0.140 0.000
#> ERR866167 2 0.2921 0.409 0.000 0.860 0.140 0.000
#> ERR866185 2 0.2921 0.409 0.000 0.860 0.140 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
#> ERR862939 3 0.2793 0.794 0.088 0.000 0.876 0.000 0.036
#> ERR862957 3 0.2793 0.794 0.088 0.000 0.876 0.000 0.036
#> ERR878007 3 0.2793 0.794 0.088 0.000 0.876 0.000 0.036
#> ERR862940 3 0.2793 0.794 0.088 0.000 0.876 0.000 0.036
#> ERR862958 3 0.2793 0.794 0.088 0.000 0.876 0.000 0.036
#> ERR878008 3 0.2793 0.794 0.088 0.000 0.876 0.000 0.036
#> ERR862941 2 0.5851 0.310 0.140 0.588 0.000 0.000 0.272
#> ERR862959 2 0.5851 0.310 0.140 0.588 0.000 0.000 0.272
#> ERR878009 2 0.5851 0.310 0.140 0.588 0.000 0.000 0.272
#> ERR862942 2 0.5851 0.310 0.140 0.588 0.000 0.000 0.272
#> ERR862960 2 0.5851 0.310 0.140 0.588 0.000 0.000 0.272
#> ERR878010 2 0.5851 0.310 0.140 0.588 0.000 0.000 0.272
#> ERR862943 3 0.0000 0.814 0.000 0.000 1.000 0.000 0.000
#> ERR862961 3 0.0000 0.814 0.000 0.000 1.000 0.000 0.000
#> ERR878011 3 0.0000 0.814 0.000 0.000 1.000 0.000 0.000
#> ERR862944 3 0.0000 0.814 0.000 0.000 1.000 0.000 0.000
#> ERR862962 3 0.0000 0.814 0.000 0.000 1.000 0.000 0.000
#> ERR878012 3 0.0000 0.814 0.000 0.000 1.000 0.000 0.000
#> ERR862945 4 0.0162 0.996 0.004 0.000 0.000 0.996 0.000
#> ERR862963 4 0.0000 0.996 0.000 0.000 0.000 1.000 0.000
#> ERR878013 4 0.0000 0.996 0.000 0.000 0.000 1.000 0.000
#> ERR862946 4 0.0566 0.993 0.004 0.000 0.000 0.984 0.012
#> ERR862964 4 0.0566 0.994 0.004 0.000 0.000 0.984 0.012
#> ERR878014 4 0.0324 0.995 0.004 0.000 0.000 0.992 0.004
#> ERR862947 5 0.4541 0.528 0.112 0.136 0.000 0.000 0.752
#> ERR862965 5 0.4493 0.528 0.108 0.136 0.000 0.000 0.756
#> ERR878015 5 0.4444 0.528 0.104 0.136 0.000 0.000 0.760
#> ERR862948 5 0.4444 0.528 0.104 0.136 0.000 0.000 0.760
#> ERR862966 5 0.4541 0.528 0.112 0.136 0.000 0.000 0.752
#> ERR878016 5 0.4493 0.528 0.108 0.136 0.000 0.000 0.756
#> ERR862949 2 0.5851 0.310 0.140 0.588 0.000 0.000 0.272
#> ERR862967 2 0.5851 0.310 0.140 0.588 0.000 0.000 0.272
#> ERR878017 2 0.5851 0.310 0.140 0.588 0.000 0.000 0.272
#> ERR862950 2 0.5851 0.310 0.140 0.588 0.000 0.000 0.272
#> ERR862968 2 0.5851 0.310 0.140 0.588 0.000 0.000 0.272
#> ERR878018 2 0.5851 0.310 0.140 0.588 0.000 0.000 0.272
#> ERR862951 1 0.3969 0.486 0.692 0.304 0.000 0.000 0.004
#> ERR862969 1 0.3969 0.486 0.692 0.304 0.000 0.000 0.004
#> ERR878019 1 0.3969 0.486 0.692 0.304 0.000 0.000 0.004
#> ERR862952 1 0.3969 0.486 0.692 0.304 0.000 0.000 0.004
#> ERR862970 1 0.3969 0.486 0.692 0.304 0.000 0.000 0.004
#> ERR878020 1 0.3969 0.486 0.692 0.304 0.000 0.000 0.004
#> ERR862953 2 0.4383 0.154 0.424 0.572 0.000 0.000 0.004
#> ERR862971 2 0.4383 0.154 0.424 0.572 0.000 0.000 0.004
#> ERR878021 2 0.4383 0.154 0.424 0.572 0.000 0.000 0.004
#> ERR862954 2 0.4383 0.154 0.424 0.572 0.000 0.000 0.004
#> ERR862972 2 0.4383 0.154 0.424 0.572 0.000 0.000 0.004
#> ERR878022 2 0.4383 0.154 0.424 0.572 0.000 0.000 0.004
#> ERR862955 2 0.0963 0.474 0.036 0.964 0.000 0.000 0.000
#> ERR862973 2 0.0963 0.474 0.036 0.964 0.000 0.000 0.000
#> ERR878023 2 0.0963 0.474 0.036 0.964 0.000 0.000 0.000
#> ERR862956 2 0.0963 0.474 0.036 0.964 0.000 0.000 0.000
#> ERR862974 2 0.0963 0.474 0.036 0.964 0.000 0.000 0.000
#> ERR878024 2 0.0880 0.472 0.032 0.968 0.000 0.000 0.000
#> ERR862975 1 0.5388 0.634 0.580 0.004 0.360 0.000 0.056
#> ERR866150 1 0.5388 0.634 0.580 0.004 0.360 0.000 0.056
#> ERR866168 1 0.5388 0.634 0.580 0.004 0.360 0.000 0.056
#> ERR862976 1 0.5388 0.634 0.580 0.004 0.360 0.000 0.056
#> ERR866151 1 0.5388 0.634 0.580 0.004 0.360 0.000 0.056
#> ERR866169 1 0.5388 0.634 0.580 0.004 0.360 0.000 0.056
#> ERR862977 2 0.0963 0.474 0.036 0.964 0.000 0.000 0.000
#> ERR866152 2 0.0963 0.474 0.036 0.964 0.000 0.000 0.000
#> ERR866170 2 0.0963 0.474 0.036 0.964 0.000 0.000 0.000
#> ERR862978 2 0.0963 0.474 0.036 0.964 0.000 0.000 0.000
#> ERR866153 2 0.0963 0.474 0.036 0.964 0.000 0.000 0.000
#> ERR866171 2 0.0963 0.474 0.036 0.964 0.000 0.000 0.000
#> ERR862979 2 0.5680 0.350 0.140 0.620 0.000 0.000 0.240
#> ERR866154 2 0.5680 0.350 0.140 0.620 0.000 0.000 0.240
#> ERR866172 2 0.5680 0.350 0.140 0.620 0.000 0.000 0.240
#> ERR862980 2 0.5680 0.350 0.140 0.620 0.000 0.000 0.240
#> ERR866155 2 0.5680 0.350 0.140 0.620 0.000 0.000 0.240
#> ERR866173 2 0.5680 0.350 0.140 0.620 0.000 0.000 0.240
#> ERR862981 1 0.5269 0.731 0.668 0.044 0.264 0.000 0.024
#> ERR866156 1 0.5269 0.731 0.668 0.044 0.264 0.000 0.024
#> ERR866174 1 0.5269 0.731 0.668 0.044 0.264 0.000 0.024
#> ERR866157 1 0.5269 0.731 0.668 0.044 0.264 0.000 0.024
#> ERR866175 1 0.5269 0.731 0.668 0.044 0.264 0.000 0.024
#> ERR862983 3 0.4497 0.640 0.208 0.000 0.732 0.000 0.060
#> ERR866158 3 0.4497 0.640 0.208 0.000 0.732 0.000 0.060
#> ERR866176 3 0.4497 0.640 0.208 0.000 0.732 0.000 0.060
#> ERR862984 3 0.4497 0.640 0.208 0.000 0.732 0.000 0.060
#> ERR866159 3 0.4497 0.640 0.208 0.000 0.732 0.000 0.060
#> ERR866177 3 0.4497 0.640 0.208 0.000 0.732 0.000 0.060
#> ERR862985 1 0.5269 0.731 0.668 0.044 0.264 0.000 0.024
#> ERR866160 1 0.5269 0.731 0.668 0.044 0.264 0.000 0.024
#> ERR866178 1 0.5269 0.731 0.668 0.044 0.264 0.000 0.024
#> ERR862986 1 0.5269 0.731 0.668 0.044 0.264 0.000 0.024
#> ERR866161 1 0.5269 0.731 0.668 0.044 0.264 0.000 0.024
#> ERR866179 1 0.5269 0.731 0.668 0.044 0.264 0.000 0.024
#> ERR862987 5 0.4302 0.665 0.000 0.480 0.000 0.000 0.520
#> ERR866162 5 0.4302 0.665 0.000 0.480 0.000 0.000 0.520
#> ERR866180 5 0.4302 0.665 0.000 0.480 0.000 0.000 0.520
#> ERR862988 5 0.4302 0.665 0.000 0.480 0.000 0.000 0.520
#> ERR866163 5 0.4302 0.665 0.000 0.480 0.000 0.000 0.520
#> ERR866181 5 0.4302 0.665 0.000 0.480 0.000 0.000 0.520
#> ERR862989 1 0.4955 0.678 0.632 0.004 0.328 0.000 0.036
#> ERR866164 1 0.4955 0.678 0.632 0.004 0.328 0.000 0.036
#> ERR866182 1 0.4955 0.678 0.632 0.004 0.328 0.000 0.036
#> ERR862990 1 0.4955 0.678 0.632 0.004 0.328 0.000 0.036
#> ERR866165 1 0.4955 0.678 0.632 0.004 0.328 0.000 0.036
#> ERR866183 1 0.4955 0.678 0.632 0.004 0.328 0.000 0.036
#> ERR862991 5 0.4302 0.665 0.000 0.480 0.000 0.000 0.520
#> ERR866166 5 0.4302 0.665 0.000 0.480 0.000 0.000 0.520
#> ERR866184 5 0.4302 0.665 0.000 0.480 0.000 0.000 0.520
#> ERR862992 5 0.4302 0.665 0.000 0.480 0.000 0.000 0.520
#> ERR866167 5 0.4302 0.665 0.000 0.480 0.000 0.000 0.520
#> ERR866185 5 0.4302 0.665 0.000 0.480 0.000 0.000 0.520
show/hide code output
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> ERR862939 3 0.5370 0.731 0.196 0.000 0.664 0.000 0.060 0.080
#> ERR862957 3 0.5370 0.731 0.196 0.000 0.664 0.000 0.060 0.080
#> ERR878007 3 0.5370 0.731 0.196 0.000 0.664 0.000 0.060 0.080
#> ERR862940 3 0.5370 0.731 0.196 0.000 0.664 0.000 0.060 0.080
#> ERR862958 3 0.5370 0.731 0.196 0.000 0.664 0.000 0.060 0.080
#> ERR878008 3 0.5370 0.731 0.196 0.000 0.664 0.000 0.060 0.080
#> ERR862941 2 0.0260 0.745 0.000 0.992 0.008 0.000 0.000 0.000
#> ERR862959 2 0.0260 0.745 0.000 0.992 0.008 0.000 0.000 0.000
#> ERR878009 2 0.0260 0.745 0.000 0.992 0.008 0.000 0.000 0.000
#> ERR862942 2 0.0260 0.745 0.000 0.992 0.008 0.000 0.000 0.000
#> ERR862960 2 0.0260 0.745 0.000 0.992 0.008 0.000 0.000 0.000
#> ERR878010 2 0.0260 0.745 0.000 0.992 0.008 0.000 0.000 0.000
#> ERR862943 3 0.2048 0.757 0.120 0.000 0.880 0.000 0.000 0.000
#> ERR862961 3 0.2048 0.757 0.120 0.000 0.880 0.000 0.000 0.000
#> ERR878011 3 0.2048 0.757 0.120 0.000 0.880 0.000 0.000 0.000
#> ERR862944 3 0.2048 0.757 0.120 0.000 0.880 0.000 0.000 0.000
#> ERR862962 3 0.2048 0.757 0.120 0.000 0.880 0.000 0.000 0.000
#> ERR878012 3 0.2048 0.757 0.120 0.000 0.880 0.000 0.000 0.000
#> ERR862945 4 0.0260 0.995 0.000 0.000 0.000 0.992 0.000 0.008
#> ERR862963 4 0.0146 0.995 0.000 0.000 0.000 0.996 0.000 0.004
#> ERR878013 4 0.0000 0.995 0.000 0.000 0.000 1.000 0.000 0.000
#> ERR862946 4 0.0363 0.994 0.000 0.000 0.000 0.988 0.000 0.012
#> ERR862964 4 0.0520 0.993 0.000 0.000 0.008 0.984 0.000 0.008
#> ERR878014 4 0.0146 0.995 0.000 0.000 0.004 0.996 0.000 0.000
#> ERR862947 5 0.3659 0.983 0.000 0.224 0.012 0.000 0.752 0.012
#> ERR862965 5 0.3109 0.992 0.000 0.224 0.004 0.000 0.772 0.000
#> ERR878015 5 0.2969 0.992 0.000 0.224 0.000 0.000 0.776 0.000
#> ERR862948 5 0.3217 0.992 0.000 0.224 0.008 0.000 0.768 0.000
#> ERR862966 5 0.3562 0.987 0.000 0.224 0.008 0.000 0.756 0.012
#> ERR878016 5 0.3109 0.992 0.000 0.224 0.004 0.000 0.772 0.000
#> ERR862949 2 0.0000 0.746 0.000 1.000 0.000 0.000 0.000 0.000
#> ERR862967 2 0.0000 0.746 0.000 1.000 0.000 0.000 0.000 0.000
#> ERR878017 2 0.0000 0.746 0.000 1.000 0.000 0.000 0.000 0.000
#> ERR862950 2 0.0000 0.746 0.000 1.000 0.000 0.000 0.000 0.000
#> ERR862968 2 0.0000 0.746 0.000 1.000 0.000 0.000 0.000 0.000
#> ERR878018 2 0.0000 0.746 0.000 1.000 0.000 0.000 0.000 0.000
#> ERR862951 1 0.4373 0.564 0.724 0.048 0.004 0.000 0.012 0.212
#> ERR862969 1 0.4373 0.564 0.724 0.048 0.004 0.000 0.012 0.212
#> ERR878019 1 0.4373 0.564 0.724 0.048 0.004 0.000 0.012 0.212
#> ERR862952 1 0.4373 0.564 0.724 0.048 0.004 0.000 0.012 0.212
#> ERR862970 1 0.4373 0.564 0.724 0.048 0.004 0.000 0.012 0.212
#> ERR878020 1 0.4373 0.564 0.724 0.048 0.004 0.000 0.012 0.212
#> ERR862953 6 0.5664 0.429 0.364 0.116 0.000 0.000 0.012 0.508
#> ERR862971 6 0.5664 0.429 0.364 0.116 0.000 0.000 0.012 0.508
#> ERR878021 6 0.5664 0.429 0.364 0.116 0.000 0.000 0.012 0.508
#> ERR862954 6 0.5664 0.429 0.364 0.116 0.000 0.000 0.012 0.508
#> ERR862972 6 0.5689 0.435 0.360 0.120 0.000 0.000 0.012 0.508
#> ERR878022 6 0.5664 0.429 0.364 0.116 0.000 0.000 0.012 0.508
#> ERR862955 6 0.4102 0.714 0.012 0.356 0.000 0.000 0.004 0.628
#> ERR862973 6 0.4102 0.714 0.012 0.356 0.000 0.000 0.004 0.628
#> ERR878023 6 0.4089 0.713 0.012 0.352 0.000 0.000 0.004 0.632
#> ERR862956 6 0.4102 0.714 0.012 0.356 0.000 0.000 0.004 0.628
#> ERR862974 6 0.4102 0.714 0.012 0.356 0.000 0.000 0.004 0.628
#> ERR878024 6 0.4089 0.713 0.012 0.352 0.000 0.000 0.004 0.632
#> ERR862975 1 0.5007 0.649 0.716 0.000 0.060 0.000 0.124 0.100
#> ERR866150 1 0.5007 0.649 0.716 0.000 0.060 0.000 0.124 0.100
#> ERR866168 1 0.5007 0.649 0.716 0.000 0.060 0.000 0.124 0.100
#> ERR862976 1 0.5007 0.649 0.716 0.000 0.060 0.000 0.124 0.100
#> ERR866151 1 0.5007 0.649 0.716 0.000 0.060 0.000 0.124 0.100
#> ERR866169 1 0.5007 0.649 0.716 0.000 0.060 0.000 0.124 0.100
#> ERR862977 6 0.4445 0.713 0.012 0.356 0.008 0.000 0.008 0.616
#> ERR866152 6 0.4433 0.713 0.012 0.352 0.008 0.000 0.008 0.620
#> ERR866170 6 0.4433 0.713 0.012 0.352 0.008 0.000 0.008 0.620
#> ERR862978 6 0.4445 0.713 0.012 0.356 0.008 0.000 0.008 0.616
#> ERR866153 6 0.4433 0.713 0.012 0.352 0.008 0.000 0.008 0.620
#> ERR866171 6 0.4433 0.713 0.012 0.352 0.008 0.000 0.008 0.620
#> ERR862979 2 0.0146 0.745 0.000 0.996 0.004 0.000 0.000 0.000
#> ERR866154 2 0.0146 0.745 0.000 0.996 0.004 0.000 0.000 0.000
#> ERR866172 2 0.0146 0.745 0.000 0.996 0.004 0.000 0.000 0.000
#> ERR862980 2 0.0146 0.745 0.000 0.996 0.004 0.000 0.000 0.000
#> ERR866155 2 0.0146 0.745 0.000 0.996 0.004 0.000 0.000 0.000
#> ERR866173 2 0.0146 0.745 0.000 0.996 0.004 0.000 0.000 0.000
#> ERR862981 1 0.1672 0.750 0.932 0.004 0.000 0.000 0.016 0.048
#> ERR866156 1 0.1605 0.750 0.936 0.004 0.000 0.000 0.016 0.044
#> ERR866174 1 0.1672 0.750 0.932 0.004 0.000 0.000 0.016 0.048
#> ERR866157 1 0.1672 0.750 0.932 0.004 0.000 0.000 0.016 0.048
#> ERR866175 1 0.1672 0.750 0.932 0.004 0.000 0.000 0.016 0.048
#> ERR862983 3 0.6578 0.584 0.284 0.000 0.504 0.000 0.108 0.104
#> ERR866158 3 0.6578 0.584 0.284 0.000 0.504 0.000 0.108 0.104
#> ERR866176 3 0.6578 0.584 0.284 0.000 0.504 0.000 0.108 0.104
#> ERR862984 3 0.6578 0.584 0.284 0.000 0.504 0.000 0.108 0.104
#> ERR866159 3 0.6578 0.584 0.284 0.000 0.504 0.000 0.108 0.104
#> ERR866177 3 0.6578 0.584 0.284 0.000 0.504 0.000 0.108 0.104
#> ERR862985 1 0.1672 0.750 0.932 0.004 0.000 0.000 0.016 0.048
#> ERR866160 1 0.1672 0.750 0.932 0.004 0.000 0.000 0.016 0.048
#> ERR866178 1 0.1672 0.750 0.932 0.004 0.000 0.000 0.016 0.048
#> ERR862986 1 0.1672 0.750 0.932 0.004 0.000 0.000 0.016 0.048
#> ERR866161 1 0.1672 0.750 0.932 0.004 0.000 0.000 0.016 0.048
#> ERR866179 1 0.1672 0.750 0.932 0.004 0.000 0.000 0.016 0.048
#> ERR862987 2 0.6169 0.499 0.000 0.576 0.064 0.000 0.212 0.148
#> ERR866162 2 0.6169 0.499 0.000 0.576 0.064 0.000 0.212 0.148
#> ERR866180 2 0.6169 0.499 0.000 0.576 0.064 0.000 0.212 0.148
#> ERR862988 2 0.6169 0.499 0.000 0.576 0.064 0.000 0.212 0.148
#> ERR866163 2 0.6169 0.499 0.000 0.576 0.064 0.000 0.212 0.148
#> ERR866181 2 0.6169 0.499 0.000 0.576 0.064 0.000 0.212 0.148
#> ERR862989 1 0.4340 0.691 0.768 0.000 0.036 0.000 0.096 0.100
#> ERR866164 1 0.4340 0.691 0.768 0.000 0.036 0.000 0.096 0.100
#> ERR866182 1 0.4340 0.691 0.768 0.000 0.036 0.000 0.096 0.100
#> ERR862990 1 0.4340 0.691 0.768 0.000 0.036 0.000 0.096 0.100
#> ERR866165 1 0.4340 0.691 0.768 0.000 0.036 0.000 0.096 0.100
#> ERR866183 1 0.4340 0.691 0.768 0.000 0.036 0.000 0.096 0.100
#> ERR862991 2 0.6247 0.494 0.000 0.568 0.068 0.000 0.212 0.152
#> ERR866166 2 0.6247 0.494 0.000 0.568 0.068 0.000 0.212 0.152
#> ERR866184 2 0.6247 0.494 0.000 0.568 0.068 0.000 0.212 0.152
#> ERR862992 2 0.6247 0.494 0.000 0.568 0.068 0.000 0.212 0.152
#> ERR866167 2 0.6247 0.494 0.000 0.568 0.068 0.000 0.212 0.152
#> ERR866185 2 0.6247 0.494 0.000 0.568 0.068 0.000 0.212 0.152
Heatmaps for the consensus matrix. It visualizes the probability of two
samples to be in a same group.
consensus_heatmap(res, k = 2)

consensus_heatmap(res, k = 3)

consensus_heatmap(res, k = 4)

consensus_heatmap(res, k = 5)

consensus_heatmap(res, k = 6)

Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)

membership_heatmap(res, k = 3)

membership_heatmap(res, k = 4)

membership_heatmap(res, k = 5)

membership_heatmap(res, k = 6)

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)

get_signatures(res, k = 3)

get_signatures(res, k = 4)

get_signatures(res, k = 5)

get_signatures(res, k = 6)

Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)

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

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

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

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

Compare the overlap of signatures from different k:
compare_signatures(res)

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.
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:
which_row
: row indices corresponding to the input matrix.
fdr
: FDR for the differential test.
mean_x
: The mean value in group x.
scaled_mean_x
: The mean value in group x after rows are scaled.
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")

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

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

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

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

Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)

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"]
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 15818 rows and 107 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)

The plots are:
- The first row: a plot of the ECDF (empirical cumulative distribution
function) curves of the consensus matrix for each
k
and the heatmap of
predicted classes for each k
.
- The second row: heatmaps of the consensus matrix for each
k
.
- The third row: heatmaps of the membership matrix for each
k
.
- The fouth row: heatmaps of the signatures for each
k
.
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:
- ECDF curves of the consensus matrix for each
k
;
- 1-PAC. The PAC
score
measures the proportion of the ambiguous subgrouping.
- Mean silhouette score.
- Concordance. The mean probability of fiting the consensus class ids in all
partitions.
- Area increased. Denote \(A_k\) as the area under the ECDF curve for current
k
, the area increased is defined as \(A_k - A_{k-1}\).
- Rand index. The percent of pairs of samples that are both in a same cluster
or both are not in a same cluster in the partition of k and k-1.
- Jaccard index. The ratio of pairs of samples are both in a same cluster in
the partition of k and k-1 and the pairs of samples are both in a same
cluster in the partition k or k-1.
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)

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.995 0.997 0.4983 0.503 0.503
#> 3 3 0.843 0.842 0.923 0.2300 0.835 0.683
#> 4 4 0.773 0.794 0.864 0.1213 0.939 0.841
#> 5 5 0.822 0.889 0.912 0.1063 0.886 0.662
#> 6 6 0.887 0.863 0.881 0.0424 0.987 0.943
suggest_best_k()
suggests the best \(k\) based on these statistics. The rules are as follows:
- All \(k\) with Jaccard index larger than 0.95 are removed because increasing
\(k\) does not provide enough extra information. If all \(k\) are removed, it is
marked as no subgroup is detected.
- For all \(k\) with 1-PAC score larger than 0.9, the maximal \(k\) is taken as
the best \(k\), and other \(k\) are marked as optional \(k\).
- If it does not fit the second rule. The \(k\) with the maximal vote of the
highest 1-PAC score, highest mean silhouette, and highest concordance is
taken as the best \(k\).
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
#> ERR862939 1 0.000 1.000 1.000 0.000
#> ERR862957 1 0.000 1.000 1.000 0.000
#> ERR878007 1 0.000 1.000 1.000 0.000
#> ERR862940 1 0.000 1.000 1.000 0.000
#> ERR862958 1 0.000 1.000 1.000 0.000
#> ERR878008 1 0.000 1.000 1.000 0.000
#> ERR862941 2 0.000 0.995 0.000 1.000
#> ERR862959 2 0.000 0.995 0.000 1.000
#> ERR878009 2 0.000 0.995 0.000 1.000
#> ERR862942 2 0.000 0.995 0.000 1.000
#> ERR862960 2 0.000 0.995 0.000 1.000
#> ERR878010 2 0.000 0.995 0.000 1.000
#> ERR862943 1 0.000 1.000 1.000 0.000
#> ERR862961 1 0.000 1.000 1.000 0.000
#> ERR878011 1 0.000 1.000 1.000 0.000
#> ERR862944 1 0.000 1.000 1.000 0.000
#> ERR862962 1 0.000 1.000 1.000 0.000
#> ERR878012 1 0.000 1.000 1.000 0.000
#> ERR862945 1 0.000 1.000 1.000 0.000
#> ERR862963 1 0.000 1.000 1.000 0.000
#> ERR878013 1 0.000 1.000 1.000 0.000
#> ERR862946 1 0.000 1.000 1.000 0.000
#> ERR862964 1 0.000 1.000 1.000 0.000
#> ERR878014 1 0.000 1.000 1.000 0.000
#> ERR862947 2 0.000 0.995 0.000 1.000
#> ERR862965 2 0.000 0.995 0.000 1.000
#> ERR878015 2 0.000 0.995 0.000 1.000
#> ERR862948 2 0.000 0.995 0.000 1.000
#> ERR862966 2 0.000 0.995 0.000 1.000
#> ERR878016 2 0.000 0.995 0.000 1.000
#> ERR862949 2 0.000 0.995 0.000 1.000
#> ERR862967 2 0.000 0.995 0.000 1.000
#> ERR878017 2 0.000 0.995 0.000 1.000
#> ERR862950 2 0.000 0.995 0.000 1.000
#> ERR862968 2 0.000 0.995 0.000 1.000
#> ERR878018 2 0.000 0.995 0.000 1.000
#> ERR862951 2 0.584 0.840 0.140 0.860
#> ERR862969 2 0.000 0.995 0.000 1.000
#> ERR878019 2 0.000 0.995 0.000 1.000
#> ERR862952 2 0.000 0.995 0.000 1.000
#> ERR862970 2 0.563 0.851 0.132 0.868
#> ERR878020 2 0.000 0.995 0.000 1.000
#> ERR862953 2 0.000 0.995 0.000 1.000
#> ERR862971 2 0.000 0.995 0.000 1.000
#> ERR878021 2 0.000 0.995 0.000 1.000
#> ERR862954 2 0.000 0.995 0.000 1.000
#> ERR862972 2 0.000 0.995 0.000 1.000
#> ERR878022 2 0.000 0.995 0.000 1.000
#> ERR862955 2 0.000 0.995 0.000 1.000
#> ERR862973 2 0.000 0.995 0.000 1.000
#> ERR878023 2 0.000 0.995 0.000 1.000
#> ERR862956 2 0.000 0.995 0.000 1.000
#> ERR862974 2 0.000 0.995 0.000 1.000
#> ERR878024 2 0.000 0.995 0.000 1.000
#> ERR862975 1 0.000 1.000 1.000 0.000
#> ERR866150 1 0.000 1.000 1.000 0.000
#> ERR866168 1 0.000 1.000 1.000 0.000
#> ERR862976 1 0.000 1.000 1.000 0.000
#> ERR866151 1 0.000 1.000 1.000 0.000
#> ERR866169 1 0.000 1.000 1.000 0.000
#> ERR862977 2 0.000 0.995 0.000 1.000
#> ERR866152 2 0.000 0.995 0.000 1.000
#> ERR866170 2 0.000 0.995 0.000 1.000
#> ERR862978 2 0.000 0.995 0.000 1.000
#> ERR866153 2 0.000 0.995 0.000 1.000
#> ERR866171 2 0.000 0.995 0.000 1.000
#> ERR862979 2 0.000 0.995 0.000 1.000
#> ERR866154 2 0.000 0.995 0.000 1.000
#> ERR866172 2 0.000 0.995 0.000 1.000
#> ERR862980 2 0.000 0.995 0.000 1.000
#> ERR866155 2 0.000 0.995 0.000 1.000
#> ERR866173 2 0.000 0.995 0.000 1.000
#> ERR862981 1 0.000 1.000 1.000 0.000
#> ERR866156 1 0.000 1.000 1.000 0.000
#> ERR866174 1 0.000 1.000 1.000 0.000
#> ERR866157 1 0.000 1.000 1.000 0.000
#> ERR866175 1 0.000 1.000 1.000 0.000
#> ERR862983 1 0.000 1.000 1.000 0.000
#> ERR866158 1 0.000 1.000 1.000 0.000
#> ERR866176 1 0.000 1.000 1.000 0.000
#> ERR862984 1 0.000 1.000 1.000 0.000
#> ERR866159 1 0.000 1.000 1.000 0.000
#> ERR866177 1 0.000 1.000 1.000 0.000
#> ERR862985 1 0.000 1.000 1.000 0.000
#> ERR866160 1 0.000 1.000 1.000 0.000
#> ERR866178 1 0.000 1.000 1.000 0.000
#> ERR862986 1 0.000 1.000 1.000 0.000
#> ERR866161 1 0.000 1.000 1.000 0.000
#> ERR866179 1 0.000 1.000 1.000 0.000
#> ERR862987 2 0.000 0.995 0.000 1.000
#> ERR866162 2 0.000 0.995 0.000 1.000
#> ERR866180 2 0.000 0.995 0.000 1.000
#> ERR862988 2 0.000 0.995 0.000 1.000
#> ERR866163 2 0.000 0.995 0.000 1.000
#> ERR866181 2 0.000 0.995 0.000 1.000
#> ERR862989 1 0.000 1.000 1.000 0.000
#> ERR866164 1 0.000 1.000 1.000 0.000
#> ERR866182 1 0.000 1.000 1.000 0.000
#> ERR862990 1 0.000 1.000 1.000 0.000
#> ERR866165 1 0.000 1.000 1.000 0.000
#> ERR866183 1 0.000 1.000 1.000 0.000
#> ERR862991 2 0.000 0.995 0.000 1.000
#> ERR866166 2 0.000 0.995 0.000 1.000
#> ERR866184 2 0.000 0.995 0.000 1.000
#> ERR862992 2 0.000 0.995 0.000 1.000
#> ERR866167 2 0.000 0.995 0.000 1.000
#> ERR866185 2 0.000 0.995 0.000 1.000
show/hide code output
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> ERR862939 3 0.175 0.840 0.048 0.000 0.952
#> ERR862957 3 0.175 0.840 0.048 0.000 0.952
#> ERR878007 3 0.175 0.840 0.048 0.000 0.952
#> ERR862940 3 0.175 0.840 0.048 0.000 0.952
#> ERR862958 3 0.175 0.840 0.048 0.000 0.952
#> ERR878008 3 0.175 0.840 0.048 0.000 0.952
#> ERR862941 2 0.000 0.989 0.000 1.000 0.000
#> ERR862959 2 0.000 0.989 0.000 1.000 0.000
#> ERR878009 2 0.000 0.989 0.000 1.000 0.000
#> ERR862942 2 0.000 0.989 0.000 1.000 0.000
#> ERR862960 2 0.000 0.989 0.000 1.000 0.000
#> ERR878010 2 0.000 0.989 0.000 1.000 0.000
#> ERR862943 3 0.000 0.862 0.000 0.000 1.000
#> ERR862961 3 0.000 0.862 0.000 0.000 1.000
#> ERR878011 3 0.000 0.862 0.000 0.000 1.000
#> ERR862944 3 0.000 0.862 0.000 0.000 1.000
#> ERR862962 3 0.000 0.862 0.000 0.000 1.000
#> ERR878012 3 0.000 0.862 0.000 0.000 1.000
#> ERR862945 3 0.000 0.862 0.000 0.000 1.000
#> ERR862963 3 0.000 0.862 0.000 0.000 1.000
#> ERR878013 3 0.000 0.862 0.000 0.000 1.000
#> ERR862946 3 0.000 0.862 0.000 0.000 1.000
#> ERR862964 3 0.000 0.862 0.000 0.000 1.000
#> ERR878014 3 0.000 0.862 0.000 0.000 1.000
#> ERR862947 2 0.000 0.989 0.000 1.000 0.000
#> ERR862965 2 0.000 0.989 0.000 1.000 0.000
#> ERR878015 2 0.000 0.989 0.000 1.000 0.000
#> ERR862948 2 0.000 0.989 0.000 1.000 0.000
#> ERR862966 2 0.000 0.989 0.000 1.000 0.000
#> ERR878016 2 0.000 0.989 0.000 1.000 0.000
#> ERR862949 2 0.000 0.989 0.000 1.000 0.000
#> ERR862967 2 0.000 0.989 0.000 1.000 0.000
#> ERR878017 2 0.000 0.989 0.000 1.000 0.000
#> ERR862950 2 0.000 0.989 0.000 1.000 0.000
#> ERR862968 2 0.000 0.989 0.000 1.000 0.000
#> ERR878018 2 0.000 0.989 0.000 1.000 0.000
#> ERR862951 1 0.618 0.668 0.780 0.104 0.116
#> ERR862969 1 0.562 0.602 0.744 0.244 0.012
#> ERR878019 1 0.529 0.582 0.732 0.268 0.000
#> ERR862952 1 0.554 0.595 0.740 0.252 0.008
#> ERR862970 1 0.465 0.703 0.856 0.064 0.080
#> ERR878020 1 0.514 0.598 0.748 0.252 0.000
#> ERR862953 2 0.129 0.979 0.032 0.968 0.000
#> ERR862971 2 0.129 0.979 0.032 0.968 0.000
#> ERR878021 2 0.129 0.979 0.032 0.968 0.000
#> ERR862954 2 0.129 0.979 0.032 0.968 0.000
#> ERR862972 2 0.129 0.979 0.032 0.968 0.000
#> ERR878022 2 0.129 0.979 0.032 0.968 0.000
#> ERR862955 2 0.129 0.979 0.032 0.968 0.000
#> ERR862973 2 0.129 0.979 0.032 0.968 0.000
#> ERR878023 2 0.129 0.979 0.032 0.968 0.000
#> ERR862956 2 0.129 0.979 0.032 0.968 0.000
#> ERR862974 2 0.129 0.979 0.032 0.968 0.000
#> ERR878024 2 0.129 0.979 0.032 0.968 0.000
#> ERR862975 1 0.618 0.350 0.584 0.000 0.416
#> ERR866150 1 0.618 0.350 0.584 0.000 0.416
#> ERR866168 1 0.618 0.350 0.584 0.000 0.416
#> ERR862976 1 0.618 0.350 0.584 0.000 0.416
#> ERR866151 1 0.618 0.350 0.584 0.000 0.416
#> ERR866169 1 0.618 0.350 0.584 0.000 0.416
#> ERR862977 2 0.129 0.979 0.032 0.968 0.000
#> ERR866152 2 0.129 0.979 0.032 0.968 0.000
#> ERR866170 2 0.129 0.979 0.032 0.968 0.000
#> ERR862978 2 0.129 0.979 0.032 0.968 0.000
#> ERR866153 2 0.129 0.979 0.032 0.968 0.000
#> ERR866171 2 0.129 0.979 0.032 0.968 0.000
#> ERR862979 2 0.000 0.989 0.000 1.000 0.000
#> ERR866154 2 0.000 0.989 0.000 1.000 0.000
#> ERR866172 2 0.000 0.989 0.000 1.000 0.000
#> ERR862980 2 0.000 0.989 0.000 1.000 0.000
#> ERR866155 2 0.000 0.989 0.000 1.000 0.000
#> ERR866173 2 0.000 0.989 0.000 1.000 0.000
#> ERR862981 1 0.236 0.756 0.928 0.000 0.072
#> ERR866156 1 0.236 0.756 0.928 0.000 0.072
#> ERR866174 1 0.236 0.756 0.928 0.000 0.072
#> ERR866157 1 0.236 0.756 0.928 0.000 0.072
#> ERR866175 1 0.236 0.756 0.928 0.000 0.072
#> ERR862983 3 0.590 0.386 0.352 0.000 0.648
#> ERR866158 3 0.590 0.386 0.352 0.000 0.648
#> ERR866176 3 0.590 0.386 0.352 0.000 0.648
#> ERR862984 3 0.590 0.386 0.352 0.000 0.648
#> ERR866159 3 0.590 0.386 0.352 0.000 0.648
#> ERR866177 3 0.590 0.386 0.352 0.000 0.648
#> ERR862985 1 0.236 0.756 0.928 0.000 0.072
#> ERR866160 1 0.236 0.756 0.928 0.000 0.072
#> ERR866178 1 0.236 0.756 0.928 0.000 0.072
#> ERR862986 1 0.236 0.756 0.928 0.000 0.072
#> ERR866161 1 0.236 0.756 0.928 0.000 0.072
#> ERR866179 1 0.236 0.756 0.928 0.000 0.072
#> ERR862987 2 0.000 0.989 0.000 1.000 0.000
#> ERR866162 2 0.000 0.989 0.000 1.000 0.000
#> ERR866180 2 0.000 0.989 0.000 1.000 0.000
#> ERR862988 2 0.000 0.989 0.000 1.000 0.000
#> ERR866163 2 0.000 0.989 0.000 1.000 0.000
#> ERR866181 2 0.000 0.989 0.000 1.000 0.000
#> ERR862989 3 0.271 0.830 0.088 0.000 0.912
#> ERR866164 3 0.296 0.824 0.100 0.000 0.900
#> ERR866182 3 0.296 0.824 0.100 0.000 0.900
#> ERR862990 3 0.296 0.824 0.100 0.000 0.900
#> ERR866165 3 0.296 0.824 0.100 0.000 0.900
#> ERR866183 3 0.304 0.821 0.104 0.000 0.896
#> ERR862991 2 0.000 0.989 0.000 1.000 0.000
#> ERR866166 2 0.000 0.989 0.000 1.000 0.000
#> ERR866184 2 0.000 0.989 0.000 1.000 0.000
#> ERR862992 2 0.000 0.989 0.000 1.000 0.000
#> ERR866167 2 0.000 0.989 0.000 1.000 0.000
#> ERR866185 2 0.000 0.989 0.000 1.000 0.000
show/hide code output
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> ERR862939 3 0.1557 0.822 0.000 0.000 0.944 0.056
#> ERR862957 3 0.1557 0.822 0.000 0.000 0.944 0.056
#> ERR878007 3 0.1557 0.822 0.000 0.000 0.944 0.056
#> ERR862940 3 0.1557 0.822 0.000 0.000 0.944 0.056
#> ERR862958 3 0.1557 0.822 0.000 0.000 0.944 0.056
#> ERR878008 3 0.1557 0.822 0.000 0.000 0.944 0.056
#> ERR862941 2 0.0000 0.878 0.000 1.000 0.000 0.000
#> ERR862959 2 0.0000 0.878 0.000 1.000 0.000 0.000
#> ERR878009 2 0.0000 0.878 0.000 1.000 0.000 0.000
#> ERR862942 2 0.0000 0.878 0.000 1.000 0.000 0.000
#> ERR862960 2 0.0000 0.878 0.000 1.000 0.000 0.000
#> ERR878010 2 0.0000 0.878 0.000 1.000 0.000 0.000
#> ERR862943 3 0.0000 0.847 0.000 0.000 1.000 0.000
#> ERR862961 3 0.0000 0.847 0.000 0.000 1.000 0.000
#> ERR878011 3 0.0000 0.847 0.000 0.000 1.000 0.000
#> ERR862944 3 0.0000 0.847 0.000 0.000 1.000 0.000
#> ERR862962 3 0.0000 0.847 0.000 0.000 1.000 0.000
#> ERR878012 3 0.0000 0.847 0.000 0.000 1.000 0.000
#> ERR862945 3 0.0000 0.847 0.000 0.000 1.000 0.000
#> ERR862963 3 0.0000 0.847 0.000 0.000 1.000 0.000
#> ERR878013 3 0.0000 0.847 0.000 0.000 1.000 0.000
#> ERR862946 3 0.0000 0.847 0.000 0.000 1.000 0.000
#> ERR862964 3 0.0000 0.847 0.000 0.000 1.000 0.000
#> ERR878014 3 0.0000 0.847 0.000 0.000 1.000 0.000
#> ERR862947 2 0.0000 0.878 0.000 1.000 0.000 0.000
#> ERR862965 2 0.0000 0.878 0.000 1.000 0.000 0.000
#> ERR878015 2 0.0000 0.878 0.000 1.000 0.000 0.000
#> ERR862948 2 0.0000 0.878 0.000 1.000 0.000 0.000
#> ERR862966 2 0.0000 0.878 0.000 1.000 0.000 0.000
#> ERR878016 2 0.0000 0.878 0.000 1.000 0.000 0.000
#> ERR862949 2 0.0000 0.878 0.000 1.000 0.000 0.000
#> ERR862967 2 0.0000 0.878 0.000 1.000 0.000 0.000
#> ERR878017 2 0.0000 0.878 0.000 1.000 0.000 0.000
#> ERR862950 2 0.0000 0.878 0.000 1.000 0.000 0.000
#> ERR862968 2 0.0000 0.878 0.000 1.000 0.000 0.000
#> ERR878018 2 0.0000 0.878 0.000 1.000 0.000 0.000
#> ERR862951 1 0.2197 0.644 0.916 0.000 0.004 0.080
#> ERR862969 1 0.1940 0.640 0.924 0.000 0.000 0.076
#> ERR878019 1 0.1792 0.636 0.932 0.000 0.000 0.068
#> ERR862952 1 0.1389 0.608 0.952 0.000 0.000 0.048
#> ERR862970 1 0.1940 0.637 0.924 0.000 0.000 0.076
#> ERR878020 1 0.1867 0.637 0.928 0.000 0.000 0.072
#> ERR862953 2 0.5016 0.667 0.396 0.600 0.000 0.004
#> ERR862971 2 0.5004 0.671 0.392 0.604 0.000 0.004
#> ERR878021 2 0.5004 0.671 0.392 0.604 0.000 0.004
#> ERR862954 2 0.5004 0.671 0.392 0.604 0.000 0.004
#> ERR862972 2 0.5016 0.667 0.396 0.600 0.000 0.004
#> ERR878022 2 0.5016 0.667 0.396 0.600 0.000 0.004
#> ERR862955 2 0.4761 0.726 0.332 0.664 0.000 0.004
#> ERR862973 2 0.4761 0.726 0.332 0.664 0.000 0.004
#> ERR878023 2 0.4761 0.726 0.332 0.664 0.000 0.004
#> ERR862956 2 0.4761 0.726 0.332 0.664 0.000 0.004
#> ERR862974 2 0.4761 0.726 0.332 0.664 0.000 0.004
#> ERR878024 2 0.4761 0.726 0.332 0.664 0.000 0.004
#> ERR862975 1 0.6805 0.732 0.604 0.000 0.220 0.176
#> ERR866150 1 0.6805 0.732 0.604 0.000 0.220 0.176
#> ERR866168 1 0.6805 0.732 0.604 0.000 0.220 0.176
#> ERR862976 1 0.6805 0.732 0.604 0.000 0.220 0.176
#> ERR866151 1 0.6805 0.732 0.604 0.000 0.220 0.176
#> ERR866169 1 0.6805 0.732 0.604 0.000 0.220 0.176
#> ERR862977 2 0.4761 0.726 0.332 0.664 0.000 0.004
#> ERR866152 2 0.4761 0.726 0.332 0.664 0.000 0.004
#> ERR866170 2 0.4761 0.726 0.332 0.664 0.000 0.004
#> ERR862978 2 0.4761 0.726 0.332 0.664 0.000 0.004
#> ERR866153 2 0.4761 0.726 0.332 0.664 0.000 0.004
#> ERR866171 2 0.4761 0.726 0.332 0.664 0.000 0.004
#> ERR862979 2 0.0000 0.878 0.000 1.000 0.000 0.000
#> ERR866154 2 0.0000 0.878 0.000 1.000 0.000 0.000
#> ERR866172 2 0.0000 0.878 0.000 1.000 0.000 0.000
#> ERR862980 2 0.0000 0.878 0.000 1.000 0.000 0.000
#> ERR866155 2 0.0000 0.878 0.000 1.000 0.000 0.000
#> ERR866173 2 0.0000 0.878 0.000 1.000 0.000 0.000
#> ERR862981 4 0.0188 1.000 0.000 0.000 0.004 0.996
#> ERR866156 4 0.0188 1.000 0.000 0.000 0.004 0.996
#> ERR866174 4 0.0188 1.000 0.000 0.000 0.004 0.996
#> ERR866157 4 0.0188 1.000 0.000 0.000 0.004 0.996
#> ERR866175 4 0.0188 1.000 0.000 0.000 0.004 0.996
#> ERR862983 3 0.6595 0.391 0.212 0.000 0.628 0.160
#> ERR866158 3 0.6595 0.391 0.212 0.000 0.628 0.160
#> ERR866176 3 0.6595 0.391 0.212 0.000 0.628 0.160
#> ERR862984 3 0.6595 0.391 0.212 0.000 0.628 0.160
#> ERR866159 3 0.6595 0.391 0.212 0.000 0.628 0.160
#> ERR866177 3 0.6595 0.391 0.212 0.000 0.628 0.160
#> ERR862985 4 0.0188 1.000 0.000 0.000 0.004 0.996
#> ERR866160 4 0.0188 1.000 0.000 0.000 0.004 0.996
#> ERR866178 4 0.0188 1.000 0.000 0.000 0.004 0.996
#> ERR862986 4 0.0188 1.000 0.000 0.000 0.004 0.996
#> ERR866161 4 0.0188 1.000 0.000 0.000 0.004 0.996
#> ERR866179 4 0.0188 1.000 0.000 0.000 0.004 0.996
#> ERR862987 2 0.0000 0.878 0.000 1.000 0.000 0.000
#> ERR866162 2 0.0000 0.878 0.000 1.000 0.000 0.000
#> ERR866180 2 0.0000 0.878 0.000 1.000 0.000 0.000
#> ERR862988 2 0.0000 0.878 0.000 1.000 0.000 0.000
#> ERR866163 2 0.0000 0.878 0.000 1.000 0.000 0.000
#> ERR866181 2 0.0000 0.878 0.000 1.000 0.000 0.000
#> ERR862989 1 0.5476 0.590 0.584 0.000 0.396 0.020
#> ERR866164 1 0.5970 0.672 0.600 0.000 0.348 0.052
#> ERR866182 1 0.5970 0.672 0.600 0.000 0.348 0.052
#> ERR862990 1 0.5970 0.672 0.600 0.000 0.348 0.052
#> ERR866165 1 0.5970 0.672 0.600 0.000 0.348 0.052
#> ERR866183 1 0.5954 0.675 0.604 0.000 0.344 0.052
#> ERR862991 2 0.0000 0.878 0.000 1.000 0.000 0.000
#> ERR866166 2 0.0000 0.878 0.000 1.000 0.000 0.000
#> ERR866184 2 0.0000 0.878 0.000 1.000 0.000 0.000
#> ERR862992 2 0.0000 0.878 0.000 1.000 0.000 0.000
#> ERR866167 2 0.0000 0.878 0.000 1.000 0.000 0.000
#> ERR866185 2 0.0000 0.878 0.000 1.000 0.000 0.000
show/hide code output
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> ERR862939 3 0.3455 0.795 0.064 0.000 0.856 0.020 0.060
#> ERR862957 3 0.3455 0.795 0.064 0.000 0.856 0.020 0.060
#> ERR878007 3 0.3455 0.795 0.064 0.000 0.856 0.020 0.060
#> ERR862940 3 0.3455 0.795 0.064 0.000 0.856 0.020 0.060
#> ERR862958 3 0.3455 0.795 0.064 0.000 0.856 0.020 0.060
#> ERR878008 3 0.3455 0.795 0.064 0.000 0.856 0.020 0.060
#> ERR862941 2 0.0000 0.996 0.000 1.000 0.000 0.000 0.000
#> ERR862959 2 0.0000 0.996 0.000 1.000 0.000 0.000 0.000
#> ERR878009 2 0.0000 0.996 0.000 1.000 0.000 0.000 0.000
#> ERR862942 2 0.0000 0.996 0.000 1.000 0.000 0.000 0.000
#> ERR862960 2 0.0000 0.996 0.000 1.000 0.000 0.000 0.000
#> ERR878010 2 0.0162 0.994 0.004 0.996 0.000 0.000 0.000
#> ERR862943 3 0.0000 0.847 0.000 0.000 1.000 0.000 0.000
#> ERR862961 3 0.0000 0.847 0.000 0.000 1.000 0.000 0.000
#> ERR878011 3 0.0000 0.847 0.000 0.000 1.000 0.000 0.000
#> ERR862944 3 0.0000 0.847 0.000 0.000 1.000 0.000 0.000
#> ERR862962 3 0.0000 0.847 0.000 0.000 1.000 0.000 0.000
#> ERR878012 3 0.0000 0.847 0.000 0.000 1.000 0.000 0.000
#> ERR862945 3 0.0324 0.846 0.004 0.000 0.992 0.004 0.000
#> ERR862963 3 0.0324 0.846 0.004 0.000 0.992 0.004 0.000
#> ERR878013 3 0.0324 0.846 0.004 0.000 0.992 0.004 0.000
#> ERR862946 3 0.0324 0.846 0.004 0.000 0.992 0.004 0.000
#> ERR862964 3 0.0324 0.846 0.004 0.000 0.992 0.004 0.000
#> ERR878014 3 0.0324 0.846 0.004 0.000 0.992 0.004 0.000
#> ERR862947 2 0.0000 0.996 0.000 1.000 0.000 0.000 0.000
#> ERR862965 2 0.0000 0.996 0.000 1.000 0.000 0.000 0.000
#> ERR878015 2 0.0000 0.996 0.000 1.000 0.000 0.000 0.000
#> ERR862948 2 0.0000 0.996 0.000 1.000 0.000 0.000 0.000
#> ERR862966 2 0.0000 0.996 0.000 1.000 0.000 0.000 0.000
#> ERR878016 2 0.0000 0.996 0.000 1.000 0.000 0.000 0.000
#> ERR862949 2 0.0000 0.996 0.000 1.000 0.000 0.000 0.000
#> ERR862967 2 0.0000 0.996 0.000 1.000 0.000 0.000 0.000
#> ERR878017 2 0.0162 0.994 0.004 0.996 0.000 0.000 0.000
#> ERR862950 2 0.0000 0.996 0.000 1.000 0.000 0.000 0.000
#> ERR862968 2 0.0000 0.996 0.000 1.000 0.000 0.000 0.000
#> ERR878018 2 0.0000 0.996 0.000 1.000 0.000 0.000 0.000
#> ERR862951 1 0.3143 0.774 0.796 0.000 0.000 0.204 0.000
#> ERR862969 1 0.3242 0.767 0.784 0.000 0.000 0.216 0.000
#> ERR878019 1 0.3210 0.771 0.788 0.000 0.000 0.212 0.000
#> ERR862952 1 0.4169 0.719 0.724 0.004 0.000 0.256 0.016
#> ERR862970 1 0.3659 0.755 0.768 0.000 0.000 0.220 0.012
#> ERR878020 1 0.3336 0.761 0.772 0.000 0.000 0.228 0.000
#> ERR862953 4 0.1197 0.810 0.000 0.048 0.000 0.952 0.000
#> ERR862971 4 0.1270 0.816 0.000 0.052 0.000 0.948 0.000
#> ERR878021 4 0.1270 0.816 0.000 0.052 0.000 0.948 0.000
#> ERR862954 4 0.1270 0.816 0.000 0.052 0.000 0.948 0.000
#> ERR862972 4 0.1270 0.816 0.000 0.052 0.000 0.948 0.000
#> ERR878022 4 0.1270 0.816 0.000 0.052 0.000 0.948 0.000
#> ERR862955 4 0.3274 0.915 0.000 0.220 0.000 0.780 0.000
#> ERR862973 4 0.3274 0.915 0.000 0.220 0.000 0.780 0.000
#> ERR878023 4 0.3274 0.915 0.000 0.220 0.000 0.780 0.000
#> ERR862956 4 0.3274 0.915 0.000 0.220 0.000 0.780 0.000
#> ERR862974 4 0.3274 0.915 0.000 0.220 0.000 0.780 0.000
#> ERR878024 4 0.3274 0.915 0.000 0.220 0.000 0.780 0.000
#> ERR862975 1 0.3634 0.832 0.820 0.000 0.136 0.004 0.040
#> ERR866150 1 0.3634 0.832 0.820 0.000 0.136 0.004 0.040
#> ERR866168 1 0.3634 0.832 0.820 0.000 0.136 0.004 0.040
#> ERR862976 1 0.3634 0.832 0.820 0.000 0.136 0.004 0.040
#> ERR866151 1 0.3634 0.832 0.820 0.000 0.136 0.004 0.040
#> ERR866169 1 0.3634 0.832 0.820 0.000 0.136 0.004 0.040
#> ERR862977 4 0.3274 0.915 0.000 0.220 0.000 0.780 0.000
#> ERR866152 4 0.3274 0.915 0.000 0.220 0.000 0.780 0.000
#> ERR866170 4 0.3274 0.915 0.000 0.220 0.000 0.780 0.000
#> ERR862978 4 0.3274 0.915 0.000 0.220 0.000 0.780 0.000
#> ERR866153 4 0.3274 0.915 0.000 0.220 0.000 0.780 0.000
#> ERR866171 4 0.3274 0.915 0.000 0.220 0.000 0.780 0.000
#> ERR862979 2 0.0324 0.993 0.004 0.992 0.000 0.004 0.000
#> ERR866154 2 0.0451 0.991 0.004 0.988 0.000 0.008 0.000
#> ERR866172 2 0.0324 0.993 0.004 0.992 0.000 0.004 0.000
#> ERR862980 2 0.0451 0.991 0.004 0.988 0.000 0.008 0.000
#> ERR866155 2 0.0451 0.991 0.004 0.988 0.000 0.008 0.000
#> ERR866173 2 0.0451 0.991 0.004 0.988 0.000 0.008 0.000
#> ERR862981 5 0.0000 1.000 0.000 0.000 0.000 0.000 1.000
#> ERR866156 5 0.0000 1.000 0.000 0.000 0.000 0.000 1.000
#> ERR866174 5 0.0000 1.000 0.000 0.000 0.000 0.000 1.000
#> ERR866157 5 0.0000 1.000 0.000 0.000 0.000 0.000 1.000
#> ERR866175 5 0.0000 1.000 0.000 0.000 0.000 0.000 1.000
#> ERR862983 3 0.4989 0.507 0.296 0.000 0.648 0.000 0.056
#> ERR866158 3 0.4989 0.507 0.296 0.000 0.648 0.000 0.056
#> ERR866176 3 0.4989 0.507 0.296 0.000 0.648 0.000 0.056
#> ERR862984 3 0.4989 0.507 0.296 0.000 0.648 0.000 0.056
#> ERR866159 3 0.4989 0.507 0.296 0.000 0.648 0.000 0.056
#> ERR866177 3 0.4989 0.507 0.296 0.000 0.648 0.000 0.056
#> ERR862985 5 0.0000 1.000 0.000 0.000 0.000 0.000 1.000
#> ERR866160 5 0.0000 1.000 0.000 0.000 0.000 0.000 1.000
#> ERR866178 5 0.0000 1.000 0.000 0.000 0.000 0.000 1.000
#> ERR862986 5 0.0000 1.000 0.000 0.000 0.000 0.000 1.000
#> ERR866161 5 0.0000 1.000 0.000 0.000 0.000 0.000 1.000
#> ERR866179 5 0.0000 1.000 0.000 0.000 0.000 0.000 1.000
#> ERR862987 2 0.0000 0.996 0.000 1.000 0.000 0.000 0.000
#> ERR866162 2 0.0000 0.996 0.000 1.000 0.000 0.000 0.000
#> ERR866180 2 0.0000 0.996 0.000 1.000 0.000 0.000 0.000
#> ERR862988 2 0.0000 0.996 0.000 1.000 0.000 0.000 0.000
#> ERR866163 2 0.0000 0.996 0.000 1.000 0.000 0.000 0.000
#> ERR866181 2 0.0000 0.996 0.000 1.000 0.000 0.000 0.000
#> ERR862989 1 0.3194 0.811 0.832 0.000 0.148 0.020 0.000
#> ERR866164 1 0.2921 0.830 0.856 0.000 0.124 0.020 0.000
#> ERR866182 1 0.2921 0.830 0.856 0.000 0.124 0.020 0.000
#> ERR862990 1 0.2921 0.830 0.856 0.000 0.124 0.020 0.000
#> ERR866165 1 0.2921 0.830 0.856 0.000 0.124 0.020 0.000
#> ERR866183 1 0.2921 0.830 0.856 0.000 0.124 0.020 0.000
#> ERR862991 2 0.0451 0.991 0.004 0.988 0.000 0.008 0.000
#> ERR866166 2 0.0451 0.991 0.004 0.988 0.000 0.008 0.000
#> ERR866184 2 0.0451 0.991 0.004 0.988 0.000 0.008 0.000
#> ERR862992 2 0.0451 0.991 0.004 0.988 0.000 0.008 0.000
#> ERR866167 2 0.0451 0.991 0.004 0.988 0.000 0.008 0.000
#> ERR866185 2 0.0451 0.991 0.004 0.988 0.000 0.008 0.000
show/hide code output
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> ERR862939 3 0.4247 0.675 0.056 0.000 0.780 0.012 0.128 0.024
#> ERR862957 3 0.4247 0.675 0.056 0.000 0.780 0.012 0.128 0.024
#> ERR878007 3 0.4247 0.675 0.056 0.000 0.780 0.012 0.128 0.024
#> ERR862940 3 0.4247 0.675 0.056 0.000 0.780 0.012 0.128 0.024
#> ERR862958 3 0.4247 0.675 0.056 0.000 0.780 0.012 0.128 0.024
#> ERR878008 3 0.4247 0.675 0.056 0.000 0.780 0.012 0.128 0.024
#> ERR862941 2 0.1349 0.955 0.004 0.940 0.000 0.000 0.056 0.000
#> ERR862959 2 0.1204 0.954 0.000 0.944 0.000 0.000 0.056 0.000
#> ERR878009 2 0.1149 0.957 0.008 0.960 0.000 0.008 0.024 0.000
#> ERR862942 2 0.1267 0.953 0.000 0.940 0.000 0.000 0.060 0.000
#> ERR862960 2 0.1285 0.956 0.004 0.944 0.000 0.000 0.052 0.000
#> ERR878010 2 0.1149 0.957 0.008 0.960 0.000 0.008 0.024 0.000
#> ERR862943 3 0.1615 0.775 0.064 0.000 0.928 0.000 0.004 0.004
#> ERR862961 3 0.1615 0.775 0.064 0.000 0.928 0.000 0.004 0.004
#> ERR878011 3 0.1615 0.775 0.064 0.000 0.928 0.000 0.004 0.004
#> ERR862944 3 0.1615 0.775 0.064 0.000 0.928 0.000 0.004 0.004
#> ERR862962 3 0.1615 0.775 0.064 0.000 0.928 0.000 0.004 0.004
#> ERR878012 3 0.1615 0.775 0.064 0.000 0.928 0.000 0.004 0.004
#> ERR862945 3 0.2340 0.771 0.056 0.000 0.896 0.004 0.044 0.000
#> ERR862963 3 0.2340 0.771 0.056 0.000 0.896 0.004 0.044 0.000
#> ERR878013 3 0.2340 0.771 0.056 0.000 0.896 0.004 0.044 0.000
#> ERR862946 3 0.2340 0.771 0.056 0.000 0.896 0.004 0.044 0.000
#> ERR862964 3 0.2340 0.771 0.056 0.000 0.896 0.004 0.044 0.000
#> ERR878014 3 0.2340 0.771 0.056 0.000 0.896 0.004 0.044 0.000
#> ERR862947 2 0.1152 0.954 0.004 0.952 0.000 0.000 0.044 0.000
#> ERR862965 2 0.1152 0.954 0.004 0.952 0.000 0.000 0.044 0.000
#> ERR878015 2 0.1152 0.954 0.004 0.952 0.000 0.000 0.044 0.000
#> ERR862948 2 0.1152 0.954 0.004 0.952 0.000 0.000 0.044 0.000
#> ERR862966 2 0.1152 0.954 0.004 0.952 0.000 0.000 0.044 0.000
#> ERR878016 2 0.1152 0.954 0.004 0.952 0.000 0.000 0.044 0.000
#> ERR862949 2 0.1897 0.941 0.004 0.908 0.000 0.000 0.084 0.004
#> ERR862967 2 0.1949 0.940 0.004 0.904 0.000 0.000 0.088 0.004
#> ERR878017 2 0.1340 0.958 0.008 0.948 0.000 0.000 0.040 0.004
#> ERR862950 2 0.1897 0.941 0.004 0.908 0.000 0.000 0.084 0.004
#> ERR862968 2 0.1897 0.941 0.004 0.908 0.000 0.000 0.084 0.004
#> ERR878018 2 0.1901 0.947 0.008 0.912 0.000 0.000 0.076 0.004
#> ERR862951 5 0.4538 0.903 0.340 0.000 0.000 0.048 0.612 0.000
#> ERR862969 5 0.4594 0.902 0.340 0.000 0.000 0.052 0.608 0.000
#> ERR878019 5 0.4573 0.902 0.328 0.004 0.000 0.044 0.624 0.000
#> ERR862952 5 0.5028 0.842 0.280 0.004 0.000 0.084 0.628 0.004
#> ERR862970 5 0.4884 0.882 0.324 0.000 0.000 0.060 0.608 0.008
#> ERR878020 5 0.4548 0.912 0.312 0.000 0.000 0.056 0.632 0.000
#> ERR862953 4 0.2214 0.870 0.000 0.016 0.000 0.888 0.096 0.000
#> ERR862971 4 0.2006 0.883 0.000 0.016 0.000 0.904 0.080 0.000
#> ERR878021 4 0.2006 0.882 0.000 0.016 0.000 0.904 0.080 0.000
#> ERR862954 4 0.2006 0.883 0.000 0.016 0.000 0.904 0.080 0.000
#> ERR862972 4 0.1838 0.888 0.000 0.016 0.000 0.916 0.068 0.000
#> ERR878022 4 0.2060 0.879 0.000 0.016 0.000 0.900 0.084 0.000
#> ERR862955 4 0.1327 0.944 0.000 0.064 0.000 0.936 0.000 0.000
#> ERR862973 4 0.1387 0.945 0.000 0.068 0.000 0.932 0.000 0.000
#> ERR878023 4 0.1387 0.945 0.000 0.068 0.000 0.932 0.000 0.000
#> ERR862956 4 0.1387 0.945 0.000 0.068 0.000 0.932 0.000 0.000
#> ERR862974 4 0.1387 0.945 0.000 0.068 0.000 0.932 0.000 0.000
#> ERR878024 4 0.1387 0.945 0.000 0.068 0.000 0.932 0.000 0.000
#> ERR862975 1 0.2933 0.812 0.860 0.000 0.056 0.000 0.076 0.008
#> ERR866150 1 0.2933 0.812 0.860 0.000 0.056 0.000 0.076 0.008
#> ERR866168 1 0.2933 0.812 0.860 0.000 0.056 0.000 0.076 0.008
#> ERR862976 1 0.2933 0.812 0.860 0.000 0.056 0.000 0.076 0.008
#> ERR866151 1 0.2933 0.812 0.860 0.000 0.056 0.000 0.076 0.008
#> ERR866169 1 0.2933 0.812 0.860 0.000 0.056 0.000 0.076 0.008
#> ERR862977 4 0.1643 0.944 0.000 0.068 0.000 0.924 0.008 0.000
#> ERR866152 4 0.1643 0.944 0.000 0.068 0.000 0.924 0.008 0.000
#> ERR866170 4 0.1643 0.944 0.000 0.068 0.000 0.924 0.008 0.000
#> ERR862978 4 0.1643 0.944 0.000 0.068 0.000 0.924 0.008 0.000
#> ERR866153 4 0.1643 0.944 0.000 0.068 0.000 0.924 0.008 0.000
#> ERR866171 4 0.1643 0.944 0.000 0.068 0.000 0.924 0.008 0.000
#> ERR862979 2 0.2056 0.952 0.012 0.904 0.000 0.000 0.080 0.004
#> ERR866154 2 0.1722 0.951 0.016 0.936 0.000 0.008 0.036 0.004
#> ERR866172 2 0.1823 0.950 0.016 0.932 0.000 0.012 0.036 0.004
#> ERR862980 2 0.1894 0.949 0.016 0.928 0.000 0.012 0.040 0.004
#> ERR866155 2 0.1917 0.948 0.016 0.928 0.000 0.016 0.036 0.004
#> ERR866173 2 0.1917 0.948 0.016 0.928 0.000 0.016 0.036 0.004
#> ERR862981 6 0.0405 0.995 0.004 0.000 0.000 0.000 0.008 0.988
#> ERR866156 6 0.0405 0.995 0.004 0.000 0.000 0.000 0.008 0.988
#> ERR866174 6 0.0405 0.995 0.004 0.000 0.000 0.000 0.008 0.988
#> ERR866157 6 0.0405 0.995 0.004 0.000 0.000 0.000 0.008 0.988
#> ERR866175 6 0.0405 0.995 0.004 0.000 0.000 0.000 0.008 0.988
#> ERR862983 3 0.4788 0.352 0.424 0.000 0.532 0.000 0.008 0.036
#> ERR866158 3 0.4788 0.352 0.424 0.000 0.532 0.000 0.008 0.036
#> ERR866176 3 0.4788 0.352 0.424 0.000 0.532 0.000 0.008 0.036
#> ERR862984 3 0.4788 0.352 0.424 0.000 0.532 0.000 0.008 0.036
#> ERR866159 3 0.4788 0.352 0.424 0.000 0.532 0.000 0.008 0.036
#> ERR866177 3 0.4788 0.352 0.424 0.000 0.532 0.000 0.008 0.036
#> ERR862985 6 0.0291 0.995 0.004 0.000 0.000 0.000 0.004 0.992
#> ERR866160 6 0.0146 0.996 0.004 0.000 0.000 0.000 0.000 0.996
#> ERR866178 6 0.0146 0.996 0.004 0.000 0.000 0.000 0.000 0.996
#> ERR862986 6 0.0291 0.995 0.004 0.000 0.000 0.000 0.004 0.992
#> ERR866161 6 0.0291 0.995 0.004 0.000 0.000 0.000 0.004 0.992
#> ERR866179 6 0.0291 0.995 0.004 0.000 0.000 0.000 0.004 0.992
#> ERR862987 2 0.0405 0.959 0.000 0.988 0.000 0.008 0.004 0.000
#> ERR866162 2 0.0622 0.958 0.000 0.980 0.000 0.008 0.012 0.000
#> ERR866180 2 0.0622 0.958 0.000 0.980 0.000 0.008 0.012 0.000
#> ERR862988 2 0.0547 0.959 0.000 0.980 0.000 0.000 0.020 0.000
#> ERR866163 2 0.0520 0.958 0.000 0.984 0.000 0.008 0.008 0.000
#> ERR866181 2 0.0405 0.959 0.000 0.988 0.000 0.008 0.004 0.000
#> ERR862989 1 0.3020 0.777 0.844 0.000 0.076 0.000 0.080 0.000
#> ERR866164 1 0.2595 0.811 0.872 0.000 0.044 0.000 0.084 0.000
#> ERR866182 1 0.2595 0.811 0.872 0.000 0.044 0.000 0.084 0.000
#> ERR862990 1 0.2647 0.808 0.868 0.000 0.044 0.000 0.088 0.000
#> ERR866165 1 0.2595 0.811 0.872 0.000 0.044 0.000 0.084 0.000
#> ERR866183 1 0.2595 0.811 0.872 0.000 0.044 0.000 0.084 0.000
#> ERR862991 2 0.1350 0.952 0.008 0.952 0.000 0.020 0.020 0.000
#> ERR866166 2 0.1350 0.952 0.008 0.952 0.000 0.020 0.020 0.000
#> ERR866184 2 0.1350 0.952 0.008 0.952 0.000 0.020 0.020 0.000
#> ERR862992 2 0.1262 0.953 0.008 0.956 0.000 0.016 0.020 0.000
#> ERR866167 2 0.1350 0.952 0.008 0.952 0.000 0.020 0.020 0.000
#> ERR866185 2 0.1350 0.952 0.008 0.952 0.000 0.020 0.020 0.000
Heatmaps for the consensus matrix. It visualizes the probability of two
samples to be in a same group.
consensus_heatmap(res, k = 2)

consensus_heatmap(res, k = 3)

consensus_heatmap(res, k = 4)

consensus_heatmap(res, k = 5)

consensus_heatmap(res, k = 6)

Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)

membership_heatmap(res, k = 3)

membership_heatmap(res, k = 4)

membership_heatmap(res, k = 5)

membership_heatmap(res, k = 6)

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)

get_signatures(res, k = 3)

get_signatures(res, k = 4)

get_signatures(res, k = 5)

get_signatures(res, k = 6)

Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)

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

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

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

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

Compare the overlap of signatures from different k:
compare_signatures(res)

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.
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:
which_row
: row indices corresponding to the input matrix.
fdr
: FDR for the differential test.
mean_x
: The mean value in group x.
scaled_mean_x
: The mean value in group x after rows are scaled.
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")

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

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

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

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

Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)

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"]
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 15818 rows and 107 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 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)

The plots are:
- The first row: a plot of the ECDF (empirical cumulative distribution
function) curves of the consensus matrix for each
k
and the heatmap of
predicted classes for each k
.
- The second row: heatmaps of the consensus matrix for each
k
.
- The third row: heatmaps of the membership matrix for each
k
.
- The fouth row: heatmaps of the signatures for each
k
.
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:
- ECDF curves of the consensus matrix for each
k
;
- 1-PAC. The PAC
score
measures the proportion of the ambiguous subgrouping.
- Mean silhouette score.
- Concordance. The mean probability of fiting the consensus class ids in all
partitions.
- Area increased. Denote \(A_k\) as the area under the ECDF curve for current
k
, the area increased is defined as \(A_k - A_{k-1}\).
- Rand index. The percent of pairs of samples that are both in a same cluster
or both are not in a same cluster in the partition of k and k-1.
- Jaccard index. The ratio of pairs of samples are both in a same cluster in
the partition of k and k-1 and the pairs of samples are both in a same
cluster in the partition k or k-1.
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)

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.704 0.962 0.960 0.3224 0.649 0.649
#> 3 3 0.632 0.942 0.960 0.2325 0.981 0.971
#> 4 4 0.820 0.930 0.966 0.6721 0.702 0.526
#> 5 5 0.824 0.931 0.965 0.0519 0.968 0.904
#> 6 6 0.966 0.968 0.978 0.0291 0.987 0.958
suggest_best_k()
suggests the best \(k\) based on these statistics. The rules are as follows:
- All \(k\) with Jaccard index larger than 0.95 are removed because increasing
\(k\) does not provide enough extra information. If all \(k\) are removed, it is
marked as no subgroup is detected.
- For all \(k\) with 1-PAC score larger than 0.9, the maximal \(k\) is taken as
the best \(k\), and other \(k\) are marked as optional \(k\).
- If it does not fit the second rule. The \(k\) with the maximal vote of the
highest 1-PAC score, highest mean silhouette, and highest concordance is
taken as the best \(k\).
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
#> ERR862939 1 0.6247 0.950 0.844 0.156
#> ERR862957 1 0.6247 0.950 0.844 0.156
#> ERR878007 1 0.6247 0.950 0.844 0.156
#> ERR862940 1 0.6247 0.950 0.844 0.156
#> ERR862958 1 0.6247 0.950 0.844 0.156
#> ERR878008 1 0.6247 0.950 0.844 0.156
#> ERR862941 2 0.0000 0.979 0.000 1.000
#> ERR862959 2 0.0000 0.979 0.000 1.000
#> ERR878009 2 0.0000 0.979 0.000 1.000
#> ERR862942 2 0.0000 0.979 0.000 1.000
#> ERR862960 2 0.0000 0.979 0.000 1.000
#> ERR878010 2 0.0000 0.979 0.000 1.000
#> ERR862943 1 0.6247 0.950 0.844 0.156
#> ERR862961 1 0.6247 0.950 0.844 0.156
#> ERR878011 1 0.6247 0.950 0.844 0.156
#> ERR862944 1 0.6247 0.950 0.844 0.156
#> ERR862962 1 0.6247 0.950 0.844 0.156
#> ERR878012 1 0.6247 0.950 0.844 0.156
#> ERR862945 1 0.0000 0.867 1.000 0.000
#> ERR862963 1 0.0000 0.867 1.000 0.000
#> ERR878013 1 0.0000 0.867 1.000 0.000
#> ERR862946 1 0.0000 0.867 1.000 0.000
#> ERR862964 1 0.0000 0.867 1.000 0.000
#> ERR878014 1 0.0000 0.867 1.000 0.000
#> ERR862947 2 0.0000 0.979 0.000 1.000
#> ERR862965 2 0.0000 0.979 0.000 1.000
#> ERR878015 2 0.0000 0.979 0.000 1.000
#> ERR862948 2 0.0000 0.979 0.000 1.000
#> ERR862966 2 0.0000 0.979 0.000 1.000
#> ERR878016 2 0.0000 0.979 0.000 1.000
#> ERR862949 2 0.0000 0.979 0.000 1.000
#> ERR862967 2 0.0000 0.979 0.000 1.000
#> ERR878017 2 0.0000 0.979 0.000 1.000
#> ERR862950 2 0.0000 0.979 0.000 1.000
#> ERR862968 2 0.0000 0.979 0.000 1.000
#> ERR878018 2 0.0000 0.979 0.000 1.000
#> ERR862951 2 0.2603 0.962 0.044 0.956
#> ERR862969 2 0.2603 0.962 0.044 0.956
#> ERR878019 2 0.2603 0.962 0.044 0.956
#> ERR862952 2 0.2603 0.962 0.044 0.956
#> ERR862970 2 0.2603 0.962 0.044 0.956
#> ERR878020 2 0.2603 0.962 0.044 0.956
#> ERR862953 2 0.0672 0.977 0.008 0.992
#> ERR862971 2 0.0000 0.979 0.000 1.000
#> ERR878021 2 0.0000 0.979 0.000 1.000
#> ERR862954 2 0.0376 0.978 0.004 0.996
#> ERR862972 2 0.0000 0.979 0.000 1.000
#> ERR878022 2 0.0376 0.978 0.004 0.996
#> ERR862955 2 0.0000 0.979 0.000 1.000
#> ERR862973 2 0.0000 0.979 0.000 1.000
#> ERR878023 2 0.0000 0.979 0.000 1.000
#> ERR862956 2 0.0000 0.979 0.000 1.000
#> ERR862974 2 0.0000 0.979 0.000 1.000
#> ERR878024 2 0.0000 0.979 0.000 1.000
#> ERR862975 2 0.4022 0.929 0.080 0.920
#> ERR866150 2 0.4022 0.929 0.080 0.920
#> ERR866168 2 0.3879 0.933 0.076 0.924
#> ERR862976 2 0.4022 0.929 0.080 0.920
#> ERR866151 2 0.3879 0.933 0.076 0.924
#> ERR866169 2 0.3879 0.933 0.076 0.924
#> ERR862977 2 0.0000 0.979 0.000 1.000
#> ERR866152 2 0.0000 0.979 0.000 1.000
#> ERR866170 2 0.0000 0.979 0.000 1.000
#> ERR862978 2 0.0000 0.979 0.000 1.000
#> ERR866153 2 0.0000 0.979 0.000 1.000
#> ERR866171 2 0.0000 0.979 0.000 1.000
#> ERR862979 2 0.0000 0.979 0.000 1.000
#> ERR866154 2 0.0000 0.979 0.000 1.000
#> ERR866172 2 0.0000 0.979 0.000 1.000
#> ERR862980 2 0.0000 0.979 0.000 1.000
#> ERR866155 2 0.0000 0.979 0.000 1.000
#> ERR866173 2 0.0000 0.979 0.000 1.000
#> ERR862981 2 0.2603 0.962 0.044 0.956
#> ERR866156 2 0.2603 0.962 0.044 0.956
#> ERR866174 2 0.2603 0.962 0.044 0.956
#> ERR866157 2 0.2603 0.962 0.044 0.956
#> ERR866175 2 0.2603 0.962 0.044 0.956
#> ERR862983 1 0.6247 0.950 0.844 0.156
#> ERR866158 1 0.6247 0.950 0.844 0.156
#> ERR866176 1 0.6247 0.950 0.844 0.156
#> ERR862984 1 0.6247 0.950 0.844 0.156
#> ERR866159 1 0.6247 0.950 0.844 0.156
#> ERR866177 1 0.6247 0.950 0.844 0.156
#> ERR862985 2 0.2603 0.962 0.044 0.956
#> ERR866160 2 0.2603 0.962 0.044 0.956
#> ERR866178 2 0.2603 0.962 0.044 0.956
#> ERR862986 2 0.2603 0.962 0.044 0.956
#> ERR866161 2 0.2603 0.962 0.044 0.956
#> ERR866179 2 0.2603 0.962 0.044 0.956
#> ERR862987 2 0.0000 0.979 0.000 1.000
#> ERR866162 2 0.0000 0.979 0.000 1.000
#> ERR866180 2 0.0000 0.979 0.000 1.000
#> ERR862988 2 0.0000 0.979 0.000 1.000
#> ERR866163 2 0.0000 0.979 0.000 1.000
#> ERR866181 2 0.0000 0.979 0.000 1.000
#> ERR862989 2 0.2603 0.962 0.044 0.956
#> ERR866164 2 0.2603 0.962 0.044 0.956
#> ERR866182 2 0.2603 0.962 0.044 0.956
#> ERR862990 2 0.2603 0.962 0.044 0.956
#> ERR866165 2 0.2603 0.962 0.044 0.956
#> ERR866183 2 0.2603 0.962 0.044 0.956
#> ERR862991 2 0.0000 0.979 0.000 1.000
#> ERR866166 2 0.0000 0.979 0.000 1.000
#> ERR866184 2 0.0000 0.979 0.000 1.000
#> ERR862992 2 0.0000 0.979 0.000 1.000
#> ERR866167 2 0.0000 0.979 0.000 1.000
#> ERR866185 2 0.0000 0.979 0.000 1.000
show/hide code output
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> ERR862939 1 0.0000 1.000 1.000 0.000 0
#> ERR862957 1 0.0000 1.000 1.000 0.000 0
#> ERR878007 1 0.0000 1.000 1.000 0.000 0
#> ERR862940 1 0.0000 1.000 1.000 0.000 0
#> ERR862958 1 0.0000 1.000 1.000 0.000 0
#> ERR878008 1 0.0000 1.000 1.000 0.000 0
#> ERR862941 2 0.0000 0.943 0.000 1.000 0
#> ERR862959 2 0.0000 0.943 0.000 1.000 0
#> ERR878009 2 0.0000 0.943 0.000 1.000 0
#> ERR862942 2 0.0000 0.943 0.000 1.000 0
#> ERR862960 2 0.0000 0.943 0.000 1.000 0
#> ERR878010 2 0.0000 0.943 0.000 1.000 0
#> ERR862943 1 0.0000 1.000 1.000 0.000 0
#> ERR862961 1 0.0000 1.000 1.000 0.000 0
#> ERR878011 1 0.0000 1.000 1.000 0.000 0
#> ERR862944 1 0.0000 1.000 1.000 0.000 0
#> ERR862962 1 0.0000 1.000 1.000 0.000 0
#> ERR878012 1 0.0000 1.000 1.000 0.000 0
#> ERR862945 3 0.0000 1.000 0.000 0.000 1
#> ERR862963 3 0.0000 1.000 0.000 0.000 1
#> ERR878013 3 0.0000 1.000 0.000 0.000 1
#> ERR862946 3 0.0000 1.000 0.000 0.000 1
#> ERR862964 3 0.0000 1.000 0.000 0.000 1
#> ERR878014 3 0.0000 1.000 0.000 0.000 1
#> ERR862947 2 0.0000 0.943 0.000 1.000 0
#> ERR862965 2 0.0000 0.943 0.000 1.000 0
#> ERR878015 2 0.0000 0.943 0.000 1.000 0
#> ERR862948 2 0.0000 0.943 0.000 1.000 0
#> ERR862966 2 0.0000 0.943 0.000 1.000 0
#> ERR878016 2 0.0000 0.943 0.000 1.000 0
#> ERR862949 2 0.0000 0.943 0.000 1.000 0
#> ERR862967 2 0.0000 0.943 0.000 1.000 0
#> ERR878017 2 0.0000 0.943 0.000 1.000 0
#> ERR862950 2 0.0000 0.943 0.000 1.000 0
#> ERR862968 2 0.0000 0.943 0.000 1.000 0
#> ERR878018 2 0.0000 0.943 0.000 1.000 0
#> ERR862951 2 0.3752 0.891 0.144 0.856 0
#> ERR862969 2 0.3752 0.891 0.144 0.856 0
#> ERR878019 2 0.3752 0.891 0.144 0.856 0
#> ERR862952 2 0.3482 0.898 0.128 0.872 0
#> ERR862970 2 0.3752 0.891 0.144 0.856 0
#> ERR878020 2 0.3752 0.891 0.144 0.856 0
#> ERR862953 2 0.1411 0.932 0.036 0.964 0
#> ERR862971 2 0.0000 0.943 0.000 1.000 0
#> ERR878021 2 0.0000 0.943 0.000 1.000 0
#> ERR862954 2 0.1031 0.936 0.024 0.976 0
#> ERR862972 2 0.0000 0.943 0.000 1.000 0
#> ERR878022 2 0.0747 0.938 0.016 0.984 0
#> ERR862955 2 0.0000 0.943 0.000 1.000 0
#> ERR862973 2 0.0000 0.943 0.000 1.000 0
#> ERR878023 2 0.0000 0.943 0.000 1.000 0
#> ERR862956 2 0.0000 0.943 0.000 1.000 0
#> ERR862974 2 0.0000 0.943 0.000 1.000 0
#> ERR878024 2 0.0000 0.943 0.000 1.000 0
#> ERR862975 2 0.3752 0.891 0.144 0.856 0
#> ERR866150 2 0.3752 0.891 0.144 0.856 0
#> ERR866168 2 0.3752 0.891 0.144 0.856 0
#> ERR862976 2 0.3752 0.891 0.144 0.856 0
#> ERR866151 2 0.3752 0.891 0.144 0.856 0
#> ERR866169 2 0.3752 0.891 0.144 0.856 0
#> ERR862977 2 0.0000 0.943 0.000 1.000 0
#> ERR866152 2 0.0000 0.943 0.000 1.000 0
#> ERR866170 2 0.0000 0.943 0.000 1.000 0
#> ERR862978 2 0.0000 0.943 0.000 1.000 0
#> ERR866153 2 0.0000 0.943 0.000 1.000 0
#> ERR866171 2 0.0000 0.943 0.000 1.000 0
#> ERR862979 2 0.0000 0.943 0.000 1.000 0
#> ERR866154 2 0.0000 0.943 0.000 1.000 0
#> ERR866172 2 0.0000 0.943 0.000 1.000 0
#> ERR862980 2 0.0000 0.943 0.000 1.000 0
#> ERR866155 2 0.0000 0.943 0.000 1.000 0
#> ERR866173 2 0.0000 0.943 0.000 1.000 0
#> ERR862981 2 0.3752 0.891 0.144 0.856 0
#> ERR866156 2 0.3752 0.891 0.144 0.856 0
#> ERR866174 2 0.3752 0.891 0.144 0.856 0
#> ERR866157 2 0.3752 0.891 0.144 0.856 0
#> ERR866175 2 0.3752 0.891 0.144 0.856 0
#> ERR862983 1 0.0000 1.000 1.000 0.000 0
#> ERR866158 1 0.0000 1.000 1.000 0.000 0
#> ERR866176 1 0.0000 1.000 1.000 0.000 0
#> ERR862984 1 0.0000 1.000 1.000 0.000 0
#> ERR866159 1 0.0000 1.000 1.000 0.000 0
#> ERR866177 1 0.0000 1.000 1.000 0.000 0
#> ERR862985 2 0.3752 0.891 0.144 0.856 0
#> ERR866160 2 0.3752 0.891 0.144 0.856 0
#> ERR866178 2 0.3752 0.891 0.144 0.856 0
#> ERR862986 2 0.3752 0.891 0.144 0.856 0
#> ERR866161 2 0.3752 0.891 0.144 0.856 0
#> ERR866179 2 0.3752 0.891 0.144 0.856 0
#> ERR862987 2 0.0000 0.943 0.000 1.000 0
#> ERR866162 2 0.0000 0.943 0.000 1.000 0
#> ERR866180 2 0.0000 0.943 0.000 1.000 0
#> ERR862988 2 0.0000 0.943 0.000 1.000 0
#> ERR866163 2 0.0000 0.943 0.000 1.000 0
#> ERR866181 2 0.0000 0.943 0.000 1.000 0
#> ERR862989 2 0.3752 0.891 0.144 0.856 0
#> ERR866164 2 0.3752 0.891 0.144 0.856 0
#> ERR866182 2 0.3752 0.891 0.144 0.856 0
#> ERR862990 2 0.3752 0.891 0.144 0.856 0
#> ERR866165 2 0.3752 0.891 0.144 0.856 0
#> ERR866183 2 0.3752 0.891 0.144 0.856 0
#> ERR862991 2 0.0000 0.943 0.000 1.000 0
#> ERR866166 2 0.0000 0.943 0.000 1.000 0
#> ERR866184 2 0.0000 0.943 0.000 1.000 0
#> ERR862992 2 0.0000 0.943 0.000 1.000 0
#> ERR866167 2 0.0000 0.943 0.000 1.000 0
#> ERR866185 2 0.0000 0.943 0.000 1.000 0
show/hide code output
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> ERR862939 3 0.3610 0.759 0.200 0.000 0.800 0
#> ERR862957 3 0.3528 0.769 0.192 0.000 0.808 0
#> ERR878007 3 0.3610 0.759 0.200 0.000 0.800 0
#> ERR862940 3 0.2589 0.843 0.116 0.000 0.884 0
#> ERR862958 3 0.1389 0.893 0.048 0.000 0.952 0
#> ERR878008 3 0.3266 0.795 0.168 0.000 0.832 0
#> ERR862941 2 0.0000 1.000 0.000 1.000 0.000 0
#> ERR862959 2 0.0000 1.000 0.000 1.000 0.000 0
#> ERR878009 2 0.0000 1.000 0.000 1.000 0.000 0
#> ERR862942 2 0.0000 1.000 0.000 1.000 0.000 0
#> ERR862960 2 0.0000 1.000 0.000 1.000 0.000 0
#> ERR878010 2 0.0000 1.000 0.000 1.000 0.000 0
#> ERR862943 3 0.0000 0.920 0.000 0.000 1.000 0
#> ERR862961 3 0.0000 0.920 0.000 0.000 1.000 0
#> ERR878011 3 0.0000 0.920 0.000 0.000 1.000 0
#> ERR862944 3 0.0000 0.920 0.000 0.000 1.000 0
#> ERR862962 3 0.0000 0.920 0.000 0.000 1.000 0
#> ERR878012 3 0.0000 0.920 0.000 0.000 1.000 0
#> ERR862945 4 0.0000 1.000 0.000 0.000 0.000 1
#> ERR862963 4 0.0000 1.000 0.000 0.000 0.000 1
#> ERR878013 4 0.0000 1.000 0.000 0.000 0.000 1
#> ERR862946 4 0.0000 1.000 0.000 0.000 0.000 1
#> ERR862964 4 0.0000 1.000 0.000 0.000 0.000 1
#> ERR878014 4 0.0000 1.000 0.000 0.000 0.000 1
#> ERR862947 2 0.0000 1.000 0.000 1.000 0.000 0
#> ERR862965 2 0.0000 1.000 0.000 1.000 0.000 0
#> ERR878015 2 0.0000 1.000 0.000 1.000 0.000 0
#> ERR862948 2 0.0000 1.000 0.000 1.000 0.000 0
#> ERR862966 2 0.0000 1.000 0.000 1.000 0.000 0
#> ERR878016 2 0.0000 1.000 0.000 1.000 0.000 0
#> ERR862949 2 0.0000 1.000 0.000 1.000 0.000 0
#> ERR862967 2 0.0000 1.000 0.000 1.000 0.000 0
#> ERR878017 2 0.0000 1.000 0.000 1.000 0.000 0
#> ERR862950 2 0.0000 1.000 0.000 1.000 0.000 0
#> ERR862968 2 0.0000 1.000 0.000 1.000 0.000 0
#> ERR878018 2 0.0000 1.000 0.000 1.000 0.000 0
#> ERR862951 1 0.0000 0.922 1.000 0.000 0.000 0
#> ERR862969 1 0.0000 0.922 1.000 0.000 0.000 0
#> ERR878019 1 0.0000 0.922 1.000 0.000 0.000 0
#> ERR862952 1 0.0000 0.922 1.000 0.000 0.000 0
#> ERR862970 1 0.0000 0.922 1.000 0.000 0.000 0
#> ERR878020 1 0.0188 0.920 0.996 0.004 0.000 0
#> ERR862953 1 0.0921 0.911 0.972 0.028 0.000 0
#> ERR862971 1 0.1557 0.897 0.944 0.056 0.000 0
#> ERR878021 1 0.2081 0.880 0.916 0.084 0.000 0
#> ERR862954 1 0.1118 0.907 0.964 0.036 0.000 0
#> ERR862972 1 0.2530 0.862 0.888 0.112 0.000 0
#> ERR878022 1 0.0817 0.913 0.976 0.024 0.000 0
#> ERR862955 1 0.3610 0.798 0.800 0.200 0.000 0
#> ERR862973 1 0.3610 0.798 0.800 0.200 0.000 0
#> ERR878023 1 0.3610 0.798 0.800 0.200 0.000 0
#> ERR862956 1 0.3610 0.798 0.800 0.200 0.000 0
#> ERR862974 1 0.3610 0.798 0.800 0.200 0.000 0
#> ERR878024 1 0.3610 0.798 0.800 0.200 0.000 0
#> ERR862975 1 0.0000 0.922 1.000 0.000 0.000 0
#> ERR866150 1 0.0000 0.922 1.000 0.000 0.000 0
#> ERR866168 1 0.0000 0.922 1.000 0.000 0.000 0
#> ERR862976 1 0.0000 0.922 1.000 0.000 0.000 0
#> ERR866151 1 0.0000 0.922 1.000 0.000 0.000 0
#> ERR866169 1 0.0000 0.922 1.000 0.000 0.000 0
#> ERR862977 1 0.3610 0.798 0.800 0.200 0.000 0
#> ERR866152 1 0.3610 0.798 0.800 0.200 0.000 0
#> ERR866170 1 0.3610 0.798 0.800 0.200 0.000 0
#> ERR862978 1 0.3610 0.798 0.800 0.200 0.000 0
#> ERR866153 1 0.3610 0.798 0.800 0.200 0.000 0
#> ERR866171 1 0.3610 0.798 0.800 0.200 0.000 0
#> ERR862979 2 0.0000 1.000 0.000 1.000 0.000 0
#> ERR866154 2 0.0000 1.000 0.000 1.000 0.000 0
#> ERR866172 2 0.0000 1.000 0.000 1.000 0.000 0
#> ERR862980 2 0.0000 1.000 0.000 1.000 0.000 0
#> ERR866155 2 0.0000 1.000 0.000 1.000 0.000 0
#> ERR866173 2 0.0000 1.000 0.000 1.000 0.000 0
#> ERR862981 1 0.0000 0.922 1.000 0.000 0.000 0
#> ERR866156 1 0.0000 0.922 1.000 0.000 0.000 0
#> ERR866174 1 0.0000 0.922 1.000 0.000 0.000 0
#> ERR866157 1 0.0000 0.922 1.000 0.000 0.000 0
#> ERR866175 1 0.0000 0.922 1.000 0.000 0.000 0
#> ERR862983 3 0.0000 0.920 0.000 0.000 1.000 0
#> ERR866158 3 0.0000 0.920 0.000 0.000 1.000 0
#> ERR866176 3 0.0000 0.920 0.000 0.000 1.000 0
#> ERR862984 3 0.0000 0.920 0.000 0.000 1.000 0
#> ERR866159 3 0.0000 0.920 0.000 0.000 1.000 0
#> ERR866177 3 0.0000 0.920 0.000 0.000 1.000 0
#> ERR862985 1 0.0000 0.922 1.000 0.000 0.000 0
#> ERR866160 1 0.0000 0.922 1.000 0.000 0.000 0
#> ERR866178 1 0.0000 0.922 1.000 0.000 0.000 0
#> ERR862986 1 0.0000 0.922 1.000 0.000 0.000 0
#> ERR866161 1 0.0000 0.922 1.000 0.000 0.000 0
#> ERR866179 1 0.0000 0.922 1.000 0.000 0.000 0
#> ERR862987 2 0.0000 1.000 0.000 1.000 0.000 0
#> ERR866162 2 0.0000 1.000 0.000 1.000 0.000 0
#> ERR866180 2 0.0000 1.000 0.000 1.000 0.000 0
#> ERR862988 2 0.0000 1.000 0.000 1.000 0.000 0
#> ERR866163 2 0.0000 1.000 0.000 1.000 0.000 0
#> ERR866181 2 0.0000 1.000 0.000 1.000 0.000 0
#> ERR862989 1 0.0000 0.922 1.000 0.000 0.000 0
#> ERR866164 1 0.0000 0.922 1.000 0.000 0.000 0
#> ERR866182 1 0.0000 0.922 1.000 0.000 0.000 0
#> ERR862990 1 0.0000 0.922 1.000 0.000 0.000 0
#> ERR866165 1 0.0000 0.922 1.000 0.000 0.000 0
#> ERR866183 1 0.0000 0.922 1.000 0.000 0.000 0
#> ERR862991 2 0.0000 1.000 0.000 1.000 0.000 0
#> ERR866166 2 0.0000 1.000 0.000 1.000 0.000 0
#> ERR866184 2 0.0000 1.000 0.000 1.000 0.000 0
#> ERR862992 2 0.0000 1.000 0.000 1.000 0.000 0
#> ERR866167 2 0.0000 1.000 0.000 1.000 0.000 0
#> ERR866185 2 0.0000 1.000 0.000 1.000 0.000 0
show/hide code output
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> ERR862939 3 0.3109 0.761 0.200 0.000 0.800 0 0
#> ERR862957 3 0.3039 0.771 0.192 0.000 0.808 0 0
#> ERR878007 3 0.3109 0.761 0.200 0.000 0.800 0 0
#> ERR862940 3 0.2280 0.841 0.120 0.000 0.880 0 0
#> ERR862958 3 0.1270 0.891 0.052 0.000 0.948 0 0
#> ERR878008 3 0.2813 0.797 0.168 0.000 0.832 0 0
#> ERR862941 2 0.0000 1.000 0.000 1.000 0.000 0 0
#> ERR862959 2 0.0000 1.000 0.000 1.000 0.000 0 0
#> ERR878009 2 0.0000 1.000 0.000 1.000 0.000 0 0
#> ERR862942 2 0.0000 1.000 0.000 1.000 0.000 0 0
#> ERR862960 2 0.0000 1.000 0.000 1.000 0.000 0 0
#> ERR878010 2 0.0000 1.000 0.000 1.000 0.000 0 0
#> ERR862943 3 0.0000 0.920 0.000 0.000 1.000 0 0
#> ERR862961 3 0.0000 0.920 0.000 0.000 1.000 0 0
#> ERR878011 3 0.0000 0.920 0.000 0.000 1.000 0 0
#> ERR862944 3 0.0000 0.920 0.000 0.000 1.000 0 0
#> ERR862962 3 0.0000 0.920 0.000 0.000 1.000 0 0
#> ERR878012 3 0.0000 0.920 0.000 0.000 1.000 0 0
#> ERR862945 4 0.0000 1.000 0.000 0.000 0.000 1 0
#> ERR862963 4 0.0000 1.000 0.000 0.000 0.000 1 0
#> ERR878013 4 0.0000 1.000 0.000 0.000 0.000 1 0
#> ERR862946 4 0.0000 1.000 0.000 0.000 0.000 1 0
#> ERR862964 4 0.0000 1.000 0.000 0.000 0.000 1 0
#> ERR878014 4 0.0000 1.000 0.000 0.000 0.000 1 0
#> ERR862947 5 0.0000 1.000 0.000 0.000 0.000 0 1
#> ERR862965 5 0.0000 1.000 0.000 0.000 0.000 0 1
#> ERR878015 5 0.0000 1.000 0.000 0.000 0.000 0 1
#> ERR862948 5 0.0000 1.000 0.000 0.000 0.000 0 1
#> ERR862966 5 0.0000 1.000 0.000 0.000 0.000 0 1
#> ERR878016 5 0.0000 1.000 0.000 0.000 0.000 0 1
#> ERR862949 2 0.0000 1.000 0.000 1.000 0.000 0 0
#> ERR862967 2 0.0000 1.000 0.000 1.000 0.000 0 0
#> ERR878017 2 0.0000 1.000 0.000 1.000 0.000 0 0
#> ERR862950 2 0.0000 1.000 0.000 1.000 0.000 0 0
#> ERR862968 2 0.0000 1.000 0.000 1.000 0.000 0 0
#> ERR878018 2 0.0000 1.000 0.000 1.000 0.000 0 0
#> ERR862951 1 0.0000 0.923 1.000 0.000 0.000 0 0
#> ERR862969 1 0.0000 0.923 1.000 0.000 0.000 0 0
#> ERR878019 1 0.0000 0.923 1.000 0.000 0.000 0 0
#> ERR862952 1 0.0000 0.923 1.000 0.000 0.000 0 0
#> ERR862970 1 0.0000 0.923 1.000 0.000 0.000 0 0
#> ERR878020 1 0.0162 0.921 0.996 0.004 0.000 0 0
#> ERR862953 1 0.0963 0.910 0.964 0.036 0.000 0 0
#> ERR862971 1 0.1410 0.899 0.940 0.060 0.000 0 0
#> ERR878021 1 0.2020 0.876 0.900 0.100 0.000 0 0
#> ERR862954 1 0.1121 0.906 0.956 0.044 0.000 0 0
#> ERR862972 1 0.2329 0.861 0.876 0.124 0.000 0 0
#> ERR878022 1 0.1270 0.903 0.948 0.052 0.000 0 0
#> ERR862955 1 0.3109 0.808 0.800 0.200 0.000 0 0
#> ERR862973 1 0.3109 0.808 0.800 0.200 0.000 0 0
#> ERR878023 1 0.3109 0.808 0.800 0.200 0.000 0 0
#> ERR862956 1 0.3109 0.808 0.800 0.200 0.000 0 0
#> ERR862974 1 0.3109 0.808 0.800 0.200 0.000 0 0
#> ERR878024 1 0.3109 0.808 0.800 0.200 0.000 0 0
#> ERR862975 1 0.0000 0.923 1.000 0.000 0.000 0 0
#> ERR866150 1 0.0000 0.923 1.000 0.000 0.000 0 0
#> ERR866168 1 0.0000 0.923 1.000 0.000 0.000 0 0
#> ERR862976 1 0.0000 0.923 1.000 0.000 0.000 0 0
#> ERR866151 1 0.0000 0.923 1.000 0.000 0.000 0 0
#> ERR866169 1 0.0000 0.923 1.000 0.000 0.000 0 0
#> ERR862977 1 0.3109 0.808 0.800 0.200 0.000 0 0
#> ERR866152 1 0.3109 0.808 0.800 0.200 0.000 0 0
#> ERR866170 1 0.3109 0.808 0.800 0.200 0.000 0 0
#> ERR862978 1 0.3109 0.808 0.800 0.200 0.000 0 0
#> ERR866153 1 0.3109 0.808 0.800 0.200 0.000 0 0
#> ERR866171 1 0.3109 0.808 0.800 0.200 0.000 0 0
#> ERR862979 2 0.0000 1.000 0.000 1.000 0.000 0 0
#> ERR866154 2 0.0000 1.000 0.000 1.000 0.000 0 0
#> ERR866172 2 0.0000 1.000 0.000 1.000 0.000 0 0
#> ERR862980 2 0.0000 1.000 0.000 1.000 0.000 0 0
#> ERR866155 2 0.0000 1.000 0.000 1.000 0.000 0 0
#> ERR866173 2 0.0000 1.000 0.000 1.000 0.000 0 0
#> ERR862981 1 0.0000 0.923 1.000 0.000 0.000 0 0
#> ERR866156 1 0.0000 0.923 1.000 0.000 0.000 0 0
#> ERR866174 1 0.0000 0.923 1.000 0.000 0.000 0 0
#> ERR866157 1 0.0000 0.923 1.000 0.000 0.000 0 0
#> ERR866175 1 0.0000 0.923 1.000 0.000 0.000 0 0
#> ERR862983 3 0.0000 0.920 0.000 0.000 1.000 0 0
#> ERR866158 3 0.0000 0.920 0.000 0.000 1.000 0 0
#> ERR866176 3 0.0000 0.920 0.000 0.000 1.000 0 0
#> ERR862984 3 0.0000 0.920 0.000 0.000 1.000 0 0
#> ERR866159 3 0.0000 0.920 0.000 0.000 1.000 0 0
#> ERR866177 3 0.0000 0.920 0.000 0.000 1.000 0 0
#> ERR862985 1 0.0000 0.923 1.000 0.000 0.000 0 0
#> ERR866160 1 0.0000 0.923 1.000 0.000 0.000 0 0
#> ERR866178 1 0.0000 0.923 1.000 0.000 0.000 0 0
#> ERR862986 1 0.0000 0.923 1.000 0.000 0.000 0 0
#> ERR866161 1 0.0000 0.923 1.000 0.000 0.000 0 0
#> ERR866179 1 0.0000 0.923 1.000 0.000 0.000 0 0
#> ERR862987 2 0.0000 1.000 0.000 1.000 0.000 0 0
#> ERR866162 2 0.0000 1.000 0.000 1.000 0.000 0 0
#> ERR866180 2 0.0000 1.000 0.000 1.000 0.000 0 0
#> ERR862988 2 0.0000 1.000 0.000 1.000 0.000 0 0
#> ERR866163 2 0.0000 1.000 0.000 1.000 0.000 0 0
#> ERR866181 2 0.0000 1.000 0.000 1.000 0.000 0 0
#> ERR862989 1 0.0000 0.923 1.000 0.000 0.000 0 0
#> ERR866164 1 0.0000 0.923 1.000 0.000 0.000 0 0
#> ERR866182 1 0.0000 0.923 1.000 0.000 0.000 0 0
#> ERR862990 1 0.0000 0.923 1.000 0.000 0.000 0 0
#> ERR866165 1 0.0000 0.923 1.000 0.000 0.000 0 0
#> ERR866183 1 0.0000 0.923 1.000 0.000 0.000 0 0
#> ERR862991 2 0.0000 1.000 0.000 1.000 0.000 0 0
#> ERR866166 2 0.0000 1.000 0.000 1.000 0.000 0 0
#> ERR866184 2 0.0000 1.000 0.000 1.000 0.000 0 0
#> ERR862992 2 0.0000 1.000 0.000 1.000 0.000 0 0
#> ERR866167 2 0.0000 1.000 0.000 1.000 0.000 0 0
#> ERR866185 2 0.0000 1.000 0.000 1.000 0.000 0 0
show/hide code output
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> ERR862939 6 0.0146 1.000 0.004 0.000 0 0 0 0.996
#> ERR862957 6 0.0146 1.000 0.004 0.000 0 0 0 0.996
#> ERR878007 6 0.0146 1.000 0.004 0.000 0 0 0 0.996
#> ERR862940 6 0.0146 1.000 0.004 0.000 0 0 0 0.996
#> ERR862958 6 0.0146 1.000 0.004 0.000 0 0 0 0.996
#> ERR878008 6 0.0146 1.000 0.004 0.000 0 0 0 0.996
#> ERR862941 2 0.0000 1.000 0.000 1.000 0 0 0 0.000
#> ERR862959 2 0.0000 1.000 0.000 1.000 0 0 0 0.000
#> ERR878009 2 0.0000 1.000 0.000 1.000 0 0 0 0.000
#> ERR862942 2 0.0000 1.000 0.000 1.000 0 0 0 0.000
#> ERR862960 2 0.0000 1.000 0.000 1.000 0 0 0 0.000
#> ERR878010 2 0.0000 1.000 0.000 1.000 0 0 0 0.000
#> ERR862943 3 0.0000 1.000 0.000 0.000 1 0 0 0.000
#> ERR862961 3 0.0000 1.000 0.000 0.000 1 0 0 0.000
#> ERR878011 3 0.0000 1.000 0.000 0.000 1 0 0 0.000
#> ERR862944 3 0.0000 1.000 0.000 0.000 1 0 0 0.000
#> ERR862962 3 0.0000 1.000 0.000 0.000 1 0 0 0.000
#> ERR878012 3 0.0000 1.000 0.000 0.000 1 0 0 0.000
#> ERR862945 4 0.0000 1.000 0.000 0.000 0 1 0 0.000
#> ERR862963 4 0.0000 1.000 0.000 0.000 0 1 0 0.000
#> ERR878013 4 0.0000 1.000 0.000 0.000 0 1 0 0.000
#> ERR862946 4 0.0000 1.000 0.000 0.000 0 1 0 0.000
#> ERR862964 4 0.0000 1.000 0.000 0.000 0 1 0 0.000
#> ERR878014 4 0.0000 1.000 0.000 0.000 0 1 0 0.000
#> ERR862947 5 0.0000 1.000 0.000 0.000 0 0 1 0.000
#> ERR862965 5 0.0000 1.000 0.000 0.000 0 0 1 0.000
#> ERR878015 5 0.0000 1.000 0.000 0.000 0 0 1 0.000
#> ERR862948 5 0.0000 1.000 0.000 0.000 0 0 1 0.000
#> ERR862966 5 0.0000 1.000 0.000 0.000 0 0 1 0.000
#> ERR878016 5 0.0000 1.000 0.000 0.000 0 0 1 0.000
#> ERR862949 2 0.0000 1.000 0.000 1.000 0 0 0 0.000
#> ERR862967 2 0.0000 1.000 0.000 1.000 0 0 0 0.000
#> ERR878017 2 0.0000 1.000 0.000 1.000 0 0 0 0.000
#> ERR862950 2 0.0000 1.000 0.000 1.000 0 0 0 0.000
#> ERR862968 2 0.0000 1.000 0.000 1.000 0 0 0 0.000
#> ERR878018 2 0.0000 1.000 0.000 1.000 0 0 0 0.000
#> ERR862951 1 0.0632 0.941 0.976 0.000 0 0 0 0.024
#> ERR862969 1 0.0000 0.944 1.000 0.000 0 0 0 0.000
#> ERR878019 1 0.0000 0.944 1.000 0.000 0 0 0 0.000
#> ERR862952 1 0.0000 0.944 1.000 0.000 0 0 0 0.000
#> ERR862970 1 0.0146 0.944 0.996 0.000 0 0 0 0.004
#> ERR878020 1 0.0000 0.944 1.000 0.000 0 0 0 0.000
#> ERR862953 1 0.0146 0.944 0.996 0.000 0 0 0 0.004
#> ERR862971 1 0.0146 0.944 0.996 0.000 0 0 0 0.004
#> ERR878021 1 0.0777 0.938 0.972 0.024 0 0 0 0.004
#> ERR862954 1 0.0291 0.943 0.992 0.004 0 0 0 0.004
#> ERR862972 1 0.1152 0.930 0.952 0.044 0 0 0 0.004
#> ERR878022 1 0.0405 0.942 0.988 0.008 0 0 0 0.004
#> ERR862955 1 0.1858 0.902 0.904 0.092 0 0 0 0.004
#> ERR862973 1 0.1858 0.902 0.904 0.092 0 0 0 0.004
#> ERR878023 1 0.1858 0.902 0.904 0.092 0 0 0 0.004
#> ERR862956 1 0.1858 0.902 0.904 0.092 0 0 0 0.004
#> ERR862974 1 0.1908 0.898 0.900 0.096 0 0 0 0.004
#> ERR878024 1 0.1958 0.896 0.896 0.100 0 0 0 0.004
#> ERR862975 1 0.1501 0.922 0.924 0.000 0 0 0 0.076
#> ERR866150 1 0.1501 0.922 0.924 0.000 0 0 0 0.076
#> ERR866168 1 0.1501 0.922 0.924 0.000 0 0 0 0.076
#> ERR862976 1 0.1501 0.922 0.924 0.000 0 0 0 0.076
#> ERR866151 1 0.1501 0.922 0.924 0.000 0 0 0 0.076
#> ERR866169 1 0.1501 0.922 0.924 0.000 0 0 0 0.076
#> ERR862977 1 0.1858 0.902 0.904 0.092 0 0 0 0.004
#> ERR866152 1 0.1858 0.902 0.904 0.092 0 0 0 0.004
#> ERR866170 1 0.1858 0.902 0.904 0.092 0 0 0 0.004
#> ERR862978 1 0.1858 0.902 0.904 0.092 0 0 0 0.004
#> ERR866153 1 0.1858 0.902 0.904 0.092 0 0 0 0.004
#> ERR866171 1 0.1858 0.902 0.904 0.092 0 0 0 0.004
#> ERR862979 2 0.0000 1.000 0.000 1.000 0 0 0 0.000
#> ERR866154 2 0.0000 1.000 0.000 1.000 0 0 0 0.000
#> ERR866172 2 0.0000 1.000 0.000 1.000 0 0 0 0.000
#> ERR862980 2 0.0000 1.000 0.000 1.000 0 0 0 0.000
#> ERR866155 2 0.0000 1.000 0.000 1.000 0 0 0 0.000
#> ERR866173 2 0.0000 1.000 0.000 1.000 0 0 0 0.000
#> ERR862981 1 0.1267 0.927 0.940 0.000 0 0 0 0.060
#> ERR866156 1 0.0000 0.944 1.000 0.000 0 0 0 0.000
#> ERR866174 1 0.0000 0.944 1.000 0.000 0 0 0 0.000
#> ERR866157 1 0.0260 0.943 0.992 0.000 0 0 0 0.008
#> ERR866175 1 0.0000 0.944 1.000 0.000 0 0 0 0.000
#> ERR862983 3 0.0000 1.000 0.000 0.000 1 0 0 0.000
#> ERR866158 3 0.0000 1.000 0.000 0.000 1 0 0 0.000
#> ERR866176 3 0.0000 1.000 0.000 0.000 1 0 0 0.000
#> ERR862984 3 0.0000 1.000 0.000 0.000 1 0 0 0.000
#> ERR866159 3 0.0000 1.000 0.000 0.000 1 0 0 0.000
#> ERR866177 3 0.0000 1.000 0.000 0.000 1 0 0 0.000
#> ERR862985 1 0.0146 0.944 0.996 0.000 0 0 0 0.004
#> ERR866160 1 0.0000 0.944 1.000 0.000 0 0 0 0.000
#> ERR866178 1 0.0000 0.944 1.000 0.000 0 0 0 0.000
#> ERR862986 1 0.0000 0.944 1.000 0.000 0 0 0 0.000
#> ERR866161 1 0.0000 0.944 1.000 0.000 0 0 0 0.000
#> ERR866179 1 0.0000 0.944 1.000 0.000 0 0 0 0.000
#> ERR862987 2 0.0000 1.000 0.000 1.000 0 0 0 0.000
#> ERR866162 2 0.0000 1.000 0.000 1.000 0 0 0 0.000
#> ERR866180 2 0.0000 1.000 0.000 1.000 0 0 0 0.000
#> ERR862988 2 0.0000 1.000 0.000 1.000 0 0 0 0.000
#> ERR866163 2 0.0000 1.000 0.000 1.000 0 0 0 0.000
#> ERR866181 2 0.0000 1.000 0.000 1.000 0 0 0 0.000
#> ERR862989 1 0.1501 0.922 0.924 0.000 0 0 0 0.076
#> ERR866164 1 0.1501 0.922 0.924 0.000 0 0 0 0.076
#> ERR866182 1 0.1501 0.922 0.924 0.000 0 0 0 0.076
#> ERR862990 1 0.1501 0.922 0.924 0.000 0 0 0 0.076
#> ERR866165 1 0.1501 0.922 0.924 0.000 0 0 0 0.076
#> ERR866183 1 0.1501 0.922 0.924 0.000 0 0 0 0.076
#> ERR862991 2 0.0000 1.000 0.000 1.000 0 0 0 0.000
#> ERR866166 2 0.0000 1.000 0.000 1.000 0 0 0 0.000
#> ERR866184 2 0.0000 1.000 0.000 1.000 0 0 0 0.000
#> ERR862992 2 0.0000 1.000 0.000 1.000 0 0 0 0.000
#> ERR866167 2 0.0000 1.000 0.000 1.000 0 0 0 0.000
#> ERR866185 2 0.0000 1.000 0.000 1.000 0 0 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)

consensus_heatmap(res, k = 3)

consensus_heatmap(res, k = 4)

consensus_heatmap(res, k = 5)

consensus_heatmap(res, k = 6)

Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)

membership_heatmap(res, k = 3)

membership_heatmap(res, k = 4)

membership_heatmap(res, k = 5)

membership_heatmap(res, k = 6)

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)

get_signatures(res, k = 3)

get_signatures(res, k = 4)

get_signatures(res, k = 5)

get_signatures(res, k = 6)

Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)

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

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

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

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

Compare the overlap of signatures from different k:
compare_signatures(res)

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.
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:
which_row
: row indices corresponding to the input matrix.
fdr
: FDR for the differential test.
mean_x
: The mean value in group x.
scaled_mean_x
: The mean value in group x after rows are scaled.
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")

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

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

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

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

Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)

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"]
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 15818 rows and 107 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'SD' method.
#> Subgroups are detected by 'mclust' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 5.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)

The plots are:
- The first row: a plot of the ECDF (empirical cumulative distribution
function) curves of the consensus matrix for each
k
and the heatmap of
predicted classes for each k
.
- The second row: heatmaps of the consensus matrix for each
k
.
- The third row: heatmaps of the membership matrix for each
k
.
- The fouth row: heatmaps of the signatures for each
k
.
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:
- ECDF curves of the consensus matrix for each
k
;
- 1-PAC. The PAC
score
measures the proportion of the ambiguous subgrouping.
- Mean silhouette score.
- Concordance. The mean probability of fiting the consensus class ids in all
partitions.
- Area increased. Denote \(A_k\) as the area under the ECDF curve for current
k
, the area increased is defined as \(A_k - A_{k-1}\).
- Rand index. The percent of pairs of samples that are both in a same cluster
or both are not in a same cluster in the partition of k and k-1.
- Jaccard index. The ratio of pairs of samples are both in a same cluster in
the partition of k and k-1 and the pairs of samples are both in a same
cluster in the partition k or k-1.
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)

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.880 0.936 0.951 0.296 0.649 0.649
#> 3 3 0.454 0.667 0.811 0.755 0.598 0.474
#> 4 4 0.492 0.586 0.747 0.275 0.840 0.681
#> 5 5 0.767 0.764 0.860 0.105 0.734 0.410
#> 6 6 0.872 0.574 0.741 0.038 0.874 0.581
suggest_best_k()
suggests the best \(k\) based on these statistics. The rules are as follows:
- All \(k\) with Jaccard index larger than 0.95 are removed because increasing
\(k\) does not provide enough extra information. If all \(k\) are removed, it is
marked as no subgroup is detected.
- For all \(k\) with 1-PAC score larger than 0.9, the maximal \(k\) is taken as
the best \(k\), and other \(k\) are marked as optional \(k\).
- If it does not fit the second rule. The \(k\) with the maximal vote of the
highest 1-PAC score, highest mean silhouette, and highest concordance is
taken as the best \(k\).
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
#> ERR862939 1 0.9522 0.711 0.628 0.372
#> ERR862957 1 0.9522 0.711 0.628 0.372
#> ERR878007 1 0.9522 0.711 0.628 0.372
#> ERR862940 1 0.9522 0.711 0.628 0.372
#> ERR862958 1 0.9522 0.711 0.628 0.372
#> ERR878008 1 0.9522 0.711 0.628 0.372
#> ERR862941 2 0.0000 0.994 0.000 1.000
#> ERR862959 2 0.0000 0.994 0.000 1.000
#> ERR878009 2 0.0000 0.994 0.000 1.000
#> ERR862942 2 0.0000 0.994 0.000 1.000
#> ERR862960 2 0.0000 0.994 0.000 1.000
#> ERR878010 2 0.0000 0.994 0.000 1.000
#> ERR862943 1 0.3584 0.796 0.932 0.068
#> ERR862961 1 0.3584 0.796 0.932 0.068
#> ERR878011 1 0.3733 0.797 0.928 0.072
#> ERR862944 1 0.3584 0.796 0.932 0.068
#> ERR862962 1 0.3733 0.797 0.928 0.072
#> ERR878012 1 0.3733 0.797 0.928 0.072
#> ERR862945 1 0.0000 0.780 1.000 0.000
#> ERR862963 1 0.0000 0.780 1.000 0.000
#> ERR878013 1 0.0000 0.780 1.000 0.000
#> ERR862946 1 0.0000 0.780 1.000 0.000
#> ERR862964 1 0.0000 0.780 1.000 0.000
#> ERR878014 1 0.0000 0.780 1.000 0.000
#> ERR862947 1 0.9460 0.718 0.636 0.364
#> ERR862965 1 0.9460 0.718 0.636 0.364
#> ERR878015 1 0.9460 0.718 0.636 0.364
#> ERR862948 1 0.9460 0.718 0.636 0.364
#> ERR862966 1 0.9460 0.718 0.636 0.364
#> ERR878016 1 0.9460 0.718 0.636 0.364
#> ERR862949 2 0.0000 0.994 0.000 1.000
#> ERR862967 2 0.0000 0.994 0.000 1.000
#> ERR878017 2 0.0000 0.994 0.000 1.000
#> ERR862950 2 0.0000 0.994 0.000 1.000
#> ERR862968 2 0.0000 0.994 0.000 1.000
#> ERR878018 2 0.0000 0.994 0.000 1.000
#> ERR862951 2 0.0000 0.994 0.000 1.000
#> ERR862969 2 0.0000 0.994 0.000 1.000
#> ERR878019 2 0.0000 0.994 0.000 1.000
#> ERR862952 2 0.0000 0.994 0.000 1.000
#> ERR862970 2 0.0000 0.994 0.000 1.000
#> ERR878020 2 0.0000 0.994 0.000 1.000
#> ERR862953 2 0.0000 0.994 0.000 1.000
#> ERR862971 2 0.0000 0.994 0.000 1.000
#> ERR878021 2 0.0000 0.994 0.000 1.000
#> ERR862954 2 0.0000 0.994 0.000 1.000
#> ERR862972 2 0.0000 0.994 0.000 1.000
#> ERR878022 2 0.0000 0.994 0.000 1.000
#> ERR862955 2 0.0000 0.994 0.000 1.000
#> ERR862973 2 0.0000 0.994 0.000 1.000
#> ERR878023 2 0.0000 0.994 0.000 1.000
#> ERR862956 2 0.0000 0.994 0.000 1.000
#> ERR862974 2 0.0000 0.994 0.000 1.000
#> ERR878024 2 0.0000 0.994 0.000 1.000
#> ERR862975 2 0.0376 0.991 0.004 0.996
#> ERR866150 2 0.0376 0.991 0.004 0.996
#> ERR866168 2 0.0376 0.991 0.004 0.996
#> ERR862976 2 0.0376 0.991 0.004 0.996
#> ERR866151 2 0.0376 0.991 0.004 0.996
#> ERR866169 2 0.0376 0.991 0.004 0.996
#> ERR862977 2 0.0000 0.994 0.000 1.000
#> ERR866152 2 0.0000 0.994 0.000 1.000
#> ERR866170 2 0.0000 0.994 0.000 1.000
#> ERR862978 2 0.0000 0.994 0.000 1.000
#> ERR866153 2 0.0000 0.994 0.000 1.000
#> ERR866171 2 0.0000 0.994 0.000 1.000
#> ERR862979 2 0.0000 0.994 0.000 1.000
#> ERR866154 2 0.0000 0.994 0.000 1.000
#> ERR866172 2 0.0000 0.994 0.000 1.000
#> ERR862980 2 0.0000 0.994 0.000 1.000
#> ERR866155 2 0.0000 0.994 0.000 1.000
#> ERR866173 2 0.0000 0.994 0.000 1.000
#> ERR862981 2 0.0376 0.992 0.004 0.996
#> ERR866156 2 0.0376 0.992 0.004 0.996
#> ERR866174 2 0.0376 0.992 0.004 0.996
#> ERR866157 2 0.0376 0.992 0.004 0.996
#> ERR866175 2 0.0376 0.992 0.004 0.996
#> ERR862983 2 0.2778 0.942 0.048 0.952
#> ERR866158 2 0.2778 0.942 0.048 0.952
#> ERR866176 2 0.2778 0.942 0.048 0.952
#> ERR862984 2 0.2778 0.942 0.048 0.952
#> ERR866159 2 0.2778 0.942 0.048 0.952
#> ERR866177 2 0.2778 0.942 0.048 0.952
#> ERR862985 2 0.0376 0.992 0.004 0.996
#> ERR866160 2 0.0376 0.992 0.004 0.996
#> ERR866178 2 0.0376 0.992 0.004 0.996
#> ERR862986 2 0.0376 0.992 0.004 0.996
#> ERR866161 2 0.0376 0.992 0.004 0.996
#> ERR866179 2 0.0376 0.992 0.004 0.996
#> ERR862987 2 0.0000 0.994 0.000 1.000
#> ERR866162 2 0.0000 0.994 0.000 1.000
#> ERR866180 2 0.0000 0.994 0.000 1.000
#> ERR862988 2 0.0000 0.994 0.000 1.000
#> ERR866163 2 0.0000 0.994 0.000 1.000
#> ERR866181 2 0.0000 0.994 0.000 1.000
#> ERR862989 2 0.0376 0.992 0.004 0.996
#> ERR866164 2 0.0376 0.992 0.004 0.996
#> ERR866182 2 0.0376 0.992 0.004 0.996
#> ERR862990 2 0.0376 0.992 0.004 0.996
#> ERR866165 2 0.0376 0.992 0.004 0.996
#> ERR866183 2 0.0376 0.992 0.004 0.996
#> ERR862991 2 0.0000 0.994 0.000 1.000
#> ERR866166 2 0.0000 0.994 0.000 1.000
#> ERR866184 2 0.0000 0.994 0.000 1.000
#> ERR862992 2 0.0000 0.994 0.000 1.000
#> ERR866167 2 0.0000 0.994 0.000 1.000
#> ERR866185 2 0.0000 0.994 0.000 1.000
show/hide code output
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> ERR862939 1 0.0237 0.5093 0.996 0.000 0.004
#> ERR862957 1 0.0237 0.5093 0.996 0.000 0.004
#> ERR878007 1 0.0237 0.5093 0.996 0.000 0.004
#> ERR862940 1 0.0237 0.5093 0.996 0.000 0.004
#> ERR862958 1 0.0237 0.5093 0.996 0.000 0.004
#> ERR878008 1 0.0237 0.5093 0.996 0.000 0.004
#> ERR862941 2 0.0000 0.8190 0.000 1.000 0.000
#> ERR862959 2 0.0000 0.8190 0.000 1.000 0.000
#> ERR878009 2 0.0000 0.8190 0.000 1.000 0.000
#> ERR862942 2 0.0000 0.8190 0.000 1.000 0.000
#> ERR862960 2 0.0000 0.8190 0.000 1.000 0.000
#> ERR878010 2 0.0237 0.8175 0.004 0.996 0.000
#> ERR862943 1 0.8138 0.5988 0.636 0.132 0.232
#> ERR862961 1 0.8138 0.5988 0.636 0.132 0.232
#> ERR878011 1 0.8138 0.5988 0.636 0.132 0.232
#> ERR862944 1 0.8138 0.5988 0.636 0.132 0.232
#> ERR862962 1 0.8138 0.5988 0.636 0.132 0.232
#> ERR878012 1 0.8138 0.5988 0.636 0.132 0.232
#> ERR862945 3 0.0000 1.0000 0.000 0.000 1.000
#> ERR862963 3 0.0000 1.0000 0.000 0.000 1.000
#> ERR878013 3 0.0000 1.0000 0.000 0.000 1.000
#> ERR862946 3 0.0000 1.0000 0.000 0.000 1.000
#> ERR862964 3 0.0000 1.0000 0.000 0.000 1.000
#> ERR878014 3 0.0000 1.0000 0.000 0.000 1.000
#> ERR862947 2 0.9882 0.0602 0.312 0.408 0.280
#> ERR862965 2 0.9882 0.0602 0.312 0.408 0.280
#> ERR878015 2 0.9882 0.0602 0.312 0.408 0.280
#> ERR862948 2 0.9882 0.0602 0.312 0.408 0.280
#> ERR862966 2 0.9882 0.0602 0.312 0.408 0.280
#> ERR878016 2 0.9882 0.0602 0.312 0.408 0.280
#> ERR862949 2 0.5650 0.5280 0.312 0.688 0.000
#> ERR862967 2 0.5650 0.5280 0.312 0.688 0.000
#> ERR878017 2 0.3482 0.7097 0.128 0.872 0.000
#> ERR862950 2 0.5650 0.5280 0.312 0.688 0.000
#> ERR862968 2 0.5650 0.5280 0.312 0.688 0.000
#> ERR878018 2 0.3619 0.7036 0.136 0.864 0.000
#> ERR862951 2 0.2096 0.8069 0.052 0.944 0.004
#> ERR862969 2 0.2096 0.8069 0.052 0.944 0.004
#> ERR878019 2 0.2096 0.8069 0.052 0.944 0.004
#> ERR862952 2 0.2096 0.8069 0.052 0.944 0.004
#> ERR862970 2 0.2096 0.8069 0.052 0.944 0.004
#> ERR878020 2 0.2096 0.8069 0.052 0.944 0.004
#> ERR862953 2 0.2537 0.8013 0.080 0.920 0.000
#> ERR862971 2 0.2066 0.8081 0.060 0.940 0.000
#> ERR878021 2 0.1964 0.8083 0.056 0.944 0.000
#> ERR862954 2 0.2796 0.7939 0.092 0.908 0.000
#> ERR862972 2 0.2301 0.8068 0.060 0.936 0.004
#> ERR878022 2 0.2400 0.8060 0.064 0.932 0.004
#> ERR862955 2 0.1860 0.8082 0.052 0.948 0.000
#> ERR862973 2 0.1860 0.8082 0.052 0.948 0.000
#> ERR878023 2 0.1860 0.8082 0.052 0.948 0.000
#> ERR862956 2 0.1860 0.8082 0.052 0.948 0.000
#> ERR862974 2 0.1860 0.8082 0.052 0.948 0.000
#> ERR878024 2 0.1860 0.8082 0.052 0.948 0.000
#> ERR862975 1 0.5678 0.7706 0.684 0.316 0.000
#> ERR866150 1 0.5706 0.7687 0.680 0.320 0.000
#> ERR866168 1 0.5678 0.7706 0.684 0.316 0.000
#> ERR862976 1 0.5706 0.7687 0.680 0.320 0.000
#> ERR866151 1 0.5706 0.7687 0.680 0.320 0.000
#> ERR866169 1 0.5706 0.7687 0.680 0.320 0.000
#> ERR862977 2 0.1860 0.8082 0.052 0.948 0.000
#> ERR866152 2 0.1860 0.8082 0.052 0.948 0.000
#> ERR866170 2 0.1860 0.8082 0.052 0.948 0.000
#> ERR862978 2 0.1860 0.8082 0.052 0.948 0.000
#> ERR866153 2 0.1860 0.8082 0.052 0.948 0.000
#> ERR866171 2 0.1860 0.8082 0.052 0.948 0.000
#> ERR862979 2 0.0892 0.8089 0.020 0.980 0.000
#> ERR866154 2 0.0000 0.8190 0.000 1.000 0.000
#> ERR866172 2 0.0000 0.8190 0.000 1.000 0.000
#> ERR862980 2 0.0000 0.8190 0.000 1.000 0.000
#> ERR866155 2 0.0237 0.8175 0.004 0.996 0.000
#> ERR866173 2 0.0747 0.8120 0.016 0.984 0.000
#> ERR862981 1 0.7054 0.2923 0.524 0.456 0.020
#> ERR866156 1 0.6516 0.2201 0.516 0.480 0.004
#> ERR866174 1 0.6274 0.3283 0.544 0.456 0.000
#> ERR866157 2 0.7674 -0.2040 0.476 0.480 0.044
#> ERR866175 1 0.7319 0.3755 0.548 0.420 0.032
#> ERR862983 1 0.5678 0.7706 0.684 0.316 0.000
#> ERR866158 1 0.5678 0.7706 0.684 0.316 0.000
#> ERR866176 1 0.5678 0.7706 0.684 0.316 0.000
#> ERR862984 1 0.5678 0.7706 0.684 0.316 0.000
#> ERR866159 1 0.5678 0.7706 0.684 0.316 0.000
#> ERR866177 1 0.5678 0.7706 0.684 0.316 0.000
#> ERR862985 1 0.5726 0.6916 0.760 0.216 0.024
#> ERR866160 2 0.9154 -0.1176 0.384 0.468 0.148
#> ERR866178 2 0.8937 -0.2166 0.428 0.448 0.124
#> ERR862986 1 0.5012 0.7027 0.788 0.204 0.008
#> ERR866161 2 0.8983 -0.2177 0.428 0.444 0.128
#> ERR866179 1 0.8675 0.3008 0.476 0.420 0.104
#> ERR862987 2 0.0000 0.8190 0.000 1.000 0.000
#> ERR866162 2 0.0000 0.8190 0.000 1.000 0.000
#> ERR866180 2 0.0000 0.8190 0.000 1.000 0.000
#> ERR862988 2 0.0000 0.8190 0.000 1.000 0.000
#> ERR866163 2 0.0000 0.8190 0.000 1.000 0.000
#> ERR866181 2 0.0000 0.8190 0.000 1.000 0.000
#> ERR862989 1 0.7251 0.7304 0.612 0.348 0.040
#> ERR866164 1 0.6796 0.7409 0.632 0.344 0.024
#> ERR866182 1 0.8297 0.7037 0.560 0.348 0.092
#> ERR862990 1 0.6229 0.7492 0.652 0.340 0.008
#> ERR866165 1 0.5785 0.7584 0.668 0.332 0.000
#> ERR866183 1 0.5706 0.7684 0.680 0.320 0.000
#> ERR862991 2 0.0000 0.8190 0.000 1.000 0.000
#> ERR866166 2 0.0000 0.8190 0.000 1.000 0.000
#> ERR866184 2 0.0000 0.8190 0.000 1.000 0.000
#> ERR862992 2 0.0000 0.8190 0.000 1.000 0.000
#> ERR866167 2 0.0000 0.8190 0.000 1.000 0.000
#> ERR866185 2 0.0000 0.8190 0.000 1.000 0.000
show/hide code output
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> ERR862939 3 0.5408 1.000 0.432 0.004 0.556 0.008
#> ERR862957 3 0.5408 1.000 0.432 0.004 0.556 0.008
#> ERR878007 3 0.5408 1.000 0.432 0.004 0.556 0.008
#> ERR862940 3 0.5408 1.000 0.432 0.004 0.556 0.008
#> ERR862958 3 0.5408 1.000 0.432 0.004 0.556 0.008
#> ERR878008 3 0.5408 1.000 0.432 0.004 0.556 0.008
#> ERR862941 2 0.2469 0.666 0.000 0.892 0.108 0.000
#> ERR862959 2 0.2530 0.663 0.000 0.888 0.112 0.000
#> ERR878009 2 0.0469 0.716 0.000 0.988 0.012 0.000
#> ERR862942 2 0.2704 0.653 0.000 0.876 0.124 0.000
#> ERR862960 2 0.2469 0.667 0.000 0.892 0.108 0.000
#> ERR878010 2 0.0469 0.716 0.000 0.988 0.012 0.000
#> ERR862943 1 0.1256 0.302 0.964 0.000 0.028 0.008
#> ERR862961 1 0.1256 0.302 0.964 0.000 0.028 0.008
#> ERR878011 1 0.1256 0.302 0.964 0.000 0.028 0.008
#> ERR862944 1 0.1256 0.302 0.964 0.000 0.028 0.008
#> ERR862962 1 0.1256 0.302 0.964 0.000 0.028 0.008
#> ERR878012 1 0.1256 0.302 0.964 0.000 0.028 0.008
#> ERR862945 4 0.0000 0.908 0.000 0.000 0.000 1.000
#> ERR862963 4 0.0000 0.908 0.000 0.000 0.000 1.000
#> ERR878013 4 0.0000 0.908 0.000 0.000 0.000 1.000
#> ERR862946 4 0.0000 0.908 0.000 0.000 0.000 1.000
#> ERR862964 4 0.0000 0.908 0.000 0.000 0.000 1.000
#> ERR878014 4 0.0000 0.908 0.000 0.000 0.000 1.000
#> ERR862947 4 0.4182 0.904 0.000 0.024 0.180 0.796
#> ERR862965 4 0.4182 0.904 0.000 0.024 0.180 0.796
#> ERR878015 4 0.4182 0.904 0.000 0.024 0.180 0.796
#> ERR862948 4 0.4182 0.904 0.000 0.024 0.180 0.796
#> ERR862966 4 0.4182 0.904 0.000 0.024 0.180 0.796
#> ERR878016 4 0.4182 0.904 0.000 0.024 0.180 0.796
#> ERR862949 2 0.4500 0.413 0.000 0.684 0.316 0.000
#> ERR862967 2 0.4477 0.419 0.000 0.688 0.312 0.000
#> ERR878017 2 0.2868 0.644 0.000 0.864 0.136 0.000
#> ERR862950 2 0.4500 0.413 0.000 0.684 0.316 0.000
#> ERR862968 2 0.4500 0.413 0.000 0.684 0.316 0.000
#> ERR878018 2 0.4477 0.419 0.000 0.688 0.312 0.000
#> ERR862951 2 0.6061 0.586 0.048 0.552 0.400 0.000
#> ERR862969 2 0.6042 0.591 0.048 0.560 0.392 0.000
#> ERR878019 2 0.6061 0.585 0.048 0.552 0.400 0.000
#> ERR862952 2 0.6042 0.591 0.048 0.560 0.392 0.000
#> ERR862970 2 0.6042 0.591 0.048 0.560 0.392 0.000
#> ERR878020 2 0.6042 0.591 0.048 0.560 0.392 0.000
#> ERR862953 2 0.6069 0.617 0.056 0.588 0.356 0.000
#> ERR862971 2 0.5913 0.628 0.048 0.600 0.352 0.000
#> ERR878021 2 0.5990 0.632 0.056 0.608 0.336 0.000
#> ERR862954 2 0.6091 0.622 0.060 0.596 0.344 0.000
#> ERR862972 2 0.5954 0.629 0.052 0.604 0.344 0.000
#> ERR878022 2 0.6058 0.630 0.060 0.604 0.336 0.000
#> ERR862955 2 0.5929 0.636 0.048 0.596 0.356 0.000
#> ERR862973 2 0.5929 0.636 0.048 0.596 0.356 0.000
#> ERR878023 2 0.5943 0.634 0.048 0.592 0.360 0.000
#> ERR862956 2 0.5913 0.638 0.048 0.600 0.352 0.000
#> ERR862974 2 0.5929 0.636 0.048 0.596 0.356 0.000
#> ERR878024 2 0.5943 0.634 0.048 0.592 0.360 0.000
#> ERR862975 1 0.3453 0.276 0.868 0.080 0.052 0.000
#> ERR866150 1 0.3687 0.272 0.856 0.080 0.064 0.000
#> ERR866168 1 0.3687 0.272 0.856 0.080 0.064 0.000
#> ERR862976 1 0.3687 0.272 0.856 0.080 0.064 0.000
#> ERR866151 1 0.3687 0.272 0.856 0.080 0.064 0.000
#> ERR866169 1 0.3687 0.272 0.856 0.080 0.064 0.000
#> ERR862977 2 0.5898 0.640 0.048 0.604 0.348 0.000
#> ERR866152 2 0.5943 0.634 0.048 0.592 0.360 0.000
#> ERR866170 2 0.5971 0.628 0.048 0.584 0.368 0.000
#> ERR862978 2 0.5898 0.640 0.048 0.604 0.348 0.000
#> ERR866153 2 0.5943 0.634 0.048 0.592 0.360 0.000
#> ERR866171 2 0.5943 0.634 0.048 0.592 0.360 0.000
#> ERR862979 2 0.3688 0.561 0.000 0.792 0.208 0.000
#> ERR866154 2 0.0817 0.713 0.000 0.976 0.024 0.000
#> ERR866172 2 0.0707 0.714 0.000 0.980 0.020 0.000
#> ERR862980 2 0.1474 0.701 0.000 0.948 0.052 0.000
#> ERR866155 2 0.0469 0.716 0.000 0.988 0.012 0.000
#> ERR866173 2 0.0188 0.717 0.000 0.996 0.004 0.000
#> ERR862981 1 0.7608 0.333 0.456 0.328 0.216 0.000
#> ERR866156 1 0.7742 0.336 0.460 0.324 0.212 0.004
#> ERR866174 1 0.7764 0.334 0.456 0.324 0.216 0.004
#> ERR866157 1 0.7438 0.351 0.484 0.328 0.188 0.000
#> ERR866175 1 0.7453 0.350 0.484 0.324 0.192 0.000
#> ERR862983 1 0.0524 0.328 0.988 0.008 0.004 0.000
#> ERR866158 1 0.0524 0.328 0.988 0.008 0.004 0.000
#> ERR866176 1 0.0524 0.328 0.988 0.008 0.004 0.000
#> ERR862984 1 0.0524 0.328 0.988 0.008 0.004 0.000
#> ERR866159 1 0.0524 0.328 0.988 0.008 0.004 0.000
#> ERR866177 1 0.0524 0.328 0.988 0.008 0.004 0.000
#> ERR862985 1 0.7630 0.328 0.460 0.312 0.228 0.000
#> ERR866160 1 0.7806 0.327 0.452 0.316 0.228 0.004
#> ERR866178 1 0.7795 0.329 0.456 0.312 0.228 0.004
#> ERR862986 1 0.7640 0.329 0.456 0.316 0.228 0.000
#> ERR866161 1 0.7795 0.329 0.456 0.312 0.228 0.004
#> ERR866179 1 0.7795 0.329 0.456 0.312 0.228 0.004
#> ERR862987 2 0.0707 0.714 0.000 0.980 0.020 0.000
#> ERR866162 2 0.0707 0.714 0.000 0.980 0.020 0.000
#> ERR866180 2 0.0817 0.713 0.000 0.976 0.024 0.000
#> ERR862988 2 0.0707 0.714 0.000 0.980 0.020 0.000
#> ERR866163 2 0.0336 0.716 0.000 0.992 0.008 0.000
#> ERR866181 2 0.0469 0.716 0.000 0.988 0.012 0.000
#> ERR862989 1 0.6369 0.384 0.624 0.288 0.084 0.004
#> ERR866164 1 0.6369 0.388 0.624 0.288 0.084 0.004
#> ERR866182 1 0.6674 0.385 0.616 0.288 0.080 0.016
#> ERR862990 1 0.6674 0.385 0.616 0.288 0.080 0.016
#> ERR866165 1 0.6487 0.386 0.620 0.296 0.072 0.012
#> ERR866183 1 0.6169 0.380 0.632 0.296 0.068 0.004
#> ERR862991 2 0.0188 0.716 0.000 0.996 0.004 0.000
#> ERR866166 2 0.0188 0.716 0.000 0.996 0.004 0.000
#> ERR866184 2 0.1637 0.705 0.000 0.940 0.060 0.000
#> ERR862992 2 0.0336 0.716 0.000 0.992 0.008 0.000
#> ERR866167 2 0.0336 0.716 0.000 0.992 0.008 0.000
#> ERR866185 2 0.1557 0.706 0.000 0.944 0.056 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
#> ERR862939 5 0.0771 0.501 0.000 0.000 0.004 0.020 0.976
#> ERR862957 5 0.0771 0.501 0.000 0.000 0.004 0.020 0.976
#> ERR878007 5 0.0451 0.497 0.000 0.000 0.004 0.008 0.988
#> ERR862940 5 0.0451 0.497 0.000 0.000 0.004 0.008 0.988
#> ERR862958 5 0.0451 0.497 0.000 0.000 0.004 0.008 0.988
#> ERR878008 5 0.0671 0.501 0.000 0.000 0.004 0.016 0.980
#> ERR862941 2 0.0794 0.985 0.028 0.972 0.000 0.000 0.000
#> ERR862959 2 0.0794 0.985 0.028 0.972 0.000 0.000 0.000
#> ERR878009 2 0.0794 0.985 0.028 0.972 0.000 0.000 0.000
#> ERR862942 2 0.0794 0.985 0.028 0.972 0.000 0.000 0.000
#> ERR862960 2 0.0794 0.985 0.028 0.972 0.000 0.000 0.000
#> ERR878010 2 0.0794 0.985 0.028 0.972 0.000 0.000 0.000
#> ERR862943 3 0.4989 0.930 0.032 0.000 0.552 0.000 0.416
#> ERR862961 3 0.4989 0.930 0.032 0.000 0.552 0.000 0.416
#> ERR878011 3 0.4989 0.930 0.032 0.000 0.552 0.000 0.416
#> ERR862944 3 0.4989 0.930 0.032 0.000 0.552 0.000 0.416
#> ERR862962 3 0.4989 0.930 0.032 0.000 0.552 0.000 0.416
#> ERR878012 3 0.4989 0.930 0.032 0.000 0.552 0.000 0.416
#> ERR862945 4 0.0000 1.000 0.000 0.000 0.000 1.000 0.000
#> ERR862963 4 0.0000 1.000 0.000 0.000 0.000 1.000 0.000
#> ERR878013 4 0.0000 1.000 0.000 0.000 0.000 1.000 0.000
#> ERR862946 4 0.0000 1.000 0.000 0.000 0.000 1.000 0.000
#> ERR862964 4 0.0000 1.000 0.000 0.000 0.000 1.000 0.000
#> ERR878014 4 0.0000 1.000 0.000 0.000 0.000 1.000 0.000
#> ERR862947 5 0.5537 0.575 0.000 0.028 0.420 0.024 0.528
#> ERR862965 5 0.5537 0.575 0.000 0.028 0.420 0.024 0.528
#> ERR878015 5 0.5537 0.575 0.000 0.028 0.420 0.024 0.528
#> ERR862948 5 0.5537 0.575 0.000 0.028 0.420 0.024 0.528
#> ERR862966 5 0.5537 0.575 0.000 0.028 0.420 0.024 0.528
#> ERR878016 5 0.5537 0.575 0.000 0.028 0.420 0.024 0.528
#> ERR862949 2 0.0290 0.962 0.008 0.992 0.000 0.000 0.000
#> ERR862967 2 0.0290 0.962 0.008 0.992 0.000 0.000 0.000
#> ERR878017 2 0.0404 0.966 0.012 0.988 0.000 0.000 0.000
#> ERR862950 2 0.0290 0.962 0.008 0.992 0.000 0.000 0.000
#> ERR862968 2 0.0290 0.962 0.008 0.992 0.000 0.000 0.000
#> ERR878018 2 0.0290 0.962 0.008 0.992 0.000 0.000 0.000
#> ERR862951 1 0.0794 0.698 0.972 0.028 0.000 0.000 0.000
#> ERR862969 1 0.0794 0.698 0.972 0.028 0.000 0.000 0.000
#> ERR878019 1 0.0794 0.698 0.972 0.028 0.000 0.000 0.000
#> ERR862952 1 0.1121 0.693 0.956 0.044 0.000 0.000 0.000
#> ERR862970 1 0.0880 0.698 0.968 0.032 0.000 0.000 0.000
#> ERR878020 1 0.0794 0.698 0.972 0.028 0.000 0.000 0.000
#> ERR862953 1 0.0451 0.698 0.988 0.008 0.004 0.000 0.000
#> ERR862971 1 0.0510 0.698 0.984 0.016 0.000 0.000 0.000
#> ERR878021 1 0.0703 0.698 0.976 0.024 0.000 0.000 0.000
#> ERR862954 1 0.0566 0.699 0.984 0.012 0.004 0.000 0.000
#> ERR862972 1 0.0404 0.698 0.988 0.012 0.000 0.000 0.000
#> ERR878022 1 0.1121 0.694 0.956 0.044 0.000 0.000 0.000
#> ERR862955 1 0.2020 0.657 0.900 0.100 0.000 0.000 0.000
#> ERR862973 1 0.2020 0.656 0.900 0.100 0.000 0.000 0.000
#> ERR878023 1 0.1410 0.687 0.940 0.060 0.000 0.000 0.000
#> ERR862956 1 0.1851 0.667 0.912 0.088 0.000 0.000 0.000
#> ERR862974 1 0.1732 0.673 0.920 0.080 0.000 0.000 0.000
#> ERR878024 1 0.1410 0.687 0.940 0.060 0.000 0.000 0.000
#> ERR862975 3 0.5930 0.906 0.112 0.000 0.516 0.000 0.372
#> ERR866150 3 0.5930 0.906 0.112 0.000 0.516 0.000 0.372
#> ERR866168 3 0.5930 0.906 0.112 0.000 0.516 0.000 0.372
#> ERR862976 3 0.5930 0.906 0.112 0.000 0.516 0.000 0.372
#> ERR866151 3 0.5930 0.906 0.112 0.000 0.516 0.000 0.372
#> ERR866169 3 0.5930 0.906 0.112 0.000 0.516 0.000 0.372
#> ERR862977 1 0.2605 0.604 0.852 0.148 0.000 0.000 0.000
#> ERR866152 1 0.1121 0.693 0.956 0.044 0.000 0.000 0.000
#> ERR866170 1 0.1121 0.693 0.956 0.044 0.000 0.000 0.000
#> ERR862978 1 0.2605 0.604 0.852 0.148 0.000 0.000 0.000
#> ERR866153 1 0.1121 0.693 0.956 0.044 0.000 0.000 0.000
#> ERR866171 1 0.1121 0.693 0.956 0.044 0.000 0.000 0.000
#> ERR862979 2 0.0290 0.968 0.008 0.992 0.000 0.000 0.000
#> ERR866154 2 0.0794 0.985 0.028 0.972 0.000 0.000 0.000
#> ERR866172 2 0.0794 0.985 0.028 0.972 0.000 0.000 0.000
#> ERR862980 2 0.0794 0.985 0.028 0.972 0.000 0.000 0.000
#> ERR866155 2 0.0794 0.985 0.028 0.972 0.000 0.000 0.000
#> ERR866173 2 0.0794 0.985 0.028 0.972 0.000 0.000 0.000
#> ERR862981 1 0.5420 0.405 0.524 0.000 0.060 0.000 0.416
#> ERR866156 1 0.5420 0.405 0.524 0.000 0.060 0.000 0.416
#> ERR866174 1 0.5420 0.405 0.524 0.000 0.060 0.000 0.416
#> ERR866157 1 0.5420 0.405 0.524 0.000 0.060 0.000 0.416
#> ERR866175 1 0.5420 0.405 0.524 0.000 0.060 0.000 0.416
#> ERR862983 3 0.5048 0.939 0.040 0.000 0.580 0.000 0.380
#> ERR866158 3 0.5048 0.939 0.040 0.000 0.580 0.000 0.380
#> ERR866176 3 0.5048 0.939 0.040 0.000 0.580 0.000 0.380
#> ERR862984 3 0.5048 0.939 0.040 0.000 0.580 0.000 0.380
#> ERR866159 3 0.5048 0.939 0.040 0.000 0.580 0.000 0.380
#> ERR866177 3 0.5048 0.939 0.040 0.000 0.580 0.000 0.380
#> ERR862985 1 0.5420 0.405 0.524 0.000 0.060 0.000 0.416
#> ERR866160 1 0.5420 0.405 0.524 0.000 0.060 0.000 0.416
#> ERR866178 1 0.5420 0.405 0.524 0.000 0.060 0.000 0.416
#> ERR862986 1 0.5420 0.405 0.524 0.000 0.060 0.000 0.416
#> ERR866161 1 0.5420 0.405 0.524 0.000 0.060 0.000 0.416
#> ERR866179 1 0.5420 0.405 0.524 0.000 0.060 0.000 0.416
#> ERR862987 2 0.0794 0.985 0.028 0.972 0.000 0.000 0.000
#> ERR866162 2 0.0794 0.985 0.028 0.972 0.000 0.000 0.000
#> ERR866180 2 0.0794 0.985 0.028 0.972 0.000 0.000 0.000
#> ERR862988 2 0.0794 0.985 0.028 0.972 0.000 0.000 0.000
#> ERR866163 2 0.0794 0.985 0.028 0.972 0.000 0.000 0.000
#> ERR866181 2 0.0794 0.985 0.028 0.972 0.000 0.000 0.000
#> ERR862989 1 0.5414 0.411 0.528 0.000 0.060 0.000 0.412
#> ERR866164 1 0.5414 0.411 0.528 0.000 0.060 0.000 0.412
#> ERR866182 1 0.5414 0.411 0.528 0.000 0.060 0.000 0.412
#> ERR862990 1 0.5414 0.411 0.528 0.000 0.060 0.000 0.412
#> ERR866165 1 0.5414 0.411 0.528 0.000 0.060 0.000 0.412
#> ERR866183 1 0.5414 0.411 0.528 0.000 0.060 0.000 0.412
#> ERR862991 2 0.0794 0.985 0.028 0.972 0.000 0.000 0.000
#> ERR866166 2 0.1121 0.974 0.044 0.956 0.000 0.000 0.000
#> ERR866184 2 0.1671 0.940 0.076 0.924 0.000 0.000 0.000
#> ERR862992 2 0.0963 0.980 0.036 0.964 0.000 0.000 0.000
#> ERR866167 2 0.1121 0.974 0.044 0.956 0.000 0.000 0.000
#> ERR866185 2 0.1197 0.971 0.048 0.952 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
#> ERR862939 6 0.4804 -0.1468 0.000 0.000 0.456 0 0.052 0.492
#> ERR862957 6 0.4804 -0.1468 0.000 0.000 0.456 0 0.052 0.492
#> ERR878007 6 0.4804 -0.1468 0.000 0.000 0.456 0 0.052 0.492
#> ERR862940 6 0.4804 -0.1468 0.000 0.000 0.456 0 0.052 0.492
#> ERR862958 6 0.4804 -0.1468 0.000 0.000 0.456 0 0.052 0.492
#> ERR878008 6 0.4804 -0.1468 0.000 0.000 0.456 0 0.052 0.492
#> ERR862941 2 0.0000 0.9939 0.000 1.000 0.000 0 0.000 0.000
#> ERR862959 2 0.0000 0.9939 0.000 1.000 0.000 0 0.000 0.000
#> ERR878009 2 0.0363 0.9838 0.000 0.988 0.000 0 0.000 0.012
#> ERR862942 2 0.0000 0.9939 0.000 1.000 0.000 0 0.000 0.000
#> ERR862960 2 0.0000 0.9939 0.000 1.000 0.000 0 0.000 0.000
#> ERR878010 2 0.0146 0.9908 0.000 0.996 0.000 0 0.000 0.004
#> ERR862943 6 0.5337 -0.3814 0.440 0.000 0.080 0 0.008 0.472
#> ERR862961 6 0.5337 -0.3814 0.440 0.000 0.080 0 0.008 0.472
#> ERR878011 6 0.5337 -0.3814 0.440 0.000 0.080 0 0.008 0.472
#> ERR862944 6 0.5337 -0.3814 0.440 0.000 0.080 0 0.008 0.472
#> ERR862962 6 0.5337 -0.3814 0.440 0.000 0.080 0 0.008 0.472
#> ERR878012 6 0.5337 -0.3814 0.440 0.000 0.080 0 0.008 0.472
#> ERR862945 4 0.0000 1.0000 0.000 0.000 0.000 1 0.000 0.000
#> ERR862963 4 0.0000 1.0000 0.000 0.000 0.000 1 0.000 0.000
#> ERR878013 4 0.0000 1.0000 0.000 0.000 0.000 1 0.000 0.000
#> ERR862946 4 0.0000 1.0000 0.000 0.000 0.000 1 0.000 0.000
#> ERR862964 4 0.0000 1.0000 0.000 0.000 0.000 1 0.000 0.000
#> ERR878014 4 0.0000 1.0000 0.000 0.000 0.000 1 0.000 0.000
#> ERR862947 5 0.0000 1.0000 0.000 0.000 0.000 0 1.000 0.000
#> ERR862965 5 0.0000 1.0000 0.000 0.000 0.000 0 1.000 0.000
#> ERR878015 5 0.0000 1.0000 0.000 0.000 0.000 0 1.000 0.000
#> ERR862948 5 0.0000 1.0000 0.000 0.000 0.000 0 1.000 0.000
#> ERR862966 5 0.0000 1.0000 0.000 0.000 0.000 0 1.000 0.000
#> ERR878016 5 0.0000 1.0000 0.000 0.000 0.000 0 1.000 0.000
#> ERR862949 2 0.0000 0.9939 0.000 1.000 0.000 0 0.000 0.000
#> ERR862967 2 0.0000 0.9939 0.000 1.000 0.000 0 0.000 0.000
#> ERR878017 2 0.0000 0.9939 0.000 1.000 0.000 0 0.000 0.000
#> ERR862950 2 0.0000 0.9939 0.000 1.000 0.000 0 0.000 0.000
#> ERR862968 2 0.0000 0.9939 0.000 1.000 0.000 0 0.000 0.000
#> ERR878018 2 0.0000 0.9939 0.000 1.000 0.000 0 0.000 0.000
#> ERR862951 6 0.3869 -0.1041 0.500 0.000 0.000 0 0.000 0.500
#> ERR862969 1 0.3869 0.0324 0.500 0.000 0.000 0 0.000 0.500
#> ERR878019 6 0.3869 -0.1041 0.500 0.000 0.000 0 0.000 0.500
#> ERR862952 1 0.3869 0.0324 0.500 0.000 0.000 0 0.000 0.500
#> ERR862970 6 0.3869 -0.1041 0.500 0.000 0.000 0 0.000 0.500
#> ERR878020 1 0.3869 0.0324 0.500 0.000 0.000 0 0.000 0.500
#> ERR862953 1 0.3823 0.2106 0.564 0.000 0.000 0 0.000 0.436
#> ERR862971 1 0.3828 0.2055 0.560 0.000 0.000 0 0.000 0.440
#> ERR878021 1 0.3828 0.2055 0.560 0.000 0.000 0 0.000 0.440
#> ERR862954 1 0.3828 0.2055 0.560 0.000 0.000 0 0.000 0.440
#> ERR862972 1 0.3828 0.2055 0.560 0.000 0.000 0 0.000 0.440
#> ERR878022 1 0.3828 0.2055 0.560 0.000 0.000 0 0.000 0.440
#> ERR862955 6 0.3868 -0.0879 0.492 0.000 0.000 0 0.000 0.508
#> ERR862973 6 0.3868 -0.0879 0.492 0.000 0.000 0 0.000 0.508
#> ERR878023 6 0.3868 -0.0879 0.492 0.000 0.000 0 0.000 0.508
#> ERR862956 6 0.3868 -0.0879 0.492 0.000 0.000 0 0.000 0.508
#> ERR862974 6 0.3868 -0.0879 0.492 0.000 0.000 0 0.000 0.508
#> ERR878024 6 0.3868 -0.0879 0.492 0.000 0.000 0 0.000 0.508
#> ERR862975 3 0.5029 0.9273 0.376 0.000 0.544 0 0.000 0.080
#> ERR866150 3 0.5029 0.9273 0.376 0.000 0.544 0 0.000 0.080
#> ERR866168 3 0.5029 0.9273 0.376 0.000 0.544 0 0.000 0.080
#> ERR862976 3 0.5029 0.9273 0.376 0.000 0.544 0 0.000 0.080
#> ERR866151 3 0.5029 0.9273 0.376 0.000 0.544 0 0.000 0.080
#> ERR866169 3 0.5029 0.9273 0.376 0.000 0.544 0 0.000 0.080
#> ERR862977 6 0.3868 -0.0879 0.492 0.000 0.000 0 0.000 0.508
#> ERR866152 6 0.3868 -0.0879 0.492 0.000 0.000 0 0.000 0.508
#> ERR866170 6 0.3868 -0.0879 0.492 0.000 0.000 0 0.000 0.508
#> ERR862978 6 0.3868 -0.0879 0.492 0.000 0.000 0 0.000 0.508
#> ERR866153 6 0.3868 -0.0879 0.492 0.000 0.000 0 0.000 0.508
#> ERR866171 6 0.3868 -0.0879 0.492 0.000 0.000 0 0.000 0.508
#> ERR862979 2 0.0000 0.9939 0.000 1.000 0.000 0 0.000 0.000
#> ERR866154 2 0.0146 0.9908 0.000 0.996 0.000 0 0.000 0.004
#> ERR866172 2 0.0000 0.9939 0.000 1.000 0.000 0 0.000 0.000
#> ERR862980 2 0.0000 0.9939 0.000 1.000 0.000 0 0.000 0.000
#> ERR866155 2 0.0000 0.9939 0.000 1.000 0.000 0 0.000 0.000
#> ERR866173 2 0.0000 0.9939 0.000 1.000 0.000 0 0.000 0.000
#> ERR862981 1 0.0000 0.6911 1.000 0.000 0.000 0 0.000 0.000
#> ERR866156 1 0.0000 0.6911 1.000 0.000 0.000 0 0.000 0.000
#> ERR866174 1 0.0000 0.6911 1.000 0.000 0.000 0 0.000 0.000
#> ERR866157 1 0.0000 0.6911 1.000 0.000 0.000 0 0.000 0.000
#> ERR866175 1 0.0000 0.6911 1.000 0.000 0.000 0 0.000 0.000
#> ERR862983 3 0.3833 0.9294 0.444 0.000 0.556 0 0.000 0.000
#> ERR866158 3 0.3833 0.9294 0.444 0.000 0.556 0 0.000 0.000
#> ERR866176 3 0.3833 0.9294 0.444 0.000 0.556 0 0.000 0.000
#> ERR862984 3 0.3833 0.9294 0.444 0.000 0.556 0 0.000 0.000
#> ERR866159 3 0.3833 0.9294 0.444 0.000 0.556 0 0.000 0.000
#> ERR866177 3 0.3833 0.9294 0.444 0.000 0.556 0 0.000 0.000
#> ERR862985 1 0.0000 0.6911 1.000 0.000 0.000 0 0.000 0.000
#> ERR866160 1 0.0000 0.6911 1.000 0.000 0.000 0 0.000 0.000
#> ERR866178 1 0.0000 0.6911 1.000 0.000 0.000 0 0.000 0.000
#> ERR862986 1 0.0000 0.6911 1.000 0.000 0.000 0 0.000 0.000
#> ERR866161 1 0.0000 0.6911 1.000 0.000 0.000 0 0.000 0.000
#> ERR866179 1 0.0000 0.6911 1.000 0.000 0.000 0 0.000 0.000
#> ERR862987 2 0.0000 0.9939 0.000 1.000 0.000 0 0.000 0.000
#> ERR866162 2 0.0000 0.9939 0.000 1.000 0.000 0 0.000 0.000
#> ERR866180 2 0.0458 0.9795 0.000 0.984 0.000 0 0.000 0.016
#> ERR862988 2 0.0000 0.9939 0.000 1.000 0.000 0 0.000 0.000
#> ERR866163 2 0.0458 0.9795 0.000 0.984 0.000 0 0.000 0.016
#> ERR866181 2 0.0000 0.9939 0.000 1.000 0.000 0 0.000 0.000
#> ERR862989 1 0.0000 0.6911 1.000 0.000 0.000 0 0.000 0.000
#> ERR866164 1 0.0000 0.6911 1.000 0.000 0.000 0 0.000 0.000
#> ERR866182 1 0.0000 0.6911 1.000 0.000 0.000 0 0.000 0.000
#> ERR862990 1 0.0000 0.6911 1.000 0.000 0.000 0 0.000 0.000
#> ERR866165 1 0.0000 0.6911 1.000 0.000 0.000 0 0.000 0.000
#> ERR866183 1 0.0000 0.6911 1.000 0.000 0.000 0 0.000 0.000
#> ERR862991 2 0.0000 0.9939 0.000 1.000 0.000 0 0.000 0.000
#> ERR866166 2 0.0000 0.9939 0.000 1.000 0.000 0 0.000 0.000
#> ERR866184 2 0.1141 0.9362 0.000 0.948 0.000 0 0.000 0.052
#> ERR862992 2 0.0000 0.9939 0.000 1.000 0.000 0 0.000 0.000
#> ERR866167 2 0.0000 0.9939 0.000 1.000 0.000 0 0.000 0.000
#> ERR866185 2 0.0865 0.9564 0.000 0.964 0.000 0 0.000 0.036
Heatmaps for the consensus matrix. It visualizes the probability of two
samples to be in a same group.
consensus_heatmap(res, k = 2)

consensus_heatmap(res, k = 3)

consensus_heatmap(res, k = 4)

consensus_heatmap(res, k = 5)

consensus_heatmap(res, k = 6)

Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)

membership_heatmap(res, k = 3)

membership_heatmap(res, k = 4)

membership_heatmap(res, k = 5)

membership_heatmap(res, k = 6)

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)

get_signatures(res, k = 3)

get_signatures(res, k = 4)

get_signatures(res, k = 5)

get_signatures(res, k = 6)

Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)

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

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

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

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

Compare the overlap of signatures from different k:
compare_signatures(res)

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.
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:
which_row
: row indices corresponding to the input matrix.
fdr
: FDR for the differential test.
mean_x
: The mean value in group x.
scaled_mean_x
: The mean value in group x after rows are scaled.
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")

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

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

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

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

Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)

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"]
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 15818 rows and 107 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'SD' method.
#> Subgroups are detected by 'NMF' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 2.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)

The plots are:
- The first row: a plot of the ECDF (empirical cumulative distribution
function) curves of the consensus matrix for each
k
and the heatmap of
predicted classes for each k
.
- The second row: heatmaps of the consensus matrix for each
k
.
- The third row: heatmaps of the membership matrix for each
k
.
- The fouth row: heatmaps of the signatures for each
k
.
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:
- ECDF curves of the consensus matrix for each
k
;
- 1-PAC. The PAC
score
measures the proportion of the ambiguous subgrouping.
- Mean silhouette score.
- Concordance. The mean probability of fiting the consensus class ids in all
partitions.
- Area increased. Denote \(A_k\) as the area under the ECDF curve for current
k
, the area increased is defined as \(A_k - A_{k-1}\).
- Rand index. The percent of pairs of samples that are both in a same cluster
or both are not in a same cluster in the partition of k and k-1.
- Jaccard index. The ratio of pairs of samples are both in a same cluster in
the partition of k and k-1 and the pairs of samples are both in a same
cluster in the partition k or k-1.
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)

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.905 0.918 0.968 0.4671 0.538 0.538
#> 3 3 0.751 0.890 0.942 0.2869 0.611 0.405
#> 4 4 0.462 0.550 0.768 0.1515 0.756 0.472
#> 5 5 0.851 0.818 0.916 0.0738 0.835 0.550
#> 6 6 0.647 0.556 0.720 0.0728 0.847 0.511
suggest_best_k()
suggests the best \(k\) based on these statistics. The rules are as follows:
- All \(k\) with Jaccard index larger than 0.95 are removed because increasing
\(k\) does not provide enough extra information. If all \(k\) are removed, it is
marked as no subgroup is detected.
- For all \(k\) with 1-PAC score larger than 0.9, the maximal \(k\) is taken as
the best \(k\), and other \(k\) are marked as optional \(k\).
- If it does not fit the second rule. The \(k\) with the maximal vote of the
highest 1-PAC score, highest mean silhouette, and highest concordance is
taken as the best \(k\).
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
#> ERR862939 1 0.0000 0.9703 1.000 0.000
#> ERR862957 1 0.0000 0.9703 1.000 0.000
#> ERR878007 1 0.0000 0.9703 1.000 0.000
#> ERR862940 1 0.0000 0.9703 1.000 0.000
#> ERR862958 1 0.0000 0.9703 1.000 0.000
#> ERR878008 1 0.0000 0.9703 1.000 0.000
#> ERR862941 2 0.0000 0.9623 0.000 1.000
#> ERR862959 2 0.0000 0.9623 0.000 1.000
#> ERR878009 2 0.0000 0.9623 0.000 1.000
#> ERR862942 2 0.0000 0.9623 0.000 1.000
#> ERR862960 2 0.0000 0.9623 0.000 1.000
#> ERR878010 2 0.0000 0.9623 0.000 1.000
#> ERR862943 1 0.0000 0.9703 1.000 0.000
#> ERR862961 1 0.0000 0.9703 1.000 0.000
#> ERR878011 1 0.0000 0.9703 1.000 0.000
#> ERR862944 1 0.0000 0.9703 1.000 0.000
#> ERR862962 1 0.0000 0.9703 1.000 0.000
#> ERR878012 1 0.0000 0.9703 1.000 0.000
#> ERR862945 1 0.0000 0.9703 1.000 0.000
#> ERR862963 1 0.0000 0.9703 1.000 0.000
#> ERR878013 1 0.0000 0.9703 1.000 0.000
#> ERR862946 1 0.0000 0.9703 1.000 0.000
#> ERR862964 1 0.0000 0.9703 1.000 0.000
#> ERR878014 1 0.0000 0.9703 1.000 0.000
#> ERR862947 2 0.0000 0.9623 0.000 1.000
#> ERR862965 2 0.0000 0.9623 0.000 1.000
#> ERR878015 2 0.0000 0.9623 0.000 1.000
#> ERR862948 2 0.0000 0.9623 0.000 1.000
#> ERR862966 2 0.0000 0.9623 0.000 1.000
#> ERR878016 2 0.0000 0.9623 0.000 1.000
#> ERR862949 2 0.0000 0.9623 0.000 1.000
#> ERR862967 2 0.0000 0.9623 0.000 1.000
#> ERR878017 2 0.0000 0.9623 0.000 1.000
#> ERR862950 2 0.0000 0.9623 0.000 1.000
#> ERR862968 2 0.0000 0.9623 0.000 1.000
#> ERR878018 2 0.0000 0.9623 0.000 1.000
#> ERR862951 2 0.1843 0.9413 0.028 0.972
#> ERR862969 2 0.1414 0.9476 0.020 0.980
#> ERR878019 2 0.0000 0.9623 0.000 1.000
#> ERR862952 2 0.1414 0.9477 0.020 0.980
#> ERR862970 2 0.2948 0.9207 0.052 0.948
#> ERR878020 2 0.0000 0.9623 0.000 1.000
#> ERR862953 2 0.0000 0.9623 0.000 1.000
#> ERR862971 2 0.0000 0.9623 0.000 1.000
#> ERR878021 2 0.0000 0.9623 0.000 1.000
#> ERR862954 2 0.0000 0.9623 0.000 1.000
#> ERR862972 2 0.0000 0.9623 0.000 1.000
#> ERR878022 2 0.0000 0.9623 0.000 1.000
#> ERR862955 2 0.0000 0.9623 0.000 1.000
#> ERR862973 2 0.0000 0.9623 0.000 1.000
#> ERR878023 2 0.0000 0.9623 0.000 1.000
#> ERR862956 2 0.0000 0.9623 0.000 1.000
#> ERR862974 2 0.0000 0.9623 0.000 1.000
#> ERR878024 2 0.0000 0.9623 0.000 1.000
#> ERR862975 1 0.0376 0.9677 0.996 0.004
#> ERR866150 1 0.0000 0.9703 1.000 0.000
#> ERR866168 1 0.0000 0.9703 1.000 0.000
#> ERR862976 1 0.0000 0.9703 1.000 0.000
#> ERR866151 1 0.0376 0.9677 0.996 0.004
#> ERR866169 1 0.1184 0.9587 0.984 0.016
#> ERR862977 2 0.0000 0.9623 0.000 1.000
#> ERR866152 2 0.0000 0.9623 0.000 1.000
#> ERR866170 2 0.0000 0.9623 0.000 1.000
#> ERR862978 2 0.0000 0.9623 0.000 1.000
#> ERR866153 2 0.0000 0.9623 0.000 1.000
#> ERR866171 2 0.0000 0.9623 0.000 1.000
#> ERR862979 2 0.0000 0.9623 0.000 1.000
#> ERR866154 2 0.0000 0.9623 0.000 1.000
#> ERR866172 2 0.0000 0.9623 0.000 1.000
#> ERR862980 2 0.0000 0.9623 0.000 1.000
#> ERR866155 2 0.0000 0.9623 0.000 1.000
#> ERR866173 2 0.0000 0.9623 0.000 1.000
#> ERR862981 2 0.8016 0.6914 0.244 0.756
#> ERR866156 2 0.5842 0.8325 0.140 0.860
#> ERR866174 2 0.5737 0.8370 0.136 0.864
#> ERR866157 2 0.8207 0.6719 0.256 0.744
#> ERR866175 2 0.8555 0.6301 0.280 0.720
#> ERR862983 1 0.0000 0.9703 1.000 0.000
#> ERR866158 1 0.0000 0.9703 1.000 0.000
#> ERR866176 1 0.0000 0.9703 1.000 0.000
#> ERR862984 1 0.0000 0.9703 1.000 0.000
#> ERR866159 1 0.0000 0.9703 1.000 0.000
#> ERR866177 1 0.0000 0.9703 1.000 0.000
#> ERR862985 1 0.9850 0.1969 0.572 0.428
#> ERR866160 1 1.0000 -0.0724 0.500 0.500
#> ERR866178 2 1.0000 0.0501 0.496 0.504
#> ERR862986 2 0.9866 0.2713 0.432 0.568
#> ERR866161 2 0.7528 0.7337 0.216 0.784
#> ERR866179 2 0.5629 0.8415 0.132 0.868
#> ERR862987 2 0.0000 0.9623 0.000 1.000
#> ERR866162 2 0.0000 0.9623 0.000 1.000
#> ERR866180 2 0.0000 0.9623 0.000 1.000
#> ERR862988 2 0.0000 0.9623 0.000 1.000
#> ERR866163 2 0.0000 0.9623 0.000 1.000
#> ERR866181 2 0.0000 0.9623 0.000 1.000
#> ERR862989 1 0.0938 0.9618 0.988 0.012
#> ERR866164 1 0.0000 0.9703 1.000 0.000
#> ERR866182 1 0.1414 0.9552 0.980 0.020
#> ERR862990 1 0.0000 0.9703 1.000 0.000
#> ERR866165 1 0.1414 0.9552 0.980 0.020
#> ERR866183 1 0.1414 0.9552 0.980 0.020
#> ERR862991 2 0.0000 0.9623 0.000 1.000
#> ERR866166 2 0.0000 0.9623 0.000 1.000
#> ERR866184 2 0.0000 0.9623 0.000 1.000
#> ERR862992 2 0.0000 0.9623 0.000 1.000
#> ERR866167 2 0.0000 0.9623 0.000 1.000
#> ERR866185 2 0.0000 0.9623 0.000 1.000
show/hide code output
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> ERR862939 3 0.6026 0.653 0.376 0.000 0.624
#> ERR862957 3 0.6095 0.625 0.392 0.000 0.608
#> ERR878007 3 0.6309 0.359 0.500 0.000 0.500
#> ERR862940 3 0.4654 0.852 0.208 0.000 0.792
#> ERR862958 3 0.4654 0.852 0.208 0.000 0.792
#> ERR878008 3 0.5138 0.814 0.252 0.000 0.748
#> ERR862941 2 0.0000 0.978 0.000 1.000 0.000
#> ERR862959 2 0.0000 0.978 0.000 1.000 0.000
#> ERR878009 2 0.0237 0.974 0.004 0.996 0.000
#> ERR862942 2 0.0000 0.978 0.000 1.000 0.000
#> ERR862960 2 0.0000 0.978 0.000 1.000 0.000
#> ERR878010 2 0.0237 0.974 0.004 0.996 0.000
#> ERR862943 3 0.3752 0.858 0.144 0.000 0.856
#> ERR862961 3 0.4178 0.861 0.172 0.000 0.828
#> ERR878011 3 0.4452 0.859 0.192 0.000 0.808
#> ERR862944 3 0.4399 0.860 0.188 0.000 0.812
#> ERR862962 3 0.4399 0.860 0.188 0.000 0.812
#> ERR878012 3 0.4504 0.858 0.196 0.000 0.804
#> ERR862945 3 0.0000 0.809 0.000 0.000 1.000
#> ERR862963 3 0.0000 0.809 0.000 0.000 1.000
#> ERR878013 3 0.0000 0.809 0.000 0.000 1.000
#> ERR862946 3 0.0000 0.809 0.000 0.000 1.000
#> ERR862964 3 0.0000 0.809 0.000 0.000 1.000
#> ERR878014 3 0.0000 0.809 0.000 0.000 1.000
#> ERR862947 2 0.0000 0.978 0.000 1.000 0.000
#> ERR862965 2 0.0000 0.978 0.000 1.000 0.000
#> ERR878015 2 0.0000 0.978 0.000 1.000 0.000
#> ERR862948 2 0.0000 0.978 0.000 1.000 0.000
#> ERR862966 2 0.0000 0.978 0.000 1.000 0.000
#> ERR878016 2 0.0000 0.978 0.000 1.000 0.000
#> ERR862949 2 0.0000 0.978 0.000 1.000 0.000
#> ERR862967 2 0.0000 0.978 0.000 1.000 0.000
#> ERR878017 2 0.0000 0.978 0.000 1.000 0.000
#> ERR862950 2 0.0000 0.978 0.000 1.000 0.000
#> ERR862968 2 0.0000 0.978 0.000 1.000 0.000
#> ERR878018 2 0.0000 0.978 0.000 1.000 0.000
#> ERR862951 1 0.0000 0.926 1.000 0.000 0.000
#> ERR862969 1 0.0000 0.926 1.000 0.000 0.000
#> ERR878019 1 0.0000 0.926 1.000 0.000 0.000
#> ERR862952 1 0.0000 0.926 1.000 0.000 0.000
#> ERR862970 1 0.0000 0.926 1.000 0.000 0.000
#> ERR878020 1 0.0000 0.926 1.000 0.000 0.000
#> ERR862953 1 0.0000 0.926 1.000 0.000 0.000
#> ERR862971 1 0.0000 0.926 1.000 0.000 0.000
#> ERR878021 1 0.0000 0.926 1.000 0.000 0.000
#> ERR862954 1 0.0000 0.926 1.000 0.000 0.000
#> ERR862972 1 0.0000 0.926 1.000 0.000 0.000
#> ERR878022 1 0.0000 0.926 1.000 0.000 0.000
#> ERR862955 1 0.4887 0.717 0.772 0.228 0.000
#> ERR862973 1 0.4654 0.741 0.792 0.208 0.000
#> ERR878023 1 0.4555 0.749 0.800 0.200 0.000
#> ERR862956 1 0.4605 0.745 0.796 0.204 0.000
#> ERR862974 1 0.4702 0.737 0.788 0.212 0.000
#> ERR878024 1 0.4555 0.749 0.800 0.200 0.000
#> ERR862975 1 0.0000 0.926 1.000 0.000 0.000
#> ERR866150 1 0.0000 0.926 1.000 0.000 0.000
#> ERR866168 1 0.0000 0.926 1.000 0.000 0.000
#> ERR862976 1 0.0000 0.926 1.000 0.000 0.000
#> ERR866151 1 0.0000 0.926 1.000 0.000 0.000
#> ERR866169 1 0.0000 0.926 1.000 0.000 0.000
#> ERR862977 1 0.5363 0.651 0.724 0.276 0.000
#> ERR866152 1 0.4796 0.727 0.780 0.220 0.000
#> ERR866170 1 0.4750 0.732 0.784 0.216 0.000
#> ERR862978 1 0.5058 0.696 0.756 0.244 0.000
#> ERR866153 1 0.4399 0.760 0.812 0.188 0.000
#> ERR866171 1 0.4702 0.737 0.788 0.212 0.000
#> ERR862979 2 0.0000 0.978 0.000 1.000 0.000
#> ERR866154 2 0.2066 0.914 0.060 0.940 0.000
#> ERR866172 2 0.1860 0.924 0.052 0.948 0.000
#> ERR862980 2 0.1411 0.942 0.036 0.964 0.000
#> ERR866155 2 0.5810 0.449 0.336 0.664 0.000
#> ERR866173 2 0.3116 0.850 0.108 0.892 0.000
#> ERR862981 1 0.0000 0.926 1.000 0.000 0.000
#> ERR866156 1 0.0000 0.926 1.000 0.000 0.000
#> ERR866174 1 0.0000 0.926 1.000 0.000 0.000
#> ERR866157 1 0.0000 0.926 1.000 0.000 0.000
#> ERR866175 1 0.0000 0.926 1.000 0.000 0.000
#> ERR862983 1 0.0000 0.926 1.000 0.000 0.000
#> ERR866158 1 0.0000 0.926 1.000 0.000 0.000
#> ERR866176 1 0.0000 0.926 1.000 0.000 0.000
#> ERR862984 1 0.0000 0.926 1.000 0.000 0.000
#> ERR866159 1 0.0000 0.926 1.000 0.000 0.000
#> ERR866177 1 0.0000 0.926 1.000 0.000 0.000
#> ERR862985 1 0.0000 0.926 1.000 0.000 0.000
#> ERR866160 1 0.0000 0.926 1.000 0.000 0.000
#> ERR866178 1 0.0000 0.926 1.000 0.000 0.000
#> ERR862986 1 0.0000 0.926 1.000 0.000 0.000
#> ERR866161 1 0.0000 0.926 1.000 0.000 0.000
#> ERR866179 1 0.0000 0.926 1.000 0.000 0.000
#> ERR862987 2 0.0000 0.978 0.000 1.000 0.000
#> ERR866162 2 0.0000 0.978 0.000 1.000 0.000
#> ERR866180 2 0.0000 0.978 0.000 1.000 0.000
#> ERR862988 2 0.0000 0.978 0.000 1.000 0.000
#> ERR866163 2 0.0000 0.978 0.000 1.000 0.000
#> ERR866181 2 0.0000 0.978 0.000 1.000 0.000
#> ERR862989 1 0.0000 0.926 1.000 0.000 0.000
#> ERR866164 1 0.0000 0.926 1.000 0.000 0.000
#> ERR866182 1 0.0000 0.926 1.000 0.000 0.000
#> ERR862990 1 0.0000 0.926 1.000 0.000 0.000
#> ERR866165 1 0.0000 0.926 1.000 0.000 0.000
#> ERR866183 1 0.0000 0.926 1.000 0.000 0.000
#> ERR862991 2 0.0000 0.978 0.000 1.000 0.000
#> ERR866166 2 0.0000 0.978 0.000 1.000 0.000
#> ERR866184 2 0.0000 0.978 0.000 1.000 0.000
#> ERR862992 2 0.0000 0.978 0.000 1.000 0.000
#> ERR866167 2 0.0000 0.978 0.000 1.000 0.000
#> ERR866185 2 0.0000 0.978 0.000 1.000 0.000
show/hide code output
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> ERR862939 3 0.6492 -0.00369 0.220 0.000 0.636 0.144
#> ERR862957 3 0.6265 0.03594 0.220 0.000 0.656 0.124
#> ERR878007 3 0.5136 0.17012 0.224 0.000 0.728 0.048
#> ERR862940 3 0.7387 -0.22848 0.224 0.000 0.520 0.256
#> ERR862958 3 0.7463 -0.25431 0.224 0.000 0.504 0.272
#> ERR878008 3 0.7121 -0.15294 0.220 0.000 0.564 0.216
#> ERR862941 2 0.3356 0.75989 0.000 0.824 0.176 0.000
#> ERR862959 2 0.0921 0.87918 0.000 0.972 0.028 0.000
#> ERR878009 2 0.3157 0.77881 0.004 0.852 0.144 0.000
#> ERR862942 2 0.3907 0.67659 0.000 0.768 0.232 0.000
#> ERR862960 2 0.4477 0.52851 0.000 0.688 0.312 0.000
#> ERR878010 2 0.2281 0.83031 0.000 0.904 0.096 0.000
#> ERR862943 4 0.7354 0.40235 0.352 0.000 0.168 0.480
#> ERR862961 4 0.7419 0.31422 0.396 0.000 0.168 0.436
#> ERR878011 1 0.5727 0.38481 0.692 0.000 0.080 0.228
#> ERR862944 1 0.7341 -0.21888 0.476 0.000 0.164 0.360
#> ERR862962 1 0.7500 -0.37799 0.412 0.000 0.180 0.408
#> ERR878012 1 0.5328 0.44395 0.724 0.000 0.064 0.212
#> ERR862945 4 0.0000 0.83641 0.000 0.000 0.000 1.000
#> ERR862963 4 0.0000 0.83641 0.000 0.000 0.000 1.000
#> ERR878013 4 0.0000 0.83641 0.000 0.000 0.000 1.000
#> ERR862946 4 0.0000 0.83641 0.000 0.000 0.000 1.000
#> ERR862964 4 0.0000 0.83641 0.000 0.000 0.000 1.000
#> ERR878014 4 0.0000 0.83641 0.000 0.000 0.000 1.000
#> ERR862947 2 0.0000 0.88347 0.000 1.000 0.000 0.000
#> ERR862965 2 0.0000 0.88347 0.000 1.000 0.000 0.000
#> ERR878015 2 0.0000 0.88347 0.000 1.000 0.000 0.000
#> ERR862948 2 0.0000 0.88347 0.000 1.000 0.000 0.000
#> ERR862966 2 0.0000 0.88347 0.000 1.000 0.000 0.000
#> ERR878016 2 0.0000 0.88347 0.000 1.000 0.000 0.000
#> ERR862949 2 0.3074 0.80111 0.000 0.848 0.152 0.000
#> ERR862967 2 0.2973 0.80496 0.000 0.856 0.144 0.000
#> ERR878017 2 0.1637 0.86167 0.000 0.940 0.060 0.000
#> ERR862950 2 0.0188 0.88179 0.000 0.996 0.004 0.000
#> ERR862968 2 0.0336 0.88333 0.000 0.992 0.008 0.000
#> ERR878018 2 0.0000 0.88347 0.000 1.000 0.000 0.000
#> ERR862951 1 0.2589 0.72186 0.884 0.000 0.116 0.000
#> ERR862969 1 0.1389 0.73730 0.952 0.000 0.048 0.000
#> ERR878019 1 0.2345 0.72706 0.900 0.000 0.100 0.000
#> ERR862952 1 0.1022 0.73753 0.968 0.000 0.032 0.000
#> ERR862970 1 0.1022 0.73756 0.968 0.000 0.032 0.000
#> ERR878020 1 0.1389 0.73744 0.952 0.000 0.048 0.000
#> ERR862953 1 0.4522 0.53547 0.680 0.000 0.320 0.000
#> ERR862971 3 0.5168 -0.15506 0.492 0.004 0.504 0.000
#> ERR878021 1 0.4250 0.60039 0.724 0.000 0.276 0.000
#> ERR862954 1 0.4817 0.41612 0.612 0.000 0.388 0.000
#> ERR862972 1 0.5428 0.39685 0.600 0.020 0.380 0.000
#> ERR878022 1 0.4164 0.60930 0.736 0.000 0.264 0.000
#> ERR862955 3 0.4711 0.43217 0.236 0.024 0.740 0.000
#> ERR862973 3 0.4502 0.42557 0.236 0.016 0.748 0.000
#> ERR878023 3 0.5365 0.41823 0.264 0.044 0.692 0.000
#> ERR862956 3 0.6426 0.45603 0.256 0.116 0.628 0.000
#> ERR862974 3 0.5910 0.45853 0.244 0.084 0.672 0.000
#> ERR878024 3 0.6770 0.44458 0.268 0.140 0.592 0.000
#> ERR862975 1 0.3569 0.67179 0.804 0.000 0.196 0.000
#> ERR866150 1 0.3726 0.65892 0.788 0.000 0.212 0.000
#> ERR866168 1 0.3764 0.65455 0.784 0.000 0.216 0.000
#> ERR862976 1 0.3726 0.65892 0.788 0.000 0.212 0.000
#> ERR866151 1 0.3726 0.65892 0.788 0.000 0.212 0.000
#> ERR866169 1 0.3726 0.65892 0.788 0.000 0.212 0.000
#> ERR862977 3 0.7577 0.44252 0.216 0.316 0.468 0.000
#> ERR866152 3 0.7845 0.36983 0.292 0.304 0.404 0.000
#> ERR866170 3 0.7805 0.38564 0.280 0.300 0.420 0.000
#> ERR862978 3 0.7430 0.48020 0.228 0.260 0.512 0.000
#> ERR866153 3 0.7544 0.39610 0.292 0.224 0.484 0.000
#> ERR866171 3 0.7481 0.37628 0.308 0.204 0.488 0.000
#> ERR862979 3 0.5671 0.12698 0.028 0.400 0.572 0.000
#> ERR866154 3 0.5686 0.30598 0.032 0.376 0.592 0.000
#> ERR866172 3 0.5668 0.13558 0.024 0.444 0.532 0.000
#> ERR862980 3 0.5731 0.17256 0.028 0.428 0.544 0.000
#> ERR866155 3 0.6527 0.26648 0.076 0.416 0.508 0.000
#> ERR866173 2 0.5581 0.01158 0.020 0.532 0.448 0.000
#> ERR862981 1 0.1940 0.70969 0.924 0.000 0.076 0.000
#> ERR866156 1 0.0336 0.73260 0.992 0.000 0.008 0.000
#> ERR866174 1 0.0469 0.73188 0.988 0.000 0.012 0.000
#> ERR866157 1 0.3569 0.62880 0.804 0.000 0.196 0.000
#> ERR866175 1 0.3400 0.64069 0.820 0.000 0.180 0.000
#> ERR862983 1 0.2048 0.71551 0.928 0.000 0.008 0.064
#> ERR866158 1 0.1302 0.72743 0.956 0.000 0.000 0.044
#> ERR866176 1 0.1302 0.72743 0.956 0.000 0.000 0.044
#> ERR862984 1 0.1302 0.72752 0.956 0.000 0.000 0.044
#> ERR866159 1 0.1302 0.72743 0.956 0.000 0.000 0.044
#> ERR866177 1 0.1302 0.72743 0.956 0.000 0.000 0.044
#> ERR862985 3 0.4790 0.14017 0.380 0.000 0.620 0.000
#> ERR866160 1 0.3610 0.61077 0.800 0.000 0.200 0.000
#> ERR866178 1 0.3074 0.66663 0.848 0.000 0.152 0.000
#> ERR862986 1 0.4746 0.38493 0.632 0.000 0.368 0.000
#> ERR866161 1 0.3444 0.63914 0.816 0.000 0.184 0.000
#> ERR866179 1 0.3311 0.64871 0.828 0.000 0.172 0.000
#> ERR862987 2 0.0188 0.88367 0.000 0.996 0.004 0.000
#> ERR866162 2 0.0188 0.88367 0.000 0.996 0.004 0.000
#> ERR866180 2 0.0000 0.88347 0.000 1.000 0.000 0.000
#> ERR862988 2 0.1118 0.87356 0.000 0.964 0.036 0.000
#> ERR866163 2 0.2281 0.82539 0.000 0.904 0.096 0.000
#> ERR866181 2 0.2216 0.83206 0.000 0.908 0.092 0.000
#> ERR862989 1 0.4304 0.53043 0.716 0.000 0.284 0.000
#> ERR866164 1 0.3266 0.68624 0.832 0.000 0.168 0.000
#> ERR866182 1 0.3801 0.63252 0.780 0.000 0.220 0.000
#> ERR862990 1 0.4040 0.60120 0.752 0.000 0.248 0.000
#> ERR866165 1 0.4008 0.62352 0.756 0.000 0.244 0.000
#> ERR866183 1 0.3569 0.67805 0.804 0.000 0.196 0.000
#> ERR862991 3 0.4830 0.23196 0.000 0.392 0.608 0.000
#> ERR866166 3 0.4406 0.38724 0.000 0.300 0.700 0.000
#> ERR866184 3 0.4522 0.36994 0.000 0.320 0.680 0.000
#> ERR862992 3 0.4916 0.19080 0.000 0.424 0.576 0.000
#> ERR866167 3 0.4713 0.31629 0.000 0.360 0.640 0.000
#> ERR866185 3 0.4925 0.20741 0.000 0.428 0.572 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
#> ERR862939 3 0.0290 0.9514 0.008 0.000 0.992 0.000 0.000
#> ERR862957 3 0.0290 0.9514 0.008 0.000 0.992 0.000 0.000
#> ERR878007 3 0.0609 0.9406 0.020 0.000 0.980 0.000 0.000
#> ERR862940 3 0.0290 0.9514 0.008 0.000 0.992 0.000 0.000
#> ERR862958 3 0.0290 0.9514 0.008 0.000 0.992 0.000 0.000
#> ERR878008 3 0.0290 0.9514 0.008 0.000 0.992 0.000 0.000
#> ERR862941 5 0.0671 0.9594 0.000 0.004 0.016 0.000 0.980
#> ERR862959 5 0.0162 0.9690 0.000 0.004 0.000 0.000 0.996
#> ERR878009 2 0.4306 0.0961 0.000 0.508 0.000 0.000 0.492
#> ERR862942 5 0.3906 0.5708 0.000 0.292 0.004 0.000 0.704
#> ERR862960 5 0.2616 0.8458 0.000 0.100 0.020 0.000 0.880
#> ERR878010 2 0.4302 0.1491 0.000 0.520 0.000 0.000 0.480
#> ERR862943 1 0.3635 0.7142 0.748 0.000 0.248 0.004 0.000
#> ERR862961 1 0.3461 0.7365 0.772 0.000 0.224 0.004 0.000
#> ERR878011 1 0.1195 0.8634 0.960 0.000 0.028 0.012 0.000
#> ERR862944 1 0.1965 0.8398 0.904 0.000 0.096 0.000 0.000
#> ERR862962 1 0.2690 0.8044 0.844 0.000 0.156 0.000 0.000
#> ERR878012 1 0.0865 0.8642 0.972 0.000 0.024 0.004 0.000
#> ERR862945 4 0.0000 1.0000 0.000 0.000 0.000 1.000 0.000
#> ERR862963 4 0.0000 1.0000 0.000 0.000 0.000 1.000 0.000
#> ERR878013 4 0.0000 1.0000 0.000 0.000 0.000 1.000 0.000
#> ERR862946 4 0.0000 1.0000 0.000 0.000 0.000 1.000 0.000
#> ERR862964 4 0.0000 1.0000 0.000 0.000 0.000 1.000 0.000
#> ERR878014 4 0.0000 1.0000 0.000 0.000 0.000 1.000 0.000
#> ERR862947 5 0.0000 0.9669 0.000 0.000 0.000 0.000 1.000
#> ERR862965 5 0.0000 0.9669 0.000 0.000 0.000 0.000 1.000
#> ERR878015 5 0.0162 0.9690 0.000 0.004 0.000 0.000 0.996
#> ERR862948 5 0.0162 0.9690 0.000 0.004 0.000 0.000 0.996
#> ERR862966 5 0.0000 0.9669 0.000 0.000 0.000 0.000 1.000
#> ERR878016 5 0.0162 0.9690 0.000 0.004 0.000 0.000 0.996
#> ERR862949 5 0.0771 0.9564 0.000 0.004 0.020 0.000 0.976
#> ERR862967 5 0.0162 0.9690 0.000 0.004 0.000 0.000 0.996
#> ERR878017 5 0.1121 0.9263 0.000 0.044 0.000 0.000 0.956
#> ERR862950 5 0.0162 0.9663 0.000 0.000 0.004 0.000 0.996
#> ERR862968 5 0.0162 0.9690 0.000 0.004 0.000 0.000 0.996
#> ERR878018 5 0.0162 0.9690 0.000 0.004 0.000 0.000 0.996
#> ERR862951 1 0.0880 0.8635 0.968 0.032 0.000 0.000 0.000
#> ERR862969 1 0.0510 0.8660 0.984 0.016 0.000 0.000 0.000
#> ERR878019 1 0.0963 0.8622 0.964 0.036 0.000 0.000 0.000
#> ERR862952 1 0.0404 0.8666 0.988 0.012 0.000 0.000 0.000
#> ERR862970 1 0.0404 0.8663 0.988 0.012 0.000 0.000 0.000
#> ERR878020 1 0.0510 0.8660 0.984 0.016 0.000 0.000 0.000
#> ERR862953 2 0.0404 0.8646 0.012 0.988 0.000 0.000 0.000
#> ERR862971 2 0.0162 0.8677 0.004 0.996 0.000 0.000 0.000
#> ERR878021 2 0.0162 0.8677 0.004 0.996 0.000 0.000 0.000
#> ERR862954 2 0.0162 0.8677 0.004 0.996 0.000 0.000 0.000
#> ERR862972 2 0.0162 0.8677 0.004 0.996 0.000 0.000 0.000
#> ERR878022 2 0.0404 0.8649 0.012 0.988 0.000 0.000 0.000
#> ERR862955 2 0.0162 0.8680 0.000 0.996 0.000 0.000 0.004
#> ERR862973 2 0.0162 0.8677 0.000 0.996 0.004 0.000 0.000
#> ERR878023 2 0.0162 0.8677 0.004 0.996 0.000 0.000 0.000
#> ERR862956 2 0.0324 0.8683 0.004 0.992 0.000 0.000 0.004
#> ERR862974 2 0.0162 0.8680 0.000 0.996 0.000 0.000 0.004
#> ERR878024 2 0.0324 0.8683 0.004 0.992 0.000 0.000 0.004
#> ERR862975 1 0.1043 0.8604 0.960 0.040 0.000 0.000 0.000
#> ERR866150 1 0.1792 0.8366 0.916 0.084 0.000 0.000 0.000
#> ERR866168 1 0.1671 0.8433 0.924 0.076 0.000 0.000 0.000
#> ERR862976 1 0.1478 0.8508 0.936 0.064 0.000 0.000 0.000
#> ERR866151 1 0.1671 0.8435 0.924 0.076 0.000 0.000 0.000
#> ERR866169 1 0.1544 0.8468 0.932 0.068 0.000 0.000 0.000
#> ERR862977 2 0.0404 0.8665 0.000 0.988 0.000 0.000 0.012
#> ERR866152 2 0.0162 0.8677 0.004 0.996 0.000 0.000 0.000
#> ERR866170 2 0.0162 0.8677 0.004 0.996 0.000 0.000 0.000
#> ERR862978 2 0.0290 0.8674 0.000 0.992 0.000 0.000 0.008
#> ERR866153 2 0.0162 0.8677 0.004 0.996 0.000 0.000 0.000
#> ERR866171 2 0.0162 0.8677 0.004 0.996 0.000 0.000 0.000
#> ERR862979 2 0.5642 0.5342 0.000 0.636 0.184 0.000 0.180
#> ERR866154 2 0.1952 0.8316 0.000 0.912 0.004 0.000 0.084
#> ERR866172 2 0.2233 0.8160 0.000 0.892 0.004 0.000 0.104
#> ERR862980 2 0.1671 0.8397 0.000 0.924 0.000 0.000 0.076
#> ERR866155 2 0.1502 0.8503 0.000 0.940 0.004 0.000 0.056
#> ERR866173 2 0.2338 0.8093 0.000 0.884 0.004 0.000 0.112
#> ERR862981 1 0.1732 0.8430 0.920 0.000 0.080 0.000 0.000
#> ERR866156 1 0.0671 0.8664 0.980 0.004 0.016 0.000 0.000
#> ERR866174 1 0.0771 0.8658 0.976 0.004 0.020 0.000 0.000
#> ERR866157 1 0.3366 0.7260 0.768 0.000 0.232 0.000 0.000
#> ERR866175 1 0.3730 0.6514 0.712 0.000 0.288 0.000 0.000
#> ERR862983 1 0.0000 0.8661 1.000 0.000 0.000 0.000 0.000
#> ERR866158 1 0.0000 0.8661 1.000 0.000 0.000 0.000 0.000
#> ERR866176 1 0.0000 0.8661 1.000 0.000 0.000 0.000 0.000
#> ERR862984 1 0.0000 0.8661 1.000 0.000 0.000 0.000 0.000
#> ERR866159 1 0.0000 0.8661 1.000 0.000 0.000 0.000 0.000
#> ERR866177 1 0.0000 0.8661 1.000 0.000 0.000 0.000 0.000
#> ERR862985 3 0.3053 0.7361 0.164 0.008 0.828 0.000 0.000
#> ERR866160 1 0.4547 0.6573 0.704 0.044 0.252 0.000 0.000
#> ERR866178 1 0.4024 0.7181 0.752 0.028 0.220 0.000 0.000
#> ERR862986 1 0.4291 0.2586 0.536 0.000 0.464 0.000 0.000
#> ERR866161 1 0.3835 0.6711 0.732 0.008 0.260 0.000 0.000
#> ERR866179 1 0.3607 0.6937 0.752 0.004 0.244 0.000 0.000
#> ERR862987 5 0.0162 0.9690 0.000 0.004 0.000 0.000 0.996
#> ERR866162 5 0.0162 0.9690 0.000 0.004 0.000 0.000 0.996
#> ERR866180 5 0.0162 0.9690 0.000 0.004 0.000 0.000 0.996
#> ERR862988 5 0.0162 0.9690 0.000 0.004 0.000 0.000 0.996
#> ERR866163 5 0.0162 0.9690 0.000 0.004 0.000 0.000 0.996
#> ERR866181 5 0.0451 0.9642 0.000 0.008 0.004 0.000 0.988
#> ERR862989 1 0.5644 0.3898 0.576 0.096 0.328 0.000 0.000
#> ERR866164 1 0.4219 0.2319 0.584 0.416 0.000 0.000 0.000
#> ERR866182 2 0.4446 0.0984 0.476 0.520 0.004 0.000 0.000
#> ERR862990 2 0.4268 0.2192 0.444 0.556 0.000 0.000 0.000
#> ERR866165 2 0.4101 0.4009 0.372 0.628 0.000 0.000 0.000
#> ERR866183 2 0.4302 0.1064 0.480 0.520 0.000 0.000 0.000
#> ERR862991 2 0.1430 0.8501 0.000 0.944 0.004 0.000 0.052
#> ERR866166 2 0.0566 0.8663 0.000 0.984 0.004 0.000 0.012
#> ERR866184 2 0.0510 0.8653 0.000 0.984 0.000 0.000 0.016
#> ERR862992 2 0.1270 0.8507 0.000 0.948 0.000 0.000 0.052
#> ERR866167 2 0.1205 0.8564 0.000 0.956 0.004 0.000 0.040
#> ERR866185 2 0.0963 0.8588 0.000 0.964 0.000 0.000 0.036
show/hide code output
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> ERR862939 6 0.1327 0.95432 0.064 0.000 0.000 0.000 0.000 0.936
#> ERR862957 6 0.1327 0.95432 0.064 0.000 0.000 0.000 0.000 0.936
#> ERR878007 6 0.2308 0.90706 0.108 0.000 0.008 0.004 0.000 0.880
#> ERR862940 6 0.0146 0.93239 0.004 0.000 0.000 0.000 0.000 0.996
#> ERR862958 6 0.0146 0.93550 0.004 0.000 0.000 0.000 0.000 0.996
#> ERR878008 6 0.1075 0.95422 0.048 0.000 0.000 0.000 0.000 0.952
#> ERR862941 5 0.0146 0.86852 0.004 0.000 0.000 0.000 0.996 0.000
#> ERR862959 5 0.0146 0.86852 0.004 0.000 0.000 0.000 0.996 0.000
#> ERR878009 5 0.4535 0.62050 0.148 0.148 0.000 0.000 0.704 0.000
#> ERR862942 5 0.2988 0.78566 0.060 0.084 0.000 0.000 0.852 0.004
#> ERR862960 5 0.1296 0.85313 0.012 0.032 0.000 0.000 0.952 0.004
#> ERR878010 5 0.4218 0.66526 0.156 0.108 0.000 0.000 0.736 0.000
#> ERR862943 3 0.6161 0.25206 0.176 0.000 0.416 0.016 0.000 0.392
#> ERR862961 3 0.6134 0.32299 0.200 0.000 0.456 0.012 0.000 0.332
#> ERR878011 3 0.3865 0.57135 0.192 0.000 0.752 0.000 0.000 0.056
#> ERR862944 3 0.5640 0.41259 0.268 0.000 0.532 0.000 0.000 0.200
#> ERR862962 3 0.5885 0.35246 0.248 0.000 0.476 0.000 0.000 0.276
#> ERR878012 3 0.3710 0.54697 0.292 0.000 0.696 0.000 0.000 0.012
#> ERR862945 4 0.0000 1.00000 0.000 0.000 0.000 1.000 0.000 0.000
#> ERR862963 4 0.0000 1.00000 0.000 0.000 0.000 1.000 0.000 0.000
#> ERR878013 4 0.0000 1.00000 0.000 0.000 0.000 1.000 0.000 0.000
#> ERR862946 4 0.0000 1.00000 0.000 0.000 0.000 1.000 0.000 0.000
#> ERR862964 4 0.0000 1.00000 0.000 0.000 0.000 1.000 0.000 0.000
#> ERR878014 4 0.0000 1.00000 0.000 0.000 0.000 1.000 0.000 0.000
#> ERR862947 5 0.0146 0.86852 0.004 0.000 0.000 0.000 0.996 0.000
#> ERR862965 5 0.0146 0.86852 0.004 0.000 0.000 0.000 0.996 0.000
#> ERR878015 5 0.0000 0.86876 0.000 0.000 0.000 0.000 1.000 0.000
#> ERR862948 5 0.0000 0.86876 0.000 0.000 0.000 0.000 1.000 0.000
#> ERR862966 5 0.0000 0.86876 0.000 0.000 0.000 0.000 1.000 0.000
#> ERR878016 5 0.0000 0.86876 0.000 0.000 0.000 0.000 1.000 0.000
#> ERR862949 5 0.2706 0.78472 0.124 0.000 0.000 0.000 0.852 0.024
#> ERR862967 5 0.2214 0.81166 0.096 0.000 0.000 0.000 0.888 0.016
#> ERR878017 5 0.3494 0.65513 0.252 0.000 0.000 0.000 0.736 0.012
#> ERR862950 5 0.0291 0.86795 0.004 0.000 0.000 0.000 0.992 0.004
#> ERR862968 5 0.0146 0.86836 0.000 0.000 0.000 0.000 0.996 0.004
#> ERR878018 5 0.0713 0.86082 0.028 0.000 0.000 0.000 0.972 0.000
#> ERR862951 3 0.2320 0.51138 0.132 0.004 0.864 0.000 0.000 0.000
#> ERR862969 3 0.1075 0.57257 0.048 0.000 0.952 0.000 0.000 0.000
#> ERR878019 3 0.2311 0.52852 0.104 0.016 0.880 0.000 0.000 0.000
#> ERR862952 3 0.1411 0.58311 0.060 0.004 0.936 0.000 0.000 0.000
#> ERR862970 3 0.0865 0.59354 0.036 0.000 0.964 0.000 0.000 0.000
#> ERR878020 3 0.1141 0.58293 0.052 0.000 0.948 0.000 0.000 0.000
#> ERR862953 2 0.2930 0.75115 0.124 0.840 0.036 0.000 0.000 0.000
#> ERR862971 2 0.2740 0.75678 0.120 0.852 0.028 0.000 0.000 0.000
#> ERR878021 2 0.3236 0.72778 0.180 0.796 0.024 0.000 0.000 0.000
#> ERR862954 2 0.2667 0.75720 0.128 0.852 0.020 0.000 0.000 0.000
#> ERR862972 2 0.3101 0.73812 0.148 0.820 0.032 0.000 0.000 0.000
#> ERR878022 2 0.4405 0.62388 0.240 0.688 0.072 0.000 0.000 0.000
#> ERR862955 2 0.0260 0.78002 0.008 0.992 0.000 0.000 0.000 0.000
#> ERR862973 2 0.0260 0.78385 0.008 0.992 0.000 0.000 0.000 0.000
#> ERR878023 2 0.0713 0.78305 0.028 0.972 0.000 0.000 0.000 0.000
#> ERR862956 2 0.0547 0.77904 0.020 0.980 0.000 0.000 0.000 0.000
#> ERR862974 2 0.0547 0.77478 0.020 0.980 0.000 0.000 0.000 0.000
#> ERR878024 2 0.0547 0.78138 0.020 0.980 0.000 0.000 0.000 0.000
#> ERR862975 3 0.3381 0.57793 0.156 0.044 0.800 0.000 0.000 0.000
#> ERR866150 3 0.2451 0.56196 0.060 0.056 0.884 0.000 0.000 0.000
#> ERR866168 3 0.2201 0.57014 0.048 0.052 0.900 0.000 0.000 0.000
#> ERR862976 3 0.2685 0.56427 0.072 0.060 0.868 0.000 0.000 0.000
#> ERR866151 3 0.2571 0.55676 0.060 0.064 0.876 0.000 0.000 0.000
#> ERR866169 3 0.2066 0.56631 0.052 0.040 0.908 0.000 0.000 0.000
#> ERR862977 2 0.1333 0.78890 0.048 0.944 0.008 0.000 0.000 0.000
#> ERR866152 2 0.1644 0.78914 0.076 0.920 0.004 0.000 0.000 0.000
#> ERR866170 2 0.1644 0.78802 0.076 0.920 0.004 0.000 0.000 0.000
#> ERR862978 2 0.1757 0.78725 0.076 0.916 0.008 0.000 0.000 0.000
#> ERR866153 2 0.2070 0.78388 0.100 0.892 0.008 0.000 0.000 0.000
#> ERR866171 2 0.1908 0.78660 0.096 0.900 0.004 0.000 0.000 0.000
#> ERR862979 1 0.7141 -0.13894 0.340 0.076 0.000 0.000 0.268 0.316
#> ERR866154 1 0.7126 0.03487 0.440 0.160 0.024 0.000 0.316 0.060
#> ERR866172 1 0.6977 -0.00105 0.440 0.148 0.020 0.000 0.336 0.056
#> ERR862980 1 0.7341 0.09728 0.432 0.212 0.024 0.000 0.264 0.068
#> ERR866155 1 0.7640 0.15245 0.444 0.180 0.100 0.000 0.236 0.040
#> ERR866173 1 0.7559 0.11397 0.444 0.160 0.080 0.000 0.268 0.048
#> ERR862981 1 0.6361 -0.21482 0.440 0.064 0.392 0.000 0.000 0.104
#> ERR866156 3 0.5271 0.33295 0.424 0.048 0.504 0.000 0.000 0.024
#> ERR866174 3 0.5775 0.27242 0.428 0.056 0.464 0.000 0.000 0.052
#> ERR866157 1 0.6776 -0.10593 0.448 0.088 0.324 0.000 0.000 0.140
#> ERR866175 1 0.6776 -0.11196 0.444 0.080 0.324 0.000 0.000 0.152
#> ERR862983 3 0.3592 0.51539 0.344 0.000 0.656 0.000 0.000 0.000
#> ERR866158 3 0.3499 0.53670 0.320 0.000 0.680 0.000 0.000 0.000
#> ERR866176 3 0.3446 0.54457 0.308 0.000 0.692 0.000 0.000 0.000
#> ERR862984 3 0.3482 0.53955 0.316 0.000 0.684 0.000 0.000 0.000
#> ERR866159 3 0.3409 0.54909 0.300 0.000 0.700 0.000 0.000 0.000
#> ERR866177 3 0.3330 0.55627 0.284 0.000 0.716 0.000 0.000 0.000
#> ERR862985 1 0.7255 0.13839 0.428 0.228 0.140 0.000 0.000 0.204
#> ERR866160 1 0.6828 0.11336 0.416 0.304 0.224 0.000 0.000 0.056
#> ERR866178 1 0.6856 0.09245 0.416 0.280 0.248 0.000 0.000 0.056
#> ERR862986 1 0.7174 0.09498 0.452 0.196 0.204 0.000 0.000 0.148
#> ERR866161 1 0.7003 0.07827 0.428 0.236 0.256 0.000 0.000 0.080
#> ERR866179 1 0.6952 0.09521 0.428 0.256 0.244 0.000 0.000 0.072
#> ERR862987 5 0.4642 0.33239 0.052 0.356 0.000 0.000 0.592 0.000
#> ERR866162 2 0.4726 0.20974 0.048 0.528 0.000 0.000 0.424 0.000
#> ERR866180 2 0.4692 0.15785 0.044 0.512 0.000 0.000 0.444 0.000
#> ERR862988 5 0.4436 0.45567 0.048 0.312 0.000 0.000 0.640 0.000
#> ERR866163 2 0.4690 0.25584 0.048 0.552 0.000 0.000 0.400 0.000
#> ERR866181 2 0.4791 0.15754 0.052 0.512 0.000 0.000 0.436 0.000
#> ERR862989 3 0.5662 -0.03139 0.404 0.008 0.468 0.000 0.000 0.120
#> ERR866164 3 0.5124 -0.03548 0.440 0.028 0.500 0.000 0.000 0.032
#> ERR866182 3 0.5309 -0.07195 0.452 0.040 0.476 0.000 0.000 0.032
#> ERR862990 1 0.5512 0.02303 0.460 0.056 0.452 0.000 0.000 0.032
#> ERR866165 1 0.5451 0.03057 0.468 0.056 0.448 0.000 0.000 0.028
#> ERR866183 1 0.5415 0.01841 0.464 0.048 0.456 0.000 0.000 0.032
#> ERR862991 2 0.3612 0.69921 0.200 0.764 0.000 0.000 0.036 0.000
#> ERR866166 2 0.3323 0.68086 0.240 0.752 0.000 0.000 0.008 0.000
#> ERR866184 2 0.3161 0.70398 0.216 0.776 0.000 0.000 0.008 0.000
#> ERR862992 2 0.2412 0.76868 0.092 0.880 0.000 0.000 0.028 0.000
#> ERR866167 2 0.2946 0.73386 0.176 0.812 0.000 0.000 0.012 0.000
#> ERR866185 2 0.2912 0.73727 0.172 0.816 0.000 0.000 0.012 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)

consensus_heatmap(res, k = 3)

consensus_heatmap(res, k = 4)

consensus_heatmap(res, k = 5)

consensus_heatmap(res, k = 6)

Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)

membership_heatmap(res, k = 3)

membership_heatmap(res, k = 4)

membership_heatmap(res, k = 5)

membership_heatmap(res, k = 6)

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)

get_signatures(res, k = 3)

get_signatures(res, k = 4)

get_signatures(res, k = 5)

get_signatures(res, k = 6)

Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)

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

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

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

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

Compare the overlap of signatures from different k:
compare_signatures(res)

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.
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:
which_row
: row indices corresponding to the input matrix.
fdr
: FDR for the differential test.
mean_x
: The mean value in group x.
scaled_mean_x
: The mean value in group x after rows are scaled.
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")

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

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

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

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

Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)

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"]
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 15818 rows and 107 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)

The plots are:
- The first row: a plot of the ECDF (empirical cumulative distribution
function) curves of the consensus matrix for each
k
and the heatmap of
predicted classes for each k
.
- The second row: heatmaps of the consensus matrix for each
k
.
- The third row: heatmaps of the membership matrix for each
k
.
- The fouth row: heatmaps of the signatures for each
k
.
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:
- ECDF curves of the consensus matrix for each
k
;
- 1-PAC. The PAC
score
measures the proportion of the ambiguous subgrouping.
- Mean silhouette score.
- Concordance. The mean probability of fiting the consensus class ids in all
partitions.
- Area increased. Denote \(A_k\) as the area under the ECDF curve for current
k
, the area increased is defined as \(A_k - A_{k-1}\).
- Rand index. The percent of pairs of samples that are both in a same cluster
or both are not in a same cluster in the partition of k and k-1.
- Jaccard index. The ratio of pairs of samples are both in a same cluster in
the partition of k and k-1 and the pairs of samples are both in a same
cluster in the partition k or k-1.
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)

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.704 0.987 0.978 0.3222 0.649 0.649
#> 3 3 0.892 0.962 0.974 0.2116 0.981 0.971
#> 4 4 0.783 0.940 0.950 0.2317 0.919 0.871
#> 5 5 0.737 0.876 0.905 0.3499 0.762 0.566
#> 6 6 0.811 0.833 0.909 0.0665 0.965 0.892
suggest_best_k()
suggests the best \(k\) based on these statistics. The rules are as follows:
- All \(k\) with Jaccard index larger than 0.95 are removed because increasing
\(k\) does not provide enough extra information. If all \(k\) are removed, it is
marked as no subgroup is detected.
- For all \(k\) with 1-PAC score larger than 0.9, the maximal \(k\) is taken as
the best \(k\), and other \(k\) are marked as optional \(k\).
- If it does not fit the second rule. The \(k\) with the maximal vote of the
highest 1-PAC score, highest mean silhouette, and highest concordance is
taken as the best \(k\).
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
#> ERR862939 1 0.5408 0.963 0.876 0.124
#> ERR862957 1 0.5408 0.963 0.876 0.124
#> ERR878007 1 0.5408 0.963 0.876 0.124
#> ERR862940 1 0.5408 0.963 0.876 0.124
#> ERR862958 1 0.5408 0.963 0.876 0.124
#> ERR878008 1 0.5408 0.963 0.876 0.124
#> ERR862941 2 0.0000 0.999 0.000 1.000
#> ERR862959 2 0.0000 0.999 0.000 1.000
#> ERR878009 2 0.0000 0.999 0.000 1.000
#> ERR862942 2 0.0000 0.999 0.000 1.000
#> ERR862960 2 0.0000 0.999 0.000 1.000
#> ERR878010 2 0.0000 0.999 0.000 1.000
#> ERR862943 1 0.5408 0.963 0.876 0.124
#> ERR862961 1 0.5408 0.963 0.876 0.124
#> ERR878011 1 0.5408 0.963 0.876 0.124
#> ERR862944 1 0.5408 0.963 0.876 0.124
#> ERR862962 1 0.5408 0.963 0.876 0.124
#> ERR878012 1 0.5408 0.963 0.876 0.124
#> ERR862945 1 0.0000 0.899 1.000 0.000
#> ERR862963 1 0.0000 0.899 1.000 0.000
#> ERR878013 1 0.0000 0.899 1.000 0.000
#> ERR862946 1 0.0000 0.899 1.000 0.000
#> ERR862964 1 0.0000 0.899 1.000 0.000
#> ERR878014 1 0.0000 0.899 1.000 0.000
#> ERR862947 2 0.0000 0.999 0.000 1.000
#> ERR862965 2 0.0000 0.999 0.000 1.000
#> ERR878015 2 0.0000 0.999 0.000 1.000
#> ERR862948 2 0.0000 0.999 0.000 1.000
#> ERR862966 2 0.0000 0.999 0.000 1.000
#> ERR878016 2 0.0000 0.999 0.000 1.000
#> ERR862949 2 0.0000 0.999 0.000 1.000
#> ERR862967 2 0.0000 0.999 0.000 1.000
#> ERR878017 2 0.0000 0.999 0.000 1.000
#> ERR862950 2 0.0000 0.999 0.000 1.000
#> ERR862968 2 0.0000 0.999 0.000 1.000
#> ERR878018 2 0.0000 0.999 0.000 1.000
#> ERR862951 2 0.0000 0.999 0.000 1.000
#> ERR862969 2 0.0000 0.999 0.000 1.000
#> ERR878019 2 0.0000 0.999 0.000 1.000
#> ERR862952 2 0.0000 0.999 0.000 1.000
#> ERR862970 2 0.0000 0.999 0.000 1.000
#> ERR878020 2 0.0000 0.999 0.000 1.000
#> ERR862953 2 0.0000 0.999 0.000 1.000
#> ERR862971 2 0.0000 0.999 0.000 1.000
#> ERR878021 2 0.0000 0.999 0.000 1.000
#> ERR862954 2 0.0000 0.999 0.000 1.000
#> ERR862972 2 0.0000 0.999 0.000 1.000
#> ERR878022 2 0.0000 0.999 0.000 1.000
#> ERR862955 2 0.0000 0.999 0.000 1.000
#> ERR862973 2 0.0000 0.999 0.000 1.000
#> ERR878023 2 0.0000 0.999 0.000 1.000
#> ERR862956 2 0.0000 0.999 0.000 1.000
#> ERR862974 2 0.0000 0.999 0.000 1.000
#> ERR878024 2 0.0000 0.999 0.000 1.000
#> ERR862975 2 0.0376 0.997 0.004 0.996
#> ERR866150 2 0.0376 0.997 0.004 0.996
#> ERR866168 2 0.0376 0.997 0.004 0.996
#> ERR862976 2 0.0376 0.997 0.004 0.996
#> ERR866151 2 0.0376 0.997 0.004 0.996
#> ERR866169 2 0.0376 0.997 0.004 0.996
#> ERR862977 2 0.0000 0.999 0.000 1.000
#> ERR866152 2 0.0000 0.999 0.000 1.000
#> ERR866170 2 0.0000 0.999 0.000 1.000
#> ERR862978 2 0.0000 0.999 0.000 1.000
#> ERR866153 2 0.0000 0.999 0.000 1.000
#> ERR866171 2 0.0000 0.999 0.000 1.000
#> ERR862979 2 0.0000 0.999 0.000 1.000
#> ERR866154 2 0.0000 0.999 0.000 1.000
#> ERR866172 2 0.0000 0.999 0.000 1.000
#> ERR862980 2 0.0000 0.999 0.000 1.000
#> ERR866155 2 0.0000 0.999 0.000 1.000
#> ERR866173 2 0.0000 0.999 0.000 1.000
#> ERR862981 2 0.0376 0.997 0.004 0.996
#> ERR866156 2 0.0376 0.997 0.004 0.996
#> ERR866174 2 0.0376 0.997 0.004 0.996
#> ERR866157 2 0.0376 0.997 0.004 0.996
#> ERR866175 2 0.0376 0.997 0.004 0.996
#> ERR862983 1 0.5408 0.963 0.876 0.124
#> ERR866158 1 0.5408 0.963 0.876 0.124
#> ERR866176 1 0.5408 0.963 0.876 0.124
#> ERR862984 1 0.5408 0.963 0.876 0.124
#> ERR866159 1 0.5408 0.963 0.876 0.124
#> ERR866177 1 0.5408 0.963 0.876 0.124
#> ERR862985 2 0.0376 0.997 0.004 0.996
#> ERR866160 2 0.0376 0.997 0.004 0.996
#> ERR866178 2 0.0376 0.997 0.004 0.996
#> ERR862986 2 0.0376 0.997 0.004 0.996
#> ERR866161 2 0.0376 0.997 0.004 0.996
#> ERR866179 2 0.0376 0.997 0.004 0.996
#> ERR862987 2 0.0000 0.999 0.000 1.000
#> ERR866162 2 0.0000 0.999 0.000 1.000
#> ERR866180 2 0.0000 0.999 0.000 1.000
#> ERR862988 2 0.0000 0.999 0.000 1.000
#> ERR866163 2 0.0000 0.999 0.000 1.000
#> ERR866181 2 0.0000 0.999 0.000 1.000
#> ERR862989 2 0.0376 0.997 0.004 0.996
#> ERR866164 2 0.0376 0.997 0.004 0.996
#> ERR866182 2 0.0376 0.997 0.004 0.996
#> ERR862990 2 0.0376 0.997 0.004 0.996
#> ERR866165 2 0.0376 0.997 0.004 0.996
#> ERR866183 2 0.0376 0.997 0.004 0.996
#> ERR862991 2 0.0000 0.999 0.000 1.000
#> ERR866166 2 0.0000 0.999 0.000 1.000
#> ERR866184 2 0.0000 0.999 0.000 1.000
#> ERR862992 2 0.0000 0.999 0.000 1.000
#> ERR866167 2 0.0000 0.999 0.000 1.000
#> ERR866185 2 0.0000 0.999 0.000 1.000
show/hide code output
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> ERR862939 1 0.000 1.000 1.000 0.000 0
#> ERR862957 1 0.000 1.000 1.000 0.000 0
#> ERR878007 1 0.000 1.000 1.000 0.000 0
#> ERR862940 1 0.000 1.000 1.000 0.000 0
#> ERR862958 1 0.000 1.000 1.000 0.000 0
#> ERR878008 1 0.000 1.000 1.000 0.000 0
#> ERR862941 2 0.000 0.965 0.000 1.000 0
#> ERR862959 2 0.000 0.965 0.000 1.000 0
#> ERR878009 2 0.000 0.965 0.000 1.000 0
#> ERR862942 2 0.000 0.965 0.000 1.000 0
#> ERR862960 2 0.000 0.965 0.000 1.000 0
#> ERR878010 2 0.000 0.965 0.000 1.000 0
#> ERR862943 1 0.000 1.000 1.000 0.000 0
#> ERR862961 1 0.000 1.000 1.000 0.000 0
#> ERR878011 1 0.000 1.000 1.000 0.000 0
#> ERR862944 1 0.000 1.000 1.000 0.000 0
#> ERR862962 1 0.000 1.000 1.000 0.000 0
#> ERR878012 1 0.000 1.000 1.000 0.000 0
#> ERR862945 3 0.000 1.000 0.000 0.000 1
#> ERR862963 3 0.000 1.000 0.000 0.000 1
#> ERR878013 3 0.000 1.000 0.000 0.000 1
#> ERR862946 3 0.000 1.000 0.000 0.000 1
#> ERR862964 3 0.000 1.000 0.000 0.000 1
#> ERR878014 3 0.000 1.000 0.000 0.000 1
#> ERR862947 2 0.000 0.965 0.000 1.000 0
#> ERR862965 2 0.000 0.965 0.000 1.000 0
#> ERR878015 2 0.000 0.965 0.000 1.000 0
#> ERR862948 2 0.000 0.965 0.000 1.000 0
#> ERR862966 2 0.000 0.965 0.000 1.000 0
#> ERR878016 2 0.000 0.965 0.000 1.000 0
#> ERR862949 2 0.000 0.965 0.000 1.000 0
#> ERR862967 2 0.000 0.965 0.000 1.000 0
#> ERR878017 2 0.000 0.965 0.000 1.000 0
#> ERR862950 2 0.000 0.965 0.000 1.000 0
#> ERR862968 2 0.000 0.965 0.000 1.000 0
#> ERR878018 2 0.000 0.965 0.000 1.000 0
#> ERR862951 2 0.186 0.949 0.052 0.948 0
#> ERR862969 2 0.129 0.956 0.032 0.968 0
#> ERR878019 2 0.196 0.946 0.056 0.944 0
#> ERR862952 2 0.153 0.953 0.040 0.960 0
#> ERR862970 2 0.153 0.953 0.040 0.960 0
#> ERR878020 2 0.216 0.942 0.064 0.936 0
#> ERR862953 2 0.116 0.957 0.028 0.972 0
#> ERR862971 2 0.116 0.957 0.028 0.972 0
#> ERR878021 2 0.000 0.965 0.000 1.000 0
#> ERR862954 2 0.116 0.957 0.028 0.972 0
#> ERR862972 2 0.116 0.957 0.028 0.972 0
#> ERR878022 2 0.000 0.965 0.000 1.000 0
#> ERR862955 2 0.000 0.965 0.000 1.000 0
#> ERR862973 2 0.000 0.965 0.000 1.000 0
#> ERR878023 2 0.000 0.965 0.000 1.000 0
#> ERR862956 2 0.000 0.965 0.000 1.000 0
#> ERR862974 2 0.000 0.965 0.000 1.000 0
#> ERR878024 2 0.000 0.965 0.000 1.000 0
#> ERR862975 2 0.348 0.901 0.128 0.872 0
#> ERR866150 2 0.334 0.908 0.120 0.880 0
#> ERR866168 2 0.334 0.908 0.120 0.880 0
#> ERR862976 2 0.334 0.908 0.120 0.880 0
#> ERR866151 2 0.334 0.908 0.120 0.880 0
#> ERR866169 2 0.334 0.908 0.120 0.880 0
#> ERR862977 2 0.000 0.965 0.000 1.000 0
#> ERR866152 2 0.000 0.965 0.000 1.000 0
#> ERR866170 2 0.000 0.965 0.000 1.000 0
#> ERR862978 2 0.000 0.965 0.000 1.000 0
#> ERR866153 2 0.000 0.965 0.000 1.000 0
#> ERR866171 2 0.000 0.965 0.000 1.000 0
#> ERR862979 2 0.000 0.965 0.000 1.000 0
#> ERR866154 2 0.000 0.965 0.000 1.000 0
#> ERR866172 2 0.000 0.965 0.000 1.000 0
#> ERR862980 2 0.000 0.965 0.000 1.000 0
#> ERR866155 2 0.000 0.965 0.000 1.000 0
#> ERR866173 2 0.000 0.965 0.000 1.000 0
#> ERR862981 2 0.288 0.926 0.096 0.904 0
#> ERR866156 2 0.288 0.926 0.096 0.904 0
#> ERR866174 2 0.288 0.926 0.096 0.904 0
#> ERR866157 2 0.288 0.926 0.096 0.904 0
#> ERR866175 2 0.288 0.926 0.096 0.904 0
#> ERR862983 1 0.000 1.000 1.000 0.000 0
#> ERR866158 1 0.000 1.000 1.000 0.000 0
#> ERR866176 1 0.000 1.000 1.000 0.000 0
#> ERR862984 1 0.000 1.000 1.000 0.000 0
#> ERR866159 1 0.000 1.000 1.000 0.000 0
#> ERR866177 1 0.000 1.000 1.000 0.000 0
#> ERR862985 2 0.312 0.918 0.108 0.892 0
#> ERR866160 2 0.288 0.926 0.096 0.904 0
#> ERR866178 2 0.288 0.926 0.096 0.904 0
#> ERR862986 2 0.312 0.918 0.108 0.892 0
#> ERR866161 2 0.288 0.926 0.096 0.904 0
#> ERR866179 2 0.288 0.926 0.096 0.904 0
#> ERR862987 2 0.000 0.965 0.000 1.000 0
#> ERR866162 2 0.000 0.965 0.000 1.000 0
#> ERR866180 2 0.000 0.965 0.000 1.000 0
#> ERR862988 2 0.000 0.965 0.000 1.000 0
#> ERR866163 2 0.000 0.965 0.000 1.000 0
#> ERR866181 2 0.000 0.965 0.000 1.000 0
#> ERR862989 2 0.319 0.915 0.112 0.888 0
#> ERR866164 2 0.296 0.924 0.100 0.900 0
#> ERR866182 2 0.296 0.924 0.100 0.900 0
#> ERR862990 2 0.319 0.915 0.112 0.888 0
#> ERR866165 2 0.296 0.924 0.100 0.900 0
#> ERR866183 2 0.296 0.924 0.100 0.900 0
#> ERR862991 2 0.000 0.965 0.000 1.000 0
#> ERR866166 2 0.000 0.965 0.000 1.000 0
#> ERR866184 2 0.000 0.965 0.000 1.000 0
#> ERR862992 2 0.000 0.965 0.000 1.000 0
#> ERR866167 2 0.000 0.965 0.000 1.000 0
#> ERR866185 2 0.000 0.965 0.000 1.000 0
show/hide code output
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> ERR862939 3 0.0000 0.989 0.000 0.000 1.000 0
#> ERR862957 3 0.0000 0.989 0.000 0.000 1.000 0
#> ERR878007 3 0.0000 0.989 0.000 0.000 1.000 0
#> ERR862940 3 0.0000 0.989 0.000 0.000 1.000 0
#> ERR862958 3 0.0000 0.989 0.000 0.000 1.000 0
#> ERR878008 3 0.0000 0.989 0.000 0.000 1.000 0
#> ERR862941 2 0.0188 0.937 0.004 0.996 0.000 0
#> ERR862959 2 0.0188 0.937 0.004 0.996 0.000 0
#> ERR878009 2 0.0188 0.937 0.004 0.996 0.000 0
#> ERR862942 2 0.0336 0.937 0.008 0.992 0.000 0
#> ERR862960 2 0.0188 0.937 0.004 0.996 0.000 0
#> ERR878010 2 0.0188 0.937 0.004 0.996 0.000 0
#> ERR862943 3 0.0000 0.989 0.000 0.000 1.000 0
#> ERR862961 3 0.0000 0.989 0.000 0.000 1.000 0
#> ERR878011 3 0.0000 0.989 0.000 0.000 1.000 0
#> ERR862944 3 0.0000 0.989 0.000 0.000 1.000 0
#> ERR862962 3 0.0000 0.989 0.000 0.000 1.000 0
#> ERR878012 3 0.0000 0.989 0.000 0.000 1.000 0
#> ERR862945 4 0.0000 1.000 0.000 0.000 0.000 1
#> ERR862963 4 0.0000 1.000 0.000 0.000 0.000 1
#> ERR878013 4 0.0000 1.000 0.000 0.000 0.000 1
#> ERR862946 4 0.0000 1.000 0.000 0.000 0.000 1
#> ERR862964 4 0.0000 1.000 0.000 0.000 0.000 1
#> ERR878014 4 0.0000 1.000 0.000 0.000 0.000 1
#> ERR862947 1 0.2408 1.000 0.896 0.104 0.000 0
#> ERR862965 1 0.2408 1.000 0.896 0.104 0.000 0
#> ERR878015 1 0.2408 1.000 0.896 0.104 0.000 0
#> ERR862948 1 0.2408 1.000 0.896 0.104 0.000 0
#> ERR862966 1 0.2408 1.000 0.896 0.104 0.000 0
#> ERR878016 1 0.2408 1.000 0.896 0.104 0.000 0
#> ERR862949 2 0.0336 0.937 0.008 0.992 0.000 0
#> ERR862967 2 0.0336 0.937 0.008 0.992 0.000 0
#> ERR878017 2 0.0188 0.937 0.004 0.996 0.000 0
#> ERR862950 2 0.0188 0.937 0.004 0.996 0.000 0
#> ERR862968 2 0.0188 0.937 0.004 0.996 0.000 0
#> ERR878018 2 0.0188 0.937 0.004 0.996 0.000 0
#> ERR862951 2 0.2345 0.914 0.100 0.900 0.000 0
#> ERR862969 2 0.2011 0.920 0.080 0.920 0.000 0
#> ERR878019 2 0.2546 0.919 0.060 0.912 0.028 0
#> ERR862952 2 0.2149 0.918 0.088 0.912 0.000 0
#> ERR862970 2 0.2149 0.918 0.088 0.912 0.000 0
#> ERR878020 2 0.2965 0.912 0.072 0.892 0.036 0
#> ERR862953 2 0.1940 0.921 0.076 0.924 0.000 0
#> ERR862971 2 0.1867 0.922 0.072 0.928 0.000 0
#> ERR878021 2 0.0188 0.937 0.004 0.996 0.000 0
#> ERR862954 2 0.1940 0.921 0.076 0.924 0.000 0
#> ERR862972 2 0.1940 0.921 0.076 0.924 0.000 0
#> ERR878022 2 0.0000 0.937 0.000 1.000 0.000 0
#> ERR862955 2 0.0188 0.937 0.004 0.996 0.000 0
#> ERR862973 2 0.0188 0.937 0.004 0.996 0.000 0
#> ERR878023 2 0.0000 0.937 0.000 1.000 0.000 0
#> ERR862956 2 0.0336 0.937 0.008 0.992 0.000 0
#> ERR862974 2 0.0188 0.937 0.004 0.996 0.000 0
#> ERR878024 2 0.0188 0.937 0.004 0.996 0.000 0
#> ERR862975 2 0.4215 0.872 0.104 0.824 0.072 0
#> ERR866150 2 0.4083 0.879 0.100 0.832 0.068 0
#> ERR866168 2 0.4083 0.879 0.100 0.832 0.068 0
#> ERR862976 2 0.4083 0.879 0.100 0.832 0.068 0
#> ERR866151 2 0.4083 0.879 0.100 0.832 0.068 0
#> ERR866169 2 0.4083 0.879 0.100 0.832 0.068 0
#> ERR862977 2 0.0188 0.937 0.004 0.996 0.000 0
#> ERR866152 2 0.0188 0.937 0.004 0.996 0.000 0
#> ERR866170 2 0.0188 0.937 0.004 0.996 0.000 0
#> ERR862978 2 0.0188 0.937 0.004 0.996 0.000 0
#> ERR866153 2 0.0188 0.937 0.004 0.996 0.000 0
#> ERR866171 2 0.0336 0.937 0.008 0.992 0.000 0
#> ERR862979 2 0.0336 0.937 0.008 0.992 0.000 0
#> ERR866154 2 0.0000 0.937 0.000 1.000 0.000 0
#> ERR866172 2 0.0000 0.937 0.000 1.000 0.000 0
#> ERR862980 2 0.0188 0.937 0.004 0.996 0.000 0
#> ERR866155 2 0.0188 0.937 0.004 0.996 0.000 0
#> ERR866173 2 0.0188 0.937 0.004 0.996 0.000 0
#> ERR862981 2 0.3667 0.895 0.088 0.856 0.056 0
#> ERR866156 2 0.3667 0.895 0.088 0.856 0.056 0
#> ERR866174 2 0.3667 0.895 0.088 0.856 0.056 0
#> ERR866157 2 0.3667 0.895 0.088 0.856 0.056 0
#> ERR866175 2 0.3667 0.895 0.088 0.856 0.056 0
#> ERR862983 3 0.1022 0.974 0.032 0.000 0.968 0
#> ERR866158 3 0.0921 0.978 0.028 0.000 0.972 0
#> ERR866176 3 0.0921 0.978 0.028 0.000 0.972 0
#> ERR862984 3 0.0921 0.978 0.028 0.000 0.972 0
#> ERR866159 3 0.0921 0.978 0.028 0.000 0.972 0
#> ERR866177 3 0.0921 0.978 0.028 0.000 0.972 0
#> ERR862985 2 0.3873 0.889 0.096 0.844 0.060 0
#> ERR866160 2 0.3667 0.895 0.088 0.856 0.056 0
#> ERR866178 2 0.3667 0.895 0.088 0.856 0.056 0
#> ERR862986 2 0.3873 0.889 0.096 0.844 0.060 0
#> ERR866161 2 0.3667 0.895 0.088 0.856 0.056 0
#> ERR866179 2 0.3667 0.895 0.088 0.856 0.056 0
#> ERR862987 2 0.0336 0.935 0.008 0.992 0.000 0
#> ERR866162 2 0.0188 0.937 0.004 0.996 0.000 0
#> ERR866180 2 0.0188 0.937 0.004 0.996 0.000 0
#> ERR862988 2 0.0188 0.937 0.004 0.996 0.000 0
#> ERR866163 2 0.0188 0.937 0.004 0.996 0.000 0
#> ERR866181 2 0.0188 0.937 0.004 0.996 0.000 0
#> ERR862989 2 0.3959 0.885 0.092 0.840 0.068 0
#> ERR866164 2 0.3732 0.893 0.092 0.852 0.056 0
#> ERR866182 2 0.3732 0.893 0.092 0.852 0.056 0
#> ERR862990 2 0.3959 0.885 0.092 0.840 0.068 0
#> ERR866165 2 0.3732 0.893 0.092 0.852 0.056 0
#> ERR866183 2 0.3732 0.893 0.092 0.852 0.056 0
#> ERR862991 2 0.0188 0.937 0.004 0.996 0.000 0
#> ERR866166 2 0.0188 0.937 0.004 0.996 0.000 0
#> ERR866184 2 0.0188 0.937 0.004 0.996 0.000 0
#> ERR862992 2 0.0188 0.937 0.004 0.996 0.000 0
#> ERR866167 2 0.0188 0.937 0.004 0.996 0.000 0
#> ERR866185 2 0.0188 0.937 0.004 0.996 0.000 0
show/hide code output
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> ERR862939 3 0.0000 0.9572 0.000 0.000 1.000 0 0.000
#> ERR862957 3 0.0000 0.9572 0.000 0.000 1.000 0 0.000
#> ERR878007 3 0.0000 0.9572 0.000 0.000 1.000 0 0.000
#> ERR862940 3 0.0000 0.9572 0.000 0.000 1.000 0 0.000
#> ERR862958 3 0.0000 0.9572 0.000 0.000 1.000 0 0.000
#> ERR878008 3 0.0000 0.9572 0.000 0.000 1.000 0 0.000
#> ERR862941 2 0.0000 0.9231 0.000 1.000 0.000 0 0.000
#> ERR862959 2 0.0162 0.9202 0.004 0.996 0.000 0 0.000
#> ERR878009 2 0.0290 0.9206 0.008 0.992 0.000 0 0.000
#> ERR862942 2 0.0162 0.9224 0.004 0.996 0.000 0 0.000
#> ERR862960 2 0.0000 0.9231 0.000 1.000 0.000 0 0.000
#> ERR878010 2 0.0290 0.9206 0.008 0.992 0.000 0 0.000
#> ERR862943 3 0.0324 0.9565 0.004 0.000 0.992 0 0.004
#> ERR862961 3 0.0324 0.9565 0.004 0.000 0.992 0 0.004
#> ERR878011 3 0.0324 0.9565 0.004 0.000 0.992 0 0.004
#> ERR862944 3 0.0324 0.9565 0.004 0.000 0.992 0 0.004
#> ERR862962 3 0.0324 0.9565 0.004 0.000 0.992 0 0.004
#> ERR878012 3 0.0324 0.9565 0.004 0.000 0.992 0 0.004
#> ERR862945 4 0.0000 1.0000 0.000 0.000 0.000 1 0.000
#> ERR862963 4 0.0000 1.0000 0.000 0.000 0.000 1 0.000
#> ERR878013 4 0.0000 1.0000 0.000 0.000 0.000 1 0.000
#> ERR862946 4 0.0000 1.0000 0.000 0.000 0.000 1 0.000
#> ERR862964 4 0.0000 1.0000 0.000 0.000 0.000 1 0.000
#> ERR878014 4 0.0000 1.0000 0.000 0.000 0.000 1 0.000
#> ERR862947 5 0.0963 1.0000 0.000 0.036 0.000 0 0.964
#> ERR862965 5 0.0963 1.0000 0.000 0.036 0.000 0 0.964
#> ERR878015 5 0.0963 1.0000 0.000 0.036 0.000 0 0.964
#> ERR862948 5 0.0963 1.0000 0.000 0.036 0.000 0 0.964
#> ERR862966 5 0.0963 1.0000 0.000 0.036 0.000 0 0.964
#> ERR878016 5 0.0963 1.0000 0.000 0.036 0.000 0 0.964
#> ERR862949 2 0.0162 0.9224 0.004 0.996 0.000 0 0.000
#> ERR862967 2 0.0162 0.9224 0.004 0.996 0.000 0 0.000
#> ERR878017 2 0.0290 0.9206 0.008 0.992 0.000 0 0.000
#> ERR862950 2 0.0000 0.9231 0.000 1.000 0.000 0 0.000
#> ERR862968 2 0.0000 0.9231 0.000 1.000 0.000 0 0.000
#> ERR878018 2 0.0162 0.9224 0.004 0.996 0.000 0 0.000
#> ERR862951 1 0.3656 0.7951 0.784 0.196 0.000 0 0.020
#> ERR862969 1 0.4494 0.6070 0.608 0.380 0.000 0 0.012
#> ERR878019 2 0.4297 -0.2942 0.472 0.528 0.000 0 0.000
#> ERR862952 1 0.3724 0.6900 0.788 0.184 0.000 0 0.028
#> ERR862970 1 0.3612 0.6771 0.800 0.172 0.000 0 0.028
#> ERR878020 2 0.4306 -0.3648 0.492 0.508 0.000 0 0.000
#> ERR862953 2 0.4288 0.0961 0.384 0.612 0.000 0 0.004
#> ERR862971 2 0.4225 0.1812 0.364 0.632 0.000 0 0.004
#> ERR878021 2 0.1478 0.8698 0.064 0.936 0.000 0 0.000
#> ERR862954 2 0.4135 0.2752 0.340 0.656 0.000 0 0.004
#> ERR862972 2 0.4298 0.2173 0.352 0.640 0.000 0 0.008
#> ERR878022 2 0.1544 0.8652 0.068 0.932 0.000 0 0.000
#> ERR862955 2 0.0000 0.9231 0.000 1.000 0.000 0 0.000
#> ERR862973 2 0.0000 0.9231 0.000 1.000 0.000 0 0.000
#> ERR878023 2 0.0880 0.9026 0.032 0.968 0.000 0 0.000
#> ERR862956 2 0.0162 0.9223 0.004 0.996 0.000 0 0.000
#> ERR862974 2 0.0000 0.9231 0.000 1.000 0.000 0 0.000
#> ERR878024 2 0.0609 0.9124 0.020 0.980 0.000 0 0.000
#> ERR862975 1 0.3266 0.9271 0.796 0.200 0.004 0 0.000
#> ERR866150 1 0.3143 0.9332 0.796 0.204 0.000 0 0.000
#> ERR866168 1 0.3143 0.9332 0.796 0.204 0.000 0 0.000
#> ERR862976 1 0.3143 0.9332 0.796 0.204 0.000 0 0.000
#> ERR866151 1 0.3143 0.9332 0.796 0.204 0.000 0 0.000
#> ERR866169 1 0.3143 0.9332 0.796 0.204 0.000 0 0.000
#> ERR862977 2 0.0000 0.9231 0.000 1.000 0.000 0 0.000
#> ERR866152 2 0.0162 0.9225 0.004 0.996 0.000 0 0.000
#> ERR866170 2 0.0162 0.9225 0.004 0.996 0.000 0 0.000
#> ERR862978 2 0.0162 0.9225 0.004 0.996 0.000 0 0.000
#> ERR866153 2 0.0162 0.9225 0.004 0.996 0.000 0 0.000
#> ERR866171 2 0.0290 0.9209 0.008 0.992 0.000 0 0.000
#> ERR862979 2 0.0162 0.9221 0.004 0.996 0.000 0 0.000
#> ERR866154 2 0.0963 0.8991 0.036 0.964 0.000 0 0.000
#> ERR866172 2 0.0880 0.9027 0.032 0.968 0.000 0 0.000
#> ERR862980 2 0.0000 0.9231 0.000 1.000 0.000 0 0.000
#> ERR866155 2 0.1043 0.8959 0.040 0.960 0.000 0 0.000
#> ERR866173 2 0.1043 0.8959 0.040 0.960 0.000 0 0.000
#> ERR862981 1 0.3424 0.9393 0.760 0.240 0.000 0 0.000
#> ERR866156 1 0.3424 0.9393 0.760 0.240 0.000 0 0.000
#> ERR866174 1 0.3424 0.9393 0.760 0.240 0.000 0 0.000
#> ERR866157 1 0.3424 0.9393 0.760 0.240 0.000 0 0.000
#> ERR866175 1 0.3424 0.9393 0.760 0.240 0.000 0 0.000
#> ERR862983 3 0.2020 0.9102 0.100 0.000 0.900 0 0.000
#> ERR866158 3 0.1908 0.9174 0.092 0.000 0.908 0 0.000
#> ERR866176 3 0.1908 0.9174 0.092 0.000 0.908 0 0.000
#> ERR862984 3 0.1908 0.9174 0.092 0.000 0.908 0 0.000
#> ERR866159 3 0.1908 0.9174 0.092 0.000 0.908 0 0.000
#> ERR866177 3 0.1908 0.9174 0.092 0.000 0.908 0 0.000
#> ERR862985 1 0.3430 0.9381 0.776 0.220 0.000 0 0.004
#> ERR866160 1 0.3424 0.9393 0.760 0.240 0.000 0 0.000
#> ERR866178 1 0.3424 0.9393 0.760 0.240 0.000 0 0.000
#> ERR862986 1 0.3430 0.9381 0.776 0.220 0.000 0 0.004
#> ERR866161 1 0.3424 0.9393 0.760 0.240 0.000 0 0.000
#> ERR866179 1 0.3424 0.9393 0.760 0.240 0.000 0 0.000
#> ERR862987 2 0.0162 0.9201 0.000 0.996 0.000 0 0.004
#> ERR866162 2 0.0000 0.9231 0.000 1.000 0.000 0 0.000
#> ERR866180 2 0.0000 0.9231 0.000 1.000 0.000 0 0.000
#> ERR862988 2 0.0000 0.9231 0.000 1.000 0.000 0 0.000
#> ERR866163 2 0.0000 0.9231 0.000 1.000 0.000 0 0.000
#> ERR866181 2 0.0000 0.9231 0.000 1.000 0.000 0 0.000
#> ERR862989 1 0.3210 0.9376 0.788 0.212 0.000 0 0.000
#> ERR866164 1 0.3366 0.9407 0.768 0.232 0.000 0 0.000
#> ERR866182 1 0.3366 0.9407 0.768 0.232 0.000 0 0.000
#> ERR862990 1 0.3210 0.9376 0.788 0.212 0.000 0 0.000
#> ERR866165 1 0.3366 0.9407 0.768 0.232 0.000 0 0.000
#> ERR866183 1 0.3366 0.9407 0.768 0.232 0.000 0 0.000
#> ERR862991 2 0.0000 0.9231 0.000 1.000 0.000 0 0.000
#> ERR866166 2 0.0000 0.9231 0.000 1.000 0.000 0 0.000
#> ERR866184 2 0.0000 0.9231 0.000 1.000 0.000 0 0.000
#> ERR862992 2 0.0000 0.9231 0.000 1.000 0.000 0 0.000
#> ERR866167 2 0.0000 0.9231 0.000 1.000 0.000 0 0.000
#> ERR866185 2 0.0000 0.9231 0.000 1.000 0.000 0 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
#> ERR862939 3 0.3371 0.76042 0.000 0.000 0.708 0 0.000 0.292
#> ERR862957 3 0.3371 0.76042 0.000 0.000 0.708 0 0.000 0.292
#> ERR878007 3 0.3371 0.76042 0.000 0.000 0.708 0 0.000 0.292
#> ERR862940 3 0.3371 0.76042 0.000 0.000 0.708 0 0.000 0.292
#> ERR862958 3 0.3371 0.76042 0.000 0.000 0.708 0 0.000 0.292
#> ERR878008 3 0.3371 0.76042 0.000 0.000 0.708 0 0.000 0.292
#> ERR862941 2 0.0000 0.94167 0.000 1.000 0.000 0 0.000 0.000
#> ERR862959 2 0.0146 0.94083 0.000 0.996 0.000 0 0.000 0.004
#> ERR878009 2 0.0260 0.94029 0.008 0.992 0.000 0 0.000 0.000
#> ERR862942 2 0.0146 0.94166 0.004 0.996 0.000 0 0.000 0.000
#> ERR862960 2 0.0000 0.94167 0.000 1.000 0.000 0 0.000 0.000
#> ERR878010 2 0.0260 0.94029 0.008 0.992 0.000 0 0.000 0.000
#> ERR862943 3 0.0777 0.84497 0.004 0.000 0.972 0 0.000 0.024
#> ERR862961 3 0.0603 0.84696 0.004 0.000 0.980 0 0.000 0.016
#> ERR878011 3 0.0603 0.84696 0.004 0.000 0.980 0 0.000 0.016
#> ERR862944 3 0.0603 0.84696 0.004 0.000 0.980 0 0.000 0.016
#> ERR862962 3 0.0603 0.84696 0.004 0.000 0.980 0 0.000 0.016
#> ERR878012 3 0.0603 0.84696 0.004 0.000 0.980 0 0.000 0.016
#> ERR862945 4 0.0000 1.00000 0.000 0.000 0.000 1 0.000 0.000
#> ERR862963 4 0.0000 1.00000 0.000 0.000 0.000 1 0.000 0.000
#> ERR878013 4 0.0000 1.00000 0.000 0.000 0.000 1 0.000 0.000
#> ERR862946 4 0.0000 1.00000 0.000 0.000 0.000 1 0.000 0.000
#> ERR862964 4 0.0000 1.00000 0.000 0.000 0.000 1 0.000 0.000
#> ERR878014 4 0.0000 1.00000 0.000 0.000 0.000 1 0.000 0.000
#> ERR862947 5 0.0260 1.00000 0.000 0.008 0.000 0 0.992 0.000
#> ERR862965 5 0.0260 1.00000 0.000 0.008 0.000 0 0.992 0.000
#> ERR878015 5 0.0260 1.00000 0.000 0.008 0.000 0 0.992 0.000
#> ERR862948 5 0.0260 1.00000 0.000 0.008 0.000 0 0.992 0.000
#> ERR862966 5 0.0260 1.00000 0.000 0.008 0.000 0 0.992 0.000
#> ERR878016 5 0.0260 1.00000 0.000 0.008 0.000 0 0.992 0.000
#> ERR862949 2 0.0146 0.94166 0.004 0.996 0.000 0 0.000 0.000
#> ERR862967 2 0.0146 0.94166 0.004 0.996 0.000 0 0.000 0.000
#> ERR878017 2 0.0260 0.94029 0.008 0.992 0.000 0 0.000 0.000
#> ERR862950 2 0.0000 0.94167 0.000 1.000 0.000 0 0.000 0.000
#> ERR862968 2 0.0000 0.94167 0.000 1.000 0.000 0 0.000 0.000
#> ERR878018 2 0.0146 0.94159 0.004 0.996 0.000 0 0.000 0.000
#> ERR862951 1 0.4411 -0.38704 0.612 0.028 0.000 0 0.004 0.356
#> ERR862969 1 0.5046 0.11537 0.620 0.256 0.000 0 0.000 0.124
#> ERR878019 1 0.3982 0.22556 0.536 0.460 0.000 0 0.000 0.004
#> ERR862952 6 0.4633 0.91835 0.392 0.036 0.000 0 0.004 0.568
#> ERR862970 6 0.4141 0.91753 0.388 0.016 0.000 0 0.000 0.596
#> ERR878020 1 0.3930 0.27823 0.576 0.420 0.000 0 0.000 0.004
#> ERR862953 2 0.4076 -0.00339 0.452 0.540 0.000 0 0.000 0.008
#> ERR862971 2 0.4032 0.12686 0.420 0.572 0.000 0 0.000 0.008
#> ERR878021 2 0.1765 0.86203 0.096 0.904 0.000 0 0.000 0.000
#> ERR862954 2 0.3915 0.17832 0.412 0.584 0.000 0 0.000 0.004
#> ERR862972 2 0.4063 0.13992 0.420 0.572 0.000 0 0.004 0.004
#> ERR878022 2 0.1610 0.87414 0.084 0.916 0.000 0 0.000 0.000
#> ERR862955 2 0.0146 0.94135 0.004 0.996 0.000 0 0.000 0.000
#> ERR862973 2 0.0260 0.93986 0.008 0.992 0.000 0 0.000 0.000
#> ERR878023 2 0.0790 0.92388 0.032 0.968 0.000 0 0.000 0.000
#> ERR862956 2 0.0146 0.94177 0.004 0.996 0.000 0 0.000 0.000
#> ERR862974 2 0.0000 0.94167 0.000 1.000 0.000 0 0.000 0.000
#> ERR878024 2 0.0547 0.93296 0.020 0.980 0.000 0 0.000 0.000
#> ERR862975 1 0.1728 0.79247 0.924 0.064 0.004 0 0.000 0.008
#> ERR866150 1 0.1588 0.81240 0.924 0.072 0.000 0 0.000 0.004
#> ERR866168 1 0.1588 0.81240 0.924 0.072 0.000 0 0.000 0.004
#> ERR862976 1 0.1588 0.81240 0.924 0.072 0.000 0 0.000 0.004
#> ERR866151 1 0.1588 0.81240 0.924 0.072 0.000 0 0.000 0.004
#> ERR866169 1 0.1588 0.81240 0.924 0.072 0.000 0 0.000 0.004
#> ERR862977 2 0.0146 0.94054 0.004 0.996 0.000 0 0.000 0.000
#> ERR866152 2 0.0260 0.94074 0.008 0.992 0.000 0 0.000 0.000
#> ERR866170 2 0.0260 0.94074 0.008 0.992 0.000 0 0.000 0.000
#> ERR862978 2 0.0260 0.94074 0.008 0.992 0.000 0 0.000 0.000
#> ERR866153 2 0.0260 0.94069 0.008 0.992 0.000 0 0.000 0.000
#> ERR866171 2 0.0363 0.93871 0.012 0.988 0.000 0 0.000 0.000
#> ERR862979 2 0.0146 0.94177 0.004 0.996 0.000 0 0.000 0.000
#> ERR866154 2 0.0937 0.91739 0.040 0.960 0.000 0 0.000 0.000
#> ERR866172 2 0.0937 0.91784 0.040 0.960 0.000 0 0.000 0.000
#> ERR862980 2 0.0146 0.94155 0.004 0.996 0.000 0 0.000 0.000
#> ERR866155 2 0.1267 0.90042 0.060 0.940 0.000 0 0.000 0.000
#> ERR866173 2 0.1141 0.90750 0.052 0.948 0.000 0 0.000 0.000
#> ERR862981 1 0.2234 0.82916 0.872 0.124 0.000 0 0.000 0.004
#> ERR866156 1 0.2191 0.83423 0.876 0.120 0.000 0 0.000 0.004
#> ERR866174 1 0.2191 0.83423 0.876 0.120 0.000 0 0.000 0.004
#> ERR866157 1 0.2191 0.83423 0.876 0.120 0.000 0 0.000 0.004
#> ERR866175 1 0.2191 0.83423 0.876 0.120 0.000 0 0.000 0.004
#> ERR862983 3 0.2218 0.81272 0.104 0.000 0.884 0 0.000 0.012
#> ERR866158 3 0.2121 0.81957 0.096 0.000 0.892 0 0.000 0.012
#> ERR866176 3 0.2121 0.81957 0.096 0.000 0.892 0 0.000 0.012
#> ERR862984 3 0.2121 0.81957 0.096 0.000 0.892 0 0.000 0.012
#> ERR866159 3 0.2121 0.81957 0.096 0.000 0.892 0 0.000 0.012
#> ERR866177 3 0.2121 0.81957 0.096 0.000 0.892 0 0.000 0.012
#> ERR862985 1 0.2214 0.82352 0.892 0.092 0.000 0 0.004 0.012
#> ERR866160 1 0.2191 0.83423 0.876 0.120 0.000 0 0.000 0.004
#> ERR866178 1 0.2191 0.83423 0.876 0.120 0.000 0 0.000 0.004
#> ERR862986 1 0.2214 0.82352 0.892 0.092 0.000 0 0.004 0.012
#> ERR866161 1 0.2191 0.83423 0.876 0.120 0.000 0 0.000 0.004
#> ERR866179 1 0.2191 0.83423 0.876 0.120 0.000 0 0.000 0.004
#> ERR862987 2 0.0146 0.94099 0.000 0.996 0.000 0 0.004 0.000
#> ERR866162 2 0.0000 0.94167 0.000 1.000 0.000 0 0.000 0.000
#> ERR866180 2 0.0000 0.94167 0.000 1.000 0.000 0 0.000 0.000
#> ERR862988 2 0.0000 0.94167 0.000 1.000 0.000 0 0.000 0.000
#> ERR866163 2 0.0000 0.94167 0.000 1.000 0.000 0 0.000 0.000
#> ERR866181 2 0.0000 0.94167 0.000 1.000 0.000 0 0.000 0.000
#> ERR862989 1 0.1700 0.82191 0.916 0.080 0.000 0 0.000 0.004
#> ERR866164 1 0.1910 0.83238 0.892 0.108 0.000 0 0.000 0.000
#> ERR866182 1 0.1910 0.83238 0.892 0.108 0.000 0 0.000 0.000
#> ERR862990 1 0.1700 0.82191 0.916 0.080 0.000 0 0.000 0.004
#> ERR866165 1 0.1910 0.83238 0.892 0.108 0.000 0 0.000 0.000
#> ERR866183 1 0.1910 0.83238 0.892 0.108 0.000 0 0.000 0.000
#> ERR862991 2 0.0000 0.94167 0.000 1.000 0.000 0 0.000 0.000
#> ERR866166 2 0.0000 0.94167 0.000 1.000 0.000 0 0.000 0.000
#> ERR866184 2 0.0000 0.94167 0.000 1.000 0.000 0 0.000 0.000
#> ERR862992 2 0.0000 0.94167 0.000 1.000 0.000 0 0.000 0.000
#> ERR866167 2 0.0000 0.94167 0.000 1.000 0.000 0 0.000 0.000
#> ERR866185 2 0.0000 0.94167 0.000 1.000 0.000 0 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)

consensus_heatmap(res, k = 3)

consensus_heatmap(res, k = 4)

consensus_heatmap(res, k = 5)

consensus_heatmap(res, k = 6)

Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)

membership_heatmap(res, k = 3)

membership_heatmap(res, k = 4)

membership_heatmap(res, k = 5)

membership_heatmap(res, k = 6)

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)

get_signatures(res, k = 3)

get_signatures(res, k = 4)

get_signatures(res, k = 5)

get_signatures(res, k = 6)

Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)

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

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

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

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

Compare the overlap of signatures from different k:
compare_signatures(res)

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.
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:
which_row
: row indices corresponding to the input matrix.
fdr
: FDR for the differential test.
mean_x
: The mean value in group x.
scaled_mean_x
: The mean value in group x after rows are scaled.
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")

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

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

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

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

Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)

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"]
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 15818 rows and 107 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'CV' method.
#> Subgroups are detected by 'kmeans' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 3.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)

The plots are:
- The first row: a plot of the ECDF (empirical cumulative distribution
function) curves of the consensus matrix for each
k
and the heatmap of
predicted classes for each k
.
- The second row: heatmaps of the consensus matrix for each
k
.
- The third row: heatmaps of the membership matrix for each
k
.
- The fouth row: heatmaps of the signatures for each
k
.
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:
- ECDF curves of the consensus matrix for each
k
;
- 1-PAC. The PAC
score
measures the proportion of the ambiguous subgrouping.
- Mean silhouette score.
- Concordance. The mean probability of fiting the consensus class ids in all
partitions.
- Area increased. Denote \(A_k\) as the area under the ECDF curve for current
k
, the area increased is defined as \(A_k - A_{k-1}\).
- Rand index. The percent of pairs of samples that are both in a same cluster
or both are not in a same cluster in the partition of k and k-1.
- Jaccard index. The ratio of pairs of samples are both in a same cluster in
the partition of k and k-1 and the pairs of samples are both in a same
cluster in the partition k or k-1.
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)

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.461 0.934 0.951 0.3386 0.649 0.649
#> 3 3 0.533 0.840 0.901 0.5509 0.665 0.535
#> 4 4 0.679 0.336 0.631 0.2153 0.647 0.392
#> 5 5 0.689 0.823 0.855 0.1150 0.787 0.500
#> 6 6 0.753 0.667 0.778 0.0738 0.994 0.979
suggest_best_k()
suggests the best \(k\) based on these statistics. The rules are as follows:
- All \(k\) with Jaccard index larger than 0.95 are removed because increasing
\(k\) does not provide enough extra information. If all \(k\) are removed, it is
marked as no subgroup is detected.
- For all \(k\) with 1-PAC score larger than 0.9, the maximal \(k\) is taken as
the best \(k\), and other \(k\) are marked as optional \(k\).
- If it does not fit the second rule. The \(k\) with the maximal vote of the
highest 1-PAC score, highest mean silhouette, and highest concordance is
taken as the best \(k\).
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
#> ERR862939 1 0.605 0.936 0.852 0.148
#> ERR862957 1 0.605 0.936 0.852 0.148
#> ERR878007 1 0.605 0.936 0.852 0.148
#> ERR862940 1 0.605 0.936 0.852 0.148
#> ERR862958 1 0.605 0.936 0.852 0.148
#> ERR878008 1 0.605 0.936 0.852 0.148
#> ERR862941 2 0.000 0.959 0.000 1.000
#> ERR862959 2 0.000 0.959 0.000 1.000
#> ERR878009 2 0.000 0.959 0.000 1.000
#> ERR862942 2 0.000 0.959 0.000 1.000
#> ERR862960 2 0.000 0.959 0.000 1.000
#> ERR878010 2 0.000 0.959 0.000 1.000
#> ERR862943 1 0.469 0.938 0.900 0.100
#> ERR862961 1 0.469 0.938 0.900 0.100
#> ERR878011 1 0.469 0.938 0.900 0.100
#> ERR862944 1 0.469 0.938 0.900 0.100
#> ERR862962 1 0.469 0.938 0.900 0.100
#> ERR878012 1 0.469 0.938 0.900 0.100
#> ERR862945 1 0.000 0.886 1.000 0.000
#> ERR862963 1 0.000 0.886 1.000 0.000
#> ERR878013 1 0.000 0.886 1.000 0.000
#> ERR862946 1 0.000 0.886 1.000 0.000
#> ERR862964 1 0.000 0.886 1.000 0.000
#> ERR878014 1 0.000 0.886 1.000 0.000
#> ERR862947 2 0.000 0.959 0.000 1.000
#> ERR862965 2 0.000 0.959 0.000 1.000
#> ERR878015 2 0.000 0.959 0.000 1.000
#> ERR862948 2 0.000 0.959 0.000 1.000
#> ERR862966 2 0.000 0.959 0.000 1.000
#> ERR878016 2 0.000 0.959 0.000 1.000
#> ERR862949 2 0.000 0.959 0.000 1.000
#> ERR862967 2 0.000 0.959 0.000 1.000
#> ERR878017 2 0.000 0.959 0.000 1.000
#> ERR862950 2 0.000 0.959 0.000 1.000
#> ERR862968 2 0.000 0.959 0.000 1.000
#> ERR878018 2 0.000 0.959 0.000 1.000
#> ERR862951 2 0.000 0.959 0.000 1.000
#> ERR862969 2 0.000 0.959 0.000 1.000
#> ERR878019 2 0.000 0.959 0.000 1.000
#> ERR862952 2 0.000 0.959 0.000 1.000
#> ERR862970 2 0.000 0.959 0.000 1.000
#> ERR878020 2 0.000 0.959 0.000 1.000
#> ERR862953 2 0.000 0.959 0.000 1.000
#> ERR862971 2 0.000 0.959 0.000 1.000
#> ERR878021 2 0.000 0.959 0.000 1.000
#> ERR862954 2 0.000 0.959 0.000 1.000
#> ERR862972 2 0.000 0.959 0.000 1.000
#> ERR878022 2 0.000 0.959 0.000 1.000
#> ERR862955 2 0.000 0.959 0.000 1.000
#> ERR862973 2 0.000 0.959 0.000 1.000
#> ERR878023 2 0.000 0.959 0.000 1.000
#> ERR862956 2 0.000 0.959 0.000 1.000
#> ERR862974 2 0.000 0.959 0.000 1.000
#> ERR878024 2 0.000 0.959 0.000 1.000
#> ERR862975 2 0.552 0.877 0.128 0.872
#> ERR866150 2 0.552 0.877 0.128 0.872
#> ERR866168 2 0.552 0.877 0.128 0.872
#> ERR862976 2 0.552 0.877 0.128 0.872
#> ERR866151 2 0.552 0.877 0.128 0.872
#> ERR866169 2 0.552 0.877 0.128 0.872
#> ERR862977 2 0.000 0.959 0.000 1.000
#> ERR866152 2 0.000 0.959 0.000 1.000
#> ERR866170 2 0.000 0.959 0.000 1.000
#> ERR862978 2 0.000 0.959 0.000 1.000
#> ERR866153 2 0.000 0.959 0.000 1.000
#> ERR866171 2 0.000 0.959 0.000 1.000
#> ERR862979 2 0.000 0.959 0.000 1.000
#> ERR866154 2 0.000 0.959 0.000 1.000
#> ERR866172 2 0.000 0.959 0.000 1.000
#> ERR862980 2 0.000 0.959 0.000 1.000
#> ERR866155 2 0.000 0.959 0.000 1.000
#> ERR866173 2 0.000 0.959 0.000 1.000
#> ERR862981 2 0.541 0.880 0.124 0.876
#> ERR866156 2 0.541 0.880 0.124 0.876
#> ERR866174 2 0.541 0.880 0.124 0.876
#> ERR866157 2 0.456 0.900 0.096 0.904
#> ERR866175 2 0.518 0.886 0.116 0.884
#> ERR862983 1 0.605 0.936 0.852 0.148
#> ERR866158 1 0.605 0.936 0.852 0.148
#> ERR866176 1 0.605 0.936 0.852 0.148
#> ERR862984 1 0.605 0.936 0.852 0.148
#> ERR866159 1 0.605 0.936 0.852 0.148
#> ERR866177 1 0.605 0.936 0.852 0.148
#> ERR862985 2 0.541 0.880 0.124 0.876
#> ERR866160 2 0.541 0.880 0.124 0.876
#> ERR866178 2 0.541 0.880 0.124 0.876
#> ERR862986 2 0.541 0.880 0.124 0.876
#> ERR866161 2 0.541 0.880 0.124 0.876
#> ERR866179 2 0.541 0.880 0.124 0.876
#> ERR862987 2 0.000 0.959 0.000 1.000
#> ERR866162 2 0.000 0.959 0.000 1.000
#> ERR866180 2 0.000 0.959 0.000 1.000
#> ERR862988 2 0.000 0.959 0.000 1.000
#> ERR866163 2 0.000 0.959 0.000 1.000
#> ERR866181 2 0.000 0.959 0.000 1.000
#> ERR862989 2 0.552 0.877 0.128 0.872
#> ERR866164 2 0.552 0.877 0.128 0.872
#> ERR866182 2 0.552 0.877 0.128 0.872
#> ERR862990 2 0.552 0.877 0.128 0.872
#> ERR866165 2 0.552 0.877 0.128 0.872
#> ERR866183 2 0.552 0.877 0.128 0.872
#> ERR862991 2 0.000 0.959 0.000 1.000
#> ERR866166 2 0.000 0.959 0.000 1.000
#> ERR866184 2 0.000 0.959 0.000 1.000
#> ERR862992 2 0.000 0.959 0.000 1.000
#> ERR866167 2 0.000 0.959 0.000 1.000
#> ERR866185 2 0.000 0.959 0.000 1.000
show/hide code output
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> ERR862939 1 0.3038 0.683 0.896 0.000 0.104
#> ERR862957 1 0.3038 0.683 0.896 0.000 0.104
#> ERR878007 1 0.3038 0.683 0.896 0.000 0.104
#> ERR862940 1 0.3038 0.683 0.896 0.000 0.104
#> ERR862958 1 0.3038 0.683 0.896 0.000 0.104
#> ERR878008 1 0.3038 0.683 0.896 0.000 0.104
#> ERR862941 2 0.0000 0.943 0.000 1.000 0.000
#> ERR862959 2 0.0000 0.943 0.000 1.000 0.000
#> ERR878009 2 0.0000 0.943 0.000 1.000 0.000
#> ERR862942 2 0.0000 0.943 0.000 1.000 0.000
#> ERR862960 2 0.0000 0.943 0.000 1.000 0.000
#> ERR878010 2 0.0000 0.943 0.000 1.000 0.000
#> ERR862943 1 0.3267 0.683 0.884 0.000 0.116
#> ERR862961 1 0.3267 0.683 0.884 0.000 0.116
#> ERR878011 1 0.3267 0.683 0.884 0.000 0.116
#> ERR862944 1 0.3267 0.683 0.884 0.000 0.116
#> ERR862962 1 0.3267 0.683 0.884 0.000 0.116
#> ERR878012 1 0.3267 0.683 0.884 0.000 0.116
#> ERR862945 3 0.3116 1.000 0.108 0.000 0.892
#> ERR862963 3 0.3116 1.000 0.108 0.000 0.892
#> ERR878013 3 0.3116 1.000 0.108 0.000 0.892
#> ERR862946 3 0.3116 1.000 0.108 0.000 0.892
#> ERR862964 3 0.3116 1.000 0.108 0.000 0.892
#> ERR878014 3 0.3116 1.000 0.108 0.000 0.892
#> ERR862947 2 0.3116 0.849 0.000 0.892 0.108
#> ERR862965 2 0.3116 0.849 0.000 0.892 0.108
#> ERR878015 2 0.3116 0.849 0.000 0.892 0.108
#> ERR862948 2 0.3116 0.849 0.000 0.892 0.108
#> ERR862966 2 0.3116 0.849 0.000 0.892 0.108
#> ERR878016 2 0.3116 0.849 0.000 0.892 0.108
#> ERR862949 2 0.0000 0.943 0.000 1.000 0.000
#> ERR862967 2 0.0000 0.943 0.000 1.000 0.000
#> ERR878017 2 0.0000 0.943 0.000 1.000 0.000
#> ERR862950 2 0.0000 0.943 0.000 1.000 0.000
#> ERR862968 2 0.0000 0.943 0.000 1.000 0.000
#> ERR878018 2 0.0000 0.943 0.000 1.000 0.000
#> ERR862951 2 0.5810 0.466 0.336 0.664 0.000
#> ERR862969 2 0.4346 0.769 0.184 0.816 0.000
#> ERR878019 2 0.4750 0.719 0.216 0.784 0.000
#> ERR862952 2 0.5650 0.527 0.312 0.688 0.000
#> ERR862970 2 0.5859 0.444 0.344 0.656 0.000
#> ERR878020 2 0.5016 0.678 0.240 0.760 0.000
#> ERR862953 2 0.3038 0.866 0.104 0.896 0.000
#> ERR862971 2 0.3038 0.866 0.104 0.896 0.000
#> ERR878021 2 0.3038 0.866 0.104 0.896 0.000
#> ERR862954 2 0.3038 0.866 0.104 0.896 0.000
#> ERR862972 2 0.3038 0.866 0.104 0.896 0.000
#> ERR878022 2 0.3038 0.866 0.104 0.896 0.000
#> ERR862955 2 0.0000 0.943 0.000 1.000 0.000
#> ERR862973 2 0.0000 0.943 0.000 1.000 0.000
#> ERR878023 2 0.0000 0.943 0.000 1.000 0.000
#> ERR862956 2 0.0000 0.943 0.000 1.000 0.000
#> ERR862974 2 0.0000 0.943 0.000 1.000 0.000
#> ERR878024 2 0.0000 0.943 0.000 1.000 0.000
#> ERR862975 1 0.4796 0.789 0.780 0.220 0.000
#> ERR866150 1 0.4796 0.789 0.780 0.220 0.000
#> ERR866168 1 0.4796 0.789 0.780 0.220 0.000
#> ERR862976 1 0.4796 0.789 0.780 0.220 0.000
#> ERR866151 1 0.4796 0.789 0.780 0.220 0.000
#> ERR866169 1 0.4796 0.789 0.780 0.220 0.000
#> ERR862977 2 0.0000 0.943 0.000 1.000 0.000
#> ERR866152 2 0.0000 0.943 0.000 1.000 0.000
#> ERR866170 2 0.0000 0.943 0.000 1.000 0.000
#> ERR862978 2 0.0000 0.943 0.000 1.000 0.000
#> ERR866153 2 0.0000 0.943 0.000 1.000 0.000
#> ERR866171 2 0.0000 0.943 0.000 1.000 0.000
#> ERR862979 2 0.0000 0.943 0.000 1.000 0.000
#> ERR866154 2 0.0000 0.943 0.000 1.000 0.000
#> ERR866172 2 0.0000 0.943 0.000 1.000 0.000
#> ERR862980 2 0.0000 0.943 0.000 1.000 0.000
#> ERR866155 2 0.0000 0.943 0.000 1.000 0.000
#> ERR866173 2 0.0000 0.943 0.000 1.000 0.000
#> ERR862981 1 0.4796 0.789 0.780 0.220 0.000
#> ERR866156 1 0.4796 0.789 0.780 0.220 0.000
#> ERR866174 1 0.4796 0.789 0.780 0.220 0.000
#> ERR866157 1 0.4796 0.789 0.780 0.220 0.000
#> ERR866175 1 0.4796 0.789 0.780 0.220 0.000
#> ERR862983 1 0.3267 0.683 0.884 0.000 0.116
#> ERR866158 1 0.3267 0.683 0.884 0.000 0.116
#> ERR866176 1 0.3267 0.683 0.884 0.000 0.116
#> ERR862984 1 0.3267 0.683 0.884 0.000 0.116
#> ERR866159 1 0.3267 0.683 0.884 0.000 0.116
#> ERR866177 1 0.3267 0.683 0.884 0.000 0.116
#> ERR862985 1 0.4796 0.789 0.780 0.220 0.000
#> ERR866160 1 0.4796 0.789 0.780 0.220 0.000
#> ERR866178 1 0.4796 0.789 0.780 0.220 0.000
#> ERR862986 1 0.4796 0.789 0.780 0.220 0.000
#> ERR866161 1 0.4796 0.789 0.780 0.220 0.000
#> ERR866179 1 0.4796 0.789 0.780 0.220 0.000
#> ERR862987 2 0.0237 0.941 0.000 0.996 0.004
#> ERR866162 2 0.0000 0.943 0.000 1.000 0.000
#> ERR866180 2 0.0000 0.943 0.000 1.000 0.000
#> ERR862988 2 0.0000 0.943 0.000 1.000 0.000
#> ERR866163 2 0.0000 0.943 0.000 1.000 0.000
#> ERR866181 2 0.0237 0.941 0.000 0.996 0.004
#> ERR862989 1 0.4062 0.774 0.836 0.164 0.000
#> ERR866164 1 0.4605 0.786 0.796 0.204 0.000
#> ERR866182 1 0.4796 0.789 0.780 0.220 0.000
#> ERR862990 1 0.4504 0.784 0.804 0.196 0.000
#> ERR866165 1 0.4796 0.789 0.780 0.220 0.000
#> ERR866183 1 0.4796 0.789 0.780 0.220 0.000
#> ERR862991 2 0.0000 0.943 0.000 1.000 0.000
#> ERR866166 2 0.0000 0.943 0.000 1.000 0.000
#> ERR866184 2 0.0000 0.943 0.000 1.000 0.000
#> ERR862992 2 0.0000 0.943 0.000 1.000 0.000
#> ERR866167 2 0.0000 0.943 0.000 1.000 0.000
#> ERR866185 2 0.0000 0.943 0.000 1.000 0.000
show/hide code output
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> ERR862939 3 0.0376 0.98516 0.000 0.004 0.992 0.004
#> ERR862957 3 0.0376 0.98516 0.000 0.004 0.992 0.004
#> ERR878007 3 0.0376 0.98516 0.000 0.004 0.992 0.004
#> ERR862940 3 0.0376 0.98516 0.000 0.004 0.992 0.004
#> ERR862958 3 0.0376 0.98516 0.000 0.004 0.992 0.004
#> ERR878008 3 0.0376 0.98516 0.000 0.004 0.992 0.004
#> ERR862941 2 0.4985 0.75329 0.468 0.532 0.000 0.000
#> ERR862959 2 0.4977 0.76216 0.460 0.540 0.000 0.000
#> ERR878009 2 0.4977 0.76196 0.460 0.540 0.000 0.000
#> ERR862942 2 0.4985 0.75329 0.468 0.532 0.000 0.000
#> ERR862960 2 0.4985 0.75329 0.468 0.532 0.000 0.000
#> ERR878010 2 0.4981 0.75792 0.464 0.536 0.000 0.000
#> ERR862943 3 0.0000 0.98587 0.000 0.000 1.000 0.000
#> ERR862961 3 0.0000 0.98587 0.000 0.000 1.000 0.000
#> ERR878011 3 0.0000 0.98587 0.000 0.000 1.000 0.000
#> ERR862944 3 0.0000 0.98587 0.000 0.000 1.000 0.000
#> ERR862962 3 0.0000 0.98587 0.000 0.000 1.000 0.000
#> ERR878012 3 0.0000 0.98587 0.000 0.000 1.000 0.000
#> ERR862945 4 0.1557 0.99847 0.000 0.000 0.056 0.944
#> ERR862963 4 0.1557 0.99847 0.000 0.000 0.056 0.944
#> ERR878013 4 0.1557 0.99847 0.000 0.000 0.056 0.944
#> ERR862946 4 0.1890 0.99695 0.000 0.008 0.056 0.936
#> ERR862964 4 0.1890 0.99695 0.000 0.008 0.056 0.936
#> ERR878014 4 0.1557 0.99847 0.000 0.000 0.056 0.944
#> ERR862947 2 0.1854 0.44456 0.012 0.940 0.000 0.048
#> ERR862965 2 0.1854 0.44456 0.012 0.940 0.000 0.048
#> ERR878015 2 0.1854 0.44456 0.012 0.940 0.000 0.048
#> ERR862948 2 0.1854 0.44456 0.012 0.940 0.000 0.048
#> ERR862966 2 0.1854 0.44456 0.012 0.940 0.000 0.048
#> ERR878016 2 0.1854 0.44456 0.012 0.940 0.000 0.048
#> ERR862949 2 0.4977 0.76231 0.460 0.540 0.000 0.000
#> ERR862967 2 0.4972 0.76495 0.456 0.544 0.000 0.000
#> ERR878017 2 0.4967 0.76713 0.452 0.548 0.000 0.000
#> ERR862950 2 0.4977 0.76211 0.460 0.540 0.000 0.000
#> ERR862968 2 0.4967 0.76713 0.452 0.548 0.000 0.000
#> ERR878018 2 0.4972 0.76495 0.456 0.544 0.000 0.000
#> ERR862951 1 0.0376 0.25337 0.992 0.000 0.004 0.004
#> ERR862969 1 0.0000 0.25111 1.000 0.000 0.000 0.000
#> ERR878019 1 0.0000 0.25111 1.000 0.000 0.000 0.000
#> ERR862952 1 0.0188 0.24914 0.996 0.000 0.000 0.004
#> ERR862970 1 0.0376 0.25337 0.992 0.000 0.004 0.004
#> ERR878020 1 0.0000 0.25111 1.000 0.000 0.000 0.000
#> ERR862953 1 0.0188 0.24641 0.996 0.004 0.000 0.000
#> ERR862971 1 0.0336 0.24086 0.992 0.008 0.000 0.000
#> ERR878021 1 0.0188 0.24641 0.996 0.004 0.000 0.000
#> ERR862954 1 0.0336 0.24086 0.992 0.008 0.000 0.000
#> ERR862972 1 0.0336 0.24086 0.992 0.008 0.000 0.000
#> ERR878022 1 0.1637 0.14849 0.940 0.060 0.000 0.000
#> ERR862955 1 0.4989 -0.67368 0.528 0.472 0.000 0.000
#> ERR862973 1 0.4985 -0.66843 0.532 0.468 0.000 0.000
#> ERR878023 1 0.4989 -0.67368 0.528 0.472 0.000 0.000
#> ERR862956 1 0.4989 -0.67368 0.528 0.472 0.000 0.000
#> ERR862974 1 0.4985 -0.66843 0.532 0.468 0.000 0.000
#> ERR878024 1 0.4992 -0.67979 0.524 0.476 0.000 0.000
#> ERR862975 1 0.4994 0.00446 0.520 0.000 0.480 0.000
#> ERR866150 1 0.4994 0.00446 0.520 0.000 0.480 0.000
#> ERR866168 1 0.4994 0.00446 0.520 0.000 0.480 0.000
#> ERR862976 1 0.4994 0.00446 0.520 0.000 0.480 0.000
#> ERR866151 1 0.4994 0.00446 0.520 0.000 0.480 0.000
#> ERR866169 1 0.4994 0.00446 0.520 0.000 0.480 0.000
#> ERR862977 1 0.4985 -0.66843 0.532 0.468 0.000 0.000
#> ERR866152 1 0.4985 -0.66843 0.532 0.468 0.000 0.000
#> ERR866170 1 0.4985 -0.66843 0.532 0.468 0.000 0.000
#> ERR862978 1 0.4985 -0.66843 0.532 0.468 0.000 0.000
#> ERR866153 1 0.4985 -0.66843 0.532 0.468 0.000 0.000
#> ERR866171 1 0.4985 -0.66843 0.532 0.468 0.000 0.000
#> ERR862979 1 0.4989 -0.67337 0.528 0.472 0.000 0.000
#> ERR866154 1 0.4989 -0.67337 0.528 0.472 0.000 0.000
#> ERR866172 1 0.4989 -0.67337 0.528 0.472 0.000 0.000
#> ERR862980 1 0.4989 -0.67337 0.528 0.472 0.000 0.000
#> ERR866155 1 0.4996 -0.69115 0.516 0.484 0.000 0.000
#> ERR866173 1 0.4989 -0.67337 0.528 0.472 0.000 0.000
#> ERR862981 1 0.4994 0.00446 0.520 0.000 0.480 0.000
#> ERR866156 1 0.4994 0.00446 0.520 0.000 0.480 0.000
#> ERR866174 1 0.4994 0.00446 0.520 0.000 0.480 0.000
#> ERR866157 1 0.4977 0.02026 0.540 0.000 0.460 0.000
#> ERR866175 1 0.4994 0.00446 0.520 0.000 0.480 0.000
#> ERR862983 3 0.0817 0.97604 0.024 0.000 0.976 0.000
#> ERR866158 3 0.0817 0.97604 0.024 0.000 0.976 0.000
#> ERR866176 3 0.0817 0.97604 0.024 0.000 0.976 0.000
#> ERR862984 3 0.0817 0.97604 0.024 0.000 0.976 0.000
#> ERR866159 3 0.0817 0.97604 0.024 0.000 0.976 0.000
#> ERR866177 3 0.0817 0.97604 0.024 0.000 0.976 0.000
#> ERR862985 1 0.4994 0.00446 0.520 0.000 0.480 0.000
#> ERR866160 1 0.4994 0.00446 0.520 0.000 0.480 0.000
#> ERR866178 1 0.4994 0.00446 0.520 0.000 0.480 0.000
#> ERR862986 1 0.4994 0.00446 0.520 0.000 0.480 0.000
#> ERR866161 1 0.4994 0.00446 0.520 0.000 0.480 0.000
#> ERR866179 1 0.4994 0.00446 0.520 0.000 0.480 0.000
#> ERR862987 2 0.5007 0.79613 0.356 0.636 0.000 0.008
#> ERR866162 2 0.5024 0.79844 0.360 0.632 0.000 0.008
#> ERR866180 2 0.5024 0.79844 0.360 0.632 0.000 0.008
#> ERR862988 2 0.5024 0.79844 0.360 0.632 0.000 0.008
#> ERR866163 2 0.5024 0.79844 0.360 0.632 0.000 0.008
#> ERR866181 2 0.5007 0.79613 0.356 0.636 0.000 0.008
#> ERR862989 1 0.4994 0.00446 0.520 0.000 0.480 0.000
#> ERR866164 1 0.4994 0.00446 0.520 0.000 0.480 0.000
#> ERR866182 1 0.4994 0.00446 0.520 0.000 0.480 0.000
#> ERR862990 1 0.4994 0.00446 0.520 0.000 0.480 0.000
#> ERR866165 1 0.4994 0.00446 0.520 0.000 0.480 0.000
#> ERR866183 1 0.4994 0.00446 0.520 0.000 0.480 0.000
#> ERR862991 2 0.5024 0.79844 0.360 0.632 0.000 0.008
#> ERR866166 2 0.4889 0.79784 0.360 0.636 0.000 0.004
#> ERR866184 2 0.5024 0.79844 0.360 0.632 0.000 0.008
#> ERR862992 2 0.5024 0.79844 0.360 0.632 0.000 0.008
#> ERR866167 2 0.5024 0.79844 0.360 0.632 0.000 0.008
#> ERR866185 2 0.5024 0.79844 0.360 0.632 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
#> ERR862939 3 0.1331 0.902 0.008 0.000 0.952 0.000 0.040
#> ERR862957 3 0.1331 0.902 0.008 0.000 0.952 0.000 0.040
#> ERR878007 3 0.1331 0.902 0.008 0.000 0.952 0.000 0.040
#> ERR862940 3 0.1331 0.902 0.008 0.000 0.952 0.000 0.040
#> ERR862958 3 0.1331 0.902 0.008 0.000 0.952 0.000 0.040
#> ERR878008 3 0.1331 0.902 0.008 0.000 0.952 0.000 0.040
#> ERR862941 2 0.1750 0.853 0.036 0.936 0.000 0.000 0.028
#> ERR862959 2 0.1753 0.852 0.032 0.936 0.000 0.000 0.032
#> ERR878009 2 0.1300 0.853 0.016 0.956 0.000 0.000 0.028
#> ERR862942 2 0.1579 0.853 0.032 0.944 0.000 0.000 0.024
#> ERR862960 2 0.1661 0.853 0.036 0.940 0.000 0.000 0.024
#> ERR878010 2 0.1753 0.852 0.032 0.936 0.000 0.000 0.032
#> ERR862943 3 0.0324 0.906 0.004 0.000 0.992 0.000 0.004
#> ERR862961 3 0.0324 0.906 0.004 0.000 0.992 0.000 0.004
#> ERR878011 3 0.0162 0.907 0.004 0.000 0.996 0.000 0.000
#> ERR862944 3 0.0162 0.907 0.004 0.000 0.996 0.000 0.000
#> ERR862962 3 0.0162 0.907 0.004 0.000 0.996 0.000 0.000
#> ERR878012 3 0.0162 0.907 0.004 0.000 0.996 0.000 0.000
#> ERR862945 4 0.0162 0.995 0.000 0.000 0.004 0.996 0.000
#> ERR862963 4 0.0867 0.988 0.008 0.000 0.008 0.976 0.008
#> ERR878013 4 0.0162 0.995 0.000 0.000 0.004 0.996 0.000
#> ERR862946 4 0.0566 0.992 0.000 0.000 0.004 0.984 0.012
#> ERR862964 4 0.0451 0.993 0.000 0.000 0.004 0.988 0.008
#> ERR878014 4 0.0162 0.995 0.000 0.000 0.004 0.996 0.000
#> ERR862947 5 0.3366 0.997 0.004 0.212 0.000 0.000 0.784
#> ERR862965 5 0.3210 0.998 0.000 0.212 0.000 0.000 0.788
#> ERR878015 5 0.3210 0.998 0.000 0.212 0.000 0.000 0.788
#> ERR862948 5 0.3210 0.998 0.000 0.212 0.000 0.000 0.788
#> ERR862966 5 0.3596 0.993 0.012 0.212 0.000 0.000 0.776
#> ERR878016 5 0.3210 0.998 0.000 0.212 0.000 0.000 0.788
#> ERR862949 2 0.2903 0.834 0.080 0.872 0.000 0.000 0.048
#> ERR862967 2 0.2813 0.833 0.084 0.876 0.000 0.000 0.040
#> ERR878017 2 0.2974 0.833 0.080 0.868 0.000 0.000 0.052
#> ERR862950 2 0.3033 0.831 0.084 0.864 0.000 0.000 0.052
#> ERR862968 2 0.3033 0.831 0.084 0.864 0.000 0.000 0.052
#> ERR878018 2 0.2974 0.833 0.080 0.868 0.000 0.000 0.052
#> ERR862951 1 0.2859 0.717 0.876 0.056 0.000 0.000 0.068
#> ERR862969 1 0.2927 0.714 0.872 0.060 0.000 0.000 0.068
#> ERR878019 1 0.2719 0.722 0.884 0.068 0.000 0.000 0.048
#> ERR862952 1 0.3051 0.709 0.864 0.060 0.000 0.000 0.076
#> ERR862970 1 0.2983 0.713 0.868 0.056 0.000 0.000 0.076
#> ERR878020 1 0.2719 0.722 0.884 0.068 0.000 0.000 0.048
#> ERR862953 1 0.4558 0.545 0.728 0.208 0.000 0.000 0.064
#> ERR862971 1 0.4766 0.524 0.708 0.220 0.000 0.000 0.072
#> ERR878021 1 0.4649 0.531 0.716 0.220 0.000 0.000 0.064
#> ERR862954 1 0.4678 0.525 0.712 0.224 0.000 0.000 0.064
#> ERR862972 1 0.4558 0.539 0.724 0.216 0.000 0.000 0.060
#> ERR878022 1 0.5447 0.148 0.536 0.400 0.000 0.000 0.064
#> ERR862955 2 0.2264 0.828 0.060 0.912 0.000 0.004 0.024
#> ERR862973 2 0.2264 0.828 0.060 0.912 0.000 0.004 0.024
#> ERR878023 2 0.2172 0.830 0.060 0.916 0.000 0.004 0.020
#> ERR862956 2 0.2172 0.830 0.060 0.916 0.000 0.004 0.020
#> ERR862974 2 0.2172 0.830 0.060 0.916 0.000 0.004 0.020
#> ERR878024 2 0.2032 0.833 0.052 0.924 0.000 0.004 0.020
#> ERR862975 1 0.3844 0.810 0.788 0.004 0.180 0.000 0.028
#> ERR866150 1 0.3844 0.810 0.788 0.004 0.180 0.000 0.028
#> ERR866168 1 0.3844 0.810 0.788 0.004 0.180 0.000 0.028
#> ERR862976 1 0.3844 0.810 0.788 0.004 0.180 0.000 0.028
#> ERR866151 1 0.3844 0.810 0.788 0.004 0.180 0.000 0.028
#> ERR866169 1 0.3844 0.810 0.788 0.004 0.180 0.000 0.028
#> ERR862977 2 0.2264 0.828 0.060 0.912 0.000 0.004 0.024
#> ERR866152 2 0.2264 0.828 0.060 0.912 0.000 0.004 0.024
#> ERR866170 2 0.2264 0.828 0.060 0.912 0.000 0.004 0.024
#> ERR862978 2 0.2264 0.828 0.060 0.912 0.000 0.004 0.024
#> ERR866153 2 0.2264 0.828 0.060 0.912 0.000 0.004 0.024
#> ERR866171 2 0.2264 0.828 0.060 0.912 0.000 0.004 0.024
#> ERR862979 2 0.2193 0.825 0.092 0.900 0.000 0.000 0.008
#> ERR866154 2 0.1908 0.828 0.092 0.908 0.000 0.000 0.000
#> ERR866172 2 0.1908 0.828 0.092 0.908 0.000 0.000 0.000
#> ERR862980 2 0.1908 0.828 0.092 0.908 0.000 0.000 0.000
#> ERR866155 2 0.2068 0.828 0.092 0.904 0.000 0.000 0.004
#> ERR866173 2 0.1908 0.828 0.092 0.908 0.000 0.000 0.000
#> ERR862981 1 0.3787 0.818 0.800 0.012 0.168 0.000 0.020
#> ERR866156 1 0.3787 0.818 0.800 0.012 0.168 0.000 0.020
#> ERR866174 1 0.3787 0.818 0.800 0.012 0.168 0.000 0.020
#> ERR866157 1 0.3787 0.818 0.800 0.012 0.168 0.000 0.020
#> ERR866175 1 0.3787 0.818 0.800 0.012 0.168 0.000 0.020
#> ERR862983 3 0.3445 0.838 0.140 0.000 0.824 0.000 0.036
#> ERR866158 3 0.3445 0.838 0.140 0.000 0.824 0.000 0.036
#> ERR866176 3 0.3445 0.838 0.140 0.000 0.824 0.000 0.036
#> ERR862984 3 0.3445 0.838 0.140 0.000 0.824 0.000 0.036
#> ERR866159 3 0.3445 0.838 0.140 0.000 0.824 0.000 0.036
#> ERR866177 3 0.3445 0.838 0.140 0.000 0.824 0.000 0.036
#> ERR862985 1 0.3787 0.818 0.800 0.012 0.168 0.000 0.020
#> ERR866160 1 0.3787 0.818 0.800 0.012 0.168 0.000 0.020
#> ERR866178 1 0.3787 0.818 0.800 0.012 0.168 0.000 0.020
#> ERR862986 1 0.3787 0.818 0.800 0.012 0.168 0.000 0.020
#> ERR866161 1 0.3787 0.818 0.800 0.012 0.168 0.000 0.020
#> ERR866179 1 0.3787 0.818 0.800 0.012 0.168 0.000 0.020
#> ERR862987 2 0.2970 0.779 0.004 0.828 0.000 0.000 0.168
#> ERR866162 2 0.2970 0.779 0.004 0.828 0.000 0.000 0.168
#> ERR866180 2 0.2970 0.779 0.004 0.828 0.000 0.000 0.168
#> ERR862988 2 0.2970 0.779 0.004 0.828 0.000 0.000 0.168
#> ERR866163 2 0.2970 0.779 0.004 0.828 0.000 0.000 0.168
#> ERR866181 2 0.2970 0.779 0.004 0.828 0.000 0.000 0.168
#> ERR862989 1 0.3759 0.809 0.792 0.004 0.180 0.000 0.024
#> ERR866164 1 0.3670 0.811 0.796 0.004 0.180 0.000 0.020
#> ERR866182 1 0.3437 0.814 0.808 0.004 0.176 0.000 0.012
#> ERR862990 1 0.3759 0.809 0.792 0.004 0.180 0.000 0.024
#> ERR866165 1 0.3575 0.812 0.800 0.004 0.180 0.000 0.016
#> ERR866183 1 0.3575 0.812 0.800 0.004 0.180 0.000 0.016
#> ERR862991 2 0.2970 0.779 0.004 0.828 0.000 0.000 0.168
#> ERR866166 2 0.2970 0.779 0.004 0.828 0.000 0.000 0.168
#> ERR866184 2 0.2970 0.779 0.004 0.828 0.000 0.000 0.168
#> ERR862992 2 0.2970 0.779 0.004 0.828 0.000 0.000 0.168
#> ERR866167 2 0.2970 0.779 0.004 0.828 0.000 0.000 0.168
#> ERR866185 2 0.2970 0.779 0.004 0.828 0.000 0.000 0.168
show/hide code output
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> ERR862939 3 0.3879 0.808 0.072 0.000 0.808 0.000 0.044 0.076
#> ERR862957 3 0.3879 0.808 0.072 0.000 0.808 0.000 0.044 0.076
#> ERR878007 3 0.3879 0.808 0.072 0.000 0.808 0.000 0.044 0.076
#> ERR862940 3 0.3879 0.808 0.076 0.000 0.808 0.000 0.044 0.072
#> ERR862958 3 0.3879 0.808 0.072 0.000 0.808 0.000 0.044 0.076
#> ERR878008 3 0.3879 0.808 0.072 0.000 0.808 0.000 0.044 0.076
#> ERR862941 2 0.0603 0.690 0.000 0.980 0.004 0.000 0.000 0.016
#> ERR862959 2 0.0603 0.689 0.000 0.980 0.000 0.000 0.004 0.016
#> ERR878009 2 0.1082 0.704 0.000 0.956 0.004 0.000 0.000 0.040
#> ERR862942 2 0.0260 0.688 0.000 0.992 0.000 0.000 0.000 0.008
#> ERR862960 2 0.0363 0.691 0.000 0.988 0.000 0.000 0.000 0.012
#> ERR878010 2 0.0692 0.692 0.000 0.976 0.004 0.000 0.000 0.020
#> ERR862943 3 0.1036 0.833 0.024 0.000 0.964 0.000 0.004 0.008
#> ERR862961 3 0.0777 0.835 0.024 0.000 0.972 0.000 0.000 0.004
#> ERR878011 3 0.0777 0.835 0.024 0.000 0.972 0.000 0.000 0.004
#> ERR862944 3 0.0777 0.835 0.024 0.000 0.972 0.000 0.000 0.004
#> ERR862962 3 0.0777 0.835 0.024 0.000 0.972 0.000 0.000 0.004
#> ERR878012 3 0.0777 0.835 0.024 0.000 0.972 0.000 0.000 0.004
#> ERR862945 4 0.0291 0.997 0.000 0.000 0.004 0.992 0.000 0.004
#> ERR862963 4 0.0291 0.996 0.000 0.000 0.004 0.992 0.000 0.004
#> ERR878013 4 0.0146 0.997 0.000 0.000 0.004 0.996 0.000 0.000
#> ERR862946 4 0.0508 0.994 0.000 0.000 0.004 0.984 0.000 0.012
#> ERR862964 4 0.0291 0.997 0.000 0.000 0.004 0.992 0.000 0.004
#> ERR878014 4 0.0146 0.997 0.000 0.000 0.004 0.996 0.000 0.000
#> ERR862947 5 0.2053 0.997 0.000 0.108 0.004 0.000 0.888 0.000
#> ERR862965 5 0.2053 0.997 0.000 0.108 0.004 0.000 0.888 0.000
#> ERR878015 5 0.1910 0.997 0.000 0.108 0.000 0.000 0.892 0.000
#> ERR862948 5 0.2266 0.992 0.000 0.108 0.000 0.000 0.880 0.012
#> ERR862966 5 0.1910 0.997 0.000 0.108 0.000 0.000 0.892 0.000
#> ERR878016 5 0.1910 0.997 0.000 0.108 0.000 0.000 0.892 0.000
#> ERR862949 2 0.1082 0.683 0.000 0.956 0.000 0.000 0.040 0.004
#> ERR862967 2 0.0858 0.685 0.000 0.968 0.000 0.000 0.028 0.004
#> ERR878017 2 0.1082 0.683 0.000 0.956 0.000 0.000 0.040 0.004
#> ERR862950 2 0.1082 0.683 0.000 0.956 0.000 0.000 0.040 0.004
#> ERR862968 2 0.1082 0.683 0.000 0.956 0.000 0.000 0.040 0.004
#> ERR878018 2 0.1082 0.683 0.000 0.956 0.000 0.000 0.040 0.004
#> ERR862951 1 0.5437 0.385 0.560 0.044 0.004 0.004 0.028 0.360
#> ERR862969 1 0.5478 0.402 0.588 0.048 0.004 0.000 0.044 0.316
#> ERR878019 1 0.4675 0.487 0.656 0.044 0.000 0.000 0.016 0.284
#> ERR862952 1 0.5601 0.309 0.532 0.048 0.004 0.004 0.032 0.380
#> ERR862970 1 0.5546 0.329 0.536 0.044 0.004 0.004 0.032 0.380
#> ERR878020 1 0.4694 0.498 0.652 0.044 0.000 0.000 0.016 0.288
#> ERR862953 1 0.5357 -0.132 0.496 0.084 0.000 0.000 0.008 0.412
#> ERR862971 1 0.5449 -0.213 0.464 0.092 0.000 0.000 0.008 0.436
#> ERR878021 1 0.5533 -0.200 0.484 0.104 0.000 0.000 0.008 0.404
#> ERR862954 1 0.5613 -0.317 0.456 0.112 0.000 0.000 0.008 0.424
#> ERR862972 1 0.5410 -0.119 0.508 0.092 0.000 0.000 0.008 0.392
#> ERR878022 6 0.6208 0.000 0.276 0.280 0.000 0.000 0.008 0.436
#> ERR862955 2 0.4174 0.569 0.004 0.580 0.004 0.000 0.004 0.408
#> ERR862973 2 0.4174 0.567 0.004 0.580 0.004 0.000 0.004 0.408
#> ERR878023 2 0.4174 0.568 0.004 0.580 0.004 0.000 0.004 0.408
#> ERR862956 2 0.4189 0.561 0.004 0.572 0.004 0.000 0.004 0.416
#> ERR862974 2 0.4196 0.556 0.004 0.568 0.004 0.000 0.004 0.420
#> ERR878024 2 0.4158 0.576 0.004 0.588 0.004 0.000 0.004 0.400
#> ERR862975 1 0.3252 0.716 0.816 0.004 0.016 0.000 0.008 0.156
#> ERR866150 1 0.3252 0.716 0.816 0.004 0.016 0.000 0.008 0.156
#> ERR866168 1 0.3252 0.716 0.816 0.004 0.016 0.000 0.008 0.156
#> ERR862976 1 0.3288 0.715 0.812 0.004 0.016 0.000 0.008 0.160
#> ERR866151 1 0.3252 0.716 0.816 0.004 0.016 0.000 0.008 0.156
#> ERR866169 1 0.3252 0.716 0.816 0.004 0.016 0.000 0.008 0.156
#> ERR862977 2 0.4070 0.551 0.004 0.568 0.000 0.000 0.004 0.424
#> ERR866152 2 0.4076 0.547 0.004 0.564 0.000 0.000 0.004 0.428
#> ERR866170 2 0.4070 0.553 0.004 0.568 0.000 0.000 0.004 0.424
#> ERR862978 2 0.4063 0.557 0.004 0.572 0.000 0.000 0.004 0.420
#> ERR866153 2 0.4070 0.553 0.004 0.568 0.000 0.000 0.004 0.424
#> ERR866171 2 0.4063 0.555 0.004 0.572 0.000 0.000 0.004 0.420
#> ERR862979 2 0.1204 0.668 0.000 0.944 0.000 0.000 0.000 0.056
#> ERR866154 2 0.1204 0.670 0.000 0.944 0.000 0.000 0.000 0.056
#> ERR866172 2 0.0937 0.674 0.000 0.960 0.000 0.000 0.000 0.040
#> ERR862980 2 0.1204 0.670 0.000 0.944 0.000 0.000 0.000 0.056
#> ERR866155 2 0.0790 0.678 0.000 0.968 0.000 0.000 0.000 0.032
#> ERR866173 2 0.0865 0.677 0.000 0.964 0.000 0.000 0.000 0.036
#> ERR862981 1 0.0692 0.715 0.976 0.004 0.000 0.000 0.000 0.020
#> ERR866156 1 0.0603 0.716 0.980 0.004 0.000 0.000 0.000 0.016
#> ERR866174 1 0.0603 0.716 0.980 0.004 0.000 0.000 0.000 0.016
#> ERR866157 1 0.0777 0.714 0.972 0.004 0.000 0.000 0.000 0.024
#> ERR866175 1 0.0692 0.715 0.976 0.004 0.000 0.000 0.000 0.020
#> ERR862983 3 0.4145 0.759 0.208 0.000 0.736 0.000 0.012 0.044
#> ERR866158 3 0.4145 0.759 0.208 0.000 0.736 0.000 0.012 0.044
#> ERR866176 3 0.4145 0.759 0.208 0.000 0.736 0.000 0.012 0.044
#> ERR862984 3 0.4081 0.760 0.208 0.000 0.740 0.000 0.012 0.040
#> ERR866159 3 0.4145 0.759 0.208 0.000 0.736 0.000 0.012 0.044
#> ERR866177 3 0.4145 0.759 0.208 0.000 0.736 0.000 0.012 0.044
#> ERR862985 1 0.0692 0.715 0.976 0.004 0.000 0.000 0.000 0.020
#> ERR866160 1 0.0692 0.715 0.976 0.004 0.000 0.000 0.000 0.020
#> ERR866178 1 0.0692 0.715 0.976 0.004 0.000 0.000 0.000 0.020
#> ERR862986 1 0.1082 0.709 0.956 0.004 0.000 0.000 0.000 0.040
#> ERR866161 1 0.0692 0.715 0.976 0.004 0.000 0.000 0.000 0.020
#> ERR866179 1 0.0692 0.715 0.976 0.004 0.000 0.000 0.000 0.020
#> ERR862987 2 0.5283 0.670 0.000 0.648 0.016 0.000 0.172 0.164
#> ERR866162 2 0.5283 0.670 0.000 0.648 0.016 0.000 0.172 0.164
#> ERR866180 2 0.5252 0.671 0.000 0.652 0.016 0.000 0.172 0.160
#> ERR862988 2 0.5121 0.671 0.000 0.668 0.016 0.000 0.172 0.144
#> ERR866163 2 0.5283 0.670 0.000 0.648 0.016 0.000 0.172 0.164
#> ERR866181 2 0.5283 0.670 0.000 0.648 0.016 0.000 0.172 0.164
#> ERR862989 1 0.2856 0.724 0.844 0.004 0.012 0.000 0.004 0.136
#> ERR866164 1 0.2856 0.724 0.844 0.004 0.012 0.000 0.004 0.136
#> ERR866182 1 0.2815 0.725 0.848 0.004 0.012 0.000 0.004 0.132
#> ERR862990 1 0.2856 0.724 0.844 0.004 0.012 0.000 0.004 0.136
#> ERR866165 1 0.2815 0.725 0.848 0.004 0.012 0.000 0.004 0.132
#> ERR866183 1 0.2856 0.724 0.844 0.004 0.012 0.000 0.004 0.136
#> ERR862991 2 0.5283 0.670 0.000 0.648 0.016 0.000 0.172 0.164
#> ERR866166 2 0.5283 0.672 0.000 0.648 0.016 0.000 0.168 0.168
#> ERR866184 2 0.5313 0.670 0.000 0.644 0.016 0.000 0.172 0.168
#> ERR862992 2 0.5283 0.670 0.000 0.648 0.016 0.000 0.172 0.164
#> ERR866167 2 0.5283 0.670 0.000 0.648 0.016 0.000 0.172 0.164
#> ERR866185 2 0.5283 0.670 0.000 0.648 0.016 0.000 0.172 0.164
Heatmaps for the consensus matrix. It visualizes the probability of two
samples to be in a same group.
consensus_heatmap(res, k = 2)

consensus_heatmap(res, k = 3)

consensus_heatmap(res, k = 4)

consensus_heatmap(res, k = 5)

consensus_heatmap(res, k = 6)

Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)

membership_heatmap(res, k = 3)

membership_heatmap(res, k = 4)

membership_heatmap(res, k = 5)

membership_heatmap(res, k = 6)

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)

get_signatures(res, k = 3)

get_signatures(res, k = 4)

get_signatures(res, k = 5)

get_signatures(res, k = 6)

Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)

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

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

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

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

Compare the overlap of signatures from different k:
compare_signatures(res)

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.
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:
which_row
: row indices corresponding to the input matrix.
fdr
: FDR for the differential test.
mean_x
: The mean value in group x.
scaled_mean_x
: The mean value in group x after rows are scaled.
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")

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

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

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

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

Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)

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"]
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 15818 rows and 107 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)

The plots are:
- The first row: a plot of the ECDF (empirical cumulative distribution
function) curves of the consensus matrix for each
k
and the heatmap of
predicted classes for each k
.
- The second row: heatmaps of the consensus matrix for each
k
.
- The third row: heatmaps of the membership matrix for each
k
.
- The fouth row: heatmaps of the signatures for each
k
.
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:
- ECDF curves of the consensus matrix for each
k
;
- 1-PAC. The PAC
score
measures the proportion of the ambiguous subgrouping.
- Mean silhouette score.
- Concordance. The mean probability of fiting the consensus class ids in all
partitions.
- Area increased. Denote \(A_k\) as the area under the ECDF curve for current
k
, the area increased is defined as \(A_k - A_{k-1}\).
- Rand index. The percent of pairs of samples that are both in a same cluster
or both are not in a same cluster in the partition of k and k-1.
- Jaccard index. The ratio of pairs of samples are both in a same cluster in
the partition of k and k-1 and the pairs of samples are both in a same
cluster in the partition k or k-1.
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)

The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 1.000 1.000 1.000 0.4978 0.503 0.503
#> 3 3 0.744 0.789 0.890 0.2345 0.867 0.741
#> 4 4 0.711 0.810 0.875 0.1005 0.939 0.846
#> 5 5 0.683 0.723 0.822 0.0759 0.942 0.829
#> 6 6 0.635 0.613 0.771 0.0501 0.987 0.956
suggest_best_k()
suggests the best \(k\) based on these statistics. The rules are as follows:
- All \(k\) with Jaccard index larger than 0.95 are removed because increasing
\(k\) does not provide enough extra information. If all \(k\) are removed, it is
marked as no subgroup is detected.
- For all \(k\) with 1-PAC score larger than 0.9, the maximal \(k\) is taken as
the best \(k\), and other \(k\) are marked as optional \(k\).
- If it does not fit the second rule. The \(k\) with the maximal vote of the
highest 1-PAC score, highest mean silhouette, and highest concordance is
taken as the best \(k\).
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
#> ERR862939 1 0.0000 1.000 1.000 0.000
#> ERR862957 1 0.0000 1.000 1.000 0.000
#> ERR878007 1 0.0000 1.000 1.000 0.000
#> ERR862940 1 0.0000 1.000 1.000 0.000
#> ERR862958 1 0.0000 1.000 1.000 0.000
#> ERR878008 1 0.0000 1.000 1.000 0.000
#> ERR862941 2 0.0000 1.000 0.000 1.000
#> ERR862959 2 0.0000 1.000 0.000 1.000
#> ERR878009 2 0.0000 1.000 0.000 1.000
#> ERR862942 2 0.0000 1.000 0.000 1.000
#> ERR862960 2 0.0000 1.000 0.000 1.000
#> ERR878010 2 0.0000 1.000 0.000 1.000
#> ERR862943 1 0.0000 1.000 1.000 0.000
#> ERR862961 1 0.0000 1.000 1.000 0.000
#> ERR878011 1 0.0000 1.000 1.000 0.000
#> ERR862944 1 0.0000 1.000 1.000 0.000
#> ERR862962 1 0.0000 1.000 1.000 0.000
#> ERR878012 1 0.0000 1.000 1.000 0.000
#> ERR862945 1 0.0000 1.000 1.000 0.000
#> ERR862963 1 0.0000 1.000 1.000 0.000
#> ERR878013 1 0.0000 1.000 1.000 0.000
#> ERR862946 1 0.0000 1.000 1.000 0.000
#> ERR862964 1 0.0000 1.000 1.000 0.000
#> ERR878014 1 0.0000 1.000 1.000 0.000
#> ERR862947 2 0.0000 1.000 0.000 1.000
#> ERR862965 2 0.0000 1.000 0.000 1.000
#> ERR878015 2 0.0000 1.000 0.000 1.000
#> ERR862948 2 0.0000 1.000 0.000 1.000
#> ERR862966 2 0.0000 1.000 0.000 1.000
#> ERR878016 2 0.0000 1.000 0.000 1.000
#> ERR862949 2 0.0000 1.000 0.000 1.000
#> ERR862967 2 0.0000 1.000 0.000 1.000
#> ERR878017 2 0.0000 1.000 0.000 1.000
#> ERR862950 2 0.0000 1.000 0.000 1.000
#> ERR862968 2 0.0000 1.000 0.000 1.000
#> ERR878018 2 0.0000 1.000 0.000 1.000
#> ERR862951 2 0.0672 0.992 0.008 0.992
#> ERR862969 2 0.0000 1.000 0.000 1.000
#> ERR878019 2 0.0000 1.000 0.000 1.000
#> ERR862952 2 0.0000 1.000 0.000 1.000
#> ERR862970 2 0.0376 0.996 0.004 0.996
#> ERR878020 2 0.0000 1.000 0.000 1.000
#> ERR862953 2 0.0000 1.000 0.000 1.000
#> ERR862971 2 0.0000 1.000 0.000 1.000
#> ERR878021 2 0.0000 1.000 0.000 1.000
#> ERR862954 2 0.0000 1.000 0.000 1.000
#> ERR862972 2 0.0000 1.000 0.000 1.000
#> ERR878022 2 0.0000 1.000 0.000 1.000
#> ERR862955 2 0.0000 1.000 0.000 1.000
#> ERR862973 2 0.0000 1.000 0.000 1.000
#> ERR878023 2 0.0000 1.000 0.000 1.000
#> ERR862956 2 0.0000 1.000 0.000 1.000
#> ERR862974 2 0.0000 1.000 0.000 1.000
#> ERR878024 2 0.0000 1.000 0.000 1.000
#> ERR862975 1 0.0000 1.000 1.000 0.000
#> ERR866150 1 0.0000 1.000 1.000 0.000
#> ERR866168 1 0.0000 1.000 1.000 0.000
#> ERR862976 1 0.0000 1.000 1.000 0.000
#> ERR866151 1 0.0000 1.000 1.000 0.000
#> ERR866169 1 0.0000 1.000 1.000 0.000
#> ERR862977 2 0.0000 1.000 0.000 1.000
#> ERR866152 2 0.0000 1.000 0.000 1.000
#> ERR866170 2 0.0000 1.000 0.000 1.000
#> ERR862978 2 0.0000 1.000 0.000 1.000
#> ERR866153 2 0.0000 1.000 0.000 1.000
#> ERR866171 2 0.0000 1.000 0.000 1.000
#> ERR862979 2 0.0000 1.000 0.000 1.000
#> ERR866154 2 0.0000 1.000 0.000 1.000
#> ERR866172 2 0.0000 1.000 0.000 1.000
#> ERR862980 2 0.0000 1.000 0.000 1.000
#> ERR866155 2 0.0000 1.000 0.000 1.000
#> ERR866173 2 0.0000 1.000 0.000 1.000
#> ERR862981 1 0.0000 1.000 1.000 0.000
#> ERR866156 1 0.0000 1.000 1.000 0.000
#> ERR866174 1 0.0000 1.000 1.000 0.000
#> ERR866157 1 0.0938 0.988 0.988 0.012
#> ERR866175 1 0.0000 1.000 1.000 0.000
#> ERR862983 1 0.0000 1.000 1.000 0.000
#> ERR866158 1 0.0000 1.000 1.000 0.000
#> ERR866176 1 0.0000 1.000 1.000 0.000
#> ERR862984 1 0.0000 1.000 1.000 0.000
#> ERR866159 1 0.0000 1.000 1.000 0.000
#> ERR866177 1 0.0000 1.000 1.000 0.000
#> ERR862985 1 0.0000 1.000 1.000 0.000
#> ERR866160 1 0.0000 1.000 1.000 0.000
#> ERR866178 1 0.0000 1.000 1.000 0.000
#> ERR862986 1 0.0000 1.000 1.000 0.000
#> ERR866161 1 0.0000 1.000 1.000 0.000
#> ERR866179 1 0.0000 1.000 1.000 0.000
#> ERR862987 2 0.0000 1.000 0.000 1.000
#> ERR866162 2 0.0000 1.000 0.000 1.000
#> ERR866180 2 0.0000 1.000 0.000 1.000
#> ERR862988 2 0.0000 1.000 0.000 1.000
#> ERR866163 2 0.0000 1.000 0.000 1.000
#> ERR866181 2 0.0000 1.000 0.000 1.000
#> ERR862989 1 0.0000 1.000 1.000 0.000
#> ERR866164 1 0.0000 1.000 1.000 0.000
#> ERR866182 1 0.0000 1.000 1.000 0.000
#> ERR862990 1 0.0000 1.000 1.000 0.000
#> ERR866165 1 0.0000 1.000 1.000 0.000
#> ERR866183 1 0.0000 1.000 1.000 0.000
#> ERR862991 2 0.0000 1.000 0.000 1.000
#> ERR866166 2 0.0000 1.000 0.000 1.000
#> ERR866184 2 0.0000 1.000 0.000 1.000
#> ERR862992 2 0.0000 1.000 0.000 1.000
#> ERR866167 2 0.0000 1.000 0.000 1.000
#> ERR866185 2 0.0000 1.000 0.000 1.000
show/hide code output
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> ERR862939 3 0.000 0.76097 0.000 0.000 1.000
#> ERR862957 3 0.000 0.76097 0.000 0.000 1.000
#> ERR878007 3 0.000 0.76097 0.000 0.000 1.000
#> ERR862940 3 0.000 0.76097 0.000 0.000 1.000
#> ERR862958 3 0.000 0.76097 0.000 0.000 1.000
#> ERR878008 3 0.000 0.76097 0.000 0.000 1.000
#> ERR862941 2 0.000 0.97000 0.000 1.000 0.000
#> ERR862959 2 0.000 0.97000 0.000 1.000 0.000
#> ERR878009 2 0.000 0.97000 0.000 1.000 0.000
#> ERR862942 2 0.000 0.97000 0.000 1.000 0.000
#> ERR862960 2 0.000 0.97000 0.000 1.000 0.000
#> ERR878010 2 0.000 0.97000 0.000 1.000 0.000
#> ERR862943 3 0.319 0.78973 0.112 0.000 0.888
#> ERR862961 3 0.319 0.78973 0.112 0.000 0.888
#> ERR878011 3 0.319 0.78973 0.112 0.000 0.888
#> ERR862944 3 0.319 0.78973 0.112 0.000 0.888
#> ERR862962 3 0.319 0.78973 0.112 0.000 0.888
#> ERR878012 3 0.319 0.78973 0.112 0.000 0.888
#> ERR862945 3 0.319 0.78973 0.112 0.000 0.888
#> ERR862963 3 0.319 0.78973 0.112 0.000 0.888
#> ERR878013 3 0.319 0.78973 0.112 0.000 0.888
#> ERR862946 3 0.319 0.78973 0.112 0.000 0.888
#> ERR862964 3 0.319 0.78973 0.112 0.000 0.888
#> ERR878014 3 0.319 0.78973 0.112 0.000 0.888
#> ERR862947 2 0.000 0.97000 0.000 1.000 0.000
#> ERR862965 2 0.000 0.97000 0.000 1.000 0.000
#> ERR878015 2 0.000 0.97000 0.000 1.000 0.000
#> ERR862948 2 0.000 0.97000 0.000 1.000 0.000
#> ERR862966 2 0.000 0.97000 0.000 1.000 0.000
#> ERR878016 2 0.000 0.97000 0.000 1.000 0.000
#> ERR862949 2 0.000 0.97000 0.000 1.000 0.000
#> ERR862967 2 0.000 0.97000 0.000 1.000 0.000
#> ERR878017 2 0.000 0.97000 0.000 1.000 0.000
#> ERR862950 2 0.000 0.97000 0.000 1.000 0.000
#> ERR862968 2 0.000 0.97000 0.000 1.000 0.000
#> ERR878018 2 0.000 0.97000 0.000 1.000 0.000
#> ERR862951 1 0.555 0.62746 0.768 0.212 0.020
#> ERR862969 2 0.630 -0.00717 0.476 0.524 0.000
#> ERR878019 1 0.559 0.57080 0.696 0.304 0.000
#> ERR862952 1 0.691 0.56597 0.656 0.308 0.036
#> ERR862970 1 0.651 0.57452 0.676 0.300 0.024
#> ERR878020 1 0.556 0.58211 0.700 0.300 0.000
#> ERR862953 2 0.480 0.71329 0.220 0.780 0.000
#> ERR862971 2 0.418 0.78646 0.172 0.828 0.000
#> ERR878021 2 0.475 0.72115 0.216 0.784 0.000
#> ERR862954 2 0.341 0.85034 0.124 0.876 0.000
#> ERR862972 2 0.506 0.67413 0.244 0.756 0.000
#> ERR878022 2 0.186 0.92238 0.052 0.948 0.000
#> ERR862955 2 0.000 0.97000 0.000 1.000 0.000
#> ERR862973 2 0.000 0.97000 0.000 1.000 0.000
#> ERR878023 2 0.000 0.97000 0.000 1.000 0.000
#> ERR862956 2 0.000 0.97000 0.000 1.000 0.000
#> ERR862974 2 0.000 0.97000 0.000 1.000 0.000
#> ERR878024 2 0.000 0.97000 0.000 1.000 0.000
#> ERR862975 1 0.207 0.70331 0.940 0.000 0.060
#> ERR866150 1 0.263 0.71395 0.916 0.000 0.084
#> ERR866168 1 0.271 0.71496 0.912 0.000 0.088
#> ERR862976 1 0.280 0.71440 0.908 0.000 0.092
#> ERR866151 1 0.271 0.71496 0.912 0.000 0.088
#> ERR866169 1 0.280 0.71446 0.908 0.000 0.092
#> ERR862977 2 0.000 0.97000 0.000 1.000 0.000
#> ERR866152 2 0.000 0.97000 0.000 1.000 0.000
#> ERR866170 2 0.000 0.97000 0.000 1.000 0.000
#> ERR862978 2 0.000 0.97000 0.000 1.000 0.000
#> ERR866153 2 0.000 0.97000 0.000 1.000 0.000
#> ERR866171 2 0.000 0.97000 0.000 1.000 0.000
#> ERR862979 2 0.000 0.97000 0.000 1.000 0.000
#> ERR866154 2 0.000 0.97000 0.000 1.000 0.000
#> ERR866172 2 0.000 0.97000 0.000 1.000 0.000
#> ERR862980 2 0.000 0.97000 0.000 1.000 0.000
#> ERR866155 2 0.000 0.97000 0.000 1.000 0.000
#> ERR866173 2 0.000 0.97000 0.000 1.000 0.000
#> ERR862981 3 0.610 0.44588 0.392 0.000 0.608
#> ERR866156 3 0.627 0.30549 0.456 0.000 0.544
#> ERR866174 1 0.629 -0.16615 0.532 0.000 0.468
#> ERR866157 3 0.619 0.38837 0.420 0.000 0.580
#> ERR866175 3 0.601 0.47650 0.372 0.000 0.628
#> ERR862983 3 0.341 0.78648 0.124 0.000 0.876
#> ERR866158 3 0.341 0.78648 0.124 0.000 0.876
#> ERR866176 3 0.341 0.78648 0.124 0.000 0.876
#> ERR862984 3 0.334 0.78812 0.120 0.000 0.880
#> ERR866159 3 0.341 0.78648 0.124 0.000 0.876
#> ERR866177 3 0.341 0.78648 0.124 0.000 0.876
#> ERR862985 3 0.576 0.53035 0.328 0.000 0.672
#> ERR866160 3 0.568 0.54132 0.316 0.000 0.684
#> ERR866178 3 0.611 0.43933 0.396 0.000 0.604
#> ERR862986 3 0.595 0.49205 0.360 0.000 0.640
#> ERR866161 3 0.603 0.46965 0.376 0.000 0.624
#> ERR866179 3 0.613 0.43097 0.400 0.000 0.600
#> ERR862987 2 0.000 0.97000 0.000 1.000 0.000
#> ERR866162 2 0.000 0.97000 0.000 1.000 0.000
#> ERR866180 2 0.000 0.97000 0.000 1.000 0.000
#> ERR862988 2 0.000 0.97000 0.000 1.000 0.000
#> ERR866163 2 0.000 0.97000 0.000 1.000 0.000
#> ERR866181 2 0.000 0.97000 0.000 1.000 0.000
#> ERR862989 3 0.631 0.02051 0.496 0.000 0.504
#> ERR866164 1 0.543 0.53726 0.716 0.000 0.284
#> ERR866182 1 0.562 0.50504 0.692 0.000 0.308
#> ERR862990 1 0.576 0.45907 0.672 0.000 0.328
#> ERR866165 1 0.418 0.66571 0.828 0.000 0.172
#> ERR866183 1 0.334 0.70167 0.880 0.000 0.120
#> ERR862991 2 0.000 0.97000 0.000 1.000 0.000
#> ERR866166 2 0.000 0.97000 0.000 1.000 0.000
#> ERR866184 2 0.000 0.97000 0.000 1.000 0.000
#> ERR862992 2 0.000 0.97000 0.000 1.000 0.000
#> ERR866167 2 0.000 0.97000 0.000 1.000 0.000
#> ERR866185 2 0.000 0.97000 0.000 1.000 0.000
show/hide code output
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> ERR862939 3 0.4158 0.695 0.008 0.000 0.768 0.224
#> ERR862957 3 0.4194 0.690 0.008 0.000 0.764 0.228
#> ERR878007 3 0.4194 0.690 0.008 0.000 0.764 0.228
#> ERR862940 3 0.4194 0.690 0.008 0.000 0.764 0.228
#> ERR862958 3 0.4123 0.699 0.008 0.000 0.772 0.220
#> ERR878008 3 0.4194 0.690 0.008 0.000 0.764 0.228
#> ERR862941 2 0.0336 0.923 0.008 0.992 0.000 0.000
#> ERR862959 2 0.0895 0.922 0.020 0.976 0.000 0.004
#> ERR878009 2 0.0336 0.923 0.008 0.992 0.000 0.000
#> ERR862942 2 0.0657 0.923 0.012 0.984 0.000 0.004
#> ERR862960 2 0.0336 0.923 0.008 0.992 0.000 0.000
#> ERR878010 2 0.0188 0.923 0.004 0.996 0.000 0.000
#> ERR862943 3 0.0000 0.898 0.000 0.000 1.000 0.000
#> ERR862961 3 0.0000 0.898 0.000 0.000 1.000 0.000
#> ERR878011 3 0.0000 0.898 0.000 0.000 1.000 0.000
#> ERR862944 3 0.0000 0.898 0.000 0.000 1.000 0.000
#> ERR862962 3 0.0000 0.898 0.000 0.000 1.000 0.000
#> ERR878012 3 0.0000 0.898 0.000 0.000 1.000 0.000
#> ERR862945 3 0.0336 0.897 0.000 0.000 0.992 0.008
#> ERR862963 3 0.0336 0.897 0.000 0.000 0.992 0.008
#> ERR878013 3 0.0336 0.897 0.000 0.000 0.992 0.008
#> ERR862946 3 0.0336 0.897 0.000 0.000 0.992 0.008
#> ERR862964 3 0.0336 0.897 0.000 0.000 0.992 0.008
#> ERR878014 3 0.0336 0.897 0.000 0.000 0.992 0.008
#> ERR862947 2 0.0336 0.922 0.008 0.992 0.000 0.000
#> ERR862965 2 0.0336 0.922 0.008 0.992 0.000 0.000
#> ERR878015 2 0.0336 0.922 0.008 0.992 0.000 0.000
#> ERR862948 2 0.0336 0.922 0.008 0.992 0.000 0.000
#> ERR862966 2 0.0336 0.922 0.008 0.992 0.000 0.000
#> ERR878016 2 0.0336 0.922 0.008 0.992 0.000 0.000
#> ERR862949 2 0.0469 0.922 0.012 0.988 0.000 0.000
#> ERR862967 2 0.0188 0.922 0.004 0.996 0.000 0.000
#> ERR878017 2 0.0336 0.922 0.008 0.992 0.000 0.000
#> ERR862950 2 0.0336 0.922 0.008 0.992 0.000 0.000
#> ERR862968 2 0.0336 0.922 0.008 0.992 0.000 0.000
#> ERR878018 2 0.0336 0.922 0.008 0.992 0.000 0.000
#> ERR862951 1 0.4547 0.612 0.816 0.056 0.012 0.116
#> ERR862969 1 0.7202 0.239 0.464 0.396 0.000 0.140
#> ERR878019 1 0.5110 0.568 0.764 0.132 0.000 0.104
#> ERR862952 1 0.7881 0.414 0.584 0.188 0.056 0.172
#> ERR862970 1 0.6244 0.518 0.712 0.168 0.032 0.088
#> ERR878020 1 0.5058 0.572 0.768 0.104 0.000 0.128
#> ERR862953 2 0.7502 0.155 0.356 0.456 0.000 0.188
#> ERR862971 2 0.6920 0.430 0.316 0.552 0.000 0.132
#> ERR878021 2 0.6960 0.195 0.420 0.468 0.000 0.112
#> ERR862954 2 0.6637 0.535 0.260 0.608 0.000 0.132
#> ERR862972 2 0.7235 0.370 0.288 0.532 0.000 0.180
#> ERR878022 2 0.5657 0.666 0.244 0.688 0.000 0.068
#> ERR862955 2 0.3107 0.878 0.080 0.884 0.000 0.036
#> ERR862973 2 0.2830 0.887 0.060 0.900 0.000 0.040
#> ERR878023 2 0.2830 0.885 0.060 0.900 0.000 0.040
#> ERR862956 2 0.2623 0.891 0.064 0.908 0.000 0.028
#> ERR862974 2 0.3037 0.880 0.076 0.888 0.000 0.036
#> ERR878024 2 0.2660 0.889 0.056 0.908 0.000 0.036
#> ERR862975 1 0.5280 0.705 0.752 0.000 0.124 0.124
#> ERR866150 1 0.5174 0.707 0.760 0.000 0.124 0.116
#> ERR866168 1 0.5116 0.708 0.764 0.000 0.128 0.108
#> ERR862976 1 0.5277 0.707 0.752 0.000 0.132 0.116
#> ERR866151 1 0.5382 0.704 0.744 0.000 0.132 0.124
#> ERR866169 1 0.5434 0.706 0.740 0.000 0.132 0.128
#> ERR862977 2 0.3525 0.862 0.100 0.860 0.000 0.040
#> ERR866152 2 0.3399 0.867 0.092 0.868 0.000 0.040
#> ERR866170 2 0.2983 0.880 0.068 0.892 0.000 0.040
#> ERR862978 2 0.3308 0.870 0.092 0.872 0.000 0.036
#> ERR866153 2 0.3333 0.869 0.088 0.872 0.000 0.040
#> ERR866171 2 0.3266 0.872 0.084 0.876 0.000 0.040
#> ERR862979 2 0.0817 0.921 0.024 0.976 0.000 0.000
#> ERR866154 2 0.0895 0.922 0.020 0.976 0.000 0.004
#> ERR866172 2 0.0657 0.923 0.012 0.984 0.000 0.004
#> ERR862980 2 0.1174 0.919 0.020 0.968 0.000 0.012
#> ERR866155 2 0.0804 0.922 0.008 0.980 0.000 0.012
#> ERR866173 2 0.0927 0.922 0.016 0.976 0.000 0.008
#> ERR862981 4 0.4094 0.915 0.056 0.000 0.116 0.828
#> ERR866156 4 0.3333 0.932 0.040 0.000 0.088 0.872
#> ERR866174 4 0.3547 0.907 0.072 0.000 0.064 0.864
#> ERR866157 4 0.3333 0.935 0.040 0.000 0.088 0.872
#> ERR866175 4 0.3612 0.928 0.044 0.000 0.100 0.856
#> ERR862983 3 0.0672 0.894 0.008 0.000 0.984 0.008
#> ERR866158 3 0.0672 0.894 0.008 0.000 0.984 0.008
#> ERR866176 3 0.0672 0.894 0.008 0.000 0.984 0.008
#> ERR862984 3 0.0672 0.894 0.008 0.000 0.984 0.008
#> ERR866159 3 0.0672 0.894 0.008 0.000 0.984 0.008
#> ERR866177 3 0.0672 0.894 0.008 0.000 0.984 0.008
#> ERR862985 4 0.4485 0.879 0.052 0.000 0.152 0.796
#> ERR866160 4 0.3856 0.907 0.032 0.000 0.136 0.832
#> ERR866178 4 0.3996 0.931 0.060 0.000 0.104 0.836
#> ERR862986 4 0.3399 0.934 0.040 0.000 0.092 0.868
#> ERR866161 4 0.2882 0.934 0.024 0.000 0.084 0.892
#> ERR866179 4 0.2662 0.935 0.016 0.000 0.084 0.900
#> ERR862987 2 0.0336 0.922 0.008 0.992 0.000 0.000
#> ERR866162 2 0.0336 0.922 0.008 0.992 0.000 0.000
#> ERR866180 2 0.0376 0.923 0.004 0.992 0.000 0.004
#> ERR862988 2 0.0000 0.923 0.000 1.000 0.000 0.000
#> ERR866163 2 0.0000 0.923 0.000 1.000 0.000 0.000
#> ERR866181 2 0.0376 0.923 0.004 0.992 0.000 0.004
#> ERR862989 3 0.6215 0.189 0.328 0.000 0.600 0.072
#> ERR866164 1 0.6507 0.429 0.520 0.000 0.404 0.076
#> ERR866182 1 0.7198 0.505 0.520 0.000 0.320 0.160
#> ERR862990 1 0.6658 0.496 0.532 0.000 0.376 0.092
#> ERR866165 1 0.6096 0.675 0.680 0.000 0.184 0.136
#> ERR866183 1 0.5382 0.696 0.744 0.000 0.132 0.124
#> ERR862991 2 0.0188 0.923 0.004 0.996 0.000 0.000
#> ERR866166 2 0.0672 0.923 0.008 0.984 0.000 0.008
#> ERR866184 2 0.0376 0.922 0.004 0.992 0.000 0.004
#> ERR862992 2 0.0336 0.922 0.000 0.992 0.000 0.008
#> ERR866167 2 0.0188 0.923 0.000 0.996 0.000 0.004
#> ERR866185 2 0.0188 0.923 0.000 0.996 0.000 0.004
show/hide code output
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> ERR862939 3 0.4774 0.6197 0.004 0.000 0.688 0.264 0.044
#> ERR862957 3 0.4798 0.6141 0.004 0.000 0.684 0.268 0.044
#> ERR878007 3 0.4774 0.6199 0.004 0.000 0.688 0.264 0.044
#> ERR862940 3 0.4649 0.6450 0.004 0.000 0.708 0.244 0.044
#> ERR862958 3 0.4701 0.6355 0.004 0.000 0.700 0.252 0.044
#> ERR878008 3 0.4821 0.6072 0.004 0.000 0.680 0.272 0.044
#> ERR862941 2 0.1638 0.8533 0.004 0.932 0.000 0.000 0.064
#> ERR862959 2 0.1502 0.8561 0.004 0.940 0.000 0.000 0.056
#> ERR878009 2 0.1251 0.8566 0.008 0.956 0.000 0.000 0.036
#> ERR862942 2 0.1638 0.8563 0.004 0.932 0.000 0.000 0.064
#> ERR862960 2 0.1908 0.8452 0.000 0.908 0.000 0.000 0.092
#> ERR878010 2 0.1270 0.8591 0.000 0.948 0.000 0.000 0.052
#> ERR862943 3 0.0000 0.8501 0.000 0.000 1.000 0.000 0.000
#> ERR862961 3 0.0000 0.8501 0.000 0.000 1.000 0.000 0.000
#> ERR878011 3 0.0162 0.8499 0.004 0.000 0.996 0.000 0.000
#> ERR862944 3 0.0162 0.8499 0.004 0.000 0.996 0.000 0.000
#> ERR862962 3 0.0000 0.8501 0.000 0.000 1.000 0.000 0.000
#> ERR878012 3 0.0162 0.8499 0.004 0.000 0.996 0.000 0.000
#> ERR862945 3 0.0807 0.8484 0.012 0.000 0.976 0.000 0.012
#> ERR862963 3 0.0807 0.8484 0.012 0.000 0.976 0.000 0.012
#> ERR878013 3 0.0807 0.8484 0.012 0.000 0.976 0.000 0.012
#> ERR862946 3 0.0807 0.8484 0.012 0.000 0.976 0.000 0.012
#> ERR862964 3 0.0807 0.8484 0.012 0.000 0.976 0.000 0.012
#> ERR878014 3 0.0807 0.8484 0.012 0.000 0.976 0.000 0.012
#> ERR862947 2 0.0510 0.8497 0.000 0.984 0.000 0.000 0.016
#> ERR862965 2 0.0404 0.8503 0.000 0.988 0.000 0.000 0.012
#> ERR878015 2 0.0404 0.8503 0.000 0.988 0.000 0.000 0.012
#> ERR862948 2 0.0404 0.8503 0.000 0.988 0.000 0.000 0.012
#> ERR862966 2 0.0404 0.8503 0.000 0.988 0.000 0.000 0.012
#> ERR878016 2 0.0404 0.8503 0.000 0.988 0.000 0.000 0.012
#> ERR862949 2 0.1671 0.8448 0.000 0.924 0.000 0.000 0.076
#> ERR862967 2 0.1571 0.8547 0.004 0.936 0.000 0.000 0.060
#> ERR878017 2 0.0703 0.8503 0.000 0.976 0.000 0.000 0.024
#> ERR862950 2 0.1894 0.8366 0.008 0.920 0.000 0.000 0.072
#> ERR862968 2 0.1282 0.8491 0.004 0.952 0.000 0.000 0.044
#> ERR878018 2 0.1282 0.8484 0.004 0.952 0.000 0.000 0.044
#> ERR862951 1 0.6510 0.3824 0.576 0.060 0.008 0.056 0.300
#> ERR862969 1 0.8128 -0.3615 0.324 0.288 0.000 0.096 0.292
#> ERR878019 1 0.6413 0.2154 0.532 0.108 0.000 0.024 0.336
#> ERR862952 5 0.8531 -0.0327 0.324 0.136 0.032 0.124 0.384
#> ERR862970 5 0.7534 -0.1929 0.404 0.088 0.020 0.072 0.416
#> ERR878020 1 0.6965 0.2758 0.508 0.092 0.004 0.060 0.336
#> ERR862953 5 0.7080 0.6268 0.108 0.276 0.000 0.084 0.532
#> ERR862971 5 0.7087 0.6195 0.100 0.352 0.000 0.072 0.476
#> ERR878021 5 0.6808 0.6526 0.140 0.284 0.000 0.040 0.536
#> ERR862954 5 0.6899 0.5784 0.104 0.368 0.000 0.052 0.476
#> ERR862972 5 0.7270 0.6373 0.148 0.300 0.000 0.064 0.488
#> ERR878022 5 0.6178 0.4858 0.096 0.404 0.000 0.012 0.488
#> ERR862955 2 0.3992 0.6228 0.004 0.712 0.000 0.004 0.280
#> ERR862973 2 0.4402 0.5754 0.012 0.688 0.000 0.008 0.292
#> ERR878023 2 0.3756 0.6772 0.000 0.744 0.000 0.008 0.248
#> ERR862956 2 0.3715 0.6684 0.000 0.736 0.000 0.004 0.260
#> ERR862974 2 0.4102 0.5873 0.004 0.692 0.000 0.004 0.300
#> ERR878024 2 0.3461 0.7045 0.000 0.772 0.000 0.004 0.224
#> ERR862975 1 0.3146 0.7012 0.876 0.000 0.056 0.040 0.028
#> ERR866150 1 0.1983 0.7063 0.924 0.000 0.060 0.008 0.008
#> ERR866168 1 0.2395 0.7049 0.912 0.000 0.048 0.024 0.016
#> ERR862976 1 0.2949 0.7061 0.880 0.000 0.072 0.012 0.036
#> ERR866151 1 0.2032 0.7062 0.924 0.000 0.052 0.020 0.004
#> ERR866169 1 0.2139 0.7069 0.920 0.000 0.056 0.012 0.012
#> ERR862977 2 0.4456 0.4977 0.000 0.660 0.000 0.020 0.320
#> ERR866152 2 0.4084 0.5288 0.000 0.668 0.000 0.004 0.328
#> ERR866170 2 0.3928 0.6027 0.000 0.700 0.000 0.004 0.296
#> ERR862978 2 0.4066 0.5335 0.000 0.672 0.000 0.004 0.324
#> ERR866153 2 0.4029 0.5579 0.000 0.680 0.000 0.004 0.316
#> ERR866171 2 0.3949 0.5866 0.000 0.696 0.000 0.004 0.300
#> ERR862979 2 0.3086 0.7736 0.004 0.816 0.000 0.000 0.180
#> ERR866154 2 0.3039 0.7490 0.000 0.808 0.000 0.000 0.192
#> ERR866172 2 0.2462 0.8120 0.008 0.880 0.000 0.000 0.112
#> ERR862980 2 0.3039 0.7860 0.012 0.836 0.000 0.000 0.152
#> ERR866155 2 0.2130 0.8389 0.012 0.908 0.000 0.000 0.080
#> ERR866173 2 0.2179 0.8281 0.000 0.896 0.000 0.004 0.100
#> ERR862981 4 0.4308 0.8788 0.104 0.000 0.040 0.804 0.052
#> ERR866156 4 0.3641 0.8831 0.076 0.000 0.020 0.844 0.060
#> ERR866174 4 0.3674 0.8912 0.068 0.000 0.024 0.844 0.064
#> ERR866157 4 0.3624 0.9074 0.052 0.000 0.020 0.844 0.084
#> ERR866175 4 0.3596 0.9122 0.052 0.000 0.036 0.852 0.060
#> ERR862983 3 0.2266 0.8208 0.064 0.000 0.912 0.016 0.008
#> ERR866158 3 0.2464 0.8073 0.092 0.000 0.892 0.012 0.004
#> ERR866176 3 0.2568 0.8042 0.092 0.000 0.888 0.016 0.004
#> ERR862984 3 0.2393 0.8116 0.080 0.000 0.900 0.016 0.004
#> ERR866159 3 0.2349 0.8121 0.084 0.000 0.900 0.012 0.004
#> ERR866177 3 0.2568 0.8042 0.092 0.000 0.888 0.016 0.004
#> ERR862985 4 0.4019 0.8970 0.060 0.000 0.048 0.828 0.064
#> ERR866160 4 0.4131 0.8824 0.044 0.000 0.076 0.820 0.060
#> ERR866178 4 0.3154 0.9125 0.028 0.000 0.048 0.876 0.048
#> ERR862986 4 0.2940 0.9170 0.032 0.000 0.040 0.888 0.040
#> ERR866161 4 0.2263 0.9167 0.020 0.000 0.036 0.920 0.024
#> ERR866179 4 0.2188 0.9154 0.024 0.000 0.024 0.924 0.028
#> ERR862987 2 0.0703 0.8541 0.000 0.976 0.000 0.000 0.024
#> ERR866162 2 0.0794 0.8553 0.000 0.972 0.000 0.000 0.028
#> ERR866180 2 0.0609 0.8572 0.000 0.980 0.000 0.000 0.020
#> ERR862988 2 0.0963 0.8574 0.000 0.964 0.000 0.000 0.036
#> ERR866163 2 0.0880 0.8560 0.000 0.968 0.000 0.000 0.032
#> ERR866181 2 0.1043 0.8570 0.000 0.960 0.000 0.000 0.040
#> ERR862989 3 0.7053 0.0793 0.316 0.000 0.508 0.080 0.096
#> ERR866164 1 0.6310 0.5033 0.568 0.000 0.312 0.040 0.080
#> ERR866182 1 0.7164 0.5364 0.532 0.000 0.264 0.100 0.104
#> ERR862990 1 0.6686 0.5488 0.564 0.000 0.280 0.068 0.088
#> ERR866165 1 0.5721 0.6596 0.696 0.000 0.160 0.056 0.088
#> ERR866183 1 0.4741 0.6846 0.780 0.000 0.068 0.056 0.096
#> ERR862991 2 0.1197 0.8583 0.000 0.952 0.000 0.000 0.048
#> ERR866166 2 0.1341 0.8532 0.000 0.944 0.000 0.000 0.056
#> ERR866184 2 0.1121 0.8551 0.000 0.956 0.000 0.000 0.044
#> ERR862992 2 0.1544 0.8544 0.000 0.932 0.000 0.000 0.068
#> ERR866167 2 0.1197 0.8550 0.000 0.952 0.000 0.000 0.048
#> ERR866185 2 0.1478 0.8501 0.000 0.936 0.000 0.000 0.064
show/hide code output
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> ERR862939 3 0.4812 0.6201 0.000 0.000 0.660 0.252 0.008 0.080
#> ERR862957 3 0.4834 0.6144 0.000 0.000 0.656 0.256 0.008 0.080
#> ERR878007 3 0.4812 0.6201 0.000 0.000 0.660 0.252 0.008 0.080
#> ERR862940 3 0.4768 0.6279 0.000 0.000 0.668 0.244 0.008 0.080
#> ERR862958 3 0.4746 0.6334 0.000 0.000 0.672 0.240 0.008 0.080
#> ERR878008 3 0.4812 0.6201 0.000 0.000 0.660 0.252 0.008 0.080
#> ERR862941 2 0.2954 0.7330 0.000 0.844 0.000 0.000 0.108 0.048
#> ERR862959 2 0.2923 0.7307 0.000 0.848 0.000 0.000 0.100 0.052
#> ERR878009 2 0.2843 0.7465 0.000 0.848 0.000 0.000 0.116 0.036
#> ERR862942 2 0.3304 0.7228 0.000 0.816 0.000 0.004 0.140 0.040
#> ERR862960 2 0.2948 0.7397 0.000 0.848 0.000 0.000 0.092 0.060
#> ERR878010 2 0.2480 0.7550 0.000 0.872 0.000 0.000 0.104 0.024
#> ERR862943 3 0.1026 0.8353 0.012 0.000 0.968 0.004 0.008 0.008
#> ERR862961 3 0.0696 0.8350 0.008 0.000 0.980 0.004 0.004 0.004
#> ERR878011 3 0.0665 0.8355 0.008 0.000 0.980 0.008 0.000 0.004
#> ERR862944 3 0.0665 0.8355 0.008 0.000 0.980 0.008 0.000 0.004
#> ERR862962 3 0.0665 0.8355 0.008 0.000 0.980 0.008 0.000 0.004
#> ERR878012 3 0.0665 0.8355 0.008 0.000 0.980 0.008 0.000 0.004
#> ERR862945 3 0.1167 0.8296 0.008 0.000 0.960 0.000 0.012 0.020
#> ERR862963 3 0.1167 0.8296 0.008 0.000 0.960 0.000 0.012 0.020
#> ERR878013 3 0.1167 0.8296 0.008 0.000 0.960 0.000 0.012 0.020
#> ERR862946 3 0.1167 0.8296 0.008 0.000 0.960 0.000 0.012 0.020
#> ERR862964 3 0.1167 0.8296 0.008 0.000 0.960 0.000 0.012 0.020
#> ERR878014 3 0.1167 0.8296 0.008 0.000 0.960 0.000 0.012 0.020
#> ERR862947 2 0.0508 0.7393 0.000 0.984 0.000 0.000 0.012 0.004
#> ERR862965 2 0.0603 0.7401 0.000 0.980 0.000 0.000 0.016 0.004
#> ERR878015 2 0.0603 0.7401 0.000 0.980 0.000 0.000 0.016 0.004
#> ERR862948 2 0.0777 0.7403 0.000 0.972 0.000 0.000 0.024 0.004
#> ERR862966 2 0.0603 0.7401 0.000 0.980 0.000 0.000 0.016 0.004
#> ERR878016 2 0.0603 0.7401 0.000 0.980 0.000 0.000 0.016 0.004
#> ERR862949 2 0.2680 0.7282 0.000 0.868 0.000 0.000 0.076 0.056
#> ERR862967 2 0.2856 0.7040 0.000 0.856 0.000 0.000 0.076 0.068
#> ERR878017 2 0.1895 0.7424 0.000 0.912 0.000 0.000 0.072 0.016
#> ERR862950 2 0.2433 0.7272 0.000 0.884 0.000 0.000 0.072 0.044
#> ERR862968 2 0.2660 0.7119 0.000 0.868 0.000 0.000 0.084 0.048
#> ERR878018 2 0.2190 0.7364 0.000 0.900 0.000 0.000 0.060 0.040
#> ERR862951 1 0.7408 -0.1987 0.464 0.080 0.000 0.052 0.124 0.280
#> ERR862969 2 0.8583 -0.5469 0.196 0.284 0.004 0.068 0.168 0.280
#> ERR878019 1 0.7875 -0.2817 0.384 0.084 0.000 0.052 0.212 0.268
#> ERR862952 6 0.8161 0.4956 0.148 0.120 0.028 0.068 0.156 0.480
#> ERR862970 6 0.7947 0.5132 0.220 0.068 0.024 0.028 0.264 0.396
#> ERR878020 1 0.7441 -0.2769 0.396 0.056 0.000 0.036 0.200 0.312
#> ERR862953 5 0.7096 0.4431 0.060 0.172 0.000 0.048 0.528 0.192
#> ERR862971 5 0.7210 0.5106 0.044 0.204 0.000 0.048 0.484 0.220
#> ERR878021 5 0.6578 0.5676 0.088 0.176 0.000 0.012 0.572 0.152
#> ERR862954 5 0.7322 0.5527 0.076 0.248 0.000 0.024 0.452 0.200
#> ERR862972 5 0.7592 0.4672 0.076 0.200 0.000 0.048 0.448 0.228
#> ERR878022 5 0.6560 0.5363 0.048 0.320 0.000 0.008 0.484 0.140
#> ERR862955 2 0.5116 0.2654 0.000 0.524 0.000 0.004 0.400 0.072
#> ERR862973 2 0.4836 0.3507 0.000 0.564 0.000 0.004 0.380 0.052
#> ERR878023 2 0.4131 0.4358 0.000 0.600 0.000 0.000 0.384 0.016
#> ERR862956 2 0.4658 0.3908 0.000 0.568 0.000 0.000 0.384 0.048
#> ERR862974 2 0.4954 0.3045 0.004 0.544 0.000 0.004 0.400 0.048
#> ERR878024 2 0.4015 0.4685 0.000 0.616 0.000 0.000 0.372 0.012
#> ERR862975 1 0.2688 0.5752 0.892 0.000 0.020 0.016 0.024 0.048
#> ERR866150 1 0.1579 0.5963 0.944 0.000 0.020 0.004 0.008 0.024
#> ERR866168 1 0.1768 0.5883 0.936 0.000 0.012 0.012 0.008 0.032
#> ERR862976 1 0.3052 0.5786 0.868 0.000 0.040 0.016 0.012 0.064
#> ERR866151 1 0.1053 0.5955 0.964 0.000 0.020 0.000 0.004 0.012
#> ERR866169 1 0.1528 0.5908 0.944 0.000 0.016 0.000 0.012 0.028
#> ERR862977 2 0.5345 -0.0264 0.004 0.468 0.000 0.008 0.452 0.068
#> ERR866152 2 0.4695 0.1944 0.000 0.508 0.000 0.000 0.448 0.044
#> ERR866170 2 0.4580 0.2475 0.004 0.528 0.000 0.000 0.440 0.028
#> ERR862978 2 0.4517 0.2497 0.000 0.524 0.000 0.000 0.444 0.032
#> ERR866153 2 0.4381 0.2513 0.000 0.536 0.000 0.000 0.440 0.024
#> ERR866171 2 0.4723 0.1183 0.000 0.488 0.000 0.004 0.472 0.036
#> ERR862979 2 0.3963 0.6516 0.000 0.756 0.000 0.000 0.164 0.080
#> ERR866154 2 0.3946 0.6912 0.000 0.756 0.000 0.000 0.168 0.076
#> ERR866172 2 0.3295 0.7258 0.000 0.816 0.000 0.000 0.128 0.056
#> ERR862980 2 0.4286 0.6562 0.008 0.744 0.000 0.000 0.156 0.092
#> ERR866155 2 0.3416 0.7146 0.004 0.812 0.000 0.004 0.144 0.036
#> ERR866173 2 0.3227 0.7254 0.000 0.824 0.000 0.000 0.116 0.060
#> ERR862981 4 0.4518 0.8036 0.068 0.000 0.024 0.776 0.032 0.100
#> ERR866156 4 0.3657 0.8451 0.052 0.000 0.012 0.828 0.020 0.088
#> ERR866174 4 0.3710 0.8374 0.064 0.000 0.000 0.812 0.024 0.100
#> ERR866157 4 0.4414 0.8142 0.048 0.000 0.004 0.768 0.056 0.124
#> ERR866175 4 0.4853 0.8116 0.064 0.000 0.016 0.752 0.068 0.100
#> ERR862983 3 0.2598 0.8010 0.080 0.000 0.884 0.016 0.004 0.016
#> ERR866158 3 0.2670 0.7949 0.084 0.000 0.880 0.012 0.008 0.016
#> ERR866176 3 0.2685 0.7957 0.080 0.000 0.880 0.016 0.004 0.020
#> ERR862984 3 0.2431 0.8036 0.068 0.000 0.896 0.016 0.004 0.016
#> ERR866159 3 0.2651 0.7956 0.084 0.000 0.880 0.016 0.004 0.016
#> ERR866177 3 0.2651 0.7956 0.084 0.000 0.880 0.016 0.004 0.016
#> ERR862985 4 0.4132 0.8234 0.048 0.000 0.036 0.800 0.016 0.100
#> ERR866160 4 0.3522 0.8217 0.024 0.000 0.044 0.844 0.020 0.068
#> ERR866178 4 0.3810 0.8442 0.036 0.000 0.008 0.812 0.032 0.112
#> ERR862986 4 0.3447 0.8456 0.028 0.000 0.016 0.844 0.028 0.084
#> ERR866161 4 0.2534 0.8569 0.012 0.000 0.008 0.896 0.032 0.052
#> ERR866179 4 0.2247 0.8565 0.012 0.000 0.008 0.912 0.024 0.044
#> ERR862987 2 0.1588 0.7554 0.000 0.924 0.000 0.000 0.072 0.004
#> ERR866162 2 0.1700 0.7516 0.000 0.916 0.000 0.000 0.080 0.004
#> ERR866180 2 0.1588 0.7522 0.000 0.924 0.000 0.000 0.072 0.004
#> ERR862988 2 0.1349 0.7543 0.000 0.940 0.000 0.000 0.056 0.004
#> ERR866163 2 0.1812 0.7547 0.000 0.912 0.000 0.000 0.080 0.008
#> ERR866181 2 0.1866 0.7548 0.000 0.908 0.000 0.000 0.084 0.008
#> ERR862989 3 0.7005 -0.0811 0.332 0.000 0.444 0.048 0.028 0.148
#> ERR866164 1 0.6661 0.3560 0.524 0.000 0.288 0.048 0.032 0.108
#> ERR866182 1 0.6981 0.3147 0.476 0.000 0.276 0.076 0.012 0.160
#> ERR862990 1 0.6933 0.3576 0.520 0.000 0.260 0.040 0.060 0.120
#> ERR866165 1 0.5445 0.5228 0.688 0.000 0.096 0.028 0.028 0.160
#> ERR866183 1 0.4368 0.5545 0.764 0.000 0.044 0.028 0.012 0.152
#> ERR862991 2 0.2350 0.7531 0.000 0.880 0.000 0.000 0.100 0.020
#> ERR866166 2 0.2664 0.7404 0.000 0.848 0.000 0.000 0.136 0.016
#> ERR866184 2 0.2442 0.7383 0.000 0.852 0.000 0.000 0.144 0.004
#> ERR862992 2 0.2257 0.7531 0.000 0.876 0.000 0.000 0.116 0.008
#> ERR866167 2 0.2482 0.7324 0.000 0.848 0.000 0.000 0.148 0.004
#> ERR866185 2 0.2531 0.7418 0.000 0.856 0.000 0.000 0.132 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)

consensus_heatmap(res, k = 3)

consensus_heatmap(res, k = 4)

consensus_heatmap(res, k = 5)

consensus_heatmap(res, k = 6)

Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)

membership_heatmap(res, k = 3)

membership_heatmap(res, k = 4)

membership_heatmap(res, k = 5)

membership_heatmap(res, k = 6)

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)

get_signatures(res, k = 3)

get_signatures(res, k = 4)

get_signatures(res, k = 5)

get_signatures(res, k = 6)

Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)

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

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

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

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

Compare the overlap of signatures from different k:
compare_signatures(res)

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.
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:
which_row
: row indices corresponding to the input matrix.
fdr
: FDR for the differential test.
mean_x
: The mean value in group x.
scaled_mean_x
: The mean value in group x after rows are scaled.
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")

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

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

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

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

Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)

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"]
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 15818 rows and 107 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'CV' method.
#> Subgroups are detected by 'pam' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 2.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)

The plots are:
- The first row: a plot of the ECDF (empirical cumulative distribution
function) curves of the consensus matrix for each
k
and the heatmap of
predicted classes for each k
.
- The second row: heatmaps of the consensus matrix for each
k
.
- The third row: heatmaps of the membership matrix for each
k
.
- The fouth row: heatmaps of the signatures for each
k
.
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:
- ECDF curves of the consensus matrix for each
k
;
- 1-PAC. The PAC
score
measures the proportion of the ambiguous subgrouping.
- Mean silhouette score.
- Concordance. The mean probability of fiting the consensus class ids in all
partitions.
- Area increased. Denote \(A_k\) as the area under the ECDF curve for current
k
, the area increased is defined as \(A_k - A_{k-1}\).
- Rand index. The percent of pairs of samples that are both in a same cluster
or both are not in a same cluster in the partition of k and k-1.
- Jaccard index. The ratio of pairs of samples are both in a same cluster in
the partition of k and k-1 and the pairs of samples are both in a same
cluster in the partition k or k-1.
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)

The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 1.000 0.993 0.994 0.3509 0.649 0.649
#> 3 3 0.859 0.848 0.948 0.2202 0.865 0.799
#> 4 4 0.808 0.891 0.946 0.4396 0.798 0.650
#> 5 5 0.735 0.861 0.910 0.0547 0.987 0.968
#> 6 6 0.814 0.890 0.918 0.0596 0.942 0.847
suggest_best_k()
suggests the best \(k\) based on these statistics. The rules are as follows:
- All \(k\) with Jaccard index larger than 0.95 are removed because increasing
\(k\) does not provide enough extra information. If all \(k\) are removed, it is
marked as no subgroup is detected.
- For all \(k\) with 1-PAC score larger than 0.9, the maximal \(k\) is taken as
the best \(k\), and other \(k\) are marked as optional \(k\).
- If it does not fit the second rule. The \(k\) with the maximal vote of the
highest 1-PAC score, highest mean silhouette, and highest concordance is
taken as the best \(k\).
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
#> ERR862939 1 0.1184 0.996 0.984 0.016
#> ERR862957 1 0.1184 0.996 0.984 0.016
#> ERR878007 1 0.1184 0.996 0.984 0.016
#> ERR862940 1 0.1184 0.996 0.984 0.016
#> ERR862958 1 0.1184 0.996 0.984 0.016
#> ERR878008 1 0.1184 0.996 0.984 0.016
#> ERR862941 2 0.0000 0.996 0.000 1.000
#> ERR862959 2 0.0000 0.996 0.000 1.000
#> ERR878009 2 0.0000 0.996 0.000 1.000
#> ERR862942 2 0.0000 0.996 0.000 1.000
#> ERR862960 2 0.0000 0.996 0.000 1.000
#> ERR878010 2 0.0000 0.996 0.000 1.000
#> ERR862943 1 0.1184 0.996 0.984 0.016
#> ERR862961 1 0.1184 0.996 0.984 0.016
#> ERR878011 1 0.1184 0.996 0.984 0.016
#> ERR862944 1 0.1184 0.996 0.984 0.016
#> ERR862962 1 0.1184 0.996 0.984 0.016
#> ERR878012 1 0.1184 0.996 0.984 0.016
#> ERR862945 1 0.0000 0.987 1.000 0.000
#> ERR862963 1 0.0000 0.987 1.000 0.000
#> ERR878013 1 0.0000 0.987 1.000 0.000
#> ERR862946 1 0.0000 0.987 1.000 0.000
#> ERR862964 1 0.0000 0.987 1.000 0.000
#> ERR878014 1 0.0000 0.987 1.000 0.000
#> ERR862947 2 0.0000 0.996 0.000 1.000
#> ERR862965 2 0.0000 0.996 0.000 1.000
#> ERR878015 2 0.0000 0.996 0.000 1.000
#> ERR862948 2 0.0000 0.996 0.000 1.000
#> ERR862966 2 0.0000 0.996 0.000 1.000
#> ERR878016 2 0.0000 0.996 0.000 1.000
#> ERR862949 2 0.0000 0.996 0.000 1.000
#> ERR862967 2 0.0000 0.996 0.000 1.000
#> ERR878017 2 0.0000 0.996 0.000 1.000
#> ERR862950 2 0.0000 0.996 0.000 1.000
#> ERR862968 2 0.0000 0.996 0.000 1.000
#> ERR878018 2 0.0000 0.996 0.000 1.000
#> ERR862951 2 0.0000 0.996 0.000 1.000
#> ERR862969 2 0.0000 0.996 0.000 1.000
#> ERR878019 2 0.0000 0.996 0.000 1.000
#> ERR862952 2 0.0000 0.996 0.000 1.000
#> ERR862970 2 0.0000 0.996 0.000 1.000
#> ERR878020 2 0.0000 0.996 0.000 1.000
#> ERR862953 2 0.0000 0.996 0.000 1.000
#> ERR862971 2 0.0000 0.996 0.000 1.000
#> ERR878021 2 0.0000 0.996 0.000 1.000
#> ERR862954 2 0.0000 0.996 0.000 1.000
#> ERR862972 2 0.0000 0.996 0.000 1.000
#> ERR878022 2 0.0000 0.996 0.000 1.000
#> ERR862955 2 0.0000 0.996 0.000 1.000
#> ERR862973 2 0.0000 0.996 0.000 1.000
#> ERR878023 2 0.0000 0.996 0.000 1.000
#> ERR862956 2 0.0000 0.996 0.000 1.000
#> ERR862974 2 0.0000 0.996 0.000 1.000
#> ERR878024 2 0.0000 0.996 0.000 1.000
#> ERR862975 2 0.1414 0.981 0.020 0.980
#> ERR866150 2 0.2043 0.971 0.032 0.968
#> ERR866168 2 0.2043 0.971 0.032 0.968
#> ERR862976 2 0.2043 0.971 0.032 0.968
#> ERR866151 2 0.1633 0.978 0.024 0.976
#> ERR866169 2 0.2043 0.971 0.032 0.968
#> ERR862977 2 0.0000 0.996 0.000 1.000
#> ERR866152 2 0.0000 0.996 0.000 1.000
#> ERR866170 2 0.0000 0.996 0.000 1.000
#> ERR862978 2 0.0000 0.996 0.000 1.000
#> ERR866153 2 0.0000 0.996 0.000 1.000
#> ERR866171 2 0.0000 0.996 0.000 1.000
#> ERR862979 2 0.0000 0.996 0.000 1.000
#> ERR866154 2 0.0000 0.996 0.000 1.000
#> ERR866172 2 0.0000 0.996 0.000 1.000
#> ERR862980 2 0.0000 0.996 0.000 1.000
#> ERR866155 2 0.0000 0.996 0.000 1.000
#> ERR866173 2 0.0000 0.996 0.000 1.000
#> ERR862981 2 0.0000 0.996 0.000 1.000
#> ERR866156 2 0.0376 0.993 0.004 0.996
#> ERR866174 2 0.0000 0.996 0.000 1.000
#> ERR866157 2 0.0000 0.996 0.000 1.000
#> ERR866175 2 0.0376 0.993 0.004 0.996
#> ERR862983 1 0.1184 0.996 0.984 0.016
#> ERR866158 1 0.1184 0.996 0.984 0.016
#> ERR866176 1 0.1184 0.996 0.984 0.016
#> ERR862984 1 0.1184 0.996 0.984 0.016
#> ERR866159 1 0.1184 0.996 0.984 0.016
#> ERR866177 1 0.1184 0.996 0.984 0.016
#> ERR862985 2 0.0000 0.996 0.000 1.000
#> ERR866160 2 0.0938 0.987 0.012 0.988
#> ERR866178 2 0.0000 0.996 0.000 1.000
#> ERR862986 2 0.0000 0.996 0.000 1.000
#> ERR866161 2 0.0000 0.996 0.000 1.000
#> ERR866179 2 0.0376 0.993 0.004 0.996
#> ERR862987 2 0.0000 0.996 0.000 1.000
#> ERR866162 2 0.0000 0.996 0.000 1.000
#> ERR866180 2 0.0000 0.996 0.000 1.000
#> ERR862988 2 0.0000 0.996 0.000 1.000
#> ERR866163 2 0.0000 0.996 0.000 1.000
#> ERR866181 2 0.0000 0.996 0.000 1.000
#> ERR862989 2 0.2236 0.967 0.036 0.964
#> ERR866164 2 0.2043 0.971 0.032 0.968
#> ERR866182 2 0.0376 0.993 0.004 0.996
#> ERR862990 2 0.2043 0.971 0.032 0.968
#> ERR866165 2 0.1843 0.974 0.028 0.972
#> ERR866183 2 0.0376 0.993 0.004 0.996
#> ERR862991 2 0.0000 0.996 0.000 1.000
#> ERR866166 2 0.0000 0.996 0.000 1.000
#> ERR866184 2 0.0000 0.996 0.000 1.000
#> ERR862992 2 0.0000 0.996 0.000 1.000
#> ERR866167 2 0.0000 0.996 0.000 1.000
#> ERR866185 2 0.0000 0.996 0.000 1.000
show/hide code output
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> ERR862939 1 0.0000 0.7419 1.000 0.000 0
#> ERR862957 1 0.0000 0.7419 1.000 0.000 0
#> ERR878007 1 0.0000 0.7419 1.000 0.000 0
#> ERR862940 1 0.0000 0.7419 1.000 0.000 0
#> ERR862958 1 0.0000 0.7419 1.000 0.000 0
#> ERR878008 1 0.0000 0.7419 1.000 0.000 0
#> ERR862941 2 0.0000 0.9630 0.000 1.000 0
#> ERR862959 2 0.0000 0.9630 0.000 1.000 0
#> ERR878009 2 0.0000 0.9630 0.000 1.000 0
#> ERR862942 2 0.0000 0.9630 0.000 1.000 0
#> ERR862960 2 0.0000 0.9630 0.000 1.000 0
#> ERR878010 2 0.0000 0.9630 0.000 1.000 0
#> ERR862943 1 0.0000 0.7419 1.000 0.000 0
#> ERR862961 1 0.0000 0.7419 1.000 0.000 0
#> ERR878011 1 0.0000 0.7419 1.000 0.000 0
#> ERR862944 1 0.0000 0.7419 1.000 0.000 0
#> ERR862962 1 0.0000 0.7419 1.000 0.000 0
#> ERR878012 1 0.0000 0.7419 1.000 0.000 0
#> ERR862945 3 0.0000 1.0000 0.000 0.000 1
#> ERR862963 3 0.0000 1.0000 0.000 0.000 1
#> ERR878013 3 0.0000 1.0000 0.000 0.000 1
#> ERR862946 3 0.0000 1.0000 0.000 0.000 1
#> ERR862964 3 0.0000 1.0000 0.000 0.000 1
#> ERR878014 3 0.0000 1.0000 0.000 0.000 1
#> ERR862947 2 0.0000 0.9630 0.000 1.000 0
#> ERR862965 2 0.0000 0.9630 0.000 1.000 0
#> ERR878015 2 0.0000 0.9630 0.000 1.000 0
#> ERR862948 2 0.0000 0.9630 0.000 1.000 0
#> ERR862966 2 0.0000 0.9630 0.000 1.000 0
#> ERR878016 2 0.0000 0.9630 0.000 1.000 0
#> ERR862949 2 0.0000 0.9630 0.000 1.000 0
#> ERR862967 2 0.0000 0.9630 0.000 1.000 0
#> ERR878017 2 0.0000 0.9630 0.000 1.000 0
#> ERR862950 2 0.0000 0.9630 0.000 1.000 0
#> ERR862968 2 0.0000 0.9630 0.000 1.000 0
#> ERR878018 2 0.0000 0.9630 0.000 1.000 0
#> ERR862951 2 0.0592 0.9565 0.012 0.988 0
#> ERR862969 2 0.0747 0.9539 0.016 0.984 0
#> ERR878019 2 0.0892 0.9509 0.020 0.980 0
#> ERR862952 2 0.0000 0.9630 0.000 1.000 0
#> ERR862970 2 0.0592 0.9565 0.012 0.988 0
#> ERR878020 2 0.0237 0.9609 0.004 0.996 0
#> ERR862953 2 0.0000 0.9630 0.000 1.000 0
#> ERR862971 2 0.0424 0.9588 0.008 0.992 0
#> ERR878021 2 0.0747 0.9538 0.016 0.984 0
#> ERR862954 2 0.0424 0.9588 0.008 0.992 0
#> ERR862972 2 0.0892 0.9509 0.020 0.980 0
#> ERR878022 2 0.0000 0.9630 0.000 1.000 0
#> ERR862955 2 0.0000 0.9630 0.000 1.000 0
#> ERR862973 2 0.0000 0.9630 0.000 1.000 0
#> ERR878023 2 0.0000 0.9630 0.000 1.000 0
#> ERR862956 2 0.0000 0.9630 0.000 1.000 0
#> ERR862974 2 0.0000 0.9630 0.000 1.000 0
#> ERR878024 2 0.0000 0.9630 0.000 1.000 0
#> ERR862975 2 0.6291 -0.0799 0.468 0.532 0
#> ERR866150 1 0.6274 0.3071 0.544 0.456 0
#> ERR866168 1 0.6280 0.2966 0.540 0.460 0
#> ERR862976 1 0.6274 0.3071 0.544 0.456 0
#> ERR866151 2 0.6307 -0.1593 0.488 0.512 0
#> ERR866169 1 0.6280 0.2969 0.540 0.460 0
#> ERR862977 2 0.0000 0.9630 0.000 1.000 0
#> ERR866152 2 0.0000 0.9630 0.000 1.000 0
#> ERR866170 2 0.0000 0.9630 0.000 1.000 0
#> ERR862978 2 0.0000 0.9630 0.000 1.000 0
#> ERR866153 2 0.0000 0.9630 0.000 1.000 0
#> ERR866171 2 0.0000 0.9630 0.000 1.000 0
#> ERR862979 2 0.0000 0.9630 0.000 1.000 0
#> ERR866154 2 0.0000 0.9630 0.000 1.000 0
#> ERR866172 2 0.0000 0.9630 0.000 1.000 0
#> ERR862980 2 0.0000 0.9630 0.000 1.000 0
#> ERR866155 2 0.0000 0.9630 0.000 1.000 0
#> ERR866173 2 0.0000 0.9630 0.000 1.000 0
#> ERR862981 2 0.0892 0.9515 0.020 0.980 0
#> ERR866156 2 0.2066 0.9142 0.060 0.940 0
#> ERR866174 2 0.1529 0.9348 0.040 0.960 0
#> ERR866157 2 0.0892 0.9509 0.020 0.980 0
#> ERR866175 2 0.1031 0.9485 0.024 0.976 0
#> ERR862983 1 0.0000 0.7419 1.000 0.000 0
#> ERR866158 1 0.0000 0.7419 1.000 0.000 0
#> ERR866176 1 0.0000 0.7419 1.000 0.000 0
#> ERR862984 1 0.0000 0.7419 1.000 0.000 0
#> ERR866159 1 0.0000 0.7419 1.000 0.000 0
#> ERR866177 1 0.0000 0.7419 1.000 0.000 0
#> ERR862985 2 0.1289 0.9422 0.032 0.968 0
#> ERR866160 2 0.3192 0.8516 0.112 0.888 0
#> ERR866178 2 0.1289 0.9416 0.032 0.968 0
#> ERR862986 2 0.0592 0.9565 0.012 0.988 0
#> ERR866161 2 0.1163 0.9450 0.028 0.972 0
#> ERR866179 2 0.4002 0.7826 0.160 0.840 0
#> ERR862987 2 0.0000 0.9630 0.000 1.000 0
#> ERR866162 2 0.0000 0.9630 0.000 1.000 0
#> ERR866180 2 0.0000 0.9630 0.000 1.000 0
#> ERR862988 2 0.0000 0.9630 0.000 1.000 0
#> ERR866163 2 0.0000 0.9630 0.000 1.000 0
#> ERR866181 2 0.0000 0.9630 0.000 1.000 0
#> ERR862989 1 0.6252 0.3307 0.556 0.444 0
#> ERR866164 1 0.6291 0.2679 0.532 0.468 0
#> ERR866182 2 0.5138 0.6148 0.252 0.748 0
#> ERR862990 1 0.6286 0.2849 0.536 0.464 0
#> ERR866165 2 0.5905 0.3635 0.352 0.648 0
#> ERR866183 2 0.4178 0.7615 0.172 0.828 0
#> ERR862991 2 0.0000 0.9630 0.000 1.000 0
#> ERR866166 2 0.0000 0.9630 0.000 1.000 0
#> ERR866184 2 0.0000 0.9630 0.000 1.000 0
#> ERR862992 2 0.0000 0.9630 0.000 1.000 0
#> ERR866167 2 0.0000 0.9630 0.000 1.000 0
#> ERR866185 2 0.0000 0.9630 0.000 1.000 0
show/hide code output
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> ERR862939 3 0.0469 0.949 0.012 0.000 0.988 0
#> ERR862957 3 0.1302 0.937 0.044 0.000 0.956 0
#> ERR878007 3 0.1211 0.940 0.040 0.000 0.960 0
#> ERR862940 3 0.0592 0.949 0.016 0.000 0.984 0
#> ERR862958 3 0.0469 0.949 0.012 0.000 0.988 0
#> ERR878008 3 0.0592 0.949 0.016 0.000 0.984 0
#> ERR862941 2 0.0000 0.940 0.000 1.000 0.000 0
#> ERR862959 2 0.0592 0.935 0.016 0.984 0.000 0
#> ERR878009 2 0.0000 0.940 0.000 1.000 0.000 0
#> ERR862942 2 0.0000 0.940 0.000 1.000 0.000 0
#> ERR862960 2 0.0000 0.940 0.000 1.000 0.000 0
#> ERR878010 2 0.0000 0.940 0.000 1.000 0.000 0
#> ERR862943 3 0.0188 0.952 0.004 0.000 0.996 0
#> ERR862961 3 0.0188 0.952 0.004 0.000 0.996 0
#> ERR878011 3 0.0188 0.952 0.004 0.000 0.996 0
#> ERR862944 3 0.0000 0.952 0.000 0.000 1.000 0
#> ERR862962 3 0.0000 0.952 0.000 0.000 1.000 0
#> ERR878012 3 0.0188 0.952 0.004 0.000 0.996 0
#> ERR862945 4 0.0000 1.000 0.000 0.000 0.000 1
#> ERR862963 4 0.0000 1.000 0.000 0.000 0.000 1
#> ERR878013 4 0.0000 1.000 0.000 0.000 0.000 1
#> ERR862946 4 0.0000 1.000 0.000 0.000 0.000 1
#> ERR862964 4 0.0000 1.000 0.000 0.000 0.000 1
#> ERR878014 4 0.0000 1.000 0.000 0.000 0.000 1
#> ERR862947 2 0.0000 0.940 0.000 1.000 0.000 0
#> ERR862965 2 0.0000 0.940 0.000 1.000 0.000 0
#> ERR878015 2 0.0000 0.940 0.000 1.000 0.000 0
#> ERR862948 2 0.0000 0.940 0.000 1.000 0.000 0
#> ERR862966 2 0.0000 0.940 0.000 1.000 0.000 0
#> ERR878016 2 0.0000 0.940 0.000 1.000 0.000 0
#> ERR862949 2 0.0000 0.940 0.000 1.000 0.000 0
#> ERR862967 2 0.0000 0.940 0.000 1.000 0.000 0
#> ERR878017 2 0.0000 0.940 0.000 1.000 0.000 0
#> ERR862950 2 0.0000 0.940 0.000 1.000 0.000 0
#> ERR862968 2 0.0000 0.940 0.000 1.000 0.000 0
#> ERR878018 2 0.0000 0.940 0.000 1.000 0.000 0
#> ERR862951 2 0.3024 0.842 0.148 0.852 0.000 0
#> ERR862969 2 0.1867 0.895 0.072 0.928 0.000 0
#> ERR878019 1 0.4008 0.630 0.756 0.244 0.000 0
#> ERR862952 2 0.0000 0.940 0.000 1.000 0.000 0
#> ERR862970 2 0.3837 0.758 0.224 0.776 0.000 0
#> ERR878020 2 0.4164 0.681 0.264 0.736 0.000 0
#> ERR862953 2 0.2149 0.894 0.088 0.912 0.000 0
#> ERR862971 2 0.3172 0.833 0.160 0.840 0.000 0
#> ERR878021 2 0.3873 0.752 0.228 0.772 0.000 0
#> ERR862954 2 0.3688 0.781 0.208 0.792 0.000 0
#> ERR862972 2 0.4898 0.366 0.416 0.584 0.000 0
#> ERR878022 2 0.3444 0.808 0.184 0.816 0.000 0
#> ERR862955 2 0.0707 0.933 0.020 0.980 0.000 0
#> ERR862973 2 0.1792 0.907 0.068 0.932 0.000 0
#> ERR878023 2 0.2973 0.846 0.144 0.856 0.000 0
#> ERR862956 2 0.2760 0.861 0.128 0.872 0.000 0
#> ERR862974 2 0.1867 0.904 0.072 0.928 0.000 0
#> ERR878024 2 0.0000 0.940 0.000 1.000 0.000 0
#> ERR862975 1 0.0524 0.892 0.988 0.008 0.004 0
#> ERR866150 1 0.0817 0.886 0.976 0.000 0.024 0
#> ERR866168 1 0.0469 0.888 0.988 0.000 0.012 0
#> ERR862976 1 0.0817 0.887 0.976 0.000 0.024 0
#> ERR866151 1 0.0672 0.892 0.984 0.008 0.008 0
#> ERR866169 1 0.0469 0.888 0.988 0.000 0.012 0
#> ERR862977 2 0.1474 0.917 0.052 0.948 0.000 0
#> ERR866152 2 0.0592 0.935 0.016 0.984 0.000 0
#> ERR866170 2 0.0817 0.932 0.024 0.976 0.000 0
#> ERR862978 2 0.1022 0.928 0.032 0.968 0.000 0
#> ERR866153 2 0.2704 0.865 0.124 0.876 0.000 0
#> ERR866171 2 0.0707 0.934 0.020 0.980 0.000 0
#> ERR862979 2 0.0000 0.940 0.000 1.000 0.000 0
#> ERR866154 2 0.0000 0.940 0.000 1.000 0.000 0
#> ERR866172 2 0.0000 0.940 0.000 1.000 0.000 0
#> ERR862980 2 0.0000 0.940 0.000 1.000 0.000 0
#> ERR866155 2 0.0000 0.940 0.000 1.000 0.000 0
#> ERR866173 2 0.0336 0.938 0.008 0.992 0.000 0
#> ERR862981 1 0.4679 0.438 0.648 0.352 0.000 0
#> ERR866156 1 0.2915 0.842 0.892 0.080 0.028 0
#> ERR866174 1 0.2593 0.842 0.892 0.104 0.004 0
#> ERR866157 2 0.4967 0.244 0.452 0.548 0.000 0
#> ERR866175 2 0.4673 0.595 0.292 0.700 0.008 0
#> ERR862983 3 0.2345 0.894 0.100 0.000 0.900 0
#> ERR866158 3 0.2760 0.869 0.128 0.000 0.872 0
#> ERR866176 3 0.2760 0.868 0.128 0.000 0.872 0
#> ERR862984 3 0.0188 0.952 0.004 0.000 0.996 0
#> ERR866159 3 0.2647 0.877 0.120 0.000 0.880 0
#> ERR866177 3 0.1637 0.924 0.060 0.000 0.940 0
#> ERR862985 1 0.1716 0.874 0.936 0.064 0.000 0
#> ERR866160 1 0.2773 0.852 0.900 0.072 0.028 0
#> ERR866178 1 0.1118 0.887 0.964 0.036 0.000 0
#> ERR862986 1 0.3390 0.793 0.852 0.132 0.016 0
#> ERR866161 1 0.2530 0.829 0.888 0.112 0.000 0
#> ERR866179 1 0.0779 0.893 0.980 0.016 0.004 0
#> ERR862987 2 0.0000 0.940 0.000 1.000 0.000 0
#> ERR866162 2 0.0000 0.940 0.000 1.000 0.000 0
#> ERR866180 2 0.0000 0.940 0.000 1.000 0.000 0
#> ERR862988 2 0.0000 0.940 0.000 1.000 0.000 0
#> ERR866163 2 0.0000 0.940 0.000 1.000 0.000 0
#> ERR866181 2 0.0000 0.940 0.000 1.000 0.000 0
#> ERR862989 1 0.1389 0.870 0.952 0.000 0.048 0
#> ERR866164 1 0.1557 0.863 0.944 0.000 0.056 0
#> ERR866182 1 0.0336 0.891 0.992 0.008 0.000 0
#> ERR862990 1 0.1792 0.854 0.932 0.000 0.068 0
#> ERR866165 1 0.0524 0.891 0.988 0.004 0.008 0
#> ERR866183 1 0.0921 0.892 0.972 0.028 0.000 0
#> ERR862991 2 0.0000 0.940 0.000 1.000 0.000 0
#> ERR866166 2 0.0000 0.940 0.000 1.000 0.000 0
#> ERR866184 2 0.0000 0.940 0.000 1.000 0.000 0
#> ERR862992 2 0.0000 0.940 0.000 1.000 0.000 0
#> ERR866167 2 0.0000 0.940 0.000 1.000 0.000 0
#> ERR866185 2 0.0000 0.940 0.000 1.000 0.000 0
show/hide code output
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> ERR862939 5 0.3999 1.000 0.000 0.000 0.344 0 0.656
#> ERR862957 5 0.3999 1.000 0.000 0.000 0.344 0 0.656
#> ERR878007 5 0.3999 1.000 0.000 0.000 0.344 0 0.656
#> ERR862940 5 0.3999 1.000 0.000 0.000 0.344 0 0.656
#> ERR862958 5 0.3999 1.000 0.000 0.000 0.344 0 0.656
#> ERR878008 5 0.3999 1.000 0.000 0.000 0.344 0 0.656
#> ERR862941 2 0.0000 0.900 0.000 1.000 0.000 0 0.000
#> ERR862959 2 0.0510 0.897 0.016 0.984 0.000 0 0.000
#> ERR878009 2 0.0000 0.900 0.000 1.000 0.000 0 0.000
#> ERR862942 2 0.0000 0.900 0.000 1.000 0.000 0 0.000
#> ERR862960 2 0.0000 0.900 0.000 1.000 0.000 0 0.000
#> ERR878010 2 0.0000 0.900 0.000 1.000 0.000 0 0.000
#> ERR862943 3 0.0510 0.969 0.000 0.000 0.984 0 0.016
#> ERR862961 3 0.0000 0.981 0.000 0.000 1.000 0 0.000
#> ERR878011 3 0.0000 0.981 0.000 0.000 1.000 0 0.000
#> ERR862944 3 0.1544 0.892 0.000 0.000 0.932 0 0.068
#> ERR862962 3 0.0510 0.970 0.000 0.000 0.984 0 0.016
#> ERR878012 3 0.0880 0.950 0.000 0.000 0.968 0 0.032
#> ERR862945 4 0.0000 1.000 0.000 0.000 0.000 1 0.000
#> ERR862963 4 0.0000 1.000 0.000 0.000 0.000 1 0.000
#> ERR878013 4 0.0000 1.000 0.000 0.000 0.000 1 0.000
#> ERR862946 4 0.0000 1.000 0.000 0.000 0.000 1 0.000
#> ERR862964 4 0.0000 1.000 0.000 0.000 0.000 1 0.000
#> ERR878014 4 0.0000 1.000 0.000 0.000 0.000 1 0.000
#> ERR862947 2 0.3999 0.577 0.000 0.656 0.000 0 0.344
#> ERR862965 2 0.3999 0.577 0.000 0.656 0.000 0 0.344
#> ERR878015 2 0.3999 0.577 0.000 0.656 0.000 0 0.344
#> ERR862948 2 0.3999 0.577 0.000 0.656 0.000 0 0.344
#> ERR862966 2 0.3999 0.577 0.000 0.656 0.000 0 0.344
#> ERR878016 2 0.3999 0.577 0.000 0.656 0.000 0 0.344
#> ERR862949 2 0.0000 0.900 0.000 1.000 0.000 0 0.000
#> ERR862967 2 0.0000 0.900 0.000 1.000 0.000 0 0.000
#> ERR878017 2 0.0000 0.900 0.000 1.000 0.000 0 0.000
#> ERR862950 2 0.0000 0.900 0.000 1.000 0.000 0 0.000
#> ERR862968 2 0.0000 0.900 0.000 1.000 0.000 0 0.000
#> ERR878018 2 0.0000 0.900 0.000 1.000 0.000 0 0.000
#> ERR862951 2 0.2732 0.810 0.160 0.840 0.000 0 0.000
#> ERR862969 2 0.1544 0.867 0.068 0.932 0.000 0 0.000
#> ERR878019 1 0.3177 0.671 0.792 0.208 0.000 0 0.000
#> ERR862952 2 0.0162 0.899 0.004 0.996 0.000 0 0.000
#> ERR862970 2 0.3366 0.735 0.232 0.768 0.000 0 0.000
#> ERR878020 2 0.3586 0.678 0.264 0.736 0.000 0 0.000
#> ERR862953 2 0.2020 0.855 0.100 0.900 0.000 0 0.000
#> ERR862971 2 0.3039 0.781 0.192 0.808 0.000 0 0.000
#> ERR878021 2 0.3561 0.701 0.260 0.740 0.000 0 0.000
#> ERR862954 2 0.3424 0.729 0.240 0.760 0.000 0 0.000
#> ERR862972 2 0.4242 0.345 0.428 0.572 0.000 0 0.000
#> ERR878022 2 0.3242 0.757 0.216 0.784 0.000 0 0.000
#> ERR862955 2 0.0609 0.895 0.020 0.980 0.000 0 0.000
#> ERR862973 2 0.1671 0.869 0.076 0.924 0.000 0 0.000
#> ERR878023 2 0.2891 0.795 0.176 0.824 0.000 0 0.000
#> ERR862956 2 0.2732 0.810 0.160 0.840 0.000 0 0.000
#> ERR862974 2 0.1608 0.872 0.072 0.928 0.000 0 0.000
#> ERR878024 2 0.0000 0.900 0.000 1.000 0.000 0 0.000
#> ERR862975 1 0.0000 0.895 1.000 0.000 0.000 0 0.000
#> ERR866150 1 0.0609 0.893 0.980 0.000 0.020 0 0.000
#> ERR866168 1 0.0000 0.895 1.000 0.000 0.000 0 0.000
#> ERR862976 1 0.0404 0.895 0.988 0.000 0.012 0 0.000
#> ERR866151 1 0.0000 0.895 1.000 0.000 0.000 0 0.000
#> ERR866169 1 0.0000 0.895 1.000 0.000 0.000 0 0.000
#> ERR862977 2 0.1270 0.882 0.052 0.948 0.000 0 0.000
#> ERR866152 2 0.0510 0.897 0.016 0.984 0.000 0 0.000
#> ERR866170 2 0.0703 0.894 0.024 0.976 0.000 0 0.000
#> ERR862978 2 0.0963 0.889 0.036 0.964 0.000 0 0.000
#> ERR866153 2 0.2605 0.819 0.148 0.852 0.000 0 0.000
#> ERR866171 2 0.0703 0.894 0.024 0.976 0.000 0 0.000
#> ERR862979 2 0.0000 0.900 0.000 1.000 0.000 0 0.000
#> ERR866154 2 0.0000 0.900 0.000 1.000 0.000 0 0.000
#> ERR866172 2 0.0000 0.900 0.000 1.000 0.000 0 0.000
#> ERR862980 2 0.0000 0.900 0.000 1.000 0.000 0 0.000
#> ERR866155 2 0.0000 0.900 0.000 1.000 0.000 0 0.000
#> ERR866173 2 0.0290 0.898 0.008 0.992 0.000 0 0.000
#> ERR862981 1 0.4166 0.419 0.648 0.348 0.000 0 0.004
#> ERR866156 1 0.3054 0.838 0.876 0.060 0.012 0 0.052
#> ERR866174 1 0.2707 0.835 0.876 0.100 0.000 0 0.024
#> ERR866157 2 0.4273 0.293 0.448 0.552 0.000 0 0.000
#> ERR866175 2 0.3980 0.621 0.284 0.708 0.008 0 0.000
#> ERR862983 3 0.0000 0.981 0.000 0.000 1.000 0 0.000
#> ERR866158 3 0.0000 0.981 0.000 0.000 1.000 0 0.000
#> ERR866176 3 0.0000 0.981 0.000 0.000 1.000 0 0.000
#> ERR862984 3 0.0162 0.979 0.000 0.000 0.996 0 0.004
#> ERR866159 3 0.0000 0.981 0.000 0.000 1.000 0 0.000
#> ERR866177 3 0.0000 0.981 0.000 0.000 1.000 0 0.000
#> ERR862985 1 0.2193 0.863 0.912 0.060 0.000 0 0.028
#> ERR866160 1 0.2729 0.856 0.884 0.060 0.000 0 0.056
#> ERR866178 1 0.0510 0.894 0.984 0.016 0.000 0 0.000
#> ERR862986 1 0.2722 0.812 0.872 0.108 0.000 0 0.020
#> ERR866161 1 0.1851 0.848 0.912 0.088 0.000 0 0.000
#> ERR866179 1 0.0451 0.896 0.988 0.004 0.000 0 0.008
#> ERR862987 2 0.0000 0.900 0.000 1.000 0.000 0 0.000
#> ERR866162 2 0.0000 0.900 0.000 1.000 0.000 0 0.000
#> ERR866180 2 0.0000 0.900 0.000 1.000 0.000 0 0.000
#> ERR862988 2 0.0000 0.900 0.000 1.000 0.000 0 0.000
#> ERR866163 2 0.0000 0.900 0.000 1.000 0.000 0 0.000
#> ERR866181 2 0.0000 0.900 0.000 1.000 0.000 0 0.000
#> ERR862989 1 0.1628 0.869 0.936 0.000 0.056 0 0.008
#> ERR866164 1 0.2228 0.857 0.912 0.000 0.040 0 0.048
#> ERR866182 1 0.0000 0.895 1.000 0.000 0.000 0 0.000
#> ERR862990 1 0.2020 0.837 0.900 0.000 0.100 0 0.000
#> ERR866165 1 0.0290 0.895 0.992 0.000 0.008 0 0.000
#> ERR866183 1 0.1082 0.892 0.964 0.028 0.000 0 0.008
#> ERR862991 2 0.0000 0.900 0.000 1.000 0.000 0 0.000
#> ERR866166 2 0.0000 0.900 0.000 1.000 0.000 0 0.000
#> ERR866184 2 0.0000 0.900 0.000 1.000 0.000 0 0.000
#> ERR862992 2 0.0000 0.900 0.000 1.000 0.000 0 0.000
#> ERR866167 2 0.0000 0.900 0.000 1.000 0.000 0 0.000
#> ERR866185 2 0.0000 0.900 0.000 1.000 0.000 0 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
#> ERR862939 6 0.0000 1.000 0.000 0.000 0.000 0 0.000 1.000
#> ERR862957 6 0.0000 1.000 0.000 0.000 0.000 0 0.000 1.000
#> ERR878007 6 0.0000 1.000 0.000 0.000 0.000 0 0.000 1.000
#> ERR862940 6 0.0000 1.000 0.000 0.000 0.000 0 0.000 1.000
#> ERR862958 6 0.0000 1.000 0.000 0.000 0.000 0 0.000 1.000
#> ERR878008 6 0.0000 1.000 0.000 0.000 0.000 0 0.000 1.000
#> ERR862941 2 0.0000 0.917 0.000 1.000 0.000 0 0.000 0.000
#> ERR862959 2 0.0508 0.915 0.012 0.984 0.000 0 0.004 0.000
#> ERR878009 2 0.0260 0.917 0.000 0.992 0.000 0 0.008 0.000
#> ERR862942 2 0.0000 0.917 0.000 1.000 0.000 0 0.000 0.000
#> ERR862960 2 0.0000 0.917 0.000 1.000 0.000 0 0.000 0.000
#> ERR878010 2 0.0146 0.917 0.000 0.996 0.000 0 0.004 0.000
#> ERR862943 3 0.1168 0.973 0.000 0.000 0.956 0 0.028 0.016
#> ERR862961 3 0.0713 0.976 0.000 0.000 0.972 0 0.028 0.000
#> ERR878011 3 0.0713 0.976 0.000 0.000 0.972 0 0.028 0.000
#> ERR862944 3 0.1908 0.941 0.000 0.000 0.916 0 0.028 0.056
#> ERR862962 3 0.1168 0.973 0.000 0.000 0.956 0 0.028 0.016
#> ERR878012 3 0.1498 0.963 0.000 0.000 0.940 0 0.028 0.032
#> ERR862945 4 0.0000 1.000 0.000 0.000 0.000 1 0.000 0.000
#> ERR862963 4 0.0000 1.000 0.000 0.000 0.000 1 0.000 0.000
#> ERR878013 4 0.0000 1.000 0.000 0.000 0.000 1 0.000 0.000
#> ERR862946 4 0.0000 1.000 0.000 0.000 0.000 1 0.000 0.000
#> ERR862964 4 0.0000 1.000 0.000 0.000 0.000 1 0.000 0.000
#> ERR878014 4 0.0000 1.000 0.000 0.000 0.000 1 0.000 0.000
#> ERR862947 5 0.2219 0.995 0.000 0.136 0.000 0 0.864 0.000
#> ERR862965 5 0.2260 0.994 0.000 0.140 0.000 0 0.860 0.000
#> ERR878015 5 0.2260 0.994 0.000 0.140 0.000 0 0.860 0.000
#> ERR862948 5 0.2219 0.995 0.000 0.136 0.000 0 0.864 0.000
#> ERR862966 5 0.2219 0.993 0.000 0.136 0.000 0 0.864 0.000
#> ERR878016 5 0.2219 0.995 0.000 0.136 0.000 0 0.864 0.000
#> ERR862949 2 0.0000 0.917 0.000 1.000 0.000 0 0.000 0.000
#> ERR862967 2 0.0000 0.917 0.000 1.000 0.000 0 0.000 0.000
#> ERR878017 2 0.0000 0.917 0.000 1.000 0.000 0 0.000 0.000
#> ERR862950 2 0.0000 0.917 0.000 1.000 0.000 0 0.000 0.000
#> ERR862968 2 0.0000 0.917 0.000 1.000 0.000 0 0.000 0.000
#> ERR878018 2 0.0000 0.917 0.000 1.000 0.000 0 0.000 0.000
#> ERR862951 2 0.2956 0.820 0.120 0.840 0.000 0 0.040 0.000
#> ERR862969 2 0.1387 0.876 0.068 0.932 0.000 0 0.000 0.000
#> ERR878019 1 0.4386 0.622 0.708 0.200 0.000 0 0.092 0.000
#> ERR862952 2 0.0146 0.916 0.004 0.996 0.000 0 0.000 0.000
#> ERR862970 2 0.3960 0.735 0.176 0.752 0.000 0 0.072 0.000
#> ERR878020 2 0.3912 0.681 0.224 0.732 0.000 0 0.044 0.000
#> ERR862953 2 0.2164 0.870 0.068 0.900 0.000 0 0.032 0.000
#> ERR862971 2 0.3566 0.789 0.104 0.800 0.000 0 0.096 0.000
#> ERR878021 2 0.4252 0.708 0.176 0.728 0.000 0 0.096 0.000
#> ERR862954 2 0.4050 0.738 0.152 0.752 0.000 0 0.096 0.000
#> ERR862972 2 0.5004 0.396 0.348 0.568 0.000 0 0.084 0.000
#> ERR878022 2 0.3822 0.765 0.128 0.776 0.000 0 0.096 0.000
#> ERR862955 2 0.0622 0.914 0.012 0.980 0.000 0 0.008 0.000
#> ERR862973 2 0.1865 0.886 0.040 0.920 0.000 0 0.040 0.000
#> ERR878023 2 0.3372 0.807 0.084 0.816 0.000 0 0.100 0.000
#> ERR862956 2 0.3176 0.818 0.084 0.832 0.000 0 0.084 0.000
#> ERR862974 2 0.1794 0.886 0.036 0.924 0.000 0 0.040 0.000
#> ERR878024 2 0.0000 0.917 0.000 1.000 0.000 0 0.000 0.000
#> ERR862975 1 0.0146 0.883 0.996 0.000 0.000 0 0.004 0.000
#> ERR866150 1 0.0458 0.879 0.984 0.000 0.016 0 0.000 0.000
#> ERR866168 1 0.0000 0.883 1.000 0.000 0.000 0 0.000 0.000
#> ERR862976 1 0.1970 0.873 0.900 0.000 0.008 0 0.092 0.000
#> ERR866151 1 0.1714 0.872 0.908 0.000 0.000 0 0.092 0.000
#> ERR866169 1 0.1714 0.872 0.908 0.000 0.000 0 0.092 0.000
#> ERR862977 2 0.1480 0.898 0.040 0.940 0.000 0 0.020 0.000
#> ERR866152 2 0.0520 0.915 0.008 0.984 0.000 0 0.008 0.000
#> ERR866170 2 0.0909 0.911 0.020 0.968 0.000 0 0.012 0.000
#> ERR862978 2 0.1088 0.908 0.016 0.960 0.000 0 0.024 0.000
#> ERR866153 2 0.3072 0.828 0.076 0.840 0.000 0 0.084 0.000
#> ERR866171 2 0.0820 0.912 0.016 0.972 0.000 0 0.012 0.000
#> ERR862979 2 0.0000 0.917 0.000 1.000 0.000 0 0.000 0.000
#> ERR866154 2 0.0000 0.917 0.000 1.000 0.000 0 0.000 0.000
#> ERR866172 2 0.0000 0.917 0.000 1.000 0.000 0 0.000 0.000
#> ERR862980 2 0.0000 0.917 0.000 1.000 0.000 0 0.000 0.000
#> ERR866155 2 0.0000 0.917 0.000 1.000 0.000 0 0.000 0.000
#> ERR866173 2 0.0260 0.916 0.008 0.992 0.000 0 0.000 0.000
#> ERR862981 1 0.4551 0.371 0.608 0.344 0.000 0 0.048 0.000
#> ERR866156 1 0.2074 0.857 0.920 0.028 0.004 0 0.012 0.036
#> ERR866174 1 0.3324 0.828 0.840 0.088 0.000 0 0.048 0.024
#> ERR866157 2 0.4926 0.290 0.392 0.540 0.000 0 0.068 0.000
#> ERR866175 2 0.4066 0.591 0.272 0.696 0.004 0 0.028 0.000
#> ERR862983 3 0.0000 0.980 0.000 0.000 1.000 0 0.000 0.000
#> ERR866158 3 0.0000 0.980 0.000 0.000 1.000 0 0.000 0.000
#> ERR866176 3 0.0000 0.980 0.000 0.000 1.000 0 0.000 0.000
#> ERR862984 3 0.0146 0.979 0.000 0.000 0.996 0 0.000 0.004
#> ERR866159 3 0.0000 0.980 0.000 0.000 1.000 0 0.000 0.000
#> ERR866177 3 0.0000 0.980 0.000 0.000 1.000 0 0.000 0.000
#> ERR862985 1 0.1230 0.872 0.956 0.028 0.000 0 0.008 0.008
#> ERR866160 1 0.3805 0.833 0.812 0.056 0.000 0 0.088 0.044
#> ERR866178 1 0.2006 0.868 0.892 0.004 0.000 0 0.104 0.000
#> ERR862986 1 0.3992 0.795 0.788 0.088 0.000 0 0.104 0.020
#> ERR866161 1 0.3068 0.834 0.840 0.072 0.000 0 0.088 0.000
#> ERR866179 1 0.1788 0.879 0.916 0.004 0.000 0 0.076 0.004
#> ERR862987 2 0.0260 0.917 0.000 0.992 0.000 0 0.008 0.000
#> ERR866162 2 0.0260 0.917 0.000 0.992 0.000 0 0.008 0.000
#> ERR866180 2 0.0260 0.917 0.000 0.992 0.000 0 0.008 0.000
#> ERR862988 2 0.0260 0.917 0.000 0.992 0.000 0 0.008 0.000
#> ERR866163 2 0.0260 0.917 0.000 0.992 0.000 0 0.008 0.000
#> ERR866181 2 0.0146 0.917 0.000 0.996 0.000 0 0.004 0.000
#> ERR862989 1 0.0858 0.870 0.968 0.000 0.028 0 0.000 0.004
#> ERR866164 1 0.1151 0.864 0.956 0.000 0.012 0 0.000 0.032
#> ERR866182 1 0.0000 0.883 1.000 0.000 0.000 0 0.000 0.000
#> ERR862990 1 0.1462 0.861 0.936 0.000 0.056 0 0.008 0.000
#> ERR866165 1 0.0146 0.882 0.996 0.000 0.004 0 0.000 0.000
#> ERR866183 1 0.0260 0.883 0.992 0.008 0.000 0 0.000 0.000
#> ERR862991 2 0.0260 0.917 0.000 0.992 0.000 0 0.008 0.000
#> ERR866166 2 0.0146 0.917 0.000 0.996 0.000 0 0.004 0.000
#> ERR866184 2 0.0260 0.917 0.000 0.992 0.000 0 0.008 0.000
#> ERR862992 2 0.0146 0.917 0.000 0.996 0.000 0 0.004 0.000
#> ERR866167 2 0.0260 0.917 0.000 0.992 0.000 0 0.008 0.000
#> ERR866185 2 0.0260 0.917 0.000 0.992 0.000 0 0.008 0.000
Heatmaps for the consensus matrix. It visualizes the probability of two
samples to be in a same group.
consensus_heatmap(res, k = 2)

consensus_heatmap(res, k = 3)

consensus_heatmap(res, k = 4)

consensus_heatmap(res, k = 5)

consensus_heatmap(res, k = 6)

Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)

membership_heatmap(res, k = 3)

membership_heatmap(res, k = 4)

membership_heatmap(res, k = 5)

membership_heatmap(res, k = 6)

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)

get_signatures(res, k = 3)

get_signatures(res, k = 4)

get_signatures(res, k = 5)

get_signatures(res, k = 6)

Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)

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

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

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

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

Compare the overlap of signatures from different k:
compare_signatures(res)

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.
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:
which_row
: row indices corresponding to the input matrix.
fdr
: FDR for the differential test.
mean_x
: The mean value in group x.
scaled_mean_x
: The mean value in group x after rows are scaled.
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")

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

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

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

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

Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)

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"]
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 15818 rows and 107 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'CV' method.
#> Subgroups are detected by 'mclust' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 5.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)

The plots are:
- The first row: a plot of the ECDF (empirical cumulative distribution
function) curves of the consensus matrix for each
k
and the heatmap of
predicted classes for each k
.
- The second row: heatmaps of the consensus matrix for each
k
.
- The third row: heatmaps of the membership matrix for each
k
.
- The fouth row: heatmaps of the signatures for each
k
.
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:
- ECDF curves of the consensus matrix for each
k
;
- 1-PAC. The PAC
score
measures the proportion of the ambiguous subgrouping.
- Mean silhouette score.
- Concordance. The mean probability of fiting the consensus class ids in all
partitions.
- Area increased. Denote \(A_k\) as the area under the ECDF curve for current
k
, the area increased is defined as \(A_k - A_{k-1}\).
- Rand index. The percent of pairs of samples that are both in a same cluster
or both are not in a same cluster in the partition of k and k-1.
- Jaccard index. The ratio of pairs of samples are both in a same cluster in
the partition of k and k-1 and the pairs of samples are both in a same
cluster in the partition k or k-1.
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)

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.781 0.925 0.953 0.2420 0.718 0.718
#> 3 3 0.412 0.670 0.784 1.3567 0.523 0.402
#> 4 4 0.475 0.602 0.725 0.1418 0.807 0.591
#> 5 5 0.712 0.787 0.809 0.0874 0.711 0.374
#> 6 6 0.726 0.774 0.838 0.0572 0.940 0.796
suggest_best_k()
suggests the best \(k\) based on these statistics. The rules are as follows:
- All \(k\) with Jaccard index larger than 0.95 are removed because increasing
\(k\) does not provide enough extra information. If all \(k\) are removed, it is
marked as no subgroup is detected.
- For all \(k\) with 1-PAC score larger than 0.9, the maximal \(k\) is taken as
the best \(k\), and other \(k\) are marked as optional \(k\).
- If it does not fit the second rule. The \(k\) with the maximal vote of the
highest 1-PAC score, highest mean silhouette, and highest concordance is
taken as the best \(k\).
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
#> ERR862939 1 0.980 0.622 0.584 0.416
#> ERR862957 1 0.980 0.622 0.584 0.416
#> ERR878007 1 0.980 0.622 0.584 0.416
#> ERR862940 1 0.980 0.622 0.584 0.416
#> ERR862958 1 0.980 0.622 0.584 0.416
#> ERR878008 1 0.980 0.622 0.584 0.416
#> ERR862941 2 0.000 0.984 0.000 1.000
#> ERR862959 2 0.000 0.984 0.000 1.000
#> ERR878009 2 0.000 0.984 0.000 1.000
#> ERR862942 2 0.000 0.984 0.000 1.000
#> ERR862960 2 0.000 0.984 0.000 1.000
#> ERR878010 2 0.000 0.984 0.000 1.000
#> ERR862943 1 0.802 0.788 0.756 0.244
#> ERR862961 1 0.802 0.788 0.756 0.244
#> ERR878011 1 0.802 0.788 0.756 0.244
#> ERR862944 1 0.802 0.788 0.756 0.244
#> ERR862962 1 0.802 0.788 0.756 0.244
#> ERR878012 1 0.802 0.788 0.756 0.244
#> ERR862945 1 0.000 0.759 1.000 0.000
#> ERR862963 1 0.000 0.759 1.000 0.000
#> ERR878013 1 0.000 0.759 1.000 0.000
#> ERR862946 1 0.000 0.759 1.000 0.000
#> ERR862964 1 0.000 0.759 1.000 0.000
#> ERR878014 1 0.000 0.759 1.000 0.000
#> ERR862947 2 0.689 0.723 0.184 0.816
#> ERR862965 2 0.689 0.723 0.184 0.816
#> ERR878015 2 0.689 0.723 0.184 0.816
#> ERR862948 2 0.689 0.723 0.184 0.816
#> ERR862966 2 0.689 0.723 0.184 0.816
#> ERR878016 2 0.689 0.723 0.184 0.816
#> ERR862949 2 0.000 0.984 0.000 1.000
#> ERR862967 2 0.000 0.984 0.000 1.000
#> ERR878017 2 0.000 0.984 0.000 1.000
#> ERR862950 2 0.000 0.984 0.000 1.000
#> ERR862968 2 0.000 0.984 0.000 1.000
#> ERR878018 2 0.000 0.984 0.000 1.000
#> ERR862951 2 0.000 0.984 0.000 1.000
#> ERR862969 2 0.000 0.984 0.000 1.000
#> ERR878019 2 0.000 0.984 0.000 1.000
#> ERR862952 2 0.000 0.984 0.000 1.000
#> ERR862970 2 0.000 0.984 0.000 1.000
#> ERR878020 2 0.000 0.984 0.000 1.000
#> ERR862953 2 0.000 0.984 0.000 1.000
#> ERR862971 2 0.000 0.984 0.000 1.000
#> ERR878021 2 0.000 0.984 0.000 1.000
#> ERR862954 2 0.000 0.984 0.000 1.000
#> ERR862972 2 0.000 0.984 0.000 1.000
#> ERR878022 2 0.000 0.984 0.000 1.000
#> ERR862955 2 0.000 0.984 0.000 1.000
#> ERR862973 2 0.000 0.984 0.000 1.000
#> ERR878023 2 0.000 0.984 0.000 1.000
#> ERR862956 2 0.000 0.984 0.000 1.000
#> ERR862974 2 0.000 0.984 0.000 1.000
#> ERR878024 2 0.000 0.984 0.000 1.000
#> ERR862975 2 0.000 0.984 0.000 1.000
#> ERR866150 2 0.000 0.984 0.000 1.000
#> ERR866168 2 0.000 0.984 0.000 1.000
#> ERR862976 2 0.000 0.984 0.000 1.000
#> ERR866151 2 0.000 0.984 0.000 1.000
#> ERR866169 2 0.000 0.984 0.000 1.000
#> ERR862977 2 0.000 0.984 0.000 1.000
#> ERR866152 2 0.000 0.984 0.000 1.000
#> ERR866170 2 0.000 0.984 0.000 1.000
#> ERR862978 2 0.000 0.984 0.000 1.000
#> ERR866153 2 0.000 0.984 0.000 1.000
#> ERR866171 2 0.000 0.984 0.000 1.000
#> ERR862979 2 0.000 0.984 0.000 1.000
#> ERR866154 2 0.000 0.984 0.000 1.000
#> ERR866172 2 0.000 0.984 0.000 1.000
#> ERR862980 2 0.000 0.984 0.000 1.000
#> ERR866155 2 0.000 0.984 0.000 1.000
#> ERR866173 2 0.000 0.984 0.000 1.000
#> ERR862981 2 0.000 0.984 0.000 1.000
#> ERR866156 2 0.000 0.984 0.000 1.000
#> ERR866174 2 0.000 0.984 0.000 1.000
#> ERR866157 2 0.000 0.984 0.000 1.000
#> ERR866175 2 0.000 0.984 0.000 1.000
#> ERR862983 2 0.000 0.984 0.000 1.000
#> ERR866158 2 0.000 0.984 0.000 1.000
#> ERR866176 2 0.000 0.984 0.000 1.000
#> ERR862984 2 0.000 0.984 0.000 1.000
#> ERR866159 2 0.000 0.984 0.000 1.000
#> ERR866177 2 0.000 0.984 0.000 1.000
#> ERR862985 2 0.000 0.984 0.000 1.000
#> ERR866160 2 0.000 0.984 0.000 1.000
#> ERR866178 2 0.000 0.984 0.000 1.000
#> ERR862986 2 0.000 0.984 0.000 1.000
#> ERR866161 2 0.000 0.984 0.000 1.000
#> ERR866179 2 0.000 0.984 0.000 1.000
#> ERR862987 2 0.000 0.984 0.000 1.000
#> ERR866162 2 0.000 0.984 0.000 1.000
#> ERR866180 2 0.000 0.984 0.000 1.000
#> ERR862988 2 0.000 0.984 0.000 1.000
#> ERR866163 2 0.000 0.984 0.000 1.000
#> ERR866181 2 0.000 0.984 0.000 1.000
#> ERR862989 2 0.000 0.984 0.000 1.000
#> ERR866164 2 0.000 0.984 0.000 1.000
#> ERR866182 2 0.000 0.984 0.000 1.000
#> ERR862990 2 0.000 0.984 0.000 1.000
#> ERR866165 2 0.000 0.984 0.000 1.000
#> ERR866183 2 0.000 0.984 0.000 1.000
#> ERR862991 2 0.000 0.984 0.000 1.000
#> ERR866166 2 0.000 0.984 0.000 1.000
#> ERR866184 2 0.000 0.984 0.000 1.000
#> ERR862992 2 0.000 0.984 0.000 1.000
#> ERR866167 2 0.000 0.984 0.000 1.000
#> ERR866185 2 0.000 0.984 0.000 1.000
show/hide code output
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> ERR862939 1 0.6051 0.471 0.696 0.012 0.292
#> ERR862957 1 0.6051 0.471 0.696 0.012 0.292
#> ERR878007 1 0.6051 0.471 0.696 0.012 0.292
#> ERR862940 1 0.6051 0.471 0.696 0.012 0.292
#> ERR862958 1 0.6051 0.471 0.696 0.012 0.292
#> ERR878008 1 0.6051 0.471 0.696 0.012 0.292
#> ERR862941 2 0.4062 0.768 0.164 0.836 0.000
#> ERR862959 2 0.3752 0.786 0.144 0.856 0.000
#> ERR878009 2 0.0747 0.843 0.016 0.984 0.000
#> ERR862942 2 0.3551 0.793 0.132 0.868 0.000
#> ERR862960 2 0.2165 0.835 0.064 0.936 0.000
#> ERR878010 2 0.4605 0.721 0.204 0.796 0.000
#> ERR862943 1 0.8134 0.676 0.584 0.328 0.088
#> ERR862961 1 0.8013 0.678 0.588 0.332 0.080
#> ERR878011 1 0.7885 0.679 0.592 0.336 0.072
#> ERR862944 1 0.8134 0.676 0.584 0.328 0.088
#> ERR862962 1 0.7992 0.679 0.592 0.328 0.080
#> ERR878012 1 0.8064 0.678 0.588 0.328 0.084
#> ERR862945 3 0.0000 0.685 0.000 0.000 1.000
#> ERR862963 3 0.0000 0.685 0.000 0.000 1.000
#> ERR878013 3 0.0000 0.685 0.000 0.000 1.000
#> ERR862946 3 0.0000 0.685 0.000 0.000 1.000
#> ERR862964 3 0.0000 0.685 0.000 0.000 1.000
#> ERR878014 3 0.0000 0.685 0.000 0.000 1.000
#> ERR862947 3 0.9383 0.630 0.384 0.172 0.444
#> ERR862965 3 0.9383 0.630 0.384 0.172 0.444
#> ERR878015 3 0.9383 0.630 0.384 0.172 0.444
#> ERR862948 3 0.9383 0.630 0.384 0.172 0.444
#> ERR862966 3 0.9383 0.630 0.384 0.172 0.444
#> ERR878016 3 0.9383 0.630 0.384 0.172 0.444
#> ERR862949 2 0.5835 0.514 0.340 0.660 0.000
#> ERR862967 2 0.5016 0.673 0.240 0.760 0.000
#> ERR878017 2 0.5926 0.482 0.356 0.644 0.000
#> ERR862950 2 0.5859 0.515 0.344 0.656 0.000
#> ERR862968 2 0.5835 0.515 0.340 0.660 0.000
#> ERR878018 2 0.5882 0.499 0.348 0.652 0.000
#> ERR862951 2 0.2537 0.780 0.080 0.920 0.000
#> ERR862969 2 0.2356 0.788 0.072 0.928 0.000
#> ERR878019 2 0.5678 0.159 0.316 0.684 0.000
#> ERR862952 2 0.2261 0.792 0.068 0.932 0.000
#> ERR862970 2 0.2796 0.764 0.092 0.908 0.000
#> ERR878020 2 0.2448 0.783 0.076 0.924 0.000
#> ERR862953 1 0.5254 0.420 0.736 0.264 0.000
#> ERR862971 1 0.5291 0.394 0.732 0.268 0.000
#> ERR878021 1 0.4887 0.433 0.772 0.228 0.000
#> ERR862954 1 0.5497 0.445 0.708 0.292 0.000
#> ERR862972 1 0.4555 0.448 0.800 0.200 0.000
#> ERR878022 1 0.5835 0.354 0.660 0.340 0.000
#> ERR862955 2 0.1529 0.823 0.040 0.960 0.000
#> ERR862973 2 0.1753 0.842 0.048 0.952 0.000
#> ERR878023 2 0.1163 0.839 0.028 0.972 0.000
#> ERR862956 2 0.1753 0.842 0.048 0.952 0.000
#> ERR862974 2 0.1753 0.836 0.048 0.952 0.000
#> ERR878024 2 0.0592 0.836 0.012 0.988 0.000
#> ERR862975 1 0.6267 0.583 0.548 0.452 0.000
#> ERR866150 1 0.6095 0.670 0.608 0.392 0.000
#> ERR866168 1 0.6062 0.676 0.616 0.384 0.000
#> ERR862976 1 0.6079 0.673 0.612 0.388 0.000
#> ERR866151 1 0.6095 0.670 0.608 0.392 0.000
#> ERR866169 1 0.6045 0.679 0.620 0.380 0.000
#> ERR862977 2 0.1411 0.828 0.036 0.964 0.000
#> ERR866152 2 0.1289 0.840 0.032 0.968 0.000
#> ERR866170 2 0.1529 0.842 0.040 0.960 0.000
#> ERR862978 2 0.1411 0.841 0.036 0.964 0.000
#> ERR866153 2 0.0892 0.826 0.020 0.980 0.000
#> ERR866171 2 0.1753 0.842 0.048 0.952 0.000
#> ERR862979 2 0.5706 0.556 0.320 0.680 0.000
#> ERR866154 2 0.4452 0.738 0.192 0.808 0.000
#> ERR866172 2 0.5016 0.674 0.240 0.760 0.000
#> ERR862980 2 0.5431 0.600 0.284 0.716 0.000
#> ERR866155 2 0.2537 0.830 0.080 0.920 0.000
#> ERR866173 2 0.2711 0.823 0.088 0.912 0.000
#> ERR862981 1 0.3183 0.530 0.908 0.076 0.016
#> ERR866156 1 0.2096 0.551 0.944 0.052 0.004
#> ERR866174 1 0.2902 0.541 0.920 0.064 0.016
#> ERR866157 1 0.3349 0.532 0.888 0.108 0.004
#> ERR866175 1 0.2680 0.543 0.924 0.068 0.008
#> ERR862983 1 0.5988 0.684 0.632 0.368 0.000
#> ERR866158 1 0.5988 0.684 0.632 0.368 0.000
#> ERR866176 1 0.5988 0.684 0.632 0.368 0.000
#> ERR862984 1 0.5988 0.684 0.632 0.368 0.000
#> ERR866159 1 0.5988 0.684 0.632 0.368 0.000
#> ERR866177 1 0.5988 0.684 0.632 0.368 0.000
#> ERR862985 1 0.2229 0.547 0.944 0.044 0.012
#> ERR866160 1 0.1989 0.551 0.948 0.048 0.004
#> ERR866178 1 0.1989 0.551 0.948 0.048 0.004
#> ERR862986 1 0.2446 0.547 0.936 0.052 0.012
#> ERR866161 1 0.2096 0.550 0.944 0.052 0.004
#> ERR866179 1 0.2066 0.551 0.940 0.060 0.000
#> ERR862987 2 0.1529 0.842 0.040 0.960 0.000
#> ERR866162 2 0.1411 0.842 0.036 0.964 0.000
#> ERR866180 2 0.1289 0.840 0.032 0.968 0.000
#> ERR862988 2 0.1163 0.842 0.028 0.972 0.000
#> ERR866163 2 0.1163 0.842 0.028 0.972 0.000
#> ERR866181 2 0.1289 0.842 0.032 0.968 0.000
#> ERR862989 1 0.6228 0.682 0.624 0.372 0.004
#> ERR866164 1 0.6008 0.683 0.628 0.372 0.000
#> ERR866182 1 0.6298 0.669 0.608 0.388 0.004
#> ERR862990 1 0.6008 0.683 0.628 0.372 0.000
#> ERR866165 1 0.6026 0.681 0.624 0.376 0.000
#> ERR866183 1 0.6215 0.626 0.572 0.428 0.000
#> ERR862991 2 0.2066 0.833 0.060 0.940 0.000
#> ERR866166 2 0.2165 0.823 0.064 0.936 0.000
#> ERR866184 2 0.0892 0.839 0.020 0.980 0.000
#> ERR862992 2 0.2165 0.826 0.064 0.936 0.000
#> ERR866167 2 0.2066 0.828 0.060 0.940 0.000
#> ERR866185 2 0.1643 0.837 0.044 0.956 0.000
show/hide code output
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> ERR862939 3 0.4817 0.3962 0.388 0.000 0.612 0.000
#> ERR862957 3 0.4817 0.3962 0.388 0.000 0.612 0.000
#> ERR878007 3 0.4843 0.3911 0.396 0.000 0.604 0.000
#> ERR862940 3 0.4817 0.3962 0.388 0.000 0.612 0.000
#> ERR862958 3 0.4817 0.3962 0.388 0.000 0.612 0.000
#> ERR878008 3 0.4817 0.3962 0.388 0.000 0.612 0.000
#> ERR862941 2 0.2831 0.7812 0.120 0.876 0.004 0.000
#> ERR862959 2 0.1978 0.8129 0.068 0.928 0.004 0.000
#> ERR878009 2 0.1004 0.8298 0.024 0.972 0.004 0.000
#> ERR862942 2 0.1398 0.8292 0.040 0.956 0.004 0.000
#> ERR862960 2 0.0817 0.8284 0.024 0.976 0.000 0.000
#> ERR878010 2 0.2654 0.7951 0.108 0.888 0.004 0.000
#> ERR862943 3 0.5406 0.4103 0.380 0.008 0.604 0.008
#> ERR862961 3 0.5112 0.4112 0.384 0.008 0.608 0.000
#> ERR878011 3 0.5112 0.4112 0.384 0.008 0.608 0.000
#> ERR862944 3 0.5286 0.4113 0.384 0.008 0.604 0.004
#> ERR862962 3 0.5112 0.4112 0.384 0.008 0.608 0.000
#> ERR878012 3 0.5286 0.4110 0.384 0.008 0.604 0.004
#> ERR862945 4 0.0000 1.0000 0.000 0.000 0.000 1.000
#> ERR862963 4 0.0000 1.0000 0.000 0.000 0.000 1.000
#> ERR878013 4 0.0000 1.0000 0.000 0.000 0.000 1.000
#> ERR862946 4 0.0000 1.0000 0.000 0.000 0.000 1.000
#> ERR862964 4 0.0000 1.0000 0.000 0.000 0.000 1.000
#> ERR878014 4 0.0000 1.0000 0.000 0.000 0.000 1.000
#> ERR862947 3 0.8767 -0.0266 0.356 0.044 0.360 0.240
#> ERR862965 3 0.8767 -0.0266 0.356 0.044 0.360 0.240
#> ERR878015 3 0.8767 -0.0266 0.356 0.044 0.360 0.240
#> ERR862948 3 0.8767 -0.0266 0.356 0.044 0.360 0.240
#> ERR862966 3 0.8767 -0.0266 0.356 0.044 0.360 0.240
#> ERR878016 3 0.8767 -0.0266 0.356 0.044 0.360 0.240
#> ERR862949 2 0.3266 0.7429 0.168 0.832 0.000 0.000
#> ERR862967 2 0.2921 0.7626 0.140 0.860 0.000 0.000
#> ERR878017 2 0.4283 0.6328 0.256 0.740 0.004 0.000
#> ERR862950 2 0.4542 0.6726 0.228 0.752 0.020 0.000
#> ERR862968 2 0.4781 0.6676 0.212 0.752 0.036 0.000
#> ERR878018 2 0.3933 0.7057 0.200 0.792 0.008 0.000
#> ERR862951 2 0.3621 0.8036 0.068 0.860 0.072 0.000
#> ERR862969 2 0.3400 0.8095 0.064 0.872 0.064 0.000
#> ERR878019 2 0.7184 0.0488 0.364 0.492 0.144 0.000
#> ERR862952 2 0.3691 0.8099 0.076 0.856 0.068 0.000
#> ERR862970 2 0.3548 0.8045 0.068 0.864 0.068 0.000
#> ERR878020 2 0.4203 0.7687 0.108 0.824 0.068 0.000
#> ERR862953 1 0.5849 0.6192 0.704 0.164 0.132 0.000
#> ERR862971 1 0.6686 0.4850 0.596 0.276 0.128 0.000
#> ERR878021 1 0.5902 0.6118 0.700 0.160 0.140 0.000
#> ERR862954 1 0.5512 0.6190 0.728 0.172 0.100 0.000
#> ERR862972 1 0.4728 0.6400 0.792 0.104 0.104 0.000
#> ERR878022 1 0.6906 0.5006 0.580 0.264 0.156 0.000
#> ERR862955 2 0.3312 0.8179 0.072 0.876 0.052 0.000
#> ERR862973 2 0.3156 0.8207 0.068 0.884 0.048 0.000
#> ERR878023 2 0.3542 0.8156 0.076 0.864 0.060 0.000
#> ERR862956 2 0.3761 0.8106 0.080 0.852 0.068 0.000
#> ERR862974 2 0.3691 0.8118 0.076 0.856 0.068 0.000
#> ERR878024 2 0.3679 0.8157 0.084 0.856 0.060 0.000
#> ERR862975 2 0.7441 -0.1048 0.352 0.468 0.180 0.000
#> ERR866150 2 0.7042 0.0630 0.352 0.516 0.132 0.000
#> ERR866168 2 0.6919 0.0978 0.352 0.528 0.120 0.000
#> ERR862976 2 0.6508 0.1796 0.360 0.556 0.084 0.000
#> ERR866151 2 0.7155 0.0188 0.352 0.504 0.144 0.000
#> ERR866169 2 0.6750 0.1398 0.356 0.540 0.104 0.000
#> ERR862977 2 0.3453 0.8158 0.080 0.868 0.052 0.000
#> ERR866152 2 0.3828 0.8106 0.084 0.848 0.068 0.000
#> ERR866170 2 0.3691 0.8107 0.076 0.856 0.068 0.000
#> ERR862978 2 0.3239 0.8182 0.068 0.880 0.052 0.000
#> ERR866153 2 0.3320 0.8169 0.068 0.876 0.056 0.000
#> ERR866171 2 0.3687 0.8122 0.080 0.856 0.064 0.000
#> ERR862979 2 0.4018 0.6837 0.224 0.772 0.004 0.000
#> ERR866154 2 0.2714 0.7879 0.112 0.884 0.004 0.000
#> ERR866172 2 0.2973 0.7675 0.144 0.856 0.000 0.000
#> ERR862980 2 0.2654 0.7953 0.108 0.888 0.004 0.000
#> ERR866155 2 0.1576 0.8274 0.048 0.948 0.004 0.000
#> ERR866173 2 0.1022 0.8249 0.032 0.968 0.000 0.000
#> ERR862981 1 0.1635 0.6433 0.948 0.044 0.008 0.000
#> ERR866156 1 0.1888 0.6583 0.940 0.044 0.016 0.000
#> ERR866174 1 0.1576 0.6503 0.948 0.048 0.004 0.000
#> ERR866157 1 0.2402 0.6562 0.912 0.076 0.012 0.000
#> ERR866175 1 0.2174 0.6577 0.928 0.052 0.020 0.000
#> ERR862983 3 0.5571 0.3837 0.396 0.024 0.580 0.000
#> ERR866158 3 0.5560 0.3878 0.392 0.024 0.584 0.000
#> ERR866176 3 0.5582 0.3805 0.400 0.024 0.576 0.000
#> ERR862984 3 0.5582 0.3805 0.400 0.024 0.576 0.000
#> ERR866159 3 0.5582 0.3805 0.400 0.024 0.576 0.000
#> ERR866177 3 0.5582 0.3805 0.400 0.024 0.576 0.000
#> ERR862985 1 0.2089 0.6554 0.932 0.048 0.020 0.000
#> ERR866160 1 0.2300 0.6436 0.924 0.048 0.028 0.000
#> ERR866178 1 0.1975 0.6585 0.936 0.048 0.016 0.000
#> ERR862986 1 0.1767 0.6530 0.944 0.044 0.012 0.000
#> ERR866161 1 0.1888 0.6553 0.940 0.044 0.016 0.000
#> ERR866179 1 0.1661 0.6530 0.944 0.052 0.004 0.000
#> ERR862987 2 0.1004 0.8248 0.024 0.972 0.004 0.000
#> ERR866162 2 0.1042 0.8270 0.020 0.972 0.008 0.000
#> ERR866180 2 0.0469 0.8283 0.012 0.988 0.000 0.000
#> ERR862988 2 0.0469 0.8264 0.012 0.988 0.000 0.000
#> ERR866163 2 0.0779 0.8263 0.016 0.980 0.004 0.000
#> ERR866181 2 0.0188 0.8270 0.004 0.996 0.000 0.000
#> ERR862989 1 0.6897 0.4812 0.584 0.160 0.256 0.000
#> ERR866164 1 0.6885 0.4875 0.588 0.164 0.248 0.000
#> ERR866182 1 0.6685 0.4912 0.616 0.160 0.224 0.000
#> ERR862990 1 0.6675 0.4871 0.616 0.156 0.228 0.000
#> ERR866165 1 0.6724 0.4954 0.612 0.164 0.224 0.000
#> ERR866183 1 0.6724 0.4903 0.612 0.164 0.224 0.000
#> ERR862991 2 0.0592 0.8289 0.016 0.984 0.000 0.000
#> ERR866166 2 0.0817 0.8298 0.024 0.976 0.000 0.000
#> ERR866184 2 0.1209 0.8309 0.032 0.964 0.004 0.000
#> ERR862992 2 0.0469 0.8283 0.012 0.988 0.000 0.000
#> ERR866167 2 0.0469 0.8283 0.012 0.988 0.000 0.000
#> ERR866185 2 0.0592 0.8291 0.016 0.984 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
#> ERR862939 3 0.5080 0.6619 0.004 0.284 0.656 0 0.056
#> ERR862957 3 0.5080 0.6619 0.004 0.284 0.656 0 0.056
#> ERR878007 3 0.5038 0.6639 0.004 0.288 0.656 0 0.052
#> ERR862940 3 0.5080 0.6619 0.004 0.284 0.656 0 0.056
#> ERR862958 3 0.5080 0.6619 0.004 0.284 0.656 0 0.056
#> ERR878008 3 0.5080 0.6619 0.004 0.284 0.656 0 0.056
#> ERR862941 2 0.4300 0.9707 0.476 0.524 0.000 0 0.000
#> ERR862959 2 0.4287 0.9744 0.460 0.540 0.000 0 0.000
#> ERR878009 2 0.4300 0.9693 0.476 0.524 0.000 0 0.000
#> ERR862942 2 0.4440 0.9693 0.468 0.528 0.000 0 0.004
#> ERR862960 2 0.4305 0.9588 0.488 0.512 0.000 0 0.000
#> ERR878010 2 0.4297 0.9729 0.472 0.528 0.000 0 0.000
#> ERR862943 3 0.3715 0.7641 0.000 0.260 0.736 0 0.004
#> ERR862961 3 0.3715 0.7641 0.000 0.260 0.736 0 0.004
#> ERR878011 3 0.3715 0.7641 0.000 0.260 0.736 0 0.004
#> ERR862944 3 0.3715 0.7641 0.000 0.260 0.736 0 0.004
#> ERR862962 3 0.3715 0.7641 0.000 0.260 0.736 0 0.004
#> ERR878012 3 0.3715 0.7641 0.000 0.260 0.736 0 0.004
#> ERR862945 4 0.0000 1.0000 0.000 0.000 0.000 1 0.000
#> ERR862963 4 0.0000 1.0000 0.000 0.000 0.000 1 0.000
#> ERR878013 4 0.0000 1.0000 0.000 0.000 0.000 1 0.000
#> ERR862946 4 0.0000 1.0000 0.000 0.000 0.000 1 0.000
#> ERR862964 4 0.0000 1.0000 0.000 0.000 0.000 1 0.000
#> ERR878014 4 0.0000 1.0000 0.000 0.000 0.000 1 0.000
#> ERR862947 5 0.0162 1.0000 0.004 0.000 0.000 0 0.996
#> ERR862965 5 0.0162 1.0000 0.004 0.000 0.000 0 0.996
#> ERR878015 5 0.0162 1.0000 0.004 0.000 0.000 0 0.996
#> ERR862948 5 0.0162 1.0000 0.004 0.000 0.000 0 0.996
#> ERR862966 5 0.0162 1.0000 0.004 0.000 0.000 0 0.996
#> ERR878016 5 0.0162 1.0000 0.004 0.000 0.000 0 0.996
#> ERR862949 2 0.5009 0.9466 0.428 0.540 0.000 0 0.032
#> ERR862967 2 0.4878 0.9583 0.440 0.536 0.000 0 0.024
#> ERR878017 2 0.4713 0.9642 0.440 0.544 0.000 0 0.016
#> ERR862950 2 0.5131 0.9358 0.420 0.540 0.000 0 0.040
#> ERR862968 2 0.5188 0.9301 0.416 0.540 0.000 0 0.044
#> ERR878018 2 0.4627 0.9672 0.444 0.544 0.000 0 0.012
#> ERR862951 1 0.4159 0.6926 0.776 0.068 0.156 0 0.000
#> ERR862969 1 0.3911 0.6970 0.796 0.060 0.144 0 0.000
#> ERR878019 1 0.5652 0.3099 0.516 0.080 0.404 0 0.000
#> ERR862952 1 0.4177 0.6911 0.772 0.064 0.164 0 0.000
#> ERR862970 1 0.4177 0.6910 0.772 0.064 0.164 0 0.000
#> ERR878020 1 0.4058 0.6948 0.784 0.064 0.152 0 0.000
#> ERR862953 3 0.5736 -0.1671 0.448 0.084 0.468 0 0.000
#> ERR862971 1 0.5616 0.2739 0.512 0.076 0.412 0 0.000
#> ERR878021 3 0.5713 -0.0711 0.416 0.084 0.500 0 0.000
#> ERR862954 1 0.5736 0.1656 0.468 0.084 0.448 0 0.000
#> ERR862972 3 0.5721 -0.0951 0.424 0.084 0.492 0 0.000
#> ERR878022 1 0.5382 0.3975 0.580 0.068 0.352 0 0.000
#> ERR862955 1 0.1364 0.6841 0.952 0.036 0.012 0 0.000
#> ERR862973 1 0.1357 0.6042 0.948 0.048 0.004 0 0.000
#> ERR878023 1 0.0451 0.6866 0.988 0.008 0.004 0 0.000
#> ERR862956 1 0.0162 0.6869 0.996 0.000 0.004 0 0.000
#> ERR862974 1 0.0566 0.6819 0.984 0.012 0.004 0 0.000
#> ERR878024 1 0.0671 0.6861 0.980 0.016 0.004 0 0.000
#> ERR862975 3 0.2514 0.7868 0.044 0.060 0.896 0 0.000
#> ERR866150 3 0.2592 0.7810 0.056 0.052 0.892 0 0.000
#> ERR866168 3 0.2588 0.7790 0.060 0.048 0.892 0 0.000
#> ERR862976 3 0.2708 0.7720 0.072 0.044 0.884 0 0.000
#> ERR866151 3 0.2592 0.7828 0.052 0.056 0.892 0 0.000
#> ERR866169 3 0.2645 0.7746 0.068 0.044 0.888 0 0.000
#> ERR862977 1 0.0693 0.6828 0.980 0.008 0.012 0 0.000
#> ERR866152 1 0.0324 0.6903 0.992 0.004 0.004 0 0.000
#> ERR866170 1 0.0451 0.6918 0.988 0.008 0.004 0 0.000
#> ERR862978 1 0.1502 0.5799 0.940 0.056 0.004 0 0.000
#> ERR866153 1 0.0566 0.6927 0.984 0.012 0.004 0 0.000
#> ERR866171 1 0.0451 0.6873 0.988 0.008 0.004 0 0.000
#> ERR862979 2 0.4994 0.9346 0.464 0.512 0.016 0 0.008
#> ERR866154 2 0.4302 0.9661 0.480 0.520 0.000 0 0.000
#> ERR866172 2 0.4294 0.9736 0.468 0.532 0.000 0 0.000
#> ERR862980 2 0.4297 0.9727 0.472 0.528 0.000 0 0.000
#> ERR866155 2 0.4306 0.9540 0.492 0.508 0.000 0 0.000
#> ERR866173 2 0.4304 0.9627 0.484 0.516 0.000 0 0.000
#> ERR862981 3 0.1628 0.7776 0.008 0.056 0.936 0 0.000
#> ERR866156 3 0.1628 0.7776 0.008 0.056 0.936 0 0.000
#> ERR866174 3 0.1628 0.7776 0.008 0.056 0.936 0 0.000
#> ERR866157 3 0.2124 0.7712 0.028 0.056 0.916 0 0.000
#> ERR866175 3 0.1788 0.7783 0.008 0.056 0.932 0 0.004
#> ERR862983 3 0.3689 0.7656 0.000 0.256 0.740 0 0.004
#> ERR866158 3 0.3689 0.7656 0.000 0.256 0.740 0 0.004
#> ERR866176 3 0.3689 0.7656 0.000 0.256 0.740 0 0.004
#> ERR862984 3 0.3689 0.7656 0.000 0.256 0.740 0 0.004
#> ERR866159 3 0.3689 0.7656 0.000 0.256 0.740 0 0.004
#> ERR866177 3 0.3689 0.7656 0.000 0.256 0.740 0 0.004
#> ERR862985 3 0.1628 0.7776 0.008 0.056 0.936 0 0.000
#> ERR866160 3 0.1628 0.7776 0.008 0.056 0.936 0 0.000
#> ERR866178 3 0.1628 0.7776 0.008 0.056 0.936 0 0.000
#> ERR862986 3 0.1628 0.7776 0.008 0.056 0.936 0 0.000
#> ERR866161 3 0.1628 0.7776 0.008 0.056 0.936 0 0.000
#> ERR866179 3 0.1628 0.7776 0.008 0.056 0.936 0 0.000
#> ERR862987 2 0.4283 0.9749 0.456 0.544 0.000 0 0.000
#> ERR866162 2 0.4283 0.9749 0.456 0.544 0.000 0 0.000
#> ERR866180 2 0.4283 0.9749 0.456 0.544 0.000 0 0.000
#> ERR862988 2 0.4283 0.9749 0.456 0.544 0.000 0 0.000
#> ERR866163 2 0.4283 0.9749 0.456 0.544 0.000 0 0.000
#> ERR866181 2 0.4283 0.9749 0.456 0.544 0.000 0 0.000
#> ERR862989 3 0.4006 0.7173 0.112 0.080 0.804 0 0.004
#> ERR866164 3 0.4006 0.7170 0.112 0.080 0.804 0 0.004
#> ERR866182 3 0.3750 0.7395 0.088 0.084 0.824 0 0.004
#> ERR862990 3 0.3460 0.7545 0.076 0.076 0.844 0 0.004
#> ERR866165 3 0.2775 0.7795 0.036 0.076 0.884 0 0.004
#> ERR866183 3 0.1704 0.7873 0.000 0.068 0.928 0 0.004
#> ERR862991 2 0.4283 0.9749 0.456 0.544 0.000 0 0.000
#> ERR866166 2 0.4294 0.9740 0.468 0.532 0.000 0 0.000
#> ERR866184 2 0.4300 0.9709 0.476 0.524 0.000 0 0.000
#> ERR862992 2 0.4291 0.9750 0.464 0.536 0.000 0 0.000
#> ERR866167 2 0.4294 0.9734 0.468 0.532 0.000 0 0.000
#> ERR866185 2 0.4283 0.9749 0.456 0.544 0.000 0 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
#> ERR862939 6 0.1075 1.000 0.048 0.000 0.000 0 0 0.952
#> ERR862957 6 0.1075 1.000 0.048 0.000 0.000 0 0 0.952
#> ERR878007 6 0.1075 1.000 0.048 0.000 0.000 0 0 0.952
#> ERR862940 6 0.1075 1.000 0.048 0.000 0.000 0 0 0.952
#> ERR862958 6 0.1075 1.000 0.048 0.000 0.000 0 0 0.952
#> ERR878008 6 0.1075 1.000 0.048 0.000 0.000 0 0 0.952
#> ERR862941 2 0.0547 0.974 0.000 0.980 0.020 0 0 0.000
#> ERR862959 2 0.0260 0.975 0.000 0.992 0.008 0 0 0.000
#> ERR878009 2 0.1007 0.963 0.000 0.956 0.044 0 0 0.000
#> ERR862942 2 0.1007 0.963 0.000 0.956 0.044 0 0 0.000
#> ERR862960 2 0.0937 0.966 0.000 0.960 0.040 0 0 0.000
#> ERR878010 2 0.1204 0.953 0.000 0.944 0.056 0 0 0.000
#> ERR862943 1 0.1957 0.710 0.888 0.000 0.000 0 0 0.112
#> ERR862961 1 0.1957 0.710 0.888 0.000 0.000 0 0 0.112
#> ERR878011 1 0.1957 0.710 0.888 0.000 0.000 0 0 0.112
#> ERR862944 1 0.1957 0.710 0.888 0.000 0.000 0 0 0.112
#> ERR862962 1 0.1957 0.710 0.888 0.000 0.000 0 0 0.112
#> ERR878012 1 0.1957 0.710 0.888 0.000 0.000 0 0 0.112
#> ERR862945 4 0.0000 1.000 0.000 0.000 0.000 1 0 0.000
#> ERR862963 4 0.0000 1.000 0.000 0.000 0.000 1 0 0.000
#> ERR878013 4 0.0000 1.000 0.000 0.000 0.000 1 0 0.000
#> ERR862946 4 0.0000 1.000 0.000 0.000 0.000 1 0 0.000
#> ERR862964 4 0.0000 1.000 0.000 0.000 0.000 1 0 0.000
#> ERR878014 4 0.0000 1.000 0.000 0.000 0.000 1 0 0.000
#> ERR862947 5 0.0000 1.000 0.000 0.000 0.000 0 1 0.000
#> ERR862965 5 0.0000 1.000 0.000 0.000 0.000 0 1 0.000
#> ERR878015 5 0.0000 1.000 0.000 0.000 0.000 0 1 0.000
#> ERR862948 5 0.0000 1.000 0.000 0.000 0.000 0 1 0.000
#> ERR862966 5 0.0000 1.000 0.000 0.000 0.000 0 1 0.000
#> ERR878016 5 0.0000 1.000 0.000 0.000 0.000 0 1 0.000
#> ERR862949 2 0.0146 0.975 0.000 0.996 0.004 0 0 0.000
#> ERR862967 2 0.0000 0.974 0.000 1.000 0.000 0 0 0.000
#> ERR878017 2 0.0146 0.975 0.000 0.996 0.004 0 0 0.000
#> ERR862950 2 0.0146 0.973 0.000 0.996 0.004 0 0 0.000
#> ERR862968 2 0.0146 0.973 0.000 0.996 0.004 0 0 0.000
#> ERR878018 2 0.0000 0.974 0.000 1.000 0.000 0 0 0.000
#> ERR862951 3 0.1074 0.571 0.028 0.012 0.960 0 0 0.000
#> ERR862969 3 0.1780 0.584 0.028 0.048 0.924 0 0 0.000
#> ERR878019 3 0.4097 -0.480 0.488 0.008 0.504 0 0 0.000
#> ERR862952 3 0.2058 0.575 0.036 0.056 0.908 0 0 0.000
#> ERR862970 3 0.1297 0.566 0.040 0.012 0.948 0 0 0.000
#> ERR878020 3 0.1168 0.575 0.028 0.016 0.956 0 0 0.000
#> ERR862953 3 0.5153 -0.502 0.452 0.000 0.464 0 0 0.084
#> ERR862971 3 0.5626 -0.465 0.440 0.028 0.460 0 0 0.072
#> ERR878021 1 0.5253 0.547 0.504 0.004 0.408 0 0 0.084
#> ERR862954 3 0.4841 -0.446 0.436 0.000 0.508 0 0 0.056
#> ERR862972 1 0.5132 0.563 0.500 0.000 0.416 0 0 0.084
#> ERR878022 1 0.6217 0.367 0.468 0.084 0.380 0 0 0.068
#> ERR862955 3 0.3421 0.688 0.000 0.256 0.736 0 0 0.008
#> ERR862973 3 0.3758 0.608 0.000 0.324 0.668 0 0 0.008
#> ERR878023 3 0.3421 0.693 0.000 0.256 0.736 0 0 0.008
#> ERR862956 3 0.3373 0.695 0.000 0.248 0.744 0 0 0.008
#> ERR862974 3 0.3373 0.695 0.000 0.248 0.744 0 0 0.008
#> ERR878024 3 0.3445 0.691 0.000 0.260 0.732 0 0 0.008
#> ERR862975 1 0.3240 0.722 0.812 0.000 0.148 0 0 0.040
#> ERR866150 1 0.3083 0.717 0.828 0.000 0.132 0 0 0.040
#> ERR866168 1 0.3083 0.717 0.828 0.000 0.132 0 0 0.040
#> ERR862976 1 0.3083 0.717 0.828 0.000 0.132 0 0 0.040
#> ERR866151 1 0.3083 0.717 0.828 0.000 0.132 0 0 0.040
#> ERR866169 1 0.3083 0.717 0.828 0.000 0.132 0 0 0.040
#> ERR862977 3 0.3620 0.694 0.008 0.248 0.736 0 0 0.008
#> ERR866152 3 0.3349 0.695 0.000 0.244 0.748 0 0 0.008
#> ERR866170 3 0.3349 0.695 0.000 0.244 0.748 0 0 0.008
#> ERR862978 3 0.3653 0.640 0.000 0.300 0.692 0 0 0.008
#> ERR866153 3 0.3349 0.695 0.000 0.244 0.748 0 0 0.008
#> ERR866171 3 0.3421 0.693 0.000 0.256 0.736 0 0 0.008
#> ERR862979 2 0.1686 0.927 0.012 0.924 0.064 0 0 0.000
#> ERR866154 2 0.1007 0.963 0.000 0.956 0.044 0 0 0.000
#> ERR866172 2 0.0632 0.972 0.000 0.976 0.024 0 0 0.000
#> ERR862980 2 0.1007 0.963 0.000 0.956 0.044 0 0 0.000
#> ERR866155 2 0.1610 0.925 0.000 0.916 0.084 0 0 0.000
#> ERR866173 2 0.1327 0.949 0.000 0.936 0.064 0 0 0.000
#> ERR862981 1 0.4728 0.722 0.652 0.000 0.256 0 0 0.092
#> ERR866156 1 0.4686 0.723 0.660 0.000 0.248 0 0 0.092
#> ERR866174 1 0.4686 0.723 0.660 0.000 0.248 0 0 0.092
#> ERR866157 1 0.4789 0.717 0.640 0.000 0.268 0 0 0.092
#> ERR866175 1 0.4707 0.723 0.656 0.000 0.252 0 0 0.092
#> ERR862983 1 0.1910 0.713 0.892 0.000 0.000 0 0 0.108
#> ERR866158 1 0.1910 0.713 0.892 0.000 0.000 0 0 0.108
#> ERR866176 1 0.1910 0.713 0.892 0.000 0.000 0 0 0.108
#> ERR862984 1 0.1910 0.713 0.892 0.000 0.000 0 0 0.108
#> ERR866159 1 0.1910 0.713 0.892 0.000 0.000 0 0 0.108
#> ERR866177 1 0.1910 0.713 0.892 0.000 0.000 0 0 0.108
#> ERR862985 1 0.4686 0.723 0.660 0.000 0.248 0 0 0.092
#> ERR866160 1 0.4686 0.723 0.660 0.000 0.248 0 0 0.092
#> ERR866178 1 0.4686 0.723 0.660 0.000 0.248 0 0 0.092
#> ERR862986 1 0.4686 0.723 0.660 0.000 0.248 0 0 0.092
#> ERR866161 1 0.4686 0.723 0.660 0.000 0.248 0 0 0.092
#> ERR866179 1 0.4686 0.723 0.660 0.000 0.248 0 0 0.092
#> ERR862987 2 0.0146 0.973 0.000 0.996 0.004 0 0 0.000
#> ERR866162 2 0.0260 0.975 0.000 0.992 0.008 0 0 0.000
#> ERR866180 2 0.0146 0.975 0.000 0.996 0.004 0 0 0.000
#> ERR862988 2 0.0146 0.973 0.000 0.996 0.004 0 0 0.000
#> ERR866163 2 0.0146 0.973 0.000 0.996 0.004 0 0 0.000
#> ERR866181 2 0.0000 0.974 0.000 1.000 0.000 0 0 0.000
#> ERR862989 1 0.3515 0.714 0.676 0.000 0.324 0 0 0.000
#> ERR866164 1 0.3371 0.731 0.708 0.000 0.292 0 0 0.000
#> ERR866182 1 0.3464 0.722 0.688 0.000 0.312 0 0 0.000
#> ERR862990 1 0.3330 0.732 0.716 0.000 0.284 0 0 0.000
#> ERR866165 1 0.3409 0.726 0.700 0.000 0.300 0 0 0.000
#> ERR866183 1 0.3371 0.730 0.708 0.000 0.292 0 0 0.000
#> ERR862991 2 0.0146 0.975 0.000 0.996 0.004 0 0 0.000
#> ERR866166 2 0.0632 0.972 0.000 0.976 0.024 0 0 0.000
#> ERR866184 2 0.1204 0.952 0.000 0.944 0.056 0 0 0.000
#> ERR862992 2 0.0458 0.975 0.000 0.984 0.016 0 0 0.000
#> ERR866167 2 0.0146 0.975 0.000 0.996 0.004 0 0 0.000
#> ERR866185 2 0.0458 0.975 0.000 0.984 0.016 0 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)

consensus_heatmap(res, k = 3)

consensus_heatmap(res, k = 4)

consensus_heatmap(res, k = 5)

consensus_heatmap(res, k = 6)

Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)

membership_heatmap(res, k = 3)

membership_heatmap(res, k = 4)

membership_heatmap(res, k = 5)

membership_heatmap(res, k = 6)

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)

get_signatures(res, k = 3)

get_signatures(res, k = 4)

get_signatures(res, k = 5)

get_signatures(res, k = 6)

Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)

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

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

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

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

Compare the overlap of signatures from different k:
compare_signatures(res)

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.
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:
which_row
: row indices corresponding to the input matrix.
fdr
: FDR for the differential test.
mean_x
: The mean value in group x.
scaled_mean_x
: The mean value in group x after rows are scaled.
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")

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

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

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

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

Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)

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"]
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 15818 rows and 107 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'CV' method.
#> Subgroups are detected by 'NMF' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 2.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)

The plots are:
- The first row: a plot of the ECDF (empirical cumulative distribution
function) curves of the consensus matrix for each
k
and the heatmap of
predicted classes for each k
.
- The second row: heatmaps of the consensus matrix for each
k
.
- The third row: heatmaps of the membership matrix for each
k
.
- The fouth row: heatmaps of the signatures for each
k
.
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:
- ECDF curves of the consensus matrix for each
k
;
- 1-PAC. The PAC
score
measures the proportion of the ambiguous subgrouping.
- Mean silhouette score.
- Concordance. The mean probability of fiting the consensus class ids in all
partitions.
- Area increased. Denote \(A_k\) as the area under the ECDF curve for current
k
, the area increased is defined as \(A_k - A_{k-1}\).
- Rand index. The percent of pairs of samples that are both in a same cluster
or both are not in a same cluster in the partition of k and k-1.
- Jaccard index. The ratio of pairs of samples are both in a same cluster in
the partition of k and k-1 and the pairs of samples are both in a same
cluster in the partition k or k-1.
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)

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.847 0.889 0.954 0.4904 0.501 0.501
#> 3 3 0.765 0.845 0.932 0.2183 0.759 0.576
#> 4 4 0.704 0.755 0.865 0.1618 0.745 0.462
#> 5 5 0.666 0.774 0.860 0.1056 0.803 0.453
#> 6 6 0.601 0.567 0.719 0.0493 0.974 0.885
suggest_best_k()
suggests the best \(k\) based on these statistics. The rules are as follows:
- All \(k\) with Jaccard index larger than 0.95 are removed because increasing
\(k\) does not provide enough extra information. If all \(k\) are removed, it is
marked as no subgroup is detected.
- For all \(k\) with 1-PAC score larger than 0.9, the maximal \(k\) is taken as
the best \(k\), and other \(k\) are marked as optional \(k\).
- If it does not fit the second rule. The \(k\) with the maximal vote of the
highest 1-PAC score, highest mean silhouette, and highest concordance is
taken as the best \(k\).
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
#> ERR862939 1 0.0000 0.920 1.000 0.000
#> ERR862957 1 0.0000 0.920 1.000 0.000
#> ERR878007 1 0.0000 0.920 1.000 0.000
#> ERR862940 1 0.0000 0.920 1.000 0.000
#> ERR862958 1 0.0000 0.920 1.000 0.000
#> ERR878008 1 0.0000 0.920 1.000 0.000
#> ERR862941 2 0.0000 0.975 0.000 1.000
#> ERR862959 2 0.0000 0.975 0.000 1.000
#> ERR878009 2 0.0000 0.975 0.000 1.000
#> ERR862942 2 0.0000 0.975 0.000 1.000
#> ERR862960 2 0.0000 0.975 0.000 1.000
#> ERR878010 2 0.0000 0.975 0.000 1.000
#> ERR862943 1 0.0000 0.920 1.000 0.000
#> ERR862961 1 0.0000 0.920 1.000 0.000
#> ERR878011 1 0.0000 0.920 1.000 0.000
#> ERR862944 1 0.0000 0.920 1.000 0.000
#> ERR862962 1 0.0000 0.920 1.000 0.000
#> ERR878012 1 0.0000 0.920 1.000 0.000
#> ERR862945 1 0.0000 0.920 1.000 0.000
#> ERR862963 1 0.0000 0.920 1.000 0.000
#> ERR878013 1 0.0000 0.920 1.000 0.000
#> ERR862946 1 0.0000 0.920 1.000 0.000
#> ERR862964 1 0.0000 0.920 1.000 0.000
#> ERR878014 1 0.0000 0.920 1.000 0.000
#> ERR862947 2 0.0000 0.975 0.000 1.000
#> ERR862965 2 0.0000 0.975 0.000 1.000
#> ERR878015 2 0.0000 0.975 0.000 1.000
#> ERR862948 2 0.0000 0.975 0.000 1.000
#> ERR862966 2 0.0000 0.975 0.000 1.000
#> ERR878016 2 0.0000 0.975 0.000 1.000
#> ERR862949 2 0.0000 0.975 0.000 1.000
#> ERR862967 2 0.0000 0.975 0.000 1.000
#> ERR878017 2 0.0000 0.975 0.000 1.000
#> ERR862950 2 0.0000 0.975 0.000 1.000
#> ERR862968 2 0.0000 0.975 0.000 1.000
#> ERR878018 2 0.0000 0.975 0.000 1.000
#> ERR862951 2 0.9491 0.361 0.368 0.632
#> ERR862969 2 0.7883 0.658 0.236 0.764
#> ERR878019 2 0.7376 0.707 0.208 0.792
#> ERR862952 1 0.9970 0.218 0.532 0.468
#> ERR862970 1 0.8861 0.598 0.696 0.304
#> ERR878020 2 0.4161 0.883 0.084 0.916
#> ERR862953 2 0.0000 0.975 0.000 1.000
#> ERR862971 2 0.0000 0.975 0.000 1.000
#> ERR878021 2 0.0000 0.975 0.000 1.000
#> ERR862954 2 0.0000 0.975 0.000 1.000
#> ERR862972 2 0.0000 0.975 0.000 1.000
#> ERR878022 2 0.0000 0.975 0.000 1.000
#> ERR862955 2 0.0000 0.975 0.000 1.000
#> ERR862973 2 0.0000 0.975 0.000 1.000
#> ERR878023 2 0.0000 0.975 0.000 1.000
#> ERR862956 2 0.0000 0.975 0.000 1.000
#> ERR862974 2 0.0000 0.975 0.000 1.000
#> ERR878024 2 0.0000 0.975 0.000 1.000
#> ERR862975 1 0.0000 0.920 1.000 0.000
#> ERR866150 1 0.0000 0.920 1.000 0.000
#> ERR866168 1 0.0000 0.920 1.000 0.000
#> ERR862976 1 0.0000 0.920 1.000 0.000
#> ERR866151 1 0.0000 0.920 1.000 0.000
#> ERR866169 1 0.0000 0.920 1.000 0.000
#> ERR862977 2 0.0000 0.975 0.000 1.000
#> ERR866152 2 0.0000 0.975 0.000 1.000
#> ERR866170 2 0.0000 0.975 0.000 1.000
#> ERR862978 2 0.0000 0.975 0.000 1.000
#> ERR866153 2 0.0000 0.975 0.000 1.000
#> ERR866171 2 0.0000 0.975 0.000 1.000
#> ERR862979 2 0.0000 0.975 0.000 1.000
#> ERR866154 2 0.0000 0.975 0.000 1.000
#> ERR866172 2 0.0000 0.975 0.000 1.000
#> ERR862980 2 0.0000 0.975 0.000 1.000
#> ERR866155 2 0.0000 0.975 0.000 1.000
#> ERR866173 2 0.0000 0.975 0.000 1.000
#> ERR862981 1 0.9580 0.460 0.620 0.380
#> ERR866156 1 0.9552 0.469 0.624 0.376
#> ERR866174 1 0.9248 0.540 0.660 0.340
#> ERR866157 2 0.9850 0.146 0.428 0.572
#> ERR866175 1 0.9491 0.486 0.632 0.368
#> ERR862983 1 0.0000 0.920 1.000 0.000
#> ERR866158 1 0.0000 0.920 1.000 0.000
#> ERR866176 1 0.0000 0.920 1.000 0.000
#> ERR862984 1 0.0000 0.920 1.000 0.000
#> ERR866159 1 0.0000 0.920 1.000 0.000
#> ERR866177 1 0.0000 0.920 1.000 0.000
#> ERR862985 1 0.7745 0.709 0.772 0.228
#> ERR866160 1 0.1414 0.907 0.980 0.020
#> ERR866178 1 0.0376 0.918 0.996 0.004
#> ERR862986 1 0.7528 0.725 0.784 0.216
#> ERR866161 1 0.9833 0.353 0.576 0.424
#> ERR866179 1 0.9909 0.297 0.556 0.444
#> ERR862987 2 0.0000 0.975 0.000 1.000
#> ERR866162 2 0.0000 0.975 0.000 1.000
#> ERR866180 2 0.0000 0.975 0.000 1.000
#> ERR862988 2 0.0000 0.975 0.000 1.000
#> ERR866163 2 0.0000 0.975 0.000 1.000
#> ERR866181 2 0.0000 0.975 0.000 1.000
#> ERR862989 1 0.0000 0.920 1.000 0.000
#> ERR866164 1 0.0000 0.920 1.000 0.000
#> ERR866182 1 0.0672 0.915 0.992 0.008
#> ERR862990 1 0.0000 0.920 1.000 0.000
#> ERR866165 1 0.0000 0.920 1.000 0.000
#> ERR866183 1 0.0000 0.920 1.000 0.000
#> ERR862991 2 0.0000 0.975 0.000 1.000
#> ERR866166 2 0.0000 0.975 0.000 1.000
#> ERR866184 2 0.0000 0.975 0.000 1.000
#> ERR862992 2 0.0000 0.975 0.000 1.000
#> ERR866167 2 0.0000 0.975 0.000 1.000
#> ERR866185 2 0.0000 0.975 0.000 1.000
show/hide code output
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> ERR862939 1 0.6168 0.0344 0.588 0.000 0.412
#> ERR862957 1 0.5560 0.4235 0.700 0.000 0.300
#> ERR878007 1 0.1860 0.8932 0.948 0.000 0.052
#> ERR862940 3 0.6307 0.2838 0.488 0.000 0.512
#> ERR862958 1 0.6305 -0.2587 0.516 0.000 0.484
#> ERR878008 1 0.6008 0.1964 0.628 0.000 0.372
#> ERR862941 2 0.0000 0.9163 0.000 1.000 0.000
#> ERR862959 2 0.0000 0.9163 0.000 1.000 0.000
#> ERR878009 2 0.0000 0.9163 0.000 1.000 0.000
#> ERR862942 2 0.0000 0.9163 0.000 1.000 0.000
#> ERR862960 2 0.0000 0.9163 0.000 1.000 0.000
#> ERR878010 2 0.0000 0.9163 0.000 1.000 0.000
#> ERR862943 3 0.4887 0.7770 0.228 0.000 0.772
#> ERR862961 3 0.5058 0.7708 0.244 0.000 0.756
#> ERR878011 3 0.5560 0.7238 0.300 0.000 0.700
#> ERR862944 3 0.5560 0.7244 0.300 0.000 0.700
#> ERR862962 3 0.5291 0.7556 0.268 0.000 0.732
#> ERR878012 3 0.5529 0.7295 0.296 0.000 0.704
#> ERR862945 3 0.0000 0.8048 0.000 0.000 1.000
#> ERR862963 3 0.0000 0.8048 0.000 0.000 1.000
#> ERR878013 3 0.0000 0.8048 0.000 0.000 1.000
#> ERR862946 3 0.0000 0.8048 0.000 0.000 1.000
#> ERR862964 3 0.0000 0.8048 0.000 0.000 1.000
#> ERR878014 3 0.0000 0.8048 0.000 0.000 1.000
#> ERR862947 2 0.0000 0.9163 0.000 1.000 0.000
#> ERR862965 2 0.0000 0.9163 0.000 1.000 0.000
#> ERR878015 2 0.0000 0.9163 0.000 1.000 0.000
#> ERR862948 2 0.0000 0.9163 0.000 1.000 0.000
#> ERR862966 2 0.0000 0.9163 0.000 1.000 0.000
#> ERR878016 2 0.0000 0.9163 0.000 1.000 0.000
#> ERR862949 2 0.0000 0.9163 0.000 1.000 0.000
#> ERR862967 2 0.0000 0.9163 0.000 1.000 0.000
#> ERR878017 2 0.0000 0.9163 0.000 1.000 0.000
#> ERR862950 2 0.0000 0.9163 0.000 1.000 0.000
#> ERR862968 2 0.0000 0.9163 0.000 1.000 0.000
#> ERR878018 2 0.0000 0.9163 0.000 1.000 0.000
#> ERR862951 1 0.0747 0.9261 0.984 0.016 0.000
#> ERR862969 1 0.0000 0.9431 1.000 0.000 0.000
#> ERR878019 1 0.0000 0.9431 1.000 0.000 0.000
#> ERR862952 1 0.0424 0.9358 0.992 0.008 0.000
#> ERR862970 1 0.0000 0.9431 1.000 0.000 0.000
#> ERR878020 1 0.0000 0.9431 1.000 0.000 0.000
#> ERR862953 1 0.0237 0.9398 0.996 0.004 0.000
#> ERR862971 1 0.2066 0.8637 0.940 0.060 0.000
#> ERR878021 1 0.0237 0.9398 0.996 0.004 0.000
#> ERR862954 1 0.0424 0.9359 0.992 0.008 0.000
#> ERR862972 1 0.0000 0.9431 1.000 0.000 0.000
#> ERR878022 1 0.2165 0.8575 0.936 0.064 0.000
#> ERR862955 2 0.5706 0.6199 0.320 0.680 0.000
#> ERR862973 2 0.4702 0.7451 0.212 0.788 0.000
#> ERR878023 2 0.5733 0.6158 0.324 0.676 0.000
#> ERR862956 2 0.3879 0.8016 0.152 0.848 0.000
#> ERR862974 2 0.5591 0.6429 0.304 0.696 0.000
#> ERR878024 2 0.5706 0.6219 0.320 0.680 0.000
#> ERR862975 1 0.0000 0.9431 1.000 0.000 0.000
#> ERR866150 1 0.0000 0.9431 1.000 0.000 0.000
#> ERR866168 1 0.0000 0.9431 1.000 0.000 0.000
#> ERR862976 1 0.0000 0.9431 1.000 0.000 0.000
#> ERR866151 1 0.0000 0.9431 1.000 0.000 0.000
#> ERR866169 1 0.0000 0.9431 1.000 0.000 0.000
#> ERR862977 2 0.5431 0.6668 0.284 0.716 0.000
#> ERR866152 2 0.5650 0.6316 0.312 0.688 0.000
#> ERR866170 2 0.4346 0.7725 0.184 0.816 0.000
#> ERR862978 2 0.4002 0.7946 0.160 0.840 0.000
#> ERR866153 2 0.5706 0.6217 0.320 0.680 0.000
#> ERR866171 2 0.5621 0.6378 0.308 0.692 0.000
#> ERR862979 2 0.0000 0.9163 0.000 1.000 0.000
#> ERR866154 2 0.0000 0.9163 0.000 1.000 0.000
#> ERR866172 2 0.0000 0.9163 0.000 1.000 0.000
#> ERR862980 2 0.0000 0.9163 0.000 1.000 0.000
#> ERR866155 2 0.0000 0.9163 0.000 1.000 0.000
#> ERR866173 2 0.0000 0.9163 0.000 1.000 0.000
#> ERR862981 1 0.0000 0.9431 1.000 0.000 0.000
#> ERR866156 1 0.0000 0.9431 1.000 0.000 0.000
#> ERR866174 1 0.0000 0.9431 1.000 0.000 0.000
#> ERR866157 1 0.0000 0.9431 1.000 0.000 0.000
#> ERR866175 1 0.0000 0.9431 1.000 0.000 0.000
#> ERR862983 1 0.2261 0.8769 0.932 0.000 0.068
#> ERR866158 1 0.1529 0.9093 0.960 0.000 0.040
#> ERR866176 1 0.0237 0.9404 0.996 0.000 0.004
#> ERR862984 1 0.0747 0.9314 0.984 0.000 0.016
#> ERR866159 1 0.0592 0.9349 0.988 0.000 0.012
#> ERR866177 1 0.0592 0.9349 0.988 0.000 0.012
#> ERR862985 1 0.0000 0.9431 1.000 0.000 0.000
#> ERR866160 1 0.0000 0.9431 1.000 0.000 0.000
#> ERR866178 1 0.0000 0.9431 1.000 0.000 0.000
#> ERR862986 1 0.0000 0.9431 1.000 0.000 0.000
#> ERR866161 1 0.0000 0.9431 1.000 0.000 0.000
#> ERR866179 1 0.0000 0.9431 1.000 0.000 0.000
#> ERR862987 2 0.0000 0.9163 0.000 1.000 0.000
#> ERR866162 2 0.0000 0.9163 0.000 1.000 0.000
#> ERR866180 2 0.0000 0.9163 0.000 1.000 0.000
#> ERR862988 2 0.0000 0.9163 0.000 1.000 0.000
#> ERR866163 2 0.0000 0.9163 0.000 1.000 0.000
#> ERR866181 2 0.0000 0.9163 0.000 1.000 0.000
#> ERR862989 1 0.0000 0.9431 1.000 0.000 0.000
#> ERR866164 1 0.0000 0.9431 1.000 0.000 0.000
#> ERR866182 1 0.0000 0.9431 1.000 0.000 0.000
#> ERR862990 1 0.0000 0.9431 1.000 0.000 0.000
#> ERR866165 1 0.0000 0.9431 1.000 0.000 0.000
#> ERR866183 1 0.0000 0.9431 1.000 0.000 0.000
#> ERR862991 2 0.0000 0.9163 0.000 1.000 0.000
#> ERR866166 2 0.0000 0.9163 0.000 1.000 0.000
#> ERR866184 2 0.0000 0.9163 0.000 1.000 0.000
#> ERR862992 2 0.0000 0.9163 0.000 1.000 0.000
#> ERR866167 2 0.0000 0.9163 0.000 1.000 0.000
#> ERR866185 2 0.0000 0.9163 0.000 1.000 0.000
show/hide code output
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> ERR862939 3 0.0376 0.785 0.004 0.000 0.992 0.004
#> ERR862957 3 0.0376 0.785 0.004 0.000 0.992 0.004
#> ERR878007 3 0.0376 0.785 0.004 0.000 0.992 0.004
#> ERR862940 3 0.0188 0.783 0.000 0.000 0.996 0.004
#> ERR862958 3 0.0188 0.783 0.000 0.000 0.996 0.004
#> ERR878008 3 0.0524 0.787 0.008 0.000 0.988 0.004
#> ERR862941 2 0.0895 0.970 0.020 0.976 0.004 0.000
#> ERR862959 2 0.0657 0.971 0.012 0.984 0.004 0.000
#> ERR878009 2 0.0921 0.967 0.028 0.972 0.000 0.000
#> ERR862942 2 0.1022 0.964 0.032 0.968 0.000 0.000
#> ERR862960 2 0.0469 0.970 0.012 0.988 0.000 0.000
#> ERR878010 2 0.0817 0.968 0.024 0.976 0.000 0.000
#> ERR862943 3 0.5367 0.608 0.032 0.000 0.664 0.304
#> ERR862961 3 0.4767 0.661 0.020 0.000 0.724 0.256
#> ERR878011 3 0.6295 0.612 0.088 0.000 0.616 0.296
#> ERR862944 3 0.5579 0.661 0.060 0.000 0.688 0.252
#> ERR862962 3 0.4319 0.686 0.012 0.000 0.760 0.228
#> ERR878012 3 0.5697 0.630 0.052 0.000 0.656 0.292
#> ERR862945 4 0.0188 1.000 0.000 0.000 0.004 0.996
#> ERR862963 4 0.0188 1.000 0.000 0.000 0.004 0.996
#> ERR878013 4 0.0188 1.000 0.000 0.000 0.004 0.996
#> ERR862946 4 0.0188 1.000 0.000 0.000 0.004 0.996
#> ERR862964 4 0.0188 1.000 0.000 0.000 0.004 0.996
#> ERR878014 4 0.0188 1.000 0.000 0.000 0.004 0.996
#> ERR862947 2 0.0188 0.972 0.004 0.996 0.000 0.000
#> ERR862965 2 0.0188 0.972 0.004 0.996 0.000 0.000
#> ERR878015 2 0.0188 0.972 0.004 0.996 0.000 0.000
#> ERR862948 2 0.0592 0.972 0.016 0.984 0.000 0.000
#> ERR862966 2 0.0524 0.971 0.008 0.988 0.004 0.000
#> ERR878016 2 0.0188 0.972 0.004 0.996 0.000 0.000
#> ERR862949 2 0.1388 0.963 0.012 0.960 0.028 0.000
#> ERR862967 2 0.1109 0.969 0.028 0.968 0.004 0.000
#> ERR878017 2 0.0779 0.970 0.004 0.980 0.016 0.000
#> ERR862950 2 0.0804 0.970 0.008 0.980 0.012 0.000
#> ERR862968 2 0.0524 0.971 0.008 0.988 0.004 0.000
#> ERR878018 2 0.0376 0.972 0.004 0.992 0.004 0.000
#> ERR862951 1 0.2814 0.631 0.868 0.000 0.132 0.000
#> ERR862969 1 0.4793 0.542 0.756 0.040 0.204 0.000
#> ERR878019 1 0.2149 0.671 0.912 0.000 0.088 0.000
#> ERR862952 1 0.6011 -0.253 0.484 0.040 0.476 0.000
#> ERR862970 1 0.2216 0.665 0.908 0.000 0.092 0.000
#> ERR878020 1 0.1022 0.699 0.968 0.000 0.032 0.000
#> ERR862953 1 0.3009 0.702 0.892 0.056 0.052 0.000
#> ERR862971 1 0.2483 0.703 0.916 0.052 0.032 0.000
#> ERR878021 1 0.0592 0.701 0.984 0.000 0.016 0.000
#> ERR862954 1 0.1854 0.703 0.940 0.048 0.012 0.000
#> ERR862972 1 0.2334 0.684 0.908 0.004 0.088 0.000
#> ERR878022 1 0.1824 0.700 0.936 0.060 0.004 0.000
#> ERR862955 1 0.5517 0.388 0.568 0.412 0.020 0.000
#> ERR862973 1 0.5383 0.307 0.536 0.452 0.012 0.000
#> ERR878023 1 0.4978 0.476 0.612 0.384 0.004 0.000
#> ERR862956 1 0.5060 0.412 0.584 0.412 0.004 0.000
#> ERR862974 1 0.4990 0.517 0.640 0.352 0.008 0.000
#> ERR878024 1 0.4978 0.476 0.612 0.384 0.004 0.000
#> ERR862975 1 0.1022 0.699 0.968 0.000 0.032 0.000
#> ERR866150 1 0.1022 0.699 0.968 0.000 0.032 0.000
#> ERR866168 1 0.1022 0.699 0.968 0.000 0.032 0.000
#> ERR862976 1 0.1388 0.699 0.960 0.000 0.028 0.012
#> ERR866151 1 0.0707 0.700 0.980 0.000 0.020 0.000
#> ERR866169 1 0.1042 0.700 0.972 0.000 0.020 0.008
#> ERR862977 1 0.4804 0.481 0.616 0.384 0.000 0.000
#> ERR866152 1 0.4431 0.579 0.696 0.304 0.000 0.000
#> ERR866170 1 0.4925 0.382 0.572 0.428 0.000 0.000
#> ERR862978 1 0.4985 0.274 0.532 0.468 0.000 0.000
#> ERR866153 1 0.4564 0.554 0.672 0.328 0.000 0.000
#> ERR866171 1 0.4746 0.507 0.632 0.368 0.000 0.000
#> ERR862979 2 0.2840 0.924 0.056 0.900 0.044 0.000
#> ERR866154 2 0.1661 0.950 0.052 0.944 0.004 0.000
#> ERR866172 2 0.0895 0.970 0.004 0.976 0.020 0.000
#> ERR862980 2 0.2408 0.890 0.104 0.896 0.000 0.000
#> ERR866155 2 0.0817 0.966 0.024 0.976 0.000 0.000
#> ERR866173 2 0.0707 0.969 0.020 0.980 0.000 0.000
#> ERR862981 3 0.2345 0.813 0.100 0.000 0.900 0.000
#> ERR866156 3 0.3528 0.780 0.192 0.000 0.808 0.000
#> ERR866174 3 0.3873 0.755 0.228 0.000 0.772 0.000
#> ERR866157 3 0.2334 0.813 0.088 0.004 0.908 0.000
#> ERR866175 3 0.2814 0.809 0.132 0.000 0.868 0.000
#> ERR862983 3 0.6403 0.705 0.232 0.000 0.640 0.128
#> ERR866158 3 0.6835 0.627 0.288 0.000 0.576 0.136
#> ERR866176 1 0.6495 -0.291 0.492 0.000 0.436 0.072
#> ERR862984 3 0.5994 0.661 0.296 0.000 0.636 0.068
#> ERR866159 3 0.6357 0.503 0.388 0.000 0.544 0.068
#> ERR866177 3 0.6586 0.436 0.420 0.000 0.500 0.080
#> ERR862985 3 0.2149 0.813 0.088 0.000 0.912 0.000
#> ERR866160 3 0.2408 0.811 0.104 0.000 0.896 0.000
#> ERR866178 3 0.2814 0.806 0.132 0.000 0.868 0.000
#> ERR862986 3 0.1940 0.810 0.076 0.000 0.924 0.000
#> ERR866161 3 0.2401 0.811 0.092 0.004 0.904 0.000
#> ERR866179 3 0.2530 0.811 0.112 0.000 0.888 0.000
#> ERR862987 2 0.1042 0.967 0.008 0.972 0.020 0.000
#> ERR866162 2 0.0336 0.972 0.000 0.992 0.008 0.000
#> ERR866180 2 0.1004 0.968 0.004 0.972 0.024 0.000
#> ERR862988 2 0.1545 0.954 0.008 0.952 0.040 0.000
#> ERR866163 2 0.0657 0.971 0.004 0.984 0.012 0.000
#> ERR866181 2 0.1022 0.964 0.000 0.968 0.032 0.000
#> ERR862989 1 0.3801 0.499 0.780 0.000 0.220 0.000
#> ERR866164 1 0.3726 0.514 0.788 0.000 0.212 0.000
#> ERR866182 1 0.4331 0.370 0.712 0.000 0.288 0.000
#> ERR862990 1 0.1940 0.679 0.924 0.000 0.076 0.000
#> ERR866165 1 0.2281 0.666 0.904 0.000 0.096 0.000
#> ERR866183 1 0.2281 0.665 0.904 0.000 0.096 0.000
#> ERR862991 2 0.1854 0.951 0.012 0.940 0.048 0.000
#> ERR866166 2 0.1474 0.949 0.052 0.948 0.000 0.000
#> ERR866184 2 0.1118 0.962 0.036 0.964 0.000 0.000
#> ERR862992 2 0.2124 0.930 0.008 0.924 0.068 0.000
#> ERR866167 2 0.1388 0.967 0.012 0.960 0.028 0.000
#> ERR866185 2 0.1118 0.963 0.036 0.964 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
#> ERR862939 3 0.1671 0.822 0.076 0.000 0.924 0.000 0.000
#> ERR862957 3 0.1121 0.807 0.044 0.000 0.956 0.000 0.000
#> ERR878007 3 0.1410 0.816 0.060 0.000 0.940 0.000 0.000
#> ERR862940 3 0.1732 0.823 0.080 0.000 0.920 0.000 0.000
#> ERR862958 3 0.1608 0.822 0.072 0.000 0.928 0.000 0.000
#> ERR878008 3 0.1792 0.824 0.084 0.000 0.916 0.000 0.000
#> ERR862941 5 0.3365 0.871 0.000 0.120 0.044 0.000 0.836
#> ERR862959 5 0.0693 0.923 0.000 0.012 0.008 0.000 0.980
#> ERR878009 5 0.2848 0.835 0.000 0.156 0.004 0.000 0.840
#> ERR862942 5 0.3400 0.865 0.000 0.136 0.036 0.000 0.828
#> ERR862960 5 0.0693 0.924 0.000 0.012 0.008 0.000 0.980
#> ERR878010 5 0.1764 0.918 0.000 0.064 0.008 0.000 0.928
#> ERR862943 1 0.4401 0.379 0.656 0.000 0.328 0.016 0.000
#> ERR862961 1 0.4464 0.141 0.584 0.000 0.408 0.008 0.000
#> ERR878011 1 0.3642 0.600 0.760 0.000 0.232 0.008 0.000
#> ERR862944 1 0.4576 0.240 0.608 0.000 0.376 0.016 0.000
#> ERR862962 3 0.4557 0.240 0.476 0.000 0.516 0.008 0.000
#> ERR878012 1 0.4183 0.409 0.668 0.000 0.324 0.008 0.000
#> ERR862945 4 0.0000 1.000 0.000 0.000 0.000 1.000 0.000
#> ERR862963 4 0.0000 1.000 0.000 0.000 0.000 1.000 0.000
#> ERR878013 4 0.0000 1.000 0.000 0.000 0.000 1.000 0.000
#> ERR862946 4 0.0000 1.000 0.000 0.000 0.000 1.000 0.000
#> ERR862964 4 0.0000 1.000 0.000 0.000 0.000 1.000 0.000
#> ERR878014 4 0.0000 1.000 0.000 0.000 0.000 1.000 0.000
#> ERR862947 5 0.0451 0.923 0.000 0.004 0.008 0.000 0.988
#> ERR862965 5 0.0451 0.923 0.000 0.004 0.008 0.000 0.988
#> ERR878015 5 0.0451 0.923 0.000 0.004 0.008 0.000 0.988
#> ERR862948 5 0.0579 0.923 0.000 0.008 0.008 0.000 0.984
#> ERR862966 5 0.0162 0.924 0.000 0.004 0.000 0.000 0.996
#> ERR878016 5 0.0451 0.923 0.000 0.004 0.008 0.000 0.988
#> ERR862949 5 0.2139 0.917 0.000 0.032 0.052 0.000 0.916
#> ERR862967 5 0.2236 0.915 0.000 0.068 0.024 0.000 0.908
#> ERR878017 5 0.0566 0.924 0.000 0.004 0.012 0.000 0.984
#> ERR862950 5 0.1310 0.925 0.000 0.024 0.020 0.000 0.956
#> ERR862968 5 0.0579 0.924 0.000 0.008 0.008 0.000 0.984
#> ERR878018 5 0.0912 0.923 0.000 0.012 0.016 0.000 0.972
#> ERR862951 1 0.1701 0.808 0.944 0.016 0.012 0.000 0.028
#> ERR862969 1 0.2086 0.809 0.928 0.016 0.028 0.000 0.028
#> ERR878019 1 0.0510 0.815 0.984 0.016 0.000 0.000 0.000
#> ERR862952 1 0.3090 0.780 0.876 0.016 0.052 0.000 0.056
#> ERR862970 1 0.2439 0.784 0.876 0.120 0.004 0.000 0.000
#> ERR878020 1 0.1892 0.800 0.916 0.080 0.000 0.000 0.004
#> ERR862953 2 0.4116 0.670 0.248 0.732 0.016 0.000 0.004
#> ERR862971 2 0.3842 0.753 0.156 0.804 0.012 0.000 0.028
#> ERR878021 2 0.3160 0.725 0.188 0.808 0.004 0.000 0.000
#> ERR862954 2 0.2612 0.772 0.124 0.868 0.000 0.000 0.008
#> ERR862972 2 0.3527 0.744 0.172 0.804 0.024 0.000 0.000
#> ERR878022 2 0.3845 0.707 0.208 0.768 0.000 0.000 0.024
#> ERR862955 2 0.1059 0.808 0.004 0.968 0.008 0.000 0.020
#> ERR862973 2 0.1299 0.810 0.008 0.960 0.012 0.000 0.020
#> ERR878023 2 0.1836 0.814 0.016 0.936 0.008 0.000 0.040
#> ERR862956 2 0.1405 0.810 0.020 0.956 0.008 0.000 0.016
#> ERR862974 2 0.1393 0.805 0.024 0.956 0.012 0.000 0.008
#> ERR878024 2 0.2036 0.818 0.024 0.920 0.000 0.000 0.056
#> ERR862975 1 0.2424 0.772 0.868 0.132 0.000 0.000 0.000
#> ERR866150 1 0.2813 0.743 0.832 0.168 0.000 0.000 0.000
#> ERR866168 1 0.3109 0.715 0.800 0.200 0.000 0.000 0.000
#> ERR862976 1 0.2377 0.776 0.872 0.128 0.000 0.000 0.000
#> ERR866151 1 0.3561 0.647 0.740 0.260 0.000 0.000 0.000
#> ERR866169 1 0.3612 0.635 0.732 0.268 0.000 0.000 0.000
#> ERR862977 2 0.2460 0.815 0.024 0.900 0.004 0.000 0.072
#> ERR866152 2 0.2300 0.813 0.040 0.908 0.000 0.000 0.052
#> ERR866170 2 0.2075 0.814 0.040 0.924 0.004 0.000 0.032
#> ERR862978 2 0.2054 0.815 0.028 0.920 0.000 0.000 0.052
#> ERR866153 2 0.2694 0.814 0.040 0.884 0.000 0.000 0.076
#> ERR866171 2 0.3257 0.803 0.028 0.844 0.004 0.000 0.124
#> ERR862979 2 0.5039 0.646 0.000 0.676 0.080 0.000 0.244
#> ERR866154 2 0.4972 0.513 0.000 0.620 0.044 0.000 0.336
#> ERR866172 5 0.3882 0.767 0.000 0.168 0.044 0.000 0.788
#> ERR862980 2 0.4846 0.402 0.000 0.588 0.028 0.000 0.384
#> ERR866155 5 0.2408 0.897 0.000 0.092 0.016 0.000 0.892
#> ERR866173 5 0.2974 0.895 0.000 0.080 0.052 0.000 0.868
#> ERR862981 3 0.3381 0.795 0.176 0.016 0.808 0.000 0.000
#> ERR866156 3 0.4410 0.357 0.440 0.004 0.556 0.000 0.000
#> ERR866174 3 0.4562 0.173 0.496 0.008 0.496 0.000 0.000
#> ERR866157 3 0.4004 0.755 0.232 0.004 0.748 0.000 0.016
#> ERR866175 3 0.3551 0.774 0.220 0.008 0.772 0.000 0.000
#> ERR862983 1 0.2233 0.770 0.892 0.004 0.104 0.000 0.000
#> ERR866158 1 0.2233 0.771 0.892 0.004 0.104 0.000 0.000
#> ERR866176 1 0.1484 0.802 0.944 0.008 0.048 0.000 0.000
#> ERR862984 1 0.2286 0.769 0.888 0.004 0.108 0.000 0.000
#> ERR866159 1 0.2124 0.779 0.900 0.004 0.096 0.000 0.000
#> ERR866177 1 0.1478 0.794 0.936 0.000 0.064 0.000 0.000
#> ERR862985 3 0.2830 0.772 0.044 0.080 0.876 0.000 0.000
#> ERR866160 3 0.3181 0.802 0.072 0.072 0.856 0.000 0.000
#> ERR866178 3 0.3888 0.820 0.136 0.064 0.800 0.000 0.000
#> ERR862986 3 0.3055 0.822 0.144 0.016 0.840 0.000 0.000
#> ERR866161 3 0.2795 0.753 0.028 0.080 0.884 0.000 0.008
#> ERR866179 3 0.3401 0.773 0.064 0.096 0.840 0.000 0.000
#> ERR862987 5 0.2144 0.913 0.000 0.068 0.020 0.000 0.912
#> ERR866162 5 0.2595 0.906 0.000 0.080 0.032 0.000 0.888
#> ERR866180 5 0.3323 0.884 0.000 0.100 0.056 0.000 0.844
#> ERR862988 5 0.2409 0.907 0.000 0.032 0.068 0.000 0.900
#> ERR866163 5 0.2848 0.891 0.000 0.104 0.028 0.000 0.868
#> ERR866181 5 0.3888 0.839 0.000 0.136 0.064 0.000 0.800
#> ERR862989 1 0.1310 0.816 0.956 0.024 0.020 0.000 0.000
#> ERR866164 1 0.0992 0.816 0.968 0.024 0.008 0.000 0.000
#> ERR866182 1 0.2012 0.806 0.920 0.020 0.060 0.000 0.000
#> ERR862990 1 0.1430 0.813 0.944 0.052 0.004 0.000 0.000
#> ERR866165 1 0.1205 0.815 0.956 0.040 0.004 0.000 0.000
#> ERR866183 1 0.1557 0.812 0.940 0.052 0.008 0.000 0.000
#> ERR862991 2 0.5868 0.295 0.000 0.516 0.104 0.000 0.380
#> ERR866166 2 0.3366 0.773 0.000 0.828 0.032 0.000 0.140
#> ERR866184 2 0.4415 0.465 0.000 0.604 0.008 0.000 0.388
#> ERR862992 2 0.5013 0.664 0.000 0.700 0.108 0.000 0.192
#> ERR866167 2 0.4238 0.736 0.000 0.776 0.088 0.000 0.136
#> ERR866185 2 0.3449 0.761 0.000 0.812 0.024 0.000 0.164
show/hide code output
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> ERR862939 6 0.1564 0.3955 0.040 0.000 0.024 0.000 0.000 0.936
#> ERR862957 6 0.1421 0.3816 0.028 0.000 0.028 0.000 0.000 0.944
#> ERR878007 6 0.1723 0.3803 0.036 0.000 0.036 0.000 0.000 0.928
#> ERR862940 6 0.1391 0.3963 0.040 0.000 0.016 0.000 0.000 0.944
#> ERR862958 6 0.1168 0.3927 0.028 0.000 0.016 0.000 0.000 0.956
#> ERR878008 6 0.1434 0.3957 0.048 0.000 0.012 0.000 0.000 0.940
#> ERR862941 5 0.4667 0.7275 0.000 0.108 0.140 0.000 0.728 0.024
#> ERR862959 5 0.1793 0.7829 0.000 0.032 0.036 0.000 0.928 0.004
#> ERR878009 5 0.3139 0.7288 0.000 0.160 0.028 0.000 0.812 0.000
#> ERR862942 5 0.5621 0.5531 0.012 0.220 0.180 0.000 0.588 0.000
#> ERR862960 5 0.1708 0.7854 0.000 0.040 0.024 0.000 0.932 0.004
#> ERR878010 5 0.2384 0.7810 0.000 0.064 0.048 0.000 0.888 0.000
#> ERR862943 6 0.5616 0.0443 0.440 0.000 0.112 0.008 0.000 0.440
#> ERR862961 6 0.5481 0.0508 0.436 0.000 0.124 0.000 0.000 0.440
#> ERR878011 1 0.5000 0.5177 0.672 0.000 0.124 0.012 0.000 0.192
#> ERR862944 1 0.5494 0.1105 0.504 0.000 0.136 0.000 0.000 0.360
#> ERR862962 6 0.5317 0.1298 0.316 0.000 0.112 0.004 0.000 0.568
#> ERR878012 1 0.5240 0.3390 0.588 0.000 0.136 0.000 0.000 0.276
#> ERR862945 4 0.0000 1.0000 0.000 0.000 0.000 1.000 0.000 0.000
#> ERR862963 4 0.0000 1.0000 0.000 0.000 0.000 1.000 0.000 0.000
#> ERR878013 4 0.0000 1.0000 0.000 0.000 0.000 1.000 0.000 0.000
#> ERR862946 4 0.0000 1.0000 0.000 0.000 0.000 1.000 0.000 0.000
#> ERR862964 4 0.0000 1.0000 0.000 0.000 0.000 1.000 0.000 0.000
#> ERR878014 4 0.0000 1.0000 0.000 0.000 0.000 1.000 0.000 0.000
#> ERR862947 5 0.1225 0.7831 0.000 0.012 0.036 0.000 0.952 0.000
#> ERR862965 5 0.0806 0.7840 0.000 0.008 0.020 0.000 0.972 0.000
#> ERR878015 5 0.0891 0.7833 0.000 0.008 0.024 0.000 0.968 0.000
#> ERR862948 5 0.1829 0.7809 0.000 0.024 0.056 0.000 0.920 0.000
#> ERR862966 5 0.1434 0.7873 0.000 0.012 0.048 0.000 0.940 0.000
#> ERR878016 5 0.0713 0.7839 0.000 0.000 0.028 0.000 0.972 0.000
#> ERR862949 5 0.4926 0.7171 0.000 0.032 0.200 0.000 0.692 0.076
#> ERR862967 5 0.4411 0.7374 0.000 0.076 0.172 0.000 0.736 0.016
#> ERR878017 5 0.1531 0.7863 0.000 0.004 0.068 0.000 0.928 0.000
#> ERR862950 5 0.3272 0.7747 0.000 0.048 0.124 0.000 0.824 0.004
#> ERR862968 5 0.2015 0.7861 0.000 0.012 0.056 0.000 0.916 0.016
#> ERR878018 5 0.2121 0.7826 0.000 0.012 0.096 0.000 0.892 0.000
#> ERR862951 1 0.4562 0.7117 0.776 0.064 0.096 0.000 0.028 0.036
#> ERR862969 1 0.3822 0.7176 0.812 0.016 0.116 0.000 0.024 0.032
#> ERR878019 1 0.1572 0.7442 0.936 0.028 0.036 0.000 0.000 0.000
#> ERR862952 1 0.6136 0.5813 0.640 0.032 0.168 0.000 0.084 0.076
#> ERR862970 1 0.4869 0.6791 0.732 0.132 0.104 0.004 0.016 0.012
#> ERR878020 1 0.1819 0.7445 0.932 0.024 0.032 0.000 0.008 0.004
#> ERR862953 2 0.4122 0.6850 0.156 0.776 0.036 0.000 0.016 0.016
#> ERR862971 2 0.6249 0.5189 0.220 0.576 0.156 0.000 0.024 0.024
#> ERR878021 2 0.3202 0.6667 0.176 0.800 0.024 0.000 0.000 0.000
#> ERR862954 2 0.3421 0.7110 0.116 0.824 0.044 0.000 0.016 0.000
#> ERR862972 2 0.5022 0.6601 0.160 0.704 0.108 0.000 0.012 0.016
#> ERR878022 2 0.3804 0.6539 0.184 0.768 0.040 0.000 0.008 0.000
#> ERR862955 2 0.3099 0.7100 0.008 0.820 0.160 0.000 0.004 0.008
#> ERR862973 2 0.2883 0.7122 0.000 0.832 0.152 0.000 0.008 0.008
#> ERR878023 2 0.3337 0.7167 0.004 0.820 0.136 0.000 0.036 0.004
#> ERR862956 2 0.2948 0.7126 0.016 0.840 0.136 0.000 0.004 0.004
#> ERR862974 2 0.3612 0.7073 0.016 0.804 0.152 0.000 0.016 0.012
#> ERR878024 2 0.3095 0.7212 0.008 0.840 0.116 0.000 0.036 0.000
#> ERR862975 1 0.2664 0.7259 0.848 0.136 0.016 0.000 0.000 0.000
#> ERR866150 1 0.2830 0.7186 0.836 0.144 0.020 0.000 0.000 0.000
#> ERR866168 1 0.2531 0.7241 0.856 0.132 0.012 0.000 0.000 0.000
#> ERR862976 1 0.2214 0.7394 0.892 0.092 0.012 0.004 0.000 0.000
#> ERR866151 1 0.3231 0.6771 0.784 0.200 0.016 0.000 0.000 0.000
#> ERR866169 1 0.3541 0.6467 0.748 0.232 0.020 0.000 0.000 0.000
#> ERR862977 2 0.3153 0.7359 0.048 0.856 0.032 0.000 0.064 0.000
#> ERR866152 2 0.2604 0.7347 0.056 0.888 0.024 0.000 0.032 0.000
#> ERR866170 2 0.2839 0.7406 0.040 0.876 0.052 0.000 0.032 0.000
#> ERR862978 2 0.2486 0.7356 0.040 0.896 0.040 0.000 0.024 0.000
#> ERR866153 2 0.2451 0.7303 0.068 0.888 0.004 0.000 0.040 0.000
#> ERR866171 2 0.3171 0.7374 0.044 0.856 0.040 0.000 0.060 0.000
#> ERR862979 2 0.7249 0.3943 0.016 0.460 0.252 0.000 0.180 0.092
#> ERR866154 2 0.7032 0.3885 0.044 0.480 0.220 0.000 0.228 0.028
#> ERR866172 5 0.7055 0.4487 0.028 0.196 0.180 0.000 0.520 0.076
#> ERR862980 2 0.6962 0.4171 0.044 0.516 0.172 0.000 0.228 0.040
#> ERR866155 5 0.5445 0.6149 0.048 0.140 0.148 0.000 0.664 0.000
#> ERR866173 5 0.6424 0.5606 0.048 0.168 0.184 0.000 0.580 0.020
#> ERR862981 3 0.5862 0.4528 0.124 0.016 0.444 0.000 0.000 0.416
#> ERR866156 3 0.6166 0.3613 0.252 0.004 0.384 0.000 0.000 0.360
#> ERR866174 3 0.6219 0.3284 0.300 0.004 0.384 0.000 0.000 0.312
#> ERR866157 6 0.6076 -0.4357 0.164 0.000 0.364 0.000 0.016 0.456
#> ERR866175 6 0.6095 -0.4587 0.180 0.012 0.376 0.000 0.000 0.432
#> ERR862983 1 0.4252 0.6013 0.724 0.000 0.188 0.000 0.000 0.088
#> ERR866158 1 0.4358 0.6050 0.728 0.000 0.172 0.004 0.000 0.096
#> ERR866176 1 0.3819 0.6381 0.764 0.000 0.172 0.000 0.000 0.064
#> ERR862984 1 0.4718 0.5294 0.676 0.000 0.200 0.000 0.000 0.124
#> ERR866159 1 0.4141 0.6165 0.740 0.000 0.168 0.000 0.000 0.092
#> ERR866177 1 0.3790 0.6408 0.772 0.000 0.156 0.000 0.000 0.072
#> ERR862985 6 0.5452 -0.4967 0.020 0.068 0.444 0.000 0.000 0.468
#> ERR866160 6 0.5451 -0.5248 0.028 0.056 0.452 0.000 0.000 0.464
#> ERR866178 6 0.5504 -0.5167 0.024 0.068 0.416 0.000 0.000 0.492
#> ERR862986 3 0.5321 0.4286 0.052 0.016 0.488 0.000 0.004 0.440
#> ERR866161 3 0.5253 0.4216 0.008 0.072 0.484 0.000 0.000 0.436
#> ERR866179 3 0.5502 0.4297 0.008 0.100 0.484 0.000 0.000 0.408
#> ERR862987 5 0.5014 0.5333 0.000 0.056 0.392 0.000 0.544 0.008
#> ERR866162 5 0.5371 0.5397 0.000 0.088 0.348 0.000 0.552 0.012
#> ERR866180 5 0.5933 0.4827 0.000 0.120 0.372 0.000 0.484 0.024
#> ERR862988 5 0.4485 0.6882 0.000 0.032 0.268 0.000 0.680 0.020
#> ERR866163 5 0.5448 0.5281 0.000 0.092 0.364 0.000 0.532 0.012
#> ERR866181 5 0.5664 0.5128 0.000 0.100 0.356 0.000 0.524 0.020
#> ERR862989 1 0.3966 0.7101 0.800 0.088 0.072 0.000 0.000 0.040
#> ERR866164 1 0.3581 0.7279 0.828 0.068 0.068 0.000 0.000 0.036
#> ERR866182 1 0.3918 0.7207 0.804 0.048 0.056 0.000 0.000 0.092
#> ERR862990 1 0.4333 0.6864 0.760 0.124 0.092 0.000 0.000 0.024
#> ERR866165 1 0.3357 0.7276 0.832 0.092 0.064 0.000 0.000 0.012
#> ERR866183 1 0.2838 0.7431 0.872 0.056 0.056 0.000 0.000 0.016
#> ERR862991 2 0.6726 0.0475 0.000 0.368 0.264 0.000 0.332 0.036
#> ERR866166 2 0.4757 0.6282 0.000 0.636 0.280 0.000 0.084 0.000
#> ERR866184 2 0.5772 0.2633 0.000 0.468 0.184 0.000 0.348 0.000
#> ERR862992 2 0.6598 0.3983 0.000 0.452 0.312 0.000 0.188 0.048
#> ERR866167 2 0.5597 0.5355 0.000 0.528 0.348 0.000 0.112 0.012
#> ERR866185 2 0.5023 0.6050 0.000 0.636 0.220 0.000 0.144 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)

consensus_heatmap(res, k = 3)

consensus_heatmap(res, k = 4)

consensus_heatmap(res, k = 5)

consensus_heatmap(res, k = 6)

Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)

membership_heatmap(res, k = 3)

membership_heatmap(res, k = 4)

membership_heatmap(res, k = 5)

membership_heatmap(res, k = 6)

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)

get_signatures(res, k = 3)

get_signatures(res, k = 4)

get_signatures(res, k = 5)

get_signatures(res, k = 6)

Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)

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

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

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

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

Compare the overlap of signatures from different k:
compare_signatures(res)

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.
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:
which_row
: row indices corresponding to the input matrix.
fdr
: FDR for the differential test.
mean_x
: The mean value in group x.
scaled_mean_x
: The mean value in group x after rows are scaled.
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")

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

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

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

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

Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)

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"]
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 15818 rows and 107 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 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)

The plots are:
- The first row: a plot of the ECDF (empirical cumulative distribution
function) curves of the consensus matrix for each
k
and the heatmap of
predicted classes for each k
.
- The second row: heatmaps of the consensus matrix for each
k
.
- The third row: heatmaps of the membership matrix for each
k
.
- The fouth row: heatmaps of the signatures for each
k
.
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:
- ECDF curves of the consensus matrix for each
k
;
- 1-PAC. The PAC
score
measures the proportion of the ambiguous subgrouping.
- Mean silhouette score.
- Concordance. The mean probability of fiting the consensus class ids in all
partitions.
- Area increased. Denote \(A_k\) as the area under the ECDF curve for current
k
, the area increased is defined as \(A_k - A_{k-1}\).
- Rand index. The percent of pairs of samples that are both in a same cluster
or both are not in a same cluster in the partition of k and k-1.
- Jaccard index. The ratio of pairs of samples are both in a same cluster in
the partition of k and k-1 and the pairs of samples are both in a same
cluster in the partition k or k-1.
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)

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.580 0.858 0.914 0.3886 0.649 0.649
#> 3 3 0.552 0.758 0.843 0.2445 0.919 0.874
#> 4 4 0.608 0.818 0.852 0.0771 0.981 0.966
#> 5 5 0.955 0.973 0.988 0.3460 0.749 0.541
#> 6 6 0.948 0.964 0.974 0.0306 0.987 0.957
suggest_best_k()
suggests the best \(k\) based on these statistics. The rules are as follows:
- All \(k\) with Jaccard index larger than 0.95 are removed because increasing
\(k\) does not provide enough extra information. If all \(k\) are removed, it is
marked as no subgroup is detected.
- For all \(k\) with 1-PAC score larger than 0.9, the maximal \(k\) is taken as
the best \(k\), and other \(k\) are marked as optional \(k\).
- If it does not fit the second rule. The \(k\) with the maximal vote of the
highest 1-PAC score, highest mean silhouette, and highest concordance is
taken as the best \(k\).
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
#> ERR862939 1 0.416 0.910 0.916 0.084
#> ERR862957 1 0.416 0.910 0.916 0.084
#> ERR878007 1 0.416 0.910 0.916 0.084
#> ERR862940 1 0.416 0.910 0.916 0.084
#> ERR862958 1 0.416 0.910 0.916 0.084
#> ERR878008 1 0.416 0.910 0.916 0.084
#> ERR862941 2 0.000 0.877 0.000 1.000
#> ERR862959 2 0.000 0.877 0.000 1.000
#> ERR878009 2 0.000 0.877 0.000 1.000
#> ERR862942 2 0.000 0.877 0.000 1.000
#> ERR862960 2 0.000 0.877 0.000 1.000
#> ERR878010 2 0.000 0.877 0.000 1.000
#> ERR862943 1 0.000 0.973 1.000 0.000
#> ERR862961 1 0.000 0.973 1.000 0.000
#> ERR878011 1 0.000 0.973 1.000 0.000
#> ERR862944 1 0.000 0.973 1.000 0.000
#> ERR862962 1 0.000 0.973 1.000 0.000
#> ERR878012 1 0.000 0.973 1.000 0.000
#> ERR862945 1 0.000 0.973 1.000 0.000
#> ERR862963 1 0.000 0.973 1.000 0.000
#> ERR878013 1 0.000 0.973 1.000 0.000
#> ERR862946 1 0.000 0.973 1.000 0.000
#> ERR862964 1 0.000 0.973 1.000 0.000
#> ERR878014 1 0.000 0.973 1.000 0.000
#> ERR862947 2 0.000 0.877 0.000 1.000
#> ERR862965 2 0.000 0.877 0.000 1.000
#> ERR878015 2 0.000 0.877 0.000 1.000
#> ERR862948 2 0.000 0.877 0.000 1.000
#> ERR862966 2 0.000 0.877 0.000 1.000
#> ERR878016 2 0.000 0.877 0.000 1.000
#> ERR862949 2 0.000 0.877 0.000 1.000
#> ERR862967 2 0.000 0.877 0.000 1.000
#> ERR878017 2 0.000 0.877 0.000 1.000
#> ERR862950 2 0.000 0.877 0.000 1.000
#> ERR862968 2 0.000 0.877 0.000 1.000
#> ERR878018 2 0.000 0.877 0.000 1.000
#> ERR862951 2 0.855 0.750 0.280 0.720
#> ERR862969 2 0.855 0.750 0.280 0.720
#> ERR878019 2 0.855 0.750 0.280 0.720
#> ERR862952 2 0.855 0.750 0.280 0.720
#> ERR862970 2 0.855 0.750 0.280 0.720
#> ERR878020 2 0.855 0.750 0.280 0.720
#> ERR862953 2 0.327 0.858 0.060 0.940
#> ERR862971 2 0.327 0.858 0.060 0.940
#> ERR878021 2 0.697 0.801 0.188 0.812
#> ERR862954 2 0.327 0.858 0.060 0.940
#> ERR862972 2 0.327 0.858 0.060 0.940
#> ERR878022 2 0.697 0.801 0.188 0.812
#> ERR862955 2 0.000 0.877 0.000 1.000
#> ERR862973 2 0.000 0.877 0.000 1.000
#> ERR878023 2 0.000 0.877 0.000 1.000
#> ERR862956 2 0.000 0.877 0.000 1.000
#> ERR862974 2 0.000 0.877 0.000 1.000
#> ERR878024 2 0.000 0.877 0.000 1.000
#> ERR862975 2 0.855 0.750 0.280 0.720
#> ERR866150 2 0.855 0.750 0.280 0.720
#> ERR866168 2 0.855 0.750 0.280 0.720
#> ERR862976 2 0.855 0.750 0.280 0.720
#> ERR866151 2 0.855 0.750 0.280 0.720
#> ERR866169 2 0.855 0.750 0.280 0.720
#> ERR862977 2 0.000 0.877 0.000 1.000
#> ERR866152 2 0.000 0.877 0.000 1.000
#> ERR866170 2 0.000 0.877 0.000 1.000
#> ERR862978 2 0.000 0.877 0.000 1.000
#> ERR866153 2 0.000 0.877 0.000 1.000
#> ERR866171 2 0.000 0.877 0.000 1.000
#> ERR862979 2 0.000 0.877 0.000 1.000
#> ERR866154 2 0.000 0.877 0.000 1.000
#> ERR866172 2 0.000 0.877 0.000 1.000
#> ERR862980 2 0.000 0.877 0.000 1.000
#> ERR866155 2 0.000 0.877 0.000 1.000
#> ERR866173 2 0.000 0.877 0.000 1.000
#> ERR862981 2 0.855 0.750 0.280 0.720
#> ERR866156 2 0.855 0.750 0.280 0.720
#> ERR866174 2 0.855 0.750 0.280 0.720
#> ERR866157 2 0.855 0.750 0.280 0.720
#> ERR866175 2 0.855 0.750 0.280 0.720
#> ERR862983 1 0.000 0.973 1.000 0.000
#> ERR866158 1 0.000 0.973 1.000 0.000
#> ERR866176 1 0.000 0.973 1.000 0.000
#> ERR862984 1 0.000 0.973 1.000 0.000
#> ERR866159 1 0.000 0.973 1.000 0.000
#> ERR866177 1 0.000 0.973 1.000 0.000
#> ERR862985 2 0.855 0.750 0.280 0.720
#> ERR866160 2 0.855 0.750 0.280 0.720
#> ERR866178 2 0.855 0.750 0.280 0.720
#> ERR862986 2 0.855 0.750 0.280 0.720
#> ERR866161 2 0.855 0.750 0.280 0.720
#> ERR866179 2 0.855 0.750 0.280 0.720
#> ERR862987 2 0.000 0.877 0.000 1.000
#> ERR866162 2 0.000 0.877 0.000 1.000
#> ERR866180 2 0.000 0.877 0.000 1.000
#> ERR862988 2 0.000 0.877 0.000 1.000
#> ERR866163 2 0.000 0.877 0.000 1.000
#> ERR866181 2 0.000 0.877 0.000 1.000
#> ERR862989 2 0.855 0.750 0.280 0.720
#> ERR866164 2 0.855 0.750 0.280 0.720
#> ERR866182 2 0.855 0.750 0.280 0.720
#> ERR862990 2 0.855 0.750 0.280 0.720
#> ERR866165 2 0.855 0.750 0.280 0.720
#> ERR866183 2 0.855 0.750 0.280 0.720
#> ERR862991 2 0.000 0.877 0.000 1.000
#> ERR866166 2 0.000 0.877 0.000 1.000
#> ERR866184 2 0.000 0.877 0.000 1.000
#> ERR862992 2 0.000 0.877 0.000 1.000
#> ERR866167 2 0.000 0.877 0.000 1.000
#> ERR866185 2 0.000 0.877 0.000 1.000
show/hide code output
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> ERR862939 1 0.263 0.834 0.916 0.000 0.084
#> ERR862957 1 0.263 0.834 0.916 0.000 0.084
#> ERR878007 1 0.263 0.834 0.916 0.000 0.084
#> ERR862940 1 0.263 0.834 0.916 0.000 0.084
#> ERR862958 1 0.263 0.834 0.916 0.000 0.084
#> ERR878008 1 0.263 0.834 0.916 0.000 0.084
#> ERR862941 2 0.000 0.751 0.000 1.000 0.000
#> ERR862959 2 0.000 0.751 0.000 1.000 0.000
#> ERR878009 2 0.000 0.751 0.000 1.000 0.000
#> ERR862942 2 0.000 0.751 0.000 1.000 0.000
#> ERR862960 2 0.000 0.751 0.000 1.000 0.000
#> ERR878010 2 0.000 0.751 0.000 1.000 0.000
#> ERR862943 1 0.000 0.880 1.000 0.000 0.000
#> ERR862961 1 0.000 0.880 1.000 0.000 0.000
#> ERR878011 1 0.000 0.880 1.000 0.000 0.000
#> ERR862944 1 0.000 0.880 1.000 0.000 0.000
#> ERR862962 1 0.000 0.880 1.000 0.000 0.000
#> ERR878012 1 0.000 0.880 1.000 0.000 0.000
#> ERR862945 1 0.540 0.667 0.720 0.000 0.280
#> ERR862963 1 0.540 0.667 0.720 0.000 0.280
#> ERR878013 1 0.540 0.667 0.720 0.000 0.280
#> ERR862946 1 0.540 0.667 0.720 0.000 0.280
#> ERR862964 1 0.540 0.667 0.720 0.000 0.280
#> ERR878014 1 0.540 0.667 0.720 0.000 0.280
#> ERR862947 3 0.597 1.000 0.000 0.364 0.636
#> ERR862965 3 0.597 1.000 0.000 0.364 0.636
#> ERR878015 3 0.597 1.000 0.000 0.364 0.636
#> ERR862948 3 0.597 1.000 0.000 0.364 0.636
#> ERR862966 3 0.597 1.000 0.000 0.364 0.636
#> ERR878016 3 0.597 1.000 0.000 0.364 0.636
#> ERR862949 2 0.000 0.751 0.000 1.000 0.000
#> ERR862967 2 0.000 0.751 0.000 1.000 0.000
#> ERR878017 2 0.000 0.751 0.000 1.000 0.000
#> ERR862950 2 0.000 0.751 0.000 1.000 0.000
#> ERR862968 2 0.000 0.751 0.000 1.000 0.000
#> ERR878018 2 0.000 0.751 0.000 1.000 0.000
#> ERR862951 2 0.776 0.677 0.280 0.636 0.084
#> ERR862969 2 0.776 0.677 0.280 0.636 0.084
#> ERR878019 2 0.776 0.677 0.280 0.636 0.084
#> ERR862952 2 0.776 0.677 0.280 0.636 0.084
#> ERR862970 2 0.776 0.677 0.280 0.636 0.084
#> ERR878020 2 0.776 0.677 0.280 0.636 0.084
#> ERR862953 2 0.321 0.736 0.060 0.912 0.028
#> ERR862971 2 0.321 0.736 0.060 0.912 0.028
#> ERR878021 2 0.686 0.695 0.188 0.728 0.084
#> ERR862954 2 0.321 0.736 0.060 0.912 0.028
#> ERR862972 2 0.321 0.736 0.060 0.912 0.028
#> ERR878022 2 0.686 0.695 0.188 0.728 0.084
#> ERR862955 2 0.000 0.751 0.000 1.000 0.000
#> ERR862973 2 0.000 0.751 0.000 1.000 0.000
#> ERR878023 2 0.000 0.751 0.000 1.000 0.000
#> ERR862956 2 0.000 0.751 0.000 1.000 0.000
#> ERR862974 2 0.000 0.751 0.000 1.000 0.000
#> ERR878024 2 0.000 0.751 0.000 1.000 0.000
#> ERR862975 2 0.776 0.677 0.280 0.636 0.084
#> ERR866150 2 0.776 0.677 0.280 0.636 0.084
#> ERR866168 2 0.776 0.677 0.280 0.636 0.084
#> ERR862976 2 0.776 0.677 0.280 0.636 0.084
#> ERR866151 2 0.776 0.677 0.280 0.636 0.084
#> ERR866169 2 0.776 0.677 0.280 0.636 0.084
#> ERR862977 2 0.000 0.751 0.000 1.000 0.000
#> ERR866152 2 0.000 0.751 0.000 1.000 0.000
#> ERR866170 2 0.000 0.751 0.000 1.000 0.000
#> ERR862978 2 0.000 0.751 0.000 1.000 0.000
#> ERR866153 2 0.000 0.751 0.000 1.000 0.000
#> ERR866171 2 0.000 0.751 0.000 1.000 0.000
#> ERR862979 2 0.000 0.751 0.000 1.000 0.000
#> ERR866154 2 0.000 0.751 0.000 1.000 0.000
#> ERR866172 2 0.000 0.751 0.000 1.000 0.000
#> ERR862980 2 0.000 0.751 0.000 1.000 0.000
#> ERR866155 2 0.000 0.751 0.000 1.000 0.000
#> ERR866173 2 0.000 0.751 0.000 1.000 0.000
#> ERR862981 2 0.776 0.677 0.280 0.636 0.084
#> ERR866156 2 0.776 0.677 0.280 0.636 0.084
#> ERR866174 2 0.776 0.677 0.280 0.636 0.084
#> ERR866157 2 0.776 0.677 0.280 0.636 0.084
#> ERR866175 2 0.776 0.677 0.280 0.636 0.084
#> ERR862983 1 0.000 0.880 1.000 0.000 0.000
#> ERR866158 1 0.000 0.880 1.000 0.000 0.000
#> ERR866176 1 0.000 0.880 1.000 0.000 0.000
#> ERR862984 1 0.000 0.880 1.000 0.000 0.000
#> ERR866159 1 0.000 0.880 1.000 0.000 0.000
#> ERR866177 1 0.000 0.880 1.000 0.000 0.000
#> ERR862985 2 0.776 0.677 0.280 0.636 0.084
#> ERR866160 2 0.776 0.677 0.280 0.636 0.084
#> ERR866178 2 0.776 0.677 0.280 0.636 0.084
#> ERR862986 2 0.776 0.677 0.280 0.636 0.084
#> ERR866161 2 0.776 0.677 0.280 0.636 0.084
#> ERR866179 2 0.776 0.677 0.280 0.636 0.084
#> ERR862987 2 0.000 0.751 0.000 1.000 0.000
#> ERR866162 2 0.000 0.751 0.000 1.000 0.000
#> ERR866180 2 0.000 0.751 0.000 1.000 0.000
#> ERR862988 2 0.000 0.751 0.000 1.000 0.000
#> ERR866163 2 0.000 0.751 0.000 1.000 0.000
#> ERR866181 2 0.000 0.751 0.000 1.000 0.000
#> ERR862989 2 0.776 0.677 0.280 0.636 0.084
#> ERR866164 2 0.776 0.677 0.280 0.636 0.084
#> ERR866182 2 0.776 0.677 0.280 0.636 0.084
#> ERR862990 2 0.776 0.677 0.280 0.636 0.084
#> ERR866165 2 0.776 0.677 0.280 0.636 0.084
#> ERR866183 2 0.776 0.677 0.280 0.636 0.084
#> ERR862991 2 0.000 0.751 0.000 1.000 0.000
#> ERR866166 2 0.000 0.751 0.000 1.000 0.000
#> ERR866184 2 0.000 0.751 0.000 1.000 0.000
#> ERR862992 2 0.000 0.751 0.000 1.000 0.000
#> ERR866167 2 0.000 0.751 0.000 1.000 0.000
#> ERR866185 2 0.000 0.751 0.000 1.000 0.000
show/hide code output
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> ERR862939 3 0.1792 0.912 0.000 0.068 0.932 0.000
#> ERR862957 3 0.1792 0.912 0.000 0.068 0.932 0.000
#> ERR878007 3 0.1792 0.912 0.000 0.068 0.932 0.000
#> ERR862940 3 0.1792 0.912 0.000 0.068 0.932 0.000
#> ERR862958 3 0.1792 0.912 0.000 0.068 0.932 0.000
#> ERR878008 3 0.1792 0.912 0.000 0.068 0.932 0.000
#> ERR862941 2 0.4040 0.795 0.248 0.752 0.000 0.000
#> ERR862959 2 0.4040 0.795 0.248 0.752 0.000 0.000
#> ERR878009 2 0.4040 0.795 0.248 0.752 0.000 0.000
#> ERR862942 2 0.4040 0.795 0.248 0.752 0.000 0.000
#> ERR862960 2 0.4040 0.795 0.248 0.752 0.000 0.000
#> ERR878010 2 0.4040 0.795 0.248 0.752 0.000 0.000
#> ERR862943 3 0.0592 0.956 0.000 0.000 0.984 0.016
#> ERR862961 3 0.0592 0.956 0.000 0.000 0.984 0.016
#> ERR878011 3 0.0592 0.956 0.000 0.000 0.984 0.016
#> ERR862944 3 0.0592 0.956 0.000 0.000 0.984 0.016
#> ERR862962 3 0.0592 0.956 0.000 0.000 0.984 0.016
#> ERR878012 3 0.0592 0.956 0.000 0.000 0.984 0.016
#> ERR862945 4 0.0000 1.000 0.000 0.000 0.000 1.000
#> ERR862963 4 0.0000 1.000 0.000 0.000 0.000 1.000
#> ERR878013 4 0.0000 1.000 0.000 0.000 0.000 1.000
#> ERR862946 4 0.0000 1.000 0.000 0.000 0.000 1.000
#> ERR862964 4 0.0000 1.000 0.000 0.000 0.000 1.000
#> ERR878014 4 0.0000 1.000 0.000 0.000 0.000 1.000
#> ERR862947 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> ERR862965 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> ERR878015 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> ERR862948 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> ERR862966 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> ERR878016 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> ERR862949 2 0.4040 0.795 0.248 0.752 0.000 0.000
#> ERR862967 2 0.4040 0.795 0.248 0.752 0.000 0.000
#> ERR878017 2 0.4040 0.795 0.248 0.752 0.000 0.000
#> ERR862950 2 0.4040 0.795 0.248 0.752 0.000 0.000
#> ERR862968 2 0.4040 0.795 0.248 0.752 0.000 0.000
#> ERR878018 2 0.4040 0.795 0.248 0.752 0.000 0.000
#> ERR862951 2 0.2589 0.711 0.000 0.884 0.116 0.000
#> ERR862969 2 0.2589 0.711 0.000 0.884 0.116 0.000
#> ERR878019 2 0.2589 0.711 0.000 0.884 0.116 0.000
#> ERR862952 2 0.2589 0.711 0.000 0.884 0.116 0.000
#> ERR862970 2 0.2589 0.711 0.000 0.884 0.116 0.000
#> ERR878020 2 0.2589 0.711 0.000 0.884 0.116 0.000
#> ERR862953 2 0.3172 0.779 0.160 0.840 0.000 0.000
#> ERR862971 2 0.3172 0.779 0.160 0.840 0.000 0.000
#> ERR878021 2 0.0817 0.732 0.000 0.976 0.024 0.000
#> ERR862954 2 0.3172 0.779 0.160 0.840 0.000 0.000
#> ERR862972 2 0.3172 0.779 0.160 0.840 0.000 0.000
#> ERR878022 2 0.0817 0.732 0.000 0.976 0.024 0.000
#> ERR862955 2 0.4040 0.795 0.248 0.752 0.000 0.000
#> ERR862973 2 0.4040 0.795 0.248 0.752 0.000 0.000
#> ERR878023 2 0.4040 0.795 0.248 0.752 0.000 0.000
#> ERR862956 2 0.4040 0.795 0.248 0.752 0.000 0.000
#> ERR862974 2 0.4040 0.795 0.248 0.752 0.000 0.000
#> ERR878024 2 0.4040 0.795 0.248 0.752 0.000 0.000
#> ERR862975 2 0.2589 0.711 0.000 0.884 0.116 0.000
#> ERR866150 2 0.2589 0.711 0.000 0.884 0.116 0.000
#> ERR866168 2 0.2589 0.711 0.000 0.884 0.116 0.000
#> ERR862976 2 0.2589 0.711 0.000 0.884 0.116 0.000
#> ERR866151 2 0.2589 0.711 0.000 0.884 0.116 0.000
#> ERR866169 2 0.2589 0.711 0.000 0.884 0.116 0.000
#> ERR862977 2 0.4040 0.795 0.248 0.752 0.000 0.000
#> ERR866152 2 0.4040 0.795 0.248 0.752 0.000 0.000
#> ERR866170 2 0.4040 0.795 0.248 0.752 0.000 0.000
#> ERR862978 2 0.4040 0.795 0.248 0.752 0.000 0.000
#> ERR866153 2 0.4040 0.795 0.248 0.752 0.000 0.000
#> ERR866171 2 0.4040 0.795 0.248 0.752 0.000 0.000
#> ERR862979 2 0.4040 0.795 0.248 0.752 0.000 0.000
#> ERR866154 2 0.4040 0.795 0.248 0.752 0.000 0.000
#> ERR866172 2 0.4040 0.795 0.248 0.752 0.000 0.000
#> ERR862980 2 0.4040 0.795 0.248 0.752 0.000 0.000
#> ERR866155 2 0.4040 0.795 0.248 0.752 0.000 0.000
#> ERR866173 2 0.4040 0.795 0.248 0.752 0.000 0.000
#> ERR862981 2 0.2589 0.711 0.000 0.884 0.116 0.000
#> ERR866156 2 0.2589 0.711 0.000 0.884 0.116 0.000
#> ERR866174 2 0.2589 0.711 0.000 0.884 0.116 0.000
#> ERR866157 2 0.2589 0.711 0.000 0.884 0.116 0.000
#> ERR866175 2 0.2589 0.711 0.000 0.884 0.116 0.000
#> ERR862983 3 0.0592 0.956 0.000 0.000 0.984 0.016
#> ERR866158 3 0.0592 0.956 0.000 0.000 0.984 0.016
#> ERR866176 3 0.0592 0.956 0.000 0.000 0.984 0.016
#> ERR862984 3 0.0592 0.956 0.000 0.000 0.984 0.016
#> ERR866159 3 0.0592 0.956 0.000 0.000 0.984 0.016
#> ERR866177 3 0.0592 0.956 0.000 0.000 0.984 0.016
#> ERR862985 2 0.2589 0.711 0.000 0.884 0.116 0.000
#> ERR866160 2 0.2589 0.711 0.000 0.884 0.116 0.000
#> ERR866178 2 0.2589 0.711 0.000 0.884 0.116 0.000
#> ERR862986 2 0.2589 0.711 0.000 0.884 0.116 0.000
#> ERR866161 2 0.2589 0.711 0.000 0.884 0.116 0.000
#> ERR866179 2 0.2589 0.711 0.000 0.884 0.116 0.000
#> ERR862987 2 0.4040 0.795 0.248 0.752 0.000 0.000
#> ERR866162 2 0.4040 0.795 0.248 0.752 0.000 0.000
#> ERR866180 2 0.4040 0.795 0.248 0.752 0.000 0.000
#> ERR862988 2 0.4040 0.795 0.248 0.752 0.000 0.000
#> ERR866163 2 0.4040 0.795 0.248 0.752 0.000 0.000
#> ERR866181 2 0.4040 0.795 0.248 0.752 0.000 0.000
#> ERR862989 2 0.2589 0.711 0.000 0.884 0.116 0.000
#> ERR866164 2 0.2589 0.711 0.000 0.884 0.116 0.000
#> ERR866182 2 0.2589 0.711 0.000 0.884 0.116 0.000
#> ERR862990 2 0.2589 0.711 0.000 0.884 0.116 0.000
#> ERR866165 2 0.2589 0.711 0.000 0.884 0.116 0.000
#> ERR866183 2 0.2589 0.711 0.000 0.884 0.116 0.000
#> ERR862991 2 0.4040 0.795 0.248 0.752 0.000 0.000
#> ERR866166 2 0.4040 0.795 0.248 0.752 0.000 0.000
#> ERR866184 2 0.4040 0.795 0.248 0.752 0.000 0.000
#> ERR862992 2 0.4040 0.795 0.248 0.752 0.000 0.000
#> ERR866167 2 0.4040 0.795 0.248 0.752 0.000 0.000
#> ERR866185 2 0.4040 0.795 0.248 0.752 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
#> ERR862939 3 0.228 0.874 0.120 0.000 0.88 0 0
#> ERR862957 3 0.228 0.874 0.120 0.000 0.88 0 0
#> ERR878007 3 0.228 0.874 0.120 0.000 0.88 0 0
#> ERR862940 3 0.228 0.874 0.120 0.000 0.88 0 0
#> ERR862958 3 0.228 0.874 0.120 0.000 0.88 0 0
#> ERR878008 3 0.228 0.874 0.120 0.000 0.88 0 0
#> ERR862941 2 0.000 0.990 0.000 1.000 0.00 0 0
#> ERR862959 2 0.000 0.990 0.000 1.000 0.00 0 0
#> ERR878009 2 0.000 0.990 0.000 1.000 0.00 0 0
#> ERR862942 2 0.000 0.990 0.000 1.000 0.00 0 0
#> ERR862960 2 0.000 0.990 0.000 1.000 0.00 0 0
#> ERR878010 2 0.000 0.990 0.000 1.000 0.00 0 0
#> ERR862943 3 0.000 0.938 0.000 0.000 1.00 0 0
#> ERR862961 3 0.000 0.938 0.000 0.000 1.00 0 0
#> ERR878011 3 0.000 0.938 0.000 0.000 1.00 0 0
#> ERR862944 3 0.000 0.938 0.000 0.000 1.00 0 0
#> ERR862962 3 0.000 0.938 0.000 0.000 1.00 0 0
#> ERR878012 3 0.000 0.938 0.000 0.000 1.00 0 0
#> ERR862945 4 0.000 1.000 0.000 0.000 0.00 1 0
#> ERR862963 4 0.000 1.000 0.000 0.000 0.00 1 0
#> ERR878013 4 0.000 1.000 0.000 0.000 0.00 1 0
#> ERR862946 4 0.000 1.000 0.000 0.000 0.00 1 0
#> ERR862964 4 0.000 1.000 0.000 0.000 0.00 1 0
#> ERR878014 4 0.000 1.000 0.000 0.000 0.00 1 0
#> ERR862947 5 0.000 1.000 0.000 0.000 0.00 0 1
#> ERR862965 5 0.000 1.000 0.000 0.000 0.00 0 1
#> ERR878015 5 0.000 1.000 0.000 0.000 0.00 0 1
#> ERR862948 5 0.000 1.000 0.000 0.000 0.00 0 1
#> ERR862966 5 0.000 1.000 0.000 0.000 0.00 0 1
#> ERR878016 5 0.000 1.000 0.000 0.000 0.00 0 1
#> ERR862949 2 0.000 0.990 0.000 1.000 0.00 0 0
#> ERR862967 2 0.000 0.990 0.000 1.000 0.00 0 0
#> ERR878017 2 0.000 0.990 0.000 1.000 0.00 0 0
#> ERR862950 2 0.000 0.990 0.000 1.000 0.00 0 0
#> ERR862968 2 0.000 0.990 0.000 1.000 0.00 0 0
#> ERR878018 2 0.000 0.990 0.000 1.000 0.00 0 0
#> ERR862951 1 0.000 0.990 1.000 0.000 0.00 0 0
#> ERR862969 1 0.000 0.990 1.000 0.000 0.00 0 0
#> ERR878019 1 0.000 0.990 1.000 0.000 0.00 0 0
#> ERR862952 1 0.000 0.990 1.000 0.000 0.00 0 0
#> ERR862970 1 0.000 0.990 1.000 0.000 0.00 0 0
#> ERR878020 1 0.000 0.990 1.000 0.000 0.00 0 0
#> ERR862953 2 0.185 0.892 0.088 0.912 0.00 0 0
#> ERR862971 2 0.185 0.892 0.088 0.912 0.00 0 0
#> ERR878021 1 0.202 0.850 0.900 0.100 0.00 0 0
#> ERR862954 2 0.185 0.892 0.088 0.912 0.00 0 0
#> ERR862972 2 0.185 0.892 0.088 0.912 0.00 0 0
#> ERR878022 1 0.202 0.850 0.900 0.100 0.00 0 0
#> ERR862955 2 0.000 0.990 0.000 1.000 0.00 0 0
#> ERR862973 2 0.000 0.990 0.000 1.000 0.00 0 0
#> ERR878023 2 0.000 0.990 0.000 1.000 0.00 0 0
#> ERR862956 2 0.000 0.990 0.000 1.000 0.00 0 0
#> ERR862974 2 0.000 0.990 0.000 1.000 0.00 0 0
#> ERR878024 2 0.000 0.990 0.000 1.000 0.00 0 0
#> ERR862975 1 0.000 0.990 1.000 0.000 0.00 0 0
#> ERR866150 1 0.000 0.990 1.000 0.000 0.00 0 0
#> ERR866168 1 0.000 0.990 1.000 0.000 0.00 0 0
#> ERR862976 1 0.000 0.990 1.000 0.000 0.00 0 0
#> ERR866151 1 0.000 0.990 1.000 0.000 0.00 0 0
#> ERR866169 1 0.000 0.990 1.000 0.000 0.00 0 0
#> ERR862977 2 0.000 0.990 0.000 1.000 0.00 0 0
#> ERR866152 2 0.000 0.990 0.000 1.000 0.00 0 0
#> ERR866170 2 0.000 0.990 0.000 1.000 0.00 0 0
#> ERR862978 2 0.000 0.990 0.000 1.000 0.00 0 0
#> ERR866153 2 0.000 0.990 0.000 1.000 0.00 0 0
#> ERR866171 2 0.000 0.990 0.000 1.000 0.00 0 0
#> ERR862979 2 0.000 0.990 0.000 1.000 0.00 0 0
#> ERR866154 2 0.000 0.990 0.000 1.000 0.00 0 0
#> ERR866172 2 0.000 0.990 0.000 1.000 0.00 0 0
#> ERR862980 2 0.000 0.990 0.000 1.000 0.00 0 0
#> ERR866155 2 0.000 0.990 0.000 1.000 0.00 0 0
#> ERR866173 2 0.000 0.990 0.000 1.000 0.00 0 0
#> ERR862981 1 0.000 0.990 1.000 0.000 0.00 0 0
#> ERR866156 1 0.000 0.990 1.000 0.000 0.00 0 0
#> ERR866174 1 0.000 0.990 1.000 0.000 0.00 0 0
#> ERR866157 1 0.000 0.990 1.000 0.000 0.00 0 0
#> ERR866175 1 0.000 0.990 1.000 0.000 0.00 0 0
#> ERR862983 3 0.000 0.938 0.000 0.000 1.00 0 0
#> ERR866158 3 0.000 0.938 0.000 0.000 1.00 0 0
#> ERR866176 3 0.000 0.938 0.000 0.000 1.00 0 0
#> ERR862984 3 0.000 0.938 0.000 0.000 1.00 0 0
#> ERR866159 3 0.000 0.938 0.000 0.000 1.00 0 0
#> ERR866177 3 0.000 0.938 0.000 0.000 1.00 0 0
#> ERR862985 1 0.000 0.990 1.000 0.000 0.00 0 0
#> ERR866160 1 0.000 0.990 1.000 0.000 0.00 0 0
#> ERR866178 1 0.000 0.990 1.000 0.000 0.00 0 0
#> ERR862986 1 0.000 0.990 1.000 0.000 0.00 0 0
#> ERR866161 1 0.000 0.990 1.000 0.000 0.00 0 0
#> ERR866179 1 0.000 0.990 1.000 0.000 0.00 0 0
#> ERR862987 2 0.000 0.990 0.000 1.000 0.00 0 0
#> ERR866162 2 0.000 0.990 0.000 1.000 0.00 0 0
#> ERR866180 2 0.000 0.990 0.000 1.000 0.00 0 0
#> ERR862988 2 0.000 0.990 0.000 1.000 0.00 0 0
#> ERR866163 2 0.000 0.990 0.000 1.000 0.00 0 0
#> ERR866181 2 0.000 0.990 0.000 1.000 0.00 0 0
#> ERR862989 1 0.000 0.990 1.000 0.000 0.00 0 0
#> ERR866164 1 0.000 0.990 1.000 0.000 0.00 0 0
#> ERR866182 1 0.000 0.990 1.000 0.000 0.00 0 0
#> ERR862990 1 0.000 0.990 1.000 0.000 0.00 0 0
#> ERR866165 1 0.000 0.990 1.000 0.000 0.00 0 0
#> ERR866183 1 0.000 0.990 1.000 0.000 0.00 0 0
#> ERR862991 2 0.000 0.990 0.000 1.000 0.00 0 0
#> ERR866166 2 0.000 0.990 0.000 1.000 0.00 0 0
#> ERR866184 2 0.000 0.990 0.000 1.000 0.00 0 0
#> ERR862992 2 0.000 0.990 0.000 1.000 0.00 0 0
#> ERR866167 2 0.000 0.990 0.000 1.000 0.00 0 0
#> ERR866185 2 0.000 0.990 0.000 1.000 0.00 0 0
show/hide code output
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> ERR862939 6 0.0937 1.000 0.000 0.000 0.04 0 0 0.96
#> ERR862957 6 0.0937 1.000 0.000 0.000 0.04 0 0 0.96
#> ERR878007 6 0.0937 1.000 0.000 0.000 0.04 0 0 0.96
#> ERR862940 6 0.0937 1.000 0.000 0.000 0.04 0 0 0.96
#> ERR862958 6 0.0937 1.000 0.000 0.000 0.04 0 0 0.96
#> ERR878008 6 0.0937 1.000 0.000 0.000 0.04 0 0 0.96
#> ERR862941 2 0.0000 0.979 0.000 1.000 0.00 0 0 0.00
#> ERR862959 2 0.0000 0.979 0.000 1.000 0.00 0 0 0.00
#> ERR878009 2 0.0000 0.979 0.000 1.000 0.00 0 0 0.00
#> ERR862942 2 0.0000 0.979 0.000 1.000 0.00 0 0 0.00
#> ERR862960 2 0.0000 0.979 0.000 1.000 0.00 0 0 0.00
#> ERR878010 2 0.0000 0.979 0.000 1.000 0.00 0 0 0.00
#> ERR862943 3 0.0000 1.000 0.000 0.000 1.00 0 0 0.00
#> ERR862961 3 0.0000 1.000 0.000 0.000 1.00 0 0 0.00
#> ERR878011 3 0.0000 1.000 0.000 0.000 1.00 0 0 0.00
#> ERR862944 3 0.0000 1.000 0.000 0.000 1.00 0 0 0.00
#> ERR862962 3 0.0000 1.000 0.000 0.000 1.00 0 0 0.00
#> ERR878012 3 0.0000 1.000 0.000 0.000 1.00 0 0 0.00
#> ERR862945 4 0.0000 1.000 0.000 0.000 0.00 1 0 0.00
#> ERR862963 4 0.0000 1.000 0.000 0.000 0.00 1 0 0.00
#> ERR878013 4 0.0000 1.000 0.000 0.000 0.00 1 0 0.00
#> ERR862946 4 0.0000 1.000 0.000 0.000 0.00 1 0 0.00
#> ERR862964 4 0.0000 1.000 0.000 0.000 0.00 1 0 0.00
#> ERR878014 4 0.0000 1.000 0.000 0.000 0.00 1 0 0.00
#> ERR862947 5 0.0000 1.000 0.000 0.000 0.00 0 1 0.00
#> ERR862965 5 0.0000 1.000 0.000 0.000 0.00 0 1 0.00
#> ERR878015 5 0.0000 1.000 0.000 0.000 0.00 0 1 0.00
#> ERR862948 5 0.0000 1.000 0.000 0.000 0.00 0 1 0.00
#> ERR862966 5 0.0000 1.000 0.000 0.000 0.00 0 1 0.00
#> ERR878016 5 0.0000 1.000 0.000 0.000 0.00 0 1 0.00
#> ERR862949 2 0.0000 0.979 0.000 1.000 0.00 0 0 0.00
#> ERR862967 2 0.0000 0.979 0.000 1.000 0.00 0 0 0.00
#> ERR878017 2 0.0000 0.979 0.000 1.000 0.00 0 0 0.00
#> ERR862950 2 0.0000 0.979 0.000 1.000 0.00 0 0 0.00
#> ERR862968 2 0.0000 0.979 0.000 1.000 0.00 0 0 0.00
#> ERR878018 2 0.0000 0.979 0.000 1.000 0.00 0 0 0.00
#> ERR862951 1 0.0000 0.944 1.000 0.000 0.00 0 0 0.00
#> ERR862969 1 0.0000 0.944 1.000 0.000 0.00 0 0 0.00
#> ERR878019 1 0.0000 0.944 1.000 0.000 0.00 0 0 0.00
#> ERR862952 1 0.0000 0.944 1.000 0.000 0.00 0 0 0.00
#> ERR862970 1 0.0000 0.944 1.000 0.000 0.00 0 0 0.00
#> ERR878020 1 0.0000 0.944 1.000 0.000 0.00 0 0 0.00
#> ERR862953 2 0.2579 0.880 0.088 0.872 0.00 0 0 0.04
#> ERR862971 2 0.2579 0.880 0.088 0.872 0.00 0 0 0.04
#> ERR878021 1 0.2094 0.847 0.900 0.080 0.00 0 0 0.02
#> ERR862954 2 0.2579 0.880 0.088 0.872 0.00 0 0 0.04
#> ERR862972 2 0.2579 0.880 0.088 0.872 0.00 0 0 0.04
#> ERR878022 1 0.2094 0.847 0.900 0.080 0.00 0 0 0.02
#> ERR862955 2 0.0937 0.965 0.000 0.960 0.00 0 0 0.04
#> ERR862973 2 0.0937 0.965 0.000 0.960 0.00 0 0 0.04
#> ERR878023 2 0.0937 0.965 0.000 0.960 0.00 0 0 0.04
#> ERR862956 2 0.0937 0.965 0.000 0.960 0.00 0 0 0.04
#> ERR862974 2 0.0937 0.965 0.000 0.960 0.00 0 0 0.04
#> ERR878024 2 0.0937 0.965 0.000 0.960 0.00 0 0 0.04
#> ERR862975 1 0.0000 0.944 1.000 0.000 0.00 0 0 0.00
#> ERR866150 1 0.0000 0.944 1.000 0.000 0.00 0 0 0.00
#> ERR866168 1 0.0000 0.944 1.000 0.000 0.00 0 0 0.00
#> ERR862976 1 0.0000 0.944 1.000 0.000 0.00 0 0 0.00
#> ERR866151 1 0.0000 0.944 1.000 0.000 0.00 0 0 0.00
#> ERR866169 1 0.0000 0.944 1.000 0.000 0.00 0 0 0.00
#> ERR862977 2 0.0937 0.965 0.000 0.960 0.00 0 0 0.04
#> ERR866152 2 0.0937 0.965 0.000 0.960 0.00 0 0 0.04
#> ERR866170 2 0.0937 0.965 0.000 0.960 0.00 0 0 0.04
#> ERR862978 2 0.0937 0.965 0.000 0.960 0.00 0 0 0.04
#> ERR866153 2 0.0937 0.965 0.000 0.960 0.00 0 0 0.04
#> ERR866171 2 0.0937 0.965 0.000 0.960 0.00 0 0 0.04
#> ERR862979 2 0.0000 0.979 0.000 1.000 0.00 0 0 0.00
#> ERR866154 2 0.0000 0.979 0.000 1.000 0.00 0 0 0.00
#> ERR866172 2 0.0000 0.979 0.000 1.000 0.00 0 0 0.00
#> ERR862980 2 0.0000 0.979 0.000 1.000 0.00 0 0 0.00
#> ERR866155 2 0.0000 0.979 0.000 1.000 0.00 0 0 0.00
#> ERR866173 2 0.0000 0.979 0.000 1.000 0.00 0 0 0.00
#> ERR862981 1 0.2048 0.907 0.880 0.000 0.00 0 0 0.12
#> ERR866156 1 0.2048 0.907 0.880 0.000 0.00 0 0 0.12
#> ERR866174 1 0.2048 0.907 0.880 0.000 0.00 0 0 0.12
#> ERR866157 1 0.2048 0.907 0.880 0.000 0.00 0 0 0.12
#> ERR866175 1 0.2048 0.907 0.880 0.000 0.00 0 0 0.12
#> ERR862983 3 0.0000 1.000 0.000 0.000 1.00 0 0 0.00
#> ERR866158 3 0.0000 1.000 0.000 0.000 1.00 0 0 0.00
#> ERR866176 3 0.0000 1.000 0.000 0.000 1.00 0 0 0.00
#> ERR862984 3 0.0000 1.000 0.000 0.000 1.00 0 0 0.00
#> ERR866159 3 0.0000 1.000 0.000 0.000 1.00 0 0 0.00
#> ERR866177 3 0.0000 1.000 0.000 0.000 1.00 0 0 0.00
#> ERR862985 1 0.2048 0.907 0.880 0.000 0.00 0 0 0.12
#> ERR866160 1 0.2048 0.907 0.880 0.000 0.00 0 0 0.12
#> ERR866178 1 0.2048 0.907 0.880 0.000 0.00 0 0 0.12
#> ERR862986 1 0.2048 0.907 0.880 0.000 0.00 0 0 0.12
#> ERR866161 1 0.2048 0.907 0.880 0.000 0.00 0 0 0.12
#> ERR866179 1 0.2048 0.907 0.880 0.000 0.00 0 0 0.12
#> ERR862987 2 0.0000 0.979 0.000 1.000 0.00 0 0 0.00
#> ERR866162 2 0.0000 0.979 0.000 1.000 0.00 0 0 0.00
#> ERR866180 2 0.0000 0.979 0.000 1.000 0.00 0 0 0.00
#> ERR862988 2 0.0000 0.979 0.000 1.000 0.00 0 0 0.00
#> ERR866163 2 0.0000 0.979 0.000 1.000 0.00 0 0 0.00
#> ERR866181 2 0.0000 0.979 0.000 1.000 0.00 0 0 0.00
#> ERR862989 1 0.0000 0.944 1.000 0.000 0.00 0 0 0.00
#> ERR866164 1 0.0000 0.944 1.000 0.000 0.00 0 0 0.00
#> ERR866182 1 0.0000 0.944 1.000 0.000 0.00 0 0 0.00
#> ERR862990 1 0.0000 0.944 1.000 0.000 0.00 0 0 0.00
#> ERR866165 1 0.0000 0.944 1.000 0.000 0.00 0 0 0.00
#> ERR866183 1 0.0000 0.944 1.000 0.000 0.00 0 0 0.00
#> ERR862991 2 0.0000 0.979 0.000 1.000 0.00 0 0 0.00
#> ERR866166 2 0.0000 0.979 0.000 1.000 0.00 0 0 0.00
#> ERR866184 2 0.0000 0.979 0.000 1.000 0.00 0 0 0.00
#> ERR862992 2 0.0000 0.979 0.000 1.000 0.00 0 0 0.00
#> ERR866167 2 0.0000 0.979 0.000 1.000 0.00 0 0 0.00
#> ERR866185 2 0.0000 0.979 0.000 1.000 0.00 0 0 0.00
Heatmaps for the consensus matrix. It visualizes the probability of two
samples to be in a same group.
consensus_heatmap(res, k = 2)

consensus_heatmap(res, k = 3)

consensus_heatmap(res, k = 4)

consensus_heatmap(res, k = 5)

consensus_heatmap(res, k = 6)

Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)

membership_heatmap(res, k = 3)

membership_heatmap(res, k = 4)

membership_heatmap(res, k = 5)

membership_heatmap(res, k = 6)

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)

get_signatures(res, k = 3)

get_signatures(res, k = 4)

get_signatures(res, k = 5)

get_signatures(res, k = 6)

Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)

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

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

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

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

Compare the overlap of signatures from different k:
compare_signatures(res)

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.
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:
which_row
: row indices corresponding to the input matrix.
fdr
: FDR for the differential test.
mean_x
: The mean value in group x.
scaled_mean_x
: The mean value in group x after rows are scaled.
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")

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

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

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

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

Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)

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"]
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 15818 rows and 107 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)

The plots are:
- The first row: a plot of the ECDF (empirical cumulative distribution
function) curves of the consensus matrix for each
k
and the heatmap of
predicted classes for each k
.
- The second row: heatmaps of the consensus matrix for each
k
.
- The third row: heatmaps of the membership matrix for each
k
.
- The fouth row: heatmaps of the signatures for each
k
.
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:
- ECDF curves of the consensus matrix for each
k
;
- 1-PAC. The PAC
score
measures the proportion of the ambiguous subgrouping.
- Mean silhouette score.
- Concordance. The mean probability of fiting the consensus class ids in all
partitions.
- Area increased. Denote \(A_k\) as the area under the ECDF curve for current
k
, the area increased is defined as \(A_k - A_{k-1}\).
- Rand index. The percent of pairs of samples that are both in a same cluster
or both are not in a same cluster in the partition of k and k-1.
- Jaccard index. The ratio of pairs of samples are both in a same cluster in
the partition of k and k-1 and the pairs of samples are both in a same
cluster in the partition k or k-1.
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)

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.636 0.916 0.935 0.4540 0.503 0.503
#> 3 3 0.571 0.785 0.866 0.3257 0.745 0.548
#> 4 4 0.635 0.694 0.776 0.1362 0.924 0.794
#> 5 5 0.615 0.456 0.640 0.0807 0.823 0.539
#> 6 6 0.685 0.632 0.699 0.0564 0.861 0.568
suggest_best_k()
suggests the best \(k\) based on these statistics. The rules are as follows:
- All \(k\) with Jaccard index larger than 0.95 are removed because increasing
\(k\) does not provide enough extra information. If all \(k\) are removed, it is
marked as no subgroup is detected.
- For all \(k\) with 1-PAC score larger than 0.9, the maximal \(k\) is taken as
the best \(k\), and other \(k\) are marked as optional \(k\).
- If it does not fit the second rule. The \(k\) with the maximal vote of the
highest 1-PAC score, highest mean silhouette, and highest concordance is
taken as the best \(k\).
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
#> ERR862939 1 0.184 0.861 0.972 0.028
#> ERR862957 1 0.184 0.861 0.972 0.028
#> ERR878007 1 0.184 0.861 0.972 0.028
#> ERR862940 1 0.184 0.861 0.972 0.028
#> ERR862958 1 0.184 0.861 0.972 0.028
#> ERR878008 1 0.184 0.861 0.972 0.028
#> ERR862941 2 0.000 0.997 0.000 1.000
#> ERR862959 2 0.000 0.997 0.000 1.000
#> ERR878009 2 0.000 0.997 0.000 1.000
#> ERR862942 2 0.000 0.997 0.000 1.000
#> ERR862960 2 0.000 0.997 0.000 1.000
#> ERR878010 2 0.000 0.997 0.000 1.000
#> ERR862943 1 0.184 0.861 0.972 0.028
#> ERR862961 1 0.184 0.861 0.972 0.028
#> ERR878011 1 0.184 0.861 0.972 0.028
#> ERR862944 1 0.184 0.861 0.972 0.028
#> ERR862962 1 0.184 0.861 0.972 0.028
#> ERR878012 1 0.184 0.861 0.972 0.028
#> ERR862945 1 0.000 0.844 1.000 0.000
#> ERR862963 1 0.000 0.844 1.000 0.000
#> ERR878013 1 0.000 0.844 1.000 0.000
#> ERR862946 1 0.000 0.844 1.000 0.000
#> ERR862964 1 0.000 0.844 1.000 0.000
#> ERR878014 1 0.000 0.844 1.000 0.000
#> ERR862947 2 0.000 0.997 0.000 1.000
#> ERR862965 2 0.000 0.997 0.000 1.000
#> ERR878015 2 0.000 0.997 0.000 1.000
#> ERR862948 2 0.000 0.997 0.000 1.000
#> ERR862966 2 0.000 0.997 0.000 1.000
#> ERR878016 2 0.000 0.997 0.000 1.000
#> ERR862949 2 0.000 0.997 0.000 1.000
#> ERR862967 2 0.000 0.997 0.000 1.000
#> ERR878017 2 0.000 0.997 0.000 1.000
#> ERR862950 2 0.000 0.997 0.000 1.000
#> ERR862968 2 0.000 0.997 0.000 1.000
#> ERR878018 2 0.000 0.997 0.000 1.000
#> ERR862951 2 0.141 0.977 0.020 0.980
#> ERR862969 2 0.141 0.977 0.020 0.980
#> ERR878019 2 0.141 0.977 0.020 0.980
#> ERR862952 2 0.141 0.977 0.020 0.980
#> ERR862970 2 0.163 0.972 0.024 0.976
#> ERR878020 2 0.141 0.977 0.020 0.980
#> ERR862953 2 0.000 0.997 0.000 1.000
#> ERR862971 2 0.000 0.997 0.000 1.000
#> ERR878021 2 0.000 0.997 0.000 1.000
#> ERR862954 2 0.000 0.997 0.000 1.000
#> ERR862972 2 0.000 0.997 0.000 1.000
#> ERR878022 2 0.000 0.997 0.000 1.000
#> ERR862955 2 0.000 0.997 0.000 1.000
#> ERR862973 2 0.000 0.997 0.000 1.000
#> ERR878023 2 0.000 0.997 0.000 1.000
#> ERR862956 2 0.000 0.997 0.000 1.000
#> ERR862974 2 0.000 0.997 0.000 1.000
#> ERR878024 2 0.000 0.997 0.000 1.000
#> ERR862975 1 0.745 0.829 0.788 0.212
#> ERR866150 1 0.753 0.828 0.784 0.216
#> ERR866168 1 0.753 0.828 0.784 0.216
#> ERR862976 1 0.753 0.828 0.784 0.216
#> ERR866151 1 0.753 0.828 0.784 0.216
#> ERR866169 1 0.753 0.828 0.784 0.216
#> ERR862977 2 0.000 0.997 0.000 1.000
#> ERR866152 2 0.000 0.997 0.000 1.000
#> ERR866170 2 0.000 0.997 0.000 1.000
#> ERR862978 2 0.000 0.997 0.000 1.000
#> ERR866153 2 0.000 0.997 0.000 1.000
#> ERR866171 2 0.000 0.997 0.000 1.000
#> ERR862979 2 0.000 0.997 0.000 1.000
#> ERR866154 2 0.000 0.997 0.000 1.000
#> ERR866172 2 0.000 0.997 0.000 1.000
#> ERR862980 2 0.000 0.997 0.000 1.000
#> ERR866155 2 0.000 0.997 0.000 1.000
#> ERR866173 2 0.000 0.997 0.000 1.000
#> ERR862981 1 0.925 0.713 0.660 0.340
#> ERR866156 1 0.925 0.713 0.660 0.340
#> ERR866174 1 0.925 0.713 0.660 0.340
#> ERR866157 1 0.925 0.713 0.660 0.340
#> ERR866175 1 0.925 0.713 0.660 0.340
#> ERR862983 1 0.184 0.861 0.972 0.028
#> ERR866158 1 0.184 0.861 0.972 0.028
#> ERR866176 1 0.184 0.861 0.972 0.028
#> ERR862984 1 0.184 0.861 0.972 0.028
#> ERR866159 1 0.184 0.861 0.972 0.028
#> ERR866177 1 0.184 0.861 0.972 0.028
#> ERR862985 1 0.925 0.713 0.660 0.340
#> ERR866160 1 0.925 0.713 0.660 0.340
#> ERR866178 1 0.925 0.713 0.660 0.340
#> ERR862986 1 0.925 0.713 0.660 0.340
#> ERR866161 1 0.925 0.713 0.660 0.340
#> ERR866179 1 0.925 0.713 0.660 0.340
#> ERR862987 2 0.000 0.997 0.000 1.000
#> ERR866162 2 0.000 0.997 0.000 1.000
#> ERR866180 2 0.000 0.997 0.000 1.000
#> ERR862988 2 0.000 0.997 0.000 1.000
#> ERR866163 2 0.000 0.997 0.000 1.000
#> ERR866181 2 0.000 0.997 0.000 1.000
#> ERR862989 1 0.753 0.828 0.784 0.216
#> ERR866164 1 0.753 0.828 0.784 0.216
#> ERR866182 1 0.753 0.828 0.784 0.216
#> ERR862990 1 0.753 0.828 0.784 0.216
#> ERR866165 1 0.753 0.828 0.784 0.216
#> ERR866183 1 0.753 0.828 0.784 0.216
#> ERR862991 2 0.000 0.997 0.000 1.000
#> ERR866166 2 0.000 0.997 0.000 1.000
#> ERR866184 2 0.000 0.997 0.000 1.000
#> ERR862992 2 0.000 0.997 0.000 1.000
#> ERR866167 2 0.000 0.997 0.000 1.000
#> ERR866185 2 0.000 0.997 0.000 1.000
show/hide code output
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> ERR862939 1 0.5158 0.352 0.764 0.004 0.232
#> ERR862957 1 0.5158 0.352 0.764 0.004 0.232
#> ERR878007 1 0.5070 0.374 0.772 0.004 0.224
#> ERR862940 1 0.5158 0.352 0.764 0.004 0.232
#> ERR862958 1 0.5158 0.352 0.764 0.004 0.232
#> ERR878008 1 0.5158 0.352 0.764 0.004 0.232
#> ERR862941 2 0.0000 0.910 0.000 1.000 0.000
#> ERR862959 2 0.0000 0.910 0.000 1.000 0.000
#> ERR878009 2 0.0000 0.910 0.000 1.000 0.000
#> ERR862942 2 0.0000 0.910 0.000 1.000 0.000
#> ERR862960 2 0.0000 0.910 0.000 1.000 0.000
#> ERR878010 2 0.0000 0.910 0.000 1.000 0.000
#> ERR862943 3 0.5650 0.864 0.312 0.000 0.688
#> ERR862961 3 0.5650 0.864 0.312 0.000 0.688
#> ERR878011 3 0.5650 0.864 0.312 0.000 0.688
#> ERR862944 3 0.5650 0.864 0.312 0.000 0.688
#> ERR862962 3 0.5650 0.864 0.312 0.000 0.688
#> ERR878012 3 0.5650 0.864 0.312 0.000 0.688
#> ERR862945 3 0.3752 0.811 0.144 0.000 0.856
#> ERR862963 3 0.3752 0.811 0.144 0.000 0.856
#> ERR878013 3 0.3752 0.811 0.144 0.000 0.856
#> ERR862946 3 0.3752 0.811 0.144 0.000 0.856
#> ERR862964 3 0.3752 0.811 0.144 0.000 0.856
#> ERR878014 3 0.3752 0.811 0.144 0.000 0.856
#> ERR862947 2 0.4748 0.795 0.024 0.832 0.144
#> ERR862965 2 0.4748 0.795 0.024 0.832 0.144
#> ERR878015 2 0.4748 0.795 0.024 0.832 0.144
#> ERR862948 2 0.4748 0.795 0.024 0.832 0.144
#> ERR862966 2 0.4748 0.795 0.024 0.832 0.144
#> ERR878016 2 0.4748 0.795 0.024 0.832 0.144
#> ERR862949 2 0.0000 0.910 0.000 1.000 0.000
#> ERR862967 2 0.0000 0.910 0.000 1.000 0.000
#> ERR878017 2 0.0000 0.910 0.000 1.000 0.000
#> ERR862950 2 0.0000 0.910 0.000 1.000 0.000
#> ERR862968 2 0.0000 0.910 0.000 1.000 0.000
#> ERR878018 2 0.0000 0.910 0.000 1.000 0.000
#> ERR862951 1 0.4121 0.753 0.832 0.168 0.000
#> ERR862969 1 0.4121 0.753 0.832 0.168 0.000
#> ERR878019 1 0.4121 0.753 0.832 0.168 0.000
#> ERR862952 1 0.4121 0.753 0.832 0.168 0.000
#> ERR862970 1 0.4121 0.753 0.832 0.168 0.000
#> ERR878020 1 0.4121 0.753 0.832 0.168 0.000
#> ERR862953 1 0.5882 0.530 0.652 0.348 0.000
#> ERR862971 1 0.5882 0.530 0.652 0.348 0.000
#> ERR878021 1 0.5882 0.530 0.652 0.348 0.000
#> ERR862954 1 0.5882 0.530 0.652 0.348 0.000
#> ERR862972 1 0.5882 0.530 0.652 0.348 0.000
#> ERR878022 1 0.5882 0.530 0.652 0.348 0.000
#> ERR862955 2 0.4702 0.748 0.212 0.788 0.000
#> ERR862973 2 0.4702 0.748 0.212 0.788 0.000
#> ERR878023 2 0.4702 0.748 0.212 0.788 0.000
#> ERR862956 2 0.4702 0.748 0.212 0.788 0.000
#> ERR862974 2 0.4702 0.748 0.212 0.788 0.000
#> ERR878024 2 0.4702 0.748 0.212 0.788 0.000
#> ERR862975 1 0.1031 0.785 0.976 0.024 0.000
#> ERR866150 1 0.1031 0.785 0.976 0.024 0.000
#> ERR866168 1 0.1031 0.785 0.976 0.024 0.000
#> ERR862976 1 0.1031 0.785 0.976 0.024 0.000
#> ERR866151 1 0.1031 0.785 0.976 0.024 0.000
#> ERR866169 1 0.1031 0.785 0.976 0.024 0.000
#> ERR862977 2 0.4702 0.748 0.212 0.788 0.000
#> ERR866152 2 0.4702 0.748 0.212 0.788 0.000
#> ERR866170 2 0.4702 0.748 0.212 0.788 0.000
#> ERR862978 2 0.4702 0.748 0.212 0.788 0.000
#> ERR866153 2 0.4702 0.748 0.212 0.788 0.000
#> ERR866171 2 0.4702 0.748 0.212 0.788 0.000
#> ERR862979 2 0.0000 0.910 0.000 1.000 0.000
#> ERR866154 2 0.0000 0.910 0.000 1.000 0.000
#> ERR866172 2 0.0000 0.910 0.000 1.000 0.000
#> ERR862980 2 0.0000 0.910 0.000 1.000 0.000
#> ERR866155 2 0.0000 0.910 0.000 1.000 0.000
#> ERR866173 2 0.0000 0.910 0.000 1.000 0.000
#> ERR862981 1 0.2448 0.805 0.924 0.076 0.000
#> ERR866156 1 0.2448 0.805 0.924 0.076 0.000
#> ERR866174 1 0.2448 0.805 0.924 0.076 0.000
#> ERR866157 1 0.2448 0.805 0.924 0.076 0.000
#> ERR866175 1 0.2448 0.805 0.924 0.076 0.000
#> ERR862983 3 0.6140 0.804 0.404 0.000 0.596
#> ERR866158 3 0.6140 0.804 0.404 0.000 0.596
#> ERR866176 3 0.6140 0.804 0.404 0.000 0.596
#> ERR862984 3 0.6140 0.804 0.404 0.000 0.596
#> ERR866159 3 0.6140 0.804 0.404 0.000 0.596
#> ERR866177 3 0.6140 0.804 0.404 0.000 0.596
#> ERR862985 1 0.2356 0.805 0.928 0.072 0.000
#> ERR866160 1 0.2356 0.805 0.928 0.072 0.000
#> ERR866178 1 0.2356 0.805 0.928 0.072 0.000
#> ERR862986 1 0.2356 0.805 0.928 0.072 0.000
#> ERR866161 1 0.2356 0.805 0.928 0.072 0.000
#> ERR866179 1 0.2448 0.805 0.924 0.076 0.000
#> ERR862987 2 0.0424 0.908 0.000 0.992 0.008
#> ERR866162 2 0.0424 0.908 0.000 0.992 0.008
#> ERR866180 2 0.0424 0.908 0.000 0.992 0.008
#> ERR862988 2 0.0424 0.908 0.000 0.992 0.008
#> ERR866163 2 0.0424 0.908 0.000 0.992 0.008
#> ERR866181 2 0.0424 0.908 0.000 0.992 0.008
#> ERR862989 1 0.1031 0.785 0.976 0.024 0.000
#> ERR866164 1 0.1031 0.785 0.976 0.024 0.000
#> ERR866182 1 0.1163 0.788 0.972 0.028 0.000
#> ERR862990 1 0.1163 0.788 0.972 0.028 0.000
#> ERR866165 1 0.1163 0.788 0.972 0.028 0.000
#> ERR866183 1 0.1163 0.788 0.972 0.028 0.000
#> ERR862991 2 0.0424 0.908 0.000 0.992 0.008
#> ERR866166 2 0.0424 0.908 0.000 0.992 0.008
#> ERR866184 2 0.0424 0.908 0.000 0.992 0.008
#> ERR862992 2 0.0424 0.908 0.000 0.992 0.008
#> ERR866167 2 0.0424 0.908 0.000 0.992 0.008
#> ERR866185 2 0.0424 0.908 0.000 0.992 0.008
show/hide code output
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> ERR862939 1 0.5480 0.611 0.736 0.000 0.140 0.124
#> ERR862957 1 0.5480 0.611 0.736 0.000 0.140 0.124
#> ERR878007 1 0.5480 0.611 0.736 0.000 0.140 0.124
#> ERR862940 1 0.5480 0.611 0.736 0.000 0.140 0.124
#> ERR862958 1 0.5480 0.611 0.736 0.000 0.140 0.124
#> ERR878008 1 0.5480 0.611 0.736 0.000 0.140 0.124
#> ERR862941 2 0.4972 0.527 0.000 0.544 0.000 0.456
#> ERR862959 2 0.4972 0.527 0.000 0.544 0.000 0.456
#> ERR878009 2 0.4972 0.527 0.000 0.544 0.000 0.456
#> ERR862942 2 0.4972 0.527 0.000 0.544 0.000 0.456
#> ERR862960 2 0.4972 0.527 0.000 0.544 0.000 0.456
#> ERR878010 2 0.4972 0.527 0.000 0.544 0.000 0.456
#> ERR862943 3 0.2868 0.836 0.136 0.000 0.864 0.000
#> ERR862961 3 0.2868 0.836 0.136 0.000 0.864 0.000
#> ERR878011 3 0.2868 0.836 0.136 0.000 0.864 0.000
#> ERR862944 3 0.2868 0.836 0.136 0.000 0.864 0.000
#> ERR862962 3 0.2868 0.836 0.136 0.000 0.864 0.000
#> ERR878012 3 0.2868 0.836 0.136 0.000 0.864 0.000
#> ERR862945 3 0.3668 0.769 0.004 0.000 0.808 0.188
#> ERR862963 3 0.3710 0.769 0.004 0.000 0.804 0.192
#> ERR878013 3 0.3668 0.769 0.004 0.000 0.808 0.188
#> ERR862946 3 0.3710 0.769 0.004 0.000 0.804 0.192
#> ERR862964 3 0.3668 0.769 0.004 0.000 0.808 0.188
#> ERR878014 3 0.3668 0.769 0.004 0.000 0.808 0.188
#> ERR862947 2 0.0000 0.365 0.000 1.000 0.000 0.000
#> ERR862965 2 0.0000 0.365 0.000 1.000 0.000 0.000
#> ERR878015 2 0.0000 0.365 0.000 1.000 0.000 0.000
#> ERR862948 2 0.0000 0.365 0.000 1.000 0.000 0.000
#> ERR862966 2 0.0188 0.365 0.000 0.996 0.004 0.000
#> ERR878016 2 0.0000 0.365 0.000 1.000 0.000 0.000
#> ERR862949 2 0.4967 0.534 0.000 0.548 0.000 0.452
#> ERR862967 2 0.4967 0.534 0.000 0.548 0.000 0.452
#> ERR878017 2 0.4967 0.534 0.000 0.548 0.000 0.452
#> ERR862950 2 0.4967 0.534 0.000 0.548 0.000 0.452
#> ERR862968 2 0.4967 0.534 0.000 0.548 0.000 0.452
#> ERR878018 2 0.4967 0.534 0.000 0.548 0.000 0.452
#> ERR862951 1 0.3123 0.768 0.844 0.000 0.000 0.156
#> ERR862969 1 0.3123 0.768 0.844 0.000 0.000 0.156
#> ERR878019 1 0.3172 0.765 0.840 0.000 0.000 0.160
#> ERR862952 1 0.3123 0.768 0.844 0.000 0.000 0.156
#> ERR862970 1 0.3123 0.768 0.844 0.000 0.000 0.156
#> ERR878020 1 0.3123 0.768 0.844 0.000 0.000 0.156
#> ERR862953 1 0.5143 0.390 0.540 0.004 0.000 0.456
#> ERR862971 1 0.5143 0.390 0.540 0.004 0.000 0.456
#> ERR878021 1 0.5147 0.381 0.536 0.004 0.000 0.460
#> ERR862954 1 0.5147 0.381 0.536 0.004 0.000 0.460
#> ERR862972 1 0.5147 0.381 0.536 0.004 0.000 0.460
#> ERR878022 1 0.5147 0.381 0.536 0.004 0.000 0.460
#> ERR862955 4 0.5466 1.000 0.040 0.292 0.000 0.668
#> ERR862973 4 0.5466 1.000 0.040 0.292 0.000 0.668
#> ERR878023 4 0.5466 1.000 0.040 0.292 0.000 0.668
#> ERR862956 4 0.5466 1.000 0.040 0.292 0.000 0.668
#> ERR862974 4 0.5466 1.000 0.040 0.292 0.000 0.668
#> ERR878024 4 0.5466 1.000 0.040 0.292 0.000 0.668
#> ERR862975 1 0.0657 0.816 0.984 0.000 0.012 0.004
#> ERR866150 1 0.0657 0.816 0.984 0.000 0.012 0.004
#> ERR866168 1 0.0657 0.816 0.984 0.000 0.012 0.004
#> ERR862976 1 0.0657 0.816 0.984 0.000 0.012 0.004
#> ERR866151 1 0.0657 0.816 0.984 0.000 0.012 0.004
#> ERR866169 1 0.0657 0.816 0.984 0.000 0.012 0.004
#> ERR862977 4 0.5466 1.000 0.040 0.292 0.000 0.668
#> ERR866152 4 0.5466 1.000 0.040 0.292 0.000 0.668
#> ERR866170 4 0.5466 1.000 0.040 0.292 0.000 0.668
#> ERR862978 4 0.5466 1.000 0.040 0.292 0.000 0.668
#> ERR866153 4 0.5466 1.000 0.040 0.292 0.000 0.668
#> ERR866171 4 0.5466 1.000 0.040 0.292 0.000 0.668
#> ERR862979 2 0.4999 0.388 0.000 0.508 0.000 0.492
#> ERR866154 2 0.4998 0.408 0.000 0.512 0.000 0.488
#> ERR866172 2 0.4994 0.444 0.000 0.520 0.000 0.480
#> ERR862980 2 0.4994 0.444 0.000 0.520 0.000 0.480
#> ERR866155 2 0.4994 0.444 0.000 0.520 0.000 0.480
#> ERR866173 2 0.4994 0.444 0.000 0.520 0.000 0.480
#> ERR862981 1 0.1557 0.823 0.944 0.000 0.000 0.056
#> ERR866156 1 0.1557 0.823 0.944 0.000 0.000 0.056
#> ERR866174 1 0.1557 0.823 0.944 0.000 0.000 0.056
#> ERR866157 1 0.1557 0.823 0.944 0.000 0.000 0.056
#> ERR866175 1 0.1557 0.823 0.944 0.000 0.000 0.056
#> ERR862983 3 0.4193 0.766 0.268 0.000 0.732 0.000
#> ERR866158 3 0.4193 0.766 0.268 0.000 0.732 0.000
#> ERR866176 3 0.4193 0.766 0.268 0.000 0.732 0.000
#> ERR862984 3 0.4193 0.766 0.268 0.000 0.732 0.000
#> ERR866159 3 0.4193 0.766 0.268 0.000 0.732 0.000
#> ERR866177 3 0.4193 0.766 0.268 0.000 0.732 0.000
#> ERR862985 1 0.1557 0.823 0.944 0.000 0.000 0.056
#> ERR866160 1 0.1557 0.823 0.944 0.000 0.000 0.056
#> ERR866178 1 0.1557 0.823 0.944 0.000 0.000 0.056
#> ERR862986 1 0.1557 0.823 0.944 0.000 0.000 0.056
#> ERR866161 1 0.1557 0.823 0.944 0.000 0.000 0.056
#> ERR866179 1 0.1557 0.823 0.944 0.000 0.000 0.056
#> ERR862987 2 0.4406 0.625 0.000 0.700 0.000 0.300
#> ERR866162 2 0.4406 0.625 0.000 0.700 0.000 0.300
#> ERR866180 2 0.4406 0.625 0.000 0.700 0.000 0.300
#> ERR862988 2 0.4406 0.625 0.000 0.700 0.000 0.300
#> ERR866163 2 0.4406 0.625 0.000 0.700 0.000 0.300
#> ERR866181 2 0.4406 0.625 0.000 0.700 0.000 0.300
#> ERR862989 1 0.0707 0.818 0.980 0.000 0.000 0.020
#> ERR866164 1 0.0707 0.818 0.980 0.000 0.000 0.020
#> ERR866182 1 0.0707 0.818 0.980 0.000 0.000 0.020
#> ERR862990 1 0.0707 0.818 0.980 0.000 0.000 0.020
#> ERR866165 1 0.0707 0.818 0.980 0.000 0.000 0.020
#> ERR866183 1 0.0707 0.818 0.980 0.000 0.000 0.020
#> ERR862991 2 0.4406 0.625 0.000 0.700 0.000 0.300
#> ERR866166 2 0.4406 0.625 0.000 0.700 0.000 0.300
#> ERR866184 2 0.4406 0.625 0.000 0.700 0.000 0.300
#> ERR862992 2 0.4406 0.625 0.000 0.700 0.000 0.300
#> ERR866167 2 0.4406 0.625 0.000 0.700 0.000 0.300
#> ERR866185 2 0.4406 0.625 0.000 0.700 0.000 0.300
show/hide code output
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> ERR862939 1 0.5295 0.480 0.540 0.000 0.000 NA 0.052
#> ERR862957 1 0.5295 0.480 0.540 0.000 0.000 NA 0.052
#> ERR878007 1 0.5295 0.480 0.540 0.000 0.000 NA 0.052
#> ERR862940 1 0.5394 0.480 0.540 0.000 0.000 NA 0.060
#> ERR862958 1 0.5394 0.480 0.540 0.000 0.000 NA 0.060
#> ERR878008 1 0.5345 0.480 0.540 0.000 0.000 NA 0.056
#> ERR862941 2 0.6534 0.216 0.000 0.460 0.000 NA 0.212
#> ERR862959 2 0.6534 0.216 0.000 0.460 0.000 NA 0.212
#> ERR878009 2 0.6526 0.214 0.000 0.464 0.000 NA 0.212
#> ERR862942 2 0.6534 0.216 0.000 0.460 0.000 NA 0.212
#> ERR862960 2 0.6534 0.216 0.000 0.460 0.000 NA 0.212
#> ERR878010 2 0.6526 0.214 0.000 0.464 0.000 NA 0.212
#> ERR862943 3 0.5569 0.797 0.080 0.000 0.556 NA 0.000
#> ERR862961 3 0.5569 0.797 0.080 0.000 0.556 NA 0.000
#> ERR878011 3 0.5569 0.797 0.080 0.000 0.556 NA 0.000
#> ERR862944 3 0.5569 0.797 0.080 0.000 0.556 NA 0.000
#> ERR862962 3 0.5569 0.797 0.080 0.000 0.556 NA 0.000
#> ERR878012 3 0.5569 0.797 0.080 0.000 0.556 NA 0.000
#> ERR862945 3 0.0162 0.699 0.000 0.000 0.996 NA 0.004
#> ERR862963 3 0.0000 0.699 0.000 0.000 1.000 NA 0.000
#> ERR878013 3 0.0000 0.699 0.000 0.000 1.000 NA 0.000
#> ERR862946 3 0.0579 0.699 0.000 0.000 0.984 NA 0.008
#> ERR862964 3 0.0579 0.699 0.000 0.000 0.984 NA 0.008
#> ERR878014 3 0.0000 0.699 0.000 0.000 1.000 NA 0.000
#> ERR862947 5 0.3053 0.645 0.000 0.164 0.000 NA 0.828
#> ERR862965 5 0.2773 0.647 0.000 0.164 0.000 NA 0.836
#> ERR878015 5 0.2773 0.647 0.000 0.164 0.000 NA 0.836
#> ERR862948 5 0.2773 0.647 0.000 0.164 0.000 NA 0.836
#> ERR862966 5 0.2773 0.647 0.000 0.164 0.000 NA 0.836
#> ERR878016 5 0.2773 0.647 0.000 0.164 0.000 NA 0.836
#> ERR862949 2 0.6553 0.209 0.000 0.456 0.000 NA 0.216
#> ERR862967 2 0.6553 0.209 0.000 0.456 0.000 NA 0.216
#> ERR878017 2 0.6545 0.206 0.000 0.460 0.000 NA 0.216
#> ERR862950 2 0.6553 0.209 0.000 0.456 0.000 NA 0.216
#> ERR862968 2 0.6553 0.209 0.000 0.456 0.000 NA 0.216
#> ERR878018 2 0.6553 0.209 0.000 0.456 0.000 NA 0.216
#> ERR862951 1 0.5104 0.671 0.736 0.156 0.000 NA 0.032
#> ERR862969 1 0.5104 0.671 0.736 0.156 0.000 NA 0.032
#> ERR878019 1 0.5104 0.671 0.736 0.156 0.000 NA 0.032
#> ERR862952 1 0.5104 0.671 0.736 0.156 0.000 NA 0.032
#> ERR862970 1 0.5104 0.671 0.736 0.156 0.000 NA 0.032
#> ERR878020 1 0.5104 0.671 0.736 0.156 0.000 NA 0.032
#> ERR862953 2 0.6314 -0.185 0.412 0.484 0.000 NA 0.032
#> ERR862971 2 0.6309 -0.173 0.408 0.488 0.000 NA 0.032
#> ERR878021 2 0.6309 -0.173 0.408 0.488 0.000 NA 0.032
#> ERR862954 2 0.6309 -0.173 0.408 0.488 0.000 NA 0.032
#> ERR862972 2 0.6309 -0.173 0.408 0.488 0.000 NA 0.032
#> ERR878022 2 0.6309 -0.173 0.408 0.488 0.000 NA 0.032
#> ERR862955 2 0.0671 0.324 0.016 0.980 0.000 NA 0.000
#> ERR862973 2 0.0671 0.324 0.016 0.980 0.000 NA 0.000
#> ERR878023 2 0.0510 0.323 0.016 0.984 0.000 NA 0.000
#> ERR862956 2 0.0671 0.324 0.016 0.980 0.000 NA 0.000
#> ERR862974 2 0.0671 0.324 0.016 0.980 0.000 NA 0.000
#> ERR878024 2 0.0510 0.323 0.016 0.984 0.000 NA 0.000
#> ERR862975 1 0.2916 0.781 0.880 0.008 0.000 NA 0.040
#> ERR866150 1 0.2916 0.781 0.880 0.008 0.000 NA 0.040
#> ERR866168 1 0.2916 0.781 0.880 0.008 0.000 NA 0.040
#> ERR862976 1 0.2916 0.781 0.880 0.008 0.000 NA 0.040
#> ERR866151 1 0.2916 0.781 0.880 0.008 0.000 NA 0.040
#> ERR866169 1 0.2916 0.781 0.880 0.008 0.000 NA 0.040
#> ERR862977 2 0.0798 0.324 0.016 0.976 0.000 NA 0.000
#> ERR866152 2 0.0671 0.323 0.016 0.980 0.000 NA 0.000
#> ERR866170 2 0.0671 0.323 0.016 0.980 0.000 NA 0.000
#> ERR862978 2 0.0798 0.324 0.016 0.976 0.000 NA 0.000
#> ERR866153 2 0.0671 0.323 0.016 0.980 0.000 NA 0.000
#> ERR866171 2 0.0671 0.323 0.016 0.980 0.000 NA 0.000
#> ERR862979 2 0.6482 0.224 0.000 0.468 0.000 NA 0.200
#> ERR866154 2 0.6452 0.224 0.000 0.476 0.000 NA 0.196
#> ERR866172 2 0.6474 0.223 0.000 0.472 0.000 NA 0.200
#> ERR862980 2 0.6482 0.224 0.000 0.468 0.000 NA 0.200
#> ERR866155 2 0.6474 0.223 0.000 0.472 0.000 NA 0.200
#> ERR866173 2 0.6474 0.223 0.000 0.472 0.000 NA 0.200
#> ERR862981 1 0.2745 0.798 0.896 0.028 0.000 NA 0.024
#> ERR866156 1 0.2745 0.798 0.896 0.028 0.000 NA 0.024
#> ERR866174 1 0.2745 0.798 0.896 0.028 0.000 NA 0.024
#> ERR866157 1 0.2745 0.798 0.896 0.028 0.000 NA 0.024
#> ERR866175 1 0.2745 0.798 0.896 0.028 0.000 NA 0.024
#> ERR862983 3 0.6864 0.737 0.216 0.000 0.460 NA 0.012
#> ERR866158 3 0.6864 0.737 0.216 0.000 0.460 NA 0.012
#> ERR866176 3 0.6864 0.737 0.216 0.000 0.460 NA 0.012
#> ERR862984 3 0.6864 0.737 0.216 0.000 0.460 NA 0.012
#> ERR866159 3 0.6864 0.737 0.216 0.000 0.460 NA 0.012
#> ERR866177 3 0.6864 0.737 0.216 0.000 0.460 NA 0.012
#> ERR862985 1 0.2745 0.798 0.896 0.028 0.000 NA 0.024
#> ERR866160 1 0.2745 0.798 0.896 0.028 0.000 NA 0.024
#> ERR866178 1 0.2745 0.798 0.896 0.028 0.000 NA 0.024
#> ERR862986 1 0.2745 0.798 0.896 0.028 0.000 NA 0.024
#> ERR866161 1 0.2745 0.798 0.896 0.028 0.000 NA 0.024
#> ERR866179 1 0.2745 0.798 0.896 0.028 0.000 NA 0.024
#> ERR862987 2 0.6192 -0.570 0.000 0.432 0.000 NA 0.432
#> ERR866162 5 0.6192 0.520 0.000 0.432 0.000 NA 0.432
#> ERR866180 2 0.6192 -0.570 0.000 0.432 0.000 NA 0.432
#> ERR862988 5 0.6220 0.516 0.000 0.428 0.000 NA 0.432
#> ERR866163 2 0.6192 -0.570 0.000 0.432 0.000 NA 0.432
#> ERR866181 2 0.6192 -0.570 0.000 0.432 0.000 NA 0.432
#> ERR862989 1 0.2585 0.790 0.896 0.004 0.000 NA 0.036
#> ERR866164 1 0.2585 0.790 0.896 0.004 0.000 NA 0.036
#> ERR866182 1 0.2585 0.790 0.896 0.004 0.000 NA 0.036
#> ERR862990 1 0.2585 0.790 0.896 0.004 0.000 NA 0.036
#> ERR866165 1 0.2585 0.790 0.896 0.004 0.000 NA 0.036
#> ERR866183 1 0.2585 0.790 0.896 0.004 0.000 NA 0.036
#> ERR862991 5 0.6192 0.520 0.000 0.432 0.000 NA 0.432
#> ERR866166 5 0.6192 0.520 0.000 0.432 0.000 NA 0.432
#> ERR866184 2 0.6192 -0.570 0.000 0.432 0.000 NA 0.432
#> ERR862992 5 0.6192 0.520 0.000 0.432 0.000 NA 0.432
#> ERR866167 2 0.6192 -0.570 0.000 0.432 0.000 NA 0.432
#> ERR866185 5 0.6192 0.520 0.000 0.432 0.000 NA 0.432
show/hide code output
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> ERR862939 6 0.7681 0.997 0.320 0.000 0.228 0.048 0.056 0.348
#> ERR862957 6 0.7681 0.997 0.320 0.000 0.228 0.048 0.056 0.348
#> ERR878007 6 0.7681 0.997 0.320 0.000 0.228 0.048 0.056 0.348
#> ERR862940 6 0.7676 0.996 0.320 0.000 0.228 0.044 0.060 0.348
#> ERR862958 6 0.7676 0.996 0.320 0.000 0.228 0.044 0.060 0.348
#> ERR878008 6 0.7635 0.997 0.320 0.000 0.228 0.044 0.056 0.352
#> ERR862941 2 0.5095 0.703 0.000 0.500 0.000 0.080 0.000 0.420
#> ERR862959 2 0.5095 0.703 0.000 0.500 0.000 0.080 0.000 0.420
#> ERR878009 2 0.5095 0.703 0.000 0.500 0.000 0.080 0.000 0.420
#> ERR862942 2 0.5095 0.703 0.000 0.500 0.000 0.080 0.000 0.420
#> ERR862960 2 0.5095 0.703 0.000 0.500 0.000 0.080 0.000 0.420
#> ERR878010 2 0.5095 0.703 0.000 0.500 0.000 0.080 0.000 0.420
#> ERR862943 3 0.1219 0.669 0.048 0.000 0.948 0.000 0.000 0.004
#> ERR862961 3 0.1219 0.669 0.048 0.000 0.948 0.000 0.000 0.004
#> ERR878011 3 0.1219 0.669 0.048 0.000 0.948 0.000 0.000 0.004
#> ERR862944 3 0.1219 0.669 0.048 0.000 0.948 0.000 0.000 0.004
#> ERR862962 3 0.1219 0.669 0.048 0.000 0.948 0.000 0.000 0.004
#> ERR878012 3 0.1219 0.669 0.048 0.000 0.948 0.000 0.000 0.004
#> ERR862945 3 0.6729 0.541 0.004 0.000 0.480 0.080 0.304 0.132
#> ERR862963 3 0.6758 0.541 0.004 0.000 0.480 0.084 0.300 0.132
#> ERR878013 3 0.6776 0.541 0.004 0.000 0.480 0.084 0.296 0.136
#> ERR862946 3 0.6907 0.540 0.004 0.000 0.472 0.104 0.288 0.132
#> ERR862964 3 0.6940 0.539 0.004 0.000 0.472 0.104 0.280 0.140
#> ERR878014 3 0.6765 0.541 0.004 0.000 0.480 0.080 0.296 0.140
#> ERR862947 5 0.4700 0.981 0.000 0.456 0.004 0.012 0.512 0.016
#> ERR862965 5 0.3979 0.996 0.000 0.456 0.000 0.000 0.540 0.004
#> ERR878015 5 0.3979 0.996 0.000 0.456 0.000 0.000 0.540 0.004
#> ERR862948 5 0.3979 0.996 0.000 0.456 0.000 0.000 0.540 0.004
#> ERR862966 5 0.4080 0.994 0.000 0.456 0.000 0.000 0.536 0.008
#> ERR878016 5 0.3979 0.996 0.000 0.456 0.000 0.000 0.540 0.004
#> ERR862949 2 0.5180 0.702 0.000 0.504 0.000 0.076 0.004 0.416
#> ERR862967 2 0.5180 0.702 0.000 0.504 0.000 0.076 0.004 0.416
#> ERR878017 2 0.5180 0.702 0.000 0.504 0.000 0.076 0.004 0.416
#> ERR862950 2 0.5180 0.702 0.000 0.504 0.000 0.076 0.004 0.416
#> ERR862968 2 0.5180 0.702 0.000 0.504 0.000 0.076 0.004 0.416
#> ERR878018 2 0.5180 0.702 0.000 0.504 0.000 0.076 0.004 0.416
#> ERR862951 1 0.4907 0.543 0.700 0.004 0.000 0.204 0.044 0.048
#> ERR862969 1 0.4907 0.543 0.700 0.004 0.000 0.204 0.044 0.048
#> ERR878019 1 0.4907 0.543 0.700 0.004 0.000 0.204 0.044 0.048
#> ERR862952 1 0.4934 0.542 0.696 0.004 0.000 0.208 0.044 0.048
#> ERR862970 1 0.4934 0.542 0.696 0.004 0.000 0.208 0.044 0.048
#> ERR878020 1 0.4907 0.543 0.700 0.004 0.000 0.204 0.044 0.048
#> ERR862953 4 0.5381 0.330 0.328 0.008 0.000 0.588 0.044 0.032
#> ERR862971 4 0.5354 0.347 0.320 0.008 0.000 0.596 0.044 0.032
#> ERR878021 4 0.5354 0.347 0.320 0.008 0.000 0.596 0.044 0.032
#> ERR862954 4 0.5354 0.347 0.320 0.008 0.000 0.596 0.044 0.032
#> ERR862972 4 0.5354 0.347 0.320 0.008 0.000 0.596 0.044 0.032
#> ERR878022 4 0.5354 0.347 0.320 0.008 0.000 0.596 0.044 0.032
#> ERR862955 4 0.4254 0.698 0.004 0.312 0.000 0.656 0.000 0.028
#> ERR862973 4 0.4254 0.698 0.004 0.312 0.000 0.656 0.000 0.028
#> ERR878023 4 0.4254 0.698 0.004 0.312 0.000 0.656 0.000 0.028
#> ERR862956 4 0.4254 0.698 0.004 0.312 0.000 0.656 0.000 0.028
#> ERR862974 4 0.4254 0.698 0.004 0.312 0.000 0.656 0.000 0.028
#> ERR878024 4 0.4254 0.698 0.004 0.312 0.000 0.656 0.000 0.028
#> ERR862975 1 0.2903 0.639 0.876 0.000 0.064 0.028 0.024 0.008
#> ERR866150 1 0.2903 0.639 0.876 0.000 0.064 0.028 0.024 0.008
#> ERR866168 1 0.2903 0.639 0.876 0.000 0.064 0.028 0.024 0.008
#> ERR862976 1 0.2903 0.639 0.876 0.000 0.064 0.028 0.024 0.008
#> ERR866151 1 0.2903 0.639 0.876 0.000 0.064 0.028 0.024 0.008
#> ERR866169 1 0.2903 0.639 0.876 0.000 0.064 0.028 0.024 0.008
#> ERR862977 4 0.4459 0.697 0.004 0.312 0.000 0.648 0.004 0.032
#> ERR866152 4 0.4459 0.697 0.004 0.312 0.000 0.648 0.004 0.032
#> ERR866170 4 0.4459 0.697 0.004 0.312 0.000 0.648 0.004 0.032
#> ERR862978 4 0.4459 0.697 0.004 0.312 0.000 0.648 0.004 0.032
#> ERR866153 4 0.4459 0.697 0.004 0.312 0.000 0.648 0.004 0.032
#> ERR866171 4 0.4459 0.697 0.004 0.312 0.000 0.648 0.004 0.032
#> ERR862979 2 0.5175 0.700 0.000 0.492 0.000 0.088 0.000 0.420
#> ERR866154 2 0.5175 0.700 0.000 0.492 0.000 0.088 0.000 0.420
#> ERR866172 2 0.5175 0.700 0.000 0.492 0.000 0.088 0.000 0.420
#> ERR862980 2 0.5175 0.700 0.000 0.492 0.000 0.088 0.000 0.420
#> ERR866155 2 0.5175 0.700 0.000 0.492 0.000 0.088 0.000 0.420
#> ERR866173 2 0.5175 0.700 0.000 0.492 0.000 0.088 0.000 0.420
#> ERR862981 1 0.4498 0.574 0.752 0.000 0.000 0.068 0.044 0.136
#> ERR866156 1 0.4498 0.574 0.752 0.000 0.000 0.068 0.044 0.136
#> ERR866174 1 0.4498 0.574 0.752 0.000 0.000 0.068 0.044 0.136
#> ERR866157 1 0.4498 0.574 0.752 0.000 0.000 0.068 0.044 0.136
#> ERR866175 1 0.4498 0.574 0.752 0.000 0.000 0.068 0.044 0.136
#> ERR862983 3 0.3189 0.601 0.184 0.000 0.796 0.020 0.000 0.000
#> ERR866158 3 0.3189 0.601 0.184 0.000 0.796 0.020 0.000 0.000
#> ERR866176 3 0.3189 0.601 0.184 0.000 0.796 0.020 0.000 0.000
#> ERR862984 3 0.3189 0.601 0.184 0.000 0.796 0.020 0.000 0.000
#> ERR866159 3 0.3189 0.601 0.184 0.000 0.796 0.020 0.000 0.000
#> ERR866177 3 0.3189 0.601 0.184 0.000 0.796 0.020 0.000 0.000
#> ERR862985 1 0.4498 0.574 0.752 0.000 0.000 0.068 0.044 0.136
#> ERR866160 1 0.4498 0.574 0.752 0.000 0.000 0.068 0.044 0.136
#> ERR866178 1 0.4498 0.574 0.752 0.000 0.000 0.068 0.044 0.136
#> ERR862986 1 0.4498 0.574 0.752 0.000 0.000 0.068 0.044 0.136
#> ERR866161 1 0.4498 0.574 0.752 0.000 0.000 0.068 0.044 0.136
#> ERR866179 1 0.4498 0.574 0.752 0.000 0.000 0.068 0.044 0.136
#> ERR862987 2 0.0000 0.364 0.000 1.000 0.000 0.000 0.000 0.000
#> ERR866162 2 0.0000 0.364 0.000 1.000 0.000 0.000 0.000 0.000
#> ERR866180 2 0.0000 0.364 0.000 1.000 0.000 0.000 0.000 0.000
#> ERR862988 2 0.0000 0.364 0.000 1.000 0.000 0.000 0.000 0.000
#> ERR866163 2 0.0000 0.364 0.000 1.000 0.000 0.000 0.000 0.000
#> ERR866181 2 0.0000 0.364 0.000 1.000 0.000 0.000 0.000 0.000
#> ERR862989 1 0.2280 0.659 0.912 0.000 0.028 0.008 0.016 0.036
#> ERR866164 1 0.2280 0.659 0.912 0.000 0.028 0.008 0.016 0.036
#> ERR866182 1 0.2280 0.659 0.912 0.000 0.028 0.008 0.016 0.036
#> ERR862990 1 0.2280 0.659 0.912 0.000 0.028 0.008 0.016 0.036
#> ERR866165 1 0.2280 0.659 0.912 0.000 0.028 0.008 0.016 0.036
#> ERR866183 1 0.2280 0.659 0.912 0.000 0.028 0.008 0.016 0.036
#> ERR862991 2 0.0146 0.366 0.000 0.996 0.000 0.004 0.000 0.000
#> ERR866166 2 0.0146 0.366 0.000 0.996 0.000 0.004 0.000 0.000
#> ERR866184 2 0.0146 0.366 0.000 0.996 0.000 0.004 0.000 0.000
#> ERR862992 2 0.0146 0.366 0.000 0.996 0.000 0.004 0.000 0.000
#> ERR866167 2 0.0146 0.366 0.000 0.996 0.000 0.004 0.000 0.000
#> ERR866185 2 0.0146 0.366 0.000 0.996 0.000 0.004 0.000 0.000
Heatmaps for the consensus matrix. It visualizes the probability of two
samples to be in a same group.
consensus_heatmap(res, k = 2)

consensus_heatmap(res, k = 3)

consensus_heatmap(res, k = 4)

consensus_heatmap(res, k = 5)

consensus_heatmap(res, k = 6)

Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)

membership_heatmap(res, k = 3)

membership_heatmap(res, k = 4)

membership_heatmap(res, k = 5)

membership_heatmap(res, k = 6)

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)

get_signatures(res, k = 3)

get_signatures(res, k = 4)

get_signatures(res, k = 5)

get_signatures(res, k = 6)

Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)

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

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

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

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

Compare the overlap of signatures from different k:
compare_signatures(res)

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.
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:
which_row
: row indices corresponding to the input matrix.
fdr
: FDR for the differential test.
mean_x
: The mean value in group x.
scaled_mean_x
: The mean value in group x after rows are scaled.
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")

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

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

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

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

Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)

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"]
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 15818 rows and 107 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)

The plots are:
- The first row: a plot of the ECDF (empirical cumulative distribution
function) curves of the consensus matrix for each
k
and the heatmap of
predicted classes for each k
.
- The second row: heatmaps of the consensus matrix for each
k
.
- The third row: heatmaps of the membership matrix for each
k
.
- The fouth row: heatmaps of the signatures for each
k
.
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:
- ECDF curves of the consensus matrix for each
k
;
- 1-PAC. The PAC
score
measures the proportion of the ambiguous subgrouping.
- Mean silhouette score.
- Concordance. The mean probability of fiting the consensus class ids in all
partitions.
- Area increased. Denote \(A_k\) as the area under the ECDF curve for current
k
, the area increased is defined as \(A_k - A_{k-1}\).
- Rand index. The percent of pairs of samples that are both in a same cluster
or both are not in a same cluster in the partition of k and k-1.
- Jaccard index. The ratio of pairs of samples are both in a same cluster in
the partition of k and k-1 and the pairs of samples are both in a same
cluster in the partition k or k-1.
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)

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.977 0.991 0.5045 0.496 0.496
#> 3 3 0.793 0.901 0.921 0.2212 0.883 0.764
#> 4 4 0.723 0.844 0.801 0.1444 0.886 0.703
#> 5 5 0.775 0.902 0.908 0.0759 0.953 0.828
#> 6 6 0.823 0.867 0.878 0.0375 1.000 1.000
suggest_best_k()
suggests the best \(k\) based on these statistics. The rules are as follows:
- All \(k\) with Jaccard index larger than 0.95 are removed because increasing
\(k\) does not provide enough extra information. If all \(k\) are removed, it is
marked as no subgroup is detected.
- For all \(k\) with 1-PAC score larger than 0.9, the maximal \(k\) is taken as
the best \(k\), and other \(k\) are marked as optional \(k\).
- If it does not fit the second rule. The \(k\) with the maximal vote of the
highest 1-PAC score, highest mean silhouette, and highest concordance is
taken as the best \(k\).
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
#> ERR862939 1 0.000 0.989 1.000 0.000
#> ERR862957 1 0.000 0.989 1.000 0.000
#> ERR878007 1 0.000 0.989 1.000 0.000
#> ERR862940 1 0.000 0.989 1.000 0.000
#> ERR862958 1 0.000 0.989 1.000 0.000
#> ERR878008 1 0.000 0.989 1.000 0.000
#> ERR862941 2 0.000 0.991 0.000 1.000
#> ERR862959 2 0.000 0.991 0.000 1.000
#> ERR878009 2 0.000 0.991 0.000 1.000
#> ERR862942 2 0.000 0.991 0.000 1.000
#> ERR862960 2 0.000 0.991 0.000 1.000
#> ERR878010 2 0.000 0.991 0.000 1.000
#> ERR862943 1 0.000 0.989 1.000 0.000
#> ERR862961 1 0.000 0.989 1.000 0.000
#> ERR878011 1 0.000 0.989 1.000 0.000
#> ERR862944 1 0.000 0.989 1.000 0.000
#> ERR862962 1 0.000 0.989 1.000 0.000
#> ERR878012 1 0.000 0.989 1.000 0.000
#> ERR862945 1 0.000 0.989 1.000 0.000
#> ERR862963 1 0.000 0.989 1.000 0.000
#> ERR878013 1 0.000 0.989 1.000 0.000
#> ERR862946 1 0.000 0.989 1.000 0.000
#> ERR862964 1 0.000 0.989 1.000 0.000
#> ERR878014 1 0.000 0.989 1.000 0.000
#> ERR862947 2 0.000 0.991 0.000 1.000
#> ERR862965 2 0.000 0.991 0.000 1.000
#> ERR878015 2 0.000 0.991 0.000 1.000
#> ERR862948 2 0.000 0.991 0.000 1.000
#> ERR862966 2 0.000 0.991 0.000 1.000
#> ERR878016 2 0.000 0.991 0.000 1.000
#> ERR862949 2 0.000 0.991 0.000 1.000
#> ERR862967 2 0.000 0.991 0.000 1.000
#> ERR878017 2 0.000 0.991 0.000 1.000
#> ERR862950 2 0.000 0.991 0.000 1.000
#> ERR862968 2 0.000 0.991 0.000 1.000
#> ERR878018 2 0.000 0.991 0.000 1.000
#> ERR862951 1 0.163 0.968 0.976 0.024
#> ERR862969 1 0.730 0.751 0.796 0.204
#> ERR878019 2 0.995 0.121 0.460 0.540
#> ERR862952 1 0.552 0.857 0.872 0.128
#> ERR862970 1 0.141 0.972 0.980 0.020
#> ERR878020 1 0.644 0.810 0.836 0.164
#> ERR862953 2 0.000 0.991 0.000 1.000
#> ERR862971 2 0.000 0.991 0.000 1.000
#> ERR878021 2 0.000 0.991 0.000 1.000
#> ERR862954 2 0.000 0.991 0.000 1.000
#> ERR862972 2 0.000 0.991 0.000 1.000
#> ERR878022 2 0.000 0.991 0.000 1.000
#> ERR862955 2 0.000 0.991 0.000 1.000
#> ERR862973 2 0.000 0.991 0.000 1.000
#> ERR878023 2 0.000 0.991 0.000 1.000
#> ERR862956 2 0.000 0.991 0.000 1.000
#> ERR862974 2 0.000 0.991 0.000 1.000
#> ERR878024 2 0.000 0.991 0.000 1.000
#> ERR862975 1 0.000 0.989 1.000 0.000
#> ERR866150 1 0.000 0.989 1.000 0.000
#> ERR866168 1 0.000 0.989 1.000 0.000
#> ERR862976 1 0.000 0.989 1.000 0.000
#> ERR866151 1 0.000 0.989 1.000 0.000
#> ERR866169 1 0.000 0.989 1.000 0.000
#> ERR862977 2 0.000 0.991 0.000 1.000
#> ERR866152 2 0.000 0.991 0.000 1.000
#> ERR866170 2 0.000 0.991 0.000 1.000
#> ERR862978 2 0.000 0.991 0.000 1.000
#> ERR866153 2 0.000 0.991 0.000 1.000
#> ERR866171 2 0.000 0.991 0.000 1.000
#> ERR862979 2 0.000 0.991 0.000 1.000
#> ERR866154 2 0.000 0.991 0.000 1.000
#> ERR866172 2 0.000 0.991 0.000 1.000
#> ERR862980 2 0.000 0.991 0.000 1.000
#> ERR866155 2 0.000 0.991 0.000 1.000
#> ERR866173 2 0.000 0.991 0.000 1.000
#> ERR862981 1 0.000 0.989 1.000 0.000
#> ERR866156 1 0.000 0.989 1.000 0.000
#> ERR866174 1 0.000 0.989 1.000 0.000
#> ERR866157 1 0.000 0.989 1.000 0.000
#> ERR866175 1 0.000 0.989 1.000 0.000
#> ERR862983 1 0.000 0.989 1.000 0.000
#> ERR866158 1 0.000 0.989 1.000 0.000
#> ERR866176 1 0.000 0.989 1.000 0.000
#> ERR862984 1 0.000 0.989 1.000 0.000
#> ERR866159 1 0.000 0.989 1.000 0.000
#> ERR866177 1 0.000 0.989 1.000 0.000
#> ERR862985 1 0.000 0.989 1.000 0.000
#> ERR866160 1 0.000 0.989 1.000 0.000
#> ERR866178 1 0.000 0.989 1.000 0.000
#> ERR862986 1 0.000 0.989 1.000 0.000
#> ERR866161 1 0.000 0.989 1.000 0.000
#> ERR866179 1 0.000 0.989 1.000 0.000
#> ERR862987 2 0.000 0.991 0.000 1.000
#> ERR866162 2 0.000 0.991 0.000 1.000
#> ERR866180 2 0.000 0.991 0.000 1.000
#> ERR862988 2 0.000 0.991 0.000 1.000
#> ERR866163 2 0.000 0.991 0.000 1.000
#> ERR866181 2 0.000 0.991 0.000 1.000
#> ERR862989 1 0.000 0.989 1.000 0.000
#> ERR866164 1 0.000 0.989 1.000 0.000
#> ERR866182 1 0.000 0.989 1.000 0.000
#> ERR862990 1 0.000 0.989 1.000 0.000
#> ERR866165 1 0.000 0.989 1.000 0.000
#> ERR866183 1 0.000 0.989 1.000 0.000
#> ERR862991 2 0.000 0.991 0.000 1.000
#> ERR866166 2 0.000 0.991 0.000 1.000
#> ERR866184 2 0.000 0.991 0.000 1.000
#> ERR862992 2 0.000 0.991 0.000 1.000
#> ERR866167 2 0.000 0.991 0.000 1.000
#> ERR866185 2 0.000 0.991 0.000 1.000
show/hide code output
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> ERR862939 3 0.4235 0.807 0.176 0.000 0.824
#> ERR862957 3 0.4235 0.807 0.176 0.000 0.824
#> ERR878007 3 0.4235 0.807 0.176 0.000 0.824
#> ERR862940 3 0.4235 0.807 0.176 0.000 0.824
#> ERR862958 3 0.4235 0.807 0.176 0.000 0.824
#> ERR878008 3 0.4235 0.807 0.176 0.000 0.824
#> ERR862941 2 0.0000 0.984 0.000 1.000 0.000
#> ERR862959 2 0.0000 0.984 0.000 1.000 0.000
#> ERR878009 2 0.0000 0.984 0.000 1.000 0.000
#> ERR862942 2 0.0000 0.984 0.000 1.000 0.000
#> ERR862960 2 0.0000 0.984 0.000 1.000 0.000
#> ERR878010 2 0.0000 0.984 0.000 1.000 0.000
#> ERR862943 3 0.0000 0.799 0.000 0.000 1.000
#> ERR862961 3 0.0000 0.799 0.000 0.000 1.000
#> ERR878011 3 0.0000 0.799 0.000 0.000 1.000
#> ERR862944 3 0.0000 0.799 0.000 0.000 1.000
#> ERR862962 3 0.0000 0.799 0.000 0.000 1.000
#> ERR878012 3 0.0000 0.799 0.000 0.000 1.000
#> ERR862945 3 0.0000 0.799 0.000 0.000 1.000
#> ERR862963 3 0.0000 0.799 0.000 0.000 1.000
#> ERR878013 3 0.0000 0.799 0.000 0.000 1.000
#> ERR862946 3 0.0000 0.799 0.000 0.000 1.000
#> ERR862964 3 0.0000 0.799 0.000 0.000 1.000
#> ERR878014 3 0.0000 0.799 0.000 0.000 1.000
#> ERR862947 2 0.0000 0.984 0.000 1.000 0.000
#> ERR862965 2 0.0000 0.984 0.000 1.000 0.000
#> ERR878015 2 0.0000 0.984 0.000 1.000 0.000
#> ERR862948 2 0.0000 0.984 0.000 1.000 0.000
#> ERR862966 2 0.0000 0.984 0.000 1.000 0.000
#> ERR878016 2 0.0000 0.984 0.000 1.000 0.000
#> ERR862949 2 0.0000 0.984 0.000 1.000 0.000
#> ERR862967 2 0.0000 0.984 0.000 1.000 0.000
#> ERR878017 2 0.0000 0.984 0.000 1.000 0.000
#> ERR862950 2 0.0000 0.984 0.000 1.000 0.000
#> ERR862968 2 0.0000 0.984 0.000 1.000 0.000
#> ERR878018 2 0.0000 0.984 0.000 1.000 0.000
#> ERR862951 1 0.4974 0.901 0.764 0.000 0.236
#> ERR862969 1 0.5158 0.898 0.764 0.004 0.232
#> ERR878019 1 0.5292 0.894 0.764 0.008 0.228
#> ERR862952 1 0.5378 0.897 0.756 0.008 0.236
#> ERR862970 1 0.5058 0.905 0.756 0.000 0.244
#> ERR878020 1 0.4974 0.901 0.764 0.000 0.236
#> ERR862953 2 0.3482 0.885 0.128 0.872 0.000
#> ERR862971 2 0.2796 0.920 0.092 0.908 0.000
#> ERR878021 2 0.4002 0.849 0.160 0.840 0.000
#> ERR862954 2 0.3038 0.909 0.104 0.896 0.000
#> ERR862972 2 0.3038 0.909 0.104 0.896 0.000
#> ERR878022 2 0.3941 0.854 0.156 0.844 0.000
#> ERR862955 2 0.0747 0.978 0.016 0.984 0.000
#> ERR862973 2 0.0747 0.978 0.016 0.984 0.000
#> ERR878023 2 0.0747 0.978 0.016 0.984 0.000
#> ERR862956 2 0.0747 0.978 0.016 0.984 0.000
#> ERR862974 2 0.0747 0.978 0.016 0.984 0.000
#> ERR878024 2 0.0747 0.978 0.016 0.984 0.000
#> ERR862975 1 0.5621 0.921 0.692 0.000 0.308
#> ERR866150 1 0.5621 0.921 0.692 0.000 0.308
#> ERR866168 1 0.5621 0.921 0.692 0.000 0.308
#> ERR862976 1 0.5621 0.921 0.692 0.000 0.308
#> ERR866151 1 0.5621 0.921 0.692 0.000 0.308
#> ERR866169 1 0.5621 0.921 0.692 0.000 0.308
#> ERR862977 2 0.0747 0.978 0.016 0.984 0.000
#> ERR866152 2 0.0747 0.978 0.016 0.984 0.000
#> ERR866170 2 0.0747 0.978 0.016 0.984 0.000
#> ERR862978 2 0.0747 0.978 0.016 0.984 0.000
#> ERR866153 2 0.0747 0.978 0.016 0.984 0.000
#> ERR866171 2 0.0747 0.978 0.016 0.984 0.000
#> ERR862979 2 0.0000 0.984 0.000 1.000 0.000
#> ERR866154 2 0.0000 0.984 0.000 1.000 0.000
#> ERR866172 2 0.0000 0.984 0.000 1.000 0.000
#> ERR862980 2 0.0000 0.984 0.000 1.000 0.000
#> ERR866155 2 0.0000 0.984 0.000 1.000 0.000
#> ERR866173 2 0.0000 0.984 0.000 1.000 0.000
#> ERR862981 3 0.5810 0.777 0.336 0.000 0.664
#> ERR866156 3 0.5810 0.777 0.336 0.000 0.664
#> ERR866174 3 0.5810 0.777 0.336 0.000 0.664
#> ERR866157 3 0.5810 0.777 0.336 0.000 0.664
#> ERR866175 3 0.5810 0.777 0.336 0.000 0.664
#> ERR862983 3 0.2261 0.783 0.068 0.000 0.932
#> ERR866158 3 0.2261 0.783 0.068 0.000 0.932
#> ERR866176 3 0.2261 0.783 0.068 0.000 0.932
#> ERR862984 3 0.2261 0.783 0.068 0.000 0.932
#> ERR866159 3 0.2261 0.783 0.068 0.000 0.932
#> ERR866177 3 0.2261 0.783 0.068 0.000 0.932
#> ERR862985 3 0.5810 0.777 0.336 0.000 0.664
#> ERR866160 3 0.5810 0.777 0.336 0.000 0.664
#> ERR866178 3 0.5810 0.777 0.336 0.000 0.664
#> ERR862986 3 0.5810 0.777 0.336 0.000 0.664
#> ERR866161 3 0.5810 0.777 0.336 0.000 0.664
#> ERR866179 3 0.5810 0.777 0.336 0.000 0.664
#> ERR862987 2 0.0000 0.984 0.000 1.000 0.000
#> ERR866162 2 0.0000 0.984 0.000 1.000 0.000
#> ERR866180 2 0.0000 0.984 0.000 1.000 0.000
#> ERR862988 2 0.0000 0.984 0.000 1.000 0.000
#> ERR866163 2 0.0000 0.984 0.000 1.000 0.000
#> ERR866181 2 0.0000 0.984 0.000 1.000 0.000
#> ERR862989 1 0.6140 0.871 0.596 0.000 0.404
#> ERR866164 1 0.6045 0.899 0.620 0.000 0.380
#> ERR866182 1 0.6045 0.899 0.620 0.000 0.380
#> ERR862990 1 0.6045 0.899 0.620 0.000 0.380
#> ERR866165 1 0.6045 0.899 0.620 0.000 0.380
#> ERR866183 1 0.6045 0.899 0.620 0.000 0.380
#> ERR862991 2 0.0000 0.984 0.000 1.000 0.000
#> ERR866166 2 0.0000 0.984 0.000 1.000 0.000
#> ERR866184 2 0.0000 0.984 0.000 1.000 0.000
#> ERR862992 2 0.0000 0.984 0.000 1.000 0.000
#> ERR866167 2 0.0000 0.984 0.000 1.000 0.000
#> ERR866185 2 0.0000 0.984 0.000 1.000 0.000
show/hide code output
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> ERR862939 3 0.3048 0.703 0.108 0.000 0.876 0.016
#> ERR862957 3 0.3048 0.703 0.108 0.000 0.876 0.016
#> ERR878007 3 0.3048 0.703 0.108 0.000 0.876 0.016
#> ERR862940 3 0.3048 0.703 0.108 0.000 0.876 0.016
#> ERR862958 3 0.3048 0.703 0.108 0.000 0.876 0.016
#> ERR878008 3 0.3048 0.703 0.108 0.000 0.876 0.016
#> ERR862941 2 0.0000 1.000 0.000 1.000 0.000 0.000
#> ERR862959 2 0.0000 1.000 0.000 1.000 0.000 0.000
#> ERR878009 2 0.0000 1.000 0.000 1.000 0.000 0.000
#> ERR862942 2 0.0000 1.000 0.000 1.000 0.000 0.000
#> ERR862960 2 0.0000 1.000 0.000 1.000 0.000 0.000
#> ERR878010 2 0.0000 1.000 0.000 1.000 0.000 0.000
#> ERR862943 3 0.4356 0.700 0.292 0.000 0.708 0.000
#> ERR862961 3 0.4356 0.700 0.292 0.000 0.708 0.000
#> ERR878011 3 0.4356 0.700 0.292 0.000 0.708 0.000
#> ERR862944 3 0.4356 0.700 0.292 0.000 0.708 0.000
#> ERR862962 3 0.4356 0.700 0.292 0.000 0.708 0.000
#> ERR878012 3 0.4356 0.700 0.292 0.000 0.708 0.000
#> ERR862945 3 0.4356 0.700 0.292 0.000 0.708 0.000
#> ERR862963 3 0.4356 0.700 0.292 0.000 0.708 0.000
#> ERR878013 3 0.4356 0.700 0.292 0.000 0.708 0.000
#> ERR862946 3 0.4356 0.700 0.292 0.000 0.708 0.000
#> ERR862964 3 0.4356 0.700 0.292 0.000 0.708 0.000
#> ERR878014 3 0.4356 0.700 0.292 0.000 0.708 0.000
#> ERR862947 2 0.0000 1.000 0.000 1.000 0.000 0.000
#> ERR862965 2 0.0000 1.000 0.000 1.000 0.000 0.000
#> ERR878015 2 0.0000 1.000 0.000 1.000 0.000 0.000
#> ERR862948 2 0.0000 1.000 0.000 1.000 0.000 0.000
#> ERR862966 2 0.0000 1.000 0.000 1.000 0.000 0.000
#> ERR878016 2 0.0000 1.000 0.000 1.000 0.000 0.000
#> ERR862949 2 0.0000 1.000 0.000 1.000 0.000 0.000
#> ERR862967 2 0.0000 1.000 0.000 1.000 0.000 0.000
#> ERR878017 2 0.0000 1.000 0.000 1.000 0.000 0.000
#> ERR862950 2 0.0000 1.000 0.000 1.000 0.000 0.000
#> ERR862968 2 0.0000 1.000 0.000 1.000 0.000 0.000
#> ERR878018 2 0.0000 1.000 0.000 1.000 0.000 0.000
#> ERR862951 1 0.3257 0.834 0.844 0.000 0.004 0.152
#> ERR862969 1 0.3448 0.824 0.828 0.000 0.004 0.168
#> ERR878019 1 0.3710 0.801 0.804 0.000 0.004 0.192
#> ERR862952 1 0.3945 0.787 0.780 0.000 0.004 0.216
#> ERR862970 1 0.3428 0.836 0.844 0.000 0.012 0.144
#> ERR878020 1 0.3494 0.822 0.824 0.000 0.004 0.172
#> ERR862953 4 0.4868 0.826 0.024 0.256 0.000 0.720
#> ERR862971 4 0.4635 0.834 0.012 0.268 0.000 0.720
#> ERR878021 4 0.5156 0.805 0.044 0.236 0.000 0.720
#> ERR862954 4 0.4720 0.832 0.016 0.264 0.000 0.720
#> ERR862972 4 0.4720 0.832 0.016 0.264 0.000 0.720
#> ERR878022 4 0.5203 0.800 0.048 0.232 0.000 0.720
#> ERR862955 4 0.4888 0.900 0.000 0.412 0.000 0.588
#> ERR862973 4 0.4888 0.900 0.000 0.412 0.000 0.588
#> ERR878023 4 0.4888 0.900 0.000 0.412 0.000 0.588
#> ERR862956 4 0.4888 0.900 0.000 0.412 0.000 0.588
#> ERR862974 4 0.4888 0.900 0.000 0.412 0.000 0.588
#> ERR878024 4 0.4888 0.900 0.000 0.412 0.000 0.588
#> ERR862975 1 0.0188 0.898 0.996 0.000 0.004 0.000
#> ERR866150 1 0.0188 0.898 0.996 0.000 0.004 0.000
#> ERR866168 1 0.0188 0.898 0.996 0.000 0.004 0.000
#> ERR862976 1 0.0188 0.898 0.996 0.000 0.004 0.000
#> ERR866151 1 0.0188 0.898 0.996 0.000 0.004 0.000
#> ERR866169 1 0.0188 0.898 0.996 0.000 0.004 0.000
#> ERR862977 4 0.4888 0.900 0.000 0.412 0.000 0.588
#> ERR866152 4 0.4888 0.900 0.000 0.412 0.000 0.588
#> ERR866170 4 0.4888 0.900 0.000 0.412 0.000 0.588
#> ERR862978 4 0.4888 0.900 0.000 0.412 0.000 0.588
#> ERR866153 4 0.4888 0.900 0.000 0.412 0.000 0.588
#> ERR866171 4 0.4888 0.900 0.000 0.412 0.000 0.588
#> ERR862979 2 0.0000 1.000 0.000 1.000 0.000 0.000
#> ERR866154 2 0.0000 1.000 0.000 1.000 0.000 0.000
#> ERR866172 2 0.0000 1.000 0.000 1.000 0.000 0.000
#> ERR862980 2 0.0000 1.000 0.000 1.000 0.000 0.000
#> ERR866155 2 0.0000 1.000 0.000 1.000 0.000 0.000
#> ERR866173 2 0.0000 1.000 0.000 1.000 0.000 0.000
#> ERR862981 3 0.5222 0.578 0.032 0.000 0.688 0.280
#> ERR866156 3 0.5222 0.578 0.032 0.000 0.688 0.280
#> ERR866174 3 0.5222 0.578 0.032 0.000 0.688 0.280
#> ERR866157 3 0.5222 0.578 0.032 0.000 0.688 0.280
#> ERR866175 3 0.5222 0.578 0.032 0.000 0.688 0.280
#> ERR862983 3 0.4973 0.675 0.348 0.000 0.644 0.008
#> ERR866158 3 0.4990 0.671 0.352 0.000 0.640 0.008
#> ERR866176 3 0.4990 0.671 0.352 0.000 0.640 0.008
#> ERR862984 3 0.4990 0.671 0.352 0.000 0.640 0.008
#> ERR866159 3 0.4990 0.671 0.352 0.000 0.640 0.008
#> ERR866177 3 0.4990 0.671 0.352 0.000 0.640 0.008
#> ERR862985 3 0.5222 0.578 0.032 0.000 0.688 0.280
#> ERR866160 3 0.5222 0.578 0.032 0.000 0.688 0.280
#> ERR866178 3 0.5222 0.578 0.032 0.000 0.688 0.280
#> ERR862986 3 0.5222 0.578 0.032 0.000 0.688 0.280
#> ERR866161 3 0.5222 0.578 0.032 0.000 0.688 0.280
#> ERR866179 3 0.5222 0.578 0.032 0.000 0.688 0.280
#> ERR862987 2 0.0000 1.000 0.000 1.000 0.000 0.000
#> ERR866162 2 0.0000 1.000 0.000 1.000 0.000 0.000
#> ERR866180 2 0.0000 1.000 0.000 1.000 0.000 0.000
#> ERR862988 2 0.0000 1.000 0.000 1.000 0.000 0.000
#> ERR866163 2 0.0000 1.000 0.000 1.000 0.000 0.000
#> ERR866181 2 0.0000 1.000 0.000 1.000 0.000 0.000
#> ERR862989 1 0.1867 0.846 0.928 0.000 0.072 0.000
#> ERR866164 1 0.1022 0.888 0.968 0.000 0.032 0.000
#> ERR866182 1 0.1022 0.888 0.968 0.000 0.032 0.000
#> ERR862990 1 0.1022 0.888 0.968 0.000 0.032 0.000
#> ERR866165 1 0.0921 0.891 0.972 0.000 0.028 0.000
#> ERR866183 1 0.0921 0.891 0.972 0.000 0.028 0.000
#> ERR862991 2 0.0000 1.000 0.000 1.000 0.000 0.000
#> ERR866166 2 0.0000 1.000 0.000 1.000 0.000 0.000
#> ERR866184 2 0.0000 1.000 0.000 1.000 0.000 0.000
#> ERR862992 2 0.0000 1.000 0.000 1.000 0.000 0.000
#> ERR866167 2 0.0000 1.000 0.000 1.000 0.000 0.000
#> ERR866185 2 0.0000 1.000 0.000 1.000 0.000 0.000
show/hide code output
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> ERR862939 3 0.4506 0.746 0.052 0.000 0.764 0.168 0.016
#> ERR862957 3 0.4506 0.746 0.052 0.000 0.764 0.168 0.016
#> ERR878007 3 0.4506 0.746 0.052 0.000 0.764 0.168 0.016
#> ERR862940 3 0.4506 0.746 0.052 0.000 0.764 0.168 0.016
#> ERR862958 3 0.4506 0.746 0.052 0.000 0.764 0.168 0.016
#> ERR878008 3 0.4506 0.746 0.052 0.000 0.764 0.168 0.016
#> ERR862941 2 0.0162 0.997 0.000 0.996 0.000 0.004 0.000
#> ERR862959 2 0.0162 0.997 0.000 0.996 0.000 0.004 0.000
#> ERR878009 2 0.0162 0.996 0.000 0.996 0.000 0.004 0.000
#> ERR862942 2 0.0162 0.997 0.000 0.996 0.000 0.004 0.000
#> ERR862960 2 0.0162 0.997 0.000 0.996 0.000 0.004 0.000
#> ERR878010 2 0.0162 0.996 0.000 0.996 0.000 0.004 0.000
#> ERR862943 3 0.0162 0.877 0.000 0.000 0.996 0.004 0.000
#> ERR862961 3 0.0162 0.877 0.000 0.000 0.996 0.004 0.000
#> ERR878011 3 0.0162 0.877 0.000 0.000 0.996 0.004 0.000
#> ERR862944 3 0.0162 0.877 0.000 0.000 0.996 0.004 0.000
#> ERR862962 3 0.0162 0.877 0.000 0.000 0.996 0.004 0.000
#> ERR878012 3 0.0162 0.877 0.000 0.000 0.996 0.004 0.000
#> ERR862945 3 0.0162 0.876 0.000 0.000 0.996 0.000 0.004
#> ERR862963 3 0.0162 0.876 0.000 0.000 0.996 0.000 0.004
#> ERR878013 3 0.0162 0.876 0.000 0.000 0.996 0.000 0.004
#> ERR862946 3 0.0162 0.876 0.000 0.000 0.996 0.000 0.004
#> ERR862964 3 0.0162 0.876 0.000 0.000 0.996 0.000 0.004
#> ERR878014 3 0.0162 0.876 0.000 0.000 0.996 0.000 0.004
#> ERR862947 2 0.0162 0.997 0.000 0.996 0.000 0.004 0.000
#> ERR862965 2 0.0162 0.997 0.000 0.996 0.000 0.004 0.000
#> ERR878015 2 0.0162 0.997 0.000 0.996 0.000 0.004 0.000
#> ERR862948 2 0.0162 0.997 0.000 0.996 0.000 0.004 0.000
#> ERR862966 2 0.0162 0.997 0.000 0.996 0.000 0.004 0.000
#> ERR878016 2 0.0162 0.997 0.000 0.996 0.000 0.004 0.000
#> ERR862949 2 0.0162 0.997 0.000 0.996 0.000 0.004 0.000
#> ERR862967 2 0.0162 0.997 0.000 0.996 0.000 0.004 0.000
#> ERR878017 2 0.0162 0.997 0.000 0.996 0.000 0.004 0.000
#> ERR862950 2 0.0162 0.997 0.000 0.996 0.000 0.004 0.000
#> ERR862968 2 0.0162 0.997 0.000 0.996 0.000 0.004 0.000
#> ERR878018 2 0.0162 0.997 0.000 0.996 0.000 0.004 0.000
#> ERR862951 1 0.2228 0.733 0.912 0.000 0.012 0.008 0.068
#> ERR862969 1 0.2511 0.722 0.892 0.000 0.004 0.016 0.088
#> ERR878019 1 0.2464 0.721 0.892 0.000 0.004 0.012 0.092
#> ERR862952 1 0.3608 0.671 0.812 0.000 0.000 0.040 0.148
#> ERR862970 1 0.3870 0.694 0.808 0.000 0.024 0.020 0.148
#> ERR878020 1 0.2982 0.705 0.860 0.000 0.004 0.020 0.116
#> ERR862953 5 0.2234 0.821 0.036 0.032 0.000 0.012 0.920
#> ERR862971 5 0.2067 0.820 0.032 0.028 0.000 0.012 0.928
#> ERR878021 5 0.2067 0.820 0.032 0.028 0.000 0.012 0.928
#> ERR862954 5 0.2171 0.823 0.028 0.032 0.000 0.016 0.924
#> ERR862972 5 0.1485 0.830 0.020 0.032 0.000 0.000 0.948
#> ERR878022 5 0.2140 0.813 0.040 0.024 0.000 0.012 0.924
#> ERR862955 5 0.2929 0.917 0.000 0.180 0.000 0.000 0.820
#> ERR862973 5 0.2891 0.916 0.000 0.176 0.000 0.000 0.824
#> ERR878023 5 0.2929 0.917 0.000 0.180 0.000 0.000 0.820
#> ERR862956 5 0.2929 0.917 0.000 0.180 0.000 0.000 0.820
#> ERR862974 5 0.2929 0.917 0.000 0.180 0.000 0.000 0.820
#> ERR878024 5 0.2929 0.917 0.000 0.180 0.000 0.000 0.820
#> ERR862975 1 0.4998 0.801 0.680 0.000 0.264 0.044 0.012
#> ERR866150 1 0.4998 0.801 0.680 0.000 0.264 0.044 0.012
#> ERR866168 1 0.4974 0.803 0.684 0.000 0.260 0.044 0.012
#> ERR862976 1 0.4998 0.801 0.680 0.000 0.264 0.044 0.012
#> ERR866151 1 0.4998 0.801 0.680 0.000 0.264 0.044 0.012
#> ERR866169 1 0.4998 0.801 0.680 0.000 0.264 0.044 0.012
#> ERR862977 5 0.2929 0.917 0.000 0.180 0.000 0.000 0.820
#> ERR866152 5 0.2929 0.917 0.000 0.180 0.000 0.000 0.820
#> ERR866170 5 0.2929 0.917 0.000 0.180 0.000 0.000 0.820
#> ERR862978 5 0.2891 0.916 0.000 0.176 0.000 0.000 0.824
#> ERR866153 5 0.2929 0.917 0.000 0.180 0.000 0.000 0.820
#> ERR866171 5 0.2929 0.917 0.000 0.180 0.000 0.000 0.820
#> ERR862979 2 0.0000 0.997 0.000 1.000 0.000 0.000 0.000
#> ERR866154 2 0.0000 0.997 0.000 1.000 0.000 0.000 0.000
#> ERR866172 2 0.0000 0.997 0.000 1.000 0.000 0.000 0.000
#> ERR862980 2 0.0000 0.997 0.000 1.000 0.000 0.000 0.000
#> ERR866155 2 0.0000 0.997 0.000 1.000 0.000 0.000 0.000
#> ERR866173 2 0.0000 0.997 0.000 1.000 0.000 0.000 0.000
#> ERR862981 4 0.1197 0.995 0.000 0.000 0.048 0.952 0.000
#> ERR866156 4 0.1270 0.998 0.000 0.000 0.052 0.948 0.000
#> ERR866174 4 0.1270 0.998 0.000 0.000 0.052 0.948 0.000
#> ERR866157 4 0.1121 0.992 0.000 0.000 0.044 0.956 0.000
#> ERR866175 4 0.1270 0.998 0.000 0.000 0.052 0.948 0.000
#> ERR862983 3 0.3272 0.800 0.072 0.000 0.860 0.060 0.008
#> ERR866158 3 0.3392 0.793 0.080 0.000 0.852 0.060 0.008
#> ERR866176 3 0.3392 0.793 0.080 0.000 0.852 0.060 0.008
#> ERR862984 3 0.3392 0.793 0.080 0.000 0.852 0.060 0.008
#> ERR866159 3 0.3392 0.793 0.080 0.000 0.852 0.060 0.008
#> ERR866177 3 0.3392 0.793 0.080 0.000 0.852 0.060 0.008
#> ERR862985 4 0.1121 0.992 0.000 0.000 0.044 0.956 0.000
#> ERR866160 4 0.1270 0.998 0.000 0.000 0.052 0.948 0.000
#> ERR866178 4 0.1270 0.998 0.000 0.000 0.052 0.948 0.000
#> ERR862986 4 0.1270 0.998 0.000 0.000 0.052 0.948 0.000
#> ERR866161 4 0.1270 0.998 0.000 0.000 0.052 0.948 0.000
#> ERR866179 4 0.1270 0.998 0.000 0.000 0.052 0.948 0.000
#> ERR862987 2 0.0162 0.996 0.000 0.996 0.000 0.004 0.000
#> ERR866162 2 0.0162 0.996 0.000 0.996 0.000 0.004 0.000
#> ERR866180 2 0.0162 0.996 0.000 0.996 0.000 0.004 0.000
#> ERR862988 2 0.0290 0.996 0.000 0.992 0.000 0.008 0.000
#> ERR866163 2 0.0162 0.996 0.000 0.996 0.000 0.004 0.000
#> ERR866181 2 0.0162 0.996 0.000 0.996 0.000 0.004 0.000
#> ERR862989 1 0.4240 0.774 0.700 0.000 0.284 0.012 0.004
#> ERR866164 1 0.4064 0.823 0.756 0.000 0.216 0.024 0.004
#> ERR866182 1 0.4064 0.823 0.756 0.000 0.216 0.024 0.004
#> ERR862990 1 0.4064 0.823 0.756 0.000 0.216 0.024 0.004
#> ERR866165 1 0.4064 0.823 0.756 0.000 0.216 0.024 0.004
#> ERR866183 1 0.4064 0.823 0.756 0.000 0.216 0.024 0.004
#> ERR862991 2 0.0162 0.996 0.000 0.996 0.000 0.004 0.000
#> ERR866166 2 0.0162 0.996 0.000 0.996 0.000 0.004 0.000
#> ERR866184 2 0.0162 0.996 0.000 0.996 0.000 0.004 0.000
#> ERR862992 2 0.0162 0.996 0.000 0.996 0.000 0.004 0.000
#> ERR866167 2 0.0162 0.996 0.000 0.996 0.000 0.004 0.000
#> ERR866185 2 0.0162 0.996 0.000 0.996 0.000 0.004 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
#> ERR862939 3 0.5042 0.669 0.012 0.000 0.652 NA 0.080 0.004
#> ERR862957 3 0.5042 0.669 0.012 0.000 0.652 NA 0.080 0.004
#> ERR878007 3 0.5042 0.669 0.012 0.000 0.652 NA 0.080 0.004
#> ERR862940 3 0.5042 0.669 0.012 0.000 0.652 NA 0.080 0.004
#> ERR862958 3 0.5042 0.669 0.012 0.000 0.652 NA 0.080 0.004
#> ERR878008 3 0.5042 0.669 0.012 0.000 0.652 NA 0.080 0.004
#> ERR862941 2 0.0547 0.970 0.000 0.980 0.000 NA 0.000 0.000
#> ERR862959 2 0.0790 0.966 0.000 0.968 0.000 NA 0.000 0.000
#> ERR878009 2 0.0603 0.972 0.000 0.980 0.000 NA 0.000 0.004
#> ERR862942 2 0.0713 0.968 0.000 0.972 0.000 NA 0.000 0.000
#> ERR862960 2 0.0547 0.970 0.000 0.980 0.000 NA 0.000 0.000
#> ERR878010 2 0.0717 0.971 0.000 0.976 0.000 NA 0.000 0.008
#> ERR862943 3 0.0520 0.826 0.008 0.000 0.984 NA 0.008 0.000
#> ERR862961 3 0.0520 0.826 0.008 0.000 0.984 NA 0.008 0.000
#> ERR878011 3 0.0520 0.826 0.008 0.000 0.984 NA 0.008 0.000
#> ERR862944 3 0.0520 0.826 0.008 0.000 0.984 NA 0.008 0.000
#> ERR862962 3 0.0520 0.826 0.008 0.000 0.984 NA 0.008 0.000
#> ERR878012 3 0.0520 0.826 0.008 0.000 0.984 NA 0.008 0.000
#> ERR862945 3 0.1204 0.818 0.000 0.000 0.944 NA 0.000 0.000
#> ERR862963 3 0.1204 0.818 0.000 0.000 0.944 NA 0.000 0.000
#> ERR878013 3 0.1204 0.818 0.000 0.000 0.944 NA 0.000 0.000
#> ERR862946 3 0.1204 0.818 0.000 0.000 0.944 NA 0.000 0.000
#> ERR862964 3 0.1204 0.818 0.000 0.000 0.944 NA 0.000 0.000
#> ERR878014 3 0.1204 0.818 0.000 0.000 0.944 NA 0.000 0.000
#> ERR862947 2 0.0363 0.971 0.000 0.988 0.000 NA 0.000 0.000
#> ERR862965 2 0.0363 0.971 0.000 0.988 0.000 NA 0.000 0.000
#> ERR878015 2 0.0363 0.971 0.000 0.988 0.000 NA 0.000 0.000
#> ERR862948 2 0.0363 0.971 0.000 0.988 0.000 NA 0.000 0.000
#> ERR862966 2 0.0363 0.971 0.000 0.988 0.000 NA 0.000 0.000
#> ERR878016 2 0.0363 0.971 0.000 0.988 0.000 NA 0.000 0.000
#> ERR862949 2 0.1204 0.958 0.000 0.944 0.000 NA 0.000 0.000
#> ERR862967 2 0.1204 0.958 0.000 0.944 0.000 NA 0.000 0.000
#> ERR878017 2 0.1082 0.968 0.004 0.956 0.000 NA 0.000 0.000
#> ERR862950 2 0.1204 0.958 0.000 0.944 0.000 NA 0.000 0.000
#> ERR862968 2 0.1204 0.958 0.000 0.944 0.000 NA 0.000 0.000
#> ERR878018 2 0.1141 0.960 0.000 0.948 0.000 NA 0.000 0.000
#> ERR862951 1 0.3622 0.697 0.744 0.000 0.000 NA 0.004 0.016
#> ERR862969 1 0.4066 0.666 0.696 0.000 0.000 NA 0.004 0.028
#> ERR878019 1 0.3784 0.682 0.736 0.000 0.000 NA 0.004 0.024
#> ERR862952 1 0.5040 0.576 0.528 0.000 0.000 NA 0.008 0.056
#> ERR862970 1 0.5582 0.560 0.484 0.004 0.012 NA 0.016 0.048
#> ERR878020 1 0.4302 0.653 0.644 0.000 0.000 NA 0.004 0.028
#> ERR862953 6 0.3623 0.757 0.020 0.008 0.000 NA 0.000 0.764
#> ERR862971 6 0.3099 0.793 0.008 0.008 0.000 NA 0.000 0.808
#> ERR878021 6 0.3056 0.797 0.012 0.008 0.000 NA 0.000 0.820
#> ERR862954 6 0.3197 0.790 0.012 0.008 0.000 NA 0.000 0.804
#> ERR862972 6 0.2946 0.793 0.012 0.004 0.000 NA 0.000 0.824
#> ERR878022 6 0.2886 0.801 0.016 0.004 0.000 NA 0.000 0.836
#> ERR862955 6 0.2070 0.905 0.000 0.100 0.000 NA 0.000 0.892
#> ERR862973 6 0.1958 0.905 0.000 0.100 0.000 NA 0.000 0.896
#> ERR878023 6 0.1814 0.906 0.000 0.100 0.000 NA 0.000 0.900
#> ERR862956 6 0.1814 0.906 0.000 0.100 0.000 NA 0.000 0.900
#> ERR862974 6 0.1958 0.906 0.000 0.100 0.000 NA 0.000 0.896
#> ERR878024 6 0.1814 0.906 0.000 0.100 0.000 NA 0.000 0.900
#> ERR862975 1 0.4759 0.779 0.720 0.000 0.148 NA 0.016 0.004
#> ERR866150 1 0.4759 0.779 0.720 0.000 0.148 NA 0.016 0.004
#> ERR866168 1 0.4759 0.779 0.720 0.000 0.148 NA 0.016 0.004
#> ERR862976 1 0.4759 0.779 0.720 0.000 0.148 NA 0.016 0.004
#> ERR866151 1 0.4759 0.779 0.720 0.000 0.148 NA 0.016 0.004
#> ERR866169 1 0.4723 0.780 0.724 0.000 0.144 NA 0.016 0.004
#> ERR862977 6 0.2350 0.905 0.000 0.100 0.000 NA 0.000 0.880
#> ERR866152 6 0.2350 0.905 0.000 0.100 0.000 NA 0.000 0.880
#> ERR866170 6 0.2350 0.905 0.000 0.100 0.000 NA 0.000 0.880
#> ERR862978 6 0.2350 0.905 0.000 0.100 0.000 NA 0.000 0.880
#> ERR866153 6 0.2350 0.905 0.000 0.100 0.000 NA 0.000 0.880
#> ERR866171 6 0.2350 0.905 0.000 0.100 0.000 NA 0.000 0.880
#> ERR862979 2 0.1296 0.969 0.004 0.948 0.000 NA 0.000 0.004
#> ERR866154 2 0.1536 0.966 0.004 0.940 0.000 NA 0.000 0.016
#> ERR866172 2 0.1226 0.969 0.004 0.952 0.000 NA 0.000 0.004
#> ERR862980 2 0.1296 0.968 0.004 0.952 0.000 NA 0.000 0.012
#> ERR866155 2 0.1464 0.966 0.004 0.944 0.000 NA 0.000 0.016
#> ERR866173 2 0.1340 0.966 0.004 0.948 0.000 NA 0.000 0.008
#> ERR862981 5 0.0000 0.999 0.000 0.000 0.000 NA 1.000 0.000
#> ERR866156 5 0.0000 0.999 0.000 0.000 0.000 NA 1.000 0.000
#> ERR866174 5 0.0000 0.999 0.000 0.000 0.000 NA 1.000 0.000
#> ERR866157 5 0.0000 0.999 0.000 0.000 0.000 NA 1.000 0.000
#> ERR866175 5 0.0146 0.996 0.000 0.000 0.000 NA 0.996 0.000
#> ERR862983 3 0.4045 0.729 0.104 0.000 0.792 NA 0.040 0.000
#> ERR866158 3 0.4090 0.725 0.108 0.000 0.788 NA 0.040 0.000
#> ERR866176 3 0.4090 0.725 0.108 0.000 0.788 NA 0.040 0.000
#> ERR862984 3 0.4090 0.725 0.108 0.000 0.788 NA 0.040 0.000
#> ERR866159 3 0.4090 0.725 0.108 0.000 0.788 NA 0.040 0.000
#> ERR866177 3 0.4090 0.725 0.108 0.000 0.788 NA 0.040 0.000
#> ERR862985 5 0.0146 0.996 0.000 0.000 0.000 NA 0.996 0.000
#> ERR866160 5 0.0000 0.999 0.000 0.000 0.000 NA 1.000 0.000
#> ERR866178 5 0.0000 0.999 0.000 0.000 0.000 NA 1.000 0.000
#> ERR862986 5 0.0000 0.999 0.000 0.000 0.000 NA 1.000 0.000
#> ERR866161 5 0.0000 0.999 0.000 0.000 0.000 NA 1.000 0.000
#> ERR866179 5 0.0000 0.999 0.000 0.000 0.000 NA 1.000 0.000
#> ERR862987 2 0.0806 0.969 0.000 0.972 0.000 NA 0.000 0.020
#> ERR866162 2 0.1003 0.968 0.000 0.964 0.000 NA 0.000 0.020
#> ERR866180 2 0.1003 0.968 0.000 0.964 0.000 NA 0.000 0.020
#> ERR862988 2 0.0806 0.971 0.000 0.972 0.000 NA 0.000 0.008
#> ERR866163 2 0.0909 0.968 0.000 0.968 0.000 NA 0.000 0.020
#> ERR866181 2 0.0806 0.969 0.000 0.972 0.000 NA 0.000 0.020
#> ERR862989 1 0.3454 0.722 0.768 0.000 0.208 NA 0.000 0.000
#> ERR866164 1 0.2346 0.793 0.868 0.000 0.124 NA 0.000 0.000
#> ERR866182 1 0.2346 0.793 0.868 0.000 0.124 NA 0.000 0.000
#> ERR862990 1 0.2346 0.793 0.868 0.000 0.124 NA 0.000 0.000
#> ERR866165 1 0.2346 0.793 0.868 0.000 0.124 NA 0.000 0.000
#> ERR866183 1 0.2346 0.793 0.868 0.000 0.124 NA 0.000 0.000
#> ERR862991 2 0.1321 0.965 0.004 0.952 0.000 NA 0.000 0.024
#> ERR866166 2 0.1321 0.965 0.004 0.952 0.000 NA 0.000 0.024
#> ERR866184 2 0.1321 0.965 0.004 0.952 0.000 NA 0.000 0.024
#> ERR862992 2 0.1321 0.965 0.004 0.952 0.000 NA 0.000 0.024
#> ERR866167 2 0.1321 0.965 0.004 0.952 0.000 NA 0.000 0.024
#> ERR866185 2 0.1321 0.965 0.004 0.952 0.000 NA 0.000 0.024
Heatmaps for the consensus matrix. It visualizes the probability of two
samples to be in a same group.
consensus_heatmap(res, k = 2)

consensus_heatmap(res, k = 3)

consensus_heatmap(res, k = 4)

consensus_heatmap(res, k = 5)

consensus_heatmap(res, k = 6)

Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)

membership_heatmap(res, k = 3)

membership_heatmap(res, k = 4)

membership_heatmap(res, k = 5)

membership_heatmap(res, k = 6)

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)

get_signatures(res, k = 3)

get_signatures(res, k = 4)

get_signatures(res, k = 5)

get_signatures(res, k = 6)

Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)

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

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

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

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

Compare the overlap of signatures from different k:
compare_signatures(res)

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.
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:
which_row
: row indices corresponding to the input matrix.
fdr
: FDR for the differential test.
mean_x
: The mean value in group x.
scaled_mean_x
: The mean value in group x after rows are scaled.
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")

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

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

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

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

Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)

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"]
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 15818 rows and 107 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'MAD' method.
#> Subgroups are detected by 'pam' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 3.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)

The plots are:
- The first row: a plot of the ECDF (empirical cumulative distribution
function) curves of the consensus matrix for each
k
and the heatmap of
predicted classes for each k
.
- The second row: heatmaps of the consensus matrix for each
k
.
- The third row: heatmaps of the membership matrix for each
k
.
- The fouth row: heatmaps of the signatures for each
k
.
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:
- ECDF curves of the consensus matrix for each
k
;
- 1-PAC. The PAC
score
measures the proportion of the ambiguous subgrouping.
- Mean silhouette score.
- Concordance. The mean probability of fiting the consensus class ids in all
partitions.
- Area increased. Denote \(A_k\) as the area under the ECDF curve for current
k
, the area increased is defined as \(A_k - A_{k-1}\).
- Rand index. The percent of pairs of samples that are both in a same cluster
or both are not in a same cluster in the partition of k and k-1.
- Jaccard index. The ratio of pairs of samples are both in a same cluster in
the partition of k and k-1 and the pairs of samples are both in a same
cluster in the partition k or k-1.
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)

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.526 0.667 0.867 0.4337 0.577 0.577
#> 3 3 0.694 0.900 0.922 0.4471 0.664 0.467
#> 4 4 0.776 0.899 0.951 0.0540 0.981 0.946
#> 5 5 0.788 0.902 0.946 0.0552 0.968 0.904
#> 6 6 0.820 0.937 0.942 0.0387 0.987 0.958
suggest_best_k()
suggests the best \(k\) based on these statistics. The rules are as follows:
- All \(k\) with Jaccard index larger than 0.95 are removed because increasing
\(k\) does not provide enough extra information. If all \(k\) are removed, it is
marked as no subgroup is detected.
- For all \(k\) with 1-PAC score larger than 0.9, the maximal \(k\) is taken as
the best \(k\), and other \(k\) are marked as optional \(k\).
- If it does not fit the second rule. The \(k\) with the maximal vote of the
highest 1-PAC score, highest mean silhouette, and highest concordance is
taken as the best \(k\).
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
#> ERR862939 1 0.000 0.8682 1.000 0.000
#> ERR862957 1 0.000 0.8682 1.000 0.000
#> ERR878007 1 0.000 0.8682 1.000 0.000
#> ERR862940 1 0.000 0.8682 1.000 0.000
#> ERR862958 1 0.000 0.8682 1.000 0.000
#> ERR878008 1 0.000 0.8682 1.000 0.000
#> ERR862941 2 0.000 0.8052 0.000 1.000
#> ERR862959 2 0.000 0.8052 0.000 1.000
#> ERR878009 2 0.000 0.8052 0.000 1.000
#> ERR862942 2 0.000 0.8052 0.000 1.000
#> ERR862960 2 0.000 0.8052 0.000 1.000
#> ERR878010 2 0.000 0.8052 0.000 1.000
#> ERR862943 1 0.000 0.8682 1.000 0.000
#> ERR862961 1 0.000 0.8682 1.000 0.000
#> ERR878011 1 0.000 0.8682 1.000 0.000
#> ERR862944 1 0.000 0.8682 1.000 0.000
#> ERR862962 1 0.000 0.8682 1.000 0.000
#> ERR878012 1 0.000 0.8682 1.000 0.000
#> ERR862945 1 0.000 0.8682 1.000 0.000
#> ERR862963 1 0.000 0.8682 1.000 0.000
#> ERR878013 1 0.000 0.8682 1.000 0.000
#> ERR862946 1 0.000 0.8682 1.000 0.000
#> ERR862964 1 0.000 0.8682 1.000 0.000
#> ERR878014 1 0.000 0.8682 1.000 0.000
#> ERR862947 2 0.000 0.8052 0.000 1.000
#> ERR862965 2 0.000 0.8052 0.000 1.000
#> ERR878015 2 0.000 0.8052 0.000 1.000
#> ERR862948 2 0.000 0.8052 0.000 1.000
#> ERR862966 2 0.000 0.8052 0.000 1.000
#> ERR878016 2 0.000 0.8052 0.000 1.000
#> ERR862949 2 0.000 0.8052 0.000 1.000
#> ERR862967 2 0.000 0.8052 0.000 1.000
#> ERR878017 2 0.000 0.8052 0.000 1.000
#> ERR862950 2 0.000 0.8052 0.000 1.000
#> ERR862968 2 0.000 0.8052 0.000 1.000
#> ERR878018 2 0.000 0.8052 0.000 1.000
#> ERR862951 2 0.995 0.2911 0.460 0.540
#> ERR862969 2 0.995 0.2911 0.460 0.540
#> ERR878019 2 0.995 0.2911 0.460 0.540
#> ERR862952 2 0.995 0.2911 0.460 0.540
#> ERR862970 2 0.995 0.2911 0.460 0.540
#> ERR878020 2 0.995 0.2911 0.460 0.540
#> ERR862953 2 0.936 0.4699 0.352 0.648
#> ERR862971 2 0.671 0.6810 0.176 0.824
#> ERR878021 2 0.966 0.4110 0.392 0.608
#> ERR862954 2 0.781 0.6269 0.232 0.768
#> ERR862972 2 0.738 0.6515 0.208 0.792
#> ERR878022 2 0.788 0.6226 0.236 0.764
#> ERR862955 2 0.000 0.8052 0.000 1.000
#> ERR862973 2 0.000 0.8052 0.000 1.000
#> ERR878023 2 0.000 0.8052 0.000 1.000
#> ERR862956 2 0.000 0.8052 0.000 1.000
#> ERR862974 2 0.000 0.8052 0.000 1.000
#> ERR878024 2 0.000 0.8052 0.000 1.000
#> ERR862975 1 0.936 0.3737 0.648 0.352
#> ERR866150 1 0.936 0.3737 0.648 0.352
#> ERR866168 1 0.936 0.3737 0.648 0.352
#> ERR862976 1 0.936 0.3737 0.648 0.352
#> ERR866151 1 0.936 0.3737 0.648 0.352
#> ERR866169 1 0.936 0.3737 0.648 0.352
#> ERR862977 2 0.000 0.8052 0.000 1.000
#> ERR866152 2 0.000 0.8052 0.000 1.000
#> ERR866170 2 0.000 0.8052 0.000 1.000
#> ERR862978 2 0.000 0.8052 0.000 1.000
#> ERR866153 2 0.000 0.8052 0.000 1.000
#> ERR866171 2 0.000 0.8052 0.000 1.000
#> ERR862979 2 0.000 0.8052 0.000 1.000
#> ERR866154 2 0.000 0.8052 0.000 1.000
#> ERR866172 2 0.000 0.8052 0.000 1.000
#> ERR862980 2 0.000 0.8052 0.000 1.000
#> ERR866155 2 0.000 0.8052 0.000 1.000
#> ERR866173 2 0.000 0.8052 0.000 1.000
#> ERR862981 2 0.995 0.2911 0.460 0.540
#> ERR866156 2 0.995 0.2911 0.460 0.540
#> ERR866174 2 0.995 0.2911 0.460 0.540
#> ERR866157 2 0.995 0.2911 0.460 0.540
#> ERR866175 2 0.995 0.2911 0.460 0.540
#> ERR862983 1 0.000 0.8682 1.000 0.000
#> ERR866158 1 0.000 0.8682 1.000 0.000
#> ERR866176 1 0.000 0.8682 1.000 0.000
#> ERR862984 1 0.000 0.8682 1.000 0.000
#> ERR866159 1 0.000 0.8682 1.000 0.000
#> ERR866177 1 0.000 0.8682 1.000 0.000
#> ERR862985 2 0.995 0.2911 0.460 0.540
#> ERR866160 2 0.995 0.2911 0.460 0.540
#> ERR866178 2 0.995 0.2911 0.460 0.540
#> ERR862986 2 0.995 0.2911 0.460 0.540
#> ERR866161 2 0.995 0.2911 0.460 0.540
#> ERR866179 2 0.995 0.2911 0.460 0.540
#> ERR862987 2 0.000 0.8052 0.000 1.000
#> ERR866162 2 0.000 0.8052 0.000 1.000
#> ERR866180 2 0.000 0.8052 0.000 1.000
#> ERR862988 2 0.000 0.8052 0.000 1.000
#> ERR866163 2 0.000 0.8052 0.000 1.000
#> ERR866181 2 0.000 0.8052 0.000 1.000
#> ERR862989 1 0.993 0.0104 0.548 0.452
#> ERR866164 1 0.988 0.0803 0.564 0.436
#> ERR866182 2 0.996 0.2789 0.464 0.536
#> ERR862990 2 0.995 0.2911 0.460 0.540
#> ERR866165 2 0.995 0.2911 0.460 0.540
#> ERR866183 2 0.998 0.2400 0.476 0.524
#> ERR862991 2 0.000 0.8052 0.000 1.000
#> ERR866166 2 0.000 0.8052 0.000 1.000
#> ERR866184 2 0.000 0.8052 0.000 1.000
#> ERR862992 2 0.000 0.8052 0.000 1.000
#> ERR866167 2 0.000 0.8052 0.000 1.000
#> ERR866185 2 0.000 0.8052 0.000 1.000
show/hide code output
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> ERR862939 3 0.514 0.919 0.252 0.000 0.748
#> ERR862957 3 0.514 0.919 0.252 0.000 0.748
#> ERR878007 3 0.514 0.919 0.252 0.000 0.748
#> ERR862940 3 0.514 0.919 0.252 0.000 0.748
#> ERR862958 3 0.514 0.919 0.252 0.000 0.748
#> ERR878008 3 0.514 0.919 0.252 0.000 0.748
#> ERR862941 2 0.000 1.000 0.000 1.000 0.000
#> ERR862959 2 0.000 1.000 0.000 1.000 0.000
#> ERR878009 2 0.000 1.000 0.000 1.000 0.000
#> ERR862942 2 0.000 1.000 0.000 1.000 0.000
#> ERR862960 2 0.000 1.000 0.000 1.000 0.000
#> ERR878010 2 0.000 1.000 0.000 1.000 0.000
#> ERR862943 3 0.502 0.925 0.240 0.000 0.760
#> ERR862961 3 0.502 0.925 0.240 0.000 0.760
#> ERR878011 3 0.502 0.925 0.240 0.000 0.760
#> ERR862944 3 0.502 0.925 0.240 0.000 0.760
#> ERR862962 3 0.502 0.925 0.240 0.000 0.760
#> ERR878012 3 0.502 0.925 0.240 0.000 0.760
#> ERR862945 3 0.000 0.803 0.000 0.000 1.000
#> ERR862963 3 0.000 0.803 0.000 0.000 1.000
#> ERR878013 3 0.000 0.803 0.000 0.000 1.000
#> ERR862946 3 0.000 0.803 0.000 0.000 1.000
#> ERR862964 3 0.000 0.803 0.000 0.000 1.000
#> ERR878014 3 0.000 0.803 0.000 0.000 1.000
#> ERR862947 2 0.000 1.000 0.000 1.000 0.000
#> ERR862965 2 0.000 1.000 0.000 1.000 0.000
#> ERR878015 2 0.000 1.000 0.000 1.000 0.000
#> ERR862948 2 0.000 1.000 0.000 1.000 0.000
#> ERR862966 2 0.000 1.000 0.000 1.000 0.000
#> ERR878016 2 0.000 1.000 0.000 1.000 0.000
#> ERR862949 2 0.000 1.000 0.000 1.000 0.000
#> ERR862967 2 0.000 1.000 0.000 1.000 0.000
#> ERR878017 2 0.000 1.000 0.000 1.000 0.000
#> ERR862950 2 0.000 1.000 0.000 1.000 0.000
#> ERR862968 2 0.000 1.000 0.000 1.000 0.000
#> ERR878018 2 0.000 1.000 0.000 1.000 0.000
#> ERR862951 1 0.000 0.871 1.000 0.000 0.000
#> ERR862969 1 0.000 0.871 1.000 0.000 0.000
#> ERR878019 1 0.000 0.871 1.000 0.000 0.000
#> ERR862952 1 0.000 0.871 1.000 0.000 0.000
#> ERR862970 1 0.000 0.871 1.000 0.000 0.000
#> ERR878020 1 0.000 0.871 1.000 0.000 0.000
#> ERR862953 1 0.116 0.860 0.972 0.028 0.000
#> ERR862971 1 0.455 0.781 0.800 0.200 0.000
#> ERR878021 1 0.236 0.842 0.928 0.072 0.000
#> ERR862954 1 0.355 0.814 0.868 0.132 0.000
#> ERR862972 1 0.465 0.777 0.792 0.208 0.000
#> ERR878022 1 0.455 0.781 0.800 0.200 0.000
#> ERR862955 1 0.514 0.746 0.748 0.252 0.000
#> ERR862973 1 0.514 0.746 0.748 0.252 0.000
#> ERR878023 1 0.514 0.746 0.748 0.252 0.000
#> ERR862956 1 0.514 0.746 0.748 0.252 0.000
#> ERR862974 1 0.514 0.746 0.748 0.252 0.000
#> ERR878024 1 0.514 0.746 0.748 0.252 0.000
#> ERR862975 1 0.000 0.871 1.000 0.000 0.000
#> ERR866150 1 0.000 0.871 1.000 0.000 0.000
#> ERR866168 1 0.000 0.871 1.000 0.000 0.000
#> ERR862976 1 0.000 0.871 1.000 0.000 0.000
#> ERR866151 1 0.000 0.871 1.000 0.000 0.000
#> ERR866169 1 0.000 0.871 1.000 0.000 0.000
#> ERR862977 1 0.514 0.746 0.748 0.252 0.000
#> ERR866152 1 0.514 0.746 0.748 0.252 0.000
#> ERR866170 1 0.514 0.746 0.748 0.252 0.000
#> ERR862978 1 0.606 0.525 0.616 0.384 0.000
#> ERR866153 1 0.514 0.746 0.748 0.252 0.000
#> ERR866171 1 0.514 0.746 0.748 0.252 0.000
#> ERR862979 2 0.000 1.000 0.000 1.000 0.000
#> ERR866154 2 0.000 1.000 0.000 1.000 0.000
#> ERR866172 2 0.000 1.000 0.000 1.000 0.000
#> ERR862980 2 0.000 1.000 0.000 1.000 0.000
#> ERR866155 2 0.000 1.000 0.000 1.000 0.000
#> ERR866173 2 0.000 1.000 0.000 1.000 0.000
#> ERR862981 1 0.000 0.871 1.000 0.000 0.000
#> ERR866156 1 0.000 0.871 1.000 0.000 0.000
#> ERR866174 1 0.000 0.871 1.000 0.000 0.000
#> ERR866157 1 0.000 0.871 1.000 0.000 0.000
#> ERR866175 1 0.000 0.871 1.000 0.000 0.000
#> ERR862983 3 0.502 0.925 0.240 0.000 0.760
#> ERR866158 3 0.502 0.925 0.240 0.000 0.760
#> ERR866176 3 0.502 0.925 0.240 0.000 0.760
#> ERR862984 3 0.502 0.925 0.240 0.000 0.760
#> ERR866159 3 0.502 0.925 0.240 0.000 0.760
#> ERR866177 3 0.502 0.925 0.240 0.000 0.760
#> ERR862985 1 0.000 0.871 1.000 0.000 0.000
#> ERR866160 1 0.000 0.871 1.000 0.000 0.000
#> ERR866178 1 0.000 0.871 1.000 0.000 0.000
#> ERR862986 1 0.000 0.871 1.000 0.000 0.000
#> ERR866161 1 0.000 0.871 1.000 0.000 0.000
#> ERR866179 1 0.000 0.871 1.000 0.000 0.000
#> ERR862987 2 0.000 1.000 0.000 1.000 0.000
#> ERR866162 2 0.000 1.000 0.000 1.000 0.000
#> ERR866180 2 0.000 1.000 0.000 1.000 0.000
#> ERR862988 2 0.000 1.000 0.000 1.000 0.000
#> ERR866163 2 0.000 1.000 0.000 1.000 0.000
#> ERR866181 2 0.000 1.000 0.000 1.000 0.000
#> ERR862989 1 0.000 0.871 1.000 0.000 0.000
#> ERR866164 1 0.000 0.871 1.000 0.000 0.000
#> ERR866182 1 0.000 0.871 1.000 0.000 0.000
#> ERR862990 1 0.000 0.871 1.000 0.000 0.000
#> ERR866165 1 0.000 0.871 1.000 0.000 0.000
#> ERR866183 1 0.000 0.871 1.000 0.000 0.000
#> ERR862991 2 0.000 1.000 0.000 1.000 0.000
#> ERR866166 2 0.000 1.000 0.000 1.000 0.000
#> ERR866184 2 0.000 1.000 0.000 1.000 0.000
#> ERR862992 2 0.000 1.000 0.000 1.000 0.000
#> ERR866167 2 0.000 1.000 0.000 1.000 0.000
#> ERR866185 2 0.000 1.000 0.000 1.000 0.000
show/hide code output
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> ERR862939 3 0.407 0.725 0.252 0.000 0.748 0
#> ERR862957 3 0.407 0.725 0.252 0.000 0.748 0
#> ERR878007 3 0.407 0.725 0.252 0.000 0.748 0
#> ERR862940 3 0.407 0.725 0.252 0.000 0.748 0
#> ERR862958 3 0.407 0.725 0.252 0.000 0.748 0
#> ERR878008 3 0.407 0.725 0.252 0.000 0.748 0
#> ERR862941 2 0.000 1.000 0.000 1.000 0.000 0
#> ERR862959 2 0.000 1.000 0.000 1.000 0.000 0
#> ERR878009 2 0.000 1.000 0.000 1.000 0.000 0
#> ERR862942 2 0.000 1.000 0.000 1.000 0.000 0
#> ERR862960 2 0.000 1.000 0.000 1.000 0.000 0
#> ERR878010 2 0.000 1.000 0.000 1.000 0.000 0
#> ERR862943 3 0.000 0.865 0.000 0.000 1.000 0
#> ERR862961 3 0.000 0.865 0.000 0.000 1.000 0
#> ERR878011 3 0.000 0.865 0.000 0.000 1.000 0
#> ERR862944 3 0.000 0.865 0.000 0.000 1.000 0
#> ERR862962 3 0.000 0.865 0.000 0.000 1.000 0
#> ERR878012 3 0.000 0.865 0.000 0.000 1.000 0
#> ERR862945 4 0.000 1.000 0.000 0.000 0.000 1
#> ERR862963 4 0.000 1.000 0.000 0.000 0.000 1
#> ERR878013 4 0.000 1.000 0.000 0.000 0.000 1
#> ERR862946 4 0.000 1.000 0.000 0.000 0.000 1
#> ERR862964 4 0.000 1.000 0.000 0.000 0.000 1
#> ERR878014 4 0.000 1.000 0.000 0.000 0.000 1
#> ERR862947 2 0.000 1.000 0.000 1.000 0.000 0
#> ERR862965 2 0.000 1.000 0.000 1.000 0.000 0
#> ERR878015 2 0.000 1.000 0.000 1.000 0.000 0
#> ERR862948 2 0.000 1.000 0.000 1.000 0.000 0
#> ERR862966 2 0.000 1.000 0.000 1.000 0.000 0
#> ERR878016 2 0.000 1.000 0.000 1.000 0.000 0
#> ERR862949 2 0.000 1.000 0.000 1.000 0.000 0
#> ERR862967 2 0.000 1.000 0.000 1.000 0.000 0
#> ERR878017 2 0.000 1.000 0.000 1.000 0.000 0
#> ERR862950 2 0.000 1.000 0.000 1.000 0.000 0
#> ERR862968 2 0.000 1.000 0.000 1.000 0.000 0
#> ERR878018 2 0.000 1.000 0.000 1.000 0.000 0
#> ERR862951 1 0.000 0.890 1.000 0.000 0.000 0
#> ERR862969 1 0.000 0.890 1.000 0.000 0.000 0
#> ERR878019 1 0.000 0.890 1.000 0.000 0.000 0
#> ERR862952 1 0.000 0.890 1.000 0.000 0.000 0
#> ERR862970 1 0.000 0.890 1.000 0.000 0.000 0
#> ERR878020 1 0.000 0.890 1.000 0.000 0.000 0
#> ERR862953 1 0.000 0.890 1.000 0.000 0.000 0
#> ERR862971 1 0.327 0.802 0.832 0.168 0.000 0
#> ERR878021 1 0.215 0.850 0.912 0.088 0.000 0
#> ERR862954 1 0.201 0.854 0.920 0.080 0.000 0
#> ERR862972 1 0.302 0.815 0.852 0.148 0.000 0
#> ERR878022 1 0.287 0.823 0.864 0.136 0.000 0
#> ERR862955 1 0.407 0.739 0.748 0.252 0.000 0
#> ERR862973 1 0.407 0.739 0.748 0.252 0.000 0
#> ERR878023 1 0.407 0.739 0.748 0.252 0.000 0
#> ERR862956 1 0.407 0.739 0.748 0.252 0.000 0
#> ERR862974 1 0.407 0.739 0.748 0.252 0.000 0
#> ERR878024 1 0.407 0.739 0.748 0.252 0.000 0
#> ERR862975 1 0.000 0.890 1.000 0.000 0.000 0
#> ERR866150 1 0.000 0.890 1.000 0.000 0.000 0
#> ERR866168 1 0.000 0.890 1.000 0.000 0.000 0
#> ERR862976 1 0.000 0.890 1.000 0.000 0.000 0
#> ERR866151 1 0.000 0.890 1.000 0.000 0.000 0
#> ERR866169 1 0.000 0.890 1.000 0.000 0.000 0
#> ERR862977 1 0.407 0.739 0.748 0.252 0.000 0
#> ERR866152 1 0.407 0.739 0.748 0.252 0.000 0
#> ERR866170 1 0.407 0.739 0.748 0.252 0.000 0
#> ERR862978 1 0.480 0.529 0.616 0.384 0.000 0
#> ERR866153 1 0.407 0.739 0.748 0.252 0.000 0
#> ERR866171 1 0.407 0.739 0.748 0.252 0.000 0
#> ERR862979 2 0.000 1.000 0.000 1.000 0.000 0
#> ERR866154 2 0.000 1.000 0.000 1.000 0.000 0
#> ERR866172 2 0.000 1.000 0.000 1.000 0.000 0
#> ERR862980 2 0.000 1.000 0.000 1.000 0.000 0
#> ERR866155 2 0.000 1.000 0.000 1.000 0.000 0
#> ERR866173 2 0.000 1.000 0.000 1.000 0.000 0
#> ERR862981 1 0.000 0.890 1.000 0.000 0.000 0
#> ERR866156 1 0.000 0.890 1.000 0.000 0.000 0
#> ERR866174 1 0.000 0.890 1.000 0.000 0.000 0
#> ERR866157 1 0.000 0.890 1.000 0.000 0.000 0
#> ERR866175 1 0.000 0.890 1.000 0.000 0.000 0
#> ERR862983 3 0.000 0.865 0.000 0.000 1.000 0
#> ERR866158 3 0.000 0.865 0.000 0.000 1.000 0
#> ERR866176 3 0.000 0.865 0.000 0.000 1.000 0
#> ERR862984 3 0.000 0.865 0.000 0.000 1.000 0
#> ERR866159 3 0.000 0.865 0.000 0.000 1.000 0
#> ERR866177 3 0.000 0.865 0.000 0.000 1.000 0
#> ERR862985 1 0.000 0.890 1.000 0.000 0.000 0
#> ERR866160 1 0.000 0.890 1.000 0.000 0.000 0
#> ERR866178 1 0.000 0.890 1.000 0.000 0.000 0
#> ERR862986 1 0.000 0.890 1.000 0.000 0.000 0
#> ERR866161 1 0.000 0.890 1.000 0.000 0.000 0
#> ERR866179 1 0.000 0.890 1.000 0.000 0.000 0
#> ERR862987 2 0.000 1.000 0.000 1.000 0.000 0
#> ERR866162 2 0.000 1.000 0.000 1.000 0.000 0
#> ERR866180 2 0.000 1.000 0.000 1.000 0.000 0
#> ERR862988 2 0.000 1.000 0.000 1.000 0.000 0
#> ERR866163 2 0.000 1.000 0.000 1.000 0.000 0
#> ERR866181 2 0.000 1.000 0.000 1.000 0.000 0
#> ERR862989 1 0.000 0.890 1.000 0.000 0.000 0
#> ERR866164 1 0.000 0.890 1.000 0.000 0.000 0
#> ERR866182 1 0.000 0.890 1.000 0.000 0.000 0
#> ERR862990 1 0.000 0.890 1.000 0.000 0.000 0
#> ERR866165 1 0.000 0.890 1.000 0.000 0.000 0
#> ERR866183 1 0.000 0.890 1.000 0.000 0.000 0
#> ERR862991 2 0.000 1.000 0.000 1.000 0.000 0
#> ERR866166 2 0.000 1.000 0.000 1.000 0.000 0
#> ERR866184 2 0.000 1.000 0.000 1.000 0.000 0
#> ERR862992 2 0.000 1.000 0.000 1.000 0.000 0
#> ERR866167 2 0.000 1.000 0.000 1.000 0.000 0
#> ERR866185 2 0.000 1.000 0.000 1.000 0.000 0
show/hide code output
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> ERR862939 3 0.4086 0.721 0.240 0.000 0.736 0 0.024
#> ERR862957 3 0.4086 0.721 0.240 0.000 0.736 0 0.024
#> ERR878007 3 0.4086 0.721 0.240 0.000 0.736 0 0.024
#> ERR862940 3 0.4086 0.721 0.240 0.000 0.736 0 0.024
#> ERR862958 3 0.4086 0.721 0.240 0.000 0.736 0 0.024
#> ERR878008 3 0.4086 0.721 0.240 0.000 0.736 0 0.024
#> ERR862941 2 0.0000 1.000 0.000 1.000 0.000 0 0.000
#> ERR862959 2 0.0000 1.000 0.000 1.000 0.000 0 0.000
#> ERR878009 2 0.0000 1.000 0.000 1.000 0.000 0 0.000
#> ERR862942 2 0.0000 1.000 0.000 1.000 0.000 0 0.000
#> ERR862960 2 0.0000 1.000 0.000 1.000 0.000 0 0.000
#> ERR878010 2 0.0000 1.000 0.000 1.000 0.000 0 0.000
#> ERR862943 3 0.0000 0.863 0.000 0.000 1.000 0 0.000
#> ERR862961 3 0.0000 0.863 0.000 0.000 1.000 0 0.000
#> ERR878011 3 0.0000 0.863 0.000 0.000 1.000 0 0.000
#> ERR862944 3 0.0000 0.863 0.000 0.000 1.000 0 0.000
#> ERR862962 3 0.0000 0.863 0.000 0.000 1.000 0 0.000
#> ERR878012 3 0.0000 0.863 0.000 0.000 1.000 0 0.000
#> ERR862945 4 0.0000 1.000 0.000 0.000 0.000 1 0.000
#> ERR862963 4 0.0000 1.000 0.000 0.000 0.000 1 0.000
#> ERR878013 4 0.0000 1.000 0.000 0.000 0.000 1 0.000
#> ERR862946 4 0.0000 1.000 0.000 0.000 0.000 1 0.000
#> ERR862964 4 0.0000 1.000 0.000 0.000 0.000 1 0.000
#> ERR878014 4 0.0000 1.000 0.000 0.000 0.000 1 0.000
#> ERR862947 5 0.0703 1.000 0.000 0.024 0.000 0 0.976
#> ERR862965 5 0.0703 1.000 0.000 0.024 0.000 0 0.976
#> ERR878015 5 0.0703 1.000 0.000 0.024 0.000 0 0.976
#> ERR862948 5 0.0703 1.000 0.000 0.024 0.000 0 0.976
#> ERR862966 5 0.0703 1.000 0.000 0.024 0.000 0 0.976
#> ERR878016 5 0.0703 1.000 0.000 0.024 0.000 0 0.976
#> ERR862949 2 0.0000 1.000 0.000 1.000 0.000 0 0.000
#> ERR862967 2 0.0000 1.000 0.000 1.000 0.000 0 0.000
#> ERR878017 2 0.0000 1.000 0.000 1.000 0.000 0 0.000
#> ERR862950 2 0.0000 1.000 0.000 1.000 0.000 0 0.000
#> ERR862968 2 0.0000 1.000 0.000 1.000 0.000 0 0.000
#> ERR878018 2 0.0000 1.000 0.000 1.000 0.000 0 0.000
#> ERR862951 1 0.0000 0.894 1.000 0.000 0.000 0 0.000
#> ERR862969 1 0.0000 0.894 1.000 0.000 0.000 0 0.000
#> ERR878019 1 0.0000 0.894 1.000 0.000 0.000 0 0.000
#> ERR862952 1 0.0000 0.894 1.000 0.000 0.000 0 0.000
#> ERR862970 1 0.0000 0.894 1.000 0.000 0.000 0 0.000
#> ERR878020 1 0.0000 0.894 1.000 0.000 0.000 0 0.000
#> ERR862953 1 0.0000 0.894 1.000 0.000 0.000 0 0.000
#> ERR862971 1 0.2690 0.817 0.844 0.156 0.000 0 0.000
#> ERR878021 1 0.1851 0.857 0.912 0.088 0.000 0 0.000
#> ERR862954 1 0.1608 0.865 0.928 0.072 0.000 0 0.000
#> ERR862972 1 0.2471 0.830 0.864 0.136 0.000 0 0.000
#> ERR878022 1 0.2329 0.838 0.876 0.124 0.000 0 0.000
#> ERR862955 1 0.3452 0.752 0.756 0.244 0.000 0 0.000
#> ERR862973 1 0.3424 0.755 0.760 0.240 0.000 0 0.000
#> ERR878023 1 0.3424 0.755 0.760 0.240 0.000 0 0.000
#> ERR862956 1 0.3424 0.755 0.760 0.240 0.000 0 0.000
#> ERR862974 1 0.3424 0.755 0.760 0.240 0.000 0 0.000
#> ERR878024 1 0.3508 0.745 0.748 0.252 0.000 0 0.000
#> ERR862975 1 0.0510 0.892 0.984 0.000 0.000 0 0.016
#> ERR866150 1 0.0510 0.892 0.984 0.000 0.000 0 0.016
#> ERR866168 1 0.0290 0.893 0.992 0.000 0.000 0 0.008
#> ERR862976 1 0.0000 0.894 1.000 0.000 0.000 0 0.000
#> ERR866151 1 0.0162 0.893 0.996 0.000 0.000 0 0.004
#> ERR866169 1 0.0510 0.892 0.984 0.000 0.000 0 0.016
#> ERR862977 1 0.3424 0.755 0.760 0.240 0.000 0 0.000
#> ERR866152 1 0.3424 0.755 0.760 0.240 0.000 0 0.000
#> ERR866170 1 0.3424 0.755 0.760 0.240 0.000 0 0.000
#> ERR862978 1 0.4101 0.550 0.628 0.372 0.000 0 0.000
#> ERR866153 1 0.3424 0.755 0.760 0.240 0.000 0 0.000
#> ERR866171 1 0.3424 0.755 0.760 0.240 0.000 0 0.000
#> ERR862979 2 0.0000 1.000 0.000 1.000 0.000 0 0.000
#> ERR866154 2 0.0000 1.000 0.000 1.000 0.000 0 0.000
#> ERR866172 2 0.0000 1.000 0.000 1.000 0.000 0 0.000
#> ERR862980 2 0.0000 1.000 0.000 1.000 0.000 0 0.000
#> ERR866155 2 0.0000 1.000 0.000 1.000 0.000 0 0.000
#> ERR866173 2 0.0000 1.000 0.000 1.000 0.000 0 0.000
#> ERR862981 1 0.0510 0.892 0.984 0.000 0.000 0 0.016
#> ERR866156 1 0.0510 0.892 0.984 0.000 0.000 0 0.016
#> ERR866174 1 0.0510 0.892 0.984 0.000 0.000 0 0.016
#> ERR866157 1 0.0510 0.892 0.984 0.000 0.000 0 0.016
#> ERR866175 1 0.0510 0.892 0.984 0.000 0.000 0 0.016
#> ERR862983 3 0.0000 0.863 0.000 0.000 1.000 0 0.000
#> ERR866158 3 0.0000 0.863 0.000 0.000 1.000 0 0.000
#> ERR866176 3 0.0000 0.863 0.000 0.000 1.000 0 0.000
#> ERR862984 3 0.0000 0.863 0.000 0.000 1.000 0 0.000
#> ERR866159 3 0.0000 0.863 0.000 0.000 1.000 0 0.000
#> ERR866177 3 0.0000 0.863 0.000 0.000 1.000 0 0.000
#> ERR862985 1 0.0510 0.892 0.984 0.000 0.000 0 0.016
#> ERR866160 1 0.0510 0.892 0.984 0.000 0.000 0 0.016
#> ERR866178 1 0.0510 0.892 0.984 0.000 0.000 0 0.016
#> ERR862986 1 0.0510 0.892 0.984 0.000 0.000 0 0.016
#> ERR866161 1 0.0510 0.892 0.984 0.000 0.000 0 0.016
#> ERR866179 1 0.0510 0.892 0.984 0.000 0.000 0 0.016
#> ERR862987 2 0.0000 1.000 0.000 1.000 0.000 0 0.000
#> ERR866162 2 0.0000 1.000 0.000 1.000 0.000 0 0.000
#> ERR866180 2 0.0000 1.000 0.000 1.000 0.000 0 0.000
#> ERR862988 2 0.0000 1.000 0.000 1.000 0.000 0 0.000
#> ERR866163 2 0.0000 1.000 0.000 1.000 0.000 0 0.000
#> ERR866181 2 0.0000 1.000 0.000 1.000 0.000 0 0.000
#> ERR862989 1 0.0404 0.893 0.988 0.000 0.000 0 0.012
#> ERR866164 1 0.0000 0.894 1.000 0.000 0.000 0 0.000
#> ERR866182 1 0.0000 0.894 1.000 0.000 0.000 0 0.000
#> ERR862990 1 0.0000 0.894 1.000 0.000 0.000 0 0.000
#> ERR866165 1 0.0000 0.894 1.000 0.000 0.000 0 0.000
#> ERR866183 1 0.0000 0.894 1.000 0.000 0.000 0 0.000
#> ERR862991 2 0.0000 1.000 0.000 1.000 0.000 0 0.000
#> ERR866166 2 0.0000 1.000 0.000 1.000 0.000 0 0.000
#> ERR866184 2 0.0000 1.000 0.000 1.000 0.000 0 0.000
#> ERR862992 2 0.0000 1.000 0.000 1.000 0.000 0 0.000
#> ERR866167 2 0.0000 1.000 0.000 1.000 0.000 0 0.000
#> ERR866185 2 0.0000 1.000 0.000 1.000 0.000 0 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
#> ERR862939 6 0.0146 0.985 0.004 0.000 0.000 0 0 0.996
#> ERR862957 6 0.0000 0.988 0.000 0.000 0.000 0 0 1.000
#> ERR878007 6 0.0363 0.981 0.012 0.000 0.000 0 0 0.988
#> ERR862940 6 0.0632 0.958 0.024 0.000 0.000 0 0 0.976
#> ERR862958 6 0.0000 0.988 0.000 0.000 0.000 0 0 1.000
#> ERR878008 6 0.0000 0.988 0.000 0.000 0.000 0 0 1.000
#> ERR862941 2 0.0000 1.000 0.000 1.000 0.000 0 0 0.000
#> ERR862959 2 0.0000 1.000 0.000 1.000 0.000 0 0 0.000
#> ERR878009 2 0.0000 1.000 0.000 1.000 0.000 0 0 0.000
#> ERR862942 2 0.0000 1.000 0.000 1.000 0.000 0 0 0.000
#> ERR862960 2 0.0000 1.000 0.000 1.000 0.000 0 0 0.000
#> ERR878010 2 0.0000 1.000 0.000 1.000 0.000 0 0 0.000
#> ERR862943 3 0.0000 1.000 0.000 0.000 1.000 0 0 0.000
#> ERR862961 3 0.0000 1.000 0.000 0.000 1.000 0 0 0.000
#> ERR878011 3 0.0000 1.000 0.000 0.000 1.000 0 0 0.000
#> ERR862944 3 0.0000 1.000 0.000 0.000 1.000 0 0 0.000
#> ERR862962 3 0.0000 1.000 0.000 0.000 1.000 0 0 0.000
#> ERR878012 3 0.0000 1.000 0.000 0.000 1.000 0 0 0.000
#> ERR862945 4 0.0000 1.000 0.000 0.000 0.000 1 0 0.000
#> ERR862963 4 0.0000 1.000 0.000 0.000 0.000 1 0 0.000
#> ERR878013 4 0.0000 1.000 0.000 0.000 0.000 1 0 0.000
#> ERR862946 4 0.0000 1.000 0.000 0.000 0.000 1 0 0.000
#> ERR862964 4 0.0000 1.000 0.000 0.000 0.000 1 0 0.000
#> ERR878014 4 0.0000 1.000 0.000 0.000 0.000 1 0 0.000
#> ERR862947 5 0.0000 1.000 0.000 0.000 0.000 0 1 0.000
#> ERR862965 5 0.0000 1.000 0.000 0.000 0.000 0 1 0.000
#> ERR878015 5 0.0000 1.000 0.000 0.000 0.000 0 1 0.000
#> ERR862948 5 0.0000 1.000 0.000 0.000 0.000 0 1 0.000
#> ERR862966 5 0.0000 1.000 0.000 0.000 0.000 0 1 0.000
#> ERR878016 5 0.0000 1.000 0.000 0.000 0.000 0 1 0.000
#> ERR862949 2 0.0000 1.000 0.000 1.000 0.000 0 0 0.000
#> ERR862967 2 0.0000 1.000 0.000 1.000 0.000 0 0 0.000
#> ERR878017 2 0.0000 1.000 0.000 1.000 0.000 0 0 0.000
#> ERR862950 2 0.0000 1.000 0.000 1.000 0.000 0 0 0.000
#> ERR862968 2 0.0000 1.000 0.000 1.000 0.000 0 0 0.000
#> ERR878018 2 0.0000 1.000 0.000 1.000 0.000 0 0 0.000
#> ERR862951 1 0.2135 0.876 0.872 0.000 0.000 0 0 0.128
#> ERR862969 1 0.1267 0.886 0.940 0.000 0.000 0 0 0.060
#> ERR878019 1 0.0713 0.883 0.972 0.000 0.000 0 0 0.028
#> ERR862952 1 0.1501 0.886 0.924 0.000 0.000 0 0 0.076
#> ERR862970 1 0.2048 0.880 0.880 0.000 0.000 0 0 0.120
#> ERR878020 1 0.2135 0.875 0.872 0.000 0.000 0 0 0.128
#> ERR862953 1 0.0790 0.881 0.968 0.000 0.000 0 0 0.032
#> ERR862971 1 0.1745 0.881 0.924 0.056 0.000 0 0 0.020
#> ERR878021 1 0.2542 0.882 0.876 0.044 0.000 0 0 0.080
#> ERR862954 1 0.0820 0.881 0.972 0.016 0.000 0 0 0.012
#> ERR862972 1 0.0790 0.882 0.968 0.032 0.000 0 0 0.000
#> ERR878022 1 0.1049 0.881 0.960 0.032 0.000 0 0 0.008
#> ERR862955 1 0.2491 0.833 0.836 0.164 0.000 0 0 0.000
#> ERR862973 1 0.2260 0.848 0.860 0.140 0.000 0 0 0.000
#> ERR878023 1 0.2416 0.839 0.844 0.156 0.000 0 0 0.000
#> ERR862956 1 0.2260 0.848 0.860 0.140 0.000 0 0 0.000
#> ERR862974 1 0.2260 0.848 0.860 0.140 0.000 0 0 0.000
#> ERR878024 1 0.2730 0.810 0.808 0.192 0.000 0 0 0.000
#> ERR862975 1 0.2994 0.851 0.788 0.000 0.004 0 0 0.208
#> ERR866150 1 0.2854 0.854 0.792 0.000 0.000 0 0 0.208
#> ERR866168 1 0.2730 0.859 0.808 0.000 0.000 0 0 0.192
#> ERR862976 1 0.2597 0.862 0.824 0.000 0.000 0 0 0.176
#> ERR866151 1 0.2730 0.859 0.808 0.000 0.000 0 0 0.192
#> ERR866169 1 0.2854 0.853 0.792 0.000 0.000 0 0 0.208
#> ERR862977 1 0.2260 0.848 0.860 0.140 0.000 0 0 0.000
#> ERR866152 1 0.2260 0.848 0.860 0.140 0.000 0 0 0.000
#> ERR866170 1 0.2260 0.848 0.860 0.140 0.000 0 0 0.000
#> ERR862978 1 0.3446 0.623 0.692 0.308 0.000 0 0 0.000
#> ERR866153 1 0.2260 0.848 0.860 0.140 0.000 0 0 0.000
#> ERR866171 1 0.2260 0.848 0.860 0.140 0.000 0 0 0.000
#> ERR862979 2 0.0000 1.000 0.000 1.000 0.000 0 0 0.000
#> ERR866154 2 0.0000 1.000 0.000 1.000 0.000 0 0 0.000
#> ERR866172 2 0.0000 1.000 0.000 1.000 0.000 0 0 0.000
#> ERR862980 2 0.0000 1.000 0.000 1.000 0.000 0 0 0.000
#> ERR866155 2 0.0000 1.000 0.000 1.000 0.000 0 0 0.000
#> ERR866173 2 0.0000 1.000 0.000 1.000 0.000 0 0 0.000
#> ERR862981 1 0.1610 0.866 0.916 0.000 0.000 0 0 0.084
#> ERR866156 1 0.1204 0.871 0.944 0.000 0.000 0 0 0.056
#> ERR866174 1 0.1556 0.867 0.920 0.000 0.000 0 0 0.080
#> ERR866157 1 0.1007 0.870 0.956 0.000 0.000 0 0 0.044
#> ERR866175 1 0.1075 0.871 0.952 0.000 0.000 0 0 0.048
#> ERR862983 3 0.0000 1.000 0.000 0.000 1.000 0 0 0.000
#> ERR866158 3 0.0000 1.000 0.000 0.000 1.000 0 0 0.000
#> ERR866176 3 0.0000 1.000 0.000 0.000 1.000 0 0 0.000
#> ERR862984 3 0.0000 1.000 0.000 0.000 1.000 0 0 0.000
#> ERR866159 3 0.0000 1.000 0.000 0.000 1.000 0 0 0.000
#> ERR866177 3 0.0000 1.000 0.000 0.000 1.000 0 0 0.000
#> ERR862985 1 0.1501 0.868 0.924 0.000 0.000 0 0 0.076
#> ERR866160 1 0.1141 0.872 0.948 0.000 0.000 0 0 0.052
#> ERR866178 1 0.1141 0.871 0.948 0.000 0.000 0 0 0.052
#> ERR862986 1 0.1610 0.866 0.916 0.000 0.000 0 0 0.084
#> ERR866161 1 0.1075 0.871 0.952 0.000 0.000 0 0 0.048
#> ERR866179 1 0.1075 0.871 0.952 0.000 0.000 0 0 0.048
#> ERR862987 2 0.0000 1.000 0.000 1.000 0.000 0 0 0.000
#> ERR866162 2 0.0000 1.000 0.000 1.000 0.000 0 0 0.000
#> ERR866180 2 0.0000 1.000 0.000 1.000 0.000 0 0 0.000
#> ERR862988 2 0.0000 1.000 0.000 1.000 0.000 0 0 0.000
#> ERR866163 2 0.0000 1.000 0.000 1.000 0.000 0 0 0.000
#> ERR866181 2 0.0000 1.000 0.000 1.000 0.000 0 0 0.000
#> ERR862989 1 0.2793 0.857 0.800 0.000 0.000 0 0 0.200
#> ERR866164 1 0.2631 0.861 0.820 0.000 0.000 0 0 0.180
#> ERR866182 1 0.2597 0.862 0.824 0.000 0.000 0 0 0.176
#> ERR862990 1 0.2664 0.860 0.816 0.000 0.000 0 0 0.184
#> ERR866165 1 0.2597 0.862 0.824 0.000 0.000 0 0 0.176
#> ERR866183 1 0.2631 0.861 0.820 0.000 0.000 0 0 0.180
#> ERR862991 2 0.0000 1.000 0.000 1.000 0.000 0 0 0.000
#> ERR866166 2 0.0000 1.000 0.000 1.000 0.000 0 0 0.000
#> ERR866184 2 0.0000 1.000 0.000 1.000 0.000 0 0 0.000
#> ERR862992 2 0.0000 1.000 0.000 1.000 0.000 0 0 0.000
#> ERR866167 2 0.0000 1.000 0.000 1.000 0.000 0 0 0.000
#> ERR866185 2 0.0000 1.000 0.000 1.000 0.000 0 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)

consensus_heatmap(res, k = 3)

consensus_heatmap(res, k = 4)

consensus_heatmap(res, k = 5)

consensus_heatmap(res, k = 6)

Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)

membership_heatmap(res, k = 3)

membership_heatmap(res, k = 4)

membership_heatmap(res, k = 5)

membership_heatmap(res, k = 6)

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)

get_signatures(res, k = 3)

get_signatures(res, k = 4)

get_signatures(res, k = 5)

get_signatures(res, k = 6)

Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)

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

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

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

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

Compare the overlap of signatures from different k:
compare_signatures(res)

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.
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:
which_row
: row indices corresponding to the input matrix.
fdr
: FDR for the differential test.
mean_x
: The mean value in group x.
scaled_mean_x
: The mean value in group x after rows are scaled.
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")

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

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

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

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

Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)

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"]
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 15818 rows and 107 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 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)

The plots are:
- The first row: a plot of the ECDF (empirical cumulative distribution
function) curves of the consensus matrix for each
k
and the heatmap of
predicted classes for each k
.
- The second row: heatmaps of the consensus matrix for each
k
.
- The third row: heatmaps of the membership matrix for each
k
.
- The fouth row: heatmaps of the signatures for each
k
.
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:
- ECDF curves of the consensus matrix for each
k
;
- 1-PAC. The PAC
score
measures the proportion of the ambiguous subgrouping.
- Mean silhouette score.
- Concordance. The mean probability of fiting the consensus class ids in all
partitions.
- Area increased. Denote \(A_k\) as the area under the ECDF curve for current
k
, the area increased is defined as \(A_k - A_{k-1}\).
- Rand index. The percent of pairs of samples that are both in a same cluster
or both are not in a same cluster in the partition of k and k-1.
- Jaccard index. The ratio of pairs of samples are both in a same cluster in
the partition of k and k-1 and the pairs of samples are both in a same
cluster in the partition k or k-1.
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)

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.685 0.868 0.930 0.2645 0.718 0.718
#> 3 3 0.353 0.429 0.729 1.1438 0.541 0.437
#> 4 4 0.446 0.514 0.716 0.1652 0.655 0.398
#> 5 5 0.803 0.806 0.904 0.0879 0.711 0.358
#> 6 6 0.758 0.802 0.831 0.0692 0.913 0.706
suggest_best_k()
suggests the best \(k\) based on these statistics. The rules are as follows:
- All \(k\) with Jaccard index larger than 0.95 are removed because increasing
\(k\) does not provide enough extra information. If all \(k\) are removed, it is
marked as no subgroup is detected.
- For all \(k\) with 1-PAC score larger than 0.9, the maximal \(k\) is taken as
the best \(k\), and other \(k\) are marked as optional \(k\).
- If it does not fit the second rule. The \(k\) with the maximal vote of the
highest 1-PAC score, highest mean silhouette, and highest concordance is
taken as the best \(k\).
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
#> ERR862939 2 0.563 0.784 0.132 0.868
#> ERR862957 2 0.563 0.784 0.132 0.868
#> ERR878007 2 0.506 0.814 0.112 0.888
#> ERR862940 2 0.563 0.784 0.132 0.868
#> ERR862958 2 0.563 0.784 0.132 0.868
#> ERR878008 2 0.563 0.784 0.132 0.868
#> ERR862941 2 0.000 0.951 0.000 1.000
#> ERR862959 2 0.000 0.951 0.000 1.000
#> ERR878009 2 0.000 0.951 0.000 1.000
#> ERR862942 2 0.000 0.951 0.000 1.000
#> ERR862960 2 0.000 0.951 0.000 1.000
#> ERR878010 2 0.000 0.951 0.000 1.000
#> ERR862943 1 0.881 0.769 0.700 0.300
#> ERR862961 1 0.881 0.769 0.700 0.300
#> ERR878011 1 0.936 0.742 0.648 0.352
#> ERR862944 1 0.881 0.769 0.700 0.300
#> ERR862962 1 0.881 0.769 0.700 0.300
#> ERR878012 1 0.936 0.742 0.648 0.352
#> ERR862945 1 0.000 0.714 1.000 0.000
#> ERR862963 1 0.000 0.714 1.000 0.000
#> ERR878013 1 0.000 0.714 1.000 0.000
#> ERR862946 1 0.000 0.714 1.000 0.000
#> ERR862964 1 0.000 0.714 1.000 0.000
#> ERR878014 1 0.000 0.714 1.000 0.000
#> ERR862947 2 0.936 0.367 0.352 0.648
#> ERR862965 2 0.936 0.367 0.352 0.648
#> ERR878015 2 0.936 0.367 0.352 0.648
#> ERR862948 2 0.936 0.367 0.352 0.648
#> ERR862966 2 0.936 0.367 0.352 0.648
#> ERR878016 2 0.936 0.367 0.352 0.648
#> ERR862949 2 0.000 0.951 0.000 1.000
#> ERR862967 2 0.000 0.951 0.000 1.000
#> ERR878017 2 0.000 0.951 0.000 1.000
#> ERR862950 2 0.000 0.951 0.000 1.000
#> ERR862968 2 0.000 0.951 0.000 1.000
#> ERR878018 2 0.000 0.951 0.000 1.000
#> ERR862951 2 0.000 0.951 0.000 1.000
#> ERR862969 2 0.000 0.951 0.000 1.000
#> ERR878019 2 0.000 0.951 0.000 1.000
#> ERR862952 2 0.000 0.951 0.000 1.000
#> ERR862970 2 0.000 0.951 0.000 1.000
#> ERR878020 2 0.000 0.951 0.000 1.000
#> ERR862953 2 0.000 0.951 0.000 1.000
#> ERR862971 2 0.000 0.951 0.000 1.000
#> ERR878021 2 0.000 0.951 0.000 1.000
#> ERR862954 2 0.000 0.951 0.000 1.000
#> ERR862972 2 0.000 0.951 0.000 1.000
#> ERR878022 2 0.000 0.951 0.000 1.000
#> ERR862955 2 0.000 0.951 0.000 1.000
#> ERR862973 2 0.000 0.951 0.000 1.000
#> ERR878023 2 0.000 0.951 0.000 1.000
#> ERR862956 2 0.000 0.951 0.000 1.000
#> ERR862974 2 0.000 0.951 0.000 1.000
#> ERR878024 2 0.000 0.951 0.000 1.000
#> ERR862975 2 0.242 0.909 0.040 0.960
#> ERR866150 2 0.242 0.909 0.040 0.960
#> ERR866168 2 0.242 0.909 0.040 0.960
#> ERR862976 2 0.242 0.909 0.040 0.960
#> ERR866151 2 0.242 0.909 0.040 0.960
#> ERR866169 2 0.242 0.909 0.040 0.960
#> ERR862977 2 0.000 0.951 0.000 1.000
#> ERR866152 2 0.000 0.951 0.000 1.000
#> ERR866170 2 0.000 0.951 0.000 1.000
#> ERR862978 2 0.000 0.951 0.000 1.000
#> ERR866153 2 0.000 0.951 0.000 1.000
#> ERR866171 2 0.000 0.951 0.000 1.000
#> ERR862979 2 0.000 0.951 0.000 1.000
#> ERR866154 2 0.000 0.951 0.000 1.000
#> ERR866172 2 0.000 0.951 0.000 1.000
#> ERR862980 2 0.000 0.951 0.000 1.000
#> ERR866155 2 0.000 0.951 0.000 1.000
#> ERR866173 2 0.000 0.951 0.000 1.000
#> ERR862981 2 0.000 0.951 0.000 1.000
#> ERR866156 2 0.000 0.951 0.000 1.000
#> ERR866174 2 0.000 0.951 0.000 1.000
#> ERR866157 2 0.000 0.951 0.000 1.000
#> ERR866175 2 0.000 0.951 0.000 1.000
#> ERR862983 1 0.978 0.694 0.588 0.412
#> ERR866158 1 0.978 0.694 0.588 0.412
#> ERR866176 1 0.978 0.694 0.588 0.412
#> ERR862984 1 0.978 0.694 0.588 0.412
#> ERR866159 1 0.978 0.694 0.588 0.412
#> ERR866177 1 0.978 0.694 0.588 0.412
#> ERR862985 2 0.000 0.951 0.000 1.000
#> ERR866160 2 0.000 0.951 0.000 1.000
#> ERR866178 2 0.000 0.951 0.000 1.000
#> ERR862986 2 0.000 0.951 0.000 1.000
#> ERR866161 2 0.000 0.951 0.000 1.000
#> ERR866179 2 0.000 0.951 0.000 1.000
#> ERR862987 2 0.000 0.951 0.000 1.000
#> ERR866162 2 0.000 0.951 0.000 1.000
#> ERR866180 2 0.000 0.951 0.000 1.000
#> ERR862988 2 0.000 0.951 0.000 1.000
#> ERR866163 2 0.000 0.951 0.000 1.000
#> ERR866181 2 0.000 0.951 0.000 1.000
#> ERR862989 2 0.000 0.951 0.000 1.000
#> ERR866164 2 0.000 0.951 0.000 1.000
#> ERR866182 2 0.000 0.951 0.000 1.000
#> ERR862990 2 0.000 0.951 0.000 1.000
#> ERR866165 2 0.000 0.951 0.000 1.000
#> ERR866183 2 0.000 0.951 0.000 1.000
#> ERR862991 2 0.000 0.951 0.000 1.000
#> ERR866166 2 0.000 0.951 0.000 1.000
#> ERR866184 2 0.000 0.951 0.000 1.000
#> ERR862992 2 0.000 0.951 0.000 1.000
#> ERR866167 2 0.000 0.951 0.000 1.000
#> ERR866185 2 0.000 0.951 0.000 1.000
show/hide code output
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> ERR862939 2 0.8463 0.4534 0.444 0.468 0.088
#> ERR862957 2 0.8463 0.4534 0.444 0.468 0.088
#> ERR878007 2 0.8463 0.4534 0.444 0.468 0.088
#> ERR862940 2 0.8463 0.4534 0.444 0.468 0.088
#> ERR862958 2 0.8463 0.4534 0.444 0.468 0.088
#> ERR878008 2 0.8463 0.4534 0.444 0.468 0.088
#> ERR862941 1 0.6235 0.5684 0.564 0.436 0.000
#> ERR862959 1 0.6267 0.5563 0.548 0.452 0.000
#> ERR878009 1 0.6235 0.5684 0.564 0.436 0.000
#> ERR862942 1 0.6267 0.5525 0.548 0.452 0.000
#> ERR862960 2 0.6307 -0.4850 0.488 0.512 0.000
#> ERR878010 2 0.6204 -0.3682 0.424 0.576 0.000
#> ERR862943 1 0.7570 -0.0988 0.552 0.044 0.404
#> ERR862961 1 0.7570 -0.0988 0.552 0.044 0.404
#> ERR878011 1 0.7570 -0.0988 0.552 0.044 0.404
#> ERR862944 1 0.7570 -0.0988 0.552 0.044 0.404
#> ERR862962 1 0.7570 -0.0988 0.552 0.044 0.404
#> ERR878012 1 0.7570 -0.0988 0.552 0.044 0.404
#> ERR862945 3 0.0000 1.0000 0.000 0.000 1.000
#> ERR862963 3 0.0000 1.0000 0.000 0.000 1.000
#> ERR878013 3 0.0000 1.0000 0.000 0.000 1.000
#> ERR862946 3 0.0000 1.0000 0.000 0.000 1.000
#> ERR862964 3 0.0000 1.0000 0.000 0.000 1.000
#> ERR878014 3 0.0000 1.0000 0.000 0.000 1.000
#> ERR862947 2 0.6565 0.0200 0.008 0.576 0.416
#> ERR862965 2 0.6565 0.0200 0.008 0.576 0.416
#> ERR878015 2 0.6565 0.0200 0.008 0.576 0.416
#> ERR862948 2 0.6565 0.0200 0.008 0.576 0.416
#> ERR862966 2 0.6565 0.0200 0.008 0.576 0.416
#> ERR878016 2 0.6565 0.0200 0.008 0.576 0.416
#> ERR862949 2 0.1860 0.4284 0.052 0.948 0.000
#> ERR862967 2 0.1964 0.4257 0.056 0.944 0.000
#> ERR878017 2 0.2537 0.4024 0.080 0.920 0.000
#> ERR862950 2 0.1964 0.4258 0.056 0.944 0.000
#> ERR862968 2 0.1860 0.4284 0.052 0.948 0.000
#> ERR878018 2 0.1964 0.4257 0.056 0.944 0.000
#> ERR862951 1 0.5397 0.6521 0.720 0.280 0.000
#> ERR862969 1 0.5397 0.6521 0.720 0.280 0.000
#> ERR878019 1 0.5363 0.6514 0.724 0.276 0.000
#> ERR862952 1 0.5397 0.6521 0.720 0.280 0.000
#> ERR862970 1 0.5397 0.6521 0.720 0.280 0.000
#> ERR878020 1 0.5397 0.6521 0.720 0.280 0.000
#> ERR862953 2 0.6204 0.0861 0.424 0.576 0.000
#> ERR862971 2 0.6235 0.0483 0.436 0.564 0.000
#> ERR878021 2 0.6215 0.0542 0.428 0.572 0.000
#> ERR862954 2 0.5397 0.3811 0.280 0.720 0.000
#> ERR862972 2 0.6307 -0.1677 0.488 0.512 0.000
#> ERR878022 2 0.5835 0.3103 0.340 0.660 0.000
#> ERR862955 1 0.5529 0.6429 0.704 0.296 0.000
#> ERR862973 1 0.5529 0.6429 0.704 0.296 0.000
#> ERR878023 1 0.5529 0.6429 0.704 0.296 0.000
#> ERR862956 1 0.5497 0.6456 0.708 0.292 0.000
#> ERR862974 1 0.5529 0.6429 0.704 0.296 0.000
#> ERR878024 1 0.5529 0.6429 0.704 0.296 0.000
#> ERR862975 1 0.0592 0.5162 0.988 0.012 0.000
#> ERR866150 1 0.0592 0.5162 0.988 0.012 0.000
#> ERR866168 1 0.0592 0.5162 0.988 0.012 0.000
#> ERR862976 1 0.0747 0.5197 0.984 0.016 0.000
#> ERR866151 1 0.0592 0.5162 0.988 0.012 0.000
#> ERR866169 1 0.0592 0.5162 0.988 0.012 0.000
#> ERR862977 1 0.5397 0.6520 0.720 0.280 0.000
#> ERR866152 1 0.5397 0.6520 0.720 0.280 0.000
#> ERR866170 1 0.5397 0.6520 0.720 0.280 0.000
#> ERR862978 1 0.5397 0.6520 0.720 0.280 0.000
#> ERR866153 1 0.5397 0.6520 0.720 0.280 0.000
#> ERR866171 1 0.5397 0.6520 0.720 0.280 0.000
#> ERR862979 2 0.5882 -0.1711 0.348 0.652 0.000
#> ERR866154 2 0.6095 -0.2880 0.392 0.608 0.000
#> ERR866172 2 0.5760 -0.1221 0.328 0.672 0.000
#> ERR862980 2 0.6045 -0.2560 0.380 0.620 0.000
#> ERR866155 2 0.4178 0.2718 0.172 0.828 0.000
#> ERR866173 2 0.2537 0.4031 0.080 0.920 0.000
#> ERR862981 2 0.6225 0.5088 0.432 0.568 0.000
#> ERR866156 2 0.6215 0.5101 0.428 0.572 0.000
#> ERR866174 2 0.6235 0.5071 0.436 0.564 0.000
#> ERR866157 2 0.6215 0.5101 0.428 0.572 0.000
#> ERR866175 2 0.6235 0.5071 0.436 0.564 0.000
#> ERR862983 1 0.3267 0.4230 0.912 0.044 0.044
#> ERR866158 1 0.3267 0.4230 0.912 0.044 0.044
#> ERR866176 1 0.3267 0.4230 0.912 0.044 0.044
#> ERR862984 1 0.3267 0.4230 0.912 0.044 0.044
#> ERR866159 1 0.3267 0.4230 0.912 0.044 0.044
#> ERR866177 1 0.3267 0.4230 0.912 0.044 0.044
#> ERR862985 2 0.6252 0.5021 0.444 0.556 0.000
#> ERR866160 2 0.6252 0.5021 0.444 0.556 0.000
#> ERR866178 2 0.6252 0.5021 0.444 0.556 0.000
#> ERR862986 2 0.6244 0.5044 0.440 0.560 0.000
#> ERR866161 2 0.6252 0.5021 0.444 0.556 0.000
#> ERR866179 2 0.6252 0.5021 0.444 0.556 0.000
#> ERR862987 1 0.6235 0.5684 0.564 0.436 0.000
#> ERR866162 1 0.6235 0.5684 0.564 0.436 0.000
#> ERR866180 1 0.6244 0.5661 0.560 0.440 0.000
#> ERR862988 1 0.6235 0.5684 0.564 0.436 0.000
#> ERR866163 1 0.6215 0.5757 0.572 0.428 0.000
#> ERR866181 1 0.6235 0.5684 0.564 0.436 0.000
#> ERR862989 1 0.2448 0.5596 0.924 0.076 0.000
#> ERR866164 1 0.2711 0.5731 0.912 0.088 0.000
#> ERR866182 1 0.2711 0.5683 0.912 0.088 0.000
#> ERR862990 1 0.2711 0.5732 0.912 0.088 0.000
#> ERR866165 1 0.2711 0.5732 0.912 0.088 0.000
#> ERR866183 1 0.2537 0.5682 0.920 0.080 0.000
#> ERR862991 1 0.6204 0.5790 0.576 0.424 0.000
#> ERR866166 1 0.6204 0.5790 0.576 0.424 0.000
#> ERR866184 1 0.6204 0.5790 0.576 0.424 0.000
#> ERR862992 1 0.6204 0.5790 0.576 0.424 0.000
#> ERR866167 1 0.6204 0.5790 0.576 0.424 0.000
#> ERR866185 1 0.6204 0.5790 0.576 0.424 0.000
show/hide code output
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> ERR862939 1 0.4916 0.52209 0.576 0.000 0.424 0.000
#> ERR862957 1 0.4916 0.52209 0.576 0.000 0.424 0.000
#> ERR878007 1 0.4933 0.51749 0.568 0.000 0.432 0.000
#> ERR862940 1 0.4916 0.52209 0.576 0.000 0.424 0.000
#> ERR862958 1 0.4916 0.52209 0.576 0.000 0.424 0.000
#> ERR878008 1 0.4916 0.52209 0.576 0.000 0.424 0.000
#> ERR862941 2 0.0000 0.69275 0.000 1.000 0.000 0.000
#> ERR862959 2 0.0188 0.69210 0.004 0.996 0.000 0.000
#> ERR878009 2 0.0000 0.69275 0.000 1.000 0.000 0.000
#> ERR862942 2 0.0336 0.69123 0.008 0.992 0.000 0.000
#> ERR862960 2 0.0592 0.68726 0.016 0.984 0.000 0.000
#> ERR878010 2 0.0817 0.68572 0.024 0.976 0.000 0.000
#> ERR862943 3 0.4792 0.29087 0.312 0.008 0.680 0.000
#> ERR862961 3 0.4792 0.29087 0.312 0.008 0.680 0.000
#> ERR878011 3 0.4792 0.29087 0.312 0.008 0.680 0.000
#> ERR862944 3 0.4792 0.29087 0.312 0.008 0.680 0.000
#> ERR862962 3 0.4792 0.29087 0.312 0.008 0.680 0.000
#> ERR878012 3 0.4792 0.29087 0.312 0.008 0.680 0.000
#> ERR862945 4 0.0000 1.00000 0.000 0.000 0.000 1.000
#> ERR862963 4 0.0000 1.00000 0.000 0.000 0.000 1.000
#> ERR878013 4 0.0000 1.00000 0.000 0.000 0.000 1.000
#> ERR862946 4 0.0000 1.00000 0.000 0.000 0.000 1.000
#> ERR862964 4 0.0000 1.00000 0.000 0.000 0.000 1.000
#> ERR878014 4 0.0000 1.00000 0.000 0.000 0.000 1.000
#> ERR862947 1 0.3597 0.39697 0.836 0.016 0.000 0.148
#> ERR862965 1 0.3597 0.39697 0.836 0.016 0.000 0.148
#> ERR878015 1 0.3597 0.39697 0.836 0.016 0.000 0.148
#> ERR862948 1 0.3597 0.39697 0.836 0.016 0.000 0.148
#> ERR862966 1 0.3597 0.39697 0.836 0.016 0.000 0.148
#> ERR878016 1 0.3597 0.39697 0.836 0.016 0.000 0.148
#> ERR862949 2 0.4994 0.14952 0.480 0.520 0.000 0.000
#> ERR862967 2 0.4998 0.13080 0.488 0.512 0.000 0.000
#> ERR878017 2 0.4955 0.22258 0.444 0.556 0.000 0.000
#> ERR862950 2 0.4992 0.16060 0.476 0.524 0.000 0.000
#> ERR862968 2 0.4999 0.12246 0.492 0.508 0.000 0.000
#> ERR878018 2 0.5000 0.09841 0.500 0.500 0.000 0.000
#> ERR862951 2 0.4387 0.62711 0.012 0.752 0.236 0.000
#> ERR862969 2 0.4353 0.62815 0.012 0.756 0.232 0.000
#> ERR878019 2 0.4453 0.62304 0.012 0.744 0.244 0.000
#> ERR862952 2 0.4353 0.62815 0.012 0.756 0.232 0.000
#> ERR862970 2 0.4353 0.62815 0.012 0.756 0.232 0.000
#> ERR878020 2 0.4387 0.62711 0.012 0.752 0.236 0.000
#> ERR862953 3 0.7916 -0.01404 0.312 0.336 0.352 0.000
#> ERR862971 2 0.7869 0.05159 0.280 0.380 0.340 0.000
#> ERR878021 3 0.6663 0.14568 0.100 0.344 0.556 0.000
#> ERR862954 3 0.7919 0.00594 0.320 0.328 0.352 0.000
#> ERR862972 3 0.7469 0.17402 0.200 0.312 0.488 0.000
#> ERR878022 3 0.6552 0.22802 0.096 0.328 0.576 0.000
#> ERR862955 2 0.5698 0.48868 0.036 0.608 0.356 0.000
#> ERR862973 2 0.5742 0.46887 0.036 0.596 0.368 0.000
#> ERR878023 2 0.5256 0.60002 0.040 0.700 0.260 0.000
#> ERR862956 2 0.5309 0.60188 0.044 0.700 0.256 0.000
#> ERR862974 2 0.5712 0.54797 0.048 0.644 0.308 0.000
#> ERR878024 2 0.5172 0.60088 0.036 0.704 0.260 0.000
#> ERR862975 3 0.5659 0.16323 0.032 0.368 0.600 0.000
#> ERR866150 2 0.5853 0.22991 0.032 0.508 0.460 0.000
#> ERR866168 2 0.5856 0.22264 0.032 0.504 0.464 0.000
#> ERR862976 2 0.5771 0.23439 0.028 0.512 0.460 0.000
#> ERR866151 2 0.5850 0.24123 0.032 0.512 0.456 0.000
#> ERR866169 2 0.5850 0.24123 0.032 0.512 0.456 0.000
#> ERR862977 2 0.5354 0.60926 0.056 0.712 0.232 0.000
#> ERR866152 2 0.5219 0.60661 0.044 0.712 0.244 0.000
#> ERR866170 2 0.5312 0.60867 0.052 0.712 0.236 0.000
#> ERR862978 2 0.5354 0.61006 0.056 0.712 0.232 0.000
#> ERR866153 2 0.5354 0.60909 0.056 0.712 0.232 0.000
#> ERR866171 2 0.5188 0.60853 0.044 0.716 0.240 0.000
#> ERR862979 2 0.3266 0.58992 0.168 0.832 0.000 0.000
#> ERR866154 2 0.1022 0.68227 0.032 0.968 0.000 0.000
#> ERR866172 2 0.2868 0.61617 0.136 0.864 0.000 0.000
#> ERR862980 2 0.2281 0.64572 0.096 0.904 0.000 0.000
#> ERR866155 2 0.4304 0.47900 0.284 0.716 0.000 0.000
#> ERR866173 2 0.4679 0.39030 0.352 0.648 0.000 0.000
#> ERR862981 1 0.4994 0.60255 0.520 0.000 0.480 0.000
#> ERR866156 1 0.5000 0.58108 0.504 0.000 0.496 0.000
#> ERR866174 1 0.4981 0.60602 0.536 0.000 0.464 0.000
#> ERR866157 1 0.4992 0.60605 0.524 0.000 0.476 0.000
#> ERR866175 1 0.4992 0.60605 0.524 0.000 0.476 0.000
#> ERR862983 3 0.4181 0.44243 0.128 0.052 0.820 0.000
#> ERR866158 3 0.4181 0.44243 0.128 0.052 0.820 0.000
#> ERR866176 3 0.4181 0.44243 0.128 0.052 0.820 0.000
#> ERR862984 3 0.4181 0.44243 0.128 0.052 0.820 0.000
#> ERR866159 3 0.4181 0.44243 0.128 0.052 0.820 0.000
#> ERR866177 3 0.4181 0.44243 0.128 0.052 0.820 0.000
#> ERR862985 1 0.4989 0.60612 0.528 0.000 0.472 0.000
#> ERR866160 1 0.4999 0.59377 0.508 0.000 0.492 0.000
#> ERR866178 1 0.5000 0.58988 0.504 0.000 0.496 0.000
#> ERR862986 1 0.5165 0.59663 0.512 0.004 0.484 0.000
#> ERR866161 1 0.4992 0.60605 0.524 0.000 0.476 0.000
#> ERR866179 1 0.4985 0.60691 0.532 0.000 0.468 0.000
#> ERR862987 2 0.0188 0.69224 0.004 0.996 0.000 0.000
#> ERR866162 2 0.0000 0.69275 0.000 1.000 0.000 0.000
#> ERR866180 2 0.0188 0.69224 0.004 0.996 0.000 0.000
#> ERR862988 2 0.0188 0.69224 0.004 0.996 0.000 0.000
#> ERR866163 2 0.0000 0.69275 0.000 1.000 0.000 0.000
#> ERR866181 2 0.0188 0.69224 0.004 0.996 0.000 0.000
#> ERR862989 3 0.4149 0.50543 0.028 0.168 0.804 0.000
#> ERR866164 3 0.4059 0.52065 0.012 0.200 0.788 0.000
#> ERR866182 3 0.3870 0.52149 0.004 0.208 0.788 0.000
#> ERR862990 3 0.3907 0.51616 0.000 0.232 0.768 0.000
#> ERR866165 3 0.3873 0.51617 0.000 0.228 0.772 0.000
#> ERR866183 3 0.3933 0.52058 0.008 0.200 0.792 0.000
#> ERR862991 2 0.0188 0.69312 0.000 0.996 0.004 0.000
#> ERR866166 2 0.0188 0.69312 0.000 0.996 0.004 0.000
#> ERR866184 2 0.0469 0.69269 0.000 0.988 0.012 0.000
#> ERR862992 2 0.0000 0.69275 0.000 1.000 0.000 0.000
#> ERR866167 2 0.0000 0.69275 0.000 1.000 0.000 0.000
#> ERR866185 2 0.0188 0.69312 0.000 0.996 0.004 0.000
show/hide code output
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> ERR862939 3 0.0000 0.753 0.000 0.000 1.000 0 0.000
#> ERR862957 3 0.0000 0.753 0.000 0.000 1.000 0 0.000
#> ERR878007 3 0.0000 0.753 0.000 0.000 1.000 0 0.000
#> ERR862940 3 0.0000 0.753 0.000 0.000 1.000 0 0.000
#> ERR862958 3 0.0000 0.753 0.000 0.000 1.000 0 0.000
#> ERR878008 3 0.0000 0.753 0.000 0.000 1.000 0 0.000
#> ERR862941 2 0.0290 0.990 0.008 0.992 0.000 0 0.000
#> ERR862959 2 0.0290 0.990 0.008 0.992 0.000 0 0.000
#> ERR878009 2 0.0000 0.996 0.000 1.000 0.000 0 0.000
#> ERR862942 2 0.0000 0.996 0.000 1.000 0.000 0 0.000
#> ERR862960 2 0.0162 0.994 0.004 0.996 0.000 0 0.000
#> ERR878010 2 0.0162 0.994 0.004 0.996 0.000 0 0.000
#> ERR862943 3 0.0000 0.753 0.000 0.000 1.000 0 0.000
#> ERR862961 3 0.0000 0.753 0.000 0.000 1.000 0 0.000
#> ERR878011 3 0.0000 0.753 0.000 0.000 1.000 0 0.000
#> ERR862944 3 0.0000 0.753 0.000 0.000 1.000 0 0.000
#> ERR862962 3 0.0000 0.753 0.000 0.000 1.000 0 0.000
#> ERR878012 3 0.0000 0.753 0.000 0.000 1.000 0 0.000
#> ERR862945 4 0.0000 1.000 0.000 0.000 0.000 1 0.000
#> ERR862963 4 0.0000 1.000 0.000 0.000 0.000 1 0.000
#> ERR878013 4 0.0000 1.000 0.000 0.000 0.000 1 0.000
#> ERR862946 4 0.0000 1.000 0.000 0.000 0.000 1 0.000
#> ERR862964 4 0.0000 1.000 0.000 0.000 0.000 1 0.000
#> ERR878014 4 0.0000 1.000 0.000 0.000 0.000 1 0.000
#> ERR862947 5 0.0000 1.000 0.000 0.000 0.000 0 1.000
#> ERR862965 5 0.0000 1.000 0.000 0.000 0.000 0 1.000
#> ERR878015 5 0.0000 1.000 0.000 0.000 0.000 0 1.000
#> ERR862948 5 0.0000 1.000 0.000 0.000 0.000 0 1.000
#> ERR862966 5 0.0000 1.000 0.000 0.000 0.000 0 1.000
#> ERR878016 5 0.0000 1.000 0.000 0.000 0.000 0 1.000
#> ERR862949 2 0.0290 0.991 0.000 0.992 0.000 0 0.008
#> ERR862967 2 0.0290 0.991 0.000 0.992 0.000 0 0.008
#> ERR878017 2 0.0000 0.996 0.000 1.000 0.000 0 0.000
#> ERR862950 2 0.0290 0.991 0.000 0.992 0.000 0 0.008
#> ERR862968 2 0.0290 0.991 0.000 0.992 0.000 0 0.008
#> ERR878018 2 0.0290 0.991 0.000 0.992 0.000 0 0.008
#> ERR862951 1 0.0671 0.833 0.980 0.016 0.004 0 0.000
#> ERR862969 1 0.0671 0.833 0.980 0.016 0.004 0 0.000
#> ERR878019 1 0.0671 0.833 0.980 0.016 0.004 0 0.000
#> ERR862952 1 0.0671 0.833 0.980 0.016 0.004 0 0.000
#> ERR862970 1 0.0671 0.833 0.980 0.016 0.004 0 0.000
#> ERR878020 1 0.0671 0.833 0.980 0.016 0.004 0 0.000
#> ERR862953 1 0.0703 0.820 0.976 0.000 0.024 0 0.000
#> ERR862971 1 0.0671 0.824 0.980 0.004 0.016 0 0.000
#> ERR878021 1 0.0703 0.820 0.976 0.000 0.024 0 0.000
#> ERR862954 1 0.0703 0.820 0.976 0.000 0.024 0 0.000
#> ERR862972 1 0.0703 0.820 0.976 0.000 0.024 0 0.000
#> ERR878022 1 0.0880 0.813 0.968 0.000 0.032 0 0.000
#> ERR862955 1 0.0290 0.831 0.992 0.008 0.000 0 0.000
#> ERR862973 1 0.0290 0.831 0.992 0.008 0.000 0 0.000
#> ERR878023 1 0.1608 0.815 0.928 0.072 0.000 0 0.000
#> ERR862956 1 0.1608 0.815 0.928 0.072 0.000 0 0.000
#> ERR862974 1 0.1544 0.817 0.932 0.068 0.000 0 0.000
#> ERR878024 1 0.1608 0.815 0.928 0.072 0.000 0 0.000
#> ERR862975 3 0.4278 0.453 0.452 0.000 0.548 0 0.000
#> ERR866150 3 0.4278 0.453 0.452 0.000 0.548 0 0.000
#> ERR866168 3 0.4278 0.453 0.452 0.000 0.548 0 0.000
#> ERR862976 3 0.4278 0.453 0.452 0.000 0.548 0 0.000
#> ERR866151 3 0.4278 0.453 0.452 0.000 0.548 0 0.000
#> ERR866169 3 0.4278 0.453 0.452 0.000 0.548 0 0.000
#> ERR862977 1 0.1608 0.815 0.928 0.072 0.000 0 0.000
#> ERR866152 1 0.1608 0.815 0.928 0.072 0.000 0 0.000
#> ERR866170 1 0.1608 0.815 0.928 0.072 0.000 0 0.000
#> ERR862978 1 0.1608 0.815 0.928 0.072 0.000 0 0.000
#> ERR866153 1 0.1608 0.815 0.928 0.072 0.000 0 0.000
#> ERR866171 1 0.1608 0.815 0.928 0.072 0.000 0 0.000
#> ERR862979 2 0.0290 0.990 0.008 0.992 0.000 0 0.000
#> ERR866154 2 0.0162 0.994 0.004 0.996 0.000 0 0.000
#> ERR866172 2 0.0000 0.996 0.000 1.000 0.000 0 0.000
#> ERR862980 2 0.0000 0.996 0.000 1.000 0.000 0 0.000
#> ERR866155 2 0.0000 0.996 0.000 1.000 0.000 0 0.000
#> ERR866173 2 0.0000 0.996 0.000 1.000 0.000 0 0.000
#> ERR862981 3 0.3684 0.753 0.280 0.000 0.720 0 0.000
#> ERR866156 3 0.3774 0.736 0.296 0.000 0.704 0 0.000
#> ERR866174 3 0.3684 0.753 0.280 0.000 0.720 0 0.000
#> ERR866157 3 0.3707 0.750 0.284 0.000 0.716 0 0.000
#> ERR866175 3 0.3684 0.753 0.280 0.000 0.720 0 0.000
#> ERR862983 3 0.2773 0.791 0.164 0.000 0.836 0 0.000
#> ERR866158 3 0.2852 0.791 0.172 0.000 0.828 0 0.000
#> ERR866176 3 0.2891 0.791 0.176 0.000 0.824 0 0.000
#> ERR862984 3 0.2852 0.791 0.172 0.000 0.828 0 0.000
#> ERR866159 3 0.2891 0.791 0.176 0.000 0.824 0 0.000
#> ERR866177 3 0.2891 0.791 0.176 0.000 0.824 0 0.000
#> ERR862985 3 0.3586 0.766 0.264 0.000 0.736 0 0.000
#> ERR866160 3 0.3561 0.767 0.260 0.000 0.740 0 0.000
#> ERR866178 3 0.3612 0.763 0.268 0.000 0.732 0 0.000
#> ERR862986 3 0.3612 0.764 0.268 0.000 0.732 0 0.000
#> ERR866161 3 0.3561 0.767 0.260 0.000 0.740 0 0.000
#> ERR866179 3 0.3561 0.767 0.260 0.000 0.740 0 0.000
#> ERR862987 2 0.0000 0.996 0.000 1.000 0.000 0 0.000
#> ERR866162 2 0.0000 0.996 0.000 1.000 0.000 0 0.000
#> ERR866180 2 0.0000 0.996 0.000 1.000 0.000 0 0.000
#> ERR862988 2 0.0000 0.996 0.000 1.000 0.000 0 0.000
#> ERR866163 2 0.0290 0.990 0.008 0.992 0.000 0 0.000
#> ERR866181 2 0.0000 0.996 0.000 1.000 0.000 0 0.000
#> ERR862989 1 0.4273 -0.170 0.552 0.000 0.448 0 0.000
#> ERR866164 1 0.4150 0.076 0.612 0.000 0.388 0 0.000
#> ERR866182 1 0.4114 0.120 0.624 0.000 0.376 0 0.000
#> ERR862990 1 0.4114 0.120 0.624 0.000 0.376 0 0.000
#> ERR866165 1 0.4227 -0.052 0.580 0.000 0.420 0 0.000
#> ERR866183 1 0.4291 -0.220 0.536 0.000 0.464 0 0.000
#> ERR862991 2 0.0000 0.996 0.000 1.000 0.000 0 0.000
#> ERR866166 2 0.0000 0.996 0.000 1.000 0.000 0 0.000
#> ERR866184 2 0.0290 0.990 0.008 0.992 0.000 0 0.000
#> ERR862992 2 0.0000 0.996 0.000 1.000 0.000 0 0.000
#> ERR866167 2 0.0000 0.996 0.000 1.000 0.000 0 0.000
#> ERR866185 2 0.0000 0.996 0.000 1.000 0.000 0 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
#> ERR862939 6 0.0632 1.000 0.000 0.000 0.024 0 0 0.976
#> ERR862957 6 0.0632 1.000 0.000 0.000 0.024 0 0 0.976
#> ERR878007 6 0.0632 1.000 0.000 0.000 0.024 0 0 0.976
#> ERR862940 6 0.0632 1.000 0.000 0.000 0.024 0 0 0.976
#> ERR862958 6 0.0632 1.000 0.000 0.000 0.024 0 0 0.976
#> ERR878008 6 0.0632 1.000 0.000 0.000 0.024 0 0 0.976
#> ERR862941 2 0.0717 0.974 0.016 0.976 0.000 0 0 0.008
#> ERR862959 2 0.0622 0.977 0.012 0.980 0.000 0 0 0.008
#> ERR878009 2 0.0458 0.980 0.016 0.984 0.000 0 0 0.000
#> ERR862942 2 0.0622 0.978 0.012 0.980 0.000 0 0 0.008
#> ERR862960 2 0.0520 0.977 0.008 0.984 0.000 0 0 0.008
#> ERR878010 2 0.0547 0.980 0.020 0.980 0.000 0 0 0.000
#> ERR862943 3 0.3843 0.366 0.000 0.000 0.548 0 0 0.452
#> ERR862961 3 0.3843 0.366 0.000 0.000 0.548 0 0 0.452
#> ERR878011 3 0.3833 0.367 0.000 0.000 0.556 0 0 0.444
#> ERR862944 3 0.3843 0.366 0.000 0.000 0.548 0 0 0.452
#> ERR862962 3 0.3843 0.366 0.000 0.000 0.548 0 0 0.452
#> ERR878012 3 0.3833 0.367 0.000 0.000 0.556 0 0 0.444
#> ERR862945 4 0.0000 1.000 0.000 0.000 0.000 1 0 0.000
#> ERR862963 4 0.0000 1.000 0.000 0.000 0.000 1 0 0.000
#> ERR878013 4 0.0000 1.000 0.000 0.000 0.000 1 0 0.000
#> ERR862946 4 0.0000 1.000 0.000 0.000 0.000 1 0 0.000
#> ERR862964 4 0.0000 1.000 0.000 0.000 0.000 1 0 0.000
#> ERR878014 4 0.0000 1.000 0.000 0.000 0.000 1 0 0.000
#> ERR862947 5 0.0000 1.000 0.000 0.000 0.000 0 1 0.000
#> ERR862965 5 0.0000 1.000 0.000 0.000 0.000 0 1 0.000
#> ERR878015 5 0.0000 1.000 0.000 0.000 0.000 0 1 0.000
#> ERR862948 5 0.0000 1.000 0.000 0.000 0.000 0 1 0.000
#> ERR862966 5 0.0000 1.000 0.000 0.000 0.000 0 1 0.000
#> ERR878016 5 0.0000 1.000 0.000 0.000 0.000 0 1 0.000
#> ERR862949 2 0.0260 0.975 0.000 0.992 0.000 0 0 0.008
#> ERR862967 2 0.0260 0.975 0.000 0.992 0.000 0 0 0.008
#> ERR878017 2 0.0363 0.981 0.012 0.988 0.000 0 0 0.000
#> ERR862950 2 0.0260 0.975 0.000 0.992 0.000 0 0 0.008
#> ERR862968 2 0.0260 0.975 0.000 0.992 0.000 0 0 0.008
#> ERR878018 2 0.0291 0.979 0.004 0.992 0.000 0 0 0.004
#> ERR862951 1 0.2487 0.799 0.876 0.032 0.092 0 0 0.000
#> ERR862969 1 0.2412 0.799 0.880 0.028 0.092 0 0 0.000
#> ERR878019 1 0.2361 0.801 0.884 0.028 0.088 0 0 0.000
#> ERR862952 1 0.2412 0.799 0.880 0.028 0.092 0 0 0.000
#> ERR862970 1 0.2412 0.799 0.880 0.028 0.092 0 0 0.000
#> ERR878020 1 0.2412 0.799 0.880 0.028 0.092 0 0 0.000
#> ERR862953 1 0.1531 0.802 0.928 0.004 0.068 0 0 0.000
#> ERR862971 1 0.1745 0.803 0.920 0.012 0.068 0 0 0.000
#> ERR878021 1 0.1531 0.802 0.928 0.004 0.068 0 0 0.000
#> ERR862954 1 0.1531 0.802 0.928 0.004 0.068 0 0 0.000
#> ERR862972 1 0.1531 0.802 0.928 0.004 0.068 0 0 0.000
#> ERR878022 1 0.1644 0.800 0.920 0.004 0.076 0 0 0.000
#> ERR862955 1 0.1850 0.801 0.924 0.052 0.008 0 0 0.016
#> ERR862973 1 0.1738 0.800 0.928 0.052 0.004 0 0 0.016
#> ERR878023 1 0.1719 0.798 0.924 0.060 0.000 0 0 0.016
#> ERR862956 1 0.1719 0.798 0.924 0.060 0.000 0 0 0.016
#> ERR862974 1 0.1719 0.798 0.924 0.060 0.000 0 0 0.016
#> ERR878024 1 0.1719 0.798 0.924 0.060 0.000 0 0 0.016
#> ERR862975 1 0.4045 0.589 0.564 0.000 0.428 0 0 0.008
#> ERR866150 1 0.3833 0.579 0.556 0.000 0.444 0 0 0.000
#> ERR866168 1 0.3833 0.579 0.556 0.000 0.444 0 0 0.000
#> ERR862976 1 0.4289 0.573 0.556 0.000 0.424 0 0 0.020
#> ERR866151 1 0.3833 0.579 0.556 0.000 0.444 0 0 0.000
#> ERR866169 1 0.3833 0.579 0.556 0.000 0.444 0 0 0.000
#> ERR862977 1 0.1719 0.798 0.924 0.060 0.000 0 0 0.016
#> ERR866152 1 0.1719 0.798 0.924 0.060 0.000 0 0 0.016
#> ERR866170 1 0.1719 0.798 0.924 0.060 0.000 0 0 0.016
#> ERR862978 1 0.1719 0.798 0.924 0.060 0.000 0 0 0.016
#> ERR866153 1 0.1719 0.798 0.924 0.060 0.000 0 0 0.016
#> ERR866171 1 0.1719 0.798 0.924 0.060 0.000 0 0 0.016
#> ERR862979 2 0.0458 0.980 0.016 0.984 0.000 0 0 0.000
#> ERR866154 2 0.0632 0.975 0.024 0.976 0.000 0 0 0.000
#> ERR866172 2 0.0790 0.968 0.032 0.968 0.000 0 0 0.000
#> ERR862980 2 0.0458 0.980 0.016 0.984 0.000 0 0 0.000
#> ERR866155 2 0.1663 0.899 0.088 0.912 0.000 0 0 0.000
#> ERR866173 2 0.1501 0.916 0.076 0.924 0.000 0 0 0.000
#> ERR862981 3 0.4569 0.617 0.156 0.000 0.700 0 0 0.144
#> ERR866156 3 0.4566 0.614 0.160 0.000 0.700 0 0 0.140
#> ERR866174 3 0.4603 0.618 0.156 0.000 0.696 0 0 0.148
#> ERR866157 3 0.4569 0.617 0.156 0.000 0.700 0 0 0.144
#> ERR866175 3 0.4569 0.617 0.156 0.000 0.700 0 0 0.144
#> ERR862983 3 0.4277 0.515 0.064 0.000 0.700 0 0 0.236
#> ERR866158 3 0.4254 0.512 0.072 0.000 0.712 0 0 0.216
#> ERR866176 3 0.4254 0.512 0.072 0.000 0.712 0 0 0.216
#> ERR862984 3 0.4254 0.512 0.072 0.000 0.712 0 0 0.216
#> ERR866159 3 0.4254 0.512 0.072 0.000 0.712 0 0 0.216
#> ERR866177 3 0.4254 0.512 0.072 0.000 0.712 0 0 0.216
#> ERR862985 3 0.4792 0.628 0.148 0.000 0.672 0 0 0.180
#> ERR866160 3 0.4792 0.628 0.148 0.000 0.672 0 0 0.180
#> ERR866178 3 0.4765 0.627 0.152 0.000 0.676 0 0 0.172
#> ERR862986 3 0.4858 0.626 0.156 0.000 0.664 0 0 0.180
#> ERR866161 3 0.4792 0.628 0.148 0.000 0.672 0 0 0.180
#> ERR866179 3 0.4792 0.628 0.148 0.000 0.672 0 0 0.180
#> ERR862987 2 0.0260 0.980 0.008 0.992 0.000 0 0 0.000
#> ERR866162 2 0.0363 0.981 0.012 0.988 0.000 0 0 0.000
#> ERR866180 2 0.0363 0.981 0.012 0.988 0.000 0 0 0.000
#> ERR862988 2 0.0632 0.978 0.024 0.976 0.000 0 0 0.000
#> ERR866163 2 0.0363 0.981 0.012 0.988 0.000 0 0 0.000
#> ERR866181 2 0.0260 0.980 0.008 0.992 0.000 0 0 0.000
#> ERR862989 1 0.3828 0.458 0.560 0.000 0.440 0 0 0.000
#> ERR866164 1 0.3499 0.678 0.680 0.000 0.320 0 0 0.000
#> ERR866182 1 0.3482 0.681 0.684 0.000 0.316 0 0 0.000
#> ERR862990 1 0.3499 0.680 0.680 0.000 0.320 0 0 0.000
#> ERR866165 1 0.3668 0.673 0.668 0.000 0.328 0 0 0.004
#> ERR866183 1 0.3652 0.676 0.672 0.000 0.324 0 0 0.004
#> ERR862991 2 0.0363 0.981 0.012 0.988 0.000 0 0 0.000
#> ERR866166 2 0.0363 0.981 0.012 0.988 0.000 0 0 0.000
#> ERR866184 2 0.1007 0.956 0.044 0.956 0.000 0 0 0.000
#> ERR862992 2 0.0260 0.980 0.008 0.992 0.000 0 0 0.000
#> ERR866167 2 0.0363 0.981 0.012 0.988 0.000 0 0 0.000
#> ERR866185 2 0.0547 0.979 0.020 0.980 0.000 0 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)

consensus_heatmap(res, k = 3)

consensus_heatmap(res, k = 4)

consensus_heatmap(res, k = 5)

consensus_heatmap(res, k = 6)

Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)

membership_heatmap(res, k = 3)

membership_heatmap(res, k = 4)

membership_heatmap(res, k = 5)

membership_heatmap(res, k = 6)

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)

get_signatures(res, k = 3)

get_signatures(res, k = 4)

get_signatures(res, k = 5)

get_signatures(res, k = 6)

Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)

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

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

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

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

Compare the overlap of signatures from different k:
compare_signatures(res)

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.
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:
which_row
: row indices corresponding to the input matrix.
fdr
: FDR for the differential test.
mean_x
: The mean value in group x.
scaled_mean_x
: The mean value in group x after rows are scaled.
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")

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

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

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

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

Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)

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"]
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 15818 rows and 107 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)

The plots are:
- The first row: a plot of the ECDF (empirical cumulative distribution
function) curves of the consensus matrix for each
k
and the heatmap of
predicted classes for each k
.
- The second row: heatmaps of the consensus matrix for each
k
.
- The third row: heatmaps of the membership matrix for each
k
.
- The fouth row: heatmaps of the signatures for each
k
.
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:
- ECDF curves of the consensus matrix for each
k
;
- 1-PAC. The PAC
score
measures the proportion of the ambiguous subgrouping.
- Mean silhouette score.
- Concordance. The mean probability of fiting the consensus class ids in all
partitions.
- Area increased. Denote \(A_k\) as the area under the ECDF curve for current
k
, the area increased is defined as \(A_k - A_{k-1}\).
- Rand index. The percent of pairs of samples that are both in a same cluster
or both are not in a same cluster in the partition of k and k-1.
- Jaccard index. The ratio of pairs of samples are both in a same cluster in
the partition of k and k-1 and the pairs of samples are both in a same
cluster in the partition k or k-1.
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)

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.945 0.978 0.5035 0.495 0.495
#> 3 3 0.868 0.928 0.966 0.2338 0.664 0.443
#> 4 4 0.572 0.693 0.827 0.1355 0.789 0.521
#> 5 5 0.759 0.730 0.877 0.0684 0.787 0.439
#> 6 6 0.664 0.596 0.752 0.0694 0.896 0.620
suggest_best_k()
suggests the best \(k\) based on these statistics. The rules are as follows:
- All \(k\) with Jaccard index larger than 0.95 are removed because increasing
\(k\) does not provide enough extra information. If all \(k\) are removed, it is
marked as no subgroup is detected.
- For all \(k\) with 1-PAC score larger than 0.9, the maximal \(k\) is taken as
the best \(k\), and other \(k\) are marked as optional \(k\).
- If it does not fit the second rule. The \(k\) with the maximal vote of the
highest 1-PAC score, highest mean silhouette, and highest concordance is
taken as the best \(k\).
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
#> ERR862939 1 0.000 1.000 1.000 0.000
#> ERR862957 1 0.000 1.000 1.000 0.000
#> ERR878007 1 0.000 1.000 1.000 0.000
#> ERR862940 1 0.000 1.000 1.000 0.000
#> ERR862958 1 0.000 1.000 1.000 0.000
#> ERR878008 1 0.000 1.000 1.000 0.000
#> ERR862941 2 0.000 0.955 0.000 1.000
#> ERR862959 2 0.000 0.955 0.000 1.000
#> ERR878009 2 0.000 0.955 0.000 1.000
#> ERR862942 2 0.000 0.955 0.000 1.000
#> ERR862960 2 0.000 0.955 0.000 1.000
#> ERR878010 2 0.000 0.955 0.000 1.000
#> ERR862943 1 0.000 1.000 1.000 0.000
#> ERR862961 1 0.000 1.000 1.000 0.000
#> ERR878011 1 0.000 1.000 1.000 0.000
#> ERR862944 1 0.000 1.000 1.000 0.000
#> ERR862962 1 0.000 1.000 1.000 0.000
#> ERR878012 1 0.000 1.000 1.000 0.000
#> ERR862945 1 0.000 1.000 1.000 0.000
#> ERR862963 1 0.000 1.000 1.000 0.000
#> ERR878013 1 0.000 1.000 1.000 0.000
#> ERR862946 1 0.000 1.000 1.000 0.000
#> ERR862964 1 0.000 1.000 1.000 0.000
#> ERR878014 1 0.000 1.000 1.000 0.000
#> ERR862947 2 0.000 0.955 0.000 1.000
#> ERR862965 2 0.000 0.955 0.000 1.000
#> ERR878015 2 0.000 0.955 0.000 1.000
#> ERR862948 2 0.000 0.955 0.000 1.000
#> ERR862966 2 0.000 0.955 0.000 1.000
#> ERR878016 2 0.000 0.955 0.000 1.000
#> ERR862949 2 0.000 0.955 0.000 1.000
#> ERR862967 2 0.000 0.955 0.000 1.000
#> ERR878017 2 0.000 0.955 0.000 1.000
#> ERR862950 2 0.000 0.955 0.000 1.000
#> ERR862968 2 0.000 0.955 0.000 1.000
#> ERR878018 2 0.000 0.955 0.000 1.000
#> ERR862951 1 0.000 1.000 1.000 0.000
#> ERR862969 1 0.000 1.000 1.000 0.000
#> ERR878019 1 0.000 1.000 1.000 0.000
#> ERR862952 1 0.000 1.000 1.000 0.000
#> ERR862970 1 0.000 1.000 1.000 0.000
#> ERR878020 1 0.000 1.000 1.000 0.000
#> ERR862953 2 0.996 0.208 0.464 0.536
#> ERR862971 2 1.000 0.114 0.492 0.508
#> ERR878021 2 0.975 0.367 0.408 0.592
#> ERR862954 2 0.975 0.367 0.408 0.592
#> ERR862972 2 0.904 0.556 0.320 0.680
#> ERR878022 2 0.833 0.651 0.264 0.736
#> ERR862955 2 0.000 0.955 0.000 1.000
#> ERR862973 2 0.000 0.955 0.000 1.000
#> ERR878023 2 0.000 0.955 0.000 1.000
#> ERR862956 2 0.000 0.955 0.000 1.000
#> ERR862974 2 0.000 0.955 0.000 1.000
#> ERR878024 2 0.000 0.955 0.000 1.000
#> ERR862975 1 0.000 1.000 1.000 0.000
#> ERR866150 1 0.000 1.000 1.000 0.000
#> ERR866168 1 0.000 1.000 1.000 0.000
#> ERR862976 1 0.000 1.000 1.000 0.000
#> ERR866151 1 0.000 1.000 1.000 0.000
#> ERR866169 1 0.000 1.000 1.000 0.000
#> ERR862977 2 0.000 0.955 0.000 1.000
#> ERR866152 2 0.000 0.955 0.000 1.000
#> ERR866170 2 0.000 0.955 0.000 1.000
#> ERR862978 2 0.000 0.955 0.000 1.000
#> ERR866153 2 0.000 0.955 0.000 1.000
#> ERR866171 2 0.000 0.955 0.000 1.000
#> ERR862979 2 0.000 0.955 0.000 1.000
#> ERR866154 2 0.000 0.955 0.000 1.000
#> ERR866172 2 0.000 0.955 0.000 1.000
#> ERR862980 2 0.000 0.955 0.000 1.000
#> ERR866155 2 0.000 0.955 0.000 1.000
#> ERR866173 2 0.000 0.955 0.000 1.000
#> ERR862981 1 0.000 1.000 1.000 0.000
#> ERR866156 1 0.000 1.000 1.000 0.000
#> ERR866174 1 0.000 1.000 1.000 0.000
#> ERR866157 1 0.000 1.000 1.000 0.000
#> ERR866175 1 0.000 1.000 1.000 0.000
#> ERR862983 1 0.000 1.000 1.000 0.000
#> ERR866158 1 0.000 1.000 1.000 0.000
#> ERR866176 1 0.000 1.000 1.000 0.000
#> ERR862984 1 0.000 1.000 1.000 0.000
#> ERR866159 1 0.000 1.000 1.000 0.000
#> ERR866177 1 0.000 1.000 1.000 0.000
#> ERR862985 1 0.000 1.000 1.000 0.000
#> ERR866160 1 0.000 1.000 1.000 0.000
#> ERR866178 1 0.000 1.000 1.000 0.000
#> ERR862986 1 0.000 1.000 1.000 0.000
#> ERR866161 1 0.000 1.000 1.000 0.000
#> ERR866179 1 0.000 1.000 1.000 0.000
#> ERR862987 2 0.000 0.955 0.000 1.000
#> ERR866162 2 0.000 0.955 0.000 1.000
#> ERR866180 2 0.000 0.955 0.000 1.000
#> ERR862988 2 0.000 0.955 0.000 1.000
#> ERR866163 2 0.000 0.955 0.000 1.000
#> ERR866181 2 0.000 0.955 0.000 1.000
#> ERR862989 1 0.000 1.000 1.000 0.000
#> ERR866164 1 0.000 1.000 1.000 0.000
#> ERR866182 1 0.000 1.000 1.000 0.000
#> ERR862990 1 0.000 1.000 1.000 0.000
#> ERR866165 1 0.000 1.000 1.000 0.000
#> ERR866183 1 0.000 1.000 1.000 0.000
#> ERR862991 2 0.000 0.955 0.000 1.000
#> ERR866166 2 0.000 0.955 0.000 1.000
#> ERR866184 2 0.000 0.955 0.000 1.000
#> ERR862992 2 0.000 0.955 0.000 1.000
#> ERR866167 2 0.000 0.955 0.000 1.000
#> ERR866185 2 0.000 0.955 0.000 1.000
show/hide code output
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> ERR862939 3 0.5529 0.667 0.296 0.000 0.704
#> ERR862957 3 0.5397 0.692 0.280 0.000 0.720
#> ERR878007 3 0.6154 0.436 0.408 0.000 0.592
#> ERR862940 3 0.3116 0.863 0.108 0.000 0.892
#> ERR862958 3 0.3267 0.858 0.116 0.000 0.884
#> ERR878008 3 0.4291 0.808 0.180 0.000 0.820
#> ERR862941 2 0.0000 0.990 0.000 1.000 0.000
#> ERR862959 2 0.0000 0.990 0.000 1.000 0.000
#> ERR878009 2 0.0237 0.987 0.004 0.996 0.000
#> ERR862942 2 0.0000 0.990 0.000 1.000 0.000
#> ERR862960 2 0.0000 0.990 0.000 1.000 0.000
#> ERR878010 2 0.0237 0.987 0.004 0.996 0.000
#> ERR862943 3 0.0000 0.904 0.000 0.000 1.000
#> ERR862961 3 0.0000 0.904 0.000 0.000 1.000
#> ERR878011 3 0.0000 0.904 0.000 0.000 1.000
#> ERR862944 3 0.0000 0.904 0.000 0.000 1.000
#> ERR862962 3 0.0000 0.904 0.000 0.000 1.000
#> ERR878012 3 0.0000 0.904 0.000 0.000 1.000
#> ERR862945 3 0.0000 0.904 0.000 0.000 1.000
#> ERR862963 3 0.0000 0.904 0.000 0.000 1.000
#> ERR878013 3 0.0000 0.904 0.000 0.000 1.000
#> ERR862946 3 0.0000 0.904 0.000 0.000 1.000
#> ERR862964 3 0.0000 0.904 0.000 0.000 1.000
#> ERR878014 3 0.0000 0.904 0.000 0.000 1.000
#> ERR862947 2 0.0000 0.990 0.000 1.000 0.000
#> ERR862965 2 0.0000 0.990 0.000 1.000 0.000
#> ERR878015 2 0.0000 0.990 0.000 1.000 0.000
#> ERR862948 2 0.0000 0.990 0.000 1.000 0.000
#> ERR862966 2 0.0000 0.990 0.000 1.000 0.000
#> ERR878016 2 0.0000 0.990 0.000 1.000 0.000
#> ERR862949 2 0.0000 0.990 0.000 1.000 0.000
#> ERR862967 2 0.0000 0.990 0.000 1.000 0.000
#> ERR878017 2 0.0000 0.990 0.000 1.000 0.000
#> ERR862950 2 0.0000 0.990 0.000 1.000 0.000
#> ERR862968 2 0.0000 0.990 0.000 1.000 0.000
#> ERR878018 2 0.0000 0.990 0.000 1.000 0.000
#> ERR862951 1 0.0000 0.959 1.000 0.000 0.000
#> ERR862969 1 0.0000 0.959 1.000 0.000 0.000
#> ERR878019 1 0.0000 0.959 1.000 0.000 0.000
#> ERR862952 1 0.0000 0.959 1.000 0.000 0.000
#> ERR862970 1 0.0000 0.959 1.000 0.000 0.000
#> ERR878020 1 0.0000 0.959 1.000 0.000 0.000
#> ERR862953 1 0.0000 0.959 1.000 0.000 0.000
#> ERR862971 1 0.0000 0.959 1.000 0.000 0.000
#> ERR878021 1 0.0000 0.959 1.000 0.000 0.000
#> ERR862954 1 0.0000 0.959 1.000 0.000 0.000
#> ERR862972 1 0.0000 0.959 1.000 0.000 0.000
#> ERR878022 1 0.0000 0.959 1.000 0.000 0.000
#> ERR862955 1 0.3482 0.837 0.872 0.128 0.000
#> ERR862973 1 0.1031 0.944 0.976 0.024 0.000
#> ERR878023 1 0.0592 0.952 0.988 0.012 0.000
#> ERR862956 1 0.2796 0.881 0.908 0.092 0.000
#> ERR862974 1 0.2066 0.914 0.940 0.060 0.000
#> ERR878024 1 0.3816 0.812 0.852 0.148 0.000
#> ERR862975 1 0.0000 0.959 1.000 0.000 0.000
#> ERR866150 1 0.0000 0.959 1.000 0.000 0.000
#> ERR866168 1 0.0000 0.959 1.000 0.000 0.000
#> ERR862976 1 0.0000 0.959 1.000 0.000 0.000
#> ERR866151 1 0.0000 0.959 1.000 0.000 0.000
#> ERR866169 1 0.0000 0.959 1.000 0.000 0.000
#> ERR862977 1 0.2448 0.900 0.924 0.076 0.000
#> ERR866152 1 0.1411 0.935 0.964 0.036 0.000
#> ERR866170 1 0.1031 0.944 0.976 0.024 0.000
#> ERR862978 1 0.4062 0.792 0.836 0.164 0.000
#> ERR866153 1 0.1289 0.938 0.968 0.032 0.000
#> ERR866171 1 0.1411 0.935 0.964 0.036 0.000
#> ERR862979 2 0.0424 0.983 0.008 0.992 0.000
#> ERR866154 2 0.0892 0.971 0.020 0.980 0.000
#> ERR866172 2 0.0424 0.983 0.008 0.992 0.000
#> ERR862980 2 0.1163 0.962 0.028 0.972 0.000
#> ERR866155 2 0.4062 0.768 0.164 0.836 0.000
#> ERR866173 2 0.1289 0.957 0.032 0.968 0.000
#> ERR862981 1 0.0000 0.959 1.000 0.000 0.000
#> ERR866156 1 0.0000 0.959 1.000 0.000 0.000
#> ERR866174 1 0.0000 0.959 1.000 0.000 0.000
#> ERR866157 1 0.0000 0.959 1.000 0.000 0.000
#> ERR866175 1 0.0000 0.959 1.000 0.000 0.000
#> ERR862983 3 0.4654 0.762 0.208 0.000 0.792
#> ERR866158 1 0.4702 0.728 0.788 0.000 0.212
#> ERR866176 1 0.3116 0.866 0.892 0.000 0.108
#> ERR862984 1 0.5706 0.500 0.680 0.000 0.320
#> ERR866159 1 0.3816 0.816 0.852 0.000 0.148
#> ERR866177 1 0.4291 0.772 0.820 0.000 0.180
#> ERR862985 1 0.0000 0.959 1.000 0.000 0.000
#> ERR866160 1 0.0000 0.959 1.000 0.000 0.000
#> ERR866178 1 0.0000 0.959 1.000 0.000 0.000
#> ERR862986 1 0.0000 0.959 1.000 0.000 0.000
#> ERR866161 1 0.0000 0.959 1.000 0.000 0.000
#> ERR866179 1 0.0000 0.959 1.000 0.000 0.000
#> ERR862987 2 0.0000 0.990 0.000 1.000 0.000
#> ERR866162 2 0.0000 0.990 0.000 1.000 0.000
#> ERR866180 2 0.0000 0.990 0.000 1.000 0.000
#> ERR862988 2 0.0000 0.990 0.000 1.000 0.000
#> ERR866163 2 0.0000 0.990 0.000 1.000 0.000
#> ERR866181 2 0.0000 0.990 0.000 1.000 0.000
#> ERR862989 1 0.0000 0.959 1.000 0.000 0.000
#> ERR866164 1 0.0000 0.959 1.000 0.000 0.000
#> ERR866182 1 0.0000 0.959 1.000 0.000 0.000
#> ERR862990 1 0.0000 0.959 1.000 0.000 0.000
#> ERR866165 1 0.0000 0.959 1.000 0.000 0.000
#> ERR866183 1 0.0000 0.959 1.000 0.000 0.000
#> ERR862991 2 0.0000 0.990 0.000 1.000 0.000
#> ERR866166 2 0.0000 0.990 0.000 1.000 0.000
#> ERR866184 2 0.0000 0.990 0.000 1.000 0.000
#> ERR862992 2 0.0000 0.990 0.000 1.000 0.000
#> ERR866167 2 0.0000 0.990 0.000 1.000 0.000
#> ERR866185 2 0.0000 0.990 0.000 1.000 0.000
show/hide code output
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> ERR862939 3 0.4511 0.5833 0.040 0.000 0.784 0.176
#> ERR862957 3 0.4552 0.5852 0.044 0.000 0.784 0.172
#> ERR878007 3 0.4791 0.5921 0.080 0.000 0.784 0.136
#> ERR862940 3 0.3870 0.5682 0.004 0.000 0.788 0.208
#> ERR862958 3 0.3870 0.5682 0.004 0.000 0.788 0.208
#> ERR878008 3 0.4204 0.5737 0.020 0.000 0.788 0.192
#> ERR862941 2 0.2363 0.8473 0.056 0.920 0.024 0.000
#> ERR862959 2 0.0524 0.8614 0.008 0.988 0.004 0.000
#> ERR878009 2 0.2704 0.8260 0.124 0.876 0.000 0.000
#> ERR862942 2 0.3219 0.7984 0.164 0.836 0.000 0.000
#> ERR862960 2 0.2611 0.8374 0.096 0.896 0.008 0.000
#> ERR878010 2 0.2530 0.8299 0.112 0.888 0.000 0.000
#> ERR862943 3 0.3942 0.6291 0.000 0.000 0.764 0.236
#> ERR862961 3 0.3583 0.6774 0.004 0.000 0.816 0.180
#> ERR878011 3 0.3852 0.7059 0.008 0.000 0.800 0.192
#> ERR862944 3 0.3494 0.6851 0.004 0.000 0.824 0.172
#> ERR862962 3 0.3356 0.6790 0.000 0.000 0.824 0.176
#> ERR878012 3 0.3591 0.7157 0.008 0.000 0.824 0.168
#> ERR862945 4 0.0188 1.0000 0.000 0.000 0.004 0.996
#> ERR862963 4 0.0188 1.0000 0.000 0.000 0.004 0.996
#> ERR878013 4 0.0188 1.0000 0.000 0.000 0.004 0.996
#> ERR862946 4 0.0188 1.0000 0.000 0.000 0.004 0.996
#> ERR862964 4 0.0188 1.0000 0.000 0.000 0.004 0.996
#> ERR878014 4 0.0188 1.0000 0.000 0.000 0.004 0.996
#> ERR862947 2 0.0188 0.8600 0.000 0.996 0.000 0.004
#> ERR862965 2 0.0188 0.8600 0.000 0.996 0.000 0.004
#> ERR878015 2 0.0188 0.8600 0.000 0.996 0.000 0.004
#> ERR862948 2 0.0188 0.8600 0.000 0.996 0.000 0.004
#> ERR862966 2 0.0188 0.8600 0.000 0.996 0.000 0.004
#> ERR878016 2 0.0188 0.8600 0.000 0.996 0.000 0.004
#> ERR862949 2 0.0524 0.8610 0.008 0.988 0.004 0.000
#> ERR862967 2 0.0188 0.8610 0.004 0.996 0.000 0.000
#> ERR878017 2 0.0921 0.8583 0.028 0.972 0.000 0.000
#> ERR862950 2 0.0000 0.8602 0.000 1.000 0.000 0.000
#> ERR862968 2 0.0188 0.8603 0.000 0.996 0.004 0.000
#> ERR878018 2 0.0000 0.8602 0.000 1.000 0.000 0.000
#> ERR862951 1 0.5193 0.2799 0.580 0.000 0.412 0.008
#> ERR862969 3 0.4972 0.1871 0.456 0.000 0.544 0.000
#> ERR878019 1 0.4955 0.1813 0.556 0.000 0.444 0.000
#> ERR862952 3 0.4661 0.4930 0.348 0.000 0.652 0.000
#> ERR862970 3 0.4843 0.3772 0.396 0.000 0.604 0.000
#> ERR878020 3 0.4985 0.1415 0.468 0.000 0.532 0.000
#> ERR862953 1 0.2345 0.7568 0.900 0.000 0.100 0.000
#> ERR862971 1 0.1118 0.7656 0.964 0.000 0.036 0.000
#> ERR878021 1 0.2704 0.7456 0.876 0.000 0.124 0.000
#> ERR862954 1 0.2149 0.7594 0.912 0.000 0.088 0.000
#> ERR862972 1 0.1716 0.7634 0.936 0.000 0.064 0.000
#> ERR878022 1 0.2814 0.7410 0.868 0.000 0.132 0.000
#> ERR862955 1 0.2089 0.7417 0.932 0.048 0.020 0.000
#> ERR862973 1 0.1929 0.7455 0.940 0.036 0.024 0.000
#> ERR878023 1 0.1297 0.7559 0.964 0.020 0.016 0.000
#> ERR862956 1 0.1722 0.7486 0.944 0.048 0.008 0.000
#> ERR862974 1 0.1488 0.7540 0.956 0.032 0.012 0.000
#> ERR878024 1 0.1151 0.7601 0.968 0.024 0.008 0.000
#> ERR862975 1 0.4853 0.6666 0.744 0.000 0.220 0.036
#> ERR866150 1 0.4764 0.6684 0.748 0.000 0.220 0.032
#> ERR866168 1 0.4671 0.6695 0.752 0.000 0.220 0.028
#> ERR862976 1 0.4818 0.6714 0.748 0.000 0.216 0.036
#> ERR866151 1 0.4538 0.6745 0.760 0.000 0.216 0.024
#> ERR866169 1 0.4635 0.6742 0.756 0.000 0.216 0.028
#> ERR862977 1 0.2401 0.7509 0.904 0.092 0.004 0.000
#> ERR866152 1 0.2224 0.7688 0.928 0.040 0.032 0.000
#> ERR866170 1 0.2089 0.7672 0.932 0.048 0.020 0.000
#> ERR862978 1 0.2345 0.7394 0.900 0.100 0.000 0.000
#> ERR866153 1 0.2214 0.7675 0.928 0.044 0.028 0.000
#> ERR866171 1 0.1837 0.7681 0.944 0.028 0.028 0.000
#> ERR862979 2 0.5417 0.7353 0.240 0.704 0.056 0.000
#> ERR866154 2 0.5038 0.6501 0.336 0.652 0.012 0.000
#> ERR866172 2 0.4220 0.7496 0.248 0.748 0.004 0.000
#> ERR862980 2 0.5193 0.6587 0.324 0.656 0.020 0.000
#> ERR866155 1 0.5165 -0.2030 0.512 0.484 0.004 0.000
#> ERR866173 2 0.4933 0.4166 0.432 0.568 0.000 0.000
#> ERR862981 3 0.1637 0.7599 0.060 0.000 0.940 0.000
#> ERR866156 3 0.3528 0.7144 0.192 0.000 0.808 0.000
#> ERR866174 3 0.3528 0.7131 0.192 0.000 0.808 0.000
#> ERR866157 3 0.1716 0.7569 0.064 0.000 0.936 0.000
#> ERR866175 3 0.1637 0.7558 0.060 0.000 0.940 0.000
#> ERR862983 3 0.4839 0.7189 0.052 0.000 0.764 0.184
#> ERR866158 3 0.5383 0.7288 0.128 0.000 0.744 0.128
#> ERR866176 3 0.5382 0.7287 0.124 0.000 0.744 0.132
#> ERR862984 3 0.5272 0.7207 0.084 0.000 0.744 0.172
#> ERR866159 3 0.5744 0.7023 0.108 0.000 0.708 0.184
#> ERR866177 3 0.5863 0.6984 0.120 0.000 0.700 0.180
#> ERR862985 3 0.3266 0.7109 0.168 0.000 0.832 0.000
#> ERR866160 3 0.3356 0.7355 0.176 0.000 0.824 0.000
#> ERR866178 3 0.3444 0.7301 0.184 0.000 0.816 0.000
#> ERR862986 3 0.1637 0.7538 0.060 0.000 0.940 0.000
#> ERR866161 3 0.2704 0.7549 0.124 0.000 0.876 0.000
#> ERR866179 3 0.2921 0.7490 0.140 0.000 0.860 0.000
#> ERR862987 2 0.0469 0.8585 0.000 0.988 0.012 0.000
#> ERR866162 2 0.0188 0.8598 0.000 0.996 0.004 0.000
#> ERR866180 2 0.0000 0.8602 0.000 1.000 0.000 0.000
#> ERR862988 2 0.1109 0.8510 0.004 0.968 0.028 0.000
#> ERR866163 2 0.1209 0.8484 0.004 0.964 0.032 0.000
#> ERR866181 2 0.0921 0.8516 0.000 0.972 0.028 0.000
#> ERR862989 3 0.4843 0.5076 0.396 0.000 0.604 0.000
#> ERR866164 1 0.4697 0.3311 0.644 0.000 0.356 0.000
#> ERR866182 1 0.4817 0.2505 0.612 0.000 0.388 0.000
#> ERR862990 1 0.4277 0.5029 0.720 0.000 0.280 0.000
#> ERR866165 1 0.3402 0.7034 0.832 0.000 0.164 0.004
#> ERR866183 1 0.4250 0.5601 0.724 0.000 0.276 0.000
#> ERR862991 2 0.4718 0.7160 0.280 0.708 0.012 0.000
#> ERR866166 1 0.4978 0.2212 0.664 0.324 0.012 0.000
#> ERR866184 1 0.5040 0.0976 0.628 0.364 0.008 0.000
#> ERR862992 2 0.5167 0.6441 0.340 0.644 0.016 0.000
#> ERR866167 2 0.5070 0.5112 0.416 0.580 0.004 0.000
#> ERR866185 2 0.5168 0.3304 0.492 0.504 0.004 0.000
show/hide code output
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> ERR862939 3 0.1026 0.77126 0.024 0.004 0.968 0.004 0.000
#> ERR862957 3 0.0932 0.77015 0.020 0.004 0.972 0.004 0.000
#> ERR878007 3 0.1695 0.76155 0.044 0.008 0.940 0.008 0.000
#> ERR862940 3 0.0671 0.76753 0.016 0.000 0.980 0.004 0.000
#> ERR862958 3 0.0671 0.76753 0.016 0.000 0.980 0.004 0.000
#> ERR878008 3 0.0932 0.77065 0.020 0.004 0.972 0.004 0.000
#> ERR862941 5 0.1484 0.90186 0.000 0.008 0.048 0.000 0.944
#> ERR862959 5 0.0404 0.92435 0.000 0.000 0.012 0.000 0.988
#> ERR878009 5 0.4029 0.45133 0.000 0.316 0.004 0.000 0.680
#> ERR862942 5 0.3078 0.79266 0.004 0.132 0.016 0.000 0.848
#> ERR862960 5 0.1568 0.90632 0.000 0.020 0.036 0.000 0.944
#> ERR878010 5 0.4283 -0.00629 0.000 0.456 0.000 0.000 0.544
#> ERR862943 1 0.3990 0.50633 0.688 0.000 0.308 0.004 0.000
#> ERR862961 1 0.3366 0.62238 0.768 0.000 0.232 0.000 0.000
#> ERR878011 1 0.1608 0.73743 0.928 0.000 0.072 0.000 0.000
#> ERR862944 1 0.3109 0.65501 0.800 0.000 0.200 0.000 0.000
#> ERR862962 1 0.3424 0.61093 0.760 0.000 0.240 0.000 0.000
#> ERR878012 1 0.1732 0.73375 0.920 0.000 0.080 0.000 0.000
#> ERR862945 4 0.0290 1.00000 0.000 0.000 0.008 0.992 0.000
#> ERR862963 4 0.0290 1.00000 0.000 0.000 0.008 0.992 0.000
#> ERR878013 4 0.0290 1.00000 0.000 0.000 0.008 0.992 0.000
#> ERR862946 4 0.0290 1.00000 0.000 0.000 0.008 0.992 0.000
#> ERR862964 4 0.0290 1.00000 0.000 0.000 0.008 0.992 0.000
#> ERR878014 4 0.0290 1.00000 0.000 0.000 0.008 0.992 0.000
#> ERR862947 5 0.0162 0.92541 0.000 0.000 0.004 0.000 0.996
#> ERR862965 5 0.0162 0.92541 0.000 0.000 0.004 0.000 0.996
#> ERR878015 5 0.0162 0.92541 0.000 0.000 0.004 0.000 0.996
#> ERR862948 5 0.0162 0.92541 0.000 0.000 0.004 0.000 0.996
#> ERR862966 5 0.0162 0.92541 0.000 0.000 0.004 0.000 0.996
#> ERR878016 5 0.0162 0.92541 0.000 0.000 0.004 0.000 0.996
#> ERR862949 5 0.0324 0.92447 0.000 0.004 0.004 0.000 0.992
#> ERR862967 5 0.0162 0.92483 0.000 0.004 0.000 0.000 0.996
#> ERR878017 5 0.0963 0.90397 0.000 0.036 0.000 0.000 0.964
#> ERR862950 5 0.0000 0.92517 0.000 0.000 0.000 0.000 1.000
#> ERR862968 5 0.0162 0.92508 0.000 0.000 0.004 0.000 0.996
#> ERR878018 5 0.0162 0.92483 0.000 0.004 0.000 0.000 0.996
#> ERR862951 1 0.1116 0.74370 0.964 0.028 0.004 0.004 0.000
#> ERR862969 1 0.0932 0.74691 0.972 0.020 0.004 0.004 0.000
#> ERR878019 1 0.1205 0.74107 0.956 0.040 0.000 0.004 0.000
#> ERR862952 1 0.0324 0.74761 0.992 0.004 0.004 0.000 0.000
#> ERR862970 1 0.0566 0.74788 0.984 0.004 0.012 0.000 0.000
#> ERR878020 1 0.0510 0.74582 0.984 0.016 0.000 0.000 0.000
#> ERR862953 2 0.2516 0.78668 0.140 0.860 0.000 0.000 0.000
#> ERR862971 2 0.1522 0.86058 0.044 0.944 0.012 0.000 0.000
#> ERR878021 2 0.1768 0.84616 0.072 0.924 0.004 0.000 0.000
#> ERR862954 2 0.1792 0.84158 0.084 0.916 0.000 0.000 0.000
#> ERR862972 2 0.1121 0.86205 0.044 0.956 0.000 0.000 0.000
#> ERR878022 2 0.2439 0.81308 0.120 0.876 0.004 0.000 0.000
#> ERR862955 2 0.0324 0.86889 0.004 0.992 0.000 0.000 0.004
#> ERR862973 2 0.0324 0.86747 0.004 0.992 0.004 0.000 0.000
#> ERR878023 2 0.0000 0.86788 0.000 1.000 0.000 0.000 0.000
#> ERR862956 2 0.0324 0.86831 0.004 0.992 0.000 0.000 0.004
#> ERR862974 2 0.0162 0.86799 0.004 0.996 0.000 0.000 0.000
#> ERR878024 2 0.0290 0.86836 0.008 0.992 0.000 0.000 0.000
#> ERR862975 1 0.2141 0.72888 0.916 0.064 0.004 0.016 0.000
#> ERR866150 1 0.2664 0.71283 0.884 0.092 0.004 0.020 0.000
#> ERR866168 1 0.2289 0.72234 0.904 0.080 0.004 0.012 0.000
#> ERR862976 1 0.2550 0.71638 0.892 0.084 0.004 0.020 0.000
#> ERR866151 1 0.2102 0.72661 0.916 0.068 0.004 0.012 0.000
#> ERR866169 1 0.2407 0.71724 0.896 0.088 0.004 0.012 0.000
#> ERR862977 2 0.0912 0.86992 0.016 0.972 0.000 0.000 0.012
#> ERR866152 2 0.1195 0.86792 0.028 0.960 0.000 0.000 0.012
#> ERR866170 2 0.1059 0.86882 0.020 0.968 0.000 0.004 0.008
#> ERR862978 2 0.0960 0.86938 0.016 0.972 0.000 0.004 0.008
#> ERR866153 2 0.1059 0.86883 0.020 0.968 0.000 0.004 0.008
#> ERR866171 2 0.0932 0.86865 0.020 0.972 0.000 0.004 0.004
#> ERR862979 2 0.6388 0.43575 0.000 0.516 0.244 0.000 0.240
#> ERR866154 2 0.4370 0.55926 0.004 0.656 0.008 0.000 0.332
#> ERR866172 2 0.4464 0.40638 0.000 0.584 0.008 0.000 0.408
#> ERR862980 2 0.3612 0.76045 0.000 0.800 0.028 0.000 0.172
#> ERR866155 2 0.3837 0.61648 0.000 0.692 0.000 0.000 0.308
#> ERR866173 2 0.4067 0.62171 0.008 0.692 0.000 0.000 0.300
#> ERR862981 1 0.4359 0.22412 0.584 0.004 0.412 0.000 0.000
#> ERR866156 1 0.3318 0.64703 0.800 0.008 0.192 0.000 0.000
#> ERR866174 1 0.3282 0.65115 0.804 0.008 0.188 0.000 0.000
#> ERR866157 3 0.4440 0.12614 0.468 0.004 0.528 0.000 0.000
#> ERR866175 3 0.4383 0.27480 0.424 0.004 0.572 0.000 0.000
#> ERR862983 1 0.1410 0.74191 0.940 0.000 0.060 0.000 0.000
#> ERR866158 1 0.1270 0.74461 0.948 0.000 0.052 0.000 0.000
#> ERR866176 1 0.1197 0.74538 0.952 0.000 0.048 0.000 0.000
#> ERR862984 1 0.1270 0.74487 0.948 0.000 0.052 0.000 0.000
#> ERR866159 1 0.0963 0.74707 0.964 0.000 0.036 0.000 0.000
#> ERR866177 1 0.0703 0.74730 0.976 0.000 0.024 0.000 0.000
#> ERR862985 3 0.2777 0.74668 0.120 0.016 0.864 0.000 0.000
#> ERR866160 1 0.4599 0.35967 0.624 0.020 0.356 0.000 0.000
#> ERR866178 1 0.4366 0.44175 0.664 0.016 0.320 0.000 0.000
#> ERR862986 3 0.4232 0.52645 0.312 0.012 0.676 0.000 0.000
#> ERR866161 1 0.4444 0.35722 0.624 0.012 0.364 0.000 0.000
#> ERR866179 1 0.4402 0.38363 0.636 0.012 0.352 0.000 0.000
#> ERR862987 5 0.0898 0.92005 0.000 0.020 0.008 0.000 0.972
#> ERR866162 5 0.0771 0.92137 0.000 0.020 0.004 0.000 0.976
#> ERR866180 5 0.0771 0.92124 0.000 0.020 0.004 0.000 0.976
#> ERR862988 5 0.1725 0.89707 0.000 0.020 0.044 0.000 0.936
#> ERR866163 5 0.1992 0.89033 0.000 0.032 0.044 0.000 0.924
#> ERR866181 5 0.1753 0.90040 0.000 0.032 0.032 0.000 0.936
#> ERR862989 1 0.5691 0.17406 0.536 0.088 0.376 0.000 0.000
#> ERR866164 1 0.4161 0.28683 0.608 0.392 0.000 0.000 0.000
#> ERR866182 1 0.4218 0.43671 0.660 0.332 0.008 0.000 0.000
#> ERR862990 1 0.4302 -0.01391 0.520 0.480 0.000 0.000 0.000
#> ERR866165 2 0.4446 0.12177 0.476 0.520 0.004 0.000 0.000
#> ERR866183 1 0.4235 0.19530 0.576 0.424 0.000 0.000 0.000
#> ERR862991 2 0.2669 0.81585 0.000 0.876 0.020 0.000 0.104
#> ERR866166 2 0.0798 0.86271 0.000 0.976 0.008 0.000 0.016
#> ERR866184 2 0.0671 0.86436 0.000 0.980 0.004 0.000 0.016
#> ERR862992 2 0.2069 0.83719 0.000 0.912 0.012 0.000 0.076
#> ERR866167 2 0.1502 0.85108 0.000 0.940 0.004 0.000 0.056
#> ERR866185 2 0.1043 0.86012 0.000 0.960 0.000 0.000 0.040
show/hide code output
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> ERR862939 6 0.3847 0.0964 0.000 0.000 0.456 0.000 0.000 0.544
#> ERR862957 6 0.3857 0.0743 0.000 0.000 0.468 0.000 0.000 0.532
#> ERR878007 6 0.3351 0.3408 0.000 0.000 0.288 0.000 0.000 0.712
#> ERR862940 3 0.3854 -0.1108 0.000 0.000 0.536 0.000 0.000 0.464
#> ERR862958 3 0.3843 -0.0865 0.000 0.000 0.548 0.000 0.000 0.452
#> ERR878008 3 0.3868 -0.1537 0.000 0.000 0.504 0.000 0.000 0.496
#> ERR862941 5 0.1245 0.7939 0.000 0.000 0.032 0.000 0.952 0.016
#> ERR862959 5 0.0000 0.8084 0.000 0.000 0.000 0.000 1.000 0.000
#> ERR878009 5 0.4214 0.4683 0.000 0.044 0.000 0.000 0.680 0.276
#> ERR862942 5 0.2014 0.7875 0.016 0.024 0.004 0.000 0.924 0.032
#> ERR862960 5 0.2149 0.7771 0.000 0.016 0.004 0.000 0.900 0.080
#> ERR878010 5 0.3649 0.6035 0.000 0.040 0.000 0.000 0.764 0.196
#> ERR862943 3 0.6068 0.4406 0.344 0.000 0.508 0.048 0.000 0.100
#> ERR862961 3 0.5331 0.3888 0.428 0.000 0.484 0.008 0.000 0.080
#> ERR878011 1 0.3357 0.4507 0.764 0.000 0.224 0.004 0.000 0.008
#> ERR862944 3 0.5097 0.4027 0.420 0.000 0.508 0.004 0.000 0.068
#> ERR862962 3 0.5060 0.5397 0.336 0.000 0.580 0.004 0.000 0.080
#> ERR878012 1 0.3695 0.1662 0.624 0.000 0.376 0.000 0.000 0.000
#> ERR862945 4 0.0000 1.0000 0.000 0.000 0.000 1.000 0.000 0.000
#> ERR862963 4 0.0000 1.0000 0.000 0.000 0.000 1.000 0.000 0.000
#> ERR878013 4 0.0000 1.0000 0.000 0.000 0.000 1.000 0.000 0.000
#> ERR862946 4 0.0000 1.0000 0.000 0.000 0.000 1.000 0.000 0.000
#> ERR862964 4 0.0000 1.0000 0.000 0.000 0.000 1.000 0.000 0.000
#> ERR878014 4 0.0000 1.0000 0.000 0.000 0.000 1.000 0.000 0.000
#> ERR862947 5 0.0000 0.8084 0.000 0.000 0.000 0.000 1.000 0.000
#> ERR862965 5 0.0000 0.8084 0.000 0.000 0.000 0.000 1.000 0.000
#> ERR878015 5 0.0000 0.8084 0.000 0.000 0.000 0.000 1.000 0.000
#> ERR862948 5 0.0000 0.8084 0.000 0.000 0.000 0.000 1.000 0.000
#> ERR862966 5 0.0000 0.8084 0.000 0.000 0.000 0.000 1.000 0.000
#> ERR878016 5 0.0000 0.8084 0.000 0.000 0.000 0.000 1.000 0.000
#> ERR862949 5 0.1714 0.7615 0.000 0.000 0.000 0.000 0.908 0.092
#> ERR862967 5 0.2135 0.7408 0.000 0.000 0.000 0.000 0.872 0.128
#> ERR878017 5 0.3619 0.4170 0.004 0.000 0.000 0.000 0.680 0.316
#> ERR862950 5 0.0146 0.8075 0.000 0.000 0.000 0.000 0.996 0.004
#> ERR862968 5 0.0363 0.8069 0.000 0.000 0.000 0.000 0.988 0.012
#> ERR878018 5 0.1075 0.7941 0.000 0.000 0.000 0.000 0.952 0.048
#> ERR862951 1 0.1338 0.6205 0.952 0.008 0.004 0.004 0.000 0.032
#> ERR862969 1 0.1485 0.6225 0.944 0.000 0.028 0.004 0.000 0.024
#> ERR878019 1 0.2515 0.5887 0.876 0.008 0.008 0.004 0.000 0.104
#> ERR862952 1 0.1367 0.6195 0.944 0.000 0.044 0.000 0.000 0.012
#> ERR862970 1 0.1327 0.6093 0.936 0.000 0.064 0.000 0.000 0.000
#> ERR878020 1 0.0717 0.6252 0.976 0.000 0.016 0.000 0.000 0.008
#> ERR862953 2 0.2474 0.8348 0.080 0.880 0.000 0.000 0.000 0.040
#> ERR862971 2 0.2344 0.8445 0.052 0.896 0.004 0.000 0.000 0.048
#> ERR878021 2 0.3985 0.7280 0.140 0.760 0.000 0.000 0.000 0.100
#> ERR862954 2 0.2724 0.8274 0.084 0.864 0.000 0.000 0.000 0.052
#> ERR862972 2 0.2965 0.8155 0.080 0.848 0.000 0.000 0.000 0.072
#> ERR878022 2 0.5494 0.3301 0.360 0.504 0.000 0.000 0.000 0.136
#> ERR862955 2 0.0748 0.8606 0.004 0.976 0.016 0.000 0.000 0.004
#> ERR862973 2 0.0717 0.8600 0.008 0.976 0.016 0.000 0.000 0.000
#> ERR878023 2 0.0622 0.8614 0.008 0.980 0.012 0.000 0.000 0.000
#> ERR862956 2 0.0547 0.8564 0.000 0.980 0.020 0.000 0.000 0.000
#> ERR862974 2 0.0547 0.8564 0.000 0.980 0.020 0.000 0.000 0.000
#> ERR878024 2 0.0725 0.8626 0.012 0.976 0.012 0.000 0.000 0.000
#> ERR862975 1 0.3090 0.5563 0.828 0.028 0.140 0.000 0.000 0.004
#> ERR866150 1 0.2009 0.6167 0.916 0.040 0.040 0.000 0.000 0.004
#> ERR866168 1 0.1938 0.6190 0.920 0.040 0.036 0.000 0.000 0.004
#> ERR862976 1 0.2981 0.5923 0.856 0.044 0.092 0.004 0.000 0.004
#> ERR866151 1 0.0964 0.6263 0.968 0.012 0.016 0.000 0.000 0.004
#> ERR866169 1 0.1409 0.6232 0.948 0.032 0.012 0.000 0.000 0.008
#> ERR862977 2 0.0767 0.8652 0.012 0.976 0.004 0.000 0.000 0.008
#> ERR866152 2 0.1168 0.8646 0.028 0.956 0.000 0.000 0.000 0.016
#> ERR866170 2 0.0993 0.8657 0.024 0.964 0.000 0.000 0.000 0.012
#> ERR862978 2 0.0806 0.8662 0.008 0.972 0.000 0.000 0.000 0.020
#> ERR866153 2 0.1575 0.8592 0.032 0.936 0.000 0.000 0.000 0.032
#> ERR866171 2 0.1418 0.8621 0.032 0.944 0.000 0.000 0.000 0.024
#> ERR862979 6 0.4308 0.5769 0.012 0.044 0.040 0.000 0.124 0.780
#> ERR866154 6 0.5337 0.5283 0.036 0.072 0.000 0.000 0.268 0.624
#> ERR866172 6 0.4999 0.4982 0.024 0.052 0.000 0.000 0.296 0.628
#> ERR862980 6 0.5028 0.5771 0.024 0.120 0.000 0.000 0.168 0.688
#> ERR866155 6 0.6267 0.5395 0.160 0.084 0.000 0.000 0.176 0.580
#> ERR866173 6 0.6083 0.4771 0.096 0.064 0.000 0.000 0.292 0.548
#> ERR862981 3 0.3076 0.6268 0.240 0.000 0.760 0.000 0.000 0.000
#> ERR866156 3 0.3737 0.4355 0.392 0.000 0.608 0.000 0.000 0.000
#> ERR866174 3 0.3756 0.4167 0.400 0.000 0.600 0.000 0.000 0.000
#> ERR866157 3 0.3074 0.6478 0.200 0.004 0.792 0.000 0.000 0.004
#> ERR866175 3 0.2793 0.6469 0.200 0.000 0.800 0.000 0.000 0.000
#> ERR862983 1 0.3797 0.0771 0.580 0.000 0.420 0.000 0.000 0.000
#> ERR866158 1 0.3727 0.1789 0.612 0.000 0.388 0.000 0.000 0.000
#> ERR866176 1 0.3607 0.2769 0.652 0.000 0.348 0.000 0.000 0.000
#> ERR862984 1 0.3695 0.2114 0.624 0.000 0.376 0.000 0.000 0.000
#> ERR866159 1 0.3578 0.2925 0.660 0.000 0.340 0.000 0.000 0.000
#> ERR866177 1 0.3409 0.3621 0.700 0.000 0.300 0.000 0.000 0.000
#> ERR862985 3 0.3092 0.6075 0.044 0.088 0.852 0.000 0.000 0.016
#> ERR866160 3 0.4108 0.6490 0.164 0.092 0.744 0.000 0.000 0.000
#> ERR866178 3 0.4237 0.6398 0.144 0.120 0.736 0.000 0.000 0.000
#> ERR862986 3 0.3415 0.6449 0.096 0.080 0.820 0.000 0.000 0.004
#> ERR866161 3 0.4085 0.6423 0.128 0.120 0.752 0.000 0.000 0.000
#> ERR866179 3 0.4079 0.6453 0.136 0.112 0.752 0.000 0.000 0.000
#> ERR862987 5 0.3755 0.6433 0.000 0.220 0.036 0.000 0.744 0.000
#> ERR866162 5 0.4771 0.3436 0.000 0.412 0.036 0.000 0.544 0.008
#> ERR866180 5 0.4543 0.4251 0.000 0.380 0.032 0.000 0.584 0.004
#> ERR862988 5 0.3229 0.7115 0.000 0.140 0.044 0.000 0.816 0.000
#> ERR866163 5 0.4479 0.4966 0.000 0.336 0.036 0.000 0.624 0.004
#> ERR866181 5 0.3902 0.6467 0.000 0.212 0.028 0.000 0.748 0.012
#> ERR862989 1 0.4817 0.1587 0.548 0.008 0.040 0.000 0.000 0.404
#> ERR866164 1 0.4362 0.2211 0.584 0.020 0.004 0.000 0.000 0.392
#> ERR866182 1 0.4442 0.1351 0.536 0.020 0.004 0.000 0.000 0.440
#> ERR862990 1 0.4417 0.1674 0.556 0.028 0.000 0.000 0.000 0.416
#> ERR866165 1 0.4537 0.1570 0.552 0.036 0.000 0.000 0.000 0.412
#> ERR866183 1 0.4423 0.1600 0.552 0.028 0.000 0.000 0.000 0.420
#> ERR862991 2 0.4917 0.6091 0.000 0.664 0.008 0.000 0.104 0.224
#> ERR866166 2 0.3874 0.6475 0.000 0.704 0.008 0.000 0.012 0.276
#> ERR866184 2 0.4012 0.6621 0.000 0.712 0.008 0.000 0.024 0.256
#> ERR862992 2 0.3017 0.8071 0.000 0.860 0.016 0.000 0.064 0.060
#> ERR866167 2 0.3590 0.7771 0.000 0.808 0.016 0.000 0.044 0.132
#> ERR866185 2 0.2813 0.8168 0.000 0.864 0.008 0.000 0.036 0.092
Heatmaps for the consensus matrix. It visualizes the probability of two
samples to be in a same group.
consensus_heatmap(res, k = 2)

consensus_heatmap(res, k = 3)

consensus_heatmap(res, k = 4)

consensus_heatmap(res, k = 5)

consensus_heatmap(res, k = 6)

Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)

membership_heatmap(res, k = 3)

membership_heatmap(res, k = 4)

membership_heatmap(res, k = 5)

membership_heatmap(res, k = 6)

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)

get_signatures(res, k = 3)

get_signatures(res, k = 4)

get_signatures(res, k = 5)

get_signatures(res, k = 6)

Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)

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

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

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

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

Compare the overlap of signatures from different k:
compare_signatures(res)

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.
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:
which_row
: row indices corresponding to the input matrix.
fdr
: FDR for the differential test.
mean_x
: The mean value in group x.
scaled_mean_x
: The mean value in group x after rows are scaled.
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")

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

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

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

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

Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)

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"]
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 15818 rows and 107 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'ATC' method.
#> Subgroups are detected by 'hclust' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 3.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)

The plots are:
- The first row: a plot of the ECDF (empirical cumulative distribution
function) curves of the consensus matrix for each
k
and the heatmap of
predicted classes for each k
.
- The second row: heatmaps of the consensus matrix for each
k
.
- The third row: heatmaps of the membership matrix for each
k
.
- The fouth row: heatmaps of the signatures for each
k
.
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:
- ECDF curves of the consensus matrix for each
k
;
- 1-PAC. The PAC
score
measures the proportion of the ambiguous subgrouping.
- Mean silhouette score.
- Concordance. The mean probability of fiting the consensus class ids in all
partitions.
- Area increased. Denote \(A_k\) as the area under the ECDF curve for current
k
, the area increased is defined as \(A_k - A_{k-1}\).
- Rand index. The percent of pairs of samples that are both in a same cluster
or both are not in a same cluster in the partition of k and k-1.
- Jaccard index. The ratio of pairs of samples are both in a same cluster in
the partition of k and k-1 and the pairs of samples are both in a same
cluster in the partition k or k-1.
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)

The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 0.535 0.888 0.906 0.2493 0.649 0.649
#> 3 3 0.526 0.640 0.872 0.8938 0.793 0.698
#> 4 4 0.638 0.751 0.852 0.3316 0.719 0.503
#> 5 5 0.619 0.760 0.825 0.1020 0.904 0.736
#> 6 6 0.799 0.823 0.905 0.0677 0.961 0.875
suggest_best_k()
suggests the best \(k\) based on these statistics. The rules are as follows:
- All \(k\) with Jaccard index larger than 0.95 are removed because increasing
\(k\) does not provide enough extra information. If all \(k\) are removed, it is
marked as no subgroup is detected.
- For all \(k\) with 1-PAC score larger than 0.9, the maximal \(k\) is taken as
the best \(k\), and other \(k\) are marked as optional \(k\).
- If it does not fit the second rule. The \(k\) with the maximal vote of the
highest 1-PAC score, highest mean silhouette, and highest concordance is
taken as the best \(k\).
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
#> ERR862939 1 0.998 0.749 0.528 0.472
#> ERR862957 1 0.998 0.749 0.528 0.472
#> ERR878007 1 0.998 0.749 0.528 0.472
#> ERR862940 1 0.998 0.749 0.528 0.472
#> ERR862958 1 0.998 0.749 0.528 0.472
#> ERR878008 1 0.998 0.749 0.528 0.472
#> ERR862941 2 0.000 0.969 0.000 1.000
#> ERR862959 2 0.000 0.969 0.000 1.000
#> ERR878009 2 0.000 0.969 0.000 1.000
#> ERR862942 2 0.000 0.969 0.000 1.000
#> ERR862960 2 0.000 0.969 0.000 1.000
#> ERR878010 2 0.000 0.969 0.000 1.000
#> ERR862943 1 0.998 0.749 0.528 0.472
#> ERR862961 1 0.998 0.749 0.528 0.472
#> ERR878011 1 0.998 0.749 0.528 0.472
#> ERR862944 1 0.998 0.749 0.528 0.472
#> ERR862962 1 0.998 0.749 0.528 0.472
#> ERR878012 1 0.998 0.749 0.528 0.472
#> ERR862945 1 0.000 0.576 1.000 0.000
#> ERR862963 1 0.000 0.576 1.000 0.000
#> ERR878013 1 0.000 0.576 1.000 0.000
#> ERR862946 1 0.000 0.576 1.000 0.000
#> ERR862964 1 0.000 0.576 1.000 0.000
#> ERR878014 1 0.000 0.576 1.000 0.000
#> ERR862947 2 0.000 0.969 0.000 1.000
#> ERR862965 2 0.000 0.969 0.000 1.000
#> ERR878015 2 0.000 0.969 0.000 1.000
#> ERR862948 2 0.000 0.969 0.000 1.000
#> ERR862966 2 0.000 0.969 0.000 1.000
#> ERR878016 2 0.000 0.969 0.000 1.000
#> ERR862949 2 0.000 0.969 0.000 1.000
#> ERR862967 2 0.000 0.969 0.000 1.000
#> ERR878017 2 0.000 0.969 0.000 1.000
#> ERR862950 2 0.000 0.969 0.000 1.000
#> ERR862968 2 0.000 0.969 0.000 1.000
#> ERR878018 2 0.000 0.969 0.000 1.000
#> ERR862951 2 0.000 0.969 0.000 1.000
#> ERR862969 2 0.000 0.969 0.000 1.000
#> ERR878019 2 0.000 0.969 0.000 1.000
#> ERR862952 2 0.000 0.969 0.000 1.000
#> ERR862970 2 0.000 0.969 0.000 1.000
#> ERR878020 2 0.000 0.969 0.000 1.000
#> ERR862953 2 0.000 0.969 0.000 1.000
#> ERR862971 2 0.000 0.969 0.000 1.000
#> ERR878021 2 0.000 0.969 0.000 1.000
#> ERR862954 2 0.000 0.969 0.000 1.000
#> ERR862972 2 0.000 0.969 0.000 1.000
#> ERR878022 2 0.000 0.969 0.000 1.000
#> ERR862955 2 0.000 0.969 0.000 1.000
#> ERR862973 2 0.000 0.969 0.000 1.000
#> ERR878023 2 0.000 0.969 0.000 1.000
#> ERR862956 2 0.000 0.969 0.000 1.000
#> ERR862974 2 0.000 0.969 0.000 1.000
#> ERR878024 2 0.000 0.969 0.000 1.000
#> ERR862975 2 0.552 0.778 0.128 0.872
#> ERR866150 2 0.552 0.778 0.128 0.872
#> ERR866168 2 0.552 0.778 0.128 0.872
#> ERR862976 2 0.552 0.778 0.128 0.872
#> ERR866151 2 0.552 0.778 0.128 0.872
#> ERR866169 2 0.552 0.778 0.128 0.872
#> ERR862977 2 0.000 0.969 0.000 1.000
#> ERR866152 2 0.000 0.969 0.000 1.000
#> ERR866170 2 0.000 0.969 0.000 1.000
#> ERR862978 2 0.000 0.969 0.000 1.000
#> ERR866153 2 0.000 0.969 0.000 1.000
#> ERR866171 2 0.000 0.969 0.000 1.000
#> ERR862979 2 0.000 0.969 0.000 1.000
#> ERR866154 2 0.000 0.969 0.000 1.000
#> ERR866172 2 0.000 0.969 0.000 1.000
#> ERR862980 2 0.000 0.969 0.000 1.000
#> ERR866155 2 0.000 0.969 0.000 1.000
#> ERR866173 2 0.000 0.969 0.000 1.000
#> ERR862981 2 0.000 0.969 0.000 1.000
#> ERR866156 2 0.000 0.969 0.000 1.000
#> ERR866174 2 0.000 0.969 0.000 1.000
#> ERR866157 2 0.000 0.969 0.000 1.000
#> ERR866175 2 0.000 0.969 0.000 1.000
#> ERR862983 1 0.998 0.749 0.528 0.472
#> ERR866158 1 0.998 0.749 0.528 0.472
#> ERR866176 1 0.998 0.749 0.528 0.472
#> ERR862984 1 0.998 0.749 0.528 0.472
#> ERR866159 1 0.998 0.749 0.528 0.472
#> ERR866177 1 0.998 0.749 0.528 0.472
#> ERR862985 2 0.000 0.969 0.000 1.000
#> ERR866160 2 0.000 0.969 0.000 1.000
#> ERR866178 2 0.000 0.969 0.000 1.000
#> ERR862986 2 0.000 0.969 0.000 1.000
#> ERR866161 2 0.000 0.969 0.000 1.000
#> ERR866179 2 0.000 0.969 0.000 1.000
#> ERR862987 2 0.000 0.969 0.000 1.000
#> ERR866162 2 0.000 0.969 0.000 1.000
#> ERR866180 2 0.000 0.969 0.000 1.000
#> ERR862988 2 0.000 0.969 0.000 1.000
#> ERR866163 2 0.000 0.969 0.000 1.000
#> ERR866181 2 0.000 0.969 0.000 1.000
#> ERR862989 2 0.552 0.778 0.128 0.872
#> ERR866164 2 0.552 0.778 0.128 0.872
#> ERR866182 2 0.552 0.778 0.128 0.872
#> ERR862990 2 0.552 0.778 0.128 0.872
#> ERR866165 2 0.552 0.778 0.128 0.872
#> ERR866183 2 0.552 0.778 0.128 0.872
#> ERR862991 2 0.000 0.969 0.000 1.000
#> ERR866166 2 0.000 0.969 0.000 1.000
#> ERR866184 2 0.000 0.969 0.000 1.000
#> ERR862992 2 0.000 0.969 0.000 1.000
#> ERR866167 2 0.000 0.969 0.000 1.000
#> ERR866185 2 0.000 0.969 0.000 1.000
show/hide code output
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> ERR862939 1 0.0000 0.7069 1.000 0.000 0
#> ERR862957 1 0.0000 0.7069 1.000 0.000 0
#> ERR878007 1 0.0000 0.7069 1.000 0.000 0
#> ERR862940 1 0.0000 0.7069 1.000 0.000 0
#> ERR862958 1 0.0000 0.7069 1.000 0.000 0
#> ERR878008 1 0.0000 0.7069 1.000 0.000 0
#> ERR862941 2 0.0000 0.8282 0.000 1.000 0
#> ERR862959 2 0.0000 0.8282 0.000 1.000 0
#> ERR878009 2 0.0000 0.8282 0.000 1.000 0
#> ERR862942 2 0.0000 0.8282 0.000 1.000 0
#> ERR862960 2 0.0000 0.8282 0.000 1.000 0
#> ERR878010 2 0.0000 0.8282 0.000 1.000 0
#> ERR862943 1 0.0000 0.7069 1.000 0.000 0
#> ERR862961 1 0.0000 0.7069 1.000 0.000 0
#> ERR878011 1 0.0000 0.7069 1.000 0.000 0
#> ERR862944 1 0.0000 0.7069 1.000 0.000 0
#> ERR862962 1 0.0000 0.7069 1.000 0.000 0
#> ERR878012 1 0.0000 0.7069 1.000 0.000 0
#> ERR862945 3 0.0000 1.0000 0.000 0.000 1
#> ERR862963 3 0.0000 1.0000 0.000 0.000 1
#> ERR878013 3 0.0000 1.0000 0.000 0.000 1
#> ERR862946 3 0.0000 1.0000 0.000 0.000 1
#> ERR862964 3 0.0000 1.0000 0.000 0.000 1
#> ERR878014 3 0.0000 1.0000 0.000 0.000 1
#> ERR862947 2 0.0000 0.8282 0.000 1.000 0
#> ERR862965 2 0.0000 0.8282 0.000 1.000 0
#> ERR878015 2 0.0000 0.8282 0.000 1.000 0
#> ERR862948 2 0.0000 0.8282 0.000 1.000 0
#> ERR862966 2 0.0000 0.8282 0.000 1.000 0
#> ERR878016 2 0.0000 0.8282 0.000 1.000 0
#> ERR862949 2 0.0000 0.8282 0.000 1.000 0
#> ERR862967 2 0.0000 0.8282 0.000 1.000 0
#> ERR878017 2 0.0000 0.8282 0.000 1.000 0
#> ERR862950 2 0.0000 0.8282 0.000 1.000 0
#> ERR862968 2 0.0000 0.8282 0.000 1.000 0
#> ERR878018 2 0.0000 0.8282 0.000 1.000 0
#> ERR862951 2 0.6295 0.0288 0.472 0.528 0
#> ERR862969 2 0.6295 0.0288 0.472 0.528 0
#> ERR878019 2 0.6295 0.0288 0.472 0.528 0
#> ERR862952 2 0.6295 0.0288 0.472 0.528 0
#> ERR862970 2 0.6295 0.0288 0.472 0.528 0
#> ERR878020 2 0.6295 0.0288 0.472 0.528 0
#> ERR862953 2 0.3482 0.7254 0.128 0.872 0
#> ERR862971 2 0.3482 0.7254 0.128 0.872 0
#> ERR878021 2 0.3686 0.7125 0.140 0.860 0
#> ERR862954 2 0.3482 0.7254 0.128 0.872 0
#> ERR862972 2 0.3482 0.7254 0.128 0.872 0
#> ERR878022 2 0.3686 0.7125 0.140 0.860 0
#> ERR862955 2 0.0237 0.8271 0.004 0.996 0
#> ERR862973 2 0.0237 0.8271 0.004 0.996 0
#> ERR878023 2 0.0237 0.8271 0.004 0.996 0
#> ERR862956 2 0.0237 0.8271 0.004 0.996 0
#> ERR862974 2 0.0237 0.8271 0.004 0.996 0
#> ERR878024 2 0.0237 0.8271 0.004 0.996 0
#> ERR862975 1 0.6126 0.4348 0.600 0.400 0
#> ERR866150 1 0.6126 0.4348 0.600 0.400 0
#> ERR866168 1 0.6126 0.4348 0.600 0.400 0
#> ERR862976 1 0.6126 0.4348 0.600 0.400 0
#> ERR866151 1 0.6126 0.4348 0.600 0.400 0
#> ERR866169 1 0.6126 0.4348 0.600 0.400 0
#> ERR862977 2 0.0237 0.8271 0.004 0.996 0
#> ERR866152 2 0.0237 0.8271 0.004 0.996 0
#> ERR866170 2 0.0237 0.8271 0.004 0.996 0
#> ERR862978 2 0.0237 0.8271 0.004 0.996 0
#> ERR866153 2 0.0237 0.8271 0.004 0.996 0
#> ERR866171 2 0.0237 0.8271 0.004 0.996 0
#> ERR862979 2 0.0000 0.8282 0.000 1.000 0
#> ERR866154 2 0.0000 0.8282 0.000 1.000 0
#> ERR866172 2 0.0000 0.8282 0.000 1.000 0
#> ERR862980 2 0.0000 0.8282 0.000 1.000 0
#> ERR866155 2 0.0000 0.8282 0.000 1.000 0
#> ERR866173 2 0.0000 0.8282 0.000 1.000 0
#> ERR862981 2 0.6295 0.0288 0.472 0.528 0
#> ERR866156 2 0.6295 0.0288 0.472 0.528 0
#> ERR866174 2 0.6295 0.0288 0.472 0.528 0
#> ERR866157 2 0.6295 0.0288 0.472 0.528 0
#> ERR866175 2 0.6295 0.0288 0.472 0.528 0
#> ERR862983 1 0.0000 0.7069 1.000 0.000 0
#> ERR866158 1 0.0000 0.7069 1.000 0.000 0
#> ERR866176 1 0.0000 0.7069 1.000 0.000 0
#> ERR862984 1 0.0000 0.7069 1.000 0.000 0
#> ERR866159 1 0.0000 0.7069 1.000 0.000 0
#> ERR866177 1 0.0000 0.7069 1.000 0.000 0
#> ERR862985 2 0.6295 0.0288 0.472 0.528 0
#> ERR866160 2 0.6295 0.0288 0.472 0.528 0
#> ERR866178 2 0.6295 0.0288 0.472 0.528 0
#> ERR862986 2 0.6295 0.0288 0.472 0.528 0
#> ERR866161 2 0.6295 0.0288 0.472 0.528 0
#> ERR866179 2 0.6295 0.0288 0.472 0.528 0
#> ERR862987 2 0.0000 0.8282 0.000 1.000 0
#> ERR866162 2 0.0000 0.8282 0.000 1.000 0
#> ERR866180 2 0.0000 0.8282 0.000 1.000 0
#> ERR862988 2 0.0000 0.8282 0.000 1.000 0
#> ERR866163 2 0.0000 0.8282 0.000 1.000 0
#> ERR866181 2 0.0000 0.8282 0.000 1.000 0
#> ERR862989 1 0.6126 0.4348 0.600 0.400 0
#> ERR866164 1 0.6126 0.4348 0.600 0.400 0
#> ERR866182 1 0.6126 0.4348 0.600 0.400 0
#> ERR862990 1 0.6126 0.4348 0.600 0.400 0
#> ERR866165 1 0.6126 0.4348 0.600 0.400 0
#> ERR866183 1 0.6126 0.4348 0.600 0.400 0
#> ERR862991 2 0.0000 0.8282 0.000 1.000 0
#> ERR866166 2 0.0000 0.8282 0.000 1.000 0
#> ERR866184 2 0.0000 0.8282 0.000 1.000 0
#> ERR862992 2 0.0000 0.8282 0.000 1.000 0
#> ERR866167 2 0.0000 0.8282 0.000 1.000 0
#> ERR866185 2 0.0000 0.8282 0.000 1.000 0
show/hide code output
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> ERR862939 3 0.0000 0.9980 0.000 0.000 1.000 0
#> ERR862957 3 0.0000 0.9980 0.000 0.000 1.000 0
#> ERR878007 3 0.0000 0.9980 0.000 0.000 1.000 0
#> ERR862940 3 0.0000 0.9980 0.000 0.000 1.000 0
#> ERR862958 3 0.0000 0.9980 0.000 0.000 1.000 0
#> ERR878008 3 0.0000 0.9980 0.000 0.000 1.000 0
#> ERR862941 2 0.4746 0.7093 0.368 0.632 0.000 0
#> ERR862959 2 0.4746 0.7093 0.368 0.632 0.000 0
#> ERR878009 2 0.4746 0.7093 0.368 0.632 0.000 0
#> ERR862942 2 0.4746 0.7093 0.368 0.632 0.000 0
#> ERR862960 2 0.4746 0.7093 0.368 0.632 0.000 0
#> ERR878010 2 0.4746 0.7093 0.368 0.632 0.000 0
#> ERR862943 3 0.0000 0.9980 0.000 0.000 1.000 0
#> ERR862961 3 0.0000 0.9980 0.000 0.000 1.000 0
#> ERR878011 3 0.0000 0.9980 0.000 0.000 1.000 0
#> ERR862944 3 0.0000 0.9980 0.000 0.000 1.000 0
#> ERR862962 3 0.0000 0.9980 0.000 0.000 1.000 0
#> ERR878012 3 0.0000 0.9980 0.000 0.000 1.000 0
#> ERR862945 4 0.0000 1.0000 0.000 0.000 0.000 1
#> ERR862963 4 0.0000 1.0000 0.000 0.000 0.000 1
#> ERR878013 4 0.0000 1.0000 0.000 0.000 0.000 1
#> ERR862946 4 0.0000 1.0000 0.000 0.000 0.000 1
#> ERR862964 4 0.0000 1.0000 0.000 0.000 0.000 1
#> ERR878014 4 0.0000 1.0000 0.000 0.000 0.000 1
#> ERR862947 2 0.0000 0.6188 0.000 1.000 0.000 0
#> ERR862965 2 0.0000 0.6188 0.000 1.000 0.000 0
#> ERR878015 2 0.0000 0.6188 0.000 1.000 0.000 0
#> ERR862948 2 0.0000 0.6188 0.000 1.000 0.000 0
#> ERR862966 2 0.0000 0.6188 0.000 1.000 0.000 0
#> ERR878016 2 0.0000 0.6188 0.000 1.000 0.000 0
#> ERR862949 2 0.4790 0.7063 0.380 0.620 0.000 0
#> ERR862967 2 0.4790 0.7063 0.380 0.620 0.000 0
#> ERR878017 2 0.4790 0.7063 0.380 0.620 0.000 0
#> ERR862950 2 0.4790 0.7063 0.380 0.620 0.000 0
#> ERR862968 2 0.4790 0.7063 0.380 0.620 0.000 0
#> ERR878018 2 0.4790 0.7063 0.380 0.620 0.000 0
#> ERR862951 1 0.0000 0.8423 1.000 0.000 0.000 0
#> ERR862969 1 0.0000 0.8423 1.000 0.000 0.000 0
#> ERR878019 1 0.0000 0.8423 1.000 0.000 0.000 0
#> ERR862952 1 0.0000 0.8423 1.000 0.000 0.000 0
#> ERR862970 1 0.0000 0.8423 1.000 0.000 0.000 0
#> ERR878020 1 0.0000 0.8423 1.000 0.000 0.000 0
#> ERR862953 1 0.4643 0.0717 0.656 0.344 0.000 0
#> ERR862971 1 0.4643 0.0717 0.656 0.344 0.000 0
#> ERR878021 1 0.4585 0.1216 0.668 0.332 0.000 0
#> ERR862954 1 0.4643 0.0717 0.656 0.344 0.000 0
#> ERR862972 1 0.4643 0.0717 0.656 0.344 0.000 0
#> ERR878022 1 0.4585 0.1216 0.668 0.332 0.000 0
#> ERR862955 2 0.4955 0.6409 0.444 0.556 0.000 0
#> ERR862973 2 0.4955 0.6409 0.444 0.556 0.000 0
#> ERR878023 2 0.4955 0.6409 0.444 0.556 0.000 0
#> ERR862956 2 0.4955 0.6409 0.444 0.556 0.000 0
#> ERR862974 2 0.4955 0.6409 0.444 0.556 0.000 0
#> ERR878024 2 0.4955 0.6409 0.444 0.556 0.000 0
#> ERR862975 1 0.2760 0.8101 0.872 0.000 0.128 0
#> ERR866150 1 0.2760 0.8101 0.872 0.000 0.128 0
#> ERR866168 1 0.2760 0.8101 0.872 0.000 0.128 0
#> ERR862976 1 0.2760 0.8101 0.872 0.000 0.128 0
#> ERR866151 1 0.2760 0.8101 0.872 0.000 0.128 0
#> ERR866169 1 0.2760 0.8101 0.872 0.000 0.128 0
#> ERR862977 2 0.4955 0.6409 0.444 0.556 0.000 0
#> ERR866152 2 0.4955 0.6409 0.444 0.556 0.000 0
#> ERR866170 2 0.4955 0.6409 0.444 0.556 0.000 0
#> ERR862978 2 0.4955 0.6409 0.444 0.556 0.000 0
#> ERR866153 2 0.4955 0.6409 0.444 0.556 0.000 0
#> ERR866171 2 0.4955 0.6409 0.444 0.556 0.000 0
#> ERR862979 2 0.4790 0.7063 0.380 0.620 0.000 0
#> ERR866154 2 0.4790 0.7063 0.380 0.620 0.000 0
#> ERR866172 2 0.4790 0.7063 0.380 0.620 0.000 0
#> ERR862980 2 0.4790 0.7063 0.380 0.620 0.000 0
#> ERR866155 2 0.4790 0.7063 0.380 0.620 0.000 0
#> ERR866173 2 0.4790 0.7063 0.380 0.620 0.000 0
#> ERR862981 1 0.0000 0.8423 1.000 0.000 0.000 0
#> ERR866156 1 0.0000 0.8423 1.000 0.000 0.000 0
#> ERR866174 1 0.0000 0.8423 1.000 0.000 0.000 0
#> ERR866157 1 0.0000 0.8423 1.000 0.000 0.000 0
#> ERR866175 1 0.0000 0.8423 1.000 0.000 0.000 0
#> ERR862983 3 0.0188 0.9960 0.004 0.000 0.996 0
#> ERR866158 3 0.0188 0.9960 0.004 0.000 0.996 0
#> ERR866176 3 0.0188 0.9960 0.004 0.000 0.996 0
#> ERR862984 3 0.0188 0.9960 0.004 0.000 0.996 0
#> ERR866159 3 0.0188 0.9960 0.004 0.000 0.996 0
#> ERR866177 3 0.0188 0.9960 0.004 0.000 0.996 0
#> ERR862985 1 0.0000 0.8423 1.000 0.000 0.000 0
#> ERR866160 1 0.0000 0.8423 1.000 0.000 0.000 0
#> ERR866178 1 0.0000 0.8423 1.000 0.000 0.000 0
#> ERR862986 1 0.0000 0.8423 1.000 0.000 0.000 0
#> ERR866161 1 0.0000 0.8423 1.000 0.000 0.000 0
#> ERR866179 1 0.0000 0.8423 1.000 0.000 0.000 0
#> ERR862987 2 0.0817 0.6448 0.024 0.976 0.000 0
#> ERR866162 2 0.0817 0.6448 0.024 0.976 0.000 0
#> ERR866180 2 0.0817 0.6448 0.024 0.976 0.000 0
#> ERR862988 2 0.1118 0.6500 0.036 0.964 0.000 0
#> ERR866163 2 0.0817 0.6448 0.024 0.976 0.000 0
#> ERR866181 2 0.0817 0.6448 0.024 0.976 0.000 0
#> ERR862989 1 0.2760 0.8101 0.872 0.000 0.128 0
#> ERR866164 1 0.2760 0.8101 0.872 0.000 0.128 0
#> ERR866182 1 0.2760 0.8101 0.872 0.000 0.128 0
#> ERR862990 1 0.2760 0.8101 0.872 0.000 0.128 0
#> ERR866165 1 0.2760 0.8101 0.872 0.000 0.128 0
#> ERR866183 1 0.2760 0.8101 0.872 0.000 0.128 0
#> ERR862991 2 0.0817 0.6448 0.024 0.976 0.000 0
#> ERR866166 2 0.0817 0.6448 0.024 0.976 0.000 0
#> ERR866184 2 0.0817 0.6448 0.024 0.976 0.000 0
#> ERR862992 2 0.0817 0.6448 0.024 0.976 0.000 0
#> ERR866167 2 0.0817 0.6448 0.024 0.976 0.000 0
#> ERR866185 2 0.0817 0.6448 0.024 0.976 0.000 0
show/hide code output
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> ERR862939 3 0.477 0.820 0.028 0.168 0.752 0 0.052
#> ERR862957 3 0.477 0.820 0.028 0.168 0.752 0 0.052
#> ERR878007 3 0.477 0.820 0.028 0.168 0.752 0 0.052
#> ERR862940 3 0.477 0.820 0.028 0.168 0.752 0 0.052
#> ERR862958 3 0.477 0.820 0.028 0.168 0.752 0 0.052
#> ERR878008 3 0.477 0.820 0.028 0.168 0.752 0 0.052
#> ERR862941 2 0.320 0.790 0.168 0.820 0.000 0 0.012
#> ERR862959 2 0.320 0.790 0.168 0.820 0.000 0 0.012
#> ERR878009 2 0.320 0.790 0.168 0.820 0.000 0 0.012
#> ERR862942 2 0.320 0.790 0.168 0.820 0.000 0 0.012
#> ERR862960 2 0.320 0.790 0.168 0.820 0.000 0 0.012
#> ERR878010 2 0.320 0.790 0.168 0.820 0.000 0 0.012
#> ERR862943 3 0.112 0.860 0.000 0.000 0.956 0 0.044
#> ERR862961 3 0.112 0.860 0.000 0.000 0.956 0 0.044
#> ERR878011 3 0.112 0.860 0.000 0.000 0.956 0 0.044
#> ERR862944 3 0.112 0.860 0.000 0.000 0.956 0 0.044
#> ERR862962 3 0.112 0.860 0.000 0.000 0.956 0 0.044
#> ERR878012 3 0.112 0.860 0.000 0.000 0.956 0 0.044
#> ERR862945 4 0.000 1.000 0.000 0.000 0.000 1 0.000
#> ERR862963 4 0.000 1.000 0.000 0.000 0.000 1 0.000
#> ERR878013 4 0.000 1.000 0.000 0.000 0.000 1 0.000
#> ERR862946 4 0.000 1.000 0.000 0.000 0.000 1 0.000
#> ERR862964 4 0.000 1.000 0.000 0.000 0.000 1 0.000
#> ERR878014 4 0.000 1.000 0.000 0.000 0.000 1 0.000
#> ERR862947 5 0.252 1.000 0.000 0.140 0.000 0 0.860
#> ERR862965 5 0.252 1.000 0.000 0.140 0.000 0 0.860
#> ERR878015 5 0.252 1.000 0.000 0.140 0.000 0 0.860
#> ERR862948 5 0.252 1.000 0.000 0.140 0.000 0 0.860
#> ERR862966 5 0.252 1.000 0.000 0.140 0.000 0 0.860
#> ERR878016 5 0.252 1.000 0.000 0.140 0.000 0 0.860
#> ERR862949 2 0.281 0.793 0.168 0.832 0.000 0 0.000
#> ERR862967 2 0.281 0.793 0.168 0.832 0.000 0 0.000
#> ERR878017 2 0.281 0.793 0.168 0.832 0.000 0 0.000
#> ERR862950 2 0.281 0.793 0.168 0.832 0.000 0 0.000
#> ERR862968 2 0.281 0.793 0.168 0.832 0.000 0 0.000
#> ERR878018 2 0.281 0.793 0.168 0.832 0.000 0 0.000
#> ERR862951 1 0.127 0.890 0.948 0.052 0.000 0 0.000
#> ERR862969 1 0.127 0.890 0.948 0.052 0.000 0 0.000
#> ERR878019 1 0.127 0.890 0.948 0.052 0.000 0 0.000
#> ERR862952 1 0.104 0.897 0.960 0.040 0.000 0 0.000
#> ERR862970 1 0.104 0.897 0.960 0.040 0.000 0 0.000
#> ERR878020 1 0.127 0.890 0.948 0.052 0.000 0 0.000
#> ERR862953 2 0.427 0.434 0.444 0.556 0.000 0 0.000
#> ERR862971 2 0.427 0.434 0.444 0.556 0.000 0 0.000
#> ERR878021 1 0.429 -0.198 0.536 0.464 0.000 0 0.000
#> ERR862954 2 0.427 0.434 0.444 0.556 0.000 0 0.000
#> ERR862972 2 0.427 0.434 0.444 0.556 0.000 0 0.000
#> ERR878022 1 0.429 -0.198 0.536 0.464 0.000 0 0.000
#> ERR862955 2 0.337 0.779 0.232 0.768 0.000 0 0.000
#> ERR862973 2 0.337 0.779 0.232 0.768 0.000 0 0.000
#> ERR878023 2 0.337 0.779 0.232 0.768 0.000 0 0.000
#> ERR862956 2 0.337 0.779 0.232 0.768 0.000 0 0.000
#> ERR862974 2 0.337 0.779 0.232 0.768 0.000 0 0.000
#> ERR878024 2 0.337 0.779 0.232 0.768 0.000 0 0.000
#> ERR862975 1 0.223 0.865 0.912 0.000 0.044 0 0.044
#> ERR866150 1 0.223 0.865 0.912 0.000 0.044 0 0.044
#> ERR866168 1 0.223 0.865 0.912 0.000 0.044 0 0.044
#> ERR862976 1 0.223 0.865 0.912 0.000 0.044 0 0.044
#> ERR866151 1 0.223 0.865 0.912 0.000 0.044 0 0.044
#> ERR866169 1 0.223 0.865 0.912 0.000 0.044 0 0.044
#> ERR862977 2 0.337 0.779 0.232 0.768 0.000 0 0.000
#> ERR866152 2 0.337 0.779 0.232 0.768 0.000 0 0.000
#> ERR866170 2 0.337 0.779 0.232 0.768 0.000 0 0.000
#> ERR862978 2 0.337 0.779 0.232 0.768 0.000 0 0.000
#> ERR866153 2 0.337 0.779 0.232 0.768 0.000 0 0.000
#> ERR866171 2 0.337 0.779 0.232 0.768 0.000 0 0.000
#> ERR862979 2 0.281 0.793 0.168 0.832 0.000 0 0.000
#> ERR866154 2 0.281 0.793 0.168 0.832 0.000 0 0.000
#> ERR866172 2 0.281 0.793 0.168 0.832 0.000 0 0.000
#> ERR862980 2 0.281 0.793 0.168 0.832 0.000 0 0.000
#> ERR866155 2 0.281 0.793 0.168 0.832 0.000 0 0.000
#> ERR866173 2 0.281 0.793 0.168 0.832 0.000 0 0.000
#> ERR862981 1 0.104 0.897 0.960 0.040 0.000 0 0.000
#> ERR866156 1 0.104 0.897 0.960 0.040 0.000 0 0.000
#> ERR866174 1 0.104 0.897 0.960 0.040 0.000 0 0.000
#> ERR866157 1 0.104 0.897 0.960 0.040 0.000 0 0.000
#> ERR866175 1 0.104 0.897 0.960 0.040 0.000 0 0.000
#> ERR862983 3 0.223 0.864 0.044 0.000 0.912 0 0.044
#> ERR866158 3 0.223 0.864 0.044 0.000 0.912 0 0.044
#> ERR866176 3 0.223 0.864 0.044 0.000 0.912 0 0.044
#> ERR862984 3 0.223 0.864 0.044 0.000 0.912 0 0.044
#> ERR866159 3 0.223 0.864 0.044 0.000 0.912 0 0.044
#> ERR866177 3 0.223 0.864 0.044 0.000 0.912 0 0.044
#> ERR862985 1 0.104 0.897 0.960 0.040 0.000 0 0.000
#> ERR866160 1 0.104 0.897 0.960 0.040 0.000 0 0.000
#> ERR866178 1 0.104 0.897 0.960 0.040 0.000 0 0.000
#> ERR862986 1 0.104 0.897 0.960 0.040 0.000 0 0.000
#> ERR866161 1 0.104 0.897 0.960 0.040 0.000 0 0.000
#> ERR866179 1 0.104 0.897 0.960 0.040 0.000 0 0.000
#> ERR862987 2 0.416 0.285 0.000 0.608 0.000 0 0.392
#> ERR866162 2 0.416 0.285 0.000 0.608 0.000 0 0.392
#> ERR866180 2 0.416 0.285 0.000 0.608 0.000 0 0.392
#> ERR862988 2 0.409 0.330 0.000 0.632 0.000 0 0.368
#> ERR866163 2 0.416 0.285 0.000 0.608 0.000 0 0.392
#> ERR866181 2 0.416 0.285 0.000 0.608 0.000 0 0.392
#> ERR862989 1 0.223 0.865 0.912 0.000 0.044 0 0.044
#> ERR866164 1 0.223 0.865 0.912 0.000 0.044 0 0.044
#> ERR866182 1 0.223 0.865 0.912 0.000 0.044 0 0.044
#> ERR862990 1 0.223 0.865 0.912 0.000 0.044 0 0.044
#> ERR866165 1 0.223 0.865 0.912 0.000 0.044 0 0.044
#> ERR866183 1 0.223 0.865 0.912 0.000 0.044 0 0.044
#> ERR862991 2 0.416 0.285 0.000 0.608 0.000 0 0.392
#> ERR866166 2 0.416 0.285 0.000 0.608 0.000 0 0.392
#> ERR866184 2 0.416 0.285 0.000 0.608 0.000 0 0.392
#> ERR862992 2 0.416 0.285 0.000 0.608 0.000 0 0.392
#> ERR866167 2 0.416 0.285 0.000 0.608 0.000 0 0.392
#> ERR866185 2 0.416 0.285 0.000 0.608 0.000 0 0.392
show/hide code output
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> ERR862939 6 0.3737 1.000 0.000 0.000 0.000 0 0.392 0.608
#> ERR862957 6 0.3737 1.000 0.000 0.000 0.000 0 0.392 0.608
#> ERR878007 6 0.3737 1.000 0.000 0.000 0.000 0 0.392 0.608
#> ERR862940 6 0.3737 1.000 0.000 0.000 0.000 0 0.392 0.608
#> ERR862958 6 0.3737 1.000 0.000 0.000 0.000 0 0.392 0.608
#> ERR878008 6 0.3737 1.000 0.000 0.000 0.000 0 0.392 0.608
#> ERR862941 2 0.0363 0.806 0.000 0.988 0.000 0 0.000 0.012
#> ERR862959 2 0.0363 0.806 0.000 0.988 0.000 0 0.000 0.012
#> ERR878009 2 0.0363 0.806 0.000 0.988 0.000 0 0.000 0.012
#> ERR862942 2 0.0363 0.806 0.000 0.988 0.000 0 0.000 0.012
#> ERR862960 2 0.0363 0.806 0.000 0.988 0.000 0 0.000 0.012
#> ERR878010 2 0.0363 0.806 0.000 0.988 0.000 0 0.000 0.012
#> ERR862943 3 0.1267 0.909 0.000 0.000 0.940 0 0.000 0.060
#> ERR862961 3 0.1267 0.909 0.000 0.000 0.940 0 0.000 0.060
#> ERR878011 3 0.1267 0.909 0.000 0.000 0.940 0 0.000 0.060
#> ERR862944 3 0.1267 0.909 0.000 0.000 0.940 0 0.000 0.060
#> ERR862962 3 0.1267 0.909 0.000 0.000 0.940 0 0.000 0.060
#> ERR878012 3 0.1267 0.909 0.000 0.000 0.940 0 0.000 0.060
#> ERR862945 4 0.0000 1.000 0.000 0.000 0.000 1 0.000 0.000
#> ERR862963 4 0.0000 1.000 0.000 0.000 0.000 1 0.000 0.000
#> ERR878013 4 0.0000 1.000 0.000 0.000 0.000 1 0.000 0.000
#> ERR862946 4 0.0000 1.000 0.000 0.000 0.000 1 0.000 0.000
#> ERR862964 4 0.0000 1.000 0.000 0.000 0.000 1 0.000 0.000
#> ERR878014 4 0.0000 1.000 0.000 0.000 0.000 1 0.000 0.000
#> ERR862947 5 0.3737 1.000 0.000 0.000 0.000 0 0.608 0.392
#> ERR862965 5 0.3737 1.000 0.000 0.000 0.000 0 0.608 0.392
#> ERR878015 5 0.3737 1.000 0.000 0.000 0.000 0 0.608 0.392
#> ERR862948 5 0.3737 1.000 0.000 0.000 0.000 0 0.608 0.392
#> ERR862966 5 0.3737 1.000 0.000 0.000 0.000 0 0.608 0.392
#> ERR878016 5 0.3737 1.000 0.000 0.000 0.000 0 0.608 0.392
#> ERR862949 2 0.0000 0.808 0.000 1.000 0.000 0 0.000 0.000
#> ERR862967 2 0.0000 0.808 0.000 1.000 0.000 0 0.000 0.000
#> ERR878017 2 0.0000 0.808 0.000 1.000 0.000 0 0.000 0.000
#> ERR862950 2 0.0000 0.808 0.000 1.000 0.000 0 0.000 0.000
#> ERR862968 2 0.0000 0.808 0.000 1.000 0.000 0 0.000 0.000
#> ERR878018 2 0.0000 0.808 0.000 1.000 0.000 0 0.000 0.000
#> ERR862951 1 0.1141 0.913 0.948 0.052 0.000 0 0.000 0.000
#> ERR862969 1 0.1141 0.913 0.948 0.052 0.000 0 0.000 0.000
#> ERR878019 1 0.1141 0.913 0.948 0.052 0.000 0 0.000 0.000
#> ERR862952 1 0.0937 0.923 0.960 0.040 0.000 0 0.000 0.000
#> ERR862970 1 0.0937 0.923 0.960 0.040 0.000 0 0.000 0.000
#> ERR878020 1 0.1141 0.913 0.948 0.052 0.000 0 0.000 0.000
#> ERR862953 2 0.3288 0.608 0.276 0.724 0.000 0 0.000 0.000
#> ERR862971 2 0.3288 0.608 0.276 0.724 0.000 0 0.000 0.000
#> ERR878021 2 0.3828 0.313 0.440 0.560 0.000 0 0.000 0.000
#> ERR862954 2 0.3288 0.608 0.276 0.724 0.000 0 0.000 0.000
#> ERR862972 2 0.3288 0.608 0.276 0.724 0.000 0 0.000 0.000
#> ERR878022 2 0.3828 0.313 0.440 0.560 0.000 0 0.000 0.000
#> ERR862955 2 0.1327 0.798 0.064 0.936 0.000 0 0.000 0.000
#> ERR862973 2 0.1327 0.798 0.064 0.936 0.000 0 0.000 0.000
#> ERR878023 2 0.1327 0.798 0.064 0.936 0.000 0 0.000 0.000
#> ERR862956 2 0.1327 0.798 0.064 0.936 0.000 0 0.000 0.000
#> ERR862974 2 0.1327 0.798 0.064 0.936 0.000 0 0.000 0.000
#> ERR878024 2 0.1327 0.798 0.064 0.936 0.000 0 0.000 0.000
#> ERR862975 1 0.2197 0.899 0.900 0.000 0.056 0 0.000 0.044
#> ERR866150 1 0.2197 0.899 0.900 0.000 0.056 0 0.000 0.044
#> ERR866168 1 0.2197 0.899 0.900 0.000 0.056 0 0.000 0.044
#> ERR862976 1 0.2197 0.899 0.900 0.000 0.056 0 0.000 0.044
#> ERR866151 1 0.2197 0.899 0.900 0.000 0.056 0 0.000 0.044
#> ERR866169 1 0.2197 0.899 0.900 0.000 0.056 0 0.000 0.044
#> ERR862977 2 0.1327 0.798 0.064 0.936 0.000 0 0.000 0.000
#> ERR866152 2 0.1327 0.798 0.064 0.936 0.000 0 0.000 0.000
#> ERR866170 2 0.1327 0.798 0.064 0.936 0.000 0 0.000 0.000
#> ERR862978 2 0.1327 0.798 0.064 0.936 0.000 0 0.000 0.000
#> ERR866153 2 0.1327 0.798 0.064 0.936 0.000 0 0.000 0.000
#> ERR866171 2 0.1327 0.798 0.064 0.936 0.000 0 0.000 0.000
#> ERR862979 2 0.0000 0.808 0.000 1.000 0.000 0 0.000 0.000
#> ERR866154 2 0.0000 0.808 0.000 1.000 0.000 0 0.000 0.000
#> ERR866172 2 0.0000 0.808 0.000 1.000 0.000 0 0.000 0.000
#> ERR862980 2 0.0000 0.808 0.000 1.000 0.000 0 0.000 0.000
#> ERR866155 2 0.0000 0.808 0.000 1.000 0.000 0 0.000 0.000
#> ERR866173 2 0.0000 0.808 0.000 1.000 0.000 0 0.000 0.000
#> ERR862981 1 0.0790 0.927 0.968 0.032 0.000 0 0.000 0.000
#> ERR866156 1 0.0790 0.927 0.968 0.032 0.000 0 0.000 0.000
#> ERR866174 1 0.0790 0.927 0.968 0.032 0.000 0 0.000 0.000
#> ERR866157 1 0.0790 0.927 0.968 0.032 0.000 0 0.000 0.000
#> ERR866175 1 0.0790 0.927 0.968 0.032 0.000 0 0.000 0.000
#> ERR862983 3 0.1713 0.909 0.028 0.000 0.928 0 0.000 0.044
#> ERR866158 3 0.1713 0.909 0.028 0.000 0.928 0 0.000 0.044
#> ERR866176 3 0.1713 0.909 0.028 0.000 0.928 0 0.000 0.044
#> ERR862984 3 0.1713 0.909 0.028 0.000 0.928 0 0.000 0.044
#> ERR866159 3 0.1713 0.909 0.028 0.000 0.928 0 0.000 0.044
#> ERR866177 3 0.1713 0.909 0.028 0.000 0.928 0 0.000 0.044
#> ERR862985 1 0.0790 0.927 0.968 0.032 0.000 0 0.000 0.000
#> ERR866160 1 0.0790 0.927 0.968 0.032 0.000 0 0.000 0.000
#> ERR866178 1 0.0790 0.927 0.968 0.032 0.000 0 0.000 0.000
#> ERR862986 1 0.0790 0.927 0.968 0.032 0.000 0 0.000 0.000
#> ERR866161 1 0.0790 0.927 0.968 0.032 0.000 0 0.000 0.000
#> ERR866179 1 0.0790 0.927 0.968 0.032 0.000 0 0.000 0.000
#> ERR862987 2 0.3737 0.461 0.000 0.608 0.000 0 0.000 0.392
#> ERR866162 2 0.3737 0.461 0.000 0.608 0.000 0 0.000 0.392
#> ERR866180 2 0.3737 0.461 0.000 0.608 0.000 0 0.000 0.392
#> ERR862988 2 0.3672 0.493 0.000 0.632 0.000 0 0.000 0.368
#> ERR866163 2 0.3737 0.461 0.000 0.608 0.000 0 0.000 0.392
#> ERR866181 2 0.3737 0.461 0.000 0.608 0.000 0 0.000 0.392
#> ERR862989 1 0.2258 0.897 0.896 0.000 0.060 0 0.000 0.044
#> ERR866164 1 0.2258 0.897 0.896 0.000 0.060 0 0.000 0.044
#> ERR866182 1 0.2258 0.897 0.896 0.000 0.060 0 0.000 0.044
#> ERR862990 1 0.2258 0.897 0.896 0.000 0.060 0 0.000 0.044
#> ERR866165 1 0.2258 0.897 0.896 0.000 0.060 0 0.000 0.044
#> ERR866183 1 0.2258 0.897 0.896 0.000 0.060 0 0.000 0.044
#> ERR862991 2 0.3737 0.461 0.000 0.608 0.000 0 0.000 0.392
#> ERR866166 2 0.3737 0.461 0.000 0.608 0.000 0 0.000 0.392
#> ERR866184 2 0.3737 0.461 0.000 0.608 0.000 0 0.000 0.392
#> ERR862992 2 0.3737 0.461 0.000 0.608 0.000 0 0.000 0.392
#> ERR866167 2 0.3737 0.461 0.000 0.608 0.000 0 0.000 0.392
#> ERR866185 2 0.3737 0.461 0.000 0.608 0.000 0 0.000 0.392
Heatmaps for the consensus matrix. It visualizes the probability of two
samples to be in a same group.
consensus_heatmap(res, k = 2)

consensus_heatmap(res, k = 3)

consensus_heatmap(res, k = 4)

consensus_heatmap(res, k = 5)

consensus_heatmap(res, k = 6)

Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)

membership_heatmap(res, k = 3)

membership_heatmap(res, k = 4)

membership_heatmap(res, k = 5)

membership_heatmap(res, k = 6)

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)

get_signatures(res, k = 3)

get_signatures(res, k = 4)

get_signatures(res, k = 5)

get_signatures(res, k = 6)

Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)

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

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

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

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

Compare the overlap of signatures from different k:
compare_signatures(res)

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.
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:
which_row
: row indices corresponding to the input matrix.
fdr
: FDR for the differential test.
mean_x
: The mean value in group x.
scaled_mean_x
: The mean value in group x after rows are scaled.
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")

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

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

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

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

Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)

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"]
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 15818 rows and 107 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'ATC' method.
#> Subgroups are detected by 'kmeans' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 3.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)

The plots are:
- The first row: a plot of the ECDF (empirical cumulative distribution
function) curves of the consensus matrix for each
k
and the heatmap of
predicted classes for each k
.
- The second row: heatmaps of the consensus matrix for each
k
.
- The third row: heatmaps of the membership matrix for each
k
.
- The fouth row: heatmaps of the signatures for each
k
.
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:
- ECDF curves of the consensus matrix for each
k
;
- 1-PAC. The PAC
score
measures the proportion of the ambiguous subgrouping.
- Mean silhouette score.
- Concordance. The mean probability of fiting the consensus class ids in all
partitions.
- Area increased. Denote \(A_k\) as the area under the ECDF curve for current
k
, the area increased is defined as \(A_k - A_{k-1}\).
- Rand index. The percent of pairs of samples that are both in a same cluster
or both are not in a same cluster in the partition of k and k-1.
- Jaccard index. The ratio of pairs of samples are both in a same cluster in
the partition of k and k-1 and the pairs of samples are both in a same
cluster in the partition k or k-1.
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)

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.623 0.942 0.953 0.4039 0.549 0.549
#> 3 3 0.892 0.932 0.959 0.4337 0.715 0.542
#> 4 4 0.585 0.447 0.758 0.1469 0.818 0.633
#> 5 5 0.651 0.763 0.812 0.0959 0.763 0.460
#> 6 6 0.746 0.739 0.792 0.0747 0.968 0.867
suggest_best_k()
suggests the best \(k\) based on these statistics. The rules are as follows:
- All \(k\) with Jaccard index larger than 0.95 are removed because increasing
\(k\) does not provide enough extra information. If all \(k\) are removed, it is
marked as no subgroup is detected.
- For all \(k\) with 1-PAC score larger than 0.9, the maximal \(k\) is taken as
the best \(k\), and other \(k\) are marked as optional \(k\).
- If it does not fit the second rule. The \(k\) with the maximal vote of the
highest 1-PAC score, highest mean silhouette, and highest concordance is
taken as the best \(k\).
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
#> ERR862939 1 0.4939 0.876 0.892 0.108
#> ERR862957 1 0.4939 0.876 0.892 0.108
#> ERR878007 1 0.4939 0.876 0.892 0.108
#> ERR862940 1 0.4939 0.876 0.892 0.108
#> ERR862958 1 0.4939 0.876 0.892 0.108
#> ERR878008 1 0.4939 0.876 0.892 0.108
#> ERR862941 2 0.0000 1.000 0.000 1.000
#> ERR862959 2 0.0000 1.000 0.000 1.000
#> ERR878009 2 0.0000 1.000 0.000 1.000
#> ERR862942 2 0.0000 1.000 0.000 1.000
#> ERR862960 2 0.0000 1.000 0.000 1.000
#> ERR878010 2 0.0000 1.000 0.000 1.000
#> ERR862943 1 0.0376 0.852 0.996 0.004
#> ERR862961 1 0.0376 0.852 0.996 0.004
#> ERR878011 1 0.0376 0.852 0.996 0.004
#> ERR862944 1 0.0376 0.852 0.996 0.004
#> ERR862962 1 0.0376 0.852 0.996 0.004
#> ERR878012 1 0.0376 0.852 0.996 0.004
#> ERR862945 1 0.0000 0.850 1.000 0.000
#> ERR862963 1 0.0000 0.850 1.000 0.000
#> ERR878013 1 0.0000 0.850 1.000 0.000
#> ERR862946 1 0.0000 0.850 1.000 0.000
#> ERR862964 1 0.0000 0.850 1.000 0.000
#> ERR878014 1 0.0000 0.850 1.000 0.000
#> ERR862947 2 0.0000 1.000 0.000 1.000
#> ERR862965 2 0.0000 1.000 0.000 1.000
#> ERR878015 2 0.0000 1.000 0.000 1.000
#> ERR862948 2 0.0000 1.000 0.000 1.000
#> ERR862966 2 0.0000 1.000 0.000 1.000
#> ERR878016 2 0.0000 1.000 0.000 1.000
#> ERR862949 2 0.0000 1.000 0.000 1.000
#> ERR862967 2 0.0000 1.000 0.000 1.000
#> ERR878017 2 0.0000 1.000 0.000 1.000
#> ERR862950 2 0.0000 1.000 0.000 1.000
#> ERR862968 2 0.0000 1.000 0.000 1.000
#> ERR878018 2 0.0000 1.000 0.000 1.000
#> ERR862951 2 0.0000 1.000 0.000 1.000
#> ERR862969 2 0.0000 1.000 0.000 1.000
#> ERR878019 2 0.0000 1.000 0.000 1.000
#> ERR862952 2 0.0000 1.000 0.000 1.000
#> ERR862970 2 0.0000 1.000 0.000 1.000
#> ERR878020 2 0.0000 1.000 0.000 1.000
#> ERR862953 2 0.0000 1.000 0.000 1.000
#> ERR862971 2 0.0000 1.000 0.000 1.000
#> ERR878021 2 0.0000 1.000 0.000 1.000
#> ERR862954 2 0.0000 1.000 0.000 1.000
#> ERR862972 2 0.0000 1.000 0.000 1.000
#> ERR878022 2 0.0000 1.000 0.000 1.000
#> ERR862955 2 0.0000 1.000 0.000 1.000
#> ERR862973 2 0.0000 1.000 0.000 1.000
#> ERR878023 2 0.0000 1.000 0.000 1.000
#> ERR862956 2 0.0000 1.000 0.000 1.000
#> ERR862974 2 0.0000 1.000 0.000 1.000
#> ERR878024 2 0.0000 1.000 0.000 1.000
#> ERR862975 1 0.8955 0.752 0.688 0.312
#> ERR866150 1 0.8955 0.752 0.688 0.312
#> ERR866168 1 0.8955 0.752 0.688 0.312
#> ERR862976 1 0.8955 0.752 0.688 0.312
#> ERR866151 1 0.8955 0.752 0.688 0.312
#> ERR866169 1 0.8955 0.752 0.688 0.312
#> ERR862977 2 0.0000 1.000 0.000 1.000
#> ERR866152 2 0.0000 1.000 0.000 1.000
#> ERR866170 2 0.0000 1.000 0.000 1.000
#> ERR862978 2 0.0000 1.000 0.000 1.000
#> ERR866153 2 0.0000 1.000 0.000 1.000
#> ERR866171 2 0.0000 1.000 0.000 1.000
#> ERR862979 2 0.0000 1.000 0.000 1.000
#> ERR866154 2 0.0000 1.000 0.000 1.000
#> ERR866172 2 0.0000 1.000 0.000 1.000
#> ERR862980 2 0.0000 1.000 0.000 1.000
#> ERR866155 2 0.0000 1.000 0.000 1.000
#> ERR866173 2 0.0000 1.000 0.000 1.000
#> ERR862981 2 0.0000 1.000 0.000 1.000
#> ERR866156 2 0.0000 1.000 0.000 1.000
#> ERR866174 2 0.0000 1.000 0.000 1.000
#> ERR866157 2 0.0000 1.000 0.000 1.000
#> ERR866175 2 0.0000 1.000 0.000 1.000
#> ERR862983 1 0.4939 0.876 0.892 0.108
#> ERR866158 1 0.4939 0.876 0.892 0.108
#> ERR866176 1 0.4939 0.876 0.892 0.108
#> ERR862984 1 0.4939 0.876 0.892 0.108
#> ERR866159 1 0.4939 0.876 0.892 0.108
#> ERR866177 1 0.4939 0.876 0.892 0.108
#> ERR862985 2 0.0000 1.000 0.000 1.000
#> ERR866160 2 0.0000 1.000 0.000 1.000
#> ERR866178 2 0.0000 1.000 0.000 1.000
#> ERR862986 2 0.0000 1.000 0.000 1.000
#> ERR866161 2 0.0000 1.000 0.000 1.000
#> ERR866179 2 0.0000 1.000 0.000 1.000
#> ERR862987 2 0.0000 1.000 0.000 1.000
#> ERR866162 2 0.0000 1.000 0.000 1.000
#> ERR866180 2 0.0000 1.000 0.000 1.000
#> ERR862988 2 0.0000 1.000 0.000 1.000
#> ERR866163 2 0.0000 1.000 0.000 1.000
#> ERR866181 2 0.0000 1.000 0.000 1.000
#> ERR862989 1 0.8955 0.752 0.688 0.312
#> ERR866164 1 0.8955 0.752 0.688 0.312
#> ERR866182 1 0.8955 0.752 0.688 0.312
#> ERR862990 1 0.8955 0.752 0.688 0.312
#> ERR866165 1 0.8955 0.752 0.688 0.312
#> ERR866183 1 0.8955 0.752 0.688 0.312
#> ERR862991 2 0.0000 1.000 0.000 1.000
#> ERR866166 2 0.0000 1.000 0.000 1.000
#> ERR866184 2 0.0000 1.000 0.000 1.000
#> ERR862992 2 0.0000 1.000 0.000 1.000
#> ERR866167 2 0.0000 1.000 0.000 1.000
#> ERR866185 2 0.0000 1.000 0.000 1.000
show/hide code output
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> ERR862939 1 0.1289 0.898 0.968 0.000 0.032
#> ERR862957 1 0.1289 0.898 0.968 0.000 0.032
#> ERR878007 1 0.1289 0.898 0.968 0.000 0.032
#> ERR862940 1 0.1289 0.898 0.968 0.000 0.032
#> ERR862958 1 0.1289 0.898 0.968 0.000 0.032
#> ERR878008 1 0.1289 0.898 0.968 0.000 0.032
#> ERR862941 2 0.0000 0.986 0.000 1.000 0.000
#> ERR862959 2 0.0000 0.986 0.000 1.000 0.000
#> ERR878009 2 0.0000 0.986 0.000 1.000 0.000
#> ERR862942 2 0.0000 0.986 0.000 1.000 0.000
#> ERR862960 2 0.0000 0.986 0.000 1.000 0.000
#> ERR878010 2 0.0000 0.986 0.000 1.000 0.000
#> ERR862943 3 0.4796 0.870 0.220 0.000 0.780
#> ERR862961 3 0.4796 0.870 0.220 0.000 0.780
#> ERR878011 3 0.4796 0.870 0.220 0.000 0.780
#> ERR862944 3 0.4796 0.870 0.220 0.000 0.780
#> ERR862962 3 0.4796 0.870 0.220 0.000 0.780
#> ERR878012 3 0.4796 0.870 0.220 0.000 0.780
#> ERR862945 3 0.0747 0.889 0.016 0.000 0.984
#> ERR862963 3 0.0747 0.889 0.016 0.000 0.984
#> ERR878013 3 0.0747 0.889 0.016 0.000 0.984
#> ERR862946 3 0.0747 0.889 0.016 0.000 0.984
#> ERR862964 3 0.0747 0.889 0.016 0.000 0.984
#> ERR878014 3 0.0747 0.889 0.016 0.000 0.984
#> ERR862947 2 0.0747 0.975 0.000 0.984 0.016
#> ERR862965 2 0.0747 0.975 0.000 0.984 0.016
#> ERR878015 2 0.0747 0.975 0.000 0.984 0.016
#> ERR862948 2 0.0747 0.975 0.000 0.984 0.016
#> ERR862966 2 0.0747 0.975 0.000 0.984 0.016
#> ERR878016 2 0.0747 0.975 0.000 0.984 0.016
#> ERR862949 2 0.0000 0.986 0.000 1.000 0.000
#> ERR862967 2 0.0000 0.986 0.000 1.000 0.000
#> ERR878017 2 0.0000 0.986 0.000 1.000 0.000
#> ERR862950 2 0.0000 0.986 0.000 1.000 0.000
#> ERR862968 2 0.0000 0.986 0.000 1.000 0.000
#> ERR878018 2 0.0000 0.986 0.000 1.000 0.000
#> ERR862951 1 0.4062 0.798 0.836 0.164 0.000
#> ERR862969 1 0.4062 0.798 0.836 0.164 0.000
#> ERR878019 1 0.4750 0.719 0.784 0.216 0.000
#> ERR862952 1 0.4062 0.798 0.836 0.164 0.000
#> ERR862970 1 0.4062 0.798 0.836 0.164 0.000
#> ERR878020 1 0.4504 0.750 0.804 0.196 0.000
#> ERR862953 2 0.1289 0.974 0.032 0.968 0.000
#> ERR862971 2 0.1289 0.974 0.032 0.968 0.000
#> ERR878021 2 0.1289 0.974 0.032 0.968 0.000
#> ERR862954 2 0.1289 0.974 0.032 0.968 0.000
#> ERR862972 2 0.1289 0.974 0.032 0.968 0.000
#> ERR878022 2 0.1289 0.974 0.032 0.968 0.000
#> ERR862955 2 0.1289 0.974 0.032 0.968 0.000
#> ERR862973 2 0.1289 0.974 0.032 0.968 0.000
#> ERR878023 2 0.1289 0.974 0.032 0.968 0.000
#> ERR862956 2 0.1289 0.974 0.032 0.968 0.000
#> ERR862974 2 0.1289 0.974 0.032 0.968 0.000
#> ERR878024 2 0.1289 0.974 0.032 0.968 0.000
#> ERR862975 1 0.0424 0.915 0.992 0.008 0.000
#> ERR866150 1 0.0424 0.915 0.992 0.008 0.000
#> ERR866168 1 0.0424 0.915 0.992 0.008 0.000
#> ERR862976 1 0.0424 0.915 0.992 0.008 0.000
#> ERR866151 1 0.0424 0.915 0.992 0.008 0.000
#> ERR866169 1 0.0424 0.915 0.992 0.008 0.000
#> ERR862977 2 0.1289 0.974 0.032 0.968 0.000
#> ERR866152 2 0.1289 0.974 0.032 0.968 0.000
#> ERR866170 2 0.1289 0.974 0.032 0.968 0.000
#> ERR862978 2 0.1289 0.974 0.032 0.968 0.000
#> ERR866153 2 0.1289 0.974 0.032 0.968 0.000
#> ERR866171 2 0.1289 0.974 0.032 0.968 0.000
#> ERR862979 2 0.0000 0.986 0.000 1.000 0.000
#> ERR866154 2 0.0000 0.986 0.000 1.000 0.000
#> ERR866172 2 0.0000 0.986 0.000 1.000 0.000
#> ERR862980 2 0.0000 0.986 0.000 1.000 0.000
#> ERR866155 2 0.0000 0.986 0.000 1.000 0.000
#> ERR866173 2 0.0000 0.986 0.000 1.000 0.000
#> ERR862981 1 0.2625 0.888 0.916 0.084 0.000
#> ERR866156 1 0.2625 0.888 0.916 0.084 0.000
#> ERR866174 1 0.2625 0.888 0.916 0.084 0.000
#> ERR866157 1 0.2625 0.888 0.916 0.084 0.000
#> ERR866175 1 0.2625 0.888 0.916 0.084 0.000
#> ERR862983 1 0.1289 0.898 0.968 0.000 0.032
#> ERR866158 1 0.1289 0.898 0.968 0.000 0.032
#> ERR866176 1 0.1289 0.898 0.968 0.000 0.032
#> ERR862984 1 0.1289 0.898 0.968 0.000 0.032
#> ERR866159 1 0.1289 0.898 0.968 0.000 0.032
#> ERR866177 1 0.1289 0.898 0.968 0.000 0.032
#> ERR862985 1 0.1411 0.910 0.964 0.036 0.000
#> ERR866160 1 0.2261 0.899 0.932 0.068 0.000
#> ERR866178 1 0.2261 0.899 0.932 0.068 0.000
#> ERR862986 1 0.2261 0.899 0.932 0.068 0.000
#> ERR866161 1 0.2261 0.899 0.932 0.068 0.000
#> ERR866179 1 0.2356 0.896 0.928 0.072 0.000
#> ERR862987 2 0.0000 0.986 0.000 1.000 0.000
#> ERR866162 2 0.0000 0.986 0.000 1.000 0.000
#> ERR866180 2 0.0000 0.986 0.000 1.000 0.000
#> ERR862988 2 0.0000 0.986 0.000 1.000 0.000
#> ERR866163 2 0.0000 0.986 0.000 1.000 0.000
#> ERR866181 2 0.0000 0.986 0.000 1.000 0.000
#> ERR862989 1 0.0424 0.915 0.992 0.008 0.000
#> ERR866164 1 0.0424 0.915 0.992 0.008 0.000
#> ERR866182 1 0.0424 0.915 0.992 0.008 0.000
#> ERR862990 1 0.0424 0.915 0.992 0.008 0.000
#> ERR866165 1 0.0424 0.915 0.992 0.008 0.000
#> ERR866183 1 0.0424 0.915 0.992 0.008 0.000
#> ERR862991 2 0.0000 0.986 0.000 1.000 0.000
#> ERR866166 2 0.0000 0.986 0.000 1.000 0.000
#> ERR866184 2 0.0000 0.986 0.000 1.000 0.000
#> ERR862992 2 0.0000 0.986 0.000 1.000 0.000
#> ERR866167 2 0.0000 0.986 0.000 1.000 0.000
#> ERR866185 2 0.0000 0.986 0.000 1.000 0.000
show/hide code output
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> ERR862939 1 0.1022 0.5927 0.968 0.000 0.032 0.000
#> ERR862957 1 0.1022 0.5927 0.968 0.000 0.032 0.000
#> ERR878007 1 0.1022 0.5927 0.968 0.000 0.032 0.000
#> ERR862940 1 0.1022 0.5927 0.968 0.000 0.032 0.000
#> ERR862958 1 0.1022 0.5927 0.968 0.000 0.032 0.000
#> ERR878008 1 0.1022 0.5927 0.968 0.000 0.032 0.000
#> ERR862941 2 0.0707 0.6353 0.000 0.980 0.020 0.000
#> ERR862959 2 0.0707 0.6353 0.000 0.980 0.020 0.000
#> ERR878009 2 0.0817 0.6312 0.000 0.976 0.024 0.000
#> ERR862942 2 0.0707 0.6353 0.000 0.980 0.020 0.000
#> ERR862960 2 0.0707 0.6353 0.000 0.980 0.020 0.000
#> ERR878010 2 0.0817 0.6312 0.000 0.976 0.024 0.000
#> ERR862943 1 0.5800 -0.1641 0.548 0.000 0.032 0.420
#> ERR862961 1 0.5800 -0.1641 0.548 0.000 0.032 0.420
#> ERR878011 1 0.5800 -0.1641 0.548 0.000 0.032 0.420
#> ERR862944 1 0.5800 -0.1641 0.548 0.000 0.032 0.420
#> ERR862962 1 0.5800 -0.1641 0.548 0.000 0.032 0.420
#> ERR878012 1 0.5800 -0.1641 0.548 0.000 0.032 0.420
#> ERR862945 4 0.0000 0.9992 0.000 0.000 0.000 1.000
#> ERR862963 4 0.0000 0.9992 0.000 0.000 0.000 1.000
#> ERR878013 4 0.0000 0.9992 0.000 0.000 0.000 1.000
#> ERR862946 4 0.0188 0.9984 0.000 0.000 0.004 0.996
#> ERR862964 4 0.0188 0.9984 0.000 0.000 0.004 0.996
#> ERR878014 4 0.0000 0.9992 0.000 0.000 0.000 1.000
#> ERR862947 3 0.4477 1.0000 0.000 0.312 0.688 0.000
#> ERR862965 3 0.4477 1.0000 0.000 0.312 0.688 0.000
#> ERR878015 3 0.4477 1.0000 0.000 0.312 0.688 0.000
#> ERR862948 3 0.4477 1.0000 0.000 0.312 0.688 0.000
#> ERR862966 3 0.4477 1.0000 0.000 0.312 0.688 0.000
#> ERR878016 3 0.4477 1.0000 0.000 0.312 0.688 0.000
#> ERR862949 2 0.0707 0.6353 0.000 0.980 0.020 0.000
#> ERR862967 2 0.0707 0.6353 0.000 0.980 0.020 0.000
#> ERR878017 2 0.0707 0.6353 0.000 0.980 0.020 0.000
#> ERR862950 2 0.0707 0.6353 0.000 0.980 0.020 0.000
#> ERR862968 2 0.0707 0.6353 0.000 0.980 0.020 0.000
#> ERR878018 2 0.0707 0.6353 0.000 0.980 0.020 0.000
#> ERR862951 2 0.7692 -0.0898 0.268 0.456 0.276 0.000
#> ERR862969 2 0.7692 -0.0898 0.268 0.456 0.276 0.000
#> ERR878019 2 0.7643 -0.0586 0.256 0.468 0.276 0.000
#> ERR862952 2 0.7692 -0.0898 0.268 0.456 0.276 0.000
#> ERR862970 2 0.7692 -0.0898 0.268 0.456 0.276 0.000
#> ERR878020 2 0.7676 -0.0791 0.264 0.460 0.276 0.000
#> ERR862953 2 0.4428 0.4698 0.004 0.720 0.276 0.000
#> ERR862971 2 0.4428 0.4698 0.004 0.720 0.276 0.000
#> ERR878021 2 0.4428 0.4698 0.004 0.720 0.276 0.000
#> ERR862954 2 0.4428 0.4698 0.004 0.720 0.276 0.000
#> ERR862972 2 0.4428 0.4698 0.004 0.720 0.276 0.000
#> ERR878022 2 0.4428 0.4698 0.004 0.720 0.276 0.000
#> ERR862955 2 0.0469 0.6441 0.000 0.988 0.012 0.000
#> ERR862973 2 0.0469 0.6441 0.000 0.988 0.012 0.000
#> ERR878023 2 0.0469 0.6441 0.000 0.988 0.012 0.000
#> ERR862956 2 0.0469 0.6441 0.000 0.988 0.012 0.000
#> ERR862974 2 0.0469 0.6441 0.000 0.988 0.012 0.000
#> ERR878024 2 0.0469 0.6441 0.000 0.988 0.012 0.000
#> ERR862975 1 0.4008 0.6681 0.756 0.000 0.244 0.000
#> ERR866150 1 0.4008 0.6681 0.756 0.000 0.244 0.000
#> ERR866168 1 0.4008 0.6681 0.756 0.000 0.244 0.000
#> ERR862976 1 0.4008 0.6681 0.756 0.000 0.244 0.000
#> ERR866151 1 0.4008 0.6681 0.756 0.000 0.244 0.000
#> ERR866169 1 0.4008 0.6681 0.756 0.000 0.244 0.000
#> ERR862977 2 0.0469 0.6441 0.000 0.988 0.012 0.000
#> ERR866152 2 0.0469 0.6441 0.000 0.988 0.012 0.000
#> ERR866170 2 0.0469 0.6441 0.000 0.988 0.012 0.000
#> ERR862978 2 0.0469 0.6441 0.000 0.988 0.012 0.000
#> ERR866153 2 0.0469 0.6441 0.000 0.988 0.012 0.000
#> ERR866171 2 0.0469 0.6441 0.000 0.988 0.012 0.000
#> ERR862979 2 0.0000 0.6430 0.000 1.000 0.000 0.000
#> ERR866154 2 0.0188 0.6423 0.000 0.996 0.004 0.000
#> ERR866172 2 0.0188 0.6423 0.000 0.996 0.004 0.000
#> ERR862980 2 0.0188 0.6423 0.000 0.996 0.004 0.000
#> ERR866155 2 0.0188 0.6423 0.000 0.996 0.004 0.000
#> ERR866173 2 0.0188 0.6423 0.000 0.996 0.004 0.000
#> ERR862981 1 0.7660 0.5006 0.464 0.260 0.276 0.000
#> ERR866156 1 0.7676 0.4946 0.460 0.264 0.276 0.000
#> ERR866174 1 0.7676 0.4946 0.460 0.264 0.276 0.000
#> ERR866157 1 0.7660 0.5006 0.464 0.260 0.276 0.000
#> ERR866175 1 0.7660 0.5006 0.464 0.260 0.276 0.000
#> ERR862983 1 0.0000 0.6103 1.000 0.000 0.000 0.000
#> ERR866158 1 0.0000 0.6103 1.000 0.000 0.000 0.000
#> ERR866176 1 0.0000 0.6103 1.000 0.000 0.000 0.000
#> ERR862984 1 0.0000 0.6103 1.000 0.000 0.000 0.000
#> ERR866159 1 0.0000 0.6103 1.000 0.000 0.000 0.000
#> ERR866177 1 0.0000 0.6103 1.000 0.000 0.000 0.000
#> ERR862985 1 0.7643 0.5068 0.468 0.256 0.276 0.000
#> ERR866160 1 0.7643 0.5068 0.468 0.256 0.276 0.000
#> ERR866178 1 0.7643 0.5068 0.468 0.256 0.276 0.000
#> ERR862986 1 0.7643 0.5068 0.468 0.256 0.276 0.000
#> ERR866161 1 0.7643 0.5068 0.468 0.256 0.276 0.000
#> ERR866179 1 0.7643 0.5068 0.468 0.256 0.276 0.000
#> ERR862987 2 0.4977 -0.4735 0.000 0.540 0.460 0.000
#> ERR866162 2 0.4977 -0.4735 0.000 0.540 0.460 0.000
#> ERR866180 2 0.4977 -0.4735 0.000 0.540 0.460 0.000
#> ERR862988 2 0.4977 -0.4735 0.000 0.540 0.460 0.000
#> ERR866163 2 0.4977 -0.4735 0.000 0.540 0.460 0.000
#> ERR866181 2 0.4977 -0.4735 0.000 0.540 0.460 0.000
#> ERR862989 1 0.3975 0.6683 0.760 0.000 0.240 0.000
#> ERR866164 1 0.3975 0.6683 0.760 0.000 0.240 0.000
#> ERR866182 1 0.3975 0.6683 0.760 0.000 0.240 0.000
#> ERR862990 1 0.3975 0.6683 0.760 0.000 0.240 0.000
#> ERR866165 1 0.3975 0.6683 0.760 0.000 0.240 0.000
#> ERR866183 1 0.3975 0.6683 0.760 0.000 0.240 0.000
#> ERR862991 2 0.4955 -0.4343 0.000 0.556 0.444 0.000
#> ERR866166 2 0.4955 -0.4343 0.000 0.556 0.444 0.000
#> ERR866184 2 0.4955 -0.4343 0.000 0.556 0.444 0.000
#> ERR862992 2 0.4955 -0.4343 0.000 0.556 0.444 0.000
#> ERR866167 2 0.4955 -0.4343 0.000 0.556 0.444 0.000
#> ERR866185 2 0.4955 -0.4343 0.000 0.556 0.444 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
#> ERR862939 3 0.3710 0.833 0.144 0.000 0.808 0.000 0.048
#> ERR862957 3 0.3710 0.833 0.144 0.000 0.808 0.000 0.048
#> ERR878007 3 0.3779 0.832 0.144 0.000 0.804 0.000 0.052
#> ERR862940 3 0.3639 0.833 0.144 0.000 0.812 0.000 0.044
#> ERR862958 3 0.3639 0.833 0.144 0.000 0.812 0.000 0.044
#> ERR878008 3 0.3639 0.833 0.144 0.000 0.812 0.000 0.044
#> ERR862941 2 0.0404 0.838 0.000 0.988 0.000 0.000 0.012
#> ERR862959 2 0.0404 0.838 0.000 0.988 0.000 0.000 0.012
#> ERR878009 2 0.2516 0.624 0.000 0.860 0.000 0.000 0.140
#> ERR862942 2 0.0404 0.838 0.000 0.988 0.000 0.000 0.012
#> ERR862960 2 0.0404 0.838 0.000 0.988 0.000 0.000 0.012
#> ERR878010 2 0.2516 0.624 0.000 0.860 0.000 0.000 0.140
#> ERR862943 3 0.2389 0.773 0.004 0.000 0.880 0.116 0.000
#> ERR862961 3 0.2389 0.773 0.004 0.000 0.880 0.116 0.000
#> ERR878011 3 0.2389 0.773 0.004 0.000 0.880 0.116 0.000
#> ERR862944 3 0.2389 0.773 0.004 0.000 0.880 0.116 0.000
#> ERR862962 3 0.2389 0.773 0.004 0.000 0.880 0.116 0.000
#> ERR878012 3 0.2389 0.773 0.004 0.000 0.880 0.116 0.000
#> ERR862945 4 0.0000 0.997 0.000 0.000 0.000 1.000 0.000
#> ERR862963 4 0.0000 0.997 0.000 0.000 0.000 1.000 0.000
#> ERR878013 4 0.0324 0.995 0.004 0.000 0.000 0.992 0.004
#> ERR862946 4 0.0451 0.995 0.008 0.000 0.004 0.988 0.000
#> ERR862964 4 0.0451 0.995 0.008 0.000 0.004 0.988 0.000
#> ERR878014 4 0.0000 0.997 0.000 0.000 0.000 1.000 0.000
#> ERR862947 5 0.5674 0.659 0.044 0.160 0.100 0.000 0.696
#> ERR862965 5 0.5674 0.659 0.044 0.160 0.100 0.000 0.696
#> ERR878015 5 0.5575 0.660 0.044 0.160 0.092 0.000 0.704
#> ERR862948 5 0.5575 0.660 0.044 0.160 0.092 0.000 0.704
#> ERR862966 5 0.5575 0.660 0.044 0.160 0.092 0.000 0.704
#> ERR878016 5 0.5575 0.660 0.044 0.160 0.092 0.000 0.704
#> ERR862949 2 0.0290 0.841 0.000 0.992 0.000 0.000 0.008
#> ERR862967 2 0.0290 0.841 0.000 0.992 0.000 0.000 0.008
#> ERR878017 2 0.0290 0.841 0.000 0.992 0.000 0.000 0.008
#> ERR862950 2 0.0290 0.841 0.000 0.992 0.000 0.000 0.008
#> ERR862968 2 0.0290 0.841 0.000 0.992 0.000 0.000 0.008
#> ERR878018 2 0.0290 0.841 0.000 0.992 0.000 0.000 0.008
#> ERR862951 1 0.3840 0.683 0.772 0.208 0.012 0.000 0.008
#> ERR862969 1 0.3840 0.683 0.772 0.208 0.012 0.000 0.008
#> ERR878019 1 0.3904 0.673 0.764 0.216 0.012 0.000 0.008
#> ERR862952 1 0.3840 0.683 0.772 0.208 0.012 0.000 0.008
#> ERR862970 1 0.3840 0.683 0.772 0.208 0.012 0.000 0.008
#> ERR878020 1 0.3873 0.680 0.768 0.212 0.012 0.000 0.008
#> ERR862953 2 0.4770 0.411 0.384 0.596 0.012 0.000 0.008
#> ERR862971 2 0.4747 0.432 0.376 0.604 0.012 0.000 0.008
#> ERR878021 2 0.4623 0.507 0.340 0.640 0.012 0.000 0.008
#> ERR862954 2 0.4654 0.495 0.348 0.632 0.012 0.000 0.008
#> ERR862972 2 0.4669 0.486 0.352 0.628 0.012 0.000 0.008
#> ERR878022 2 0.4521 0.550 0.316 0.664 0.012 0.000 0.008
#> ERR862955 2 0.1701 0.843 0.048 0.936 0.016 0.000 0.000
#> ERR862973 2 0.1701 0.843 0.048 0.936 0.016 0.000 0.000
#> ERR878023 2 0.1701 0.843 0.048 0.936 0.016 0.000 0.000
#> ERR862956 2 0.1701 0.843 0.048 0.936 0.016 0.000 0.000
#> ERR862974 2 0.1701 0.843 0.048 0.936 0.016 0.000 0.000
#> ERR878024 2 0.1701 0.843 0.048 0.936 0.016 0.000 0.000
#> ERR862975 1 0.4660 0.633 0.728 0.000 0.192 0.000 0.080
#> ERR866150 1 0.4660 0.633 0.728 0.000 0.192 0.000 0.080
#> ERR866168 1 0.4660 0.633 0.728 0.000 0.192 0.000 0.080
#> ERR862976 1 0.4660 0.633 0.728 0.000 0.192 0.000 0.080
#> ERR866151 1 0.4660 0.633 0.728 0.000 0.192 0.000 0.080
#> ERR866169 1 0.4660 0.633 0.728 0.000 0.192 0.000 0.080
#> ERR862977 2 0.1701 0.843 0.048 0.936 0.016 0.000 0.000
#> ERR866152 2 0.1701 0.843 0.048 0.936 0.016 0.000 0.000
#> ERR866170 2 0.1701 0.843 0.048 0.936 0.016 0.000 0.000
#> ERR862978 2 0.1701 0.843 0.048 0.936 0.016 0.000 0.000
#> ERR866153 2 0.1701 0.843 0.048 0.936 0.016 0.000 0.000
#> ERR866171 2 0.1701 0.843 0.048 0.936 0.016 0.000 0.000
#> ERR862979 2 0.0000 0.845 0.000 1.000 0.000 0.000 0.000
#> ERR866154 2 0.0000 0.845 0.000 1.000 0.000 0.000 0.000
#> ERR866172 2 0.0000 0.845 0.000 1.000 0.000 0.000 0.000
#> ERR862980 2 0.0000 0.845 0.000 1.000 0.000 0.000 0.000
#> ERR866155 2 0.0000 0.845 0.000 1.000 0.000 0.000 0.000
#> ERR866173 2 0.0000 0.845 0.000 1.000 0.000 0.000 0.000
#> ERR862981 1 0.2193 0.769 0.900 0.092 0.000 0.000 0.008
#> ERR866156 1 0.2193 0.769 0.900 0.092 0.000 0.000 0.008
#> ERR866174 1 0.2193 0.769 0.900 0.092 0.000 0.000 0.008
#> ERR866157 1 0.2193 0.769 0.900 0.092 0.000 0.000 0.008
#> ERR866175 1 0.2193 0.769 0.900 0.092 0.000 0.000 0.008
#> ERR862983 3 0.4873 0.757 0.244 0.000 0.688 0.000 0.068
#> ERR866158 3 0.4873 0.757 0.244 0.000 0.688 0.000 0.068
#> ERR866176 3 0.4873 0.757 0.244 0.000 0.688 0.000 0.068
#> ERR862984 3 0.4873 0.757 0.244 0.000 0.688 0.000 0.068
#> ERR866159 3 0.4873 0.757 0.244 0.000 0.688 0.000 0.068
#> ERR866177 3 0.4873 0.757 0.244 0.000 0.688 0.000 0.068
#> ERR862985 1 0.2136 0.770 0.904 0.088 0.000 0.000 0.008
#> ERR866160 1 0.2136 0.770 0.904 0.088 0.000 0.000 0.008
#> ERR866178 1 0.2136 0.770 0.904 0.088 0.000 0.000 0.008
#> ERR862986 1 0.2136 0.770 0.904 0.088 0.000 0.000 0.008
#> ERR866161 1 0.2136 0.770 0.904 0.088 0.000 0.000 0.008
#> ERR866179 1 0.2136 0.770 0.904 0.088 0.000 0.000 0.008
#> ERR862987 5 0.4114 0.823 0.000 0.376 0.000 0.000 0.624
#> ERR866162 5 0.4114 0.823 0.000 0.376 0.000 0.000 0.624
#> ERR866180 5 0.4114 0.823 0.000 0.376 0.000 0.000 0.624
#> ERR862988 5 0.4114 0.823 0.000 0.376 0.000 0.000 0.624
#> ERR866163 5 0.4114 0.823 0.000 0.376 0.000 0.000 0.624
#> ERR866181 5 0.4114 0.823 0.000 0.376 0.000 0.000 0.624
#> ERR862989 1 0.4981 0.612 0.704 0.000 0.188 0.000 0.108
#> ERR866164 1 0.4981 0.612 0.704 0.000 0.188 0.000 0.108
#> ERR866182 1 0.4981 0.612 0.704 0.000 0.188 0.000 0.108
#> ERR862990 1 0.4981 0.612 0.704 0.000 0.188 0.000 0.108
#> ERR866165 1 0.4981 0.612 0.704 0.000 0.188 0.000 0.108
#> ERR866183 1 0.4981 0.612 0.704 0.000 0.188 0.000 0.108
#> ERR862991 5 0.4192 0.805 0.000 0.404 0.000 0.000 0.596
#> ERR866166 5 0.4192 0.805 0.000 0.404 0.000 0.000 0.596
#> ERR866184 5 0.4192 0.805 0.000 0.404 0.000 0.000 0.596
#> ERR862992 5 0.4192 0.805 0.000 0.404 0.000 0.000 0.596
#> ERR866167 5 0.4192 0.805 0.000 0.404 0.000 0.000 0.596
#> ERR866185 5 0.4192 0.805 0.000 0.404 0.000 0.000 0.596
show/hide code output
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> ERR862939 3 0.3588 0.821 0.092 0.000 0.824 0.000 0.032 0.052
#> ERR862957 3 0.3588 0.821 0.092 0.000 0.824 0.000 0.032 0.052
#> ERR878007 3 0.3846 0.817 0.108 0.000 0.804 0.000 0.036 0.052
#> ERR862940 3 0.3539 0.821 0.088 0.000 0.828 0.000 0.032 0.052
#> ERR862958 3 0.3539 0.821 0.088 0.000 0.828 0.000 0.032 0.052
#> ERR878008 3 0.3539 0.821 0.088 0.000 0.828 0.000 0.032 0.052
#> ERR862941 2 0.1053 0.744 0.000 0.964 0.000 0.004 0.012 0.020
#> ERR862959 2 0.1053 0.744 0.000 0.964 0.000 0.004 0.012 0.020
#> ERR878009 2 0.2237 0.690 0.000 0.896 0.000 0.004 0.080 0.020
#> ERR862942 2 0.1053 0.744 0.000 0.964 0.000 0.004 0.012 0.020
#> ERR862960 2 0.1053 0.744 0.000 0.964 0.000 0.004 0.012 0.020
#> ERR878010 2 0.2237 0.690 0.000 0.896 0.000 0.004 0.080 0.020
#> ERR862943 3 0.0363 0.825 0.012 0.000 0.988 0.000 0.000 0.000
#> ERR862961 3 0.0363 0.825 0.012 0.000 0.988 0.000 0.000 0.000
#> ERR878011 3 0.0363 0.825 0.012 0.000 0.988 0.000 0.000 0.000
#> ERR862944 3 0.0363 0.825 0.012 0.000 0.988 0.000 0.000 0.000
#> ERR862962 3 0.0363 0.825 0.012 0.000 0.988 0.000 0.000 0.000
#> ERR878012 3 0.0363 0.825 0.012 0.000 0.988 0.000 0.000 0.000
#> ERR862945 4 0.1082 0.992 0.000 0.000 0.040 0.956 0.000 0.004
#> ERR862963 4 0.0937 0.992 0.000 0.000 0.040 0.960 0.000 0.000
#> ERR878013 4 0.1297 0.990 0.000 0.000 0.040 0.948 0.000 0.012
#> ERR862946 4 0.1624 0.989 0.004 0.000 0.040 0.936 0.000 0.020
#> ERR862964 4 0.1624 0.989 0.004 0.000 0.040 0.936 0.000 0.020
#> ERR878014 4 0.1196 0.991 0.000 0.000 0.040 0.952 0.000 0.008
#> ERR862947 5 0.5087 0.589 0.000 0.052 0.000 0.032 0.632 0.284
#> ERR862965 5 0.5087 0.589 0.000 0.052 0.000 0.032 0.632 0.284
#> ERR878015 5 0.4929 0.590 0.000 0.052 0.000 0.024 0.644 0.280
#> ERR862948 5 0.4929 0.590 0.000 0.052 0.000 0.024 0.644 0.280
#> ERR862966 5 0.4929 0.590 0.000 0.052 0.000 0.024 0.644 0.280
#> ERR878016 5 0.4929 0.590 0.000 0.052 0.000 0.024 0.644 0.280
#> ERR862949 2 0.0260 0.746 0.000 0.992 0.000 0.000 0.008 0.000
#> ERR862967 2 0.0260 0.746 0.000 0.992 0.000 0.000 0.008 0.000
#> ERR878017 2 0.0363 0.746 0.000 0.988 0.000 0.000 0.012 0.000
#> ERR862950 2 0.0260 0.746 0.000 0.992 0.000 0.000 0.008 0.000
#> ERR862968 2 0.0260 0.746 0.000 0.992 0.000 0.000 0.008 0.000
#> ERR878018 2 0.0260 0.746 0.000 0.992 0.000 0.000 0.008 0.000
#> ERR862951 1 0.4454 0.676 0.616 0.032 0.000 0.000 0.004 0.348
#> ERR862969 1 0.4454 0.676 0.616 0.032 0.000 0.000 0.004 0.348
#> ERR878019 1 0.4454 0.676 0.616 0.032 0.000 0.000 0.004 0.348
#> ERR862952 1 0.4543 0.664 0.604 0.036 0.000 0.000 0.004 0.356
#> ERR862970 1 0.4543 0.664 0.604 0.036 0.000 0.000 0.004 0.356
#> ERR878020 1 0.4454 0.676 0.616 0.032 0.000 0.000 0.004 0.348
#> ERR862953 6 0.5313 0.959 0.108 0.384 0.000 0.000 0.000 0.508
#> ERR862971 6 0.5313 0.959 0.108 0.384 0.000 0.000 0.000 0.508
#> ERR878021 6 0.5309 0.961 0.104 0.408 0.000 0.000 0.000 0.488
#> ERR862954 6 0.5300 0.969 0.104 0.400 0.000 0.000 0.000 0.496
#> ERR862972 6 0.5330 0.969 0.108 0.396 0.000 0.000 0.000 0.496
#> ERR878022 6 0.5442 0.943 0.104 0.412 0.000 0.000 0.004 0.480
#> ERR862955 2 0.4491 0.483 0.036 0.676 0.000 0.000 0.016 0.272
#> ERR862973 2 0.4491 0.483 0.036 0.676 0.000 0.000 0.016 0.272
#> ERR878023 2 0.4572 0.485 0.036 0.672 0.000 0.000 0.020 0.272
#> ERR862956 2 0.4491 0.483 0.036 0.676 0.000 0.000 0.016 0.272
#> ERR862974 2 0.4491 0.483 0.036 0.676 0.000 0.000 0.016 0.272
#> ERR878024 2 0.4572 0.485 0.036 0.672 0.000 0.000 0.020 0.272
#> ERR862975 1 0.1700 0.674 0.916 0.000 0.080 0.000 0.000 0.004
#> ERR866150 1 0.1700 0.674 0.916 0.000 0.080 0.000 0.000 0.004
#> ERR866168 1 0.1700 0.674 0.916 0.000 0.080 0.000 0.000 0.004
#> ERR862976 1 0.1700 0.674 0.916 0.000 0.080 0.000 0.000 0.004
#> ERR866151 1 0.1700 0.674 0.916 0.000 0.080 0.000 0.000 0.004
#> ERR866169 1 0.1700 0.674 0.916 0.000 0.080 0.000 0.000 0.004
#> ERR862977 2 0.4491 0.483 0.036 0.676 0.000 0.000 0.016 0.272
#> ERR866152 2 0.4572 0.485 0.036 0.672 0.000 0.000 0.020 0.272
#> ERR866170 2 0.4572 0.485 0.036 0.672 0.000 0.000 0.020 0.272
#> ERR862978 2 0.4491 0.483 0.036 0.676 0.000 0.000 0.016 0.272
#> ERR866153 2 0.4572 0.485 0.036 0.672 0.000 0.000 0.020 0.272
#> ERR866171 2 0.4572 0.485 0.036 0.672 0.000 0.000 0.020 0.272
#> ERR862979 2 0.0260 0.743 0.000 0.992 0.000 0.000 0.000 0.008
#> ERR866154 2 0.0146 0.748 0.000 0.996 0.000 0.000 0.004 0.000
#> ERR866172 2 0.0146 0.748 0.000 0.996 0.000 0.000 0.004 0.000
#> ERR862980 2 0.0000 0.746 0.000 1.000 0.000 0.000 0.000 0.000
#> ERR866155 2 0.0146 0.748 0.000 0.996 0.000 0.000 0.004 0.000
#> ERR866173 2 0.0146 0.748 0.000 0.996 0.000 0.000 0.004 0.000
#> ERR862981 1 0.3809 0.747 0.684 0.008 0.000 0.000 0.004 0.304
#> ERR866156 1 0.3809 0.747 0.684 0.008 0.000 0.000 0.004 0.304
#> ERR866174 1 0.3809 0.747 0.684 0.008 0.000 0.000 0.004 0.304
#> ERR866157 1 0.3809 0.747 0.684 0.008 0.000 0.000 0.004 0.304
#> ERR866175 1 0.3809 0.747 0.684 0.008 0.000 0.000 0.004 0.304
#> ERR862983 3 0.4039 0.774 0.248 0.000 0.716 0.000 0.008 0.028
#> ERR866158 3 0.4026 0.773 0.252 0.000 0.712 0.000 0.004 0.032
#> ERR866176 3 0.4026 0.773 0.252 0.000 0.712 0.000 0.004 0.032
#> ERR862984 3 0.4003 0.774 0.248 0.000 0.716 0.000 0.004 0.032
#> ERR866159 3 0.4026 0.773 0.252 0.000 0.712 0.000 0.004 0.032
#> ERR866177 3 0.4026 0.773 0.252 0.000 0.712 0.000 0.004 0.032
#> ERR862985 1 0.3809 0.747 0.684 0.008 0.000 0.000 0.004 0.304
#> ERR866160 1 0.3809 0.747 0.684 0.008 0.000 0.000 0.004 0.304
#> ERR866178 1 0.3809 0.747 0.684 0.008 0.000 0.000 0.004 0.304
#> ERR862986 1 0.3809 0.747 0.684 0.008 0.000 0.000 0.004 0.304
#> ERR866161 1 0.3809 0.747 0.684 0.008 0.000 0.000 0.004 0.304
#> ERR866179 1 0.3809 0.747 0.684 0.008 0.000 0.000 0.004 0.304
#> ERR862987 5 0.3136 0.825 0.000 0.228 0.000 0.004 0.768 0.000
#> ERR866162 5 0.3136 0.825 0.000 0.228 0.000 0.004 0.768 0.000
#> ERR866180 5 0.3136 0.825 0.000 0.228 0.000 0.004 0.768 0.000
#> ERR862988 5 0.3136 0.825 0.000 0.228 0.000 0.004 0.768 0.000
#> ERR866163 5 0.3136 0.825 0.000 0.228 0.000 0.004 0.768 0.000
#> ERR866181 5 0.3136 0.825 0.000 0.228 0.000 0.004 0.768 0.000
#> ERR862989 1 0.2095 0.669 0.904 0.000 0.076 0.000 0.004 0.016
#> ERR866164 1 0.2095 0.669 0.904 0.000 0.076 0.000 0.004 0.016
#> ERR866182 1 0.2095 0.669 0.904 0.000 0.076 0.000 0.004 0.016
#> ERR862990 1 0.2095 0.669 0.904 0.000 0.076 0.000 0.004 0.016
#> ERR866165 1 0.2095 0.669 0.904 0.000 0.076 0.000 0.004 0.016
#> ERR866183 1 0.2095 0.669 0.904 0.000 0.076 0.000 0.004 0.016
#> ERR862991 5 0.3023 0.823 0.000 0.232 0.000 0.000 0.768 0.000
#> ERR866166 5 0.3023 0.823 0.000 0.232 0.000 0.000 0.768 0.000
#> ERR866184 5 0.3023 0.823 0.000 0.232 0.000 0.000 0.768 0.000
#> ERR862992 5 0.3023 0.823 0.000 0.232 0.000 0.000 0.768 0.000
#> ERR866167 5 0.3023 0.823 0.000 0.232 0.000 0.000 0.768 0.000
#> ERR866185 5 0.3023 0.823 0.000 0.232 0.000 0.000 0.768 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)

consensus_heatmap(res, k = 3)

consensus_heatmap(res, k = 4)

consensus_heatmap(res, k = 5)

consensus_heatmap(res, k = 6)

Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)

membership_heatmap(res, k = 3)

membership_heatmap(res, k = 4)

membership_heatmap(res, k = 5)

membership_heatmap(res, k = 6)

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)

get_signatures(res, k = 3)

get_signatures(res, k = 4)

get_signatures(res, k = 5)

get_signatures(res, k = 6)

Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)

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

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

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

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

Compare the overlap of signatures from different k:
compare_signatures(res)

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.
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:
which_row
: row indices corresponding to the input matrix.
fdr
: FDR for the differential test.
mean_x
: The mean value in group x.
scaled_mean_x
: The mean value in group x after rows are scaled.
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")

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

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

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

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

Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)

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"]
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 15818 rows and 107 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'ATC' method.
#> Subgroups are detected by 'skmeans' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 3.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)

The plots are:
- The first row: a plot of the ECDF (empirical cumulative distribution
function) curves of the consensus matrix for each
k
and the heatmap of
predicted classes for each k
.
- The second row: heatmaps of the consensus matrix for each
k
.
- The third row: heatmaps of the membership matrix for each
k
.
- The fouth row: heatmaps of the signatures for each
k
.
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:
- ECDF curves of the consensus matrix for each
k
;
- 1-PAC. The PAC
score
measures the proportion of the ambiguous subgrouping.
- Mean silhouette score.
- Concordance. The mean probability of fiting the consensus class ids in all
partitions.
- Area increased. Denote \(A_k\) as the area under the ECDF curve for current
k
, the area increased is defined as \(A_k - A_{k-1}\).
- Rand index. The percent of pairs of samples that are both in a same cluster
or both are not in a same cluster in the partition of k and k-1.
- Jaccard index. The ratio of pairs of samples are both in a same cluster in
the partition of k and k-1 and the pairs of samples are both in a same
cluster in the partition k or k-1.
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)

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.968 0.986 0.4932 0.503 0.503
#> 3 3 1.000 0.995 0.997 0.1553 0.930 0.861
#> 4 4 0.848 0.855 0.898 0.1358 0.943 0.868
#> 5 5 0.765 0.749 0.850 0.1130 0.892 0.718
#> 6 6 0.753 0.799 0.818 0.0608 0.905 0.675
suggest_best_k()
suggests the best \(k\) based on these statistics. The rules are as follows:
- All \(k\) with Jaccard index larger than 0.95 are removed because increasing
\(k\) does not provide enough extra information. If all \(k\) are removed, it is
marked as no subgroup is detected.
- For all \(k\) with 1-PAC score larger than 0.9, the maximal \(k\) is taken as
the best \(k\), and other \(k\) are marked as optional \(k\).
- If it does not fit the second rule. The \(k\) with the maximal vote of the
highest 1-PAC score, highest mean silhouette, and highest concordance is
taken as the best \(k\).
suggest_best_k(res)
#> [1] 3
#> attr(,"optional")
#> [1] 2
There is also optional best \(k\) = 2 that is worth to check.
Following shows the table of the partitions (You need to click the show/hide
code output link to see it). The membership matrix (columns with name p*
)
is inferred by
clue::cl_consensus()
function with the SE
method. Basically the value in the membership matrix
represents the probability to belong to a certain group. The finall class
label for an item is determined with the group with highest probability it
belongs to.
In get_classes()
function, the entropy is calculated from the membership
matrix and the silhouette score is calculated from the consensus matrix.
show/hide code output
cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#> class entropy silhouette p1 p2
#> ERR862939 1 0.0000 0.967 1.000 0.000
#> ERR862957 1 0.0000 0.967 1.000 0.000
#> ERR878007 1 0.0000 0.967 1.000 0.000
#> ERR862940 1 0.0000 0.967 1.000 0.000
#> ERR862958 1 0.0000 0.967 1.000 0.000
#> ERR878008 1 0.0000 0.967 1.000 0.000
#> ERR862941 2 0.0000 1.000 0.000 1.000
#> ERR862959 2 0.0000 1.000 0.000 1.000
#> ERR878009 2 0.0000 1.000 0.000 1.000
#> ERR862942 2 0.0000 1.000 0.000 1.000
#> ERR862960 2 0.0000 1.000 0.000 1.000
#> ERR878010 2 0.0000 1.000 0.000 1.000
#> ERR862943 1 0.0000 0.967 1.000 0.000
#> ERR862961 1 0.0000 0.967 1.000 0.000
#> ERR878011 1 0.0000 0.967 1.000 0.000
#> ERR862944 1 0.0000 0.967 1.000 0.000
#> ERR862962 1 0.0000 0.967 1.000 0.000
#> ERR878012 1 0.0000 0.967 1.000 0.000
#> ERR862945 1 0.0000 0.967 1.000 0.000
#> ERR862963 1 0.0000 0.967 1.000 0.000
#> ERR878013 1 0.0000 0.967 1.000 0.000
#> ERR862946 1 0.0000 0.967 1.000 0.000
#> ERR862964 1 0.0000 0.967 1.000 0.000
#> ERR878014 1 0.0000 0.967 1.000 0.000
#> ERR862947 2 0.0000 1.000 0.000 1.000
#> ERR862965 2 0.0000 1.000 0.000 1.000
#> ERR878015 2 0.0000 1.000 0.000 1.000
#> ERR862948 2 0.0000 1.000 0.000 1.000
#> ERR862966 2 0.0000 1.000 0.000 1.000
#> ERR878016 2 0.0000 1.000 0.000 1.000
#> ERR862949 2 0.0000 1.000 0.000 1.000
#> ERR862967 2 0.0000 1.000 0.000 1.000
#> ERR878017 2 0.0000 1.000 0.000 1.000
#> ERR862950 2 0.0000 1.000 0.000 1.000
#> ERR862968 2 0.0000 1.000 0.000 1.000
#> ERR878018 2 0.0000 1.000 0.000 1.000
#> ERR862951 2 0.0000 1.000 0.000 1.000
#> ERR862969 2 0.0000 1.000 0.000 1.000
#> ERR878019 2 0.0000 1.000 0.000 1.000
#> ERR862952 2 0.0000 1.000 0.000 1.000
#> ERR862970 2 0.0000 1.000 0.000 1.000
#> ERR878020 2 0.0000 1.000 0.000 1.000
#> ERR862953 2 0.0000 1.000 0.000 1.000
#> ERR862971 2 0.0000 1.000 0.000 1.000
#> ERR878021 2 0.0000 1.000 0.000 1.000
#> ERR862954 2 0.0000 1.000 0.000 1.000
#> ERR862972 2 0.0000 1.000 0.000 1.000
#> ERR878022 2 0.0000 1.000 0.000 1.000
#> ERR862955 2 0.0000 1.000 0.000 1.000
#> ERR862973 2 0.0000 1.000 0.000 1.000
#> ERR878023 2 0.0000 1.000 0.000 1.000
#> ERR862956 2 0.0000 1.000 0.000 1.000
#> ERR862974 2 0.0000 1.000 0.000 1.000
#> ERR878024 2 0.0000 1.000 0.000 1.000
#> ERR862975 1 0.0000 0.967 1.000 0.000
#> ERR866150 1 0.0000 0.967 1.000 0.000
#> ERR866168 1 0.0000 0.967 1.000 0.000
#> ERR862976 1 0.0000 0.967 1.000 0.000
#> ERR866151 1 0.0000 0.967 1.000 0.000
#> ERR866169 1 0.0000 0.967 1.000 0.000
#> ERR862977 2 0.0000 1.000 0.000 1.000
#> ERR866152 2 0.0000 1.000 0.000 1.000
#> ERR866170 2 0.0000 1.000 0.000 1.000
#> ERR862978 2 0.0000 1.000 0.000 1.000
#> ERR866153 2 0.0000 1.000 0.000 1.000
#> ERR866171 2 0.0000 1.000 0.000 1.000
#> ERR862979 2 0.0000 1.000 0.000 1.000
#> ERR866154 2 0.0000 1.000 0.000 1.000
#> ERR866172 2 0.0000 1.000 0.000 1.000
#> ERR862980 2 0.0000 1.000 0.000 1.000
#> ERR866155 2 0.0000 1.000 0.000 1.000
#> ERR866173 2 0.0000 1.000 0.000 1.000
#> ERR862981 1 0.8763 0.609 0.704 0.296
#> ERR866156 1 0.9522 0.453 0.628 0.372
#> ERR866174 1 0.9552 0.444 0.624 0.376
#> ERR866157 1 0.7745 0.719 0.772 0.228
#> ERR866175 1 0.7056 0.769 0.808 0.192
#> ERR862983 1 0.0000 0.967 1.000 0.000
#> ERR866158 1 0.0000 0.967 1.000 0.000
#> ERR866176 1 0.0000 0.967 1.000 0.000
#> ERR862984 1 0.0000 0.967 1.000 0.000
#> ERR866159 1 0.0000 0.967 1.000 0.000
#> ERR866177 1 0.0000 0.967 1.000 0.000
#> ERR862985 1 0.0000 0.967 1.000 0.000
#> ERR866160 1 0.0000 0.967 1.000 0.000
#> ERR866178 1 0.0000 0.967 1.000 0.000
#> ERR862986 1 0.0000 0.967 1.000 0.000
#> ERR866161 1 0.0938 0.958 0.988 0.012
#> ERR866179 1 0.0938 0.958 0.988 0.012
#> ERR862987 2 0.0000 1.000 0.000 1.000
#> ERR866162 2 0.0000 1.000 0.000 1.000
#> ERR866180 2 0.0000 1.000 0.000 1.000
#> ERR862988 2 0.0000 1.000 0.000 1.000
#> ERR866163 2 0.0000 1.000 0.000 1.000
#> ERR866181 2 0.0000 1.000 0.000 1.000
#> ERR862989 1 0.0000 0.967 1.000 0.000
#> ERR866164 1 0.0000 0.967 1.000 0.000
#> ERR866182 1 0.0000 0.967 1.000 0.000
#> ERR862990 1 0.0000 0.967 1.000 0.000
#> ERR866165 1 0.0000 0.967 1.000 0.000
#> ERR866183 1 0.0000 0.967 1.000 0.000
#> ERR862991 2 0.0000 1.000 0.000 1.000
#> ERR866166 2 0.0000 1.000 0.000 1.000
#> ERR866184 2 0.0000 1.000 0.000 1.000
#> ERR862992 2 0.0000 1.000 0.000 1.000
#> ERR866167 2 0.0000 1.000 0.000 1.000
#> ERR866185 2 0.0000 1.000 0.000 1.000
show/hide code output
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> ERR862939 1 0.000 1.000 1 0.000 0.000
#> ERR862957 1 0.000 1.000 1 0.000 0.000
#> ERR878007 1 0.000 1.000 1 0.000 0.000
#> ERR862940 1 0.000 1.000 1 0.000 0.000
#> ERR862958 1 0.000 1.000 1 0.000 0.000
#> ERR878008 1 0.000 1.000 1 0.000 0.000
#> ERR862941 2 0.000 0.995 0 1.000 0.000
#> ERR862959 2 0.000 0.995 0 1.000 0.000
#> ERR878009 2 0.000 0.995 0 1.000 0.000
#> ERR862942 2 0.000 0.995 0 1.000 0.000
#> ERR862960 2 0.000 0.995 0 1.000 0.000
#> ERR878010 2 0.000 0.995 0 1.000 0.000
#> ERR862943 1 0.000 1.000 1 0.000 0.000
#> ERR862961 1 0.000 1.000 1 0.000 0.000
#> ERR878011 1 0.000 1.000 1 0.000 0.000
#> ERR862944 1 0.000 1.000 1 0.000 0.000
#> ERR862962 1 0.000 1.000 1 0.000 0.000
#> ERR878012 1 0.000 1.000 1 0.000 0.000
#> ERR862945 1 0.000 1.000 1 0.000 0.000
#> ERR862963 1 0.000 1.000 1 0.000 0.000
#> ERR878013 1 0.000 1.000 1 0.000 0.000
#> ERR862946 1 0.000 1.000 1 0.000 0.000
#> ERR862964 1 0.000 1.000 1 0.000 0.000
#> ERR878014 1 0.000 1.000 1 0.000 0.000
#> ERR862947 2 0.000 0.995 0 1.000 0.000
#> ERR862965 2 0.000 0.995 0 1.000 0.000
#> ERR878015 2 0.000 0.995 0 1.000 0.000
#> ERR862948 2 0.000 0.995 0 1.000 0.000
#> ERR862966 2 0.000 0.995 0 1.000 0.000
#> ERR878016 2 0.000 0.995 0 1.000 0.000
#> ERR862949 2 0.000 0.995 0 1.000 0.000
#> ERR862967 2 0.000 0.995 0 1.000 0.000
#> ERR878017 2 0.000 0.995 0 1.000 0.000
#> ERR862950 2 0.000 0.995 0 1.000 0.000
#> ERR862968 2 0.000 0.995 0 1.000 0.000
#> ERR878018 2 0.000 0.995 0 1.000 0.000
#> ERR862951 2 0.000 0.995 0 1.000 0.000
#> ERR862969 2 0.000 0.995 0 1.000 0.000
#> ERR878019 2 0.000 0.995 0 1.000 0.000
#> ERR862952 2 0.362 0.845 0 0.864 0.136
#> ERR862970 2 0.369 0.840 0 0.860 0.140
#> ERR878020 2 0.000 0.995 0 1.000 0.000
#> ERR862953 2 0.000 0.995 0 1.000 0.000
#> ERR862971 2 0.000 0.995 0 1.000 0.000
#> ERR878021 2 0.000 0.995 0 1.000 0.000
#> ERR862954 2 0.000 0.995 0 1.000 0.000
#> ERR862972 2 0.000 0.995 0 1.000 0.000
#> ERR878022 2 0.000 0.995 0 1.000 0.000
#> ERR862955 2 0.000 0.995 0 1.000 0.000
#> ERR862973 2 0.000 0.995 0 1.000 0.000
#> ERR878023 2 0.000 0.995 0 1.000 0.000
#> ERR862956 2 0.000 0.995 0 1.000 0.000
#> ERR862974 2 0.000 0.995 0 1.000 0.000
#> ERR878024 2 0.000 0.995 0 1.000 0.000
#> ERR862975 1 0.000 1.000 1 0.000 0.000
#> ERR866150 1 0.000 1.000 1 0.000 0.000
#> ERR866168 1 0.000 1.000 1 0.000 0.000
#> ERR862976 1 0.000 1.000 1 0.000 0.000
#> ERR866151 1 0.000 1.000 1 0.000 0.000
#> ERR866169 1 0.000 1.000 1 0.000 0.000
#> ERR862977 2 0.000 0.995 0 1.000 0.000
#> ERR866152 2 0.000 0.995 0 1.000 0.000
#> ERR866170 2 0.000 0.995 0 1.000 0.000
#> ERR862978 2 0.000 0.995 0 1.000 0.000
#> ERR866153 2 0.000 0.995 0 1.000 0.000
#> ERR866171 2 0.000 0.995 0 1.000 0.000
#> ERR862979 2 0.000 0.995 0 1.000 0.000
#> ERR866154 2 0.000 0.995 0 1.000 0.000
#> ERR866172 2 0.000 0.995 0 1.000 0.000
#> ERR862980 2 0.000 0.995 0 1.000 0.000
#> ERR866155 2 0.000 0.995 0 1.000 0.000
#> ERR866173 2 0.000 0.995 0 1.000 0.000
#> ERR862981 3 0.000 1.000 0 0.000 1.000
#> ERR866156 3 0.000 1.000 0 0.000 1.000
#> ERR866174 3 0.000 1.000 0 0.000 1.000
#> ERR866157 3 0.000 1.000 0 0.000 1.000
#> ERR866175 3 0.000 1.000 0 0.000 1.000
#> ERR862983 1 0.000 1.000 1 0.000 0.000
#> ERR866158 1 0.000 1.000 1 0.000 0.000
#> ERR866176 1 0.000 1.000 1 0.000 0.000
#> ERR862984 1 0.000 1.000 1 0.000 0.000
#> ERR866159 1 0.000 1.000 1 0.000 0.000
#> ERR866177 1 0.000 1.000 1 0.000 0.000
#> ERR862985 3 0.000 1.000 0 0.000 1.000
#> ERR866160 3 0.000 1.000 0 0.000 1.000
#> ERR866178 3 0.000 1.000 0 0.000 1.000
#> ERR862986 3 0.000 1.000 0 0.000 1.000
#> ERR866161 3 0.000 1.000 0 0.000 1.000
#> ERR866179 3 0.000 1.000 0 0.000 1.000
#> ERR862987 2 0.000 0.995 0 1.000 0.000
#> ERR866162 2 0.000 0.995 0 1.000 0.000
#> ERR866180 2 0.000 0.995 0 1.000 0.000
#> ERR862988 2 0.000 0.995 0 1.000 0.000
#> ERR866163 2 0.000 0.995 0 1.000 0.000
#> ERR866181 2 0.000 0.995 0 1.000 0.000
#> ERR862989 1 0.000 1.000 1 0.000 0.000
#> ERR866164 1 0.000 1.000 1 0.000 0.000
#> ERR866182 1 0.000 1.000 1 0.000 0.000
#> ERR862990 1 0.000 1.000 1 0.000 0.000
#> ERR866165 1 0.000 1.000 1 0.000 0.000
#> ERR866183 1 0.000 1.000 1 0.000 0.000
#> ERR862991 2 0.000 0.995 0 1.000 0.000
#> ERR866166 2 0.000 0.995 0 1.000 0.000
#> ERR866184 2 0.000 0.995 0 1.000 0.000
#> ERR862992 2 0.000 0.995 0 1.000 0.000
#> ERR866167 2 0.000 0.995 0 1.000 0.000
#> ERR866185 2 0.000 0.995 0 1.000 0.000
show/hide code output
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> ERR862939 3 0.0469 0.811 0.000 0.000 0.988 0.012
#> ERR862957 3 0.0469 0.811 0.000 0.000 0.988 0.012
#> ERR878007 3 0.0469 0.811 0.000 0.000 0.988 0.012
#> ERR862940 3 0.0469 0.811 0.000 0.000 0.988 0.012
#> ERR862958 3 0.0469 0.811 0.000 0.000 0.988 0.012
#> ERR878008 3 0.0469 0.811 0.000 0.000 0.988 0.012
#> ERR862941 2 0.0469 0.934 0.000 0.988 0.000 0.012
#> ERR862959 2 0.0469 0.934 0.000 0.988 0.000 0.012
#> ERR878009 2 0.0000 0.935 0.000 1.000 0.000 0.000
#> ERR862942 2 0.0469 0.934 0.000 0.988 0.000 0.012
#> ERR862960 2 0.0469 0.934 0.000 0.988 0.000 0.012
#> ERR878010 2 0.0000 0.935 0.000 1.000 0.000 0.000
#> ERR862943 3 0.0000 0.815 0.000 0.000 1.000 0.000
#> ERR862961 3 0.0000 0.815 0.000 0.000 1.000 0.000
#> ERR878011 3 0.0000 0.815 0.000 0.000 1.000 0.000
#> ERR862944 3 0.0000 0.815 0.000 0.000 1.000 0.000
#> ERR862962 3 0.0000 0.815 0.000 0.000 1.000 0.000
#> ERR878012 3 0.0000 0.815 0.000 0.000 1.000 0.000
#> ERR862945 3 0.0000 0.815 0.000 0.000 1.000 0.000
#> ERR862963 3 0.0000 0.815 0.000 0.000 1.000 0.000
#> ERR878013 3 0.0000 0.815 0.000 0.000 1.000 0.000
#> ERR862946 3 0.0000 0.815 0.000 0.000 1.000 0.000
#> ERR862964 3 0.0000 0.815 0.000 0.000 1.000 0.000
#> ERR878014 3 0.0000 0.815 0.000 0.000 1.000 0.000
#> ERR862947 2 0.0469 0.934 0.000 0.988 0.000 0.012
#> ERR862965 2 0.0469 0.934 0.000 0.988 0.000 0.012
#> ERR878015 2 0.0469 0.934 0.000 0.988 0.000 0.012
#> ERR862948 2 0.0469 0.934 0.000 0.988 0.000 0.012
#> ERR862966 2 0.0469 0.934 0.000 0.988 0.000 0.012
#> ERR878016 2 0.0469 0.934 0.000 0.988 0.000 0.012
#> ERR862949 2 0.0469 0.934 0.000 0.988 0.000 0.012
#> ERR862967 2 0.0469 0.934 0.000 0.988 0.000 0.012
#> ERR878017 2 0.0000 0.935 0.000 1.000 0.000 0.000
#> ERR862950 2 0.0469 0.934 0.000 0.988 0.000 0.012
#> ERR862968 2 0.0469 0.934 0.000 0.988 0.000 0.012
#> ERR878018 2 0.0469 0.934 0.000 0.988 0.000 0.012
#> ERR862951 4 0.3074 0.739 0.000 0.152 0.000 0.848
#> ERR862969 4 0.3400 0.784 0.000 0.180 0.000 0.820
#> ERR878019 4 0.3649 0.804 0.000 0.204 0.000 0.796
#> ERR862952 4 0.6314 0.653 0.068 0.372 0.000 0.560
#> ERR862970 4 0.6465 0.664 0.080 0.364 0.000 0.556
#> ERR878020 4 0.4040 0.806 0.000 0.248 0.000 0.752
#> ERR862953 2 0.4040 0.634 0.000 0.752 0.000 0.248
#> ERR862971 2 0.4040 0.634 0.000 0.752 0.000 0.248
#> ERR878021 2 0.3975 0.626 0.000 0.760 0.000 0.240
#> ERR862954 2 0.3942 0.634 0.000 0.764 0.000 0.236
#> ERR862972 2 0.3975 0.626 0.000 0.760 0.000 0.240
#> ERR878022 2 0.3975 0.626 0.000 0.760 0.000 0.240
#> ERR862955 2 0.1792 0.896 0.000 0.932 0.000 0.068
#> ERR862973 2 0.1792 0.896 0.000 0.932 0.000 0.068
#> ERR878023 2 0.1792 0.896 0.000 0.932 0.000 0.068
#> ERR862956 2 0.1792 0.896 0.000 0.932 0.000 0.068
#> ERR862974 2 0.1792 0.896 0.000 0.932 0.000 0.068
#> ERR878024 2 0.1792 0.896 0.000 0.932 0.000 0.068
#> ERR862975 3 0.4955 0.696 0.000 0.000 0.556 0.444
#> ERR866150 3 0.4955 0.696 0.000 0.000 0.556 0.444
#> ERR866168 3 0.4955 0.696 0.000 0.000 0.556 0.444
#> ERR862976 3 0.4955 0.696 0.000 0.000 0.556 0.444
#> ERR866151 3 0.4955 0.696 0.000 0.000 0.556 0.444
#> ERR866169 3 0.4955 0.696 0.000 0.000 0.556 0.444
#> ERR862977 2 0.1940 0.897 0.000 0.924 0.000 0.076
#> ERR866152 2 0.1792 0.896 0.000 0.932 0.000 0.068
#> ERR866170 2 0.1792 0.896 0.000 0.932 0.000 0.068
#> ERR862978 2 0.1940 0.897 0.000 0.924 0.000 0.076
#> ERR866153 2 0.1792 0.896 0.000 0.932 0.000 0.068
#> ERR866171 2 0.1792 0.896 0.000 0.932 0.000 0.068
#> ERR862979 2 0.0469 0.934 0.000 0.988 0.000 0.012
#> ERR866154 2 0.0000 0.935 0.000 1.000 0.000 0.000
#> ERR866172 2 0.0000 0.935 0.000 1.000 0.000 0.000
#> ERR862980 2 0.0000 0.935 0.000 1.000 0.000 0.000
#> ERR866155 2 0.0000 0.935 0.000 1.000 0.000 0.000
#> ERR866173 2 0.0000 0.935 0.000 1.000 0.000 0.000
#> ERR862981 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> ERR866156 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> ERR866174 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> ERR866157 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> ERR866175 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> ERR862983 3 0.4040 0.787 0.000 0.000 0.752 0.248
#> ERR866158 3 0.4103 0.785 0.000 0.000 0.744 0.256
#> ERR866176 3 0.4103 0.785 0.000 0.000 0.744 0.256
#> ERR862984 3 0.4040 0.787 0.000 0.000 0.752 0.248
#> ERR866159 3 0.4103 0.785 0.000 0.000 0.744 0.256
#> ERR866177 3 0.4103 0.785 0.000 0.000 0.744 0.256
#> ERR862985 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> ERR866160 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> ERR866178 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> ERR862986 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> ERR866161 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> ERR866179 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> ERR862987 2 0.0469 0.934 0.000 0.988 0.000 0.012
#> ERR866162 2 0.0000 0.935 0.000 1.000 0.000 0.000
#> ERR866180 2 0.0000 0.935 0.000 1.000 0.000 0.000
#> ERR862988 2 0.0469 0.934 0.000 0.988 0.000 0.012
#> ERR866163 2 0.0469 0.934 0.000 0.988 0.000 0.012
#> ERR866181 2 0.0469 0.934 0.000 0.988 0.000 0.012
#> ERR862989 3 0.3569 0.794 0.000 0.000 0.804 0.196
#> ERR866164 3 0.4925 0.710 0.000 0.000 0.572 0.428
#> ERR866182 3 0.4925 0.710 0.000 0.000 0.572 0.428
#> ERR862990 3 0.4925 0.710 0.000 0.000 0.572 0.428
#> ERR866165 3 0.4933 0.707 0.000 0.000 0.568 0.432
#> ERR866183 3 0.4933 0.707 0.000 0.000 0.568 0.432
#> ERR862991 2 0.0000 0.935 0.000 1.000 0.000 0.000
#> ERR866166 2 0.0000 0.935 0.000 1.000 0.000 0.000
#> ERR866184 2 0.0000 0.935 0.000 1.000 0.000 0.000
#> ERR862992 2 0.0000 0.935 0.000 1.000 0.000 0.000
#> ERR866167 2 0.0000 0.935 0.000 1.000 0.000 0.000
#> ERR866185 2 0.0000 0.935 0.000 1.000 0.000 0.000
show/hide code output
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> ERR862939 3 0.2144 0.797 0.068 0.000 0.912 0.020 0.00
#> ERR862957 3 0.2144 0.797 0.068 0.000 0.912 0.020 0.00
#> ERR878007 3 0.2144 0.797 0.068 0.000 0.912 0.020 0.00
#> ERR862940 3 0.2144 0.797 0.068 0.000 0.912 0.020 0.00
#> ERR862958 3 0.2144 0.797 0.068 0.000 0.912 0.020 0.00
#> ERR878008 3 0.2144 0.797 0.068 0.000 0.912 0.020 0.00
#> ERR862941 2 0.1408 0.832 0.008 0.948 0.000 0.044 0.00
#> ERR862959 2 0.1408 0.832 0.008 0.948 0.000 0.044 0.00
#> ERR878009 2 0.1168 0.840 0.008 0.960 0.000 0.032 0.00
#> ERR862942 2 0.1408 0.832 0.008 0.948 0.000 0.044 0.00
#> ERR862960 2 0.1408 0.832 0.008 0.948 0.000 0.044 0.00
#> ERR878010 2 0.1168 0.840 0.008 0.960 0.000 0.032 0.00
#> ERR862943 3 0.0000 0.836 0.000 0.000 1.000 0.000 0.00
#> ERR862961 3 0.0000 0.836 0.000 0.000 1.000 0.000 0.00
#> ERR878011 3 0.0000 0.836 0.000 0.000 1.000 0.000 0.00
#> ERR862944 3 0.0000 0.836 0.000 0.000 1.000 0.000 0.00
#> ERR862962 3 0.0000 0.836 0.000 0.000 1.000 0.000 0.00
#> ERR878012 3 0.0000 0.836 0.000 0.000 1.000 0.000 0.00
#> ERR862945 3 0.0000 0.836 0.000 0.000 1.000 0.000 0.00
#> ERR862963 3 0.0000 0.836 0.000 0.000 1.000 0.000 0.00
#> ERR878013 3 0.0000 0.836 0.000 0.000 1.000 0.000 0.00
#> ERR862946 3 0.0000 0.836 0.000 0.000 1.000 0.000 0.00
#> ERR862964 3 0.0000 0.836 0.000 0.000 1.000 0.000 0.00
#> ERR878014 3 0.0000 0.836 0.000 0.000 1.000 0.000 0.00
#> ERR862947 2 0.0955 0.839 0.004 0.968 0.000 0.028 0.00
#> ERR862965 2 0.0955 0.839 0.004 0.968 0.000 0.028 0.00
#> ERR878015 2 0.0955 0.839 0.004 0.968 0.000 0.028 0.00
#> ERR862948 2 0.0955 0.839 0.004 0.968 0.000 0.028 0.00
#> ERR862966 2 0.0955 0.839 0.004 0.968 0.000 0.028 0.00
#> ERR878016 2 0.0955 0.839 0.004 0.968 0.000 0.028 0.00
#> ERR862949 2 0.1670 0.828 0.012 0.936 0.000 0.052 0.00
#> ERR862967 2 0.1670 0.828 0.012 0.936 0.000 0.052 0.00
#> ERR878017 2 0.1597 0.839 0.012 0.940 0.000 0.048 0.00
#> ERR862950 2 0.1670 0.828 0.012 0.936 0.000 0.052 0.00
#> ERR862968 2 0.1670 0.828 0.012 0.936 0.000 0.052 0.00
#> ERR878018 2 0.1251 0.835 0.008 0.956 0.000 0.036 0.00
#> ERR862951 4 0.3106 0.492 0.132 0.024 0.000 0.844 0.00
#> ERR862969 4 0.3409 0.460 0.160 0.024 0.000 0.816 0.00
#> ERR878019 4 0.3368 0.466 0.156 0.024 0.000 0.820 0.00
#> ERR862952 4 0.2708 0.525 0.016 0.072 0.000 0.892 0.02
#> ERR862970 4 0.2769 0.526 0.024 0.064 0.000 0.892 0.02
#> ERR878020 4 0.3035 0.511 0.112 0.032 0.000 0.856 0.00
#> ERR862953 4 0.6097 0.349 0.124 0.420 0.000 0.456 0.00
#> ERR862971 4 0.6095 0.370 0.124 0.416 0.000 0.460 0.00
#> ERR878021 4 0.6017 0.405 0.116 0.404 0.000 0.480 0.00
#> ERR862954 4 0.6062 0.398 0.120 0.416 0.000 0.464 0.00
#> ERR862972 4 0.6042 0.438 0.120 0.396 0.000 0.484 0.00
#> ERR878022 4 0.6100 0.433 0.128 0.388 0.000 0.484 0.00
#> ERR862955 2 0.5240 0.491 0.112 0.672 0.000 0.216 0.00
#> ERR862973 2 0.5240 0.491 0.112 0.672 0.000 0.216 0.00
#> ERR878023 2 0.5284 0.502 0.116 0.668 0.000 0.216 0.00
#> ERR862956 2 0.5240 0.491 0.112 0.672 0.000 0.216 0.00
#> ERR862974 2 0.5240 0.491 0.112 0.672 0.000 0.216 0.00
#> ERR878024 2 0.5284 0.502 0.116 0.668 0.000 0.216 0.00
#> ERR862975 1 0.3551 0.931 0.772 0.000 0.220 0.008 0.00
#> ERR866150 1 0.3551 0.931 0.772 0.000 0.220 0.008 0.00
#> ERR866168 1 0.3551 0.931 0.772 0.000 0.220 0.008 0.00
#> ERR862976 1 0.3551 0.931 0.772 0.000 0.220 0.008 0.00
#> ERR866151 1 0.3551 0.931 0.772 0.000 0.220 0.008 0.00
#> ERR866169 1 0.3551 0.931 0.772 0.000 0.220 0.008 0.00
#> ERR862977 2 0.5195 0.507 0.108 0.676 0.000 0.216 0.00
#> ERR866152 2 0.5177 0.515 0.104 0.676 0.000 0.220 0.00
#> ERR866170 2 0.5177 0.515 0.104 0.676 0.000 0.220 0.00
#> ERR862978 2 0.5195 0.507 0.108 0.676 0.000 0.216 0.00
#> ERR866153 2 0.5177 0.515 0.104 0.676 0.000 0.220 0.00
#> ERR866171 2 0.5177 0.515 0.104 0.676 0.000 0.220 0.00
#> ERR862979 2 0.1670 0.828 0.012 0.936 0.000 0.052 0.00
#> ERR866154 2 0.1522 0.838 0.012 0.944 0.000 0.044 0.00
#> ERR866172 2 0.1522 0.838 0.012 0.944 0.000 0.044 0.00
#> ERR862980 2 0.1444 0.839 0.012 0.948 0.000 0.040 0.00
#> ERR866155 2 0.1522 0.838 0.012 0.944 0.000 0.044 0.00
#> ERR866173 2 0.1522 0.838 0.012 0.944 0.000 0.044 0.00
#> ERR862981 5 0.0000 1.000 0.000 0.000 0.000 0.000 1.00
#> ERR866156 5 0.0000 1.000 0.000 0.000 0.000 0.000 1.00
#> ERR866174 5 0.0000 1.000 0.000 0.000 0.000 0.000 1.00
#> ERR866157 5 0.0000 1.000 0.000 0.000 0.000 0.000 1.00
#> ERR866175 5 0.0000 1.000 0.000 0.000 0.000 0.000 1.00
#> ERR862983 3 0.4045 0.314 0.356 0.000 0.644 0.000 0.00
#> ERR866158 3 0.4045 0.314 0.356 0.000 0.644 0.000 0.00
#> ERR866176 3 0.4045 0.314 0.356 0.000 0.644 0.000 0.00
#> ERR862984 3 0.4045 0.314 0.356 0.000 0.644 0.000 0.00
#> ERR866159 3 0.4045 0.314 0.356 0.000 0.644 0.000 0.00
#> ERR866177 3 0.4045 0.314 0.356 0.000 0.644 0.000 0.00
#> ERR862985 5 0.0000 1.000 0.000 0.000 0.000 0.000 1.00
#> ERR866160 5 0.0000 1.000 0.000 0.000 0.000 0.000 1.00
#> ERR866178 5 0.0000 1.000 0.000 0.000 0.000 0.000 1.00
#> ERR862986 5 0.0000 1.000 0.000 0.000 0.000 0.000 1.00
#> ERR866161 5 0.0000 1.000 0.000 0.000 0.000 0.000 1.00
#> ERR866179 5 0.0000 1.000 0.000 0.000 0.000 0.000 1.00
#> ERR862987 2 0.0566 0.843 0.004 0.984 0.000 0.012 0.00
#> ERR866162 2 0.0955 0.842 0.004 0.968 0.000 0.028 0.00
#> ERR866180 2 0.0955 0.842 0.004 0.968 0.000 0.028 0.00
#> ERR862988 2 0.0955 0.839 0.004 0.968 0.000 0.028 0.00
#> ERR866163 2 0.0162 0.844 0.004 0.996 0.000 0.000 0.00
#> ERR866181 2 0.0324 0.844 0.004 0.992 0.000 0.004 0.00
#> ERR862989 1 0.4505 0.646 0.604 0.000 0.384 0.012 0.00
#> ERR866164 1 0.3821 0.925 0.764 0.000 0.216 0.020 0.00
#> ERR866182 1 0.3821 0.925 0.764 0.000 0.216 0.020 0.00
#> ERR862990 1 0.3821 0.925 0.764 0.000 0.216 0.020 0.00
#> ERR866165 1 0.3821 0.925 0.764 0.000 0.216 0.020 0.00
#> ERR866183 1 0.3821 0.925 0.764 0.000 0.216 0.020 0.00
#> ERR862991 2 0.1251 0.839 0.008 0.956 0.000 0.036 0.00
#> ERR866166 2 0.1251 0.839 0.008 0.956 0.000 0.036 0.00
#> ERR866184 2 0.1251 0.839 0.008 0.956 0.000 0.036 0.00
#> ERR862992 2 0.0955 0.842 0.004 0.968 0.000 0.028 0.00
#> ERR866167 2 0.1251 0.839 0.008 0.956 0.000 0.036 0.00
#> ERR866185 2 0.1251 0.839 0.008 0.956 0.000 0.036 0.00
show/hide code output
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> ERR862939 3 0.3371 0.727 0.044 0.000 0.832 0.104 0.020 0.000
#> ERR862957 3 0.3371 0.727 0.044 0.000 0.832 0.104 0.020 0.000
#> ERR878007 3 0.3371 0.727 0.044 0.000 0.832 0.104 0.020 0.000
#> ERR862940 3 0.3371 0.727 0.044 0.000 0.832 0.104 0.020 0.000
#> ERR862958 3 0.3371 0.727 0.044 0.000 0.832 0.104 0.020 0.000
#> ERR878008 3 0.3371 0.727 0.044 0.000 0.832 0.104 0.020 0.000
#> ERR862941 2 0.0935 0.870 0.004 0.964 0.000 0.032 0.000 0.000
#> ERR862959 2 0.0935 0.870 0.004 0.964 0.000 0.032 0.000 0.000
#> ERR878009 2 0.1967 0.871 0.000 0.904 0.000 0.084 0.012 0.000
#> ERR862942 2 0.0935 0.870 0.004 0.964 0.000 0.032 0.000 0.000
#> ERR862960 2 0.0935 0.870 0.004 0.964 0.000 0.032 0.000 0.000
#> ERR878010 2 0.2147 0.866 0.000 0.896 0.000 0.084 0.020 0.000
#> ERR862943 3 0.0632 0.800 0.024 0.000 0.976 0.000 0.000 0.000
#> ERR862961 3 0.0632 0.800 0.024 0.000 0.976 0.000 0.000 0.000
#> ERR878011 3 0.0632 0.800 0.024 0.000 0.976 0.000 0.000 0.000
#> ERR862944 3 0.0632 0.800 0.024 0.000 0.976 0.000 0.000 0.000
#> ERR862962 3 0.0632 0.800 0.024 0.000 0.976 0.000 0.000 0.000
#> ERR878012 3 0.0632 0.800 0.024 0.000 0.976 0.000 0.000 0.000
#> ERR862945 3 0.0632 0.800 0.024 0.000 0.976 0.000 0.000 0.000
#> ERR862963 3 0.0632 0.800 0.024 0.000 0.976 0.000 0.000 0.000
#> ERR878013 3 0.0632 0.800 0.024 0.000 0.976 0.000 0.000 0.000
#> ERR862946 3 0.0632 0.800 0.024 0.000 0.976 0.000 0.000 0.000
#> ERR862964 3 0.0632 0.800 0.024 0.000 0.976 0.000 0.000 0.000
#> ERR878014 3 0.0632 0.800 0.024 0.000 0.976 0.000 0.000 0.000
#> ERR862947 2 0.0146 0.889 0.004 0.996 0.000 0.000 0.000 0.000
#> ERR862965 2 0.0146 0.889 0.004 0.996 0.000 0.000 0.000 0.000
#> ERR878015 2 0.0146 0.889 0.004 0.996 0.000 0.000 0.000 0.000
#> ERR862948 2 0.0146 0.889 0.004 0.996 0.000 0.000 0.000 0.000
#> ERR862966 2 0.0146 0.889 0.004 0.996 0.000 0.000 0.000 0.000
#> ERR878016 2 0.0146 0.889 0.004 0.996 0.000 0.000 0.000 0.000
#> ERR862949 2 0.1820 0.851 0.008 0.924 0.000 0.056 0.012 0.000
#> ERR862967 2 0.1820 0.851 0.008 0.924 0.000 0.056 0.012 0.000
#> ERR878017 2 0.2398 0.870 0.004 0.888 0.000 0.080 0.028 0.000
#> ERR862950 2 0.1820 0.851 0.008 0.924 0.000 0.056 0.012 0.000
#> ERR862968 2 0.1820 0.851 0.008 0.924 0.000 0.056 0.012 0.000
#> ERR878018 2 0.1065 0.877 0.008 0.964 0.000 0.020 0.008 0.000
#> ERR862951 5 0.2119 0.928 0.036 0.008 0.000 0.044 0.912 0.000
#> ERR862969 5 0.1938 0.924 0.036 0.004 0.000 0.040 0.920 0.000
#> ERR878019 5 0.2420 0.915 0.032 0.008 0.000 0.068 0.892 0.000
#> ERR862952 5 0.3343 0.884 0.008 0.024 0.000 0.148 0.816 0.004
#> ERR862970 5 0.3325 0.884 0.008 0.016 0.000 0.152 0.816 0.008
#> ERR878020 5 0.2085 0.929 0.024 0.008 0.000 0.056 0.912 0.000
#> ERR862953 4 0.5312 0.599 0.004 0.236 0.000 0.608 0.152 0.000
#> ERR862971 4 0.5269 0.618 0.004 0.240 0.000 0.612 0.144 0.000
#> ERR878021 4 0.5508 0.623 0.004 0.212 0.000 0.584 0.200 0.000
#> ERR862954 4 0.5277 0.629 0.004 0.224 0.000 0.616 0.156 0.000
#> ERR862972 4 0.5330 0.605 0.004 0.208 0.000 0.612 0.176 0.000
#> ERR878022 4 0.5659 0.591 0.004 0.208 0.000 0.556 0.232 0.000
#> ERR862955 4 0.3789 0.776 0.000 0.416 0.000 0.584 0.000 0.000
#> ERR862973 4 0.3789 0.776 0.000 0.416 0.000 0.584 0.000 0.000
#> ERR878023 4 0.4294 0.750 0.000 0.428 0.000 0.552 0.020 0.000
#> ERR862956 4 0.3797 0.776 0.000 0.420 0.000 0.580 0.000 0.000
#> ERR862974 4 0.3797 0.776 0.000 0.420 0.000 0.580 0.000 0.000
#> ERR878024 4 0.4294 0.750 0.000 0.428 0.000 0.552 0.020 0.000
#> ERR862975 1 0.4581 0.830 0.732 0.000 0.076 0.164 0.028 0.000
#> ERR866150 1 0.4530 0.832 0.736 0.000 0.072 0.164 0.028 0.000
#> ERR866168 1 0.4530 0.832 0.736 0.000 0.072 0.164 0.028 0.000
#> ERR862976 1 0.4581 0.830 0.732 0.000 0.076 0.164 0.028 0.000
#> ERR866151 1 0.4530 0.832 0.736 0.000 0.072 0.164 0.028 0.000
#> ERR866169 1 0.4530 0.832 0.736 0.000 0.072 0.164 0.028 0.000
#> ERR862977 4 0.3843 0.750 0.000 0.452 0.000 0.548 0.000 0.000
#> ERR866152 4 0.4242 0.732 0.000 0.448 0.000 0.536 0.016 0.000
#> ERR866170 4 0.4242 0.732 0.000 0.448 0.000 0.536 0.016 0.000
#> ERR862978 4 0.3843 0.747 0.000 0.452 0.000 0.548 0.000 0.000
#> ERR866153 4 0.4238 0.736 0.000 0.444 0.000 0.540 0.016 0.000
#> ERR866171 4 0.4242 0.732 0.000 0.448 0.000 0.536 0.016 0.000
#> ERR862979 2 0.1781 0.856 0.008 0.924 0.000 0.060 0.008 0.000
#> ERR866154 2 0.2838 0.850 0.004 0.852 0.000 0.116 0.028 0.000
#> ERR866172 2 0.2882 0.846 0.004 0.848 0.000 0.120 0.028 0.000
#> ERR862980 2 0.2715 0.857 0.004 0.860 0.000 0.112 0.024 0.000
#> ERR866155 2 0.2926 0.843 0.004 0.844 0.000 0.124 0.028 0.000
#> ERR866173 2 0.2926 0.843 0.004 0.844 0.000 0.124 0.028 0.000
#> ERR862981 6 0.0260 0.996 0.000 0.000 0.000 0.008 0.000 0.992
#> ERR866156 6 0.0260 0.996 0.000 0.000 0.000 0.008 0.000 0.992
#> ERR866174 6 0.0260 0.996 0.000 0.000 0.000 0.008 0.000 0.992
#> ERR866157 6 0.0260 0.996 0.000 0.000 0.000 0.008 0.000 0.992
#> ERR866175 6 0.0260 0.996 0.000 0.000 0.000 0.008 0.000 0.992
#> ERR862983 3 0.5379 0.243 0.364 0.000 0.516 0.120 0.000 0.000
#> ERR866158 3 0.5386 0.234 0.368 0.000 0.512 0.120 0.000 0.000
#> ERR866176 3 0.5386 0.234 0.368 0.000 0.512 0.120 0.000 0.000
#> ERR862984 3 0.5386 0.234 0.368 0.000 0.512 0.120 0.000 0.000
#> ERR866159 3 0.5386 0.234 0.368 0.000 0.512 0.120 0.000 0.000
#> ERR866177 3 0.5386 0.234 0.368 0.000 0.512 0.120 0.000 0.000
#> ERR862985 6 0.0000 0.997 0.000 0.000 0.000 0.000 0.000 1.000
#> ERR866160 6 0.0000 0.997 0.000 0.000 0.000 0.000 0.000 1.000
#> ERR866178 6 0.0000 0.997 0.000 0.000 0.000 0.000 0.000 1.000
#> ERR862986 6 0.0000 0.997 0.000 0.000 0.000 0.000 0.000 1.000
#> ERR866161 6 0.0000 0.997 0.000 0.000 0.000 0.000 0.000 1.000
#> ERR866179 6 0.0000 0.997 0.000 0.000 0.000 0.000 0.000 1.000
#> ERR862987 2 0.0790 0.888 0.000 0.968 0.000 0.032 0.000 0.000
#> ERR866162 2 0.1588 0.880 0.000 0.924 0.000 0.072 0.004 0.000
#> ERR866180 2 0.1588 0.880 0.000 0.924 0.000 0.072 0.004 0.000
#> ERR862988 2 0.0508 0.886 0.004 0.984 0.000 0.012 0.000 0.000
#> ERR866163 2 0.0937 0.888 0.000 0.960 0.000 0.040 0.000 0.000
#> ERR866181 2 0.1007 0.888 0.000 0.956 0.000 0.044 0.000 0.000
#> ERR862989 1 0.2934 0.741 0.844 0.000 0.112 0.000 0.044 0.000
#> ERR866164 1 0.1682 0.817 0.928 0.000 0.020 0.000 0.052 0.000
#> ERR866182 1 0.1682 0.817 0.928 0.000 0.020 0.000 0.052 0.000
#> ERR862990 1 0.1682 0.817 0.928 0.000 0.020 0.000 0.052 0.000
#> ERR866165 1 0.1682 0.817 0.928 0.000 0.020 0.000 0.052 0.000
#> ERR866183 1 0.1682 0.817 0.928 0.000 0.020 0.000 0.052 0.000
#> ERR862991 2 0.2536 0.836 0.000 0.864 0.000 0.116 0.020 0.000
#> ERR866166 2 0.2536 0.836 0.000 0.864 0.000 0.116 0.020 0.000
#> ERR866184 2 0.2536 0.836 0.000 0.864 0.000 0.116 0.020 0.000
#> ERR862992 2 0.1858 0.870 0.000 0.904 0.000 0.092 0.004 0.000
#> ERR866167 2 0.2536 0.836 0.000 0.864 0.000 0.116 0.020 0.000
#> ERR866185 2 0.2536 0.836 0.000 0.864 0.000 0.116 0.020 0.000
Heatmaps for the consensus matrix. It visualizes the probability of two
samples to be in a same group.
consensus_heatmap(res, k = 2)

consensus_heatmap(res, k = 3)

consensus_heatmap(res, k = 4)

consensus_heatmap(res, k = 5)

consensus_heatmap(res, k = 6)

Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)

membership_heatmap(res, k = 3)

membership_heatmap(res, k = 4)

membership_heatmap(res, k = 5)

membership_heatmap(res, k = 6)

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)

get_signatures(res, k = 3)

get_signatures(res, k = 4)

get_signatures(res, k = 5)

get_signatures(res, k = 6)

Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)

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

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

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

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

Compare the overlap of signatures from different k:
compare_signatures(res)

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.
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:
which_row
: row indices corresponding to the input matrix.
fdr
: FDR for the differential test.
mean_x
: The mean value in group x.
scaled_mean_x
: The mean value in group x after rows are scaled.
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")

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

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

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

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

Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)

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"]
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 15818 rows and 107 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)

The plots are:
- The first row: a plot of the ECDF (empirical cumulative distribution
function) curves of the consensus matrix for each
k
and the heatmap of
predicted classes for each k
.
- The second row: heatmaps of the consensus matrix for each
k
.
- The third row: heatmaps of the membership matrix for each
k
.
- The fouth row: heatmaps of the signatures for each
k
.
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:
- ECDF curves of the consensus matrix for each
k
;
- 1-PAC. The PAC
score
measures the proportion of the ambiguous subgrouping.
- Mean silhouette score.
- Concordance. The mean probability of fiting the consensus class ids in all
partitions.
- Area increased. Denote \(A_k\) as the area under the ECDF curve for current
k
, the area increased is defined as \(A_k - A_{k-1}\).
- Rand index. The percent of pairs of samples that are both in a same cluster
or both are not in a same cluster in the partition of k and k-1.
- Jaccard index. The ratio of pairs of samples are both in a same cluster in
the partition of k and k-1 and the pairs of samples are both in a same
cluster in the partition k or k-1.
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)

The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 1.000 0.998 0.999 0.3529 0.649 0.649
#> 3 3 0.615 0.851 0.916 0.2207 0.981 0.971
#> 4 4 0.658 0.847 0.921 0.4820 0.724 0.561
#> 5 5 0.705 0.851 0.904 0.1323 0.880 0.676
#> 6 6 0.876 0.881 0.951 0.0471 0.814 0.464
suggest_best_k()
suggests the best \(k\) based on these statistics. The rules are as follows:
- All \(k\) with Jaccard index larger than 0.95 are removed because increasing
\(k\) does not provide enough extra information. If all \(k\) are removed, it is
marked as no subgroup is detected.
- For all \(k\) with 1-PAC score larger than 0.9, the maximal \(k\) is taken as
the best \(k\), and other \(k\) are marked as optional \(k\).
- If it does not fit the second rule. The \(k\) with the maximal vote of the
highest 1-PAC score, highest mean silhouette, and highest concordance is
taken as the best \(k\).
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
#> ERR862939 1 0.0000 1.000 1.000 0.000
#> ERR862957 1 0.0000 1.000 1.000 0.000
#> ERR878007 1 0.0000 1.000 1.000 0.000
#> ERR862940 1 0.0000 1.000 1.000 0.000
#> ERR862958 1 0.0000 1.000 1.000 0.000
#> ERR878008 1 0.0000 1.000 1.000 0.000
#> ERR862941 2 0.0000 0.999 0.000 1.000
#> ERR862959 2 0.0000 0.999 0.000 1.000
#> ERR878009 2 0.0000 0.999 0.000 1.000
#> ERR862942 2 0.0000 0.999 0.000 1.000
#> ERR862960 2 0.0000 0.999 0.000 1.000
#> ERR878010 2 0.0000 0.999 0.000 1.000
#> ERR862943 1 0.0000 1.000 1.000 0.000
#> ERR862961 1 0.0000 1.000 1.000 0.000
#> ERR878011 1 0.0000 1.000 1.000 0.000
#> ERR862944 1 0.0000 1.000 1.000 0.000
#> ERR862962 1 0.0000 1.000 1.000 0.000
#> ERR878012 1 0.0000 1.000 1.000 0.000
#> ERR862945 1 0.0000 1.000 1.000 0.000
#> ERR862963 1 0.0000 1.000 1.000 0.000
#> ERR878013 1 0.0000 1.000 1.000 0.000
#> ERR862946 1 0.0000 1.000 1.000 0.000
#> ERR862964 1 0.0000 1.000 1.000 0.000
#> ERR878014 1 0.0000 1.000 1.000 0.000
#> ERR862947 2 0.0000 0.999 0.000 1.000
#> ERR862965 2 0.0000 0.999 0.000 1.000
#> ERR878015 2 0.0000 0.999 0.000 1.000
#> ERR862948 2 0.0000 0.999 0.000 1.000
#> ERR862966 2 0.0000 0.999 0.000 1.000
#> ERR878016 2 0.0000 0.999 0.000 1.000
#> ERR862949 2 0.0000 0.999 0.000 1.000
#> ERR862967 2 0.0000 0.999 0.000 1.000
#> ERR878017 2 0.0000 0.999 0.000 1.000
#> ERR862950 2 0.0000 0.999 0.000 1.000
#> ERR862968 2 0.0000 0.999 0.000 1.000
#> ERR878018 2 0.0000 0.999 0.000 1.000
#> ERR862951 2 0.0000 0.999 0.000 1.000
#> ERR862969 2 0.0000 0.999 0.000 1.000
#> ERR878019 2 0.0000 0.999 0.000 1.000
#> ERR862952 2 0.0000 0.999 0.000 1.000
#> ERR862970 2 0.0000 0.999 0.000 1.000
#> ERR878020 2 0.0000 0.999 0.000 1.000
#> ERR862953 2 0.0000 0.999 0.000 1.000
#> ERR862971 2 0.0000 0.999 0.000 1.000
#> ERR878021 2 0.0000 0.999 0.000 1.000
#> ERR862954 2 0.0000 0.999 0.000 1.000
#> ERR862972 2 0.0000 0.999 0.000 1.000
#> ERR878022 2 0.0000 0.999 0.000 1.000
#> ERR862955 2 0.0000 0.999 0.000 1.000
#> ERR862973 2 0.0000 0.999 0.000 1.000
#> ERR878023 2 0.0000 0.999 0.000 1.000
#> ERR862956 2 0.0000 0.999 0.000 1.000
#> ERR862974 2 0.0000 0.999 0.000 1.000
#> ERR878024 2 0.0000 0.999 0.000 1.000
#> ERR862975 2 0.2236 0.965 0.036 0.964
#> ERR866150 2 0.0672 0.993 0.008 0.992
#> ERR866168 2 0.0672 0.993 0.008 0.992
#> ERR862976 2 0.0672 0.993 0.008 0.992
#> ERR866151 2 0.0672 0.993 0.008 0.992
#> ERR866169 2 0.0672 0.993 0.008 0.992
#> ERR862977 2 0.0000 0.999 0.000 1.000
#> ERR866152 2 0.0000 0.999 0.000 1.000
#> ERR866170 2 0.0000 0.999 0.000 1.000
#> ERR862978 2 0.0000 0.999 0.000 1.000
#> ERR866153 2 0.0000 0.999 0.000 1.000
#> ERR866171 2 0.0000 0.999 0.000 1.000
#> ERR862979 2 0.0000 0.999 0.000 1.000
#> ERR866154 2 0.0000 0.999 0.000 1.000
#> ERR866172 2 0.0000 0.999 0.000 1.000
#> ERR862980 2 0.0000 0.999 0.000 1.000
#> ERR866155 2 0.0000 0.999 0.000 1.000
#> ERR866173 2 0.0000 0.999 0.000 1.000
#> ERR862981 2 0.0000 0.999 0.000 1.000
#> ERR866156 2 0.0000 0.999 0.000 1.000
#> ERR866174 2 0.0000 0.999 0.000 1.000
#> ERR866157 2 0.0000 0.999 0.000 1.000
#> ERR866175 2 0.0000 0.999 0.000 1.000
#> ERR862983 1 0.0000 1.000 1.000 0.000
#> ERR866158 1 0.0000 1.000 1.000 0.000
#> ERR866176 1 0.0000 1.000 1.000 0.000
#> ERR862984 1 0.0000 1.000 1.000 0.000
#> ERR866159 1 0.0000 1.000 1.000 0.000
#> ERR866177 1 0.0000 1.000 1.000 0.000
#> ERR862985 2 0.0000 0.999 0.000 1.000
#> ERR866160 2 0.0000 0.999 0.000 1.000
#> ERR866178 2 0.0000 0.999 0.000 1.000
#> ERR862986 2 0.0000 0.999 0.000 1.000
#> ERR866161 2 0.0000 0.999 0.000 1.000
#> ERR866179 2 0.0000 0.999 0.000 1.000
#> ERR862987 2 0.0000 0.999 0.000 1.000
#> ERR866162 2 0.0000 0.999 0.000 1.000
#> ERR866180 2 0.0000 0.999 0.000 1.000
#> ERR862988 2 0.0000 0.999 0.000 1.000
#> ERR866163 2 0.0000 0.999 0.000 1.000
#> ERR866181 2 0.0000 0.999 0.000 1.000
#> ERR862989 2 0.0672 0.993 0.008 0.992
#> ERR866164 2 0.0672 0.993 0.008 0.992
#> ERR866182 2 0.0672 0.993 0.008 0.992
#> ERR862990 2 0.0672 0.993 0.008 0.992
#> ERR866165 2 0.0672 0.993 0.008 0.992
#> ERR866183 2 0.0672 0.993 0.008 0.992
#> ERR862991 2 0.0000 0.999 0.000 1.000
#> ERR866166 2 0.0000 0.999 0.000 1.000
#> ERR866184 2 0.0000 0.999 0.000 1.000
#> ERR862992 2 0.0000 0.999 0.000 1.000
#> ERR866167 2 0.0000 0.999 0.000 1.000
#> ERR866185 2 0.0000 0.999 0.000 1.000
show/hide code output
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> ERR862939 1 0.000 1.000 1.000 0.000 0
#> ERR862957 1 0.000 1.000 1.000 0.000 0
#> ERR878007 1 0.000 1.000 1.000 0.000 0
#> ERR862940 1 0.000 1.000 1.000 0.000 0
#> ERR862958 1 0.000 1.000 1.000 0.000 0
#> ERR878008 1 0.000 1.000 1.000 0.000 0
#> ERR862941 2 0.000 0.874 0.000 1.000 0
#> ERR862959 2 0.000 0.874 0.000 1.000 0
#> ERR878009 2 0.000 0.874 0.000 1.000 0
#> ERR862942 2 0.000 0.874 0.000 1.000 0
#> ERR862960 2 0.000 0.874 0.000 1.000 0
#> ERR878010 2 0.000 0.874 0.000 1.000 0
#> ERR862943 1 0.000 1.000 1.000 0.000 0
#> ERR862961 1 0.000 1.000 1.000 0.000 0
#> ERR878011 1 0.000 1.000 1.000 0.000 0
#> ERR862944 1 0.000 1.000 1.000 0.000 0
#> ERR862962 1 0.000 1.000 1.000 0.000 0
#> ERR878012 1 0.000 1.000 1.000 0.000 0
#> ERR862945 3 0.000 1.000 0.000 0.000 1
#> ERR862963 3 0.000 1.000 0.000 0.000 1
#> ERR878013 3 0.000 1.000 0.000 0.000 1
#> ERR862946 3 0.000 1.000 0.000 0.000 1
#> ERR862964 3 0.000 1.000 0.000 0.000 1
#> ERR878014 3 0.000 1.000 0.000 0.000 1
#> ERR862947 2 0.000 0.874 0.000 1.000 0
#> ERR862965 2 0.000 0.874 0.000 1.000 0
#> ERR878015 2 0.000 0.874 0.000 1.000 0
#> ERR862948 2 0.000 0.874 0.000 1.000 0
#> ERR862966 2 0.000 0.874 0.000 1.000 0
#> ERR878016 2 0.000 0.874 0.000 1.000 0
#> ERR862949 2 0.000 0.874 0.000 1.000 0
#> ERR862967 2 0.000 0.874 0.000 1.000 0
#> ERR878017 2 0.000 0.874 0.000 1.000 0
#> ERR862950 2 0.000 0.874 0.000 1.000 0
#> ERR862968 2 0.000 0.874 0.000 1.000 0
#> ERR878018 2 0.000 0.874 0.000 1.000 0
#> ERR862951 2 0.579 0.669 0.332 0.668 0
#> ERR862969 2 0.546 0.706 0.288 0.712 0
#> ERR878019 2 0.412 0.790 0.168 0.832 0
#> ERR862952 2 0.460 0.767 0.204 0.796 0
#> ERR862970 2 0.465 0.765 0.208 0.792 0
#> ERR878020 2 0.455 0.770 0.200 0.800 0
#> ERR862953 2 0.000 0.874 0.000 1.000 0
#> ERR862971 2 0.000 0.874 0.000 1.000 0
#> ERR878021 2 0.000 0.874 0.000 1.000 0
#> ERR862954 2 0.000 0.874 0.000 1.000 0
#> ERR862972 2 0.000 0.874 0.000 1.000 0
#> ERR878022 2 0.000 0.874 0.000 1.000 0
#> ERR862955 2 0.000 0.874 0.000 1.000 0
#> ERR862973 2 0.000 0.874 0.000 1.000 0
#> ERR878023 2 0.000 0.874 0.000 1.000 0
#> ERR862956 2 0.000 0.874 0.000 1.000 0
#> ERR862974 2 0.000 0.874 0.000 1.000 0
#> ERR878024 2 0.000 0.874 0.000 1.000 0
#> ERR862975 2 0.579 0.669 0.332 0.668 0
#> ERR866150 2 0.579 0.669 0.332 0.668 0
#> ERR866168 2 0.579 0.669 0.332 0.668 0
#> ERR862976 2 0.579 0.669 0.332 0.668 0
#> ERR866151 2 0.579 0.669 0.332 0.668 0
#> ERR866169 2 0.579 0.669 0.332 0.668 0
#> ERR862977 2 0.000 0.874 0.000 1.000 0
#> ERR866152 2 0.000 0.874 0.000 1.000 0
#> ERR866170 2 0.000 0.874 0.000 1.000 0
#> ERR862978 2 0.000 0.874 0.000 1.000 0
#> ERR866153 2 0.000 0.874 0.000 1.000 0
#> ERR866171 2 0.000 0.874 0.000 1.000 0
#> ERR862979 2 0.000 0.874 0.000 1.000 0
#> ERR866154 2 0.000 0.874 0.000 1.000 0
#> ERR866172 2 0.000 0.874 0.000 1.000 0
#> ERR862980 2 0.000 0.874 0.000 1.000 0
#> ERR866155 2 0.000 0.874 0.000 1.000 0
#> ERR866173 2 0.000 0.874 0.000 1.000 0
#> ERR862981 2 0.579 0.669 0.332 0.668 0
#> ERR866156 2 0.579 0.669 0.332 0.668 0
#> ERR866174 2 0.579 0.669 0.332 0.668 0
#> ERR866157 2 0.579 0.669 0.332 0.668 0
#> ERR866175 2 0.579 0.669 0.332 0.668 0
#> ERR862983 1 0.000 1.000 1.000 0.000 0
#> ERR866158 1 0.000 1.000 1.000 0.000 0
#> ERR866176 1 0.000 1.000 1.000 0.000 0
#> ERR862984 1 0.000 1.000 1.000 0.000 0
#> ERR866159 1 0.000 1.000 1.000 0.000 0
#> ERR866177 1 0.000 1.000 1.000 0.000 0
#> ERR862985 2 0.579 0.669 0.332 0.668 0
#> ERR866160 2 0.579 0.669 0.332 0.668 0
#> ERR866178 2 0.579 0.669 0.332 0.668 0
#> ERR862986 2 0.579 0.669 0.332 0.668 0
#> ERR866161 2 0.579 0.669 0.332 0.668 0
#> ERR866179 2 0.579 0.669 0.332 0.668 0
#> ERR862987 2 0.000 0.874 0.000 1.000 0
#> ERR866162 2 0.000 0.874 0.000 1.000 0
#> ERR866180 2 0.000 0.874 0.000 1.000 0
#> ERR862988 2 0.000 0.874 0.000 1.000 0
#> ERR866163 2 0.000 0.874 0.000 1.000 0
#> ERR866181 2 0.000 0.874 0.000 1.000 0
#> ERR862989 2 0.579 0.669 0.332 0.668 0
#> ERR866164 2 0.579 0.669 0.332 0.668 0
#> ERR866182 2 0.579 0.669 0.332 0.668 0
#> ERR862990 2 0.579 0.669 0.332 0.668 0
#> ERR866165 2 0.579 0.669 0.332 0.668 0
#> ERR866183 2 0.579 0.669 0.332 0.668 0
#> ERR862991 2 0.000 0.874 0.000 1.000 0
#> ERR866166 2 0.000 0.874 0.000 1.000 0
#> ERR866184 2 0.000 0.874 0.000 1.000 0
#> ERR862992 2 0.000 0.874 0.000 1.000 0
#> ERR866167 2 0.000 0.874 0.000 1.000 0
#> ERR866185 2 0.000 0.874 0.000 1.000 0
show/hide code output
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> ERR862939 3 0.2149 0.880 0.088 0.000 0.912 0
#> ERR862957 3 0.2408 0.861 0.104 0.000 0.896 0
#> ERR878007 3 0.3074 0.794 0.152 0.000 0.848 0
#> ERR862940 3 0.0000 0.972 0.000 0.000 1.000 0
#> ERR862958 3 0.0000 0.972 0.000 0.000 1.000 0
#> ERR878008 3 0.0000 0.972 0.000 0.000 1.000 0
#> ERR862941 2 0.4250 0.655 0.276 0.724 0.000 0
#> ERR862959 2 0.3837 0.700 0.224 0.776 0.000 0
#> ERR878009 2 0.0000 0.838 0.000 1.000 0.000 0
#> ERR862942 2 0.3975 0.690 0.240 0.760 0.000 0
#> ERR862960 2 0.4356 0.631 0.292 0.708 0.000 0
#> ERR878010 2 0.1792 0.790 0.068 0.932 0.000 0
#> ERR862943 3 0.0000 0.972 0.000 0.000 1.000 0
#> ERR862961 3 0.0000 0.972 0.000 0.000 1.000 0
#> ERR878011 3 0.0000 0.972 0.000 0.000 1.000 0
#> ERR862944 3 0.0000 0.972 0.000 0.000 1.000 0
#> ERR862962 3 0.0000 0.972 0.000 0.000 1.000 0
#> ERR878012 3 0.0000 0.972 0.000 0.000 1.000 0
#> ERR862945 4 0.0000 1.000 0.000 0.000 0.000 1
#> ERR862963 4 0.0000 1.000 0.000 0.000 0.000 1
#> ERR878013 4 0.0000 1.000 0.000 0.000 0.000 1
#> ERR862946 4 0.0000 1.000 0.000 0.000 0.000 1
#> ERR862964 4 0.0000 1.000 0.000 0.000 0.000 1
#> ERR878014 4 0.0000 1.000 0.000 0.000 0.000 1
#> ERR862947 2 0.0000 0.838 0.000 1.000 0.000 0
#> ERR862965 2 0.0000 0.838 0.000 1.000 0.000 0
#> ERR878015 2 0.0000 0.838 0.000 1.000 0.000 0
#> ERR862948 2 0.0000 0.838 0.000 1.000 0.000 0
#> ERR862966 2 0.0000 0.838 0.000 1.000 0.000 0
#> ERR878016 2 0.0000 0.838 0.000 1.000 0.000 0
#> ERR862949 2 0.4898 0.337 0.416 0.584 0.000 0
#> ERR862967 2 0.4985 0.146 0.468 0.532 0.000 0
#> ERR878017 1 0.3400 0.832 0.820 0.180 0.000 0
#> ERR862950 2 0.4406 0.619 0.300 0.700 0.000 0
#> ERR862968 2 0.4406 0.619 0.300 0.700 0.000 0
#> ERR878018 2 0.4585 0.557 0.332 0.668 0.000 0
#> ERR862951 1 0.0336 0.879 0.992 0.008 0.000 0
#> ERR862969 1 0.0000 0.878 1.000 0.000 0.000 0
#> ERR878019 1 0.0000 0.878 1.000 0.000 0.000 0
#> ERR862952 1 0.1118 0.880 0.964 0.036 0.000 0
#> ERR862970 1 0.1022 0.880 0.968 0.032 0.000 0
#> ERR878020 1 0.0000 0.878 1.000 0.000 0.000 0
#> ERR862953 1 0.2469 0.872 0.892 0.108 0.000 0
#> ERR862971 1 0.2921 0.863 0.860 0.140 0.000 0
#> ERR878021 1 0.2589 0.870 0.884 0.116 0.000 0
#> ERR862954 1 0.2647 0.869 0.880 0.120 0.000 0
#> ERR862972 1 0.2868 0.865 0.864 0.136 0.000 0
#> ERR878022 1 0.2469 0.872 0.892 0.108 0.000 0
#> ERR862955 1 0.3074 0.858 0.848 0.152 0.000 0
#> ERR862973 1 0.3074 0.858 0.848 0.152 0.000 0
#> ERR878023 1 0.3074 0.858 0.848 0.152 0.000 0
#> ERR862956 1 0.3074 0.858 0.848 0.152 0.000 0
#> ERR862974 1 0.3074 0.858 0.848 0.152 0.000 0
#> ERR878024 1 0.3074 0.858 0.848 0.152 0.000 0
#> ERR862975 1 0.3907 0.647 0.768 0.000 0.232 0
#> ERR866150 1 0.3907 0.647 0.768 0.000 0.232 0
#> ERR866168 1 0.2760 0.789 0.872 0.000 0.128 0
#> ERR862976 1 0.3907 0.647 0.768 0.000 0.232 0
#> ERR866151 1 0.2704 0.793 0.876 0.000 0.124 0
#> ERR866169 1 0.1867 0.842 0.928 0.000 0.072 0
#> ERR862977 1 0.3074 0.858 0.848 0.152 0.000 0
#> ERR866152 1 0.3074 0.858 0.848 0.152 0.000 0
#> ERR866170 1 0.3074 0.858 0.848 0.152 0.000 0
#> ERR862978 1 0.3219 0.848 0.836 0.164 0.000 0
#> ERR866153 1 0.3074 0.858 0.848 0.152 0.000 0
#> ERR866171 1 0.3074 0.858 0.848 0.152 0.000 0
#> ERR862979 1 0.3219 0.848 0.836 0.164 0.000 0
#> ERR866154 1 0.3219 0.848 0.836 0.164 0.000 0
#> ERR866172 1 0.3219 0.848 0.836 0.164 0.000 0
#> ERR862980 1 0.3219 0.848 0.836 0.164 0.000 0
#> ERR866155 1 0.3219 0.848 0.836 0.164 0.000 0
#> ERR866173 1 0.3219 0.848 0.836 0.164 0.000 0
#> ERR862981 1 0.0000 0.878 1.000 0.000 0.000 0
#> ERR866156 1 0.0000 0.878 1.000 0.000 0.000 0
#> ERR866174 1 0.0000 0.878 1.000 0.000 0.000 0
#> ERR866157 1 0.0000 0.878 1.000 0.000 0.000 0
#> ERR866175 1 0.0000 0.878 1.000 0.000 0.000 0
#> ERR862983 3 0.0000 0.972 0.000 0.000 1.000 0
#> ERR866158 3 0.0000 0.972 0.000 0.000 1.000 0
#> ERR866176 3 0.0000 0.972 0.000 0.000 1.000 0
#> ERR862984 3 0.0000 0.972 0.000 0.000 1.000 0
#> ERR866159 3 0.0000 0.972 0.000 0.000 1.000 0
#> ERR866177 3 0.0000 0.972 0.000 0.000 1.000 0
#> ERR862985 1 0.0469 0.873 0.988 0.000 0.012 0
#> ERR866160 1 0.0000 0.878 1.000 0.000 0.000 0
#> ERR866178 1 0.0000 0.878 1.000 0.000 0.000 0
#> ERR862986 1 0.0000 0.878 1.000 0.000 0.000 0
#> ERR866161 1 0.0000 0.878 1.000 0.000 0.000 0
#> ERR866179 1 0.0000 0.878 1.000 0.000 0.000 0
#> ERR862987 2 0.0000 0.838 0.000 1.000 0.000 0
#> ERR866162 2 0.0000 0.838 0.000 1.000 0.000 0
#> ERR866180 2 0.0000 0.838 0.000 1.000 0.000 0
#> ERR862988 2 0.0000 0.838 0.000 1.000 0.000 0
#> ERR866163 2 0.0000 0.838 0.000 1.000 0.000 0
#> ERR866181 2 0.0000 0.838 0.000 1.000 0.000 0
#> ERR862989 1 0.1792 0.844 0.932 0.000 0.068 0
#> ERR866164 1 0.1557 0.852 0.944 0.000 0.056 0
#> ERR866182 1 0.1302 0.859 0.956 0.000 0.044 0
#> ERR862990 1 0.1940 0.838 0.924 0.000 0.076 0
#> ERR866165 1 0.1302 0.859 0.956 0.000 0.044 0
#> ERR866183 1 0.1474 0.855 0.948 0.000 0.052 0
#> ERR862991 2 0.0000 0.838 0.000 1.000 0.000 0
#> ERR866166 2 0.0000 0.838 0.000 1.000 0.000 0
#> ERR866184 2 0.0000 0.838 0.000 1.000 0.000 0
#> ERR862992 2 0.0000 0.838 0.000 1.000 0.000 0
#> ERR866167 2 0.0000 0.838 0.000 1.000 0.000 0
#> ERR866185 2 0.0000 0.838 0.000 1.000 0.000 0
show/hide code output
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> ERR862939 1 0.1410 0.904 0.940 0.000 0.060 0 0.000
#> ERR862957 1 0.1270 0.914 0.948 0.000 0.052 0 0.000
#> ERR878007 1 0.0404 0.953 0.988 0.000 0.012 0 0.000
#> ERR862940 3 0.3999 0.498 0.344 0.000 0.656 0 0.000
#> ERR862958 3 0.2852 0.781 0.172 0.000 0.828 0 0.000
#> ERR878008 1 0.3661 0.558 0.724 0.000 0.276 0 0.000
#> ERR862941 5 0.3932 0.777 0.000 0.328 0.000 0 0.672
#> ERR862959 5 0.3730 0.806 0.000 0.288 0.000 0 0.712
#> ERR878009 5 0.2891 0.864 0.000 0.176 0.000 0 0.824
#> ERR862942 5 0.3876 0.787 0.000 0.316 0.000 0 0.684
#> ERR862960 5 0.3983 0.766 0.000 0.340 0.000 0 0.660
#> ERR878010 5 0.3452 0.829 0.000 0.244 0.000 0 0.756
#> ERR862943 3 0.0000 0.943 0.000 0.000 1.000 0 0.000
#> ERR862961 3 0.0000 0.943 0.000 0.000 1.000 0 0.000
#> ERR878011 3 0.0000 0.943 0.000 0.000 1.000 0 0.000
#> ERR862944 3 0.0000 0.943 0.000 0.000 1.000 0 0.000
#> ERR862962 3 0.0000 0.943 0.000 0.000 1.000 0 0.000
#> ERR878012 3 0.0000 0.943 0.000 0.000 1.000 0 0.000
#> ERR862945 4 0.0000 1.000 0.000 0.000 0.000 1 0.000
#> ERR862963 4 0.0000 1.000 0.000 0.000 0.000 1 0.000
#> ERR878013 4 0.0000 1.000 0.000 0.000 0.000 1 0.000
#> ERR862946 4 0.0000 1.000 0.000 0.000 0.000 1 0.000
#> ERR862964 4 0.0000 1.000 0.000 0.000 0.000 1 0.000
#> ERR878014 4 0.0000 1.000 0.000 0.000 0.000 1 0.000
#> ERR862947 5 0.0404 0.724 0.012 0.000 0.000 0 0.988
#> ERR862965 5 0.0404 0.724 0.012 0.000 0.000 0 0.988
#> ERR878015 5 0.0404 0.724 0.012 0.000 0.000 0 0.988
#> ERR862948 5 0.0404 0.724 0.012 0.000 0.000 0 0.988
#> ERR862966 5 0.0404 0.724 0.012 0.000 0.000 0 0.988
#> ERR878016 5 0.0404 0.724 0.012 0.000 0.000 0 0.988
#> ERR862949 5 0.4287 0.543 0.000 0.460 0.000 0 0.540
#> ERR862967 2 0.4305 -0.428 0.000 0.512 0.000 0 0.488
#> ERR878017 2 0.2127 0.750 0.000 0.892 0.000 0 0.108
#> ERR862950 5 0.3999 0.762 0.000 0.344 0.000 0 0.656
#> ERR862968 5 0.3999 0.762 0.000 0.344 0.000 0 0.656
#> ERR878018 5 0.4114 0.715 0.000 0.376 0.000 0 0.624
#> ERR862951 2 0.2813 0.834 0.168 0.832 0.000 0 0.000
#> ERR862969 2 0.2891 0.829 0.176 0.824 0.000 0 0.000
#> ERR878019 2 0.2891 0.829 0.176 0.824 0.000 0 0.000
#> ERR862952 2 0.2516 0.847 0.140 0.860 0.000 0 0.000
#> ERR862970 2 0.2561 0.845 0.144 0.856 0.000 0 0.000
#> ERR878020 2 0.2891 0.829 0.176 0.824 0.000 0 0.000
#> ERR862953 2 0.0703 0.878 0.024 0.976 0.000 0 0.000
#> ERR862971 2 0.0404 0.879 0.012 0.988 0.000 0 0.000
#> ERR878021 2 0.0404 0.879 0.012 0.988 0.000 0 0.000
#> ERR862954 2 0.0162 0.879 0.004 0.996 0.000 0 0.000
#> ERR862972 2 0.0162 0.879 0.004 0.996 0.000 0 0.000
#> ERR878022 2 0.0703 0.878 0.024 0.976 0.000 0 0.000
#> ERR862955 2 0.0000 0.878 0.000 1.000 0.000 0 0.000
#> ERR862973 2 0.0000 0.878 0.000 1.000 0.000 0 0.000
#> ERR878023 2 0.0000 0.878 0.000 1.000 0.000 0 0.000
#> ERR862956 2 0.0000 0.878 0.000 1.000 0.000 0 0.000
#> ERR862974 2 0.0000 0.878 0.000 1.000 0.000 0 0.000
#> ERR878024 2 0.0000 0.878 0.000 1.000 0.000 0 0.000
#> ERR862975 1 0.0404 0.965 0.988 0.012 0.000 0 0.000
#> ERR866150 1 0.0404 0.965 0.988 0.012 0.000 0 0.000
#> ERR866168 1 0.0404 0.965 0.988 0.012 0.000 0 0.000
#> ERR862976 1 0.0404 0.965 0.988 0.012 0.000 0 0.000
#> ERR866151 1 0.0404 0.965 0.988 0.012 0.000 0 0.000
#> ERR866169 1 0.0404 0.965 0.988 0.012 0.000 0 0.000
#> ERR862977 2 0.0000 0.878 0.000 1.000 0.000 0 0.000
#> ERR866152 2 0.0000 0.878 0.000 1.000 0.000 0 0.000
#> ERR866170 2 0.0000 0.878 0.000 1.000 0.000 0 0.000
#> ERR862978 2 0.0404 0.870 0.000 0.988 0.000 0 0.012
#> ERR866153 2 0.0000 0.878 0.000 1.000 0.000 0 0.000
#> ERR866171 2 0.0000 0.878 0.000 1.000 0.000 0 0.000
#> ERR862979 2 0.0404 0.870 0.000 0.988 0.000 0 0.012
#> ERR866154 2 0.0404 0.870 0.000 0.988 0.000 0 0.012
#> ERR866172 2 0.0404 0.870 0.000 0.988 0.000 0 0.012
#> ERR862980 2 0.0404 0.870 0.000 0.988 0.000 0 0.012
#> ERR866155 2 0.0404 0.870 0.000 0.988 0.000 0 0.012
#> ERR866173 2 0.0404 0.870 0.000 0.988 0.000 0 0.012
#> ERR862981 2 0.2891 0.829 0.176 0.824 0.000 0 0.000
#> ERR866156 2 0.2891 0.829 0.176 0.824 0.000 0 0.000
#> ERR866174 2 0.2891 0.829 0.176 0.824 0.000 0 0.000
#> ERR866157 2 0.2891 0.829 0.176 0.824 0.000 0 0.000
#> ERR866175 2 0.2891 0.829 0.176 0.824 0.000 0 0.000
#> ERR862983 3 0.0000 0.943 0.000 0.000 1.000 0 0.000
#> ERR866158 3 0.0510 0.933 0.016 0.000 0.984 0 0.000
#> ERR866176 3 0.1608 0.887 0.072 0.000 0.928 0 0.000
#> ERR862984 3 0.0000 0.943 0.000 0.000 1.000 0 0.000
#> ERR866159 3 0.0000 0.943 0.000 0.000 1.000 0 0.000
#> ERR866177 3 0.0000 0.943 0.000 0.000 1.000 0 0.000
#> ERR862985 2 0.3612 0.711 0.268 0.732 0.000 0 0.000
#> ERR866160 2 0.2891 0.829 0.176 0.824 0.000 0 0.000
#> ERR866178 2 0.2891 0.829 0.176 0.824 0.000 0 0.000
#> ERR862986 2 0.2891 0.829 0.176 0.824 0.000 0 0.000
#> ERR866161 2 0.2891 0.829 0.176 0.824 0.000 0 0.000
#> ERR866179 2 0.2891 0.829 0.176 0.824 0.000 0 0.000
#> ERR862987 5 0.2891 0.864 0.000 0.176 0.000 0 0.824
#> ERR866162 5 0.2891 0.864 0.000 0.176 0.000 0 0.824
#> ERR866180 5 0.2280 0.831 0.000 0.120 0.000 0 0.880
#> ERR862988 5 0.2891 0.864 0.000 0.176 0.000 0 0.824
#> ERR866163 5 0.2891 0.864 0.000 0.176 0.000 0 0.824
#> ERR866181 5 0.2891 0.864 0.000 0.176 0.000 0 0.824
#> ERR862989 1 0.0404 0.965 0.988 0.012 0.000 0 0.000
#> ERR866164 1 0.0404 0.965 0.988 0.012 0.000 0 0.000
#> ERR866182 1 0.0404 0.965 0.988 0.012 0.000 0 0.000
#> ERR862990 1 0.0404 0.965 0.988 0.012 0.000 0 0.000
#> ERR866165 1 0.0404 0.965 0.988 0.012 0.000 0 0.000
#> ERR866183 1 0.0404 0.965 0.988 0.012 0.000 0 0.000
#> ERR862991 5 0.2891 0.864 0.000 0.176 0.000 0 0.824
#> ERR866166 5 0.2891 0.864 0.000 0.176 0.000 0 0.824
#> ERR866184 5 0.2891 0.864 0.000 0.176 0.000 0 0.824
#> ERR862992 5 0.2891 0.864 0.000 0.176 0.000 0 0.824
#> ERR866167 5 0.2891 0.864 0.000 0.176 0.000 0 0.824
#> ERR866185 5 0.2891 0.864 0.000 0.176 0.000 0 0.824
show/hide code output
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> ERR862939 6 0.0000 0.993 0.000 0.000 0.000 0 0.000 1.000
#> ERR862957 6 0.0000 0.993 0.000 0.000 0.000 0 0.000 1.000
#> ERR878007 6 0.0000 0.993 0.000 0.000 0.000 0 0.000 1.000
#> ERR862940 3 0.3864 0.151 0.000 0.000 0.520 0 0.000 0.480
#> ERR862958 3 0.3371 0.610 0.000 0.000 0.708 0 0.000 0.292
#> ERR878008 6 0.1765 0.881 0.000 0.000 0.096 0 0.000 0.904
#> ERR862941 2 0.0000 0.918 0.000 1.000 0.000 0 0.000 0.000
#> ERR862959 2 0.0000 0.918 0.000 1.000 0.000 0 0.000 0.000
#> ERR878009 2 0.0000 0.918 0.000 1.000 0.000 0 0.000 0.000
#> ERR862942 2 0.0000 0.918 0.000 1.000 0.000 0 0.000 0.000
#> ERR862960 2 0.0000 0.918 0.000 1.000 0.000 0 0.000 0.000
#> ERR878010 2 0.0000 0.918 0.000 1.000 0.000 0 0.000 0.000
#> ERR862943 3 0.0000 0.912 0.000 0.000 1.000 0 0.000 0.000
#> ERR862961 3 0.0000 0.912 0.000 0.000 1.000 0 0.000 0.000
#> ERR878011 3 0.0000 0.912 0.000 0.000 1.000 0 0.000 0.000
#> ERR862944 3 0.0000 0.912 0.000 0.000 1.000 0 0.000 0.000
#> ERR862962 3 0.0000 0.912 0.000 0.000 1.000 0 0.000 0.000
#> ERR878012 3 0.0000 0.912 0.000 0.000 1.000 0 0.000 0.000
#> ERR862945 4 0.0000 1.000 0.000 0.000 0.000 1 0.000 0.000
#> ERR862963 4 0.0000 1.000 0.000 0.000 0.000 1 0.000 0.000
#> ERR878013 4 0.0000 1.000 0.000 0.000 0.000 1 0.000 0.000
#> ERR862946 4 0.0000 1.000 0.000 0.000 0.000 1 0.000 0.000
#> ERR862964 4 0.0000 1.000 0.000 0.000 0.000 1 0.000 0.000
#> ERR878014 4 0.0000 1.000 0.000 0.000 0.000 1 0.000 0.000
#> ERR862947 5 0.0000 1.000 0.000 0.000 0.000 0 1.000 0.000
#> ERR862965 5 0.0000 1.000 0.000 0.000 0.000 0 1.000 0.000
#> ERR878015 5 0.0000 1.000 0.000 0.000 0.000 0 1.000 0.000
#> ERR862948 5 0.0000 1.000 0.000 0.000 0.000 0 1.000 0.000
#> ERR862966 5 0.0000 1.000 0.000 0.000 0.000 0 1.000 0.000
#> ERR878016 5 0.0000 1.000 0.000 0.000 0.000 0 1.000 0.000
#> ERR862949 2 0.0000 0.918 0.000 1.000 0.000 0 0.000 0.000
#> ERR862967 2 0.0000 0.918 0.000 1.000 0.000 0 0.000 0.000
#> ERR878017 2 0.0000 0.918 0.000 1.000 0.000 0 0.000 0.000
#> ERR862950 2 0.0000 0.918 0.000 1.000 0.000 0 0.000 0.000
#> ERR862968 2 0.0000 0.918 0.000 1.000 0.000 0 0.000 0.000
#> ERR878018 2 0.0000 0.918 0.000 1.000 0.000 0 0.000 0.000
#> ERR862951 1 0.0000 0.901 1.000 0.000 0.000 0 0.000 0.000
#> ERR862969 1 0.0000 0.901 1.000 0.000 0.000 0 0.000 0.000
#> ERR878019 1 0.0000 0.901 1.000 0.000 0.000 0 0.000 0.000
#> ERR862952 1 0.0000 0.901 1.000 0.000 0.000 0 0.000 0.000
#> ERR862970 1 0.0000 0.901 1.000 0.000 0.000 0 0.000 0.000
#> ERR878020 1 0.0000 0.901 1.000 0.000 0.000 0 0.000 0.000
#> ERR862953 1 0.3446 0.504 0.692 0.308 0.000 0 0.000 0.000
#> ERR862971 2 0.3706 0.460 0.380 0.620 0.000 0 0.000 0.000
#> ERR878021 1 0.1387 0.836 0.932 0.068 0.000 0 0.000 0.000
#> ERR862954 1 0.3828 0.120 0.560 0.440 0.000 0 0.000 0.000
#> ERR862972 1 0.3823 0.142 0.564 0.436 0.000 0 0.000 0.000
#> ERR878022 1 0.1863 0.794 0.896 0.104 0.000 0 0.000 0.000
#> ERR862955 2 0.2941 0.761 0.220 0.780 0.000 0 0.000 0.000
#> ERR862973 2 0.2941 0.761 0.220 0.780 0.000 0 0.000 0.000
#> ERR878023 2 0.2941 0.761 0.220 0.780 0.000 0 0.000 0.000
#> ERR862956 2 0.2941 0.761 0.220 0.780 0.000 0 0.000 0.000
#> ERR862974 2 0.2941 0.761 0.220 0.780 0.000 0 0.000 0.000
#> ERR878024 2 0.2941 0.761 0.220 0.780 0.000 0 0.000 0.000
#> ERR862975 6 0.0000 0.993 0.000 0.000 0.000 0 0.000 1.000
#> ERR866150 6 0.0000 0.993 0.000 0.000 0.000 0 0.000 1.000
#> ERR866168 6 0.0000 0.993 0.000 0.000 0.000 0 0.000 1.000
#> ERR862976 6 0.0000 0.993 0.000 0.000 0.000 0 0.000 1.000
#> ERR866151 6 0.0000 0.993 0.000 0.000 0.000 0 0.000 1.000
#> ERR866169 6 0.0000 0.993 0.000 0.000 0.000 0 0.000 1.000
#> ERR862977 2 0.2854 0.772 0.208 0.792 0.000 0 0.000 0.000
#> ERR866152 2 0.2941 0.761 0.220 0.780 0.000 0 0.000 0.000
#> ERR866170 2 0.2941 0.761 0.220 0.780 0.000 0 0.000 0.000
#> ERR862978 2 0.0000 0.918 0.000 1.000 0.000 0 0.000 0.000
#> ERR866153 2 0.2941 0.761 0.220 0.780 0.000 0 0.000 0.000
#> ERR866171 2 0.2941 0.761 0.220 0.780 0.000 0 0.000 0.000
#> ERR862979 2 0.0000 0.918 0.000 1.000 0.000 0 0.000 0.000
#> ERR866154 2 0.0000 0.918 0.000 1.000 0.000 0 0.000 0.000
#> ERR866172 2 0.0000 0.918 0.000 1.000 0.000 0 0.000 0.000
#> ERR862980 2 0.0000 0.918 0.000 1.000 0.000 0 0.000 0.000
#> ERR866155 2 0.0000 0.918 0.000 1.000 0.000 0 0.000 0.000
#> ERR866173 2 0.0000 0.918 0.000 1.000 0.000 0 0.000 0.000
#> ERR862981 1 0.0000 0.901 1.000 0.000 0.000 0 0.000 0.000
#> ERR866156 1 0.0000 0.901 1.000 0.000 0.000 0 0.000 0.000
#> ERR866174 1 0.0000 0.901 1.000 0.000 0.000 0 0.000 0.000
#> ERR866157 1 0.0000 0.901 1.000 0.000 0.000 0 0.000 0.000
#> ERR866175 1 0.0000 0.901 1.000 0.000 0.000 0 0.000 0.000
#> ERR862983 3 0.0000 0.912 0.000 0.000 1.000 0 0.000 0.000
#> ERR866158 3 0.0632 0.896 0.000 0.000 0.976 0 0.000 0.024
#> ERR866176 3 0.2135 0.807 0.000 0.000 0.872 0 0.000 0.128
#> ERR862984 3 0.0000 0.912 0.000 0.000 1.000 0 0.000 0.000
#> ERR866159 3 0.0000 0.912 0.000 0.000 1.000 0 0.000 0.000
#> ERR866177 3 0.0000 0.912 0.000 0.000 1.000 0 0.000 0.000
#> ERR862985 1 0.0000 0.901 1.000 0.000 0.000 0 0.000 0.000
#> ERR866160 1 0.0000 0.901 1.000 0.000 0.000 0 0.000 0.000
#> ERR866178 1 0.0000 0.901 1.000 0.000 0.000 0 0.000 0.000
#> ERR862986 1 0.0000 0.901 1.000 0.000 0.000 0 0.000 0.000
#> ERR866161 1 0.0000 0.901 1.000 0.000 0.000 0 0.000 0.000
#> ERR866179 1 0.0000 0.901 1.000 0.000 0.000 0 0.000 0.000
#> ERR862987 2 0.0000 0.918 0.000 1.000 0.000 0 0.000 0.000
#> ERR866162 2 0.0363 0.910 0.000 0.988 0.000 0 0.012 0.000
#> ERR866180 2 0.1610 0.848 0.000 0.916 0.000 0 0.084 0.000
#> ERR862988 2 0.0000 0.918 0.000 1.000 0.000 0 0.000 0.000
#> ERR866163 2 0.0000 0.918 0.000 1.000 0.000 0 0.000 0.000
#> ERR866181 2 0.0000 0.918 0.000 1.000 0.000 0 0.000 0.000
#> ERR862989 6 0.0000 0.993 0.000 0.000 0.000 0 0.000 1.000
#> ERR866164 6 0.0000 0.993 0.000 0.000 0.000 0 0.000 1.000
#> ERR866182 6 0.0000 0.993 0.000 0.000 0.000 0 0.000 1.000
#> ERR862990 6 0.0000 0.993 0.000 0.000 0.000 0 0.000 1.000
#> ERR866165 6 0.0000 0.993 0.000 0.000 0.000 0 0.000 1.000
#> ERR866183 6 0.0000 0.993 0.000 0.000 0.000 0 0.000 1.000
#> ERR862991 2 0.0000 0.918 0.000 1.000 0.000 0 0.000 0.000
#> ERR866166 2 0.0000 0.918 0.000 1.000 0.000 0 0.000 0.000
#> ERR866184 2 0.0000 0.918 0.000 1.000 0.000 0 0.000 0.000
#> ERR862992 2 0.0000 0.918 0.000 1.000 0.000 0 0.000 0.000
#> ERR866167 2 0.0000 0.918 0.000 1.000 0.000 0 0.000 0.000
#> ERR866185 2 0.0000 0.918 0.000 1.000 0.000 0 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)

consensus_heatmap(res, k = 3)

consensus_heatmap(res, k = 4)

consensus_heatmap(res, k = 5)

consensus_heatmap(res, k = 6)

Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)

membership_heatmap(res, k = 3)

membership_heatmap(res, k = 4)

membership_heatmap(res, k = 5)

membership_heatmap(res, k = 6)

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)

get_signatures(res, k = 3)

get_signatures(res, k = 4)

get_signatures(res, k = 5)

get_signatures(res, k = 6)

Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)

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

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

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

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

Compare the overlap of signatures from different k:
compare_signatures(res)

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.
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:
which_row
: row indices corresponding to the input matrix.
fdr
: FDR for the differential test.
mean_x
: The mean value in group x.
scaled_mean_x
: The mean value in group x after rows are scaled.
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")

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

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

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

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

Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)

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"]
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 15818 rows and 107 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 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)

The plots are:
- The first row: a plot of the ECDF (empirical cumulative distribution
function) curves of the consensus matrix for each
k
and the heatmap of
predicted classes for each k
.
- The second row: heatmaps of the consensus matrix for each
k
.
- The third row: heatmaps of the membership matrix for each
k
.
- The fouth row: heatmaps of the signatures for each
k
.
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:
- ECDF curves of the consensus matrix for each
k
;
- 1-PAC. The PAC
score
measures the proportion of the ambiguous subgrouping.
- Mean silhouette score.
- Concordance. The mean probability of fiting the consensus class ids in all
partitions.
- Area increased. Denote \(A_k\) as the area under the ECDF curve for current
k
, the area increased is defined as \(A_k - A_{k-1}\).
- Rand index. The percent of pairs of samples that are both in a same cluster
or both are not in a same cluster in the partition of k and k-1.
- Jaccard index. The ratio of pairs of samples are both in a same cluster in
the partition of k and k-1 and the pairs of samples are both in a same
cluster in the partition k or k-1.
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)

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.887 0.956 0.972 0.2438 0.730 0.730
#> 3 3 0.435 0.722 0.836 1.2383 0.681 0.576
#> 4 4 0.512 0.709 0.786 0.1781 0.874 0.741
#> 5 5 0.594 0.722 0.808 0.0903 0.888 0.730
#> 6 6 0.632 0.673 0.770 0.0982 0.841 0.546
suggest_best_k()
suggests the best \(k\) based on these statistics. The rules are as follows:
- All \(k\) with Jaccard index larger than 0.95 are removed because increasing
\(k\) does not provide enough extra information. If all \(k\) are removed, it is
marked as no subgroup is detected.
- For all \(k\) with 1-PAC score larger than 0.9, the maximal \(k\) is taken as
the best \(k\), and other \(k\) are marked as optional \(k\).
- If it does not fit the second rule. The \(k\) with the maximal vote of the
highest 1-PAC score, highest mean silhouette, and highest concordance is
taken as the best \(k\).
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
#> ERR862939 1 0.9393 0.651 0.644 0.356
#> ERR862957 1 0.9393 0.651 0.644 0.356
#> ERR878007 2 0.4298 0.892 0.088 0.912
#> ERR862940 1 0.9393 0.651 0.644 0.356
#> ERR862958 1 0.9393 0.651 0.644 0.356
#> ERR878008 1 0.9393 0.651 0.644 0.356
#> ERR862941 2 0.0000 0.992 0.000 1.000
#> ERR862959 2 0.0000 0.992 0.000 1.000
#> ERR878009 2 0.0000 0.992 0.000 1.000
#> ERR862942 2 0.0000 0.992 0.000 1.000
#> ERR862960 2 0.0000 0.992 0.000 1.000
#> ERR878010 2 0.0000 0.992 0.000 1.000
#> ERR862943 1 0.4815 0.865 0.896 0.104
#> ERR862961 1 0.4815 0.865 0.896 0.104
#> ERR878011 1 0.4939 0.864 0.892 0.108
#> ERR862944 1 0.4815 0.865 0.896 0.104
#> ERR862962 1 0.4815 0.865 0.896 0.104
#> ERR878012 1 0.4939 0.864 0.892 0.108
#> ERR862945 1 0.0000 0.847 1.000 0.000
#> ERR862963 1 0.0000 0.847 1.000 0.000
#> ERR878013 1 0.0000 0.847 1.000 0.000
#> ERR862946 1 0.0000 0.847 1.000 0.000
#> ERR862964 1 0.0000 0.847 1.000 0.000
#> ERR878014 1 0.0000 0.847 1.000 0.000
#> ERR862947 2 0.2603 0.952 0.044 0.956
#> ERR862965 2 0.2603 0.952 0.044 0.956
#> ERR878015 2 0.2423 0.956 0.040 0.960
#> ERR862948 2 0.2603 0.952 0.044 0.956
#> ERR862966 2 0.2603 0.952 0.044 0.956
#> ERR878016 2 0.2423 0.956 0.040 0.960
#> ERR862949 2 0.0000 0.992 0.000 1.000
#> ERR862967 2 0.0000 0.992 0.000 1.000
#> ERR878017 2 0.0000 0.992 0.000 1.000
#> ERR862950 2 0.0000 0.992 0.000 1.000
#> ERR862968 2 0.0376 0.989 0.004 0.996
#> ERR878018 2 0.0000 0.992 0.000 1.000
#> ERR862951 2 0.0000 0.992 0.000 1.000
#> ERR862969 2 0.0000 0.992 0.000 1.000
#> ERR878019 2 0.0000 0.992 0.000 1.000
#> ERR862952 2 0.0000 0.992 0.000 1.000
#> ERR862970 2 0.0000 0.992 0.000 1.000
#> ERR878020 2 0.0000 0.992 0.000 1.000
#> ERR862953 2 0.0000 0.992 0.000 1.000
#> ERR862971 2 0.0000 0.992 0.000 1.000
#> ERR878021 2 0.0000 0.992 0.000 1.000
#> ERR862954 2 0.0000 0.992 0.000 1.000
#> ERR862972 2 0.0000 0.992 0.000 1.000
#> ERR878022 2 0.0000 0.992 0.000 1.000
#> ERR862955 2 0.0000 0.992 0.000 1.000
#> ERR862973 2 0.0000 0.992 0.000 1.000
#> ERR878023 2 0.0000 0.992 0.000 1.000
#> ERR862956 2 0.0000 0.992 0.000 1.000
#> ERR862974 2 0.0000 0.992 0.000 1.000
#> ERR878024 2 0.0000 0.992 0.000 1.000
#> ERR862975 2 0.0376 0.990 0.004 0.996
#> ERR866150 2 0.0376 0.990 0.004 0.996
#> ERR866168 2 0.0376 0.990 0.004 0.996
#> ERR862976 2 0.0376 0.990 0.004 0.996
#> ERR866151 2 0.0376 0.990 0.004 0.996
#> ERR866169 2 0.0376 0.990 0.004 0.996
#> ERR862977 2 0.0000 0.992 0.000 1.000
#> ERR866152 2 0.0000 0.992 0.000 1.000
#> ERR866170 2 0.0000 0.992 0.000 1.000
#> ERR862978 2 0.0000 0.992 0.000 1.000
#> ERR866153 2 0.0000 0.992 0.000 1.000
#> ERR866171 2 0.0000 0.992 0.000 1.000
#> ERR862979 2 0.0000 0.992 0.000 1.000
#> ERR866154 2 0.0000 0.992 0.000 1.000
#> ERR866172 2 0.0000 0.992 0.000 1.000
#> ERR862980 2 0.0000 0.992 0.000 1.000
#> ERR866155 2 0.0000 0.992 0.000 1.000
#> ERR866173 2 0.0000 0.992 0.000 1.000
#> ERR862981 2 0.0000 0.992 0.000 1.000
#> ERR866156 2 0.0000 0.992 0.000 1.000
#> ERR866174 2 0.0000 0.992 0.000 1.000
#> ERR866157 2 0.0000 0.992 0.000 1.000
#> ERR866175 2 0.0000 0.992 0.000 1.000
#> ERR862983 2 0.2236 0.960 0.036 0.964
#> ERR866158 2 0.2236 0.960 0.036 0.964
#> ERR866176 2 0.2236 0.960 0.036 0.964
#> ERR862984 2 0.2236 0.960 0.036 0.964
#> ERR866159 2 0.2236 0.960 0.036 0.964
#> ERR866177 2 0.2236 0.960 0.036 0.964
#> ERR862985 2 0.0000 0.992 0.000 1.000
#> ERR866160 2 0.0000 0.992 0.000 1.000
#> ERR866178 2 0.0000 0.992 0.000 1.000
#> ERR862986 2 0.0000 0.992 0.000 1.000
#> ERR866161 2 0.0000 0.992 0.000 1.000
#> ERR866179 2 0.0000 0.992 0.000 1.000
#> ERR862987 2 0.0000 0.992 0.000 1.000
#> ERR866162 2 0.0000 0.992 0.000 1.000
#> ERR866180 2 0.0000 0.992 0.000 1.000
#> ERR862988 2 0.0000 0.992 0.000 1.000
#> ERR866163 2 0.0000 0.992 0.000 1.000
#> ERR866181 2 0.0000 0.992 0.000 1.000
#> ERR862989 2 0.0376 0.990 0.004 0.996
#> ERR866164 2 0.0376 0.990 0.004 0.996
#> ERR866182 2 0.0376 0.990 0.004 0.996
#> ERR862990 2 0.0376 0.990 0.004 0.996
#> ERR866165 2 0.0376 0.990 0.004 0.996
#> ERR866183 2 0.0376 0.990 0.004 0.996
#> ERR862991 2 0.0000 0.992 0.000 1.000
#> ERR866166 2 0.0000 0.992 0.000 1.000
#> ERR866184 2 0.0000 0.992 0.000 1.000
#> ERR862992 2 0.0000 0.992 0.000 1.000
#> ERR866167 2 0.0000 0.992 0.000 1.000
#> ERR866185 2 0.0000 0.992 0.000 1.000
show/hide code output
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> ERR862939 1 0.8817 0.142 0.568 0.272 0.160
#> ERR862957 1 0.8817 0.142 0.568 0.272 0.160
#> ERR878007 1 0.2939 0.723 0.916 0.012 0.072
#> ERR862940 1 0.8889 0.123 0.560 0.276 0.164
#> ERR862958 1 0.8889 0.123 0.560 0.276 0.164
#> ERR878008 1 0.8722 0.152 0.576 0.272 0.152
#> ERR862941 2 0.5591 0.753 0.304 0.696 0.000
#> ERR862959 2 0.5591 0.753 0.304 0.696 0.000
#> ERR878009 2 0.5465 0.766 0.288 0.712 0.000
#> ERR862942 2 0.5591 0.753 0.304 0.696 0.000
#> ERR862960 2 0.5591 0.753 0.304 0.696 0.000
#> ERR878010 2 0.5397 0.771 0.280 0.720 0.000
#> ERR862943 3 0.6410 0.606 0.420 0.004 0.576
#> ERR862961 3 0.6410 0.606 0.420 0.004 0.576
#> ERR878011 3 0.6513 0.501 0.476 0.004 0.520
#> ERR862944 3 0.6410 0.606 0.420 0.004 0.576
#> ERR862962 3 0.6410 0.606 0.420 0.004 0.576
#> ERR878012 3 0.6513 0.501 0.476 0.004 0.520
#> ERR862945 3 0.0000 0.735 0.000 0.000 1.000
#> ERR862963 3 0.0000 0.735 0.000 0.000 1.000
#> ERR878013 3 0.0000 0.735 0.000 0.000 1.000
#> ERR862946 3 0.0000 0.735 0.000 0.000 1.000
#> ERR862964 3 0.0000 0.735 0.000 0.000 1.000
#> ERR878014 3 0.0000 0.735 0.000 0.000 1.000
#> ERR862947 2 0.2982 0.765 0.056 0.920 0.024
#> ERR862965 2 0.2982 0.765 0.056 0.920 0.024
#> ERR878015 2 0.2846 0.767 0.056 0.924 0.020
#> ERR862948 2 0.2982 0.765 0.056 0.920 0.024
#> ERR862966 2 0.2982 0.765 0.056 0.920 0.024
#> ERR878016 2 0.2846 0.767 0.056 0.924 0.020
#> ERR862949 2 0.2711 0.766 0.088 0.912 0.000
#> ERR862967 2 0.2796 0.763 0.092 0.908 0.000
#> ERR878017 2 0.6008 0.676 0.372 0.628 0.000
#> ERR862950 2 0.2878 0.765 0.096 0.904 0.000
#> ERR862968 2 0.3816 0.782 0.148 0.852 0.000
#> ERR878018 2 0.3116 0.782 0.108 0.892 0.000
#> ERR862951 1 0.2878 0.736 0.904 0.096 0.000
#> ERR862969 1 0.3192 0.716 0.888 0.112 0.000
#> ERR878019 1 0.1529 0.793 0.960 0.040 0.000
#> ERR862952 1 0.5810 0.193 0.664 0.336 0.000
#> ERR862970 1 0.6180 -0.163 0.584 0.416 0.000
#> ERR878020 1 0.2537 0.754 0.920 0.080 0.000
#> ERR862953 2 0.0592 0.795 0.012 0.988 0.000
#> ERR862971 2 0.1031 0.800 0.024 0.976 0.000
#> ERR878021 2 0.2066 0.811 0.060 0.940 0.000
#> ERR862954 2 0.0424 0.793 0.008 0.992 0.000
#> ERR862972 2 0.0592 0.795 0.012 0.988 0.000
#> ERR878022 2 0.4399 0.812 0.188 0.812 0.000
#> ERR862955 2 0.4346 0.812 0.184 0.816 0.000
#> ERR862973 2 0.3879 0.818 0.152 0.848 0.000
#> ERR878023 2 0.4235 0.814 0.176 0.824 0.000
#> ERR862956 2 0.2878 0.820 0.096 0.904 0.000
#> ERR862974 2 0.3412 0.820 0.124 0.876 0.000
#> ERR878024 2 0.3192 0.821 0.112 0.888 0.000
#> ERR862975 1 0.0747 0.813 0.984 0.016 0.000
#> ERR866150 1 0.0747 0.813 0.984 0.016 0.000
#> ERR866168 1 0.0747 0.813 0.984 0.016 0.000
#> ERR862976 1 0.0747 0.813 0.984 0.016 0.000
#> ERR866151 1 0.0747 0.813 0.984 0.016 0.000
#> ERR866169 1 0.0747 0.813 0.984 0.016 0.000
#> ERR862977 2 0.4702 0.803 0.212 0.788 0.000
#> ERR866152 2 0.5254 0.779 0.264 0.736 0.000
#> ERR866170 2 0.5363 0.772 0.276 0.724 0.000
#> ERR862978 2 0.2959 0.821 0.100 0.900 0.000
#> ERR866153 2 0.5431 0.766 0.284 0.716 0.000
#> ERR866171 2 0.5465 0.764 0.288 0.712 0.000
#> ERR862979 2 0.3192 0.784 0.112 0.888 0.000
#> ERR866154 2 0.5905 0.707 0.352 0.648 0.000
#> ERR866172 2 0.6026 0.672 0.376 0.624 0.000
#> ERR862980 2 0.5760 0.715 0.328 0.672 0.000
#> ERR866155 2 0.6111 0.645 0.396 0.604 0.000
#> ERR866173 2 0.6126 0.641 0.400 0.600 0.000
#> ERR862981 2 0.0592 0.795 0.012 0.988 0.000
#> ERR866156 2 0.3192 0.819 0.112 0.888 0.000
#> ERR866174 2 0.2625 0.816 0.084 0.916 0.000
#> ERR866157 2 0.0424 0.793 0.008 0.992 0.000
#> ERR866175 2 0.0424 0.793 0.008 0.992 0.000
#> ERR862983 1 0.0747 0.813 0.984 0.016 0.000
#> ERR866158 1 0.0747 0.813 0.984 0.016 0.000
#> ERR866176 1 0.0747 0.813 0.984 0.016 0.000
#> ERR862984 1 0.0747 0.813 0.984 0.016 0.000
#> ERR866159 1 0.0747 0.813 0.984 0.016 0.000
#> ERR866177 1 0.0747 0.813 0.984 0.016 0.000
#> ERR862985 2 0.0424 0.793 0.008 0.992 0.000
#> ERR866160 2 0.0424 0.793 0.008 0.992 0.000
#> ERR866178 2 0.0424 0.793 0.008 0.992 0.000
#> ERR862986 2 0.0424 0.793 0.008 0.992 0.000
#> ERR866161 2 0.0424 0.793 0.008 0.992 0.000
#> ERR866179 2 0.0424 0.793 0.008 0.992 0.000
#> ERR862987 2 0.5591 0.753 0.304 0.696 0.000
#> ERR866162 2 0.5497 0.762 0.292 0.708 0.000
#> ERR866180 2 0.5254 0.777 0.264 0.736 0.000
#> ERR862988 2 0.5591 0.753 0.304 0.696 0.000
#> ERR866163 2 0.5591 0.753 0.304 0.696 0.000
#> ERR866181 2 0.5591 0.753 0.304 0.696 0.000
#> ERR862989 1 0.0747 0.813 0.984 0.016 0.000
#> ERR866164 1 0.0747 0.813 0.984 0.016 0.000
#> ERR866182 1 0.0747 0.813 0.984 0.016 0.000
#> ERR862990 1 0.0747 0.813 0.984 0.016 0.000
#> ERR866165 1 0.0747 0.813 0.984 0.016 0.000
#> ERR866183 1 0.0747 0.813 0.984 0.016 0.000
#> ERR862991 2 0.5465 0.766 0.288 0.712 0.000
#> ERR866166 2 0.4062 0.813 0.164 0.836 0.000
#> ERR866184 2 0.3340 0.817 0.120 0.880 0.000
#> ERR862992 2 0.5560 0.756 0.300 0.700 0.000
#> ERR866167 2 0.5098 0.786 0.248 0.752 0.000
#> ERR866185 2 0.4974 0.790 0.236 0.764 0.000
show/hide code output
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> ERR862939 3 0.2892 0.8192 0.036 0.000 0.896 0.068
#> ERR862957 3 0.2816 0.8204 0.036 0.000 0.900 0.064
#> ERR878007 3 0.4824 0.6017 0.228 0.004 0.744 0.024
#> ERR862940 3 0.2494 0.8188 0.036 0.000 0.916 0.048
#> ERR862958 3 0.2494 0.8188 0.036 0.000 0.916 0.048
#> ERR878008 3 0.2494 0.8198 0.036 0.000 0.916 0.048
#> ERR862941 2 0.5076 0.7075 0.172 0.756 0.072 0.000
#> ERR862959 2 0.5076 0.7075 0.172 0.756 0.072 0.000
#> ERR878009 2 0.5142 0.6990 0.192 0.744 0.064 0.000
#> ERR862942 2 0.5185 0.7044 0.176 0.748 0.076 0.000
#> ERR862960 2 0.5007 0.7088 0.172 0.760 0.068 0.000
#> ERR878010 2 0.5180 0.6957 0.196 0.740 0.064 0.000
#> ERR862943 3 0.5109 0.8014 0.052 0.000 0.736 0.212
#> ERR862961 3 0.5109 0.8014 0.052 0.000 0.736 0.212
#> ERR878011 3 0.5183 0.8151 0.084 0.004 0.764 0.148
#> ERR862944 3 0.5109 0.8014 0.052 0.000 0.736 0.212
#> ERR862962 3 0.5109 0.8014 0.052 0.000 0.736 0.212
#> ERR878012 3 0.5183 0.8151 0.084 0.004 0.764 0.148
#> ERR862945 4 0.0000 1.0000 0.000 0.000 0.000 1.000
#> ERR862963 4 0.0000 1.0000 0.000 0.000 0.000 1.000
#> ERR878013 4 0.0000 1.0000 0.000 0.000 0.000 1.000
#> ERR862946 4 0.0000 1.0000 0.000 0.000 0.000 1.000
#> ERR862964 4 0.0000 1.0000 0.000 0.000 0.000 1.000
#> ERR878014 4 0.0000 1.0000 0.000 0.000 0.000 1.000
#> ERR862947 2 0.5093 0.4607 0.008 0.652 0.336 0.004
#> ERR862965 2 0.5093 0.4607 0.008 0.652 0.336 0.004
#> ERR878015 2 0.5093 0.4607 0.008 0.652 0.336 0.004
#> ERR862948 2 0.5093 0.4607 0.008 0.652 0.336 0.004
#> ERR862966 2 0.5093 0.4607 0.008 0.652 0.336 0.004
#> ERR878016 2 0.5093 0.4607 0.008 0.652 0.336 0.004
#> ERR862949 2 0.6222 -0.0222 0.412 0.532 0.056 0.000
#> ERR862967 2 0.6621 -0.0479 0.408 0.508 0.084 0.000
#> ERR878017 1 0.5695 0.5591 0.624 0.336 0.040 0.000
#> ERR862950 2 0.6139 0.0201 0.404 0.544 0.052 0.000
#> ERR862968 2 0.6197 0.0313 0.400 0.544 0.056 0.000
#> ERR878018 2 0.5873 -0.0273 0.416 0.548 0.036 0.000
#> ERR862951 1 0.2530 0.8314 0.896 0.100 0.004 0.000
#> ERR862969 1 0.2593 0.8292 0.892 0.104 0.004 0.000
#> ERR878019 1 0.2124 0.8450 0.924 0.068 0.008 0.000
#> ERR862952 1 0.4257 0.7876 0.812 0.140 0.048 0.000
#> ERR862970 1 0.4692 0.6837 0.756 0.212 0.032 0.000
#> ERR878020 1 0.2401 0.8351 0.904 0.092 0.004 0.000
#> ERR862953 2 0.2759 0.7413 0.052 0.904 0.044 0.000
#> ERR862971 2 0.2483 0.7441 0.052 0.916 0.032 0.000
#> ERR878021 2 0.2644 0.7455 0.060 0.908 0.032 0.000
#> ERR862954 2 0.2483 0.7441 0.052 0.916 0.032 0.000
#> ERR862972 2 0.2483 0.7441 0.052 0.916 0.032 0.000
#> ERR878022 2 0.3333 0.7465 0.088 0.872 0.040 0.000
#> ERR862955 2 0.2521 0.7538 0.064 0.912 0.024 0.000
#> ERR862973 2 0.2224 0.7544 0.040 0.928 0.032 0.000
#> ERR878023 2 0.2859 0.7453 0.112 0.880 0.008 0.000
#> ERR862956 2 0.1488 0.7522 0.032 0.956 0.012 0.000
#> ERR862974 2 0.1722 0.7526 0.048 0.944 0.008 0.000
#> ERR878024 2 0.1635 0.7540 0.044 0.948 0.008 0.000
#> ERR862975 1 0.0336 0.8651 0.992 0.000 0.008 0.000
#> ERR866150 1 0.0336 0.8651 0.992 0.000 0.008 0.000
#> ERR866168 1 0.0336 0.8651 0.992 0.000 0.008 0.000
#> ERR862976 1 0.0336 0.8651 0.992 0.000 0.008 0.000
#> ERR866151 1 0.0336 0.8651 0.992 0.000 0.008 0.000
#> ERR866169 1 0.0336 0.8651 0.992 0.000 0.008 0.000
#> ERR862977 2 0.2450 0.7541 0.072 0.912 0.016 0.000
#> ERR866152 2 0.2760 0.7412 0.128 0.872 0.000 0.000
#> ERR866170 2 0.3172 0.7304 0.160 0.840 0.000 0.000
#> ERR862978 2 0.2670 0.7340 0.072 0.904 0.024 0.000
#> ERR866153 2 0.4635 0.6467 0.268 0.720 0.012 0.000
#> ERR866171 2 0.4690 0.6314 0.276 0.712 0.012 0.000
#> ERR862979 2 0.5999 0.0336 0.404 0.552 0.044 0.000
#> ERR866154 1 0.5573 0.4493 0.604 0.368 0.028 0.000
#> ERR866172 1 0.5658 0.5696 0.632 0.328 0.040 0.000
#> ERR862980 1 0.5823 0.5442 0.608 0.348 0.044 0.000
#> ERR866155 1 0.5472 0.6314 0.676 0.280 0.044 0.000
#> ERR866173 1 0.5472 0.6314 0.676 0.280 0.044 0.000
#> ERR862981 2 0.3245 0.7359 0.064 0.880 0.056 0.000
#> ERR866156 2 0.2965 0.7441 0.072 0.892 0.036 0.000
#> ERR866174 2 0.2908 0.7427 0.064 0.896 0.040 0.000
#> ERR866157 2 0.3164 0.7364 0.064 0.884 0.052 0.000
#> ERR866175 2 0.3081 0.7364 0.064 0.888 0.048 0.000
#> ERR862983 1 0.0336 0.8651 0.992 0.000 0.008 0.000
#> ERR866158 1 0.0336 0.8651 0.992 0.000 0.008 0.000
#> ERR866176 1 0.0336 0.8651 0.992 0.000 0.008 0.000
#> ERR862984 1 0.0336 0.8651 0.992 0.000 0.008 0.000
#> ERR866159 1 0.0336 0.8651 0.992 0.000 0.008 0.000
#> ERR866177 1 0.0336 0.8651 0.992 0.000 0.008 0.000
#> ERR862985 2 0.3081 0.7348 0.064 0.888 0.048 0.000
#> ERR866160 2 0.3081 0.7348 0.064 0.888 0.048 0.000
#> ERR866178 2 0.3081 0.7348 0.064 0.888 0.048 0.000
#> ERR862986 2 0.3164 0.7345 0.064 0.884 0.052 0.000
#> ERR866161 2 0.3081 0.7348 0.064 0.888 0.048 0.000
#> ERR866179 2 0.3081 0.7348 0.064 0.888 0.048 0.000
#> ERR862987 2 0.5421 0.6854 0.200 0.724 0.076 0.000
#> ERR866162 2 0.5458 0.6817 0.204 0.720 0.076 0.000
#> ERR866180 2 0.5458 0.6817 0.204 0.720 0.076 0.000
#> ERR862988 2 0.5307 0.6963 0.188 0.736 0.076 0.000
#> ERR866163 2 0.5384 0.6889 0.196 0.728 0.076 0.000
#> ERR866181 2 0.5384 0.6889 0.196 0.728 0.076 0.000
#> ERR862989 1 0.1798 0.8474 0.944 0.016 0.040 0.000
#> ERR866164 1 0.0524 0.8641 0.988 0.008 0.004 0.000
#> ERR866182 1 0.0524 0.8641 0.988 0.008 0.004 0.000
#> ERR862990 1 0.0376 0.8649 0.992 0.004 0.004 0.000
#> ERR866165 1 0.0336 0.8649 0.992 0.000 0.008 0.000
#> ERR866183 1 0.0336 0.8649 0.992 0.000 0.008 0.000
#> ERR862991 2 0.5062 0.7036 0.184 0.752 0.064 0.000
#> ERR866166 2 0.5307 0.6956 0.188 0.736 0.076 0.000
#> ERR866184 2 0.5100 0.7095 0.168 0.756 0.076 0.000
#> ERR862992 2 0.5421 0.6854 0.200 0.724 0.076 0.000
#> ERR866167 2 0.5458 0.6817 0.204 0.720 0.076 0.000
#> ERR866185 2 0.5458 0.6817 0.204 0.720 0.076 0.000
show/hide code output
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> ERR862939 3 0.1153 0.900 0.008 0.000 0.964 0.004 0.024
#> ERR862957 3 0.1153 0.900 0.008 0.000 0.964 0.004 0.024
#> ERR878007 3 0.4898 0.330 0.332 0.004 0.632 0.000 0.032
#> ERR862940 3 0.1329 0.899 0.008 0.000 0.956 0.004 0.032
#> ERR862958 3 0.1329 0.899 0.008 0.000 0.956 0.004 0.032
#> ERR878008 3 0.1153 0.900 0.008 0.000 0.964 0.004 0.024
#> ERR862941 2 0.2411 0.787 0.008 0.884 0.000 0.000 0.108
#> ERR862959 2 0.2411 0.787 0.008 0.884 0.000 0.000 0.108
#> ERR878009 2 0.2464 0.790 0.016 0.888 0.000 0.000 0.096
#> ERR862942 2 0.2411 0.787 0.008 0.884 0.000 0.000 0.108
#> ERR862960 2 0.2411 0.787 0.008 0.884 0.000 0.000 0.108
#> ERR878010 2 0.2248 0.791 0.012 0.900 0.000 0.000 0.088
#> ERR862943 3 0.1205 0.898 0.000 0.000 0.956 0.040 0.004
#> ERR862961 3 0.1205 0.898 0.000 0.000 0.956 0.040 0.004
#> ERR878011 3 0.1095 0.898 0.012 0.000 0.968 0.012 0.008
#> ERR862944 3 0.1205 0.898 0.000 0.000 0.956 0.040 0.004
#> ERR862962 3 0.1205 0.898 0.000 0.000 0.956 0.040 0.004
#> ERR878012 3 0.1095 0.898 0.012 0.000 0.968 0.012 0.008
#> ERR862945 4 0.0000 1.000 0.000 0.000 0.000 1.000 0.000
#> ERR862963 4 0.0000 1.000 0.000 0.000 0.000 1.000 0.000
#> ERR878013 4 0.0000 1.000 0.000 0.000 0.000 1.000 0.000
#> ERR862946 4 0.0000 1.000 0.000 0.000 0.000 1.000 0.000
#> ERR862964 4 0.0000 1.000 0.000 0.000 0.000 1.000 0.000
#> ERR878014 4 0.0000 1.000 0.000 0.000 0.000 1.000 0.000
#> ERR862947 5 0.5880 1.000 0.000 0.172 0.228 0.000 0.600
#> ERR862965 5 0.5880 1.000 0.000 0.172 0.228 0.000 0.600
#> ERR878015 5 0.5880 1.000 0.000 0.172 0.228 0.000 0.600
#> ERR862948 5 0.5880 1.000 0.000 0.172 0.228 0.000 0.600
#> ERR862966 5 0.5880 1.000 0.000 0.172 0.228 0.000 0.600
#> ERR878016 5 0.5880 1.000 0.000 0.172 0.228 0.000 0.600
#> ERR862949 1 0.7024 0.265 0.356 0.356 0.008 0.000 0.280
#> ERR862967 1 0.7500 0.285 0.356 0.340 0.036 0.000 0.268
#> ERR878017 1 0.6774 0.343 0.392 0.320 0.000 0.000 0.288
#> ERR862950 2 0.7118 -0.291 0.348 0.356 0.012 0.000 0.284
#> ERR862968 2 0.7034 -0.278 0.344 0.360 0.008 0.000 0.288
#> ERR878018 1 0.6761 0.311 0.380 0.352 0.000 0.000 0.268
#> ERR862951 1 0.3047 0.707 0.868 0.084 0.004 0.000 0.044
#> ERR862969 1 0.3301 0.703 0.856 0.088 0.008 0.000 0.048
#> ERR878019 1 0.2277 0.723 0.916 0.052 0.016 0.000 0.016
#> ERR862952 1 0.5266 0.604 0.688 0.208 0.008 0.000 0.096
#> ERR862970 1 0.5725 0.585 0.656 0.212 0.016 0.000 0.116
#> ERR878020 1 0.2822 0.715 0.888 0.064 0.012 0.000 0.036
#> ERR862953 2 0.2408 0.773 0.092 0.892 0.000 0.000 0.016
#> ERR862971 2 0.2408 0.773 0.092 0.892 0.000 0.000 0.016
#> ERR878021 2 0.2919 0.774 0.104 0.868 0.004 0.000 0.024
#> ERR862954 2 0.2448 0.775 0.088 0.892 0.000 0.000 0.020
#> ERR862972 2 0.2568 0.774 0.092 0.888 0.004 0.000 0.016
#> ERR878022 2 0.3319 0.774 0.100 0.852 0.008 0.000 0.040
#> ERR862955 2 0.1124 0.791 0.004 0.960 0.000 0.000 0.036
#> ERR862973 2 0.1830 0.793 0.008 0.924 0.000 0.000 0.068
#> ERR878023 2 0.1740 0.793 0.012 0.932 0.000 0.000 0.056
#> ERR862956 2 0.0807 0.792 0.012 0.976 0.000 0.000 0.012
#> ERR862974 2 0.0798 0.792 0.008 0.976 0.000 0.000 0.016
#> ERR878024 2 0.2221 0.794 0.036 0.912 0.000 0.000 0.052
#> ERR862975 1 0.0727 0.732 0.980 0.004 0.012 0.000 0.004
#> ERR866150 1 0.0000 0.732 1.000 0.000 0.000 0.000 0.000
#> ERR866168 1 0.0000 0.732 1.000 0.000 0.000 0.000 0.000
#> ERR862976 1 0.0324 0.731 0.992 0.000 0.004 0.000 0.004
#> ERR866151 1 0.0162 0.731 0.996 0.000 0.000 0.000 0.004
#> ERR866169 1 0.0000 0.732 1.000 0.000 0.000 0.000 0.000
#> ERR862977 2 0.2208 0.791 0.020 0.908 0.000 0.000 0.072
#> ERR866152 2 0.2519 0.781 0.016 0.884 0.000 0.000 0.100
#> ERR866170 2 0.2864 0.771 0.024 0.864 0.000 0.000 0.112
#> ERR862978 2 0.5049 0.613 0.148 0.704 0.000 0.000 0.148
#> ERR866153 2 0.5372 0.606 0.152 0.668 0.000 0.000 0.180
#> ERR866171 2 0.5605 0.549 0.192 0.640 0.000 0.000 0.168
#> ERR862979 1 0.6742 0.308 0.388 0.352 0.000 0.000 0.260
#> ERR866154 1 0.6660 0.376 0.432 0.324 0.000 0.000 0.244
#> ERR866172 1 0.6788 0.334 0.384 0.320 0.000 0.000 0.296
#> ERR862980 1 0.6788 0.334 0.384 0.320 0.000 0.000 0.296
#> ERR866155 1 0.6748 0.371 0.408 0.308 0.000 0.000 0.284
#> ERR866173 1 0.6748 0.371 0.408 0.308 0.000 0.000 0.284
#> ERR862981 2 0.3218 0.765 0.096 0.860 0.012 0.000 0.032
#> ERR866156 2 0.3188 0.766 0.100 0.860 0.012 0.000 0.028
#> ERR866174 2 0.2914 0.768 0.100 0.872 0.012 0.000 0.016
#> ERR866157 2 0.3552 0.761 0.096 0.844 0.016 0.000 0.044
#> ERR866175 2 0.3298 0.763 0.096 0.856 0.012 0.000 0.036
#> ERR862983 1 0.0912 0.727 0.972 0.000 0.016 0.000 0.012
#> ERR866158 1 0.1018 0.725 0.968 0.000 0.016 0.000 0.016
#> ERR866176 1 0.0912 0.727 0.972 0.000 0.016 0.000 0.012
#> ERR862984 1 0.0912 0.727 0.972 0.000 0.016 0.000 0.012
#> ERR866159 1 0.1018 0.725 0.968 0.000 0.016 0.000 0.016
#> ERR866177 1 0.1018 0.725 0.968 0.000 0.016 0.000 0.016
#> ERR862985 2 0.4086 0.729 0.088 0.820 0.056 0.000 0.036
#> ERR866160 2 0.3949 0.737 0.088 0.828 0.048 0.000 0.036
#> ERR866178 2 0.3870 0.739 0.088 0.832 0.048 0.000 0.032
#> ERR862986 2 0.4152 0.728 0.088 0.816 0.060 0.000 0.036
#> ERR866161 2 0.4086 0.729 0.088 0.820 0.056 0.000 0.036
#> ERR866179 2 0.4086 0.729 0.088 0.820 0.056 0.000 0.036
#> ERR862987 2 0.3700 0.723 0.008 0.752 0.000 0.000 0.240
#> ERR866162 2 0.4127 0.680 0.008 0.680 0.000 0.000 0.312
#> ERR866180 2 0.4127 0.680 0.008 0.680 0.000 0.000 0.312
#> ERR862988 2 0.3381 0.766 0.016 0.808 0.000 0.000 0.176
#> ERR866163 2 0.3728 0.724 0.008 0.748 0.000 0.000 0.244
#> ERR866181 2 0.3700 0.723 0.008 0.752 0.000 0.000 0.240
#> ERR862989 1 0.2122 0.727 0.924 0.008 0.036 0.000 0.032
#> ERR866164 1 0.1739 0.729 0.940 0.004 0.032 0.000 0.024
#> ERR866182 1 0.1653 0.729 0.944 0.004 0.028 0.000 0.024
#> ERR862990 1 0.1403 0.728 0.952 0.000 0.024 0.000 0.024
#> ERR866165 1 0.1493 0.729 0.948 0.000 0.024 0.000 0.028
#> ERR866183 1 0.1403 0.727 0.952 0.000 0.024 0.000 0.024
#> ERR862991 2 0.3160 0.755 0.004 0.808 0.000 0.000 0.188
#> ERR866166 2 0.3430 0.737 0.004 0.776 0.000 0.000 0.220
#> ERR866184 2 0.3266 0.748 0.004 0.796 0.000 0.000 0.200
#> ERR862992 2 0.3366 0.741 0.004 0.784 0.000 0.000 0.212
#> ERR866167 2 0.3662 0.721 0.004 0.744 0.000 0.000 0.252
#> ERR866185 2 0.3635 0.723 0.004 0.748 0.000 0.000 0.248
show/hide code output
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> ERR862939 6 0.0405 0.940 0.000 0.000 0.008 0 0.004 0.988
#> ERR862957 6 0.0405 0.940 0.000 0.000 0.008 0 0.004 0.988
#> ERR878007 6 0.4614 0.503 0.024 0.020 0.296 0 0.004 0.656
#> ERR862940 6 0.0405 0.940 0.000 0.000 0.008 0 0.004 0.988
#> ERR862958 6 0.0405 0.940 0.000 0.000 0.008 0 0.004 0.988
#> ERR878008 6 0.0405 0.940 0.000 0.000 0.008 0 0.004 0.988
#> ERR862941 1 0.4861 0.460 0.572 0.368 0.004 0 0.056 0.000
#> ERR862959 1 0.4951 0.456 0.568 0.364 0.004 0 0.064 0.000
#> ERR878009 1 0.4127 0.510 0.588 0.400 0.004 0 0.008 0.000
#> ERR862942 1 0.4939 0.435 0.556 0.380 0.004 0 0.060 0.000
#> ERR862960 1 0.4951 0.456 0.568 0.364 0.004 0 0.064 0.000
#> ERR878010 1 0.4100 0.520 0.600 0.388 0.004 0 0.008 0.000
#> ERR862943 6 0.0922 0.943 0.024 0.000 0.004 0 0.004 0.968
#> ERR862961 6 0.0922 0.943 0.024 0.000 0.004 0 0.004 0.968
#> ERR878011 6 0.0922 0.943 0.024 0.000 0.004 0 0.004 0.968
#> ERR862944 6 0.0922 0.943 0.024 0.000 0.004 0 0.004 0.968
#> ERR862962 6 0.0922 0.943 0.024 0.000 0.004 0 0.004 0.968
#> ERR878012 6 0.0922 0.943 0.024 0.000 0.004 0 0.004 0.968
#> ERR862945 4 0.0000 1.000 0.000 0.000 0.000 1 0.000 0.000
#> ERR862963 4 0.0000 1.000 0.000 0.000 0.000 1 0.000 0.000
#> ERR878013 4 0.0000 1.000 0.000 0.000 0.000 1 0.000 0.000
#> ERR862946 4 0.0000 1.000 0.000 0.000 0.000 1 0.000 0.000
#> ERR862964 4 0.0000 1.000 0.000 0.000 0.000 1 0.000 0.000
#> ERR878014 4 0.0000 1.000 0.000 0.000 0.000 1 0.000 0.000
#> ERR862947 5 0.1531 1.000 0.000 0.004 0.000 0 0.928 0.068
#> ERR862965 5 0.1531 1.000 0.000 0.004 0.000 0 0.928 0.068
#> ERR878015 5 0.1531 1.000 0.000 0.004 0.000 0 0.928 0.068
#> ERR862948 5 0.1531 1.000 0.000 0.004 0.000 0 0.928 0.068
#> ERR862966 5 0.1531 1.000 0.000 0.004 0.000 0 0.928 0.068
#> ERR878016 5 0.1531 1.000 0.000 0.004 0.000 0 0.928 0.068
#> ERR862949 2 0.4337 0.579 0.068 0.776 0.072 0 0.084 0.000
#> ERR862967 2 0.4708 0.579 0.068 0.772 0.072 0 0.056 0.032
#> ERR878017 2 0.2826 0.613 0.024 0.856 0.112 0 0.008 0.000
#> ERR862950 2 0.4386 0.577 0.068 0.772 0.072 0 0.088 0.000
#> ERR862968 2 0.4332 0.576 0.068 0.776 0.068 0 0.088 0.000
#> ERR878018 2 0.2866 0.613 0.024 0.864 0.092 0 0.020 0.000
#> ERR862951 3 0.3065 0.802 0.028 0.152 0.820 0 0.000 0.000
#> ERR862969 3 0.3176 0.797 0.032 0.156 0.812 0 0.000 0.000
#> ERR878019 3 0.2618 0.827 0.024 0.116 0.860 0 0.000 0.000
#> ERR862952 3 0.4598 0.725 0.072 0.148 0.740 0 0.040 0.000
#> ERR862970 3 0.4801 0.708 0.072 0.172 0.716 0 0.040 0.000
#> ERR878020 3 0.2909 0.814 0.028 0.136 0.836 0 0.000 0.000
#> ERR862953 1 0.3979 0.664 0.720 0.032 0.244 0 0.000 0.004
#> ERR862971 1 0.3979 0.664 0.720 0.032 0.244 0 0.000 0.004
#> ERR878021 1 0.4176 0.661 0.708 0.044 0.244 0 0.000 0.004
#> ERR862954 1 0.3740 0.663 0.740 0.032 0.228 0 0.000 0.000
#> ERR862972 1 0.3841 0.663 0.724 0.032 0.244 0 0.000 0.000
#> ERR878022 1 0.4659 0.651 0.668 0.076 0.252 0 0.000 0.004
#> ERR862955 1 0.4370 0.537 0.640 0.324 0.004 0 0.032 0.000
#> ERR862973 1 0.4646 0.515 0.616 0.332 0.004 0 0.048 0.000
#> ERR878023 1 0.4058 0.541 0.616 0.372 0.008 0 0.004 0.000
#> ERR862956 1 0.3809 0.564 0.684 0.304 0.004 0 0.008 0.000
#> ERR862974 1 0.3990 0.561 0.676 0.304 0.004 0 0.016 0.000
#> ERR878024 1 0.4161 0.558 0.632 0.348 0.016 0 0.004 0.000
#> ERR862975 3 0.0713 0.877 0.000 0.028 0.972 0 0.000 0.000
#> ERR866150 3 0.0632 0.877 0.000 0.024 0.976 0 0.000 0.000
#> ERR866168 3 0.0632 0.877 0.000 0.024 0.976 0 0.000 0.000
#> ERR862976 3 0.0632 0.877 0.000 0.024 0.976 0 0.000 0.000
#> ERR866151 3 0.0713 0.877 0.000 0.028 0.972 0 0.000 0.000
#> ERR866169 3 0.0713 0.877 0.000 0.028 0.972 0 0.000 0.000
#> ERR862977 1 0.5103 0.474 0.572 0.360 0.024 0 0.044 0.000
#> ERR866152 1 0.4275 0.520 0.592 0.388 0.016 0 0.004 0.000
#> ERR866170 1 0.4570 0.501 0.572 0.392 0.032 0 0.004 0.000
#> ERR862978 2 0.6568 -0.109 0.384 0.408 0.156 0 0.052 0.000
#> ERR866153 2 0.5688 -0.176 0.384 0.472 0.140 0 0.004 0.000
#> ERR866171 2 0.5826 -0.114 0.356 0.472 0.168 0 0.004 0.000
#> ERR862979 2 0.5651 0.481 0.080 0.632 0.216 0 0.072 0.000
#> ERR866154 2 0.4184 0.410 0.028 0.672 0.296 0 0.004 0.000
#> ERR866172 2 0.2581 0.610 0.016 0.856 0.128 0 0.000 0.000
#> ERR862980 2 0.2450 0.614 0.016 0.868 0.116 0 0.000 0.000
#> ERR866155 2 0.2538 0.613 0.016 0.860 0.124 0 0.000 0.000
#> ERR866173 2 0.2494 0.614 0.016 0.864 0.120 0 0.000 0.000
#> ERR862981 1 0.4345 0.664 0.716 0.020 0.232 0 0.004 0.028
#> ERR866156 1 0.4175 0.662 0.716 0.024 0.244 0 0.004 0.012
#> ERR866174 1 0.4175 0.662 0.716 0.024 0.244 0 0.004 0.012
#> ERR866157 1 0.4370 0.663 0.712 0.020 0.236 0 0.004 0.028
#> ERR866175 1 0.4345 0.664 0.716 0.020 0.232 0 0.004 0.028
#> ERR862983 3 0.2762 0.744 0.000 0.000 0.804 0 0.000 0.196
#> ERR866158 3 0.2762 0.744 0.000 0.000 0.804 0 0.000 0.196
#> ERR866176 3 0.2762 0.744 0.000 0.000 0.804 0 0.000 0.196
#> ERR862984 3 0.2762 0.744 0.000 0.000 0.804 0 0.000 0.196
#> ERR866159 3 0.2762 0.744 0.000 0.000 0.804 0 0.000 0.196
#> ERR866177 3 0.2762 0.744 0.000 0.000 0.804 0 0.000 0.196
#> ERR862985 1 0.4464 0.635 0.728 0.004 0.168 0 0.004 0.096
#> ERR866160 1 0.4230 0.653 0.728 0.004 0.212 0 0.004 0.052
#> ERR866178 1 0.3991 0.657 0.736 0.004 0.224 0 0.004 0.032
#> ERR862986 1 0.4464 0.635 0.728 0.004 0.168 0 0.004 0.096
#> ERR866161 1 0.4288 0.651 0.728 0.004 0.204 0 0.004 0.060
#> ERR866179 1 0.4197 0.654 0.728 0.004 0.216 0 0.004 0.048
#> ERR862987 2 0.4282 0.521 0.420 0.560 0.000 0 0.020 0.000
#> ERR866162 2 0.4319 0.527 0.400 0.576 0.000 0 0.024 0.000
#> ERR866180 2 0.4319 0.527 0.400 0.576 0.000 0 0.024 0.000
#> ERR862988 1 0.5173 -0.432 0.516 0.412 0.004 0 0.064 0.004
#> ERR866163 2 0.4636 0.498 0.444 0.516 0.000 0 0.040 0.000
#> ERR866181 2 0.4294 0.515 0.428 0.552 0.000 0 0.020 0.000
#> ERR862989 3 0.1003 0.874 0.004 0.028 0.964 0 0.004 0.000
#> ERR866164 3 0.0405 0.875 0.000 0.008 0.988 0 0.004 0.000
#> ERR866182 3 0.0405 0.875 0.000 0.008 0.988 0 0.004 0.000
#> ERR862990 3 0.0405 0.875 0.000 0.008 0.988 0 0.004 0.000
#> ERR866165 3 0.0405 0.875 0.000 0.008 0.988 0 0.004 0.000
#> ERR866183 3 0.0405 0.875 0.000 0.008 0.988 0 0.004 0.000
#> ERR862991 2 0.4086 0.476 0.464 0.528 0.000 0 0.008 0.000
#> ERR866166 2 0.4072 0.500 0.448 0.544 0.000 0 0.008 0.000
#> ERR866184 1 0.4098 -0.471 0.496 0.496 0.000 0 0.008 0.000
#> ERR862992 2 0.4242 0.505 0.448 0.536 0.000 0 0.016 0.000
#> ERR866167 2 0.4025 0.520 0.416 0.576 0.000 0 0.008 0.000
#> ERR866185 2 0.4032 0.518 0.420 0.572 0.000 0 0.008 0.000
Heatmaps for the consensus matrix. It visualizes the probability of two
samples to be in a same group.
consensus_heatmap(res, k = 2)

consensus_heatmap(res, k = 3)

consensus_heatmap(res, k = 4)

consensus_heatmap(res, k = 5)

consensus_heatmap(res, k = 6)

Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)

membership_heatmap(res, k = 3)

membership_heatmap(res, k = 4)

membership_heatmap(res, k = 5)

membership_heatmap(res, k = 6)

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)

get_signatures(res, k = 3)

get_signatures(res, k = 4)

get_signatures(res, k = 5)

get_signatures(res, k = 6)

Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)

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

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

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

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

Compare the overlap of signatures from different k:
compare_signatures(res)

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.
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:
which_row
: row indices corresponding to the input matrix.
fdr
: FDR for the differential test.
mean_x
: The mean value in group x.
scaled_mean_x
: The mean value in group x after rows are scaled.
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")

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

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

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

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

Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)

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"]
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 15818 rows and 107 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'ATC' method.
#> Subgroups are detected by 'NMF' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 3.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)

The plots are:
- The first row: a plot of the ECDF (empirical cumulative distribution
function) curves of the consensus matrix for each
k
and the heatmap of
predicted classes for each k
.
- The second row: heatmaps of the consensus matrix for each
k
.
- The third row: heatmaps of the membership matrix for each
k
.
- The fouth row: heatmaps of the signatures for each
k
.
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:
- ECDF curves of the consensus matrix for each
k
;
- 1-PAC. The PAC
score
measures the proportion of the ambiguous subgrouping.
- Mean silhouette score.
- Concordance. The mean probability of fiting the consensus class ids in all
partitions.
- Area increased. Denote \(A_k\) as the area under the ECDF curve for current
k
, the area increased is defined as \(A_k - A_{k-1}\).
- Rand index. The percent of pairs of samples that are both in a same cluster
or both are not in a same cluster in the partition of k and k-1.
- Jaccard index. The ratio of pairs of samples are both in a same cluster in
the partition of k and k-1 and the pairs of samples are both in a same
cluster in the partition k or k-1.
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)

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.999 0.966 0.985 0.5033 0.496 0.496
#> 3 3 0.909 0.894 0.954 0.2123 0.640 0.421
#> 4 4 0.551 0.517 0.747 0.1601 0.862 0.673
#> 5 5 0.720 0.755 0.861 0.0759 0.769 0.412
#> 6 6 0.703 0.632 0.791 0.0511 0.913 0.658
suggest_best_k()
suggests the best \(k\) based on these statistics. The rules are as follows:
- All \(k\) with Jaccard index larger than 0.95 are removed because increasing
\(k\) does not provide enough extra information. If all \(k\) are removed, it is
marked as no subgroup is detected.
- For all \(k\) with 1-PAC score larger than 0.9, the maximal \(k\) is taken as
the best \(k\), and other \(k\) are marked as optional \(k\).
- If it does not fit the second rule. The \(k\) with the maximal vote of the
highest 1-PAC score, highest mean silhouette, and highest concordance is
taken as the best \(k\).
suggest_best_k(res)
#> [1] 3
#> attr(,"optional")
#> [1] 2
There is also optional best \(k\) = 2 that is worth to check.
Following shows the table of the partitions (You need to click the show/hide
code output link to see it). The membership matrix (columns with name p*
)
is inferred by
clue::cl_consensus()
function with the SE
method. Basically the value in the membership matrix
represents the probability to belong to a certain group. The finall class
label for an item is determined with the group with highest probability it
belongs to.
In get_classes()
function, the entropy is calculated from the membership
matrix and the silhouette score is calculated from the consensus matrix.
show/hide code output
cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#> class entropy silhouette p1 p2
#> ERR862939 1 0.0000 0.9793 1.000 0.000
#> ERR862957 1 0.0000 0.9793 1.000 0.000
#> ERR878007 1 0.0000 0.9793 1.000 0.000
#> ERR862940 1 0.0000 0.9793 1.000 0.000
#> ERR862958 1 0.0000 0.9793 1.000 0.000
#> ERR878008 1 0.0000 0.9793 1.000 0.000
#> ERR862941 2 0.0000 0.9894 0.000 1.000
#> ERR862959 2 0.0000 0.9894 0.000 1.000
#> ERR878009 2 0.0000 0.9894 0.000 1.000
#> ERR862942 2 0.0000 0.9894 0.000 1.000
#> ERR862960 2 0.0000 0.9894 0.000 1.000
#> ERR878010 2 0.0000 0.9894 0.000 1.000
#> ERR862943 1 0.0000 0.9793 1.000 0.000
#> ERR862961 1 0.0000 0.9793 1.000 0.000
#> ERR878011 1 0.0000 0.9793 1.000 0.000
#> ERR862944 1 0.0000 0.9793 1.000 0.000
#> ERR862962 1 0.0000 0.9793 1.000 0.000
#> ERR878012 1 0.0000 0.9793 1.000 0.000
#> ERR862945 1 0.0000 0.9793 1.000 0.000
#> ERR862963 1 0.0000 0.9793 1.000 0.000
#> ERR878013 1 0.0000 0.9793 1.000 0.000
#> ERR862946 1 0.0000 0.9793 1.000 0.000
#> ERR862964 1 0.0000 0.9793 1.000 0.000
#> ERR878014 1 0.0000 0.9793 1.000 0.000
#> ERR862947 2 0.0000 0.9894 0.000 1.000
#> ERR862965 2 0.0000 0.9894 0.000 1.000
#> ERR878015 2 0.0000 0.9894 0.000 1.000
#> ERR862948 2 0.0000 0.9894 0.000 1.000
#> ERR862966 2 0.0000 0.9894 0.000 1.000
#> ERR878016 2 0.0000 0.9894 0.000 1.000
#> ERR862949 2 0.0000 0.9894 0.000 1.000
#> ERR862967 2 0.0000 0.9894 0.000 1.000
#> ERR878017 2 0.0000 0.9894 0.000 1.000
#> ERR862950 2 0.0000 0.9894 0.000 1.000
#> ERR862968 2 0.0000 0.9894 0.000 1.000
#> ERR878018 2 0.0000 0.9894 0.000 1.000
#> ERR862951 1 0.5629 0.8598 0.868 0.132
#> ERR862969 1 0.6343 0.8244 0.840 0.160
#> ERR878019 2 0.9970 0.0697 0.468 0.532
#> ERR862952 1 0.4431 0.9043 0.908 0.092
#> ERR862970 1 0.4690 0.8960 0.900 0.100
#> ERR878020 1 0.9000 0.5619 0.684 0.316
#> ERR862953 2 0.2948 0.9364 0.052 0.948
#> ERR862971 2 0.1843 0.9620 0.028 0.972
#> ERR878021 2 0.0000 0.9894 0.000 1.000
#> ERR862954 2 0.0000 0.9894 0.000 1.000
#> ERR862972 2 0.0376 0.9857 0.004 0.996
#> ERR878022 2 0.0000 0.9894 0.000 1.000
#> ERR862955 2 0.0000 0.9894 0.000 1.000
#> ERR862973 2 0.0000 0.9894 0.000 1.000
#> ERR878023 2 0.0000 0.9894 0.000 1.000
#> ERR862956 2 0.0000 0.9894 0.000 1.000
#> ERR862974 2 0.0000 0.9894 0.000 1.000
#> ERR878024 2 0.0000 0.9894 0.000 1.000
#> ERR862975 1 0.0000 0.9793 1.000 0.000
#> ERR866150 1 0.0000 0.9793 1.000 0.000
#> ERR866168 1 0.0000 0.9793 1.000 0.000
#> ERR862976 1 0.0000 0.9793 1.000 0.000
#> ERR866151 1 0.0000 0.9793 1.000 0.000
#> ERR866169 1 0.0000 0.9793 1.000 0.000
#> ERR862977 2 0.0000 0.9894 0.000 1.000
#> ERR866152 2 0.0000 0.9894 0.000 1.000
#> ERR866170 2 0.0000 0.9894 0.000 1.000
#> ERR862978 2 0.0000 0.9894 0.000 1.000
#> ERR866153 2 0.0000 0.9894 0.000 1.000
#> ERR866171 2 0.0000 0.9894 0.000 1.000
#> ERR862979 2 0.0000 0.9894 0.000 1.000
#> ERR866154 2 0.0000 0.9894 0.000 1.000
#> ERR866172 2 0.0000 0.9894 0.000 1.000
#> ERR862980 2 0.0000 0.9894 0.000 1.000
#> ERR866155 2 0.0000 0.9894 0.000 1.000
#> ERR866173 2 0.0000 0.9894 0.000 1.000
#> ERR862981 1 0.2043 0.9577 0.968 0.032
#> ERR866156 1 0.3879 0.9199 0.924 0.076
#> ERR866174 1 0.3879 0.9200 0.924 0.076
#> ERR866157 1 0.1414 0.9668 0.980 0.020
#> ERR866175 1 0.0938 0.9725 0.988 0.012
#> ERR862983 1 0.0000 0.9793 1.000 0.000
#> ERR866158 1 0.0000 0.9793 1.000 0.000
#> ERR866176 1 0.0000 0.9793 1.000 0.000
#> ERR862984 1 0.0000 0.9793 1.000 0.000
#> ERR866159 1 0.0000 0.9793 1.000 0.000
#> ERR866177 1 0.0000 0.9793 1.000 0.000
#> ERR862985 1 0.0000 0.9793 1.000 0.000
#> ERR866160 1 0.0376 0.9772 0.996 0.004
#> ERR866178 1 0.0000 0.9793 1.000 0.000
#> ERR862986 1 0.0672 0.9750 0.992 0.008
#> ERR866161 1 0.0938 0.9725 0.988 0.012
#> ERR866179 1 0.0672 0.9750 0.992 0.008
#> ERR862987 2 0.0000 0.9894 0.000 1.000
#> ERR866162 2 0.0000 0.9894 0.000 1.000
#> ERR866180 2 0.0000 0.9894 0.000 1.000
#> ERR862988 2 0.0000 0.9894 0.000 1.000
#> ERR866163 2 0.0000 0.9894 0.000 1.000
#> ERR866181 2 0.0000 0.9894 0.000 1.000
#> ERR862989 1 0.0000 0.9793 1.000 0.000
#> ERR866164 1 0.0000 0.9793 1.000 0.000
#> ERR866182 1 0.0000 0.9793 1.000 0.000
#> ERR862990 1 0.0000 0.9793 1.000 0.000
#> ERR866165 1 0.0000 0.9793 1.000 0.000
#> ERR866183 1 0.0000 0.9793 1.000 0.000
#> ERR862991 2 0.0000 0.9894 0.000 1.000
#> ERR866166 2 0.0000 0.9894 0.000 1.000
#> ERR866184 2 0.0000 0.9894 0.000 1.000
#> ERR862992 2 0.0000 0.9894 0.000 1.000
#> ERR866167 2 0.0000 0.9894 0.000 1.000
#> ERR866185 2 0.0000 0.9894 0.000 1.000
show/hide code output
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> ERR862939 3 0.0000 0.9951 0.000 0.000 1.000
#> ERR862957 3 0.0000 0.9951 0.000 0.000 1.000
#> ERR878007 3 0.2356 0.9143 0.072 0.000 0.928
#> ERR862940 3 0.0000 0.9951 0.000 0.000 1.000
#> ERR862958 3 0.0000 0.9951 0.000 0.000 1.000
#> ERR878008 3 0.0000 0.9951 0.000 0.000 1.000
#> ERR862941 2 0.0000 0.9136 0.000 1.000 0.000
#> ERR862959 2 0.0000 0.9136 0.000 1.000 0.000
#> ERR878009 2 0.6291 0.1252 0.468 0.532 0.000
#> ERR862942 2 0.0000 0.9136 0.000 1.000 0.000
#> ERR862960 2 0.0000 0.9136 0.000 1.000 0.000
#> ERR878010 2 0.6305 0.0655 0.484 0.516 0.000
#> ERR862943 3 0.0000 0.9951 0.000 0.000 1.000
#> ERR862961 3 0.0000 0.9951 0.000 0.000 1.000
#> ERR878011 3 0.0000 0.9951 0.000 0.000 1.000
#> ERR862944 3 0.0000 0.9951 0.000 0.000 1.000
#> ERR862962 3 0.0000 0.9951 0.000 0.000 1.000
#> ERR878012 3 0.0000 0.9951 0.000 0.000 1.000
#> ERR862945 3 0.0000 0.9951 0.000 0.000 1.000
#> ERR862963 3 0.0000 0.9951 0.000 0.000 1.000
#> ERR878013 3 0.0000 0.9951 0.000 0.000 1.000
#> ERR862946 3 0.0000 0.9951 0.000 0.000 1.000
#> ERR862964 3 0.0000 0.9951 0.000 0.000 1.000
#> ERR878014 3 0.0000 0.9951 0.000 0.000 1.000
#> ERR862947 2 0.0000 0.9136 0.000 1.000 0.000
#> ERR862965 2 0.0000 0.9136 0.000 1.000 0.000
#> ERR878015 2 0.0000 0.9136 0.000 1.000 0.000
#> ERR862948 2 0.0000 0.9136 0.000 1.000 0.000
#> ERR862966 2 0.0000 0.9136 0.000 1.000 0.000
#> ERR878016 2 0.0000 0.9136 0.000 1.000 0.000
#> ERR862949 2 0.0000 0.9136 0.000 1.000 0.000
#> ERR862967 2 0.0000 0.9136 0.000 1.000 0.000
#> ERR878017 2 0.1289 0.8890 0.032 0.968 0.000
#> ERR862950 2 0.0000 0.9136 0.000 1.000 0.000
#> ERR862968 2 0.0000 0.9136 0.000 1.000 0.000
#> ERR878018 2 0.0000 0.9136 0.000 1.000 0.000
#> ERR862951 1 0.0747 0.9532 0.984 0.016 0.000
#> ERR862969 1 0.0747 0.9532 0.984 0.016 0.000
#> ERR878019 1 0.0424 0.9522 0.992 0.008 0.000
#> ERR862952 1 0.2096 0.9341 0.944 0.052 0.004
#> ERR862970 1 0.1289 0.9474 0.968 0.032 0.000
#> ERR878020 1 0.0747 0.9532 0.984 0.016 0.000
#> ERR862953 1 0.0892 0.9523 0.980 0.020 0.000
#> ERR862971 1 0.0892 0.9523 0.980 0.020 0.000
#> ERR878021 1 0.0747 0.9532 0.984 0.016 0.000
#> ERR862954 1 0.0892 0.9523 0.980 0.020 0.000
#> ERR862972 1 0.0747 0.9532 0.984 0.016 0.000
#> ERR878022 1 0.0747 0.9532 0.984 0.016 0.000
#> ERR862955 1 0.2711 0.9037 0.912 0.088 0.000
#> ERR862973 1 0.2066 0.9282 0.940 0.060 0.000
#> ERR878023 1 0.0892 0.9523 0.980 0.020 0.000
#> ERR862956 1 0.1411 0.9452 0.964 0.036 0.000
#> ERR862974 1 0.1411 0.9452 0.964 0.036 0.000
#> ERR878024 1 0.0892 0.9523 0.980 0.020 0.000
#> ERR862975 1 0.0000 0.9497 1.000 0.000 0.000
#> ERR866150 1 0.0000 0.9497 1.000 0.000 0.000
#> ERR866168 1 0.0000 0.9497 1.000 0.000 0.000
#> ERR862976 1 0.0000 0.9497 1.000 0.000 0.000
#> ERR866151 1 0.0000 0.9497 1.000 0.000 0.000
#> ERR866169 1 0.0000 0.9497 1.000 0.000 0.000
#> ERR862977 2 0.6286 0.1420 0.464 0.536 0.000
#> ERR866152 1 0.1163 0.9492 0.972 0.028 0.000
#> ERR866170 1 0.1289 0.9477 0.968 0.032 0.000
#> ERR862978 2 0.6140 0.3270 0.404 0.596 0.000
#> ERR866153 1 0.1753 0.9378 0.952 0.048 0.000
#> ERR866171 1 0.1163 0.9492 0.972 0.028 0.000
#> ERR862979 2 0.0237 0.9108 0.004 0.996 0.000
#> ERR866154 1 0.5291 0.6443 0.732 0.268 0.000
#> ERR866172 1 0.6095 0.3497 0.608 0.392 0.000
#> ERR862980 2 0.3879 0.7707 0.152 0.848 0.000
#> ERR866155 1 0.3192 0.8776 0.888 0.112 0.000
#> ERR866173 1 0.2711 0.9031 0.912 0.088 0.000
#> ERR862981 1 0.0747 0.9532 0.984 0.016 0.000
#> ERR866156 1 0.0592 0.9529 0.988 0.012 0.000
#> ERR866174 1 0.0592 0.9529 0.988 0.012 0.000
#> ERR866157 1 0.0747 0.9532 0.984 0.016 0.000
#> ERR866175 1 0.0747 0.9532 0.984 0.016 0.000
#> ERR862983 1 0.5948 0.4879 0.640 0.000 0.360
#> ERR866158 1 0.2261 0.9103 0.932 0.000 0.068
#> ERR866176 1 0.2066 0.9172 0.940 0.000 0.060
#> ERR862984 1 0.5397 0.6396 0.720 0.000 0.280
#> ERR866159 1 0.2356 0.9068 0.928 0.000 0.072
#> ERR866177 1 0.2066 0.9164 0.940 0.000 0.060
#> ERR862985 1 0.0424 0.9523 0.992 0.008 0.000
#> ERR866160 1 0.0237 0.9511 0.996 0.004 0.000
#> ERR866178 1 0.0237 0.9511 0.996 0.004 0.000
#> ERR862986 1 0.0747 0.9532 0.984 0.016 0.000
#> ERR866161 1 0.0592 0.9529 0.988 0.012 0.000
#> ERR866179 1 0.0592 0.9529 0.988 0.012 0.000
#> ERR862987 2 0.0000 0.9136 0.000 1.000 0.000
#> ERR866162 2 0.0000 0.9136 0.000 1.000 0.000
#> ERR866180 2 0.0000 0.9136 0.000 1.000 0.000
#> ERR862988 2 0.0000 0.9136 0.000 1.000 0.000
#> ERR866163 2 0.0000 0.9136 0.000 1.000 0.000
#> ERR866181 2 0.0000 0.9136 0.000 1.000 0.000
#> ERR862989 1 0.3941 0.8050 0.844 0.000 0.156
#> ERR866164 1 0.0000 0.9497 1.000 0.000 0.000
#> ERR866182 1 0.0000 0.9497 1.000 0.000 0.000
#> ERR862990 1 0.0000 0.9497 1.000 0.000 0.000
#> ERR866165 1 0.0000 0.9497 1.000 0.000 0.000
#> ERR866183 1 0.0000 0.9497 1.000 0.000 0.000
#> ERR862991 2 0.0000 0.9136 0.000 1.000 0.000
#> ERR866166 2 0.2959 0.8258 0.100 0.900 0.000
#> ERR866184 2 0.2165 0.8607 0.064 0.936 0.000
#> ERR862992 2 0.0000 0.9136 0.000 1.000 0.000
#> ERR866167 2 0.0000 0.9136 0.000 1.000 0.000
#> ERR866185 2 0.0000 0.9136 0.000 1.000 0.000
show/hide code output
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> ERR862939 3 0.4697 0.262 0.000 0.000 0.644 0.356
#> ERR862957 3 0.5110 0.284 0.012 0.000 0.636 0.352
#> ERR878007 4 0.6663 0.240 0.124 0.000 0.280 0.596
#> ERR862940 3 0.4564 0.309 0.000 0.000 0.672 0.328
#> ERR862958 3 0.4564 0.309 0.000 0.000 0.672 0.328
#> ERR878008 3 0.4564 0.309 0.000 0.000 0.672 0.328
#> ERR862941 2 0.5417 0.330 0.016 0.572 0.412 0.000
#> ERR862959 2 0.5823 0.432 0.044 0.608 0.348 0.000
#> ERR878009 2 0.4961 0.408 0.448 0.552 0.000 0.000
#> ERR862942 2 0.7175 0.250 0.136 0.460 0.404 0.000
#> ERR862960 2 0.6995 0.314 0.120 0.496 0.384 0.000
#> ERR878010 2 0.4998 0.301 0.488 0.512 0.000 0.000
#> ERR862943 4 0.2814 0.756 0.000 0.000 0.132 0.868
#> ERR862961 4 0.2814 0.756 0.000 0.000 0.132 0.868
#> ERR878011 4 0.1118 0.789 0.000 0.000 0.036 0.964
#> ERR862944 4 0.3024 0.750 0.000 0.000 0.148 0.852
#> ERR862962 4 0.3024 0.746 0.000 0.000 0.148 0.852
#> ERR878012 4 0.2281 0.735 0.000 0.000 0.096 0.904
#> ERR862945 4 0.0000 0.806 0.000 0.000 0.000 1.000
#> ERR862963 4 0.0000 0.806 0.000 0.000 0.000 1.000
#> ERR878013 4 0.0188 0.806 0.000 0.000 0.004 0.996
#> ERR862946 4 0.0000 0.806 0.000 0.000 0.000 1.000
#> ERR862964 4 0.0000 0.806 0.000 0.000 0.000 1.000
#> ERR878014 4 0.0188 0.806 0.000 0.000 0.004 0.996
#> ERR862947 2 0.0000 0.730 0.000 1.000 0.000 0.000
#> ERR862965 2 0.0000 0.730 0.000 1.000 0.000 0.000
#> ERR878015 2 0.0000 0.730 0.000 1.000 0.000 0.000
#> ERR862948 2 0.0000 0.730 0.000 1.000 0.000 0.000
#> ERR862966 2 0.0000 0.730 0.000 1.000 0.000 0.000
#> ERR878016 2 0.0000 0.730 0.000 1.000 0.000 0.000
#> ERR862949 2 0.5810 0.555 0.072 0.672 0.256 0.000
#> ERR862967 2 0.4100 0.674 0.048 0.824 0.128 0.000
#> ERR878017 2 0.4304 0.637 0.284 0.716 0.000 0.000
#> ERR862950 2 0.5296 0.163 0.008 0.500 0.492 0.000
#> ERR862968 2 0.5277 0.229 0.008 0.532 0.460 0.000
#> ERR878018 2 0.1118 0.726 0.036 0.964 0.000 0.000
#> ERR862951 1 0.4535 0.635 0.704 0.004 0.292 0.000
#> ERR862969 1 0.4535 0.635 0.704 0.004 0.292 0.000
#> ERR878019 1 0.4331 0.636 0.712 0.000 0.288 0.000
#> ERR862952 1 0.6485 0.477 0.508 0.052 0.432 0.008
#> ERR862970 1 0.5263 0.506 0.544 0.008 0.448 0.000
#> ERR878020 1 0.4737 0.634 0.696 0.004 0.296 0.004
#> ERR862953 3 0.4992 0.332 0.476 0.000 0.524 0.000
#> ERR862971 3 0.4967 0.374 0.452 0.000 0.548 0.000
#> ERR878021 1 0.3266 0.637 0.832 0.000 0.168 0.000
#> ERR862954 1 0.2921 0.584 0.860 0.000 0.140 0.000
#> ERR862972 1 0.3311 0.629 0.828 0.000 0.172 0.000
#> ERR878022 1 0.3831 0.641 0.792 0.004 0.204 0.000
#> ERR862955 3 0.5506 0.352 0.472 0.016 0.512 0.000
#> ERR862973 1 0.5296 -0.385 0.500 0.008 0.492 0.000
#> ERR878023 1 0.1256 0.575 0.964 0.008 0.028 0.000
#> ERR862956 1 0.4050 0.405 0.808 0.024 0.168 0.000
#> ERR862974 1 0.4922 0.283 0.736 0.036 0.228 0.000
#> ERR878024 1 0.0927 0.582 0.976 0.008 0.016 0.000
#> ERR862975 1 0.4477 0.629 0.688 0.000 0.312 0.000
#> ERR866150 1 0.4673 0.632 0.700 0.000 0.292 0.008
#> ERR866168 1 0.5113 0.624 0.684 0.000 0.292 0.024
#> ERR862976 1 0.4584 0.632 0.696 0.000 0.300 0.004
#> ERR866151 1 0.4908 0.628 0.692 0.000 0.292 0.016
#> ERR866169 1 0.5013 0.626 0.688 0.000 0.292 0.020
#> ERR862977 1 0.6261 -0.230 0.504 0.440 0.056 0.000
#> ERR866152 1 0.2021 0.570 0.932 0.056 0.012 0.000
#> ERR866170 1 0.2125 0.557 0.920 0.076 0.004 0.000
#> ERR862978 1 0.7401 -0.165 0.496 0.316 0.188 0.000
#> ERR866153 1 0.3224 0.503 0.864 0.120 0.016 0.000
#> ERR866171 1 0.2635 0.540 0.904 0.076 0.020 0.000
#> ERR862979 1 0.7771 -0.277 0.408 0.244 0.348 0.000
#> ERR866154 1 0.5343 0.155 0.656 0.316 0.028 0.000
#> ERR866172 1 0.5731 -0.203 0.544 0.428 0.028 0.000
#> ERR862980 2 0.5921 0.396 0.448 0.516 0.036 0.000
#> ERR866155 1 0.2924 0.523 0.884 0.100 0.016 0.000
#> ERR866173 1 0.2949 0.527 0.888 0.088 0.024 0.000
#> ERR862981 1 0.4817 0.568 0.612 0.000 0.388 0.000
#> ERR866156 1 0.4406 0.633 0.700 0.000 0.300 0.000
#> ERR866174 1 0.4406 0.633 0.700 0.000 0.300 0.000
#> ERR866157 3 0.3764 0.376 0.216 0.000 0.784 0.000
#> ERR866175 3 0.4040 0.307 0.248 0.000 0.752 0.000
#> ERR862983 4 0.6774 0.294 0.120 0.000 0.312 0.568
#> ERR866158 1 0.7416 0.455 0.496 0.000 0.312 0.192
#> ERR866176 1 0.7443 0.451 0.492 0.000 0.312 0.196
#> ERR862984 4 0.7443 0.181 0.196 0.000 0.312 0.492
#> ERR866159 1 0.7429 0.451 0.496 0.000 0.308 0.196
#> ERR866177 1 0.7374 0.458 0.504 0.000 0.308 0.188
#> ERR862985 3 0.3726 0.404 0.212 0.000 0.788 0.000
#> ERR866160 1 0.4382 0.634 0.704 0.000 0.296 0.000
#> ERR866178 1 0.4406 0.633 0.700 0.000 0.300 0.000
#> ERR862986 3 0.3688 0.393 0.208 0.000 0.792 0.000
#> ERR866161 1 0.4605 0.615 0.664 0.000 0.336 0.000
#> ERR866179 1 0.4564 0.620 0.672 0.000 0.328 0.000
#> ERR862987 2 0.0000 0.730 0.000 1.000 0.000 0.000
#> ERR866162 2 0.0000 0.730 0.000 1.000 0.000 0.000
#> ERR866180 2 0.0000 0.730 0.000 1.000 0.000 0.000
#> ERR862988 2 0.0000 0.730 0.000 1.000 0.000 0.000
#> ERR866163 2 0.0000 0.730 0.000 1.000 0.000 0.000
#> ERR866181 2 0.0000 0.730 0.000 1.000 0.000 0.000
#> ERR862989 1 0.5321 0.364 0.748 0.000 0.140 0.112
#> ERR866164 1 0.0336 0.597 0.992 0.000 0.008 0.000
#> ERR866182 1 0.0469 0.599 0.988 0.000 0.012 0.000
#> ERR862990 1 0.0188 0.595 0.996 0.000 0.004 0.000
#> ERR866165 1 0.0592 0.601 0.984 0.000 0.016 0.000
#> ERR866183 1 0.1792 0.618 0.932 0.000 0.068 0.000
#> ERR862991 2 0.4621 0.633 0.284 0.708 0.008 0.000
#> ERR866166 2 0.4776 0.551 0.376 0.624 0.000 0.000
#> ERR866184 2 0.4624 0.587 0.340 0.660 0.000 0.000
#> ERR862992 2 0.4188 0.658 0.244 0.752 0.004 0.000
#> ERR866167 2 0.4222 0.644 0.272 0.728 0.000 0.000
#> ERR866185 2 0.4222 0.644 0.272 0.728 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
#> ERR862939 3 0.2802 0.7304 0.008 0.016 0.876 0.100 0.000
#> ERR862957 3 0.2689 0.7482 0.016 0.012 0.888 0.084 0.000
#> ERR878007 4 0.6375 0.4956 0.016 0.120 0.296 0.564 0.004
#> ERR862940 3 0.1630 0.7740 0.016 0.000 0.944 0.036 0.004
#> ERR862958 3 0.1630 0.7740 0.016 0.000 0.944 0.036 0.004
#> ERR878008 3 0.1843 0.7705 0.012 0.004 0.936 0.044 0.004
#> ERR862941 5 0.4649 0.4390 0.000 0.016 0.404 0.000 0.580
#> ERR862959 5 0.4297 0.6114 0.000 0.020 0.288 0.000 0.692
#> ERR878009 2 0.3796 0.6441 0.000 0.700 0.000 0.000 0.300
#> ERR862942 5 0.5568 0.3667 0.000 0.072 0.412 0.000 0.516
#> ERR862960 5 0.5467 0.3654 0.000 0.064 0.412 0.000 0.524
#> ERR878010 2 0.3579 0.7322 0.004 0.756 0.000 0.000 0.240
#> ERR862943 4 0.5549 0.7157 0.148 0.004 0.156 0.684 0.008
#> ERR862961 4 0.5435 0.7239 0.148 0.004 0.144 0.696 0.008
#> ERR878011 4 0.4238 0.7487 0.140 0.004 0.056 0.792 0.008
#> ERR862944 4 0.5310 0.6664 0.236 0.000 0.084 0.672 0.008
#> ERR862962 4 0.5448 0.6827 0.212 0.004 0.096 0.680 0.008
#> ERR878012 4 0.4943 0.6214 0.284 0.004 0.032 0.672 0.008
#> ERR862945 4 0.0510 0.7863 0.000 0.000 0.016 0.984 0.000
#> ERR862963 4 0.0510 0.7863 0.000 0.000 0.016 0.984 0.000
#> ERR878013 4 0.0162 0.7838 0.000 0.000 0.004 0.996 0.000
#> ERR862946 4 0.0703 0.7860 0.000 0.000 0.024 0.976 0.000
#> ERR862964 4 0.0703 0.7860 0.000 0.000 0.024 0.976 0.000
#> ERR878014 4 0.0404 0.7850 0.000 0.000 0.012 0.988 0.000
#> ERR862947 5 0.0794 0.8325 0.000 0.028 0.000 0.000 0.972
#> ERR862965 5 0.0794 0.8325 0.000 0.028 0.000 0.000 0.972
#> ERR878015 5 0.0794 0.8325 0.000 0.028 0.000 0.000 0.972
#> ERR862948 5 0.0794 0.8325 0.000 0.028 0.000 0.000 0.972
#> ERR862966 5 0.0794 0.8325 0.000 0.028 0.000 0.000 0.972
#> ERR878016 5 0.0794 0.8325 0.000 0.028 0.000 0.000 0.972
#> ERR862949 5 0.3521 0.7372 0.000 0.140 0.040 0.000 0.820
#> ERR862967 5 0.2416 0.7819 0.000 0.100 0.012 0.000 0.888
#> ERR878017 2 0.1908 0.8684 0.000 0.908 0.000 0.000 0.092
#> ERR862950 5 0.4965 0.3120 0.000 0.028 0.452 0.000 0.520
#> ERR862968 5 0.4484 0.5637 0.000 0.024 0.308 0.000 0.668
#> ERR878018 5 0.1410 0.8127 0.000 0.060 0.000 0.000 0.940
#> ERR862951 1 0.2835 0.8254 0.868 0.112 0.004 0.016 0.000
#> ERR862969 1 0.2124 0.8452 0.900 0.096 0.004 0.000 0.000
#> ERR878019 1 0.4490 0.3885 0.588 0.404 0.004 0.004 0.000
#> ERR862952 1 0.3038 0.8027 0.872 0.016 0.088 0.000 0.024
#> ERR862970 1 0.2144 0.8394 0.912 0.020 0.068 0.000 0.000
#> ERR878020 1 0.2270 0.8556 0.908 0.072 0.004 0.016 0.000
#> ERR862953 3 0.4872 0.6644 0.248 0.056 0.692 0.000 0.004
#> ERR862971 3 0.4881 0.6703 0.240 0.060 0.696 0.000 0.004
#> ERR878021 2 0.2690 0.7655 0.156 0.844 0.000 0.000 0.000
#> ERR862954 1 0.6135 0.3436 0.568 0.272 0.156 0.000 0.004
#> ERR862972 1 0.4235 0.4989 0.656 0.336 0.008 0.000 0.000
#> ERR878022 2 0.2605 0.7753 0.148 0.852 0.000 0.000 0.000
#> ERR862955 2 0.4695 0.6374 0.016 0.700 0.260 0.000 0.024
#> ERR862973 2 0.4019 0.7325 0.004 0.768 0.200 0.000 0.028
#> ERR878023 2 0.0955 0.8731 0.028 0.968 0.000 0.000 0.004
#> ERR862956 2 0.1267 0.8814 0.004 0.960 0.012 0.000 0.024
#> ERR862974 2 0.2067 0.8747 0.004 0.924 0.028 0.000 0.044
#> ERR878024 2 0.1251 0.8699 0.036 0.956 0.000 0.000 0.008
#> ERR862975 1 0.1362 0.8664 0.960 0.012 0.016 0.008 0.004
#> ERR866150 1 0.2005 0.8634 0.924 0.056 0.004 0.016 0.000
#> ERR866168 1 0.1901 0.8630 0.928 0.056 0.004 0.012 0.000
#> ERR862976 1 0.1365 0.8695 0.952 0.040 0.004 0.004 0.000
#> ERR866151 1 0.2492 0.8529 0.900 0.072 0.008 0.020 0.000
#> ERR866169 1 0.3033 0.8397 0.876 0.076 0.016 0.032 0.000
#> ERR862977 5 0.4740 -0.0146 0.000 0.468 0.016 0.000 0.516
#> ERR866152 2 0.1251 0.8850 0.008 0.956 0.000 0.000 0.036
#> ERR866170 2 0.1082 0.8841 0.008 0.964 0.000 0.000 0.028
#> ERR862978 2 0.5200 0.5177 0.000 0.628 0.068 0.000 0.304
#> ERR866153 2 0.1251 0.8852 0.008 0.956 0.000 0.000 0.036
#> ERR866171 2 0.0898 0.8830 0.008 0.972 0.000 0.000 0.020
#> ERR862979 2 0.4772 0.7141 0.000 0.728 0.108 0.000 0.164
#> ERR866154 2 0.1043 0.8835 0.000 0.960 0.000 0.000 0.040
#> ERR866172 2 0.1197 0.8825 0.000 0.952 0.000 0.000 0.048
#> ERR862980 2 0.1544 0.8750 0.000 0.932 0.000 0.000 0.068
#> ERR866155 2 0.0798 0.8826 0.008 0.976 0.000 0.000 0.016
#> ERR866173 2 0.0693 0.8817 0.008 0.980 0.000 0.000 0.012
#> ERR862981 1 0.1597 0.8573 0.940 0.012 0.048 0.000 0.000
#> ERR866156 1 0.0955 0.8697 0.968 0.028 0.004 0.000 0.000
#> ERR866174 1 0.0955 0.8697 0.968 0.028 0.004 0.000 0.000
#> ERR866157 1 0.3430 0.6776 0.776 0.004 0.220 0.000 0.000
#> ERR866175 1 0.2629 0.7872 0.860 0.004 0.136 0.000 0.000
#> ERR862983 1 0.0451 0.8640 0.988 0.000 0.008 0.004 0.000
#> ERR866158 1 0.0566 0.8646 0.984 0.004 0.012 0.000 0.000
#> ERR866176 1 0.0833 0.8630 0.976 0.004 0.016 0.004 0.000
#> ERR862984 1 0.0324 0.8655 0.992 0.004 0.004 0.000 0.000
#> ERR866159 1 0.1547 0.8548 0.948 0.004 0.032 0.016 0.000
#> ERR866177 1 0.1461 0.8564 0.952 0.004 0.028 0.016 0.000
#> ERR862985 3 0.4392 0.4487 0.380 0.008 0.612 0.000 0.000
#> ERR866160 1 0.1251 0.8699 0.956 0.036 0.008 0.000 0.000
#> ERR866178 1 0.1251 0.8699 0.956 0.036 0.008 0.000 0.000
#> ERR862986 1 0.4440 -0.0365 0.528 0.004 0.468 0.000 0.000
#> ERR866161 1 0.1444 0.8605 0.948 0.012 0.040 0.000 0.000
#> ERR866179 1 0.1364 0.8622 0.952 0.012 0.036 0.000 0.000
#> ERR862987 5 0.0794 0.8325 0.000 0.028 0.000 0.000 0.972
#> ERR866162 5 0.0794 0.8325 0.000 0.028 0.000 0.000 0.972
#> ERR866180 5 0.0794 0.8325 0.000 0.028 0.000 0.000 0.972
#> ERR862988 5 0.0794 0.8325 0.000 0.028 0.000 0.000 0.972
#> ERR866163 5 0.0794 0.8325 0.000 0.028 0.000 0.000 0.972
#> ERR866181 5 0.0794 0.8325 0.000 0.028 0.000 0.000 0.972
#> ERR862989 2 0.2555 0.8423 0.016 0.900 0.072 0.004 0.008
#> ERR866164 2 0.1282 0.8629 0.044 0.952 0.000 0.004 0.000
#> ERR866182 2 0.1443 0.8621 0.044 0.948 0.004 0.004 0.000
#> ERR862990 2 0.1363 0.8659 0.032 0.956 0.004 0.004 0.004
#> ERR866165 2 0.1526 0.8632 0.040 0.948 0.004 0.004 0.004
#> ERR866183 2 0.1918 0.8576 0.048 0.932 0.004 0.012 0.004
#> ERR862991 2 0.2179 0.8531 0.000 0.888 0.000 0.000 0.112
#> ERR866166 2 0.1478 0.8794 0.000 0.936 0.000 0.000 0.064
#> ERR866184 2 0.1608 0.8776 0.000 0.928 0.000 0.000 0.072
#> ERR862992 2 0.4242 0.3513 0.000 0.572 0.000 0.000 0.428
#> ERR866167 2 0.2280 0.8527 0.000 0.880 0.000 0.000 0.120
#> ERR866185 2 0.2329 0.8502 0.000 0.876 0.000 0.000 0.124
show/hide code output
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> ERR862939 6 0.3852 0.4956 0.000 0.004 0.032 0.224 0.000 0.740
#> ERR862957 6 0.3825 0.5005 0.000 0.004 0.032 0.220 0.000 0.744
#> ERR878007 6 0.6063 0.1281 0.008 0.112 0.028 0.324 0.000 0.528
#> ERR862940 6 0.4093 0.4292 0.000 0.000 0.404 0.012 0.000 0.584
#> ERR862958 6 0.4168 0.4352 0.000 0.000 0.400 0.016 0.000 0.584
#> ERR878008 6 0.4354 0.5691 0.000 0.000 0.144 0.132 0.000 0.724
#> ERR862941 5 0.4802 0.2945 0.000 0.000 0.404 0.000 0.540 0.056
#> ERR862959 5 0.4631 0.3798 0.000 0.000 0.352 0.000 0.596 0.052
#> ERR878009 2 0.3547 0.4668 0.000 0.668 0.000 0.000 0.332 0.000
#> ERR862942 5 0.5112 0.1664 0.000 0.000 0.444 0.000 0.476 0.080
#> ERR862960 5 0.4995 0.2624 0.000 0.008 0.412 0.000 0.528 0.052
#> ERR878010 2 0.3175 0.5999 0.000 0.744 0.000 0.000 0.256 0.000
#> ERR862943 4 0.4130 0.6848 0.008 0.000 0.028 0.700 0.000 0.264
#> ERR862961 4 0.4173 0.6739 0.008 0.000 0.028 0.692 0.000 0.272
#> ERR878011 4 0.5000 0.6839 0.100 0.000 0.040 0.704 0.000 0.156
#> ERR862944 4 0.4992 0.6745 0.040 0.000 0.052 0.668 0.000 0.240
#> ERR862962 4 0.4707 0.6787 0.024 0.000 0.048 0.680 0.000 0.248
#> ERR878012 4 0.5615 0.3445 0.320 0.000 0.044 0.568 0.000 0.068
#> ERR862945 4 0.0458 0.7885 0.000 0.000 0.000 0.984 0.000 0.016
#> ERR862963 4 0.0000 0.7898 0.000 0.000 0.000 1.000 0.000 0.000
#> ERR878013 4 0.0000 0.7898 0.000 0.000 0.000 1.000 0.000 0.000
#> ERR862946 4 0.0000 0.7898 0.000 0.000 0.000 1.000 0.000 0.000
#> ERR862964 4 0.0000 0.7898 0.000 0.000 0.000 1.000 0.000 0.000
#> ERR878014 4 0.0000 0.7898 0.000 0.000 0.000 1.000 0.000 0.000
#> ERR862947 5 0.0000 0.7796 0.000 0.000 0.000 0.000 1.000 0.000
#> ERR862965 5 0.0000 0.7796 0.000 0.000 0.000 0.000 1.000 0.000
#> ERR878015 5 0.0000 0.7796 0.000 0.000 0.000 0.000 1.000 0.000
#> ERR862948 5 0.0000 0.7796 0.000 0.000 0.000 0.000 1.000 0.000
#> ERR862966 5 0.0000 0.7796 0.000 0.000 0.000 0.000 1.000 0.000
#> ERR878016 5 0.0000 0.7796 0.000 0.000 0.000 0.000 1.000 0.000
#> ERR862949 5 0.4769 0.3663 0.000 0.032 0.360 0.000 0.592 0.016
#> ERR862967 5 0.3979 0.5447 0.000 0.028 0.256 0.000 0.712 0.004
#> ERR878017 2 0.2070 0.7984 0.000 0.896 0.012 0.000 0.092 0.000
#> ERR862950 3 0.4940 -0.0592 0.000 0.000 0.532 0.000 0.400 0.068
#> ERR862968 3 0.4757 -0.2312 0.000 0.000 0.480 0.000 0.472 0.048
#> ERR878018 5 0.1075 0.7564 0.000 0.048 0.000 0.000 0.952 0.000
#> ERR862951 1 0.3209 0.7997 0.856 0.056 0.060 0.000 0.004 0.024
#> ERR862969 1 0.2881 0.8172 0.884 0.028 0.052 0.004 0.012 0.020
#> ERR878019 2 0.4315 -0.0129 0.488 0.496 0.012 0.000 0.000 0.004
#> ERR862952 1 0.5208 0.5482 0.620 0.000 0.280 0.000 0.080 0.020
#> ERR862970 1 0.4194 0.6547 0.692 0.000 0.272 0.000 0.012 0.024
#> ERR878020 1 0.1585 0.8308 0.940 0.012 0.036 0.000 0.000 0.012
#> ERR862953 3 0.4180 0.3729 0.104 0.020 0.780 0.000 0.004 0.092
#> ERR862971 3 0.4400 0.3816 0.096 0.028 0.772 0.000 0.008 0.096
#> ERR878021 2 0.4261 0.6318 0.112 0.732 0.156 0.000 0.000 0.000
#> ERR862954 3 0.5412 0.4200 0.216 0.104 0.648 0.000 0.004 0.028
#> ERR862972 3 0.5977 0.3666 0.296 0.224 0.476 0.000 0.000 0.004
#> ERR878022 2 0.1765 0.8068 0.052 0.924 0.024 0.000 0.000 0.000
#> ERR862955 3 0.4744 0.5595 0.004 0.288 0.652 0.000 0.012 0.044
#> ERR862973 3 0.4579 0.4876 0.004 0.356 0.608 0.000 0.008 0.024
#> ERR878023 2 0.1908 0.8027 0.000 0.900 0.096 0.000 0.004 0.000
#> ERR862956 3 0.4890 0.2165 0.008 0.464 0.492 0.000 0.032 0.004
#> ERR862974 3 0.4949 0.3898 0.008 0.404 0.544 0.000 0.040 0.004
#> ERR878024 2 0.2001 0.8054 0.000 0.900 0.092 0.000 0.004 0.004
#> ERR862975 1 0.4292 0.6902 0.708 0.004 0.244 0.008 0.000 0.036
#> ERR866150 1 0.3202 0.7989 0.840 0.008 0.116 0.008 0.000 0.028
#> ERR866168 1 0.3093 0.8065 0.852 0.008 0.100 0.008 0.000 0.032
#> ERR862976 1 0.3744 0.7587 0.784 0.008 0.172 0.008 0.000 0.028
#> ERR866151 1 0.2058 0.8279 0.916 0.008 0.056 0.004 0.000 0.016
#> ERR866169 1 0.2450 0.8242 0.896 0.012 0.068 0.008 0.000 0.016
#> ERR862977 3 0.5581 0.2608 0.020 0.088 0.520 0.000 0.372 0.000
#> ERR866152 2 0.3983 0.6556 0.000 0.736 0.208 0.000 0.056 0.000
#> ERR866170 2 0.3791 0.6952 0.004 0.768 0.180 0.000 0.048 0.000
#> ERR862978 3 0.5073 0.5553 0.004 0.160 0.664 0.000 0.168 0.004
#> ERR866153 2 0.4075 0.6234 0.000 0.712 0.240 0.000 0.048 0.000
#> ERR866171 2 0.3713 0.6587 0.000 0.744 0.224 0.000 0.032 0.000
#> ERR862979 3 0.6517 0.4765 0.000 0.328 0.452 0.000 0.176 0.044
#> ERR866154 2 0.1257 0.8283 0.000 0.952 0.028 0.000 0.020 0.000
#> ERR866172 2 0.1168 0.8282 0.000 0.956 0.028 0.000 0.016 0.000
#> ERR862980 2 0.3284 0.7854 0.000 0.832 0.104 0.000 0.056 0.008
#> ERR866155 2 0.0405 0.8261 0.000 0.988 0.004 0.000 0.008 0.000
#> ERR866173 2 0.0405 0.8261 0.000 0.988 0.008 0.000 0.004 0.000
#> ERR862981 1 0.2402 0.8044 0.868 0.000 0.012 0.000 0.000 0.120
#> ERR866156 1 0.1787 0.8234 0.920 0.008 0.004 0.000 0.000 0.068
#> ERR866174 1 0.2122 0.8179 0.900 0.008 0.008 0.000 0.000 0.084
#> ERR866157 1 0.4621 0.4750 0.612 0.000 0.056 0.000 0.000 0.332
#> ERR866175 1 0.3766 0.6493 0.720 0.000 0.024 0.000 0.000 0.256
#> ERR862983 1 0.0000 0.8355 1.000 0.000 0.000 0.000 0.000 0.000
#> ERR866158 1 0.0146 0.8353 0.996 0.000 0.000 0.000 0.000 0.004
#> ERR866176 1 0.0520 0.8354 0.984 0.000 0.008 0.000 0.000 0.008
#> ERR862984 1 0.0000 0.8355 1.000 0.000 0.000 0.000 0.000 0.000
#> ERR866159 1 0.0653 0.8350 0.980 0.004 0.012 0.000 0.000 0.004
#> ERR866177 1 0.0767 0.8352 0.976 0.004 0.012 0.000 0.000 0.008
#> ERR862985 6 0.5425 0.0518 0.372 0.000 0.124 0.000 0.000 0.504
#> ERR866160 1 0.3572 0.7504 0.792 0.016 0.024 0.000 0.000 0.168
#> ERR866178 1 0.2915 0.7962 0.848 0.008 0.024 0.000 0.000 0.120
#> ERR862986 1 0.5432 0.1730 0.480 0.000 0.120 0.000 0.000 0.400
#> ERR866161 1 0.2868 0.7941 0.840 0.000 0.028 0.000 0.000 0.132
#> ERR866179 1 0.2771 0.8022 0.852 0.000 0.032 0.000 0.000 0.116
#> ERR862987 5 0.0717 0.7747 0.000 0.000 0.016 0.000 0.976 0.008
#> ERR866162 5 0.2030 0.7446 0.004 0.048 0.016 0.000 0.920 0.012
#> ERR866180 5 0.1699 0.7534 0.004 0.040 0.012 0.000 0.936 0.008
#> ERR862988 5 0.0146 0.7788 0.000 0.000 0.004 0.000 0.996 0.000
#> ERR866163 5 0.0964 0.7718 0.000 0.016 0.012 0.000 0.968 0.004
#> ERR866181 5 0.1223 0.7687 0.004 0.016 0.012 0.000 0.960 0.008
#> ERR862989 3 0.5005 0.3935 0.012 0.396 0.544 0.000 0.000 0.048
#> ERR866164 2 0.2365 0.8063 0.012 0.892 0.084 0.004 0.000 0.008
#> ERR866182 2 0.2169 0.8071 0.012 0.900 0.080 0.000 0.000 0.008
#> ERR862990 2 0.1493 0.8148 0.004 0.936 0.056 0.000 0.000 0.004
#> ERR866165 2 0.0922 0.8194 0.004 0.968 0.024 0.000 0.000 0.004
#> ERR866183 2 0.1147 0.8170 0.004 0.960 0.028 0.004 0.000 0.004
#> ERR862991 2 0.2162 0.7990 0.000 0.896 0.012 0.000 0.088 0.004
#> ERR866166 2 0.1078 0.8252 0.000 0.964 0.012 0.000 0.016 0.008
#> ERR866184 2 0.0964 0.8256 0.000 0.968 0.012 0.000 0.016 0.004
#> ERR862992 5 0.4264 -0.1394 0.000 0.484 0.016 0.000 0.500 0.000
#> ERR866167 2 0.1785 0.8177 0.000 0.928 0.016 0.000 0.048 0.008
#> ERR866185 2 0.1785 0.8178 0.000 0.928 0.016 0.000 0.048 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)

consensus_heatmap(res, k = 3)

consensus_heatmap(res, k = 4)

consensus_heatmap(res, k = 5)

consensus_heatmap(res, k = 6)

Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)

membership_heatmap(res, k = 3)

membership_heatmap(res, k = 4)

membership_heatmap(res, k = 5)

membership_heatmap(res, k = 6)

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)

get_signatures(res, k = 3)

get_signatures(res, k = 4)

get_signatures(res, k = 5)

get_signatures(res, k = 6)

Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)

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

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

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

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

Compare the overlap of signatures from different k:
compare_signatures(res)

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.
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:
which_row
: row indices corresponding to the input matrix.
fdr
: FDR for the differential test.
mean_x
: The mean value in group x.
scaled_mean_x
: The mean value in group x after rows are scaled.
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")

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

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

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

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

Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)

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