Metadata-Version: 2.4
Name: prime-importance
Version: 0.2.1
Summary: Response-relevant selection and proportional global variable importance
Author: Youngseo Cho, V. Roshan Joseph
License-Expression: MIT
Project-URL: Homepage, https://github.com/ChoYoungSeo/prime-importance
Project-URL: Repository, https://github.com/ChoYoungSeo/prime-importance
Project-URL: Issues, https://github.com/ChoYoungSeo/prime-importance/issues
Project-URL: Code and results, https://github.com/ChoYoungSeo/prime-importance-paper
Project-URL: R package, https://github.com/ChoYoungSeo/prime-importance-r
Project-URL: Paper, https://arxiv.org/abs/2610.17053
Keywords: variable importance,sensitivity analysis,feature selection,dependent inputs,explainable AI
Classifier: Intended Audience :: Science/Research
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Scientific/Engineering :: Information Analysis
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy>=1.24
Requires-Dist: scipy>=1.10
Provides-Extra: test
Requires-Dist: pytest>=8; extra == "test"
Provides-Extra: plot
Requires-Dist: matplotlib>=3.7; extra == "plot"
Provides-Extra: dev
Requires-Dist: build>=1; extra == "dev"
Requires-Dist: matplotlib>=3.7; extra == "dev"
Requires-Dist: pytest>=8; extra == "dev"
Requires-Dist: ruff>=0.6; extra == "dev"
Requires-Dist: twine>=6; extra == "dev"
Dynamic: license-file

# PRIME: A New Measure for Variable Importance

[Paper](https://arxiv.org/abs/2610.17053) · [Code and results](https://github.com/ChoYoungSeo/prime-importance-paper) · [R package](https://github.com/ChoYoungSeo/prime-importance-r)

PRIME estimates proportional global variable importance from noisy data with
dependent predictors. It combines local-linear residual-variance estimation,
response-relevant variable selection, and proportional allocation on the
selected coordinates.

## Installation

Requires Python 3.10 or newer. NumPy and SciPy are installed as dependencies.

```bash
python -m pip install prime-importance
```

For optional Matplotlib plots:

```bash
python -m pip install "prime-importance[plot]"
```

## Quick example

```python
import numpy as np
import prime

rng = np.random.default_rng(5)
X = rng.uniform(-1, 1, size=(300, 8))
y = X[:, 0] - X[:, 1] + X[:, 4] ** 2 + rng.normal(0, 0.08, size=300)

fit = prime.fit(X, y)
print(fit.selected_names)
print(fit.effects)
```

Use `prime.screen(X, y)` for selection diagnostics and `prime.plot(fit)` for
an importance plot.

## Citation

Cho, Y., and Joseph, V. R. (2026). *Measuring Variable Importance Using
Proportional Inclusive Marginal Effects*. [arXiv:2610.17053](https://arxiv.org/abs/2610.17053).
[DOI: 10.48550/arXiv.2610.17053](https://doi.org/10.48550/arXiv.2610.17053).

## Documentation and license

- [Python package overview](https://github.com/ChoYoungSeo/prime-importance#readme)
- [Examples](https://github.com/ChoYoungSeo/prime-importance/tree/main/examples)
- [Issue tracker](https://github.com/ChoYoungSeo/prime-importance/issues)
- [Code and results](https://github.com/ChoYoungSeo/prime-importance-paper)
- [R package](https://github.com/ChoYoungSeo/prime-importance-r)

License: MIT. Authors: Youngseo Cho and V. Roshan Joseph.
