Hi Jake - 

ok, this answers the question. I would say the standard definition of Euclidean 
or Minkowski distance [i.e. with the root] is what we expect here, and also is 
needed to satisfy the triangle inequality, so no problem. 

Thanks, Tom 

--
-----------------------------------------
Institute for Gravitational Physics
(Albert Einstein Institute)
Callinstr. 38 
D-30167 Hannover, Germany

On Jan 21, 2013, at 11:41 PM, Lars Buitinck wrote:

> 2013/1/21 Jake Vanderplas <[email protected]>:
>> On 01/21/2013 01:13 PM, Lars Buitinck wrote:
>>> 2013/1/21 Thomas Dent <[email protected]>:
>>>> my question was whether the 'distance' function used for weighting returns 
>>>> the Minkowski distance as defined in Wikipedia, or instead the p-th power 
>>>> of it.
>>> Good question. Judging from the code, it would seem that only
>>> Euclidean distance is specialized when the brute force algorithm is
>>> used; I'm not sure about the ball tree algorithm. This may lead to
>>> inconsistent results when distance weighting is enabled.
>> For the ball tree, the p-th root is returned.  Unless you take the p-th
>> root, the distance is not a proper metric and the ball tree algorithm
>> would fail.
> 
> Alright. Then this should be easy to fix.
> 
> -- 
> Lars Buitinck
> Scientific programmer, ILPS
> University of Amsterdam
> 
> ------------------------------------------------------------------------------
> Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
> MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
> with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
> MVPs and experts. SALE $99.99 this month only -- learn more at:
> http://p.sf.net/sfu/learnmore_122412
> _______________________________________________
> Scikit-learn-general mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/scikit-learn-general


------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnnow-d2d
_______________________________________________
Scikit-learn-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general

Reply via email to