Learn R Programming

IGP (version 0.2.1)

IGP_base: UGP Class providing object with methods for fitting a GP model

Description

UGP Class providing object with methods for fitting a GP model

UGP Class providing object with methods for fitting a GP model

Arguments

Value

Object of R6Class with methods for fitting GP model.

Format

R6Class object.

Methods

Documentation

For full documentation of each method go to https://github.com/CollinErickson/UGP/

new(X=NULL, Z=NULL, package=NULL, corr="gauss", estimate.nugget=T, nugget0=F, ...)

This method is used to create object of this class with X and Z as the data. The package tells it which package to fit the GP model.

Xall=NULL, Zall=NULL, Xnew=NULL, Znew=NULL, ...

This method updates the model, adding new data if given, then running optimization again.

Public fields

X

Design matrix

Z

Responses

N

Number of data points

D

Dimension of data

Active bindings

N

Number of data points

D

Dimension of data

Methods


Method .init()

Usage

IGP_base$.init(...)


Method .update()

Usage

IGP_base$.update(...)


Method .predict()

Usage

IGP_base$.predict(...)


Method .predict.se()

Usage

IGP_base$.predict.se(...)


Method .predict.var()

Usage

IGP_base$.predict.var(...)


Method .delete()

Usage

IGP_base$.delete(...)


Method new()

Usage

IGP_base$new(
  X = NULL,
  Z = NULL,
  package = NULL,
  corr = "gauss",
  estimate.nugget = TRUE,
  nugget0 = 1e-08,
  ...
)


Method init()

Usage

IGP_base$init(X = NULL, Z = NULL, ...)


Method update()

Usage

IGP_base$update(Xall = NULL, Zall = NULL, Xnew = NULL, Znew = NULL, ...)


Method predict()

Usage

IGP_base$predict(XX, se.fit = FALSE, ...)


Method predict.se()

Usage

IGP_base$predict.se(XX, ...)


Method predict.var()

Usage

IGP_base$predict.var(XX, ...)


Method grad()

Usage

IGP_base$grad(XX, num = FALSE)


Method grad_num()

Usage

IGP_base$grad_num(XX)


Method grad_from_theta()

Usage

IGP_base$grad_from_theta(XX, theta)


Method grad_norm()

Usage

IGP_base$grad_norm(XX)


Method sample()

Usage

IGP_base$sample(XX, n = 1)


Method theta()

Usage

IGP_base$theta()


Method nugget()

Usage

IGP_base$nugget()


Method s2()

Usage

IGP_base$s2()


Method mean()

Usage

IGP_base$mean()


Method max.var()

Usage

IGP_base$max.var()


Method at.max.var()

Usage

IGP_base$at.max.var(X, val = 0.9)


Method prop.at.max.var()

Usage

IGP_base$prop.at.max.var(
  Xlims = matrix(c(0, 1), nrow = ncol(self$X), ncol = 2, byrow = T),
  n = 200,
  val = 0.9
)


Method plot()

Usage

IGP_base$plot()


Method delete()

Usage

IGP_base$delete(...)


Method finalize()

Usage

IGP_base$finalize(...)


Method clone()

The objects of this class are cloneable with this method.

Usage

IGP_base$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Examples

Run this code
n <- 40
d <- 2
n2 <- 20
f1 <- function(x) {sin(2*pi*x[1]) + sin(2*pi*x[2])}
X1 <- matrix(runif(n*d),n,d)
Z1 <- apply(X1,1,f1) + rnorm(n, 0, 1e-3)
X2 <- matrix(runif(n2*d),n2,d)
Z2 <- apply(X2,1,f1)
XX1 <- matrix(runif(10),5,2)
ZZ1 <- apply(XX1, 1, f1)
u <- IGP(package='laGP',X=X1,Z=Z1, corr="gauss")
cbind(u$predict(XX1), ZZ1)
u$predict.se(XX1)
u$update(Xnew=X2,Znew=Z2)
u$predict(XX1)
u$delete()

Run the code above in your browser using DataLab