Impact Range Assessment (IRA): An Interpretable Sensitivity Measure for Regression Modeling
Project description
irapy
irapy is a Python library for implementing single-execution Impact Range Assessment (IRA) and repeated IRA analyses.
Installation
pip install irapy
Requirements
irapy Requirements
irapy depends on the following Python libraries:
- NumPy
- pandas
- joblib
These dependencies are installed automatically when using pip install irapy.
irapy was developed using Python 3.8 (NumPy 1.24, pandas 1.5) and has been tested on Python environments including Python 3.9 (NumPy 1.26, pandas 2.0) and Python 3.12 (NumPy 2.2, pandas 2.3). Compatibility issues may occur when NumPy and pandas are installed in binary-incompatible combinations.
Usage
Run irapy
You can apply either a single-execution or a repeated IRA to a trained regression model using the corresponding dataset.
from irapy import single_ira, repeated_ira
# single-execution IRA
single_ira_result = single_ira(input_data=X, model=trained_model)
print(single_ira_result)
# repeated IRA
repeated_ira_result = repeated_ira(input_data=X, model=trained_model, n_repeats=50)
print(repeated_ira_result)
Arguments
input_data: predictor pandas DataFrame (i.e., the training predictor matrix, often denoted as X_train; use the original, unscaled predictors when a scaler is applied); all predictors must be continuous numeric variables.model: trained model (object with '.predict()', tested with 'scikit-learn' models) or a callable functionscaler: fitted scaler (optional, e.g., 'StandardScaler' / 'MinMaxScaler' in Python)num_interpol: number of interpolated points (default: 100)num_background_samples: number of background observations (default: 200)random_state: seed for reproducibility (default: 42)sorted_output: whether to sort results by IRA value (default: False)n_repeats(repeated IRA): number of repeated times (default: 50)n_jobs(repeated IRA): number of parallel jobs to run (default: 1)
Project Homepage
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
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 irapy-0.1.1.tar.gz.
File metadata
- Download URL: irapy-0.1.1.tar.gz
- Upload date:
- Size: 5.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
407574dc1883d62ae95fdc07e5ddc6dbe42beaee76cd91f7071ba08583695ea2
|
|
| MD5 |
ba4622e38896d145f3c4ae375e09021c
|
|
| BLAKE2b-256 |
23b65ebdf81dc4e38294dad83011b5277242bcf3719d901433c60454efe048c5
|
File details
Details for the file irapy-0.1.1-py3-none-any.whl.
File metadata
- Download URL: irapy-0.1.1-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.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cacbdf4f7525b555a3f01367f1b03a7b544b0ec63025ef5172e2337b09e45fb8
|
|
| MD5 |
81af36faabc8c86116d90214ea10425f
|
|
| BLAKE2b-256 |
3d2534c8d10a57fabf957745509424411a88ed9c0e96954da20bf62348a53ed6
|