pdist custom distance function.

6 Ansichten (letzte 30 Tage)
giovanni grieco
giovanni grieco am 5 Mär. 2017
Beantwortet: Walter Roberson am 5 Mär. 2017
I have to use this distance in the pdist function:
norm((log(cov_1) - log(cov_2)),'fro')
I have already read the pdist documentation but I have not figured out how to define and call my distance in pdist.
someone could help, maybe with an example.

Akzeptierte Antwort

Walter Roberson
Walter Roberson am 5 Mär. 2017
distfun = @(cov_1, cov_2) norm((log(cov_1) - log(cov_2)),'fro');
pdist(YourData, distfun)

Weitere Antworten (0)

Kategorien

Mehr zu Statistics and Machine Learning Toolbox finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by