GauPro (version 0.2.4)

GauPro_base: Class providing object with methods for fitting a GP model

Description

Class providing object with methods for fitting a GP model

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

new(X, Z, corr="Gauss", verbose=0, separable=T, useC=F,useGrad=T, parallel=T, nug.est=T, ...)

This method is used to create object of this class with X and Z as the data.

update(Xnew=NULL, Znew=NULL, Xall=NULL, Zall=NULL, restarts = 5, param_update = T, nug.update = self$nug.est)

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

corr

Type of correlation function

nug.min

Minimum value of nugget

nug

Value of the nugget, is estimated unless told otherwise

separable

Are the dimensions separable?

verbose

0 means nothing printed, 1 prints some, 2 prints most.

useGrad

Should grad be used?

useC

Should C code be used?

parallel

Should the code be run in parallel?

parallel_cores

How many cores are there? It will self detect, do not set yourself.

Active bindings

corr

Type of correlation function

separable

Are the dimensions separable?

Methods

Public methods

Method corr_func()

Usage

GauPro_base$corr_func(...)

Method new()

Usage

GauPro_base$new(
  X,
  Z,
  verbose = 0,
  useC = F,
  useGrad = T,
  parallel = FALSE,
  nug = 1e-06,
  nug.min = 1e-08,
  nug.est = T,
  param.est = TRUE,
  ...
)

Method initialize_GauPr()

Usage

GauPro_base$initialize_GauPr()

Method fit()

Usage

GauPro_base$fit(X, Z)

Method update_K_and_estimates()

Usage

GauPro_base$update_K_and_estimates()

Method predict()

Usage

GauPro_base$predict(XX, se.fit = F, covmat = F, split_speed = T)

Method pred()

Usage

GauPro_base$pred(XX, se.fit = F, covmat = F, split_speed = T)

Method pred_one_matrix()

Usage

GauPro_base$pred_one_matrix(XX, se.fit = F, covmat = F)

Method pred_mean()

Usage

GauPro_base$pred_mean(XX, kx.xx)

Method pred_meanC()

Usage

GauPro_base$pred_meanC(XX, kx.xx)

Method pred_var()

Usage

GauPro_base$pred_var(XX, kxx, kx.xx, covmat = F)

Method pred_LOO()

Usage

GauPro_base$pred_LOO(se.fit = FALSE)

Method cool1Dplot()

Usage

GauPro_base$cool1Dplot(
  n2 = 20,
  nn = 201,
  col2 = "gray",
  xlab = "x",
  ylab = "y",
  xmin = NULL,
  xmax = NULL,
  ymin = NULL,
  ymax = NULL
)

Method plot1D()

Usage

GauPro_base$plot1D(
  n2 = 20,
  nn = 201,
  col2 = 2,
  xlab = "x",
  ylab = "y",
  xmin = NULL,
  xmax = NULL,
  ymin = NULL,
  ymax = NULL
)

Method plot2D()

Usage

GauPro_base$plot2D()

Method loglikelihood()

Usage

GauPro_base$loglikelihood(mu = self$mu_hat, s2 = self$s2_hat)

Method optim()

Usage

GauPro_base$optim(
  restarts = 5,
  param_update = T,
  nug.update = self$nug.est,
  parallel = self$parallel,
  parallel_cores = self$parallel_cores
)

Method optimRestart()

Usage

GauPro_base$optimRestart(
  start.par,
  start.par0,
  param_update,
  nug.update,
  optim.func,
  optim.grad,
  optim.fngr,
  lower,
  upper,
  jit = T
)

Method update()

Usage

GauPro_base$update(
  Xnew = NULL,
  Znew = NULL,
  Xall = NULL,
  Zall = NULL,
  restarts = 5,
  param_update = self$param.est,
  nug.update = self$nug.est,
  no_update = FALSE
)

Method update_data()

Usage

GauPro_base$update_data(Xnew = NULL, Znew = NULL, Xall = NULL, Zall = NULL)

Method update_corrparams()

Usage

GauPro_base$update_corrparams(...)

Method update_nugget()

Usage

GauPro_base$update_nugget(...)

Method deviance_searchnug()

Usage

GauPro_base$deviance_searchnug()

Method nugget_update()

Usage

GauPro_base$nugget_update()

Method grad_norm()

Usage

GauPro_base$grad_norm(XX)

Method sample()

Usage

GauPro_base$sample(XX, n = 1)

Method print()

Usage

GauPro_base$print()

Method clone()

The objects of this class are cloneable with this method.

Usage

GauPro_base$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Examples

Run this code
# NOT RUN {
#n <- 12
#x <- matrix(seq(0,1,length.out = n), ncol=1)
#y <- sin(2*pi*x) + rnorm(n,0,1e-1)
#gp <- GauPro(X=x, Z=y, parallel=FALSE)
# }

Run the code above in your browser using DataLab