observation_impute: Generate permutations of training data using test...

View source: R/approach_empirical.R

observation_imputeR Documentation

Generate permutations of training data using test observations

Description

Generate permutations of training data using test observations

Usage

observation_impute(
  W_kernel,
  S,
  x_train,
  x_explain,
  empirical.eta = 0.7,
  n_samples = 1000
)

Arguments

W_kernel

Numeric matrix. Contains all nonscaled weights between training and test observations for all feature combinations. The dimension equals ⁠n_train x m⁠.

S

Integer matrix of dimension ⁠n_combinations x m⁠, where n_combinations and m equals the total number of sampled/non-sampled feature combinations and the total number of unique features, respectively. Note that m = ncol(x_train).

x_train

Numeric matrix

x_explain

Numeric matrix

n_samples

Positive integer. Indicating the maximum number of samples to use in the Monte Carlo integration for every conditional expectation. See also details.

Value

data.table

Author(s)

Nikolai Sellereite


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