Decision Trees (Small Spec-Only Baseline) #
This file is small on purpose: it provides a pure decision tree datatype and an evaluator. It is a standalone baseline and does not use the tensor/module APIs.
Why include it here?
- It serves as a non-neural "sanity check" baseline for experiments (e.g. mixed pipelines).
- The datatype is small enough to be convenient in proofs or examples without pulling in tensor machinery.
If you're thinking in the Python ecosystem: this is not an nn.Module-style component. It is
closer to a symbolic scikit-learn style decision tree, except we keep it fully pure and explicit.
References / analogies:
- Breiman, Friedman, Olshen, Stone, "Classification and Regression Trees" (CART), 1984.
- Quinlan, "Induction of Decision Trees" (ID3), 1986; and "C4.5: Programs for Machine Learning", 1993.
- scikit-learn user guide (for intuition, not semantics): https://scikit-learn.org/stable/modules/tree.html
A small decision tree datatype (spec-only baseline).
node feature left right branches on decisionFn feature.
- leaf {α : Type} (value : α) : DecisionTree α
- node {α : Type} (feature : String) (left right : DecisionTree α) : DecisionTree α