add.kernel: Add a Kernel Class to a Model Tree

Description Usage Arguments Value Examples

View source: R/modelTree.R

Description

Add a Kernel Class to a Model Tree

Usage

1
add.kernel(orig.model.tree, kernel.class.name, kernel)

Arguments

orig.model.tree

a ModelTree object

kernel.class.name

the name of the kernel class (arbitrary, must not match the class name of any kernel already in the model tree).

kernel

either an R function defining a kernel, or a string indicating a built-in kernel type

hyper.param.names

a vector containing the names of the kernel hyperparameters

kernel.additional.params

a list containing any additional kernel parameters

kernel.grad

either an R function returning the gradient of kernel, or NULL. If kernel is a string specifying a built-in kernel, kernel.grad should be NULL. If kernel is an R function and kernel.grad is NULL, grad will be used to derive a numerical gradient.

Value

a ModelTree object

Examples

1
2
mt <- create.model.tree()
mt <- add.kernel(mt, "SE", "squaredExponential", c("l"))

mattdneal/gaussianProcess documentation built on May 21, 2019, 12:58 p.m.