<p>I see, you are right that if we expand the bound to contain all of the child bounds, we end up with this situation.  Perhaps that behavior is useful.  But at the same time, for <code>MaxDistance()</code> (single-tree), I realized that we only require the maximum possible distance between the given point and any descendant points of the node.  So I commented out the code you referenced and re-ran single tree search and got the following results:</p>

<pre><code>$ bin/mlpack_knn -r ~/datasets/corel.csv -v -k 3 -t vp -d d-vp.csv -n n-vp.csv --single
[INFO ] 53753034 node combinations were scored.
[INFO ] 301691470 base cases were calculated.
</code></pre>

<p>The results are still correct, and it runs faster, but we are still an order of magnitude off of kd-trees with the base cases (kd-trees do about 16.3M base cases with single-tree search).  It seems like this does not affect any test results either, so I think this is a valid change.  It might be worth noting somewhere, maybe as something new in TreeTraits or something, that the vantage point tree is not guaranteed to be such that the child HollowBallBounds are entirely contained within the parent HollowBallBounds---but it is always true that all descendant points of a node are contained within the bound (that is a required property of space trees in general).</p>

<p>Do you think this is a valid change to make?  And maybe there is somewhere I overlooked where it is possible to make the balls even tighter than just the bit I commented out?</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">&mdash;<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/mlpack/mlpack/pull/708#issuecomment-235342439">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AJ4bFKH9mfNn-JtLJ6Qr7ly1I6hCR2umks5qZkOmgaJpZM4I_COp">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AJ4bFAmbuiYvB4Pz39Dpi7B6CP-CegW3ks5qZkOmgaJpZM4I_COp.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
  <link itemprop="url" href="https://github.com/mlpack/mlpack/pull/708#issuecomment-235342439"></link>
  <meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>