clustheatmap {kmed} | R Documentation |
Consensus matrix heatmap from A consensus matrix
Description
This function creates a consensus matrix heatmap from a consensus/ agreement matrix. The values of the consensus/ agreement matrix are transformed in order to plot the heatmap.
Usage
clustheatmap(consmat, title = "")
Arguments
consmat |
A matrix of consensus/ agreement matrix (see Details). |
title |
A title of the plot. |
Details
This is a function to produce a consensus matrix heatmap from a
consensus/ agreement matrix. A matrix produced by the
consensusmatrix
function can be directly provided in the
consmat
argument. The values of the consensus matrix, A,
are then transformed via a non-linear transformation by applying
a_{ij}^{trf} = \frac{a_{ij} - min(a_{..})}{max(a_{..}) - min(a_{..})}
where a_{ij}
is the value of the consensus matrix in row i and
column j, and a_{..}
is the all values of the matrix
(\forall
A).
Value
Function returns a heatmap plot.
Author(s)
Weksi Budiaji
Contact: budiaji@untirta.ac.id
References
Monti, S., P. Tamayo, J. Mesirov, and T. Golub. 2003. Consensus clustering: A resampling-based method for class discovery and visualization of gene expression microarray data. Machine Learning 52 pp. 91-118.
Hahsler, M., and Hornik, K., 2011. Dissimilarity plots: A visual exploration tool for partitional clustering. Journal of Computational and Graphical Statistics 20(2) pp. 335-354.
Examples
num <- as.matrix(iris[,1:4])
mrwdist <- distNumeric(num, num, method = "mrw")
irisfast <- clustboot(mrwdist, nclust=3, nboot=7)
complete <- function(x, nclust) {
res <- hclust(as.dist(x), method = "complete")
member <- cutree(res, nclust)
return(member)
}
consensuscomplete <- consensusmatrix(irisfast, nclust = 3, reorder = complete)
clustheatmap(consensuscomplete)