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
Asked
Active
Viewed 462 times
1 Answers
2
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)

Fred
- 403
- 3
- 9
scoring
parameter in GridSearchCV – Fred Sep 22 '18 at 23:09