alibi icon indicating copy to clipboard operation
alibi copied to clipboard

How can I create counterfactual explanations on anomaly score?

Open Paippi opened this issue 1 year ago • 0 comments

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!

Paippi avatar Nov 29 '24 20:11 Paippi