From: shahnaz fatima on 27 Jun 2010 10:22 v=double(x)*double(x'); d(i,j)=sqrt(v(i,i)+v(j,j)-2*v(i,j)); %%%% what is this distance metric called????? can anybody explain.
From: Roger Stafford on 27 Jun 2010 11:22 "shahnaz fatima" <shahnaz1981fat(a)gmail.com> wrote in message <i07mqe$i8e$1(a)fred.mathworks.com>... > v=double(x)*double(x'); > d(i,j)=sqrt(v(i,i)+v(j,j)-2*v(i,j)); %%%% what is this distance metric called????? > > can anybody explain. - - - - - - - - - It looks very much like the Euclidean metric in R^n between the rows of x where n is the number of columns in x. Roger Stafford
From: John D'Errico on 27 Jun 2010 11:32 "shahnaz fatima" <shahnaz1981fat(a)gmail.com> wrote in message <i07mqe$i8e$1(a)fred.mathworks.com>... > v=double(x)*double(x'); > d(i,j)=sqrt(v(i,i)+v(j,j)-2*v(i,j)); %%%% what is this distance metric called????? > > can anybody explain. Euclidean distance. But done very poorly, because it uses a doubly nested loop to do work that is far better done with no explicit loops at all. Even worse, it is inaccurate and subject to numerical problems in some cases. A better tool can be found here: http://www.mathworks.com/matlabcentral/fileexchange/18937 John
From: Faraz Afzal on 27 Jun 2010 12:03 "shahnaz fatima" <shahnaz1981fat(a)gmail.com> wrote in message <i07mqe$i8e$1(a)fred.mathworks.com>... > v=double(x)*double(x'); > d(i,j)=sqrt(v(i,i)+v(j,j)-2*v(i,j)); %%%% what is this distance metric called????? > > can anybody explain. Hi This look to me like a Euclidean metric in the nth space. Mapping v's for the given xs. If you have a Square matrix data use Chebyshev distance for much efficiency. I hope it answers the question. Let us know what you are trying to achieve? Regards, Faraz Afzal
|
Pages: 1 Prev: generation of orthonormal polynomials Next: sports shoes,clothing,gucci,ed hardy,watches |