NuggetKriging::logMargPost
Description
Get the Maximized Log-Marginal Posterior Density of a NuggetKriging
Model
Usage
Python
# k = NuggetKriging(...) k.logMargPost()
R
# k = NuggetKriging(...) k$logMargPost()
Matlab/Octave
% k = NuggetKriging(...) k.logMargPost()
Details
Using the jointly robust prior
\(\pi_{\texttt{JR}}(\boldsymbol{\theta},\, \alpha, \,\sigma^2, \,
\boldsymbol{\beta})\) the marginal or integrated posterior is the
function of \(\boldsymbol{\theta}\) and \(\alpha\) obtained from the
posterior density by marginalizing out the GP variance \(\sigma^2\) and
the vector \(\boldsymbol{\beta}\) of trend coefficients. See
logMargPostFun.NuggetKriging
for the
log-marginal posterior density. By maximizing this function
w.r.t. \(\boldsymbol{\theta}\) and \(\alpha\) we get estimated correlation
ranges which are warranted to be postitive and finite \(0 < \theta_k <
\infty\). The estimated variance ratio is such that \(0 < \alpha < 1\).
Value
The maximal value of the log-marginal posterior density, corresponding to the estimated value of the vector \([\boldsymbol{\theta},\,\alpha]\) where \(\boldsymbol{\theta}\) is the vector of correlation ranges and \(\alpha := \sigma^2/ (\sigma^2 + \tau^2)\) is the ratio of variance \(\texttt{GP} / (\texttt{GP} + \texttt{nugget})\).
Examples
f <- function(x) 1 - 1 / 2 * (sin(12 * x) / (1 + x) + 2 * cos(7 * x) * x^5 + 0.7)
set.seed(123)
X <- as.matrix(runif(10))
y <- f(X) + 0.1 * rnorm(nrow(X))
k <- NuggetKriging(y, X, kernel = "matern3_2", objective="LMP")
print(k)
k$logMargPost()
Results
* data: 10x[0.0455565,0.940467] -> 10x[0.149491,0.940566]
* trend constant (est.): 0.392506
* variance (est.): 0.241091
* covariance:
* kernel: matern3_2
* range (est.): 0.430238
* nugget (est.): 0.00300763
* fit:
* objective: LMP
* optim: BFGS
[1] 6.980068