gp_plot: Plot 1D Gaussian Process Model

Description Usage Arguments Value Examples

View source: R/gp_plot.R

Description

Plots univariate Gaussian process (GP) models with 95% credible bands. For extremely simply visualizations.

Usage

1
gp_plot(model, inputs, plot_data = FALSE)

Arguments

model

A GP model of class km (see km-class).

inputs

An vector of values at which to evaluate the GP model.

plot_data

Plot data used to fit the GP as well?

Value

A list of GP predictions and uncertainties used to generate the figure.

Examples

1
2
3
4
5
6
7
8
9
x  <- matrix(seq(-1,1,0.3),ncol=1)
y  <- x^2 
gp <- gp_fit(x,
             y,
             options=list(formula=~1, 
             kernel = "matern5_2", 
             optimizer = "gen", 
             nuggetUse = FALSE))
gp_plot(gp$km.model,seq(-1.5,1.5,0.1)) 

GADGET documentation built on Jan. 25, 2020, 1:06 a.m.