sample_coalition_table | R Documentation |
Get table with sampled coalitions using the semi-deterministic sampling approach
sample_coalition_table(
m,
n_coalitions = 200,
n_coal_each_size = choose(m, seq(m - 1)),
weight_zero_m = 10^6,
paired_shap_sampling = TRUE,
prev_X = NULL,
kernelSHAP_reweighting = "on_all_cond",
semi_deterministic_sampling = FALSE,
dt_coal_samp_info = NULL,
dt_valid_causal_coalitions = NULL,
n_samps_scale = 10
)
m |
Positive integer. Total number of features/groups. |
n_coalitions |
Positive integer.
Note that if |
n_coal_each_size |
Vector of integers of length |
weight_zero_m |
Numeric. The value to use as a replacement for infinite coalition weights when doing numerical operations. |
paired_shap_sampling |
Logical. Whether to do paired sampling of coalitions. |
prev_X |
data.table. The X data.table from the previous iteration. |
kernelSHAP_reweighting |
String.
How to reweight the sampling frequency weights in the kernelSHAP solution after sampling.
The aim of this is to reduce the randomness and thereby the variance of the Shapley value estimates.
The options are one of |
semi_deterministic_sampling |
Logical.
If |
dt_coal_samp_info |
data.table. The data.table contains information about the which coalitions should be
deterministically included and which can be sampled, in addition to the sampling probabilities of each available
coalition size, and the weight given to the sampled and deterministically included coalitions (excluding empty and
grand coalitions which are given the |
dt_valid_causal_coalitions |
data.table. Only applicable for asymmetric Shapley
values explanations, and is |
n_samps_scale |
Positive integer.
Integer that scales the number of coalitions |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.