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).
Install using pip:
pip install bias-correction
Install using conda:
conda install -c conda-forge bias_correction
Latest documentation is available here.
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')