GauPro v0.2.2

0

Monthly downloads

0th

Percentile

Gaussian Process Fitting

Fits a Gaussian process model to data. Gaussian processes are commonly used in computer experiments to fit an interpolating model. The model is stored as an 'R6' object and can be easily updated with new data. There are options to run in parallel (not for Windows), and 'Rcpp' has been used to speed up calculations. Other R packages that perform similar calculations include 'laGP', 'DiceKriging', 'GPfit', and 'mlegp'.

Readme

GauPro

Travis-CI Build Status CRAN\_Status\_Badge codecov

Overview

This package allows you to fit a Gaussian process to a dataset. A Gaussian process is a commonly used model in computer simulation. It assumes that the distribution of any set of points is multivariate normal with a constant mean and a correlation function.

The newest release allows you to use different kernel and trend functions, instead of just a squared exponential covariance.

You should probably use a different package for your modeling, such as laGP, mlegp, or GPfit if you are using R, or GPy if you are using Python.

Installation

You can install like any other package

install.packages('GauPro')

The most up-to-date version can be downloaded from my Github account.

# install.packages("devtools")
devtools::install_github("CollinErickson/GauPro")

Examples in 1-Dimension

Fit a sine curve with noise.

n <- 12
x <- matrix(seq(0,1,length.out = n), ncol=1)
y <- sin(2*pi*x) + rnorm(n,0,1e-1)
gp <- GauPro::GauPro(X=x, Z=y)
curve(gp$pred(x));points(x,y)
curve(gp$pred(x)+2*gp$pred(x,T)$se,col=2,add=T);curve(gp$pred(x)-2*gp$pred(x,T)$se,col=2,add=T)

This is the likelihood as a function of the log of theta. It is not convex and is difficult to optimize in general.

curve(sapply(x, gp$deviance_theta_log),-10,10, n = 300) # deviance profile

Fit a sawtooth function with no noise.

n <- 12
x <- matrix(seq(0,1,length.out = n), ncol=1)
y <- (2*x) %%1
gp <- GauPro::GauPro(X=x, Z=y)
curve(gp$pred(x));points(x,y)
curve(gp$pred(x)+2*gp$pred(x,T)$se,col=2,add=T);curve(gp$pred(x)-2*gp$pred(x,T)$se,col=2,add=T)

curve(sapply(x, gp$deviance_theta_log),-10,10, n = 300) # deviance profile

Functions in GauPro

Name Description
GauPro_Gauss Corr Gauss GP using inherited optim
GauPro_base Class providing object with methods for fitting a GP model
corr_gauss_matrix_symC Correlation Gaussian matrix in C (symmetric)
corr_gauss_matrix_sym_armaC Correlation Gaussian matrix in C using Armadillo (symmetric)
Exponential Exponential Kernel R6 class
GauPro GauPro_selector
Gaussian_hessianC Calculate Hessian for a GP with Gaussian correlation
Gaussian_hessianCC Gaussian hessian in C
plot.GauPro Plot for class GauPro
+.GauPro_kernel Kernel sum
GauPro_kernel Kernel R6 class
GauPro_kernel_beta Beta Kernel R6 class
RatQuad Rational Quadratic Kernel R6 class
Gaussian Gaussian Kernel R6 class
Gaussian_devianceC Calculate the Gaussian deviance in C
Gaussian_hessianR Calculate Hessian for a GP with Gaussian correlation
Matern32 Matern 3/2 Kernel R6 class
trend_c Trend R6 class
kernel_product Gaussian Kernel R6 class
kernel_sum Gaussian Kernel R6 class
corr_gauss_matrix Gaussian correlation
trend_0 Trend R6 class
trend_LM Trend R6 class
GauPro_kernel_model GauPro model that uses kernels
GauPro_trend Trend R6 class
Matern52 Matern 5/2 Kernel R6 class
Periodic Periodic Kernel R6 class
predict.GauPro Predict for class GauPro
*.GauPro_kernel Kernel product
No Results!

Vignettes of GauPro

Name
CrossValidationErrorCorrection.Rmd
GauPro.Rmd
IntroductionToGPs.Rmd
derivatives.Rmd
surface_derivatives.Rmd
No Results!

Last month downloads

Details

Type Package
License GPL-3
LazyData TRUE
LinkingTo Rcpp, RcppArmadillo
RoxygenNote 6.0.1
VignetteBuilder knitr
NeedsCompilation yes
Packaged 2017-09-11 02:50:29 UTC; cbe117
Repository CRAN
Date/Publication 2017-09-11 08:22:23 UTC

Include our badge in your README

[![Rdoc](http://www.rdocumentation.org/badges/version/GauPro)](http://www.rdocumentation.org/packages/GauPro)