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-correctionInstall using conda:
conda install -c conda-forge bias_correctionLatest documentation is available here.
bias_correction is easy to use. Just import:
from bias_correction import BiasCorrection, XBiasCorrectionInstantiate 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')