<p>In <a href="https://github.com/mlpack/mlpack/pull/699#discussion_r69030567">src/mlpack/core/tree/rectangle_tree/r_plus_tree_split_impl.hpp</a>:</p>
<pre style='color:#555'>&gt; +    SweepCostType cost;
&gt; +
&gt; +    if (node-&gt;IsLeaf())
&gt; +      cost = SweepType&lt;SplitPolicyType&gt;::SweepLeafNode(k, node, cut);
&gt; +    else
&gt; +      cost = SweepType&lt;SplitPolicyType&gt;::SweepNonLeafNode(k, node, cut);
&gt; +    
&gt; +
&gt; +    if (cost &lt; minCost)
&gt; +    {
&gt; +      minCost = cost;
&gt; +      minCutAxis = k;
&gt; +      minCut = cut;      
&gt; +    }
&gt; +  }
&gt; +  return true;
</pre>
<p>This is not a normal behavior. The R++ tree paper states that this will never happen. But the R++ proof is invalid for the R+ tree. I added an assertion in <code>Split(Non)LeafNode()</code><br>
<code>assert(cutAxis &lt; tree-&gt;Bound().Dim());</code><br>
Maybe an exception is better, how do you think?</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/699/files/e165d759f9ae612b9965f70fbbf8abdb19dc8d07#r69030567">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe/AJ4bFJxdmYYUjFQYygM3I-j5hBfJC72Cks5qQuIHgaJpZM4I3ATw">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AJ4bFMkOtU4fGt4PFmaMpdr5HeQJx583ks5qQuIHgaJpZM4I3ATw.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/699/files/e165d759f9ae612b9965f70fbbf8abdb19dc8d07#r69030567"></link>
  <meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>