[mlpack-git] master: A smarter splitting criteria that works right. (7a5ef89)

gitdub at big.cc.gt.atl.ga.us gitdub at big.cc.gt.atl.ga.us
Wed Dec 23 11:46:36 EST 2015


Repository : https://github.com/mlpack/mlpack

On branch  : master
Link       : https://github.com/mlpack/mlpack/compare/de9cc4b05069e1fa4793d9355f2f595af5ff45d2...6070527af14296cd99739de6c62666cc5d2a2125

>---------------------------------------------------------------

commit 7a5ef899e52edfa61f3ee5cbbc5361771310a810
Author: Ryan Curtin <ryan at ratml.org>
Date:   Mon Nov 23 14:11:09 2015 -0800

    A smarter splitting criteria that works right.


>---------------------------------------------------------------

7a5ef899e52edfa61f3ee5cbbc5361771310a810
 src/mlpack/methods/hoeffding_trees/hoeffding_tree_impl.hpp | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/mlpack/methods/hoeffding_trees/hoeffding_tree_impl.hpp b/src/mlpack/methods/hoeffding_trees/hoeffding_tree_impl.hpp
index ce0164c..e94c04d 100644
--- a/src/mlpack/methods/hoeffding_trees/hoeffding_tree_impl.hpp
+++ b/src/mlpack/methods/hoeffding_trees/hoeffding_tree_impl.hpp
@@ -374,8 +374,9 @@ size_t HoeffdingTree<
   }
 
   // Are these far enough apart to split?
-  if ((largest - secondLargest > epsilon) ||
-      ((numSamples > maxSamples) && (largest > 0.0)))
+  if ((largest > 0.0) &&
+      ((largest - secondLargest > epsilon) || (numSamples > maxSamples) ||
+       (epsilon <= 0.05)))
   {
     // Split!
     splitDimension = largestIndex;



More information about the mlpack-git mailing list