Expand description
DecisionTreeLearner — ID3/C4.5-style decision tree with training, prediction, feature importance, pruning, and rich statistics.
§Design
- Recursive binary splitting on continuous features.
- Configurable split criterion: Shannon Entropy (ID3), Gini impurity, or Misclassification rate.
- Optional feature sub-sampling per split node (random forests style), driven by a pure-Rust xorshift64 PRNG — no external crate required.
- Post-training leaf pruning (
prune) to collapse subtrees where both descendant leaves are minority-dominated. - Bounded training-history ring-buffer (
VecDequecapped at 100 records). - All operations are
no_std-compatible except forHashMap/VecDeque.
Structs§
- Decision
Tree Learner - ID3/C4.5-style decision tree learner.
- DtlLearner
Config - Hyper-parameters controlling tree growth and prediction.
- DtlLearner
Stats - Summary statistics produced by
DecisionTreeLearner::learner_stats. - DtlPrediction
- Prediction result from
DecisionTreeLearner::predict. - DtlSample
- One labeled training / prediction example.
- DtlTraining
Record - One entry in the training history ring-buffer.
Enums§
- DtlCriterion
- Split criterion for tree growing.
- DtlError
- Errors produced by
DecisionTreeLearner. - DtlNode
- Internal node of the decision tree.
Type Aliases§
- DtlDecision
Tree Learner - Alias for
DecisionTreeLearner.