Github user orhankislal commented on a diff in the pull request:

    https://github.com/apache/incubator-madlib/pull/142#discussion_r123855465
  
    --- Diff: src/modules/recursive_partitioning/DT_impl.hpp ---
    @@ -446,21 +446,20 @@ DecisionTree<Container>::updatePrimarySplit(
         predictions.row(falseChild(node_index)) = false_stats;
     
         // true_stats and false_stats only include the tuples for which the 
primary
    -    // split is NULL. The number of tuples in these stats need to be 
stored to
    +    // split is not NULL. The number of tuples in these stats need to be 
stored to
         // compute a majority branch during surrogate training.
         uint64_t true_count = statCount(true_stats);
         uint64_t false_count = statCount(false_stats);
    -    nonnull_split_count(node_index*2) = static_cast<double>(true_count);
    -    nonnull_split_count(node_index*2 + 1) = 
static_cast<double>(false_count);
    -
    -    // current node's children won't split if,
    -    // 1. children are pure (responses are too similar to split further)
    -    // 2. children are too small to split further (count < min_split)
    -    bool children_wont_split = (isChildPure(true_stats) &&
    -                                isChildPure(false_stats) &&
    -                                true_count < min_split &&
    -                                false_count < min_split
    -                                );
    +    nonnull_split_count(trueChild(node_index)) = 
static_cast<double>(true_count);
    +    nonnull_split_count(falseChild(node_index)) = 
static_cast<double>(false_count);
    +
    +    // current node's child won't split if,
    +    // 1. child is pure (responses are too similar to split further) OR
    --- End diff --
    
    Thanks, I agree that this makes more sense.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to