Augment the training data and the explicands
regression.surrogate_aug_data(
internal,
x,
y_hat = NULL,
index_features = NULL,
augment_masks_as_factor = FALSE,
augment_include_grand = FALSE,
augment_add_id_coal = FALSE,
augment_comb_prob = NULL,
augment_weights = NULL
)
A data.table containing the augmented data.
List.
Holds all parameters, data, functions and computed objects used within explain()
The list contains one or more of the elements parameters
, data
, objects
, iter_list
, timing_list
,
main_timing_list
, output
, and iter_timing_list
.
Data.table containing the training data.
Vector of numerics (optional) containing the predicted responses for the observations in x
.
Array of integers (optional) containing which coalitions to consider. Must be provided if
x
is the explicands.
Logical (default is FALSE
). If TRUE
, then the binary masks are converted
to factors. If FALSE
, then the binary masks are numerics.
Logical (default is FALSE
). If TRUE
, then the grand coalition is included.
If index_features
are provided, then augment_include_grand
has no effect. Note that if we sample the
coalitions then the grand coalition is equally likely to be samples as the other coalitions (or weighted if
augment_comb_prob
is provided).
Logical (default is FALSE
). If TRUE
, an additional column is adding containing
which coalition was applied.
Array of numerics (default is NULL
). The length of the array must match the number of
coalitions being considered, where each entry specifies the probability of sampling the corresponding coalition.
This is useful if we want to generate more training data for some specific coalitions. One possible choice would be
augment_comb_prob = if (use_Shapley_weights) internal$objects$X$shapley_weight[2:actual_n_coalitions] else NULL
.
String (optional). Specifying which type of weights to add to the observations.
If NULL
(default), then no weights are added. If "Shapley"
, then the Shapley weights for the different
coalitions are added to corresponding observations where the coalitions was applied. If uniform
, then
all observations get an equal weight of one.
Lars Henry Berge Olsen