plotMainEffects {mlegp}R Documentation

Sensitivity Analysis for Gaussian Processes and Gaussian Process Lists

Description

Plots main effects of Gaussian process design parameters

Usage

plotMainEffects(gp, ylab = "predicted output", graphStyle = 2, verbose = FALSE, no.plot = FALSE, ...)

Arguments

gp an object of class 'gp' or 'gp.list'
ylab optional y-axis label
graphStyle integer indicating the format of the graph, as folllows: 0, no legend; 1, legend on top right of graph; 2, legend to the right of the graph (default).
verbose set verbose to ‘TRUE’ to display status updates while running
no.plot set no.plot to ‘TRUE’ to turn plotting off and to return the main effects
... see Additional argument sections

Details

Implements main effects plots described in Schonlau and Welch (2006), using a prior distribution of all components that is ~ independent U(a,b), where (a,b) corresponds to the (min, max) value of that component in the design. For all parameters, (a,b) can be overwritten via the arguments lower and upper.

For a single Gaussian process, main effects of the specified parameters are plotted; for Gaussian process lists, the main effects of a single parameter for (a subset of) all Gaussian processes in the list are plotted; for functional output, the main effect is caculated by calculating the main effect for each Gaussian process and premultiplying by the UD matrix to obtain the main effect on the functional output.

Main effects for the parameter x of non-functional output will plot the main effect of x evaluated at values seq(min(x), max(x), length.out), where length.out can be specified by the user. For functional output, plotMainEffects considers values of x with length.out equal to 3; the parameter values can also be specified directly via the argument param.values.

If main effects for several parameters are plotted on the same graph, and the ranges for parameters are not identical, they are automatically sclaed to be between 0 and 1.

Additional arguments (described below) will vary depending on whether gp is of type gp or type gp.list.

Value

If no.plot is TRUE, a list with components:

index vector of parameter values
preds vector of corresponding predicted values

Additional Arguments (General)

Additional Arguments (for single Gaussian processes)

Additional Arguments (for Gaussian process lists)

Author(s)

Garrett M. Dancik dancikg@nsula.edu

References

Schonlau, M. and Welch, W. 2006. Screening the Input Variables to a Computer Model Via Analysis of Variance and Visualization, in Screening: Methods for Experimentation in Industry, Drug Discovery, and Genetics. A Dean and S. Lewis, eds. (New York: Springer).

http://users.nsula.edu/dancikg/mlegp/

See Also

FANOVADecomposition for quantifying the importance of main effects

Examples


## fit a Gaussian process ##
x1 = rep(-5:5,3); x2 = kronecker(1:3, rep(1,11))
y = sin(x1) + 2*x2 + rnorm(length(x1),sd=.001)
fit = mlegp(cbind(x1,x2), y)

## plot all main effects
plotMainEffects(fit) 

## Not run: 
   ## library adapt must be loaded for FANOVA=TRUE 
## plot all main effects with FANOVA contributions in legend
plotMainEffects(fit, FANOVA = TRUE) 
## End(Not run)

## plotMainEffects for x2 'manually'
main = plotMainEffects(fit, effects = 2, no.plot=TRUE)
plot(main$index, main$preds, xlab = "x2", ylab = "predicted output")

## fit multiple Gaussian processes ##
x = seq(-5,5)
z1 = 10 - 5*x + rnorm(length(x))
z2 = 4 - 5*x + rnorm(length(x))
z3 = 7*sin(x) + rnorm(length(x))
fitMulti = mlegp(x, cbind(z1,z2,z3), param.names = "x")

# for each gaussian process, plot main effects for parameter 1
plotMainEffects(fitMulti, effects = 1)

# plot the main effect of the first parameter for gaussian processes 1 and 3
plotMainEffects(fitMulti, effects = 1, gp.nums = c(1,3))

## fit multiple Gaussian processes using principle component weights ##
x = seq(-5,5,by=.2)
p = 1:50
y = matrix(0,length(p), length(x))
for (i in p) {
        y[i,] = sin(x) + i + rnorm(length(x), sd  = .01)
}

numPCs = 2
fitPC = mlegp(p, t(y), PC.num = numPCs)

# plot main effects on the functional output ##
plotMainEffects(fitPC, effects = 1, xValues = x)


[Package mlegp version 2.2.6 Index]