Python wrapper for MOA to allow efficient use of existing algorithms with a more modern API.
Project description
CapyMOA
CapyMOA does efficient machine learning for data streams in Python. A data stream is a sequences of items ariving one-by-one that is too large to efficiently process non-sequentially. CapyMOA is a toolbox of methods and evaluators for: classification, regression, clustering, anomaly detection, semi-supervised learning, online continual learning, and drift detection for data streams.
For the default PyTorch CUDA GPU installation, run:
pip install capymoa
Refer to the Setup guide for other options, including CPU-only and dev dependencies.
from capymoa.datasets import Electricity
from capymoa.classifier import HoeffdingTree
from capymoa.evaluation import prequential_evaluation
# 1. Load a streaming dataset
stream = Electricity()
# 2. Create a machine learning model
model = HoeffdingTree(stream.get_schema())
# 3. Run with test-then-train evaluation
results = prequential_evaluation(stream, model)
# 3. Success!
print(f"Accuracy: {results.accuracy():.2f}%")
Next, we recomend the Tutorials.
⚠️ WARNING
CapyMOA is still in the early stages of development. The API is subject to change until version 1.0.0. If you encounter any issues, please report them in GitHub Issues or talk to us on Discord.
Benchmark comparing CapyMOA against other data stream libraries. The benchmark
was performed using an ensemble of 100 ARF learners trained on
capymoa.datasets.RTG_2abrupt dataset containing 100,000 samples and 30
features. You can find the code to reproduce this benchmark in
notebooks/benchmarking.py.
CapyMOA has the speed of MOA with the flexibility of Python and the richness of
Python's data science ecosystem.
Cite Us
If you use CapyMOA in your research, please cite us using the following BibTeX item.
@misc{
gomes2025capymoaefficientmachinelearning,
title={{CapyMOA}: Efficient Machine Learning for Data Streams in Python},
author={Heitor Murilo Gomes and Anton Lee and Nuwan Gunasekara and Yibin Sun and Guilherme Weigert Cassales and Justin Jia Liu and Marco Heyden and Vitor Cerqueira and Maroua Bahri and Yun Sing Koh and Bernhard Pfahringer and Albert Bifet},
year={2025},
eprint={2502.07432},
archivePrefix={arXiv},
primaryClass={cs.LG},
url={https://arxiv.org/abs/2502.07432},
}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file capymoa-0.13.0.tar.gz.
File metadata
- Download URL: capymoa-0.13.0.tar.gz
- Upload date:
- Size: 61.5 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
be0d1bb3c7b7e7c557fbcfcbcf27a065647156aa4735200ea8320dea86c4ce8e
|
|
| MD5 |
e5f49201cd6482909d4e891a97c06662
|
|
| BLAKE2b-256 |
39142c6280673831aba99600c08f203c99222f2dd8984d4d7846ea59eb8a2139
|
Provenance
The following attestation bundles were made for capymoa-0.13.0.tar.gz:
Publisher:
release.yml on adaptive-machine-learning/CapyMOA
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
capymoa-0.13.0.tar.gz -
Subject digest:
be0d1bb3c7b7e7c557fbcfcbcf27a065647156aa4735200ea8320dea86c4ce8e - Sigstore transparency entry: 1323811165
- Sigstore integration time:
-
Permalink:
adaptive-machine-learning/CapyMOA@ec1f50f1174a9a9f447dd8da7efe0ae89ba4eb97 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/adaptive-machine-learning
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@ec1f50f1174a9a9f447dd8da7efe0ae89ba4eb97 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file capymoa-0.13.0-py3-none-any.whl.
File metadata
- Download URL: capymoa-0.13.0-py3-none-any.whl
- Upload date:
- Size: 61.7 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
047877021cd6c75f18a8b7c5b586a7c3b1fea8d19cc880dfb6af33c358e988e7
|
|
| MD5 |
66bb5b87e73bc1c9efc0866cb7f2f3d9
|
|
| BLAKE2b-256 |
c19c1e36b347eaffc0dc6ce0871ad074c42800daea35c59ef38cf201c096c850
|
Provenance
The following attestation bundles were made for capymoa-0.13.0-py3-none-any.whl:
Publisher:
release.yml on adaptive-machine-learning/CapyMOA
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
capymoa-0.13.0-py3-none-any.whl -
Subject digest:
047877021cd6c75f18a8b7c5b586a7c3b1fea8d19cc880dfb6af33c358e988e7 - Sigstore transparency entry: 1323811317
- Sigstore integration time:
-
Permalink:
adaptive-machine-learning/CapyMOA@ec1f50f1174a9a9f447dd8da7efe0ae89ba4eb97 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/adaptive-machine-learning
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@ec1f50f1174a9a9f447dd8da7efe0ae89ba4eb97 -
Trigger Event:
workflow_dispatch
-
Statement type: