Science Score: 59.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
βCITATION.cff file
-
βcodemeta.json file
Found codemeta.json file -
β.zenodo.json file
Found .zenodo.json file -
βDOI references
Found 1 DOI reference(s) in README -
βAcademic publication links
Links to: acm.org -
βCommitters with academic emails
5 of 126 committers (4.0%) from academic institutions -
βInstitutional organization owner
-
βJOSS paper metadata
-
βScientific vocabulary similarity
Low similarity (12.3%) to scientific vocabulary
Keywords
Keywords from Contributors
Repository
π Online machine learning in Python
Basic Info
- Host: GitHub
- Owner: online-ml
- License: bsd-3-clause
- Language: Python
- Default Branch: main
- Homepage: https://riverml.xyz
- Size: 318 MB
Statistics
- Stars: 5,510
- Watchers: 83
- Forks: 591
- Open Issues: 142
- Releases: 17
Topics
Metadata Files
README.md
River is a Python library for online machine learning. It aims to be the most user-friendly library for doing machine learning on streaming data. River is the result of a merger between creme and scikit-multiflow.
Quickstart
As a quick example, we'll train a logistic regression to classify the website phishing dataset. Here's a look at the first observation in the dataset.
```python
from pprint import pprint from river import datasets
dataset = datasets.Phishing()
for x, y in dataset: ... pprint(x) ... print(y) ... break {'ageofdomain': 1, 'anchorfromotherdomain': 0.0, 'emptyserverformhandler': 0.0, 'https': 0.0, 'ipinurl': 1, 'ispopular': 0.5, 'longurl': 1.0, 'popupwindow': 0.0, 'requestfromotherdomain': 0.0} True
```
Now let's run the model on the dataset in a streaming fashion. We sequentially interleave predictions and model updates. Meanwhile, we update a performance metric to see how well the model is doing.
```python
from river import compose from river import linear_model from river import metrics from river import preprocessing
model = compose.Pipeline( ... preprocessing.StandardScaler(), ... linear_model.LogisticRegression() ... )
metric = metrics.Accuracy()
for x, y in dataset: ... ypred = model.predictone(x) # make a prediction ... metric.update(y, ypred) # update the metric ... model.learnone(x, y) # make the model learn
metric Accuracy: 89.28%
```
Of course, this is just a contrived example. We welcome you to check the introduction section of the documentation for a more thorough tutorial.
Installation
River is intended to work with Python 3.10 and above. Installation can be done with pip:
sh
pip install river
There are wheels available for Linux, MacOS, and Windows. This means you most probably won't have to build River from source.
You can install the latest development version from GitHub as so:
sh
pip install git+https://github.com/online-ml/river --upgrade
pip install git+ssh://git@github.com/online-ml/river.git --upgrade # using SSH
This method requires having Cython and Rust installed on your machine.
Features
River provides online implementations of the following family of algorithms:
- Linear models, with a wide array of optimizers
- Decision trees and random forests
- (Approximate) nearest neighbors
- Anomaly detection
- Drift detection
- Recommender systems
- Time series forecasting
- Bandits
- Factorization machines
- Imbalanced learning
- Clustering
- Bagging/boosting/stacking
- Active learning
River also provides other online utilities:
- Feature extraction and selection
- Online statistics and metrics
- Preprocessing
- Built-in datasets
- Progressive model validation
- Model pipelines
Check out the API for a comprehensive overview
Should I be using River?
You should ask yourself if you need online machine learning. The answer is likely no. Most of the time batch learning does the job just fine. An online approach might fit the bill if:
- You want a model that can learn from new data without having to revisit past data.
- You want a model which is robust to concept drift.
- You want to develop your model in a way that is closer to what occurs in a production context, which is usually event-based.
Some specificities of River are that:
- It focuses on clarity and user experience, more so than performance.
- It's very fast at processing one sample at a time. Try it, you'll see.
- It plays nicely with the rest of Python's ecosystem.
Useful links
- Documentation
- Package releases
- awesome-online-machine-learning
- 2022 presentation at GAIA
- Online Clustering: Algorithms, Evaluation, Metrics, Applications and Benchmarking from KDD'22.
Contributing
Feel free to contribute in any way you like, we're always open to new ideas and approaches.
- Open a discussion if you have any question or enquiry whatsoever. It's more useful to ask your question in public rather than sending us a private email. It's also encouraged to open a discussion before contributing, so that everyone is aligned and unnecessary work is avoided.
- Feel welcome to open an issue if you think you've spotted a bug or a performance issue.
- Our roadmap is public. Feel free to work on anything that catches your eye, or to make suggestions.
Please check out the contribution guidelines if you want to bring modifications to the code base.
Affiliations
Citation
If River has been useful to you, and you would like to cite it in a scientific publication, please refer to the paper published at JMLR:
bibtex
@article{montiel2021river,
title={River: machine learning for streaming data in Python},
author={Montiel, Jacob and Halford, Max and Mastelini, Saulo Martiello
and Bolmier, Geoffrey and Sourty, Raphael and Vaysse, Robin and Zouitine, Adil
and Gomes, Heitor Murilo and Read, Jesse and Abdessalem, Talel and others},
year={2021}
}
License
River is free and open-source software licensed under the 3-clause BSD license.
Owner
- Name: The Fellowship of Online Machine Learning
- Login: online-ml
- Kind: organization
- Website: https://maxhalford.notion.site/Friends-of-Online-Machine-Learning-8a264829ccf345a4b2627de38139ec8b
- Repositories: 8
- Profile: https://github.com/online-ml
GitHub Events
Total
- Create event: 28
- Release event: 1
- Issues event: 21
- Watch event: 406
- Delete event: 24
- Issue comment event: 120
- Push event: 90
- Pull request review comment event: 14
- Pull request review event: 28
- Pull request event: 95
- Fork event: 58
Last Year
- Create event: 28
- Release event: 1
- Issues event: 21
- Watch event: 406
- Delete event: 24
- Issue comment event: 120
- Push event: 90
- Pull request review comment event: 14
- Pull request review event: 28
- Pull request event: 95
- Fork event: 58
Committers
Last synced: 9 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| Max Halford | m****5@g****m | 1,560 |
| Jacob Montiel | j****l@g****m | 678 |
| smastelini | s****i@g****m | 284 |
| gbolmier | g****r@g****m | 134 |
| raphaelsty | r****y@g****m | 106 |
| Adil Zouitine | a****m@g****m | 75 |
| darkmyter | b****4@g****m | 52 |
| Saulo Martiello Mastelini | m****i@u****r | 50 |
| guimatsumoto | g****o@g****m | 46 |
| krifi_amine | a****4@g****m | 45 |
| garawalid | g****4@g****m | 40 |
| hoanganhngo610 | 5****0 | 29 |
| PGijsbers | p****s@t****l | 28 |
| Vaysse Robin | r****e@h****r | 28 |
| Etienne Kintzler | e****r@g****m | 27 |
| jesse | j****d@g****m | 20 |
| Γmile | 7****3 | 19 |
| Gaurav Sharma | g****9@g****m | 19 |
| AndreFCruz | a****7@g****m | 18 |
| = | = | 17 |
| Alexey C | 5****K | 16 |
| Bruno Charron | b****o@c****l | 15 |
| dependabot[bot] | 4****] | 14 |
| Cedric Kulbach | 4****c | 11 |
| Max Hauser | m****r@g****m | 10 |
| Ferdinand Mom | f****m@e****r | 10 |
| Gilberto Olimpio | g****o@g****m | 8 |
| Alban de Crevoisier | a****r@g****m | 8 |
| Buster Styren | s****n@k****e | 6 |
| Mert OZER | m****4@g****m | 6 |
| and 96 more... | ||
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 238
- Total pull requests: 276
- Average time to close issues: about 1 month
- Average time to close pull requests: 14 days
- Total issue authors: 97
- Total pull request authors: 68
- Average comments per issue: 2.82
- Average comments per pull request: 1.53
- Merged pull requests: 182
- Bot issues: 0
- Bot pull requests: 38
Past Year
- Issues: 19
- Pull requests: 78
- Average time to close issues: 17 days
- Average time to close pull requests: 14 days
- Issue authors: 14
- Pull request authors: 22
- Average comments per issue: 2.0
- Average comments per pull request: 0.99
- Merged pull requests: 33
- Bot issues: 0
- Bot pull requests: 17
Top Authors
Issue Authors
- MaxHalford (80)
- e10e3 (13)
- yolking (6)
- robme-l (6)
- cdeterman (4)
- niccolopetti (3)
- jpfeil (3)
- MarekWadinger (3)
- raul-parada (3)
- danielnowakassis (3)
- Yasmen-Wahba (3)
- gbolmier (2)
- hesamgh77 (2)
- sebasmos (2)
- qetdr (2)
Pull Request Authors
- dependabot[bot] (59)
- MaxHalford (57)
- e10e3 (43)
- smastelini (23)
- slach31 (20)
- gbolmier (13)
- Mo3ad-S (9)
- danielnowakassis (8)
- AdilZouitine (6)
- boragokbakan (5)
- MarekWadinger (5)
- mbispham (4)
- davidlpgomes (4)
- hoanganhngo610 (4)
- ColdTeapot273K (4)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 3
-
Total downloads:
- pypi 107,603 last-month
- Total docker downloads: 274
-
Total dependent packages: 26
(may contain duplicates) -
Total dependent repositories: 63
(may contain duplicates) - Total versions: 29
- Total maintainers: 1
pypi.org: river
Online machine learning in Python
- Homepage: https://riverml.xyz/
- Documentation: https://river.readthedocs.io/
- License: bsd-3-clause
-
Latest release: 0.22.0
published about 1 year ago
Rankings
Maintainers (1)
proxy.golang.org: github.com/online-ml/river
- Documentation: https://pkg.go.dev/github.com/online-ml/river#section-documentation
- License: bsd-3-clause
-
Latest release: v1.2.3
published over 3 years ago
Rankings
conda-forge.org: river
- Homepage: https://github.com/online-ml/river
- License: BSD-3-Clause
-
Latest release: 0.13.0
published over 3 years ago