This release is a pre-release and may not be stable for production use.
yemale
Build prediction regions. Generate possible outcomes. Evaluate their consequences.
yemale builds multivariate conformal predictive distributions from predictions and observed outcomes. Use them to construct prediction regions, draw samples, assign probabilities to events, and compute expectations—for example, the expected cost of a decision.
The conformal construction provides finite-sample calibration without assuming a particular data distribution.
It uses optimal transport to handle scalar and vector-valued scores, without first reducing vectors to a scalar summary. The transport engine also works independently.
Install
python -m pip install yemale==0.1.0a2
Alpha release.
With your model
Start with a fitted model and held-out data X_cal, y_cal that were not used
to train it. These data are used to calibrate the prediction regions.
from yemale import extend
model = extend(model)
model.conformalize(X_cal, y_cal)
cpd = model.predict_distribution(X_new)
region = cpd.region(0.9, rng=0)
region.contains(y_new) # One Boolean per new outcome.
model.predict(X_new) still returns the original point predictions.
Already have predictions? Use yemale.conformalize(predictions, outcomes).
Sampling and summaries
Use the model's prediction as the fixed candidate for sampling:
candidate = model.predict(X_new[:1])[0]
cpd = model.predict_distribution(X_new[:1], candidate=candidate)
cpd.sample(1000, rng=0)
cpd.mean()
cpd.cov()
Explore
- Conformal prediction: use a model or prediction arrays, test outcomes, and select candidates.
- Optimal transport: fit point clouds, construct regions, and work with reference and predictive distributions.
- Mathematical guide: the construction and its connection to the API.
- Changelog.
License
Apache-2.0.
Metadata
Release files for yemale 0.1.0a2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| yemale-0.1.0a2.tar.gz | 70.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| yemale-0.1.0a2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 122.2 kB
Release files / yemale-0.1.0a2.tar.gz
| Download URL | yemale-0.1.0a2.tar.gz |
|---|---|
| Size | 70.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6168c03b3a9684d2df80d43d69386de60e6c4f41033a84febf22081b69e58ec8
|
|
BLAKE2b-256 checksum How to use checksums |
75688b7c1fe8c7ecd8ebcda9bad548af5e1a932a8c0e48699ff1712a99c46d1e
|
| 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 Oct 8, 2026.
Transparency logRelease files / yemale-0.1.0a2-py3-none-any.whl
| Download URL | yemale-0.1.0a2-py3-none-any.whl |
|---|---|
| Size | 51.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fd3e78aaa5955046e08b18d750be3cd94d9eec6d2eff662a3c576f84a5d19d09
|
|
BLAKE2b-256 checksum How to use checksums |
8d41a85b4bf119c4ce773eba4e470d4d002eb7e00c8d8c15c481324257e521ad
|
| 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 Oct 8, 2026.
Transparency log