Contains the GP created by mlegp::mlegp from the mlegp package
gpThe mlegp GP object (mlegp::mlegp in the mlegp manual)
X_bufferBuffer matrix to collect x points until first GP can be trained
y_bufferBuffer vector to collect y points until first GP can be trained
y_var_bufferBuffer vector to collect variance of y points until first GP can be trained
add_y_varSmall additional variance used to keep the covariance matrix condition number under control
n_points_train_limitNumber of points needed before we can create the GP
n_pointsThe number of collected points belonging to this GP
x_dimDimensionality of input points
gp_controlA list of GP implementation-specific options, passed directly to the wrapped GP implementation
init_covparsThe initial covariance parameters when training the mlegp GP object in self@gp
estimate_covparsIf TRUE, the parameters are estimated by the package. Otherwise, the parameters from init_covpars are taken
retrain_buffer_lengthOnly retrain after this many new points have been added to the buffer
retrain_buffer_counterCounter for the number of new points added since last retraining
add_buffer_in_predictionIf TRUE, points in the data buffers are added to the GP before prediction. They are added into a temporarily created GP which contains the not yet included points. The GP in the node is not yet updated.
X_sharedMatrix with x points that this GP shares with the GP in the sibling node
y_sharedVector of y points that this GP shares with the GP in the sibling node
y_var_sharedVector of y_var points that this GP shares with the GP in the sibling node
n_shared_pointsThe number of own points shared with the GP in the sibling node
new()Create a new WrappedmlegpGP object
WrappedmlegpGP$new(
X,
y,
y_var,
gp_control,
init_covpars,
retrain_buffer_length,
add_buffer_in_prediction,
estimate_covpars = TRUE,
X_shared = NULL,
y_shared = NULL,
y_var_shared = NULL
)XInput data matrix with x_dim columns and at maximum Nbar rows. Is used to create the first iteration of the local GP.
yValue of target variable at input point x; has to be a one-dimensional matrix or a vector; any further columns will be ignored
y_varVariance of the target variable; has to be a one-dimensional matrix or vector
gp_controlA list of GP implementation-specific options, passed directly to the wrapped GP implementation
init_covparsInitial covariance parameters of the local GP
retrain_buffer_lengthOnly retrain when the number of buffer points or collected points exceeds this value
add_buffer_in_predictionIf TRUE, points in the data buffers are added to the GP before prediction. They are added into a temporarily created GP which contains the not yet included points. The GP in the node is not yet updated.
estimate_covparsIf TRUE, the parameters are estimated by the package. Otherwise, the parameters from init_covpars are taken
X_sharedMatrix with x points that this GP shares with the GP in the sibling node
y_sharedVector of y points that this GP shares with the GP in the sibling node
y_var_sharedVector of y_var points that this GP shares with the GP in the sibling node
A new WrappedmlegpGP object. Besides the local GP, information on the shared points and those stored in the buffer are collected. For more information on the GP, consult the method mlegp::mlegp in the mlegp package.
update_init_covpars()Stores the initial covariance parameters (length-scales, standard deviation and trend coefficients) of the GP in the field init_covpars
WrappedmlegpGP$update_init_covpars()
get_lengthscales()Retrieves the length-scales of the kernel of the local GP
WrappedmlegpGP$get_lengthscales()
get_X_data()Retrieves the design matrix X
WrappedmlegpGP$get_X_data(include_shared = FALSE)include_sharedIf TRUE, shared points between this GP and its sibling GP are included
get_y_data()Retrieves the response
WrappedmlegpGP$get_y_data(include_shared = FALSE)include_sharedIf TRUE, shared points between this GP and its sibling GP are included
get_y_var_data()Retrieves the individual variances from the response
WrappedmlegpGP$get_y_var_data(include_shared = FALSE)include_sharedIf TRUE, shared points between this GP and its sibling GP are included
get_cov_mat()Retrieves the covariance matrix
WrappedmlegpGP$get_cov_mat()the covariance matrix
update_add_y_var()Method for updating add_y_var based on a bound for the covariance matrix condition number, based on this paper, Section 5.4
WrappedmlegpGP$update_add_y_var(max_cond_num)max_cond_numMax allowed condition number
store_point()Stores a new point into the respective buffer method
WrappedmlegpGP$store_point(x, y, y_var, shared = FALSE, remove_shared = TRUE)xSingle input data point from the data stream; has to be a vector or row matrix with length equal to x_dim
yValue of target variable at input point x; has to be a one-dimensional matrix or a vector; any further columns will be ignored
y_varVariance of the target variable; has to be a one-dimensional matrix or vector
sharedIf TRUE, this point is shared between this GP and its sibling GP
remove_sharedIf TRUE, the last of the shared points is removed
delete_buffers()Method for clearing the buffers
WrappedmlegpGP$delete_buffers()
train()Method for (re)creating / (re)training the GP
WrappedmlegpGP$train(do_buffer_check = TRUE)do_buffer_checkIf TRUE, only train the GP if the number of stored points is larger than retrain_buffer_length
TRUE if training was performed, otherwise FALSE
xSingle data point for which the predicted mean (and standard deviation) is computed; has to be a vector or row matrix with length equal to x_dim
return_stdIf TRUE, the standard error is returned in addition to the prediction
Prediction for input point x
delete_gp()Method to delete the GP object in self$gp
WrappedmlegpGP$delete_gp()
create_mlegp_gp()Method for calling the 'mlegp' function in mlegp to create a GP object, stored in self$gp
WrappedmlegpGP$create_mlegp_gp(X, y, y_var)XInput data matrix with x_dim columns and at maximum Nbar rows for the local GP.
yValue of target variable at input point x; has to be a one-dimensional matrix or a vector; any further columns will be ignored
y_varVariance of the target variable; has to be a one-dimensional matrix or vector
TRUE
call_mlegp_predict()Method for calling the 'predict' function in mlegp
WrappedmlegpGP$call_mlegp_predict(x, use_gp = NULL)xSingle data point for which the predicted mean (and standard deviation) is computed; has to be a vector with length equal to x_dim
use_gpOptional user-defined GP which is evaluated instead of the local GP
The predictions for x from the specified GP, by default the local GP. The output needs to be a list with fields mean and sd for the prediction and prediction error, respectively.
clone()The objects of this class are cloneable with this method.
WrappedmlegpGP$clone(deep = FALSE)deepWhether to make a deep clone.
This package is by default not able to include individual uncertainties for input points. For this reason, all fields related to y_var are not used when updating the GP. No covariance kernel can be specified either. This implementation also assumes a vector for y (and not a matrix with multiple columns). Moreover, since no parameters can be specified for the GP, we will only update the GP parameters due to internal dependencies, but not use init_covpars.