Learn R Programming

GPrank (version 0.1.4)

plotGP: Plotting fitted GP models

Description

Function for plotting fitted GP model within its confidence region of 2 standard deviations.

Usage

plotGP(model, col_item = "gray", ylimits = NULL, write_xticks = TRUE,
  write_yticks = TRUE, jitterx = FALSE)

Arguments

model

GP model to be plotted.

col_item

RGB color code which will be used for the color of the GP plot.

ylimits

Numeric vector which contains minimum and maximum limits for the y axis.

write_xticks

Boolean: whether to write x ticks and labels or not

write_yticks

Boolean: whether to write y ticks and labels or not

jitterx

Boolean: whether to jitter duplicated x values or not

Value

Creates the plot of the fitted GP model.

Examples

Run this code
# NOT RUN {
x=as.matrix(seq(1,10))
y=as.matrix(sin(x))
v=as.matrix(runif(10,0,0.5))
kernelTypes=c("rbf","white","fixedvariance")
model=constructModel(x,y,v,kernelTypes)
col_item=getColorVector()[1]
ylimits=c(min(y)-0.1,max(y)+0.1)
plotGP(model,col_item,ylimits)

# }

Run the code above in your browser using DataLab