GASP_plot {LinkedGASP}R Documentation

Plot of the GASP

Description

Function allows to plot the GASP in case of one-dimensional input.

Usage

GASP_plot(em, fun, data, emul_type, labels, yax, ylab, xlab,ylim,
col_CI_area,col_points,col_fun,col_mean,plot_training = FALSE, plot_fun = TRUE)

Arguments

em

the returned output from the function eval_type1_GASP(...) or eval_type2_GASP(...).

fun

Simulator function. Currently only one-dimensional input is supported.

data

Training data and smoothness. The same as supplied to eval_GASP_RFP(...) for construction of the GASP.

emul_type

A text string which provides description of an emulator.

labels

As in standard R plot.

yax

As in standard R plot.

ylab

As in standard R plot.

xlab

As in standard R plot.

ylim

As in standard R plot.

col_CI_area

Color of a credible area.

col_points

Color of the training points.

col_fun

Color of a simulator function.

col_mean

Color of the emulator of the GASP mean.

plot_training

(Not) to plot the training points. Default is FALSE.

plot_fun

(Not) to plot the simulator function. Default is TRUE.

Value

Plot

Note

The function requires further development to be automated for visualization along a single dimension out of multiple dimensions and along two dimensions out of multiple dimensions.

Author(s)

Ksenia N. Kyzyurova, kseniak.ucoz.net

Examples

## Function f1 is a simulator
f1<-function(x){sin(pi*x)}

## One-dimensional inputs are x1
x1 <- seq(-1,1,.37)

## The following contains the list of data inputs (training) and outputs (fD) together with the 
## assumed fixed smoothness of a computer model output.
data.f1 <- list(training = x1,fD = f1(x1), smooth = 1.99)

## Evaluation of GASP parameters
f1_MLEs = eval_GASP_RFP(data.f1,list(function(x){x^0},function(x){x^1}),1,FALSE)

## Evaluate the emulator
xn = seq(-1,1,.01)
GASP_type1_f1 <- eval_type1_GASP(as.matrix(xn),f1_MLEs)

## Plot the emulator
par(mfrow = c(1,1))
par(mar = c(6.1, 6.1, 5.1, 2.1))
ylim = c(-1.5,1.5)
GASP_plot(GASP_type1_f1,fun = f1,data = data.f1,"",ylim = ylim, plot_training = TRUE)

[Package LinkedGASP version 1.0 Index]