Practical overview
When it fits
Use River when a model should learn from new observations as they arrive, or when an event-based workflow and changing data patterns make incremental learning useful. Batch learning may be a better fit when continual updates are unnecessary.
Who it is for
- Python developers building machine-learning workflows around continuously arriving records.
- Teams that want models to learn incrementally without revisiting all prior data.
- Practitioners addressing streams where the relationship between data and outcomes may shift over time.
Documented uses
- Predict outcomes for incoming individual records and update a model from new observations.
- Build online classification, anomaly-detection, forecasting or clustering workflows.
- Track online model performance with metrics and progressive validation.
- Add online preprocessing and pipeline components to a streaming-learning workflow.
Requirements & limits
Open-source Python library under the BSD-3-Clause license. The project specifies Python 3.11 or later and documents pip installation; wheels are listed for Linux, macOS and Windows.
- The core online interface does not depend on pandas; mini-batch methods use pandas and are installed as an optional extra.
- The project emphasizes clarity and usability over performance, while describing single-sample processing as fast.
- Online learning is useful when data arrives incrementally or concept drift matters; the project notes that batch learning is sufficient for many cases.
- A GitHub development-version install requires Cython and Rust.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Install River for single-observation learning
Set up the library for Python-based online prediction and model updates.
Before you start
- Python 3.11 or later
- pip
Steps
Install the package with the command below.
pip install riverIn a Python workflow, use River’s
predict_oneandlearn_oneinterfaces to predict from and update with individual observations.
Expected outcome
River is installed for a single-observation online-learning workflow; the core interfaces do not require pandas.
Guide limitations
- The installation step alone does not configure a dataset, model, or production data pipeline.
- Mini-batch interfaces require the opt-in pandas extra.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 10 October 2026
- Original website title
- online-ml/river · Official homepage title · retained in its source language

