Wrong loss function
osainz59 opened this issue · comments
Oscar Sainz Jimenez commented
The C
parameter of the LinearSVC should be multiplying the hinge loss and not the regularization method. Also, the l2 regularization method is defined as w.t·w/2
, which is not equal to torch.mean(w ** 2)
.
Lines 51 to 52 in 970eec1
Source: https://www.csie.ntu.edu.tw/~cjlin/papers/libsvm.pdf
Kazuto Nakashima commented
Thank you for reporting. The definition of the L2 penalty has been fixed. The C
parameter still follows the sklearn.svm.SVC
format.