Learn R Programming

rtemis (version 1.4.3)

explanation_traits: Explanation Methods per Algorithm

Description

What explain does to a model fitted by each supervised algorithm: which estimator setup_SHAP(estimator = "auto") resolves to, whether that answer is exact, which value function it computes, and why.

Usage

explanation_traits(algorithm = NULL)

Value

data.frame: One row per algorithm.

Arguments

algorithm

Optional Character: Name of a supervised algorithm, matched case-insensitively. NULL returns every algorithm.

Author

EDG

Details

The columns:

name

The algorithm, as named by setup_<name>().

estimator

The estimator "auto" resolves to. "KernelSHAP" is the model-agnostic fallback and applies to every algorithm; the others are exact and algorithm-specific.

exact

TRUE if the estimator returns Shapley values rather than an estimate of them, NA where that depends on the fitted model rather than on the algorithm -- an ensemble whose meta-learner turned out to be linear, or a model that has one linear map for a regression or binary outcome but not for a multiclass one. An NA row explains what it did when asked, and refuses with a message naming the reason when it cannot.

perturbation

The value function computed when setup_SHAP(perturbation = ) is left NULL.

rationale

Why this estimator, in one line.

estimator = "kernel" is always available, so a row whose exact is FALSE is saying that estimator = "exact" has nothing to offer for it -- not that the algorithm cannot be explained.

Examples

Run this code
explanation_traits()
explanation_traits("Ranger")
# Which algorithms have an exact estimator?
em <- explanation_traits()
em[["name"]][!is.na(em[["exact"]]) & em[["exact"]]]

Run the code above in your browser using DataLab