Skip to main content

CapyMOA

Banner Image

PyPi Version Docker Image Version (tag) Join the Discord Documentation GitHub Coverage Status

CapyMOA does efficient machine learning for data streams in Python. A data stream is a sequence of items that arrive one by one and are too large or urgent to process offline. 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.

To install:

pip install capymoa

The deep-learning parts of CapyMOA (capymoa.ocl, capymoa.core.torch.ann, the Batch* learners) need PyTorch, which is an optional extra:

pip install capymoa[torch]

Refer to the Setup guide for other options, including CPU-only PyTorch 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)

# 4. Success!
print(f"Accuracy: {results.accuracy():.2f}%")

Next, we recommend 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 Image Benchmark comparing CapyMOA against other data stream libraries. The benchmark was performed using an ensemble of 100 ARF learners trained on the capymoa.datasets.RTG_2abrupt dataset containing 100,000 samples and 30 features. You can find the code to reproduce this benchmark in benchmarks/README.md, with the runnable script at benchmarks/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{gomes2025,
  title={{CapyMOA}: Efficient Machine Learning for Data Streams and Online Continual Learning 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}
}

Release files for capymoa 0.15.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for capymoa 0.15.1
File Size Uploaded
capymoa-0.15.1.tar.gz 62.2 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for capymoa 0.15.1
File Interpreter ABI Platform
capymoa-0.15.1-py3-none-any.whl Python 3 none any Details

Total release size: 124.7 MB

Release files / capymoa-0.15.1.tar.gz

Download URL capymoa-0.15.1.tar.gz
Size 62.2 MB
Tags Source
SHA-256 checksum
How to use checksums
f21dd055e933b57533e4287c6866acde54fa799dcb3d54224e341b38b4bd1998
BLAKE2b-256 checksum
How to use checksums
b9d1e3b4ff77812f299ae4e7f0f1cae659fe4d0e721ef1c4ffcb07bbbcc4d280
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 25, 2026.

Transparency log

Release files / capymoa-0.15.1-py3-none-any.whl

Download URL capymoa-0.15.1-py3-none-any.whl
Size 62.5 MB
Tags Python 3
SHA-256 checksum
How to use checksums
8656da101ab5004c16530ed75b8cb7baac44c2c9fa5ae3def6128ba5be9d283c
BLAKE2b-256 checksum
How to use checksums
db89093506dc7108df0c64c2e679131084a92b9f967134130b4e9cedfe72c46e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 25, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.15.1 This release

2 release files

0.15.0

2 release files

0.13.0

2 release files

0.12.0

2 release files

0.9.1

2 release files

0.9.0

2 release files

0.8.2

2 release files

0.8.0

2 release files

0.7.0

2 release files

0.6.0

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.1

2 release files

0.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page