explanation_methods: Explanation Methods per Algorithm

View source: R/algorithmDB.R

explanation_methodsR Documentation

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_methods(algorithm = NULL)

Arguments

algorithm

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

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.

Value

data.frame: One row per algorithm.

Author(s)

EDG

Examples

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

rtemis documentation built on Oct. 20, 2026, 1:06 a.m.