Skip to content

Classification Example Explanation

Example-based explanations for classification tree-based models.

This module provides wrapper classes that extend scikit-learn classifiers with example-based explainability capabilities through the ExplanationMixin.

ExtraTreesClassifierExplained

Bases: ExplanationMixin, ExtraTreesClassifier

Extremely Randomized Trees classifier with example-based explanations.

Extends ExtraTreesClassifier with methods for generating interpretable instance-level explanations.

Source code in woodtapper/example_sampling/classification_explanation.py
24
25
26
27
28
29
class ExtraTreesClassifierExplained(ExplanationMixin, ExtraTreesClassifier):
    """Extremely Randomized Trees classifier with example-based explanations.

    Extends ExtraTreesClassifier with methods for generating interpretable
    instance-level explanations.
    """

GradientBoostingClassifierExplained

Bases: ExplanationMixin, GradientBoostingClassifier

Gradient Boosting classifier with example-based explanations.

Extends GradientBoostingClassifier with methods for generating interpretable instance-level explanations.

Source code in woodtapper/example_sampling/classification_explanation.py
32
33
34
35
36
37
class GradientBoostingClassifierExplained(ExplanationMixin, GradientBoostingClassifier):
    """Gradient Boosting classifier with example-based explanations.

    Extends GradientBoostingClassifier with methods for generating interpretable
    instance-level explanations.
    """

RandomForestClassifierExplained

Bases: ExplanationMixin, RandomForestClassifier

Random Forest classifier with example-based explanations.

Extends RandomForestClassifier with methods for generating interpretable instance-level explanations.

Source code in woodtapper/example_sampling/classification_explanation.py
16
17
18
19
20
21
class RandomForestClassifierExplained(ExplanationMixin, RandomForestClassifier):
    """Random Forest classifier with example-based explanations.

    Extends RandomForestClassifier with methods for generating interpretable
    instance-level explanations.
    """