# GauPro

## 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
```

## Github

link |

Stars: 0 |

##### Help us keep the lights on

## Dependencies

## Used By

Total: 0

## Releases

## v0.2.2 - Sep 13, 2017

Finally fixed Rcpp error that showed up on Valgrind. Published to CRAN 9/11/2017.

## v0.2.1 - Sep 11, 2017

Had to make some minor fixes from v0.2.0.

## v0.2.0 - Aug 18, 2017

Added kernel models that use kernels and trends.

## v0.1.0 - Oct 12, 2016

First release was accepted to CRAN on 10/11/16.