Learn R Programming

GPrank (version 0.1.4)

setInitParams: Initializing kernel parameters

Description

Function for setting initial parameters to reasonable values after performing a grid search over parameters within their pre-set ranges. Loglikelihood is computed for each combination of parameter values on the grid, and those which lead to the highest loglikelihood value are set as initial values.

Usage

setInitParams(model, grid_size = 5)

Arguments

model

GP model.

grid_size

Size of the grid over which the search for maximum likelihood will be done. Default value is 5.

Value

Return GP model with the parameters initialized at reasonable values.

Examples

Run this code
# NOT RUN {
x=as.matrix(seq(1,10))
y=as.matrix(sin(x))
v=as.matrix(runif(10,0,0.5))
kernelTypes=c("rbf","white","fixedvariance")
model=constructModel(x,y,v,kernelTypes)
model=setInitParams(model)

# }

Run the code above in your browser using DataLab