Interchangeable Gaussian Process Models

Creates a Gaussian process model using the specified package. Makes it easy to try different packages in same code, only the package argument needs to be changed. It is essentially a wrapper for the other Gaussian process software packages.


IGP: Interchangeable Gaussian Processes

Travis-CI Build Status CRAN_Status_Badge codecov

This is an R package that provides a single interface for many different Gaussian process modeling software options.

This package was formerly called UGP, for Universal Gaussian processes, but universal has a different meaning in kriging so the name was changed for clarity.

Installation

You can install IGP from GitHub with: devtools::install_github("CollinErickson/IGP")

Example

The following shows a simple example using the R package laGP as the GP code.

set.seed(0)
library(IGP)
package = "laGP"
n <- 20
d <- 1
f1 <- function(x) {abs(sin(2*pi*x[1]))}
X1 <- matrix(runif(n*d),n,d)
Z1 <- apply(X1,1,f1) + rnorm(n, 0, 1e-3)
gp <- IGP(package=package,X=X1,Z=Z1)
 
curve(sapply(x, f1), ylab='y')
curve(gp$predict(matrix(x, ncol=1)) - 2 * gp$predict.se(matrix(x, ncol=1)), col=3, add=T)
curve(gp$predict(matrix(x, ncol=1)) + 2 * gp$predict.se(matrix(x, ncol=1)), col=3, add=T)
curve(gp$predict(matrix(x, ncol=1)), col=2, add=T)
points(X1, Z1, pch=19)

Below is the exact same thing except using the R package GauPro. The predictions made are indistinguishable, meaning that they have fit approximately the same parameter values.

set.seed(0)
package = "GauPro"
gp <- IGP(package=package,X=X1,Z=Z1)
 
curve(sapply(x, f1), ylab='y')
curve(gp$predict(matrix(x, ncol=1)) - 2 * gp$predict.se(matrix(x, ncol=1)), col=3, add=T)
curve(gp$predict(matrix(x, ncol=1)) + 2 * gp$predict.se(matrix(x, ncol=1)), col=3, add=T)
curve(gp$predict(matrix(x, ncol=1)), col=2, add=T)
points(X1, Z1, pch=19)

Package options

The available packages and the platform they run on are shown below. The R packages should run easily. The MATLAB packages are called using the R.matlab R package and have to open a connection to MATLAB. Thus you need to have MATLAB on your computer, it will be slow, and is likely to have problems. Currently the MATLAB packages are not included in the CRAN version of the package, but they can be found on the GitHub repository. The Python packages are called using the R package Python.In.R. It will open a connection to Python and probably will be slow. In addition to requiring that you already have the package (GPy or sklearn) installed, and must be accessible through your default Python path.

Package Platform
DiceKriging R
GauPro R
GPfit R
laGP R
mlegp R
tgp R
DACE (GitHub only) MATLAB
GPML (GitHub only) MATLAB
GPy Python
sklearn Python

News

IGP 0.1.0

  • First release.

  • Recently changed name from UGP to IGP.

  • Added a NEWS.md file to track changes to the package.

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("IGP")

0.1.0 by Collin Erickson, a year ago


https://github.com/CollinErickson/IGP


Report a bug at https://github.com/CollinErickson/IGP/issues


Browse source code at https://github.com/cran/IGP


Authors: Collin Erickson [aut, cre]


Documentation:   PDF Manual  


GPL-3 license


Imports R6, PythonInR

Suggests GPfit, laGP, mlegp, tgp, DiceKriging, GauPro, testthat, lhs, ggplot2, reshape, numDeriv


See at CRAN