Extra Trees

Machine Learning
Introduced by
Geurts, P.; Ernst, D.; Wehenkel, L.
Year
2006
Type
Ensemble (extremely randomized decision trees)
Family
Machine learning

What does it do?

Extra Trees (Extremely Randomized Trees), introduced by Geurts, Ernst, and Wehenkel in 2006, is an ensemble of decision trees that extends Random Forest with more randomisation.

At each node, candidate split thresholds are drawn at random rather than optimised, and predictions from many such trees are averaged. The method is intended to train faster than Random Forest. Its accuracy relative to Random Forest depends on the dataset and should be checked by cross-validation.

The intuition behind the method

Random Forest already decorrelates its trees by sampling a random subset of features at each split, but it still searches for the best threshold among those features. Extra Trees goes one step further: for each candidate feature it draws a threshold at random instead of optimising it. Individual trees become weaker, but because they are less correlated with one another, averaging them cancels more of the variance. The cost of any single poor split is diluted across many trees, and skipping the threshold search is what makes training faster.

History

Extra Trees was proposed by Pierre Geurts, Damien Ernst, and Louis Wehenkel in a 2006 paper in Machine Learning, which introduced fully random split thresholds as an alternative to optimised cut-points. Implementations are available under names such as ExtraTreesClassifier and ExtraTreesRegressor.

When to use it

Use Extra Trees when you need fast training and reasonable accuracy on tabular data with continuous features (categorical features need numerical encoding first), and when training time is a practical constraint. It is a reasonable alternative to Random Forest when training speed matters and the data are reasonably clean; where informative cut-points are important, compare the two by cross-validation. Prefer Random Forest if you need a built-in out-of-bag estimate, or gradient boosting if you want to push accuracy further and can afford tuning. Avoid it for very small datasets, where a simpler model such as logistic regression or a single decision tree is easier to validate and to interpret. It is also a poor choice when coefficients or effect sizes must be reported.

Limitations and considerations

  • There is no built-in out-of-bag estimate (unlike Random Forest), so cross-validation is required for an unbiased error assessment.
  • Random thresholds can reduce accuracy when informative cut-points matter, because the ensemble may never propose them; check against Random Forest on your data.
  • Black-box: it provides no explicit coefficients, which limits interpretability for audiences that expect effect sizes.
  • Memory use grows with the number of trees and with tree depth, since full-depth trees are stored in the ensemble.

Source conditions do not replace independent scientific review or validation by an analysis engine.

Strengths

  • Training is typically faster than Random Forest in the usual setting, because no optimal threshold is searched for at each candidate feature.
  • The trees are more randomised and therefore less correlated, so averaging them can reduce variance strongly. Accuracy can be competitive with Random Forest on some tabular problems, though this must be checked on the data at hand.
  • Makes no distributional or linearity assumptions about the features, so nonlinear interactions can be captured; categorical variables usually need numerical encoding before fitting in common implementations.
  • Provides impurity-based feature importances for ranking variables, subject to the caveats listed under pitfalls.

Applications

  • Classification and regression on tabular data where training time is a constraint.
  • Exploratory ranking of features by importance, read with the caveats above.
  • A fast ensemble baseline to compare against Random Forest and gradient boosting.
  • Hyperparameter searches in which many models must be fitted repeatedly.

How it works

How it works

1

Unlike Random Forest, Extra Trees by default trains each tree on the entire training set rather than a bootstrap sample. Because there is no bootstrap resampling, there is no built-in out-of-bag set, so cross-validation is needed for an honest error estimate.

2

At each internal node, a random subset of features is drawn. For each candidate feature, a split threshold is sampled at random from the observed range of its values; no optimal cut-point is searched for. The best-scoring feature-threshold pair (for example by Gini impurity reduction) is then chosen, but only among these random candidates. The number of candidate features per split (max_features in scikit-learn) controls how random the trees are: fewer candidates means more randomisation and more diverse trees.

3

Trees are grown to full depth by default, so leaves are as pure as the training data allow. Individual full-depth trees have high variance, but the randomised splits make them diverse, and averaging across the ensemble is what brings the variance down.

4

Predictions from all trees are combined. For regression, the mean of the tree outputs is used. For classification, the trees' class predictions are aggregated and the most supported class is returned; implementations may differ in whether they count votes or average class probabilities, so check the documentation of the library you use. Because the trees are diverse, their individual errors tend to partly cancel, which usually makes the ensemble more stable than any single tree.

Formula
\hat{y} = \text{mode/mean of } T \text{ trees}

Common pitfalls

  • Skipping cross-validation and relying on in-sample accuracy, since no out-of-bag estimate is produced by default.
  • Ignoring class imbalance; address it with class weighting or resampling before fitting, otherwise the majority class can dominate the random splits and the vote.
  • Reporting only accuracy without complementary metrics such as F1, AUC, or RMSE, depending on the task.
  • Treating impurity-based importance rankings as stable without checking them across random seeds, and without accounting for the known tendency of impurity importances to favour features with many distinct values.

Frequently asked questions

How does Extra Trees differ from Random Forest?

Both are ensembles of decision trees that consider a random subset of features at each split. Extra Trees additionally draws split thresholds at random rather than optimising them, and by default trains each tree on the full training set rather than a bootstrap sample. This makes training faster and is intended to produce more diverse, less correlated trees.

Which should I prefer, Extra Trees or Random Forest?

When training speed matters or the data are relatively clean, Extra Trees can be competitive with Random Forest at lower computational cost. If you need a built-in out-of-bag estimate, or your data are noisy enough that well-chosen thresholds matter, Random Forest is the safer choice.

How many trees do I need?

Increase the number of trees until performance stabilises on a validation set or across cross-validation folds. More trees improve stability but increase memory use and prediction latency.

Does Extra Trees overfit?

Individual trees are grown to full depth and can overfit in isolation, but averaging across the ensemble strongly reduces variance. Overfitting of the full ensemble is generally less of a concern, though it can still occur on very small datasets with many features.

How do I assess model performance without an OOB set?

Use k-fold cross-validation, typically with 5 or 10 folds. Evaluate classification tasks with accuracy, F1, and AUC, and regression tasks with RMSE and R-squared.

Related methods

Sources

  1. Geurts, P., Ernst, D. & Wehenkel, L. (2006). Extremely randomized trees. Machine Learning, 63(1), 3–42.

    Open DOI reference
  2. Extra-Trees. Wikipedia.

    Open publication reference