'Can I generate the hinge loss of a multiclass svm test result with sklearn?
The dummy version of the code is:
feature = []
label = []
xtrain,ytrain,xtest,ytest = train_test_split(feature,label, test_size = 0.3)
clf=svm.SVC(C=10,kernel='rbf')
I saw that there is a function hinge_loss() from the sklearn library, but it seems that it is only for linear svm? Can I calculate the hinge loss of the classifier in the sample code above with this hinge_loss() function? Or do I have to manually state out the hinge loss function for the multiclass svm with a rbf kernel like
loss_function=max(0,1 y_test*...)
# the line above was just a dummy version, as I havent figured out the loss function for the classifier just yet.
I am assuming this is a programming related question so I ask in this forum (was reported by someone before saying my previous questions were not programming related).
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
