Given a vector of cluster assignments, we first calculate the connectivity
matrix and indicator matrix. A connectivity matrix has a 1 if both samples
are in the same cluster, and 0 otherwise. An indicator matrix has a 1 if both
samples were selected to be used in a subsample of a consensus clustering
algorithm, and 0 otherwise. Summation of connectivity matrices and indicator
matrices is performed over different subsamples of the data. The consensus
matrix is calculated by dividing the aggregated connectivity matrices by the
aggregated indicator matrices.
If a meta-consensus matrix is desired, where consensus classes of different
clustering algorithms are aggregated, we can construct a weighted
meta-consensus matrix using weights
.