Skip to content

Commit cfe6743

Browse files
committed
Fix bug: do not stop if is not end leaf
1 parent 1a89dd5 commit cfe6743

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/lib/rpf_purify_anova.cpp

+5-5
Original file line numberDiff line numberDiff line change
@@ -427,16 +427,16 @@ void RandomPlantedForest::purify_2()
427427
int dim_idx = 0;
428428
for (int dim = 1; dim <= feature_size; ++dim) {
429429
const int gp = grid_point[dim_idx];
430-
if (gp >= lim_list[dim-1].size()-1){
431-
not_end_leaf = false;
432-
break;
433-
}
434430

435431
double lower, upper;
436432
if (tree_dims.count(dim) == 0) {
437433
lower = lower_bounds[dim-1];
438434
upper = upper_bounds[dim-1];
439435
} else {
436+
if (gp >= lim_list[dim-1].size()-1){
437+
not_end_leaf = false;
438+
break;
439+
}
440440
lower = lim_list[dim-1][gp];
441441
upper = lim_list[dim-1][gp + 1];
442442
++dim_idx;
@@ -453,5 +453,5 @@ void RandomPlantedForest::purify_2()
453453
}
454454
}
455455

456-
purified = true; // debug
456+
purified = false; // debug
457457
}

0 commit comments

Comments
 (0)