Regression bias corrector
Package is aimed to correct regression fit by any machine learning model that underestimate high values and overestimate low values of outcome variable (1D case). The problem usually arises in case when metrics like MSE and MAE shows better results in biased predictions.
Algorithm
Now is implemeneted only linear correction for 1D case by the Linear Regression approach.
The idea is to linearly transform the y_pred to change the coefficient of linear regression between y_true and y_pred to 1. It is corresponds to the diagonal on plane y_true and y_pred that means equal pace of increasing y_pred with increasing y_true.
y_true- actual valuesy_pred- predicted values
How to install
git clone https://github.com/mike-live/regression-bias-corrector.git
pip install .
How to use
# Import Linear Bias corrector
from regression-bias-corrector import LinearBiasCorrector
# Create instance of corrector
corrector = LinearBiasCorrector()
# Fit corrector on actual outcome variable and on predicted values of the model for train dataset
# y_train - actual values
# y_train_pred - predicted values
corrector.fit(y_train, y_train_pred)
# correct predicted values on test dataset
# y_test_pred - predicted values by model on test dataset
y_test_pred_unbiased = corrector.predict(y_test_pred)
# y_test_pred_unbiased - unbiased predicted values on test
Authors
Lobachevsky University
- Krivonosov Mikhail
- Khabarova Tatiana
Metadata
Release files for regression-bias-corrector 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| regression_bias_corrector-0.0.2.tar.gz | 88.0 kB | With provenance | Details for regression_bias_corrector-0.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| regression_bias_corrector-0.0.2-py3-none-any.whl | Python 3 | none | any | Details for regression_bias_corrector-0.0.2-py3-none-any.whl |
Total release size: 91.3 kB
Release files / regression_bias_corrector-0.0.2.tar.gz
| Download URL | regression_bias_corrector-0.0.2.tar.gz |
|---|---|
| Size | 88.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0e50aad1a044e485889dc85b4f577d5ce94dafc5ace1d21d86af3fed80e27165
|
|
BLAKE2b-256 checksum How to use checksums |
5fff247efefede6712d3510d001f58e1892ecbfe7d732df5e2dfc99ec707ace4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.1.1 CPython/3.12.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 7, 2024.
Transparency logRelease files / regression_bias_corrector-0.0.2-py3-none-any.whl
| Download URL | regression_bias_corrector-0.0.2-py3-none-any.whl |
|---|---|
| Size | 3.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
bca8c77b08e54af04862cc5194c96e301c22be0cf99280278f0e269b3436913d
|
|
BLAKE2b-256 checksum How to use checksums |
9b0ee5553f1c8e16f577f478afda7b6da0639e1ae9d22d6dba1d4d1c6f66484a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.1.1 CPython/3.12.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 7, 2024.
Transparency logSecurity for regression-bias-corrector 0.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for regression_bias_corrector-0.0.2.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 7, 2024.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.