find_reps | R Documentation |
Prepare data for use with mleHetGP
, in particular to find replicated observations
find_reps(
X,
Z,
return.Zlist = TRUE,
rescale = FALSE,
normalize = FALSE,
inputBounds = NULL
)
X |
matrix of design locations, one point per row |
Z |
vector of observations at |
return.Zlist |
to return |
rescale |
if |
normalize |
if |
inputBounds |
optional matrix of known boundaries in original input space, of size 2 times |
Replicates are searched based on character representation, using unique
.
A list with the following elements that can be passed to the main fitting functions, e.g., mleHetGP
and mleHomGP
X0
matrix with unique designs locations, one point per row,
Z0
vector of averaged observations at X0
,
mult
number of replicates at X0
,
Z
vector with all observations, sorted according to X0
,
Zlist
optional list, each element corresponds to observations at a design in X0
,
inputBounds
optional matrix, to rescale back to the original input space,
outputStats
optional vector, with mean and variance of the original outputs.
##------------------------------------------------------------
## 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.