Learn R Programming

shapr (version 1.0.4)

observation_impute: 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_MC_samples = 1000
)

Value

data.table

Arguments

W_kernel

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

S

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

x_train

Data.table with training data.

x_explain

Data.table with the features of the observation whose predictions ought to be explained (test data).

Author

Nikolai Sellereite