prepare_data_gaussian_cpp: Generate Gaussian MC samples

View source: R/RcppExports.R

prepare_data_gaussian_cppR Documentation

Generate Gaussian MC samples

Description

Generate Gaussian MC samples

Usage

prepare_data_gaussian_cpp(MC_samples_mat, x_explain_mat, S, mu, cov_mat)

Arguments

MC_samples_mat

arma::mat. Matrix of dimension (n_samples, n_features) containing samples from the univariate standard normal.

x_explain_mat

arma::mat. Matrix of dimension (n_explain, n_features) containing the observations to explain.

S

arma::mat. Matrix of dimension (n_combinations, n_features) containing binary representations of the used coalitions. S cannot contain the empty or grand coalition, i.e., a row containing only zeros or ones. This is not a problem internally in shapr as the empty and grand coalitions treated differently.

mu

arma::vec. Vector of length n_features containing the mean of each feature.

cov_mat

arma::mat. Matrix of dimension (n_features, n_features) containing the pairwise covariance between all pairs of features.

Value

An arma::cube/3D array of dimension (n_samples, n_explain * n_coalitions, n_features), where the columns (,j,) are matrices of dimension (n_samples, n_features) containing the conditional Gaussian MC samples for each explicand and coalition.

Author(s)

Lars Henry Berge Olsen


NorskRegnesentral/shapr documentation built on April 19, 2024, 1:19 p.m.