find_reps {hetGP}R Documentation

Data preprocessing

Description

Prepare data for use with mleHetGP, in particular to find replicated observations

Usage

find_reps(
  X,
  Z,
  return.Zlist = TRUE,
  rescale = FALSE,
  normalize = FALSE,
  inputBounds = NULL
)

Arguments

X

matrix of design locations, one point per row

Z

vector of observations at X

return.Zlist

to return Zlist, see below

rescale

if TRUE, the inputs are rescaled to the unit hypercube

normalize

if TRUE, the outputs are centered and normalized

inputBounds

optional matrix of known boundaries in original input space, of size 2 times ncol(X). If not provided, and rescale == TRUE, it is estimated from the data.

Details

Replicates are searched based on character representation, using unique.

Value

A list with the following elements that can be passed to the main fitting functions, e.g., mleHetGP and mleHomGP

Examples

##------------------------------------------------------------
## Find replicates on the motorcycle data
##------------------------------------------------------------
## motorcycle data
library(MASS)
X <- matrix(mcycle$times, ncol = 1)
Z <- mcycle$accel

data_m <- find_reps(X, Z)

# Initial data
plot(X, Z, ylim = c(-160, 90), ylab = 'acceleration', xlab = "time")
# Display mean values
points(data_m$X0, data_m$Z0, pch = 20)

[Package hetGP version 1.1.6 Index]