online-ml/river

🌊 Online machine learning in Python

What it solves

River solves the problem of training machine learning models on streaming data. Unlike traditional batch learning, where a model is trained on a fixed dataset, River allows models to learn from new data points one by one, eliminating the need to revisit past data and making the system robust to concept drift (changes in the underlying data distribution over time).

How it works

River implements a streaming interface where predictions and model updates occur sequentially. It provides a learn_one and predict_one pattern, allowing the model to process a single sample at a time. It also supports an optional mini-batch interface (learn_many, predict_many) via pandas for those who need it.

Who it’s for

It is designed for developers and data scientists who need to build models for event-based production contexts or who are working with data that evolves over time and

Highlights

  • Diverse Algorithm Suite: Includes linear models, decision trees, random forests, anomaly detection, drift detection, and recommender systems.
  • Creme and Scikit-Multiflow Merger: Combines the capabilities of two established online ML libraries.
  • Comprehensive Tooling: Provides online statistics, preprocessing, feature extraction, and progressive model validation.
  • User-Friendly API: Focuses on clarity and ease of use, integrating smoothly with the Python ecosystem.

Related

  • Project
  • Project
  • Project
  • Project
  • Project