## Two 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
## Bin length
bin_width = SBCK::bin_width_estimator( list(X0,Y0) )
## Bias correction
## Step 1 : construction of the class OTC
otc = SBCK::OTC$new( bin_width )
## Step 2 : Fit the bias correction model
otc$fit( Y0 , X0 )
## Step 3 : perform the bias correction, Z0 is the correction of
## X0 with respect to the estimation of Y0
Z0 = otc$predict(X0)
Run the code above in your browser using DataLab