Learn R Programming

IGP: Interchangeable Gaussian Processes

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:

# install.packages("devtools")
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.

PackagePlatform
DiceKrigingR
GauProR
GPfitR
laGPR
mlegpR
tgpR
DACE (GitHub only)MATLAB
GPML (GitHub only)MATLAB
GPyPython
sklearnPython

Copy Link

Version

Install

install.packages('IGP')

Monthly Downloads

18

Version

0.2.1

License

GPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

Collin Erickson

Last Published

January 15th, 2023

Functions in IGP (0.2.1)

IGP_LOOEC_laGP_GauPro

IGP R6 object for fitting laGP_GauPro model with leave-one-out error correction
IGP_DiceKriging

IGP R6 object for fitting DiceKriging model
IGP_GPfit

IGP R6 object for fitting GPfit model
IGP_GauPro

IGP R6 object for fitting GauPro model
IGP_GPy

IGP R6 object for fitting GPy model
IGP_base

UGP Class providing object with methods for fitting a GP model
IGP

IGP general function
IGP_CGP

IGP R6 object for fitting CGP model
IGP_GauPro_kernel

IGP R6 object for fitting GauPro model
IGP_LOOEC_GauPro_kernel

IGP R6 object for fitting GauPro model
IGP_tgp

IGP R6 object for fitting tgp model
IGP_mlegp

IGP R6 object for fitting mlegp model
IGP_laGP_GauPro_kernel

IGP R6 object for fitting laGP_GauPro_kernel model
predict.IGP

Predict for class IGP
IGP_hetGP

IGP R6 object for fitting hetGP model
IGP_laGP

IGP R6 object for fitting laGP model
IGP_laGP_GauPro

IGP R6 object for fitting laGP_GauPro model
IGP_sklearn

IGP R6 object for fitting sklearn model