Skip to main content

Statistical Inference After Learning

Project description

SIAL: Statistical Inference After Learning

Overview

sial is a python package for conducting statistical inference on feature importance in machine learning. It is written on the basis of scikit-learn. Hence, in principle, any regressor/classifier learned by scikit-learn can be inferred by sial.

sial provides two types of Inferer for making inferences: CIT for conditional independence test and RIT for risk invariance test. CIT can implement the holdout randomization test (HRT; Tansey et al., 2022), residual permutation test (RPT; Huang, 2024), and conditional predictive impact (CPI; Watson & Wright, 2021). On the other hand, RIT can conduct leave-one-covariate-out (LOCO; Lei et al., 2018) and plug-in estimation (PIE; Williamson et al., 2023). In addition, sial also constructs a Crosser class. With the help of Crosser, cross-fitting and $p$-value combination can be easily implemented to improve the stability and even statistical power of the CITs and RITs.

Installation

sial can be installed via pip:

pip install sial-pkg

Tutorial

Three Jupyter notebooks are available to learn the use of sial:

  1. Conditional Independence Tests
  2. Risk Invariance Tests
  3. Cross-Fitting and $p$-Value Combination

These notebooks assume that readers have experiences in using scikit-learn.

References

Huang, P.-H. (2024). Residual Permutation Tests for Feature Importance in Machine Learning. [Manuscript submitted for publication].

Lei, J., G’Sell, M., Rinaldo, A., Tibshirani, R. J., & Wasserman, L. (2018). Distribution-free predictive inference for regression. Journal of the American Statistical Association, 113(523), 1094–1111. doi: 10.1080/01621459.2017.1307116

Tansey, W., Veitch, V., Zhang, H., Rabadan, R., & Blei, D. M. (2022). The holdout randomization test for feature selection in black box models. Journal of Computational and Graphical Statistics, 31(1), 151–162. doi: 10.1080/10618600.2021.1923520

Watson, D., & Wright, M. (2021). Testing conditional independence in supervised learning algorithms. Machine Learning, 110, 1-23. doi: 10.1007/s10994-021-06030-6

Williamson, B. D., Gilbert, P. B., Simon, N. R., & Carone, M. (2023). A general framework for inference on algorithm-agnostic variable importance. Journal of the American Statistical Association, 118(543), 1645–1658. doi: 10.1080/01621459.2021.2003200

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sial_pkg-0.0.4.tar.gz (13.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sial_pkg-0.0.4-py3-none-any.whl (13.8 kB view details)

Uploaded Python 3

File details

Details for the file sial_pkg-0.0.4.tar.gz.

File metadata

  • Download URL: sial_pkg-0.0.4.tar.gz
  • Upload date:
  • Size: 13.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.1

File hashes

Hashes for sial_pkg-0.0.4.tar.gz
Algorithm Hash digest
SHA256 af073aa688888092f5bbb3f555e0a0291f8fe7a6c60a87116c70f672153e28f9
MD5 dbd0a2a85a4345134c38caccfad73bf2
BLAKE2b-256 116bfb0fbb868a22a847aca2eff7ae1a80cfa7e7c56d111cde5e777d69621e08

See more details on using hashes here.

File details

Details for the file sial_pkg-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: sial_pkg-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 13.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.1

File hashes

Hashes for sial_pkg-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 66ec36617ee9baa9162b6cfe6b110249a35c5193f622472878ed941627b59b08
MD5 42d7f6068db8a960907f0979e3907c60
BLAKE2b-256 b2582c6b3cbd5068c89f7e99dd91d9f46f487f76efc18f4787e4ca6f9df521a2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page