thundersvm icon indicating copy to clipboard operation
thundersvm copied to clipboard

How to get coef of linear svm?(w, b)

Open black1001 opened this issue 5 years ago • 1 comments

Hello. I want to get the coefficients of linear svm for my own desicion funciton(y=w*x+b), and try in this way:

w = model.coef_.T
b = model.intercept_

but the signs and categories of y cannot correspond.

How can I get w and b, so as to predict the label of y by the sign of w*x+b?

black1001 avatar Jul 01 '20 09:07 black1001

The way you used to obtain w and b is correct. Maybe you have issues in other places?

zeyiwen avatar Jul 23 '20 08:07 zeyiwen