A depth limit is not a split threshold
max_depth=2 and max_depth=5 before their respective fits. For the illustration, use max_depth=2. This choice demonstrates a configuration; no validation results establish that it is the better choice.Depth is measured along the longest path from the root to a leaf, counting edges. The cap limits that path; it does not require the fitted tree to reach the cap. During fitting, the training data determine which features and thresholds split the observations and what prediction each leaf supplies. Those learned choices form fitted model state. In statistical terminology they are model parameters, even though a software API may also call its configurable inputs “parameters.”
| Chosen for the learning procedure | Learned within a particular fit |
|---|---|
| A tree's maximum permitted depth | Its split features, split thresholds and leaf predictions |
| A regression's regularisation strength | Its fitted coefficients under that penalty |
| A neural network's learning-rate schedule | Its fitted weights after optimisation |
The distinction follows the procedure, not the appearance of the number. A threshold estimated by a tree's training algorithm is fitted state. A threshold manually varied to improve a strategy's validation score is a research setting being selected outside that fit. A regularisation strength can similarly be selected in an outer search while coefficients are estimated in the inner fit.
Selection consumes evidence
A frozen procedure can still refit
Suppose the intended procedure refits monthly with the selected depth cap. New observations can then change thresholds and leaf predictions while the hyperparameter remains unchanged. Freezing the procedure before final testing means fixing its permitted information, fitting schedule and selection rules. It does not require preserving the same fitted tree throughout the test.
A system may also retune on a declared schedule. If that is the intended live behaviour, specify and replay the whole tuning rule using only information available at each update. Changing the rule after inspecting final-test outcomes makes those outcomes part of development evidence.
Sources
- scikit-learn, Tuning the hyper-parameters of an estimator, §3.2: estimator settings and outer searches.
- scikit-learn, DecisionTreeRegressor:
max_depth, learned tree state and the depth definition. The candidate settings here are hypothetical. - scikit-learn, Cross-validation: evaluating estimator performance, introduction and §3.1.2.6: validation versus final testing and time-series splitting.
- Hastie, Tibshirani and Friedman, The Elements of Statistical Learning, 2nd edition, §7.2, p.222; local corrected 12th printing, January 2017: tuning parameters and model selection versus model assessment. The chronological financial procedure here additionally follows the owned lesson linked above.