ezmsg-learn
This repository contains a Python package with modules for machine learning (ML)-related processing in the ezmsg framework. As ezmsg is intended primarily for processing unbounded streaming signals, so are the modules in this repo.
If you are only interested in offline analysis without concern for reproducibility in online applications, then you should probably look elsewhere.
Processing units include dimensionality reduction, linear regression, and classification that can be initialized with known weights, or adapted on-the-fly with incoming (labeled) data.
Installation
The base install is NumPy-only. The machine-learning backends are optional extras, so a deployment that uses only the lightweight processors does not pay for a PyTorch or scikit-learn install:
pip install ezmsg-learn # numpy-only processors
pip install "ezmsg-learn[sklearn]" # + pandas, river, scikit-learn
pip install "ezmsg-learn[torch]" # + torch
pip install "ezmsg-learn[all]" # everything
Or install the latest development version:
pip install "git+https://github.com/ezmsg-org/ezmsg-learn@dev#egg=ezmsg-learn[all]"
Importing a module whose backend is not installed raises an ImportError naming the extra to install.
Dependencies
Base (pip install ezmsg-learn) — ezmsg, ezmsg-baseproc, ezmsg-sigproc, numpy, scipy, array-api-compat.
| Extra | Adds | Covers |
|---|---|---|
| (none) | — | process.ssr, process.flatten, process.seqseqsampler, process.refit_kalman, model.cca, model.refit_kalman |
sklearn |
pandas, river, scikit-learn |
process.adaptive_linear_regressor, process.linear_regressor, process.sgd, process.slda, process.sklearn, dim_reduce.* |
torch |
torch |
process.base, process.torch, process.rnn, process.transformer, process.mlp_old, model.mlp, model.rnn, model.transformer |
all |
both of the above | everything, including all collection.sample_adapt_regressor backends |
collection.sample_adapt_regressor imports its backend lazily, so it needs only the extra for the model_type in use — and none at all for model_type="kalman".
Development
We use uv for development.
- Install
uvif not already installed. - Fork this repository and clone your fork locally.
- Open a terminal and
cdto the cloned folder. - Run
uv syncto create a.venvand install dependencies. - (Optional) Install pre-commit hooks:
uv run pre-commit install - After making changes, run the test suite:
uv run pytest tests
License
MIT License - see LICENSE for details.
Release files for ezmsg-learn 1.14.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| ezmsg_learn-1.14.0.tar.gz | 109.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ezmsg_learn-1.14.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 185.5 kB
Release files / ezmsg_learn-1.14.0.tar.gz
| Download URL | ezmsg_learn-1.14.0.tar.gz |
|---|---|
| Size | 109.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1e6d33d4c0f31465dc492dcc4e4ecad738375fcc217ad18fcfbcdbbb0b4cc462
|
|
BLAKE2b-256 checksum How to use checksums |
fdbd965a765a82d540175ec598f22196105c59b1525940c04adedea0347f4ef9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.9 {"installer":{"name":"uv","version":"0.12.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / ezmsg_learn-1.14.0-py3-none-any.whl
| Download URL | ezmsg_learn-1.14.0-py3-none-any.whl |
|---|---|
| Size | 75.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a1454723b1d8bed382d44ea86ec63a2707145c18ffcc018d63fd38aea6ffbd79
|
|
BLAKE2b-256 checksum How to use checksums |
dae80de58796963b9d594edc5e89c225595fbe6d74df2a31cfd3939ad87a7cd1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.9 {"installer":{"name":"uv","version":"0.12.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|