Title: | Gausian Process Emulator |
---|---|
Description: | Implementation of a Gaussian Process model (both likelihood and bayesian approaches) for kriging and model emulation. Includes functions for sampling design and prediction. |
Authors: | Mike Dietze [aut, cre], University of Illinois, NCSA [cph] |
Maintainer: | Mike Dietze <[email protected]> |
License: | BSD_3_clause + file LICENSE |
Version: | 1.8.0.9000 |
Built: | 2024-11-20 22:21:06 UTC |
Source: | https://github.com/PecanProject/pecan |
Acceptance rate
arate(x)
arate(x)
x |
vector of MCMC samples |
Michael Dietze
calcSpatialCov
calcSpatialCov(x, ...)
calcSpatialCov(x, ...)
x |
either a spatial distance matrix or a list of component spatial distance matrices |
... |
Additional arguments |
Michael Dietze
Currently assumes an exponential spatial dependency
## S3 method for class 'list' calcSpatialCov(d, psi, tau)
## S3 method for class 'list' calcSpatialCov(d, psi, tau)
d |
list of component spatial distance matrices |
psi |
spatial corr |
tau |
spatial var |
can make gaussian by passing squared distance matrix
Michael Dietze
Currently assumes an exponential spatial dependency
## S3 method for class 'matrix' calcSpatialCov(d, psi, tau)
## S3 method for class 'matrix' calcSpatialCov(d, psi, tau)
d |
spatial distance matrix |
psi |
spatial corr |
tau |
spatial var |
can make gaussian by passing squared distance matrix
Michael Dietze
distance
distance(x, power = 1)
distance(x, power = 1)
x |
matrix of locations in physical or parameter space |
power |
exponent used for calculating distance, default value of 2 = Pythagorean distance |
dst
Michael Dietze
distance.matrix
distance.matrix(x, power = 1, dim = 2)
distance.matrix(x, power = 1, dim = 2)
x |
matrix of locations in physical or parameter space |
power |
exponent used for calculating distance, default value of 2 = Pythagorean distance |
dim |
dimenstion |
d
Michael Dietze
distance12.matrix
distance12.matrix(x, n1, power = 1)
distance12.matrix(x, n1, power = 1)
x |
matrix of locations in parameter space |
n1 |
number of rows in the original dataset |
power |
exponent used for calculating distance, default value of 2 = Pythagorean distance |
d
Michael Dietze
GaussProcess
GaussProcess( x, y, isotropic = TRUE, nugget = TRUE, method = "bayes", ngibbs = 5000, burnin = 1000, thin = 1, jump.ic = c(1.1, 0.2), prior = "IG", mix = "joint", psi = NULL, zeroMean = FALSE, exclude = NULL, ... )
GaussProcess( x, y, isotropic = TRUE, nugget = TRUE, method = "bayes", ngibbs = 5000, burnin = 1000, thin = 1, jump.ic = c(1.1, 0.2), prior = "IG", mix = "joint", psi = NULL, zeroMean = FALSE, exclude = NULL, ... )
x |
set of independent variables |
y |
dependent variable |
isotropic |
Boolean indicating whether the GP is fit isotropically. If FALSE, distances are calculated deparately for each direction |
nugget |
allows additional error in Y rather than fix interpolation to go through points |
method |
method for calculating correlations |
ngibbs |
number of MCMC iterations (per chain) to run |
burnin |
Number of samples to discard as burnin (auto must be FALSE) |
thin |
thinning of the matrix to make things faster. Default is to thin to 1 |
jump.ic |
initial condition for jump standard deviation. |
prior |
'unif', 'IG' |
mix |
joint=mix over psi simultanously, each=mix over psi individually |
psi |
spatial corr |
zeroMean |
True if mean is 0, else false |
exclude |
<- isn't used anywhere, should be dropped |
... |
Additional arguments |
Michael Dietze
gp_mle
gp_mle(theta, d, nugget, myY, maxval = Inf)
gp_mle(theta, d, nugget, myY, maxval = Inf)
theta |
proposed parameter vector: [mu, tauw, tauv, phi1...phiK] |
d |
spatial distance matrix |
nugget |
allows additional error in Y rather than fix interpolation to go through points |
myY |
vector of observed data |
maxval |
maximum value |
val
Michael Dietze
zero mean version
gp_mle2(theta, d, nugget, myY, maxval = Inf)
gp_mle2(theta, d, nugget, myY, maxval = Inf)
theta |
proposed parameter vector: [mu, tauw, tauv, phi1...phiK] |
d |
spatial distance matrix |
nugget |
allows additional error in Y rather than fix interpolation to go through points |
myY |
vector of observed data |
maxval |
maximum value |
groupid
groupid(x)
groupid(x)
x |
matrix of parameter values |
Michael Dietze
jump
jump(ic = 0, rate = 0.4, ...)
jump(ic = 0, rate = 0.4, ...)
ic |
optional data vector |
rate |
target acceptance rate |
... |
Addtional arguments |
Michael Dietze
define a class for automatically tuning jump distributions
Michael Dietze
Log-dinvgamma, based on MCMCpack
ldinvgamma(x, shape, scale = 1)
ldinvgamma(x, shape, scale = 1)
x |
vector of quantiles |
shape , scale
|
shape and scale parameters for the inverse Gamma distribution |
log.density
Michael Dietze
Latin Hyper Cube
lhc(x, n.samp)
lhc(x, n.samp)
x |
<- list (n.dim x 2) |
n.samp |
number of samples |
Simple uniform sampling with LHC permutation
Michael Dietze
multivariate version
mvjump(ic = 0, rate = 0.4, nc = 2, ...)
mvjump(ic = 0, rate = 0.4, nc = 2, ...)
ic |
optional data vector |
rate |
target acceptance rate |
nc |
NetCDF object containing target variable |
... |
Additional arguments |
nderiv
nderiv(x, y)
nderiv(x, y)
x |
Name of variable to plot on X axis |
y |
Name of variable to plot on Y axis |
der
Michael Dietze
p.jump
## S3 method for class 'jump' p(jmp)
## S3 method for class 'jump' p(jmp)
jmp |
jump parameter |
Michael Dietze
p.mvjump
## S3 method for class 'mvjump' p(jmp)
## S3 method for class 'mvjump' p(jmp)
jmp |
jump parameter |
plot.jump
## S3 method for class 'jump' plot(jmp)
## S3 method for class 'jump' plot(jmp)
jmp |
jump parameter |
Michael Dietze
plot.mvjump
## S3 method for class 'mvjump' plot(jmp)
## S3 method for class 'mvjump' plot(jmp)
jmp |
jump parameter |
Michael Dietze
Simple interpolation of a density object to new points
## S3 method for class 'density' predict(den, xnew)
## S3 method for class 'density' predict(den, xnew)
den |
density object |
xnew |
new x coordinate |
ynew
Michael Dietze
predict.GP
## S3 method for class 'GP' predict(gp, xpred, cI = NULL, pI = NULL, splinefcns = NULL)
## S3 method for class 'GP' predict(gp, xpred, cI = NULL, pI = NULL, splinefcns = NULL)
gp |
Gaussian Process |
xpred |
value of x where prediction should be made |
cI |
credible interval |
pI |
prediction interval |
splinefcns |
spline functions |
Michael Dietze
summarize.GP
summarize.GP(gp, pdf_file = NULL, txt_file = NULL)
summarize.GP(gp, pdf_file = NULL, txt_file = NULL)
gp |
Gaussian Process |
pdf_file |
filename you want figures written out to |
txt_file |
filename you want figures written out to |
Michael Dietze
update.jump
## S3 method for class 'jump' update(jmp, chain)
## S3 method for class 'jump' update(jmp, chain)
jmp |
jump parameter |
chain |
mcmc chain |
jmp updated jump parameter
Michael Dietze
update.mvjump
## S3 method for class 'mvjump' update(jmp, chain)
## S3 method for class 'mvjump' update(jmp, chain)
jmp |
jump parameter |
chain |
mcmc chain |