emulator-package | R Documentation |
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.
The DESCRIPTION file:
This package was not yet installed at build time.
Index: This package was not yet installed at build time.
Robin K. S. Hankin [aut, cre] (<https://orcid.org/0000-0001-5982-0415>)
Maintainer: Robin K. S. Hankin <hankin.robin@gmail.com>
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)
## 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.