Using "Pearson correlation coefficient" in the 'Pdist' for the Clustergram function

13 ビュー (過去 30 日間)
Wen Yang
Wen Yang 2020 年 10 月 30 日
コメント済み: Wen Yang 2020 年 11 月 3 日
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.

採用された回答

Scott Ronquist
Scott Ronquist 2020 年 11 月 2 日
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.
  5 件のコメント
Wen Yang
Wen Yang 2020 年 11 月 3 日
The penny dropped. Thank you so much Ronquist for your help, patient and hardworking.

サインインしてコメントする。

その他の回答 (0 件)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by