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.
    Jake



------------------------------------------------------------------------------
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

Reply via email to