Learn R Programming

dgpsi

The R package dgpsi provides R interface to Python package dgpsi for deep and linked Gaussian process emulations using stochastic imputation (SI).

Hassle-free Python Setup
You don't need prior knowledge of Python to start using the package, all you need is a single click in R (see Installation section below) that automatically installs and activates the required Python environment for you!

Features

dgpsi currently has following features:

  • Gaussian process emulations with separable or non-separable squared exponential and Matérn-2.5 kernels.
  • Deep Gaussian process emulations with flexible structures including:
    • multiple layers;
    • multiple GP nodes;
    • separable or non-separable squared exponential and Matérn-2.5 kernels;
    • global input connections;
    • non-Gaussian likelihoods (Poisson, Negative-Binomial, heteroskedastic Gaussian, and Categorical).
  • Linked emulations of feed-forward systems of computer models by linking (D)GP emulators of deterministic individual computer models.
  • Fast Leave-One-Out (LOO) and Out-Of-Sample (OOS) validations for GP, DGP, and linked (D)GP emulators.
  • Multi-core predictions and validations for GP, DGP, and Linked (D)GP emulators.
  • Sequential designs for (D)GP emulators and bundles of (D)GP emulators.
  • Automatic pruning of DGP emulators, both statically and dynamically.
  • Large-scale GP, DGP, and Linked (D)GP emulations.
  • Scalable DGP classification using Stochastic Imputation.
  • Bayesian optimization.

Getting started

Installation

You can install the package from CRAN:

install.packages('dgpsi')

or its development version from GitHub:

devtools::install_github('mingdeyu/dgpsi-R')

After the installation, run

library(dgpsi)

to load the package. To install or activate the required Python environment automatically, you can either run dgpsi::init_py() explicitly or simply call any function from the package. That's it - the package is ready to use!

Note
After loading dgpsi, the package may take some time to compile and initiate the underlying Python environment the first time a function from dgpsi is executed. Any subsequent function calls won't require re-compiling or re-activation of the Python environment, and will be faster.

If you experience Python related issues while using the package, please try to reinstall the Python environment:

dgpsi::init_py(reinstall = T)

Or uninstall completely the Python environment:

dgpsi::init_py(uninstall = T)

and then reinstall:

dgpsi::init_py()

Research Notice

This package is part of an ongoing research initiative. For detailed information about the research aspects and guidelines for use, please refer to our Research Notice.

References

Ming, D. and Williamson, D. (2023) Linked deep Gaussian process emulation for model networks. arXiv:2306.01212

Ming, D., Williamson, D., and Guillas, S. (2023) Deep Gaussian process emulation using stochastic imputation. Technometrics. 65(2), 150-161.

Ming, D. and Guillas, S. (2021) Linked Gaussian process emulation for systems of computer models using Matérn kernels and adaptive design, SIAM/ASA Journal on Uncertainty Quantification. 9(4), 1615-1642.

Copy Link

Version

Install

install.packages('dgpsi')

Monthly Downloads

179

Version

2.5.0

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Deyu Ming

Last Published

December 14th, 2024

Functions in dgpsi (2.5.0)

deserialize

Restore the serialized emulator
design

Sequential design of a (D)GP emulator or a bundle of (D)GP emulators
alm

Locate the next design point(s) for a (D)GP emulator or a bundle of (D)GP emulators using Active Learning MacKay (ALM)
dgp

Deep Gaussian process emulator construction
draw

Validation and diagnostic plots for a sequential design
gp

Gaussian process emulator construction
dgpsi-package

dgpsi: Interface to 'dgpsi' for Deep and Linked Gaussian Process Emulations
combine

Combine layers
pack

Pack GP and DGP emulators into a bundle
predict

Prediction from GP, DGP, or linked (D)GP emulators
plot

Validation plots of a constructed GP, DGP, or linked (D)GP emulator
read

Load the stored emulator
init_py

'python' environment initialization
lgp

Linked (D)GP emulator construction
serialize

Serialize the constructed emulator
mice

Locate the next design point for a (D)GP emulator or a bundle of (D)GP emulators using MICE
unpack

Unpack a bundle of (D)GP emulators
set_imp

Reset number of imputations for a DGP emulator
set_id

Set Emulator ID
update

Update a GP or DGP emulator
prune

Static pruning of a DGP emulator
set_linked_idx

Set linked indices
set_seed

Random seed generator
set_thread_num

Set the number of threads
set_vecchia

Add or remove the Vecchia approximation
nllik

Calculate the predictive negative log-likelihood
summary

Summary of a constructed GP, DGP, or linked (D)GP emulator
vigf

Locate the next design point for a (D)GP emulator or a bundle of (D)GP emulators using VIGF
validate

Validate a constructed GP, DGP, or linked (D)GP emulator
trace_plot

Trace plot for DGP hyperparameters
write

Save the constructed emulator
window

Trim the sequence of hyperparameter estimates within a DGP emulator
get_thread_num

Get the number of threads
continue

Continue training a DGP emulator