QM: Quantile Mapping method

QMR Documentation

Quantile Mapping method

Description

Perform an univariate bias correction of X0 with respect to Y0

Details

Correction is applied margins by margins.

Public fields

distX0

[ROOPSD distribution or a list of them] Describe the law of each margins. A list permit to use different laws for each margins. Default is ROOPSD::rv_histogram.

distY0

[ROOPSD distribution or a list of them] Describe the law of each margins. A list permit to use different laws for each margins. Default is ROOPSD::rv_histogram.

n_features

[integer] Numbers of features

tol

[double] Floatting point tolerance

Methods

Public methods


Method new()

Create a new QM object.

Usage
QM$new(distX0 = ROOPSD::rv_histogram, distY0 = ROOPSD::rv_histogram, ...)
Arguments
distX0

[ROOPSD distribution or a list of them] Describe the law of model

distY0

[ROOPSD distribution or a list of them] Describe the law of observations

...

[] kwargsX0 or kwargsY0, arguments passed to distX0 and distY0

Returns

A new 'QM' object.


Method fit()

Fit the bias correction method

Usage
QM$fit(Y0 = NULL, X0 = NULL)
Arguments
Y0

[matrix: n_samples * n_features] Observations in calibration

X0

[matrix: n_samples * n_features] Model in calibration

Returns

NULL


Method predict()

Predict the correction

Usage
QM$predict(X0)
Arguments
X0

[matrix: n_samples * n_features or NULL] Model in calibration

Returns

[matrix] Return the corrections of X0


Method clone()

The objects of this class are cloneable with this method.

Usage
QM$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.

References

Panofsky, H. A. and Brier, G. W.: Some applications of statistics to meteorology, Mineral Industries Extension Services, College of Mineral Industries, Pennsylvania State University, 103 pp., 1958.

Wood, A. W., Leung, L. R., Sridhar, V., and Lettenmaier, D. P.: Hydrologic Implications of Dynamical and Statistical Approaches to Downscaling Climate Model Outputs, Clim. Change, 62, 189–216, https://doi.org/10.1023/B:CLIM.0000013685.99609.9e, 2004.

Déqué, M.: Frequency of precipitation and temperature extremes over France in an anthropogenic scenario: Model results and statistical correction according to observed values, Global Planet. Change, 57, 16–26, https://doi.org/10.1016/j.gloplacha.2006.11.030, 2007.

Examples

## Three bivariate random variables (rnorm and rexp are inverted between ref
## and bias)
XY = SBCK::dataset_gaussian_exp_2d(2000)
X0 = XY$X0 ## Biased in calibration period
Y0 = XY$Y0 ## Reference in calibration period

## Bias correction
## Step 1 : construction of the class QM 
qm = SBCK::QM$new() 
## Step 2 : Fit the bias correction model
qm$fit( Y0 , X0 )
## Step 3 : perform the bias correction, Z0 is the correction of
## X0 with respect to the estimation of Y0
Z0 = qm$predict(X0)

# ## But in fact the laws are known, we can fit parameters:
distY0 = list( ROOPSD::Exponential , ROOPSD::Normal )
distX0 = list( ROOPSD::Normal , ROOPSD::Exponential )
qm_fix = SBCK::QM$new( distY0 = distY0 , distX0 = distX0 )
qm_fix$fit( Y0 , X0 )
Z0 = qm_fix$predict(X0) 

SBCK documentation built on Sept. 11, 2023, 5:10 p.m.

Related to QM in SBCK...