mlegp (version 3.1.8)

mlegp-naming-functions: 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 gp or gp.list

s

a vector of parameter names or Gaussian process names to set

Value

the object x with parameter or Gaussian process names 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

References

https://github.com/gdancik/mlegp/

See Also

mlegp for setting parameter and Gaussian process names during object creation

Examples

Run this code
# NOT RUN {
## 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)
# }

Run the code above in your browser using DataCamp Workspace