How to plot train test error for classification models like Support Vector Classification(SVC). I am using SVC from sklearn module, not able to get train and test errors to plot
Well you haven't defined what "error" means, so I'll just assume that you want the log loss.
First, you need to create your
SVC object telling it you'll want probability estimations:
model = sklearn.svm.SVC(probability=True)
Then you can compute the log loss given said estimation:
probs = model.predict_proba(x) loss = sklearn.metrics.log_loss(y_true=y, y_pred=probs)