Method new()
Create a new dOTC object.
Usage
dOTC$new(
bin_width = NULL,
bin_origin = NULL,
cov_factor = "std",
ot = SBCK::OTNetworkSimplex$new()
)
Arguments
bin_width
[vector or NULL] A vector of lengths of the cells
discretizing R^numbers of variables. If NULL, it is estimating
during the fit
bin_origin
[vector or NULL] Coordinate of lower corner of one
cell. If NULL, c(0,...,0) is used
cov_factor
[string or matrix] Covariance factor to correct the
dynamic transferred between X0 and Y0. For string, available
values are "std" and "cholesky"
ot
[OTSolver] Optimal Transport solver, default is the network
simplex
Returns
A new `dOTC` object.
Method fit()
Fit the bias correction method
Usage
dOTC$fit(Y0, X0, X1)
Arguments
Y0
[matrix: n_samples * n_features] Observations in calibration
X0
[matrix: n_samples * n_features] Model in calibration
X1
[matrix: n_samples * n_features] Model in projection
Predict the correction
Note: Only the center of the bins associated to the corrected points are
returned, but all corrections of the form:
>> bw = dotc$bin_width / 2
>> n = base::prod(base::dim(X1))
>> Z1 = dotc$predict(X1)
>> Z1 = Z1 + t(matrix(stats::runif( n = n min = - bw , max = bw ) , ncol = dim(X1)[1] ))
are equivalent for OTC.
Usage
dOTC$predict(X1, X0 = NULL)
Arguments
X1
[matrix: n_samples * n_features] Model in projection
X0
[matrix: n_samples * n_features or NULL] Model in calibration
Returns
[matrix or list] Return the matrix of correction of X1 if X0 is
NULL, else return a list containing Z1 and Z0,
the corrections of X1 and X0
Method clone()
The objects of this class are cloneable with this method.
Usage
dOTC$clone(deep = FALSE)
Arguments
deep
Whether to make a deep clone.