Plotting the Separating Hyperplane of an SVM in 3D with Matplotlib

I have been struggling how to plot the separating hyperplane of an SVM (a One-class SVM in my case) in a 3D space using matplotlib. There was no apparent way how to convert the decision function output into something that one of the 3D plotting functions could deal with. Fortunately I found a solution which I am going to share in case someone wants to do the same. ...

October 29, 2015 · updated April 30, 2021 · 3 min