MerQuR+Statistics Glossary

Statistics Glossary → Maximum tree depth

Maximum tree depthconcept

The maximum number of levels of splits allowed from the root to the furthest leaf of a decision tree; a hyperparameter that limits the tree's complexity.

Each split divides the data into smaller subgroups. As depth grows, the tree can capture finer detail and higher-order interactions: a tree of depth d can represent interactions among at most d variables. But a deep tree, splitting until very few observations remain in each leaf, also learns the noise in the data and performs poorly on new data (overfitting), while a shallow tree may miss important structure (underfitting).

The appropriate depth depends on the method. For a single decision tree, depth is usually chosen by cross-validation together with pruning or a minimum leaf size. In a random forest the trees are typically grown deep (even unlimited), because averaging many trees reduces the high variance of the individual trees. Gradient boosting usually uses shallow trees (depth 3-8); each tree corrects only a small part of the previous errors.

An everyday example

In a guessing game, one player tries to find the animal the other has in mind with yes-no questions. With at most 3 questions only rough groups can be told apart (mammal? large? domestic?), while 20 questions allow very fine distinctions. But a 20-question rule list built on the coincidences of a single game may not work in new games.

In MerQur

'Maximum depth' in Random Forest and Decision Tree (0 = unlimited in Random Forest); tree depth is also set in Gradient Boosting.

Analyses where this concept appears

Random ForestGradient BoostingDecision Tree (CART)

Related concepts

Minimum leaf / node sizeTree pruning and the complexity parameter (cp)