Mostly updated for clarity (using "return" keyword when a pruning condition is met, rather than just skipping over the splitting code).
But also fixed a minor bug: The previous code incremented the leaf counter too soon (i.e. there was a possibility it would get incremented even if we ended up pruning because one side of the split had zero observations).
Mostly updated for clarity (using "return" keyword when a pruning condition is met, rather than just skipping over the splitting code).
But also fixed a minor bug: The previous code incremented the leaf counter too soon (i.e. there was a possibility it would get incremented even if we ended up pruning because one side of the split had zero observations).