mahout-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From WangRamon <ramon_w...@hotmail.com>
Subject RE: Can anybody explain the distance method in SquaredEuclideanDistanceMeasure?
Date Fri, 04 Nov 2011 15:03:54 GMT

haha, thanks for the math, i almost forget
 > Date: Fri, 4 Nov 2011 16:01:02 +0100
> From: ssc@apache.org
> To: user@mahout.apache.org
> Subject: Re: Can anybody explain the distance method in SquaredEuclideanDistanceMeasure?
> 
> c = centroid
> v = vector
> 
> (c - v)^2 = c^2 - 2cv + v^2
> 
> On 04.11.2011 15:58, WangRamon wrote:
> > 
> > 
> > 
> > 
> > Hi All  I'm reading the code of SquaredEuclideanDistanceMeasure, the "distance(double
centroidLengthSquare, Vector centroid, Vector v)" method confused me a lot, i don't know why
we choose this expression "centroidLengthSquare - 2 * v.dot(centroid) + v.getLengthSquared()"
to calculate the distance? What is the best case to use this Measure? BTW,  I think it would
be great if we can have a wiki or some detail user guide or more comments in the source code
to explain each distance measure implementation, that will really help, thanks guys.   Cheers
 Ramon 		 	   		 
 		 	   		  
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message