Impute Missing Values Using Vaeac
vaeac_impute_missing_entries(
x_explain_with_NaNs,
n_MC_samples,
vaeac_model,
checkpoint,
sampler,
batch_size,
verbose = NULL,
seed = NULL,
n_explain = NULL,
index_features = NULL
)
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.
A 2D matrix, where the missing entries to impute are represented by NaN
.
Integer. The number of imputed versions we create for each row in x_explain_with_NaNs
.
An initialized vaeac
model that we are going to use to generate the MC samples.
List containing the parameters of the vaeac
model.
A sampler object used to sample the MC samples.
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()
.
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,
in addition to some messages about parameters being sets or checks being unavailable due to specific input.
"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
)
and 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.
Positive integer (default is 1
). Seed for reproducibility. Specifies the seed before any randomness
based code is being run.
Positive integer. The number of explicands.
Optional integer vector. Used internally in shapr package to index the coalitions.
Lars Henry Berge Olsen
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.