x_explain_with_NaNs: A 2D matrix, where the missing entries to impute are represented by NaN.
n_MC_samples: Integer. The number of imputed versions we create for each row in x_explain_with_NaNs.
vaeac_model: An initialized vaeac model that we are going to use to generate the MC samples.
checkpoint: List containing the parameters of the vaeac model.
sampler: A sampler object used to sample the MC samples.
batch_size: Positive integer (default is 64). The number of samples to include in each batch during the training of the vaeac model. Used in torch::dataloader().
verbose: String vector or NULL. Specifies the verbosity (printout detail level) through one or more of strings "basic", "progress", "convergence", "shapley" and "vS_details". "basic" (default) displays basic information about the computation which is being performed. "progress displays information about where in the calculation process the function currently is. #' "convergence" displays information on how close to convergence the Shapley value estimates are (only when iterative = TRUE) . "shapley" displays intermediate Shapley value estimates and standard deviations (only when iterative = TRUE)
the final estimates. "vS_details" displays information about the v_S estimates. This is most relevant for approach %in% c("regression_separate", "regression_surrogate", "vaeac"). NULL means no printout. Note that any combination of four strings can be used. E.g. verbose = c("basic", "vS_details") will display basic information + details about the v(S)-estimation process.
seed: Positive integer (default is 1). Seed for reproducibility. Specifies the seed before any randomness based code is being run.
n_explain: Positive integer. The number of explicands.
index_features: Optional integer vector. Used internally in shapr package to index the coalitions.
Returns
A data.table where the missing values (NaN) in x_explain_with_NaNs have been imputed n_MC_samples
times. The data table will contain extra id columns if index_features and n_explain are provided.
Details
Function that imputes the missing values in 2D matrix where each row constitute an individual. The values are sampled from the conditional distribution estimated by a vaeac model.