A wrapper for kernlab::gausspr() for use in
nadir::super_learner().
Value
A prediction function that accepts newdata,
which returns predictions (a numeric vector of values, one for each row
of newdata).
Details
Gaussian process regression is a Bayesian kernel method that places a
prior over functions and returns the posterior mean prediction. It is a
smooth, nonparametric paradigm distinct from both the tree ensembles and
the penalized regressions already in the library. The kernel and its
hyperparameters can be specified through ... (e.g.,
kernel = 'rbfdot', kpar = list(sigma = 0.1)).
Note that kernlab::gausspr() does not support observation weights,
so no weights argument is accepted here.
Examples
lnr_gausspr(mtcars, mpg ~ hp + disp + wt)(mtcars)
#> [1] 21.09483 20.71881 24.77283 19.36299 17.74770 19.41636 15.68051 22.55564
#> [9] 21.40097 19.27187 19.27187 17.04814 16.53882 16.56136 13.73428 13.75326
#> [17] 14.56017 27.76112 28.36265 29.24205 23.28405 17.06032 17.03147 15.64038
#> [25] 18.67555 29.03820 25.58776 26.48494 16.64439 19.67585 17.30868 21.32258
