← all repositories
online-ml/river

Python online ML that admits batch learning usually wins

River exists to make online machine learning on streaming data feel familiar, even though its own authors admit most practitioners should just stick to batch learning.

5.9k stars Python ML Frameworks
river
Not currently ranked — collecting fresh signals.
star history

What it does

River handles machine learning on data that arrives continuously rather than in static chunks. It trains models one sample at a time via learn_one and predict_one, covering everything from linear models and random forests to anomaly detection, recommender systems, and time-series forecasting. The project is a merger of the earlier creme and scikit-multiflow libraries.

The interesting bit

The maintainers are refreshingly blunt: they tell you to question whether you need online ML at all, because most of the time batch learning is fine. That self-awareness permeates the design, which prioritizes clarity and user experience over benchmark-chasing speed. The API also cleanly separates a pandas-free core for pure streaming from an opt-in mini-batch layer.

Key highlights

  • Broad algorithmic coverage: decision trees, bandits, drift detection, clustering, factorization machines, active learning, and more.
  • Built-in streaming utilities including online preprocessing, feature extraction, progressive validation, and concept-drift monitoring.
  • Core interface has no pandas dependency; mini-batch support is opt-in.
  • Published in JMLR with an active public roadmap and BSD-3 licensing.

Caveats

  • Requires Python 3.11 or newer.
  • The authors explicitly prioritize clarity over raw performance, though they claim it is very fast at single-sample processing.

Verdict

Grab River if your production pipeline demands event-driven updates and resilience to shifting data distributions. If you are doing standard offline analysis on fixed datasets, the authors themselves suggest staying with batch tools.

Frequently asked

What is online-ml/river?
River exists to make online machine learning on streaming data feel familiar, even though its own authors admit most practitioners should just stick to batch learning.
Is river open source?
Yes — online-ml/river is open source, released under the BSD-3-Clause license.
What language is river written in?
online-ml/river is primarily written in Python.
How popular is river?
online-ml/river has 5.9k stars on GitHub.
Where can I find river?
online-ml/river is on GitHub at https://github.com/online-ml/river.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.