Repository navigation
Conversation
This is the first step in making base tree "regressor" be used by all the tree classifiers. Next step is to make the implementation generic over the used Criterion with callers deciding it. Add a Criterion trait with MSE and Gini implementations in src/tree/criterion.rs. Use MeanStats in BaseTreeRegressor in place of explicit sum/mass bookkeeping. - Store node stats in NodeVisitor; remove true/false_child_output - Keep scratch stats in SplitWorkspace to avoid new allocations - Rank splits by proxy improvement; store the real impurity improvement in split_score - Pass the sample count to find_best_cutoff and check min_samples_split at the caller
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #492 +/- ##
===========================================
+ Coverage 43.97% 85.72% +41.75%
===========================================
Files 85 97 +12
Lines 7281 9411 +2130
===========================================
+ Hits 3202 8068 +4866
+ Misses 4079 1343 -2736 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Thanks @slievens. Centralising the sufficient statistics in one place is a good direction, and recomputing child leaf values from Process
Possible behaviour changes in
Tests and evidence
Design
Happy to re-review after the retarget and the empty-range fix. |
|
Thanks @slievens, moving the regressor onto a Possible behaviour changes (please verify)
Tests
Scope and project conventions
Nits
Happy to re-review once 1 and 2 are clarified. |
This is the first step in making base tree "regressor" be used by all the tree classifiers. Next step is to make the implementation generic over the used Criterion with callers deciding it.
Add a Criterion trait with MSE and Gini implementations in src/tree/criterion.rs. Use MeanStats in BaseTreeRegressor in place of explicit sum/mass bookkeeping.
Fixes #491
Checklist
Current behaviour
BaseTreeRegressor has hardcoded MSE stats.
New expected behaviour
BaseTreeRegressor uses a MSECriterion.
Change logs
Added