Tools for analyzing and quantifying effects of counfounder variables on machine learning model predictions.
pip install mlconfound
# y : prediction target
# yhat: prediction
# c : confounder
from mlconfound.stats import partial_confound_test
partial_confound_test(y, yhat, c)
Run the quickstart notebook in Binder:
Read the docs for more details.
https://mlconfound.readthedocs.io
T. Spisak, “Statistical quantification of confounding bias in machine learning models.” GigaScience 11 (2022) https://doi.org/10.1093/gigascience/giac082. Preprint on arXiv:2111.00814, 2021.