QMrs | R Documentation |
Perform a multivariate bias correction of X with respect to Y
Dependence is corrected with multi_schaake_shuffle.
SBCK::QM
-> QMrs
irefs
[vector of int] Indexes for shuffle. Defaults is base::c(1)
new()
Create a new QMrs object.
QMrs$new(irefs = base::c(1), ...)
irefs
[vector of int] Indexes for shuffle. Defaults is base::c(1) model
...
[] all others arguments are passed to QM class.
A new 'QMrs' object.
fit()
Fit the bias correction method
QMrs$fit(Y0, X0)
Y0
[matrix: n_samples * n_features] Observations in calibration
X0
[matrix: n_samples * n_features] Model in calibration
NULL
predict()
Predict the correction
QMrs$predict(X0)
X0
[matrix: n_samples * n_features or NULL] Model in calibration
[matrix] Return the corrections of X0
clone()
The objects of this class are cloneable with this method.
QMrs$clone(deep = FALSE)
deep
Whether to make a deep clone.
Vrac, M.: Multivariate bias adjustment of high-dimensional climate simulations: the Rank Resampling for Distributions and Dependences (R2 D2 ) bias correction, Hydrol. Earth Syst. Sci., 22, 3175–3196, https://doi.org/10.5194/hess-22-3175-2018, 2018.
## 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 QMrs
qmrs = SBCK::QMrs$new()
## Step 2 : Fit the bias correction model
qmrs$fit( Y0 , X0 )
## Step 3 : perform the bias correction
Z0 = qmrs$predict(X0)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.