Learn R Programming

⚠️There's a newer version (1.0.0) of this package.Take me there.

GpGp

GpGp is an R package for fast approximate Gaussian process computation. The package includes implementations of the Vecchia's (1988) original approximation, as well as several updates to it, including the reordered and grouped versions of the approximation outlined in Guinness (2018).

Installing

The package can be installed from CRAN with the usual R command

install.packages("GpGp")

or directly from Github for the latest version

devtools::install_github("joeguinness/GpGp")

We always recommend using multithreaded linear algebra libraries in R, but for this package in particular, using multithreaded libraries can have a big impact on performance. On a Mac, there is a very simple way to link to the Apple Accelerate Framework. On PC and Linux, it's more complicated, but you can use Microsoft R Open instead, which comes automatically with multithreaded libraries.

Basic Use

The main function for fitting models is called 'fit_model', and the main function for doing predictions is called 'predictions'.

See this youtube video for a tutorial: https://www.youtube.com/watch?v=phyB4n0CDWg&t=4s

Copy Link

Version

Install

install.packages('GpGp')

Monthly Downloads

647

Version

0.4.0

License

MIT + file LICENSE

Maintainer

Joseph Guinness

Last Published

June 9th, 2021

Functions in GpGp (0.4.0)

exponential_isotropic

Isotropic exponential covariance function
matern_anisotropic3D

Geometrically anisotropic Matern covariance function (three dimensions)
L_t_mult

Multiply transpose of approximate Cholesky by a vector
exponential_anisotropic3D_alt

Geometrically anisotropic exponential covariance function (three dimensions, alternate parameterization)
exponential_anisotropic3D

Geometrically anisotropic exponential covariance function (three dimensions)
Linv_mult

Multiply approximate inverse Cholesky by a vector
exponential_sphere

Isotropic exponential covariance function on sphere
get_start_parms

get default starting values of covariance parameters
exponential_anisotropic2D

Geometrically anisotropic exponential covariance function (two dimensions)
exponential_sphere_warp

Deformed exponential covariance function on sphere
cond_sim

Conditional Simulation using Vecchia's approximation
group_obs

Automatic grouping (partitioning) of locations
condition_number

compute condition number of matrix
get_linkfun

get link function, whether locations are lonlat and space time
get_penalty

get penalty function
matern35_scaledim

Matern covariance function, smoothess = 3.5, different range parameter for each dimension
matern_spacetime

Spatial-Temporal Matern covariance function
matern_spheretime_warp

Deformed Matern covariance function on sphere
jason3

Windspeed measurements from Jason-3 Satellite
matern_spacetime_categorical

Space-Time Matern covariance function with random effects for categories
order_coordinate

Sorted coordinate ordering
matern15_isotropic

Isotropic Matern covariance function, smoothness = 1.5
fast_Gp_sim

Approximate GP simulation
matern_anisotropic3D_alt

Geometrically anisotropic Matern covariance function (three dimensions, alternate parameterization)
find_ordered_nn

Find ordered nearest neighbors.
pen_lo

penalize small values of parameter: penalty, 1st deriative, 2nd derivative
exponential_spheretime

Exponential covariance function on sphere x time
exponential_spheretime_warp

Deformed exponential covariance function on sphere
vecchia_meanzero_loglik

Vecchia's approximation to the Gaussian loglikelihood, zero mean
pen_loglo

penalize small values of log parameter: penalty, 1st deriative, 2nd derivative
vecchia_profbeta_loglik

Vecchia's approximation to the Gaussian loglikelihood, with profiled regression coefficients.
fast_Gp_sim_Linv

Approximate GP simulation with specified Linverse
find_ordered_nn_brute

Naive brute force nearest neighbor finder
matern_nonstat_var

Isotropic Matern covariance function, nonstationary variances
matern_sphere_warp

Deformed Matern covariance function on sphere
matern45_isotropic

Isotropic Matern covariance function, smoothness = 4.5
matern_spheretime

Matern covariance function on sphere x time
vecchia_Linv

Entries of inverse Cholesky approximation
matern_scaledim

Matern covariance function, different range parameter for each dimension
vecchia_grouped_meanzero_loglik

Grouped Vecchia approximation to the Gaussian loglikelihood, zero mean
matern15_scaledim

Matern covariance function, smoothess = 1.5, different range parameter for each dimension
matern45_scaledim

Matern covariance function, smoothess = 3.5, different range parameter for each dimension
summary.GpGp_fit

Print summary of GpGp fit
order_dist_to_point

Distance to specified point ordering
matern_categorical

Isotropic Matern covariance function with random effects for categories
order_maxmin

Maximum minimum distance ordering
matern_anisotropic2D

Geometrically anisotropic Matern covariance function (two dimensions)
matern_isotropic

Isotropic Matern covariance function
test_likelihood_object

test likelihood object for NA or Inf values
exponential_spacetime

Spatial-Temporal exponential covariance function
exponential_scaledim

Exponential covariance function, different range parameter for each dimension
GpGp

GpGp: Fast Gaussian Process Computing.
L_mult

Multiply approximate Cholesky by a vector
predictions

Compute Gaussian process predictions using Vecchia's approximations
sph_grad_xyz

compute gradient of spherical harmonics functions
matern25_isotropic

Isotropic Matern covariance function, smoothness = 2.5
fisher_scoring

Fisher scoring algorithm
fit_model

Estimate mean and covariance parameters
matern25_scaledim

Matern covariance function, smoothess = 2.5, different range parameter for each dimension
matern_sphere

Isotropic Matern covariance function on sphere
matern35_isotropic

Isotropic Matern covariance function, smoothness = 3.5
matern_spacetime_categorical_local

Space-Time Matern covariance function with local random effects for categories
order_middleout

Middle-out ordering
vecchia_grouped_profbeta_loglik_grad_info

Grouped Vecchia loglikelihood, gradient, Fisher information
vecchia_grouped_profbeta_loglik

Grouped Vecchia approximation, profiled regression coefficients
pen_hi

penalize large values of parameter: penalty, 1st deriative, 2nd derivative
vecchia_profbeta_loglik_grad_info

Vecchia's loglikelihood, gradient, and Fisher information
expit

expit function and integral of expit function
argo2016

Ocean temperatures from Argo profiling floats
Linv_t_mult

Multiply transpose of approximate inverse Cholesky by a vector
exponential_nonstat_var

Isotropic exponential covariance function, nonstationary variances