Chi-square distance formula

22 visualizaciones (últimos 30 días)
Js Goh
Js Goh el 18 de Sept. de 2015
Comentada: the cyclist el 31 de Mayo de 2019
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 comentarios
Js Goh
Js Goh el 18 de Sept. de 2015
tested, not working

Iniciar sesión para comentar.

Respuestas (1)

the cyclist
the cyclist el 18 de Sept. de 2015
I found this page after googling for about 30 seconds: http://www.cs.columbia.edu/~mmerler/project/code/pdist2.m
  6 comentarios
AJAY KUMAR SAHU
AJAY KUMAR SAHU el 31 de Mayo de 2019
Hey, It doesn't work!!
the cyclist
the cyclist el 31 de Mayo de 2019
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.

Iniciar sesión para comentar.

Community Treasure Hunt

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

Start Hunting!

Translated by