insert.kernel.instance: Insert Kernel Instance into Model Tree

Description Usage Arguments Value Examples

View source: R/modelTree.R

Description

Insert Kernel Instance into Model Tree

Usage

1
2
insert.kernel.instance(orig.model.tree, node, kernel.class.name, operation.id,
  hyper.params = NULL)

Arguments

orig.model.tree

a ModelTree object

node

the node at which to insert the kernel instance

kernel.class.name

a string indicating the class of kernel to insert

operation.id

a string indicating how to insert the kernel at node. Must be "*" or "+", or NULL if the model tree is currently empty.

hyper.params

the hyper parameters of the inserted kernel. Can be NULL to fit hyper parameters at a later time.

Value

a ModelTree object

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
mt <- create.model.tree.builtin()

mt <- insert.kernel.instance(mt, 1, "SE", NULL)
print(mt) # "SE.1"

mt <- insert.kernel.instance(mt, 1, "SE", "*")
print(mt) # "( SE.1 * SE.2 )"

mt <- insert.kernel.instance(mt, 3, "RQ", "+")
print(mt) # "( ( SE.1 * SE.2 ) + RQ.1 )"

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