generate_predictive_mean_cov: A C++ function to generate predictive mean and cholesky...

View source: R/RcppExports.R

generate_predictive_mean_covR Documentation

A C++ function to generate predictive mean and cholesky decomposition of the scaled covariance function.

Description

The function computes predictive mean and cholesky decomposition of the scaled covariance function.

Usage

generate_predictive_mean_cov(beta, nu, input, X,zero_mean,output,  
testing_input,X_testing, L, LX, theta_hat, sigma2_hat,rr0,r0, 
kernel_type,alpha,method,sample_data)

Arguments

beta

inverse-range parameters.

nu

noise-variance ratio parameter.

input

input matrix.

X

the mean basis function i.e. the trend function.

zero_mean

The mean basis function is zero or not.

output

output matrix.

testing_input

testing input matrix.

X_testing

mean/trend matrix of testing inputs.

L

a lower triangular matrix for the cholesky decomposition of R, the correlation matrix.

LX

a lower triangular matrix for the cholesky decomposition of $X^tR^-1X$. X^tR^{-1}X

theta_hat

estimated mean/trend parameters.

sigma2_hat

estimated variance parameter.

rr0

a matrix of absolute difference between testing inputs and testing inputs.

r0

a matrix of absolute difference between inputs and testing inputs.

kernel_type

Type of kernel. matern_3_2 and matern_5_2 are Matern kernel with roughness parameter 3/2 and 5/2 respectively. pow_exp is power exponential kernel with roughness parameter alpha. If pow_exp is to be used, one needs to specify its roughness parameter alpha.

alpha

Roughness parameters in the kernel functions.

method

method of parameter estimation. post_mode means the marginal posterior mode is used for estimation. mle means the maximum likelihood estimation is used. mmle means the maximum marginal likelihood estimation is used. The post_mode is the default method.

sample_data

a boolean value. If true, the data (which may contain noise) is sampled. If false, the the mean of the data is sampled.

Value

A list of 2 elements. The first is a vector for predictive mean for testing inputs. The second is a scaled covariance matrix of the predictive distribution.

Author(s)

Mengyang Gu [aut, cre], Jesus Palomo [aut], James Berger [aut]

Maintainer: Mengyang Gu <mengyang@pstat.ucsb.edu>

References

Mengyang Gu. (2016). Robust Uncertainty Quantification and Scalable Computation for Computer Models with Massive Output. Ph.D. thesis. Duke University.


RobustGaSP documentation built on June 1, 2022, 9:08 a.m.