| extract_shap | R Documentation |
Computes SHAP values for feature values using a
familiarEnsemble.
extract_shap(
object,
data,
cl = NULL,
features = NULL,
n_sample_points = 20L,
shap_tolerance = waiver(),
shap_max_iterations = waiver(),
shap_phi_0 = waiver(),
ensemble_method = waiver(),
evaluation_times = waiver(),
sample_limit = waiver(),
detail_level = waiver(),
aggregate_results = waiver(),
n_important_features = waiver(),
is_pre_processed = FALSE,
message_indent = 0L,
verbose = FALSE,
...
)
object |
A |
data |
A |
cl |
Cluster created using the |
features |
Features for whose values SHAP values need to be computed. defaults to all features in the model. |
n_sample_points |
Minimum number of values to sample for numeric features. By default, this is based on input dataset. But if the number of values of a feature within that dataset is too low, additional values are drawn from the feature distribution (stored with the model). |
shap_tolerance |
Relative tolerance for convergence of SHAP values. The tolerance is scaled with the range in SHAP values. Default: 0.05. |
shap_max_iterations |
Maximum iterations for convergence of SHAP values. Default: 1000 |
shap_phi_0 |
Reference predicted value(s). Determined from data by default. |
ensemble_method |
Method for ensembling predictions from models for the same sample. Available methods are:
|
evaluation_times |
One or more time points that are used for in analysis
of survival problems when data has to be assessed at a set time, e.g.
calibration. If not provided explicitly, this parameter is read from
settings used at creation of the underlying |
sample_limit |
(optional) Set the upper limit of the number of samples that are used during evaluation steps. Cannot be fewer than 20. This setting can be specified per data element by providing a parameter
value in a named list with data elements, e.g.
This parameter can be set for the following data elements:
|
detail_level |
(optional) Sets the level at which results are computed and aggregated.
Note that each level of detail has a different interpretation for bootstrap
confidence intervals. For
A non-default If results are computed from 10 samples or fewer, |
aggregate_results |
(optional) Flag that signifies whether results
should be aggregated during evaluation. If The default value is equal to As with |
n_important_features |
(optional) Set the number of features that are evaluated in evaluation steps. Cannot be 0 or fewer. This setting can be specified per data element by providing a parameter
value in a named list with data elements, e.g.
This parameter can be set for the following data elements:
|
is_pre_processed |
Flag that indicates whether the data was already
pre-processed externally, e.g. normalised and clustered. Only used if the
|
message_indent |
Number of indentation steps for messages shown during computation and extraction of various data elements. |
verbose |
Flag to indicate whether feedback should be provided on the computation and extraction of various data elements. |
... |
Unused arguments. |
A list of familiarDataElements with SHAP values.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.