This release is a pre-release and may not be stable for production use.
MagmaClustPy
MagmaClustPy is a probabilistic learning framework based on MagmaClust, a multi-task Gaussian Process framework.
An original implementation of MagmaClust is available as a R package.
This implementation has many limitations:
- it doesn't do parallel computations and doesn't run on GPU
- it doesn't support non-gaussian likelihoods (for classification for example)
- it only models single-output GPs
- it trains on all the data at once, scaling pretty badly on bigger datasets
This Python package will aleviate these limitations with multiple design choices:
- We use Jax along with mapping/padding methods to allow fast and parallel computations on CPU/GPU/TPU
- We develop a multi-output algorithm based on Process Convolution for joint optimisation of correlated outputs
- We use Laplace-Matching to adapt to non-gaussian data and problems
- We support data points coming with known, heteroskedastic uncertainty estimates
- We learn data in batches to reduce time of training
- We explore sparse covariance matrix computations to speed up inference
Installation
You can install a minimal version of the library using:
pip install magma-py-minimal
NOTE: for now, this minimal version is only compatible with python >= 3.12.
NOTE: this version is a prototype and comes with no guarantee of stability. For now, it is not advised to use it for production/scientific contributions. Stable version is planned for summer 2026.
Main differences with the original MagmaClustR library
- This is a module written in Python instead of package coded in R (obviously)
- The package runs on JAX and can therefore leverage various backends (CPU, GPU, TPU).
- We use custom classes for kernels rather than string identifiers. These kernels can be composed (à la GPytorch).
You can find them in
kernels.py. Therefore, signatures of functions that use kernels might be different. A common example of this is the initialisation of kernel HPs. Rather than sending the kernel class and HPs as separate arguments, the user can initialise the kernel with the wanted HP and then send it as a single argument. - We use matplotlib for plotting instead of ggplot2
- Files, class names, functions names, variables and parameters might have different names to be clearer or respect Python conventions.
- This library sticks with the default precision of the linear algebra backend (or the one specified by the user). No implicit rounding of numbers is performed by the library itself.
- This library uses
logginginstead ofcat. You can configure the logging level like this:logging.basicConfig(level=logging.INFO).
Development roadmap
- Cluster mixture init and update
- Cluster hyperpost and HP optim
- Model classes
- Cluster prediction
- Plot utilities
- Initializers
- Prior means modules
- Likelihood modules
- Minimal documentation (guides and API)
- PyPI package and deployment setup
🚀 Alpha release !
- Bug test - issue management
- Unit test
- Multi-output GPs
- Complete documentation
- Contribution guides
- Dev pipeline tools for testing/coverage/...
🚀 1.0.0 release
- Laplace-Matching likelihoods
- Continued development
Help, feedback, contributions
Any feedback, issue or contribution is obviously mor than welcome! Don't hesitate to open an issue/discussion on GitHub, or get in touch with Arthur Leroy if you have any question.
Metadata
Release files for magma-py-minimal 0.1.5a0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| magma_py_minimal-0.1.5a0.tar.gz | 29.2 kB | Without provenance | Details for magma_py_minimal-0.1.5a0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| magma_py_minimal-0.1.5a0-py3-none-any.whl | Python 3 | none | any | Details for magma_py_minimal-0.1.5a0-py3-none-any.whl |
Total release size: 63.0 kB
Release files / magma_py_minimal-0.1.5a0.tar.gz
| Download URL | magma_py_minimal-0.1.5a0.tar.gz |
|---|---|
| Size | 29.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
41bc57508e2f535fcb742d22a3b87aef568d2b80bb3f1c0d6dbc29728f76f6b8
|
|
BLAKE2b-256 checksum How to use checksums |
7528cb5dd238145b4eb428bd6ba9d37ab3975c7575d1c556eca566c216e61d5a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Release files / magma_py_minimal-0.1.5a0-py3-none-any.whl
| Download URL | magma_py_minimal-0.1.5a0-py3-none-any.whl |
|---|---|
| Size | 33.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3a71180b1097b4b39041353a568ed88e1d0cf994a0e98d871ee5ffb67e54336a
|
|
BLAKE2b-256 checksum How to use checksums |
6ccb50d8db492b3623625e83a88e097fc6a7983c6a8a08add978ca350b307deb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Security for magma-py-minimal 0.1.5a0
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.