Generating a heatmap that depicts the clusters in a dataset using hierarchical clustering in R

前端 未结 1 935
孤独总比滥情好
孤独总比滥情好 2020-12-15 13:54

\"dendogram\"\"ThisI am tr

相关标签:
1条回答
  • 2020-12-15 14:34

    enter image description here

    It turns out I should have generated a distance matrix using some kind of correlation on my data first. I calculated similarity values on the matrix using pearson, then called the heapmap function which made it easier to cluster the data. Once I was able to generate clusters I made it so that they would line up on the diagonal. Above is what the result looks like now. I had to alter how I called heatmap on my data set so that the clusters line up on the axis:

    heatmap(mtscaled, Colv=T,Rowv=T, scale='none',symm = T)
    
    0 讨论(0)
提交回复
热议问题