[mlpack-git] [mlpack/mlpack] Spill trees (#747)

Ryan Curtin notifications at github.com
Wed Aug 17 14:54:53 EDT 2016


> +    // better, then take it.
> +    if (SortPolicy::IsBetter(queryNode.Parent()->Stat().FirstBound(),
> +        worstDistance))
> +      worstDistance = queryNode.Parent()->Stat().FirstBound();
> +  }
> +
> +  // Could the existing bounds be better?
> +  if (SortPolicy::IsBetter(queryNode.Stat().FirstBound(), worstDistance))
> +    worstDistance = queryNode.Stat().FirstBound();
> +
> +  // Cache bounds for later.
> +  queryNode.Stat().FirstBound() = worstDistance;
> +
> +  worstDistance = SortPolicy::Relax(worstDistance, epsilon);
> +
> +  return worstDistance;

Thanks!  The changes look really nice.  It seems that moving the `Score()` calculation into the defeatist traversers ties those traversers to the nearest neighbor search problem.  But, it also seems that the other PR that is open for greedy traversers introduces some new functions into the Rules classes to handle that, and once we merge the other PR we can easily refactor the defeatist traverser here and it will be abstract enough to handle any rules case again.  (...as long as that rules case can support greedy search)  What do you think?  Is that a reasonable plan?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/mlpack/mlpack/pull/747/files/fe090ee13c7cad79e2b7eb8b6690628ba3ead1ed#r75184272
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.cc.gatech.edu/pipermail/mlpack-git/attachments/20160817/2c450cfd/attachment.html>


More information about the mlpack-git mailing list