Using two differents distance in the same clustering algorithm

조회 수: 3 (최근 30일)
rayane souidi
rayane souidi 2019년 8월 14일
답변: Dheeraj Singh 2019년 8월 19일
Hello,
I'm trying to create a clustering algorithm using a particular approach:
First, I want to use the mahalanobis distance to compute distance between observations (I do have the ML and optimization toolbox).
Then, my idea is to use the linkage function to create a tree. But the issue that I cannot find an answer for is that I want to compute distance between nodes using a distance that I created, which is different from the mahalanobis distance. The second distance is only working between clusters.
Thanks for your answers

답변 (1개)

Dheeraj Singh
Dheeraj Singh 2019년 8월 19일
I understand that you want to use mahalanobis distance for calculating distance between clusters and then use a custom distance function to create a tree using linkage function.
Firstly, you can use pdist function to calculate distance between clusters using mahalanobis distance.
While creating a tree using linkagefunction you can define the custom distance function as a function handle. For more info about the different distance function please refer to the Distance metric section of the documentation of linkagefunction .

카테고리

Help CenterFile Exchange에서 Statistics and Machine Learning Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by