logLikFunc: Compute logLikelihood

View source: R/logLik.R

logLikFuncR Documentation

Compute logLikelihood

Description

Computes and returns the log-likelihood value, the covariance matrix of latent process and covariance structure of a Gaussian Process Classification (GPC) model.

Usage

logLikFunc(par, f, Xf, covtype = "matern5_2", noise.var = 1e-6,
     seed = NULL, MeanTransform = NULL, return.all = FALSE)

Arguments

par

vector contains the coef.m and the log of coef.cov.

f

vector of binary observations (+/-1) corresponding to the class labels.

Xf

a matrix representing the design of experiments.

covtype

a character string specifying the covariance structure for the latent GP. Default is matern5_2.

noise.var

nugget effect. Default is 1e-6.

seed

to fix the seed, default is NULL.

MeanTransform

optional character string specifying a transform of the latent process mean coef.m. If positive (resp. negative), coef.m is constrained to be positive (resp. negative) by an exponential transform.

return.all

an optional boolean. If FALSE, only the log-likelihood is returned; if TRUE, K and cov.fun are also returned. Default is FALSE.

Value

logLik

the log-likelihood.

K

the covariance matrix of latent process.

cov.fun

a DiceKriging object specifying the covariance structure.

Author(s)

Morgane MENZ, Céline HELBERT, Victor PICHENY, François BACHOC. Contributors: Naoual SERRAJI.

References

Bachoc, F., Helbert, C. & Picheny, V. Gaussian process optimization with failures: classification and convergence proof. J Glob Optim 78, 483–506 (2020). \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1007/s10898-020-00920-0")}

Botev, Z., Belzile, L. TruncatedNormal: Truncated Multivariate Normal and Student Distributions. R package version 2.2.2 https://cran.r-project.org/package=TruncatedNormal

Botev, Z. I. (2017), The normal law under linear restrictions:simulation and estimation via minimax tilting, Journal of the Royal Statistical Society, Series B, 79 (1), pp. 1-24.

Roustant, O., Ginsbourger, D. & Deville, Y. Contributors: Chevalier, C. , Richet, Y. DiceKriging: Kriging Methods for Computer Experiments. R package version 1.6.0. https://CRAN.R-project.org/package=DiceKriging.

Examples

# ------------
# A 1D example
# ------------

# Design of Experiments Xf and the corresponding signs f
Xf <- as.matrix(c(0.08, 0.27, 0.42, 0.65, 0.78, 0.84))
f <- c(1, -1, -1, 1, -1, -1)

# loglikelihood and covariance matrix at Xf 
par <- c(coef.cov = 0.1, coef.m = 0)
result <- logLikFunc(par = par, f = f, Xf = Xf, return.all = TRUE)
K <- result$K
logLik <- result$logLik
print(logLik)


GPCsign documentation built on April 4, 2025, 1:55 a.m.

Related to logLikFunc in GPCsign...