0
votes

I'm working with a matrix that contains several entries and their similarity in the following format:

//      A      B      C  

 A      1     0.8    0.4

 B      0.8    1     0.2

 C      0.4   0.2     1

In this case, 1 means that two entries are identical, 0 that they are completely different. Each entry represents one string of observations that are either present or not. The similarity value is calculated by checking for overlapping observations. I would like to visualize this relation of the different entries; would it be possible to use a dendrogram in this case?

1
Thank you for your suggestion! This helps perfectly to identify similarities and differences. Would there be any possibility to show the 'interrelationships' between the different entries such an a dendrogram that groups the different entries by their similarity? - macright

1 Answers

1
votes

Here are two ways to visualize your matrix.

  1. corrplot

    library(corrplot)
    corrplot(Mat)

corrplot

  1. dendrogram using hclust

Your matrix is similarity but for hclust, we need dis similarity, so I will transform it using 1 - Mat.

HC = hclust(as.dist(1-Mat))
plot(HC)

Dendrogram