[mlpack] Numeric sensitivity of RangeSearch

Ryan Curtin gth671b at mail.gatech.edu
Tue Mar 25 10:08:11 EDT 2014


On Tue, Mar 25, 2014 at 10:06:57AM -0400, Ryan Curtin wrote:
> On Tue, Mar 25, 2014 at 09:55:17PM +0800, Li Dong wrote:
> > Dear Ryan,
> > 
> > I have isolated a bug case into a single code in the attachment, from which you can see the results:
> > 
> > Neighbor grid number is 201 when R is 1.
> > Neighbor grid number is 102 when R is 6.371e+06.
> 
> Hi Li,
> 
> Thank you for the easy code sample.  In the code you have written:
> 
>   typedef mlpack::tree::BinarySpaceTree<
>       mlpack::bound::HRectBound<2>,
>       mlpack::range::RangeSearchStat> TreeType;
>   typedef mlpack::metric::SquaredEuclideanDistance MetricType;
>   typedef mlpack::range::RangeSearch<MetricType, TreeType> Searcher;
> 
> If you change SquaredEuclideanDistance to EuclideanDistance, the problem
> is solved.  I noticed that the tutorial [1] suggests using the
> SquaredEuclideanDistance class, but this is no longer correct based on
> the pruning rules that the RangeSearch class uses.
> 
> I have fixed the tutorials in r16378 and r16379 and am in the process of
> rebuilding them for the website.  I am sorry for the errors in the
> tutorials.

Oops, I forgot my reference:

[1] http://www.mlpack.org/doxygen.php?doc=rstutorial.html

-- 
Ryan Curtin    | "I can't believe you like money too.  We should
ryan at ratml.org | hang out."  - Frito



More information about the mlpack mailing list