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!
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&CounterfactualProtoboth require the output of thepredictfunction to have class probabilities. I also tried looking in toCounterfactualProtobut 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!