Skip to content

infidelity inherits an overly constraining assert for non-negative explanations #375

Description

@ggiordana

The infidelity metric subclasses the base metric, which has a default assert on the explanation being not all negative (coming from the helpers \ asserts).
The metric does not seem to require this though, looking in the linked paper https://arxiv.org/pdf/1901.09392, as the formula contains a product of the explanation and the perturbation which is signed. Also, taking an abs of the explanation would preserve the magnitude of the feature importance but lose the sign information.
In my case, a binary classification, the sign says whether the feature is promoting the classification y = 1 or 0, and classic explainers like shap can provide all negative explanations.
Shouldn't infidelity avoid this assert? (maybe also other metrics, since it is applied in the base class).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions