| emulator-package {emulator} | R Documentation |
Bayesian Emulation of Computer Programs
Description
Allows one to estimate the output of a computer program, as a function of the input parameters, without actually running it. The computer program is assumed to be a Gaussian process, whose parameters are estimated using Bayesian techniques that give a PDF of expected program output. This PDF is conditional on a training set of runs, each consisting of a point in parameter space and the model output at that point. The emphasis is on complex codes that take weeks or months to run, and that have a large number of undetermined input parameters; many climate prediction models fall into this class. The emulator essentially determines Bayesian posterior estimates of the PDF of the output of a model, conditioned on results from previous runs and a user-specified prior linear model. The package includes functionality to evaluate quadratic forms efficiently.
Details
The DESCRIPTION file:
| Package: | emulator |
| Type: | Package |
| Title: | Bayesian Emulation of Computer Programs |
| Version: | 1.2-24 |
| Authors@R: | person(given=c("Robin", "K. S."), family="Hankin", role = c("aut","cre"), email="hankin.robin@gmail.com", comment = c(ORCID = "0000-0001-5982-0415")) |
| VignetteBuilder: | knitr |
| Depends: | R (>= 3.0.1), mvtnorm |
| Suggests: | knitr,rmarkdown |
| Maintainer: | Robin K. S. Hankin <hankin.robin@gmail.com> |
| Description: | Allows one to estimate the output of a computer program, as a function of the input parameters, without actually running it. The computer program is assumed to be a Gaussian process, whose parameters are estimated using Bayesian techniques that give a PDF of expected program output. This PDF is conditional on a training set of runs, each consisting of a point in parameter space and the model output at that point. The emphasis is on complex codes that take weeks or months to run, and that have a large number of undetermined input parameters; many climate prediction models fall into this class. The emulator essentially determines Bayesian posterior estimates of the PDF of the output of a model, conditioned on results from previous runs and a user-specified prior linear model. The package includes functionality to evaluate quadratic forms efficiently. |
| License: | GPL |
| URL: | https://github.com/RobinHankin/emulator |
| BugReports: | https://github.com/RobinHankin/emulator/issues |
| Author: | Robin K. S. Hankin [aut, cre] (<https://orcid.org/0000-0001-5982-0415>) |
Index of help topics:
OO2002 Implementation of the ideas of Oakley and
O'Hagan 2002
betahat.fun Calculates MLE coefficients of linear fit
corr correlation function for calculating A
emulator-package Bayesian Emulation of Computer Programs
estimator Estimates each known datapoint using the others
as datapoints
expert.estimates Expert estimates for Goldstein input parameters
interpolant Interpolates between known points using
Bayesian estimation
latin.hypercube Latin hypercube design matrix
makeinputfiles Makes input files for condor runs of goldstein
model Simple model for concept checking
optimal.scales Use optimization techniques to find the optimal
scales
pad Simple pad function
prior.b Prior linear fits
quad.form Evaluate a quadratic form efficiently
regressor.basis Regressor basis function
results.table Results from 100 Goldstein runs
s.chi Variance estimator
sample.n.fit Sample from a Gaussian process and fit an
emulator to the points
scales.likelihood Likelihood of roughness parameters
sigmahatsquared Estimator for sigma squared
toy A toy dataset
tr Trace of a matrix
Author(s)
Robin K. S. Hankin [aut, cre] (<https://orcid.org/0000-0001-5982-0415>)
Maintainer: Robin K. S. Hankin <hankin.robin@gmail.com>
References
-
J. Oakley 1999. “Bayesian uncertainty analysis for complex computer codes”, PhD thesis, University of Sheffield.
-
R. K. S. Hankin 2005. “Introducing BACCO, an R bundle for Bayesian analysis of computer code output”, Journal of Statistical Software, 14(16)
Examples
## More detail given in optimal.scales.Rd
scales_true <- c(1,1,1,1,1,4)
## and a real (linear) relation:
real.relation <- function(x){sum( (1:6)*x )}
## Now a design matrix:
val <- latin.hypercube(100,6)
## apply the real relation:
d <- apply(val,1,real.relation)
## and add some suitably correlated Gaussian noise:
A <- corr.matrix(val,scales=scales_true)
d.noisy <- as.vector(rmvnorm(n=1,mean=apply(val,1,real.relation), 0.3*A))
## Now try to predict the values at points x:
x <- latin.hypercube(20,6)
predicted <- int.qq(x,d.noisy,xold=val, Ainv=solve(A),pos.def.matrix=diag(scales_true))
observed <- apply(x,1,real.relation)
par(pty='s')
plot(predicted,observed,xlim=c(4,18),ylim=c(4,18))
abline(0,1)