[mlpack-git] [mlpack/mlpack] R+ and R++ trees implementation (#699)

Ryan Curtin notifications at github.com
Wed Jun 29 18:18:06 EDT 2016


> +    SweepCostType cost;
> +
> +    if (node->IsLeaf())
> +      cost = SweepType<SplitPolicyType>::SweepLeafNode(k, node, cut);
> +    else
> +      cost = SweepType<SplitPolicyType>::SweepNonLeafNode(k, node, cut);
> +    
> +
> +    if (cost < minCost)
> +    {
> +      minCost = cost;
> +      minCutAxis = k;
> +      minCut = cut;      
> +    }
> +  }
> +  return true;

But I think I can produce that behavior for the R++ tree if all the points are 0 in all dimensions. Then `SplitLeafNode()` in every dimension will be `SIZE_MAX`. I think a similar thing will happen for non-leaf nodes or for the R+ tree.

I guess in that type of situation, when we cannot split the node, we have to either raise the maximum number of points in each node, or throw an exception. I'd probably lean towards the latter, with a line of output to `Log::Warn` in order to warn the user.

---
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/699/files/e165d759f9ae612b9965f70fbbf8abdb19dc8d07#r69038826
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.cc.gatech.edu/pipermail/mlpack-git/attachments/20160629/12171c7a/attachment.html>


More information about the mlpack-git mailing list