model.search: Perform Model Selection Using BIC

Description Usage Arguments Value Examples

View source: R/bic.R

Description

Perform Model Selection Using BIC

Usage

1
2
3
4
model.search(x, y, base.model.tree, plot.gp = FALSE, reset.params = FALSE,
  max.new.nodes = 3, revisit.kernels = TRUE,
  scoring.function = bayesian.information.criterion,
  return.all.models = FALSE, alternate.scoring.functions = list(), ...)

Arguments

x

A matrix or data frame of predictors

y

A numeric vector of responses

base.model.tree

The model tree at which the search starts

plot.gp

Whether to plot the gaussian processes encountered during the search. If ncol(x) > 1 this parameter is ignored and no plots are created.

reset.params

By default the search starts with the optimum hyperparameter values found in the previous step in the search (with new hyperparameters fitted from random start points). Setting this to TRUE causes all hyperparameters to be randomly set at each step.

max.new.nodes

The number of kernel instances to add to the base model.

revisit.kernels

Whether to revisit previously-assessed kernels when deleting nodes from the current best candidate.

scoring.function

The scoring function for the GPs in the search. Must take a trained gaussianProcess object as its only parameter, and return a scalar score. If scoring.function returns a numeric vector only the first entry will be used.

...

Additional parameters to be passed to gp.obj$fit.hyperparameters (see gaussianProcess)

Value

The trained gaussianProcess object with the best BIC.

Examples

1
2
3
4
x <- rnorm(50)
y <- sin(1/(x^2 + 0.15))
mt <- create.model.tree.builtin()
gp <- model.search(x, y, mt)

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