param {gplite} | R Documentation |
Get or set GP model parameters
Description
get_param
returns the current hyperparameters of the GP model in a vector.
set_param
can be used to set the parameters. Note that these functions
are intended mainly for internal usage, and there is typically
no need to use these functions directly but instead create a new GP model using
gp_init
.
Usage
get_param(object, ...)
set_param(object, param, ...)
Arguments
object |
The model object. |
... |
Ignored currently. |
param |
The parameters to be set. Call first |
Value
get_param
returns the current hyperparameters and set_param
the GP model structure with the new parameter values.
Examples
# Set up some model
gp <- gp_init(cf = cf_sexp(), lik = lik_gaussian())
# print out to see the parameter ordering
param <- get_param(gp)
print(param)
# set some new values
param_new <- log(c(0.1, 0.8, 0.3))
names(param_new) <- names(param)
gp <- set_param(gp, param_new)
# check the result
print(get_param(gp))
[Package gplite version 0.13.0 Index]