Skip to content

Commit

Permalink
Merge pull request #2 from JohnZed/enh-rf-acc-test
Browse files Browse the repository at this point in the history
[WIP] Hack that makes accuracy tests (including python level) start passing
  • Loading branch information
teju85 authored Mar 6, 2020
2 parents dbec815 + 5930a5d commit 2398251
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cpp/src/decisiontree/levelalgo/levelhelper_classifier.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,10 @@ void leaf_eval_classification(
sparse_nodelist.clear();

int non_leaf_counter = 0;
bool condition_global = (curr_depth == max_depth);
// XXX: This line fixes the inaccuracy in max_depth==1 tree leaf predictions
// I still don't fully understand its role, but it seems interesting
bool condition_global =
curr_depth >= max_depth - 1; // XXX removed: (curr_depth == max_depth);
if (max_leaves != -1)
condition_global = condition_global || (tree_leaf_cnt >= max_leaves);

Expand Down

0 comments on commit 2398251

Please sign in to comment.