Compute recoverability dimensions (rho_variance and rho_worst) for arbitrary model functions.
Project description
recoverability
recoverability computes recoverability metrics for model mechanisms.
The package currently provides:
rho_variance(model_fn, X)rho_worst(model_fn, X)rho_report(model_fn, X)- Example mechanisms such as
linear_sumandproduct_mechanism
Installation
pip install recoverability
Quick Start
import numpy as np
from recoverability import rho_worst
X = np.random.default_rng(0).uniform(0.0, 1.0, size=(300, 3))
def model_fn(x: np.ndarray) -> np.ndarray:
return x[:, 0] + x[:, 1] * x[:, 2]
result = rho_worst(model_fn, X)
print(result["rho_worst"])
Development
python3 -m pytest tests/ -v
python3 -m build
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
recoverability-0.1.0.tar.gz
(7.2 kB
view details)
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 recoverability-0.1.0.tar.gz.
File metadata
- Download URL: recoverability-0.1.0.tar.gz
- Upload date:
- Size: 7.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
75faf343a69f733ebe864221b91a7f5ac2f890abc32e6ed7c96f8971ab0a722f
|
|
| MD5 |
e6de88ea6f2f485ac68af5917d589d35
|
|
| BLAKE2b-256 |
4159de15a7d64d634f22424261e9f8aa489dc71247b2e6af69fcaa6e1c56da8e
|
File details
Details for the file recoverability-0.1.0-py3-none-any.whl.
File metadata
- Download URL: recoverability-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
979d186cfe85d9493c949e50e2927be465f0dd410fd27c3553f089ace546ec32
|
|
| MD5 |
53bb484c5c08656c12c716dbcaf0a65e
|
|
| BLAKE2b-256 |
a5786a47c550c4f488a8b8f5bf1dccb7a551a91c6a34a20b3c09750983ad0d7d
|