Chi-square distance formula

조회 수: 21 (최근 30일)
Js Goh
Js Goh 2015년 9월 18일
댓글: the cyclist 2019년 5월 31일
Considering I'm using euclidean distance to calculate the distance between two vector.
cosined=sqrt(sum(abs((a-b).^2)))
Now I want to change euclidean into chi-square distance, does anyone know how to calculate chi-square distance between two vectors?
  댓글 수: 2
Js Goh
Js Goh 2015년 9월 18일
tested, not working

댓글을 달려면 로그인하십시오.

답변 (1개)

the cyclist
the cyclist 2015년 9월 18일
I found this page after googling for about 30 seconds: http://www.cs.columbia.edu/~mmerler/project/code/pdist2.m
  댓글 수: 6
AJAY KUMAR SAHU
AJAY KUMAR SAHU 2019년 5월 31일
Hey, It doesn't work!!
the cyclist
the cyclist 2019년 5월 31일
MATLAB has a built-in pdist2 function, which you are presumably calling (rather than the one from the link listed above). You have two options:
  • Download the function from the link above, and use it
  • Use the built-in MATLAB function, which has the ability to define a custom distance function, and code the chi-square distance yourself.

댓글을 달려면 로그인하십시오.

Community Treasure Hunt

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

Start Hunting!

Translated by