Skip to content

How can I create counterfactual explanations on anomaly score? #1031

@Paippi

Description

@Paippi

Hello,

I'm trying to create counterfactual explanations for an OCSVM model (sklearn's OCSVM to be precise). The target is to reduce anomaly score/distance from hyperplane to a given threshold which decides whether the given sample is considered anomalous or not.

The classes Counterfactual & CounterfactualProto both require the output of the predict function to have class probabilities. I also tried looking in to CounterfactualProto but that would require use of a encoder and a decoder, but I don't think I need one (perhaps I could just create a function that just returns the input for the encoder and the decoder?).

So any advice on this? How would I create counterfactual explanations on an OCSVM model?

Thanks in advance!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions