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

lozhnikov notifications at github.com
Wed Jun 29 17:22:15 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;

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 `Split(Non)LeafNode()`
`  assert(cutAxis < tree->Bound().Dim());`
Maybe an exception is better, how do you think?

---
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#r69030567
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.cc.gatech.edu/pipermail/mlpack-git/attachments/20160629/af0bca3a/attachment-0001.html>


More information about the mlpack-git mailing list