pankajkarman / bias_correction

python library for bias correction
MIT License
30 stars 8 forks source link

PyPI conda Downloads License Code style: black


About

The module bias_correction consists of functions to perform bias correction of datasets to remove biases across datasets. Implemented methods include quantile mapping, modified quantile mapping, scaled distribution mapping (Gamma and Normal Corrections).

Installation

Install using pip:

pip install bias-correction

Install using conda:

conda install -c conda-forge bias_correction

Documentation

Latest documentation is available here.

Usage

bias_correction is easy to use. Just import:

from bias_correction import BiasCorrection, XBiasCorrection

Instantiate the bias correction class as:

bc = BiasCorrection(reference, model, data_to_be_corrected)
xbc = XBiasCorrection(reference, model, data_to_be_corrected)

Perform correction specifying the method to be used:

corrected = bc.correct(method='gamma_mapping')
xcorrected = xbc.correct(method='gamma_mapping')