mlegp-naming-functions {mlegp} | R Documentation |
mlegp naming functions
Description
Functions that set the design matrix parameter names in a Gaussian process or Gaussian process list or the names of the Gaussian processes in a Gaussian process list
Usage
setParams(x, s)
setGPNames(x, s)
Arguments
x |
an object of type |
s |
a vector of parameter names or Gaussian process names to set |
Details
setParams
sets the parameter names of a Gaussian process (gp
) object or of all Gaussian processes in a Gaussian process list (gp.list
) object. setGPNames
sets the names of the Gaussian processes in an object of type gp.list
Value
the object x
with parameter or Gaussian process names set
Note
Parameter and Gaussian process names are used in the output of various plotting functions. Both of these can also be set when the Gaussian process (list) is created by mlegp
Author(s)
Garrett M. Dancik dancikg@easternct.edu
References
https://github.com/gdancik/mlegp/
See Also
mlegp
for setting parameter and Gaussian process names during object creation
Examples
## fit multiple Gaussian processes to multiple observations ##
x = -5:5
y1 = sin(x) + rnorm(length(x),sd=.1)
y2 = sin(x) + 2*x + rnorm(length(x), sd = .1)
fitMulti = mlegp(x, cbind(y1,y2))
## plot diagnostics with default gp names ##
plot(fitMulti)
## change names and plot again ##
fitMulti = setGPNames(fitMulti, c("y1", "y2"))
plot(fitMulti)
## plot diagnostic for the first Gaussian process, predicted vs. parameter ##
plot(fitMulti[[1]], type = 2)
## change parameter names (of all Gaussian processes) and plot again ##
fitMulti = setParams(fitMulti, "param 1")
plot(fitMulti[[1]], type = 2)