clustheatmap | R Documentation |
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.
clustheatmap(consmat, title = "")
consmat |
A matrix of consensus/ agreement matrix (see Details). |
title |
A title of the plot. |
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 (\forallA).
Function returns a heatmap plot.
Weksi Budiaji
Contact: budiaji@untirta.ac.id
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.
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.