Using "Pearson correlation coefficient" in the 'Pdist' for the Clustergram function
15 views (last 30 days)
Show older comments
I am doing the Hierarchical cluster analysis. I constructed the dendrograms by the 'clustergram' using agglomerative average-linkage clustering. But I need to use 'pearson correlation coeffiecient' for the distance matric(the default distance matric is euclidean, there are other matric availdable as well), but I could not find the pearson correlation available in the 'PDist' function. Thanks for helping.
0 Comments
Accepted Answer
Scott Ronquist
on 2 Nov 2020
The 'correlation' option for pdist uses the pearson correlation (documentation page here). So to use this metric to calculate the distance between columns in clustergram, you can call:
clustergram(..., "ColumnPDist", "correlation")
The same option is available for "RowPDist" as well.
More Answers (0)
See Also
Categories
Find more on Statistical Analysis in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!