Follow-up to #464 (off-by-one fix in the tree growth loop).
Two gaps in the current coverage:
- No regression test for the
min_samples_split boundary. A small test with min_samples_split: 3 and a node of exactly 3 samples would explicitly pin the fixed n >= min_samples_split split rule (n < min_samples_split in find_best_cutoff). The inverse case (min_samples_split: 4, 3 samples) should stay a single leaf.
tree.depth() on the classifier is unverified. The full_depth test asserts nodes().len() == 7 and accuracy, but not tree.depth() == 3. Since pub fn depth() is public API and the loop no longer drives the depth counter directly, an explicit assertion would guard against silent regressions.
Not a blocker for #464, but worth a follow-up. Proposed in the same PR as a patch version bump; library code is unchanged.
Follow-up to #464 (off-by-one fix in the tree growth loop).
Two gaps in the current coverage:
min_samples_splitboundary. A small test withmin_samples_split: 3and a node of exactly 3 samples would explicitly pin the fixedn >= min_samples_splitsplit rule (n < min_samples_splitinfind_best_cutoff). The inverse case (min_samples_split: 4, 3 samples) should stay a single leaf.tree.depth()on the classifier is unverified. Thefull_depthtest assertsnodes().len() == 7and accuracy, but nottree.depth() == 3. Sincepub fn depth()is public API and the loop no longer drives the depth counter directly, an explicit assertion would guard against silent regressions.Not a blocker for #464, but worth a follow-up. Proposed in the same PR as a patch version bump; library code is unchanged.