Machine learningMachine learningMachine learningAlgorithm

Online Random Forest

Also known as: ORF, streaming random forest, incremental random forest, adaptive random forest

OriginatorSaffari, A. et al.Year2009Sources2Related methods14

Online Random Forest (ORF) extends the classic Random Forest to streaming settings, updating each tree incrementally as new observations arrive without storing or replaying the full training set. Algorithms such as Adaptive Random Forests (ARF) add drift detection so the ensemble adapts when the data distribution changes over time.

Key highlights

  • Learns from streaming data with constant memory per tree, independent of stream length.
  • Adapts to concept drift when paired with drift-detection mechanisms such as ADWIN.
  • Inherits the variance-reduction benefits of ensemble aggregation even in an online setting.
  • Provides usable predictions from the first few observations, improving over time.
  • No need to store or replay the full historical dataset.

Intuition

This section is available to Pro members. Upgrade to Pro

How it works

This section is available to Pro members. Upgrade to Pro

When to use it

Use Online Random Forest when data arrives continuously or in large batches that cannot be held in memory, when concept drift is plausible (e.g., financial streams, sensor networks, user behaviour logs), or when low-latency predictions are required before the full dataset is available. It is also a natural fit for applications where labelled data trickles in over time. Avoid it when the full dataset fits comfortably in memory and retraining is affordable — in that case a standard Random Forest trained offline will typically be more accurate and simpler to validate. Avoid it also when you need stable, reproducible feature-importance rankings, as online forests produce less stable importance estimates than their batch counterparts.

Strengths & limitations

Strengths
  • Learns from streaming data with constant memory per tree, independent of stream length.
  • Adapts to concept drift when paired with drift-detection mechanisms such as ADWIN.
  • Inherits the variance-reduction benefits of ensemble aggregation even in an online setting.
  • Provides usable predictions from the first few observations, improving over time.
  • No need to store or replay the full historical dataset.
Limitations
  • Split decisions made early with sparse data can be sub-optimal and hard to revise.
  • Feature-importance estimates are less stable than in batch Random Forest.
  • Hyperparameter tuning (number of trees, drift-detection thresholds) is more complex in a streaming context.
  • Evaluation requires dedicated stream-based protocols (prequential/test-then-train) that differ from standard cross-validation.

Common pitfalls

This section is available to Pro members. Upgrade to Pro

Applications

This section is available to Pro members. Upgrade to Pro

Frequently asked

How does Online Random Forest differ from standard Random Forest?

Standard Random Forest trains all trees at once on the full dataset using bootstrap sampling. Online Random Forest replaces batch bootstrap with Poisson-weighted online bagging, updates tree splits incrementally as each observation arrives, and optionally detects and adapts to concept drift — all without storing past data.

What is the Poisson weighting trick?

Each incoming example is shown to each tree k times, where k is drawn from Poisson(1). Because the expected value of k is 1, and k = 0 with probability ~37%, this statistically approximates the bootstrap process (sampling with replacement) without needing the full dataset in memory.

How should I evaluate an online random forest?

Use the prequential (test-then-train) protocol: for each incoming observation, first predict with the current model, record the error, then update the model. This gives an unbiased, temporally ordered estimate of predictive performance without data leakage.

When should I add drift detection?

Whenever the data-generating process is likely to change over time — for example, user preferences, financial markets, or mechanical systems that wear. Without drift detection, stale trees accumulate and drag down ensemble accuracy. ADWIN is a common, well-tested choice.

Is Adaptive Random Forest the same thing?

ARF is the most widely adopted variant of Online Random Forest. It combines online bagging, random feature selection, and per-tree ADWIN drift detection, and is available in the MOA and scikit-multiflow/River libraries. The term 'Online Random Forest' often refers generically to the family; ARF is a specific, highly recommended implementation.

Sources

  1. 1.
    Saffari, A., Leistner, C., Santner, J., Godec, M., & Bischof, H. (2009). On-line random forests. In Proceedings of the 3rd IEEE International Workshop on On-Line Learning for Computer Vision (OLCV 2009), pp. 1–8. IEEE.
  2. 2.
    Gomes, H. M., Bifet, A., Read, J., Barddal, J. P., Enembreck, F., Pfharinger, B., Holmes, G., & Abdessalem, T. (2017). Adaptive random forests for evolving data stream classification. Machine Learning, 106(9), 1469–1495.

You have read it. What now?

Cite this page

ScholarGate. (2026, June 3). Online Random Forest. ScholarGate. https://scholargate.app/machine-learning/online-random-forest

Online Random Forest | ScholarGate