Gaussian Process regression using the GPfit package.
Calls GPfit::GP_fit() for training and predict method for predictions.
References
MacDonald, B., Ranjan, P., Chipman, H. (2015). "GPfit: An R Package for Fitting a Gaussian Process Model to Deterministic Simulator Outputs." Journal of Statistical Software, 64(12), 1-23.
Super classes
mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrGPfit
Methods
Inherited methods
mlr3::Learner$base_learner()mlr3::Learner$configure()mlr3::Learner$encapsulate()mlr3::Learner$format()mlr3::Learner$help()mlr3::Learner$predict()mlr3::Learner$predict_newdata()mlr3::Learner$print()mlr3::Learner$reset()mlr3::Learner$selected_features()mlr3::Learner$train()mlr3::LearnerRegr$predict_newdata_fast()
Examples
library(mlr3)
# Create a regression task
task = tsk("mtcars")
# Create the learner
learner = lrn("regr.gpfit")
# Train the model
learner$train(task)
#> Warning: X should be in range (0, 1)
# Make predictions
prediction = learner$predict(task)
print(prediction)
#>
#> ── <PredictionRegr> for 32 observations: ───────────────────────────────────────
#> row_ids truth response
#> 1 21.0 21.0
#> 2 21.0 21.0
#> 3 22.8 22.8
#> --- --- ---
#> 30 19.7 19.7
#> 31 15.0 15.0
#> 32 21.4 21.4