You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
See the following faq:
Q: How could I know which training instances are support vectors?
Some LIBLINEAR solvers consider the primal problem, so support vectors
are not obtained during the training procedure. For dual solvers, we
output only the primal weight vector w, so support vectors are not
stored in the model. This is different from LIBSVM.
To know support vectors, you can modify the following loop in
solve_l2r_l1l2_svc() of linear.cpp to print out indices:
for(i=0; i<l; i++)
{
v += alpha[i]*(alpha[i]*diag[GETI(i)] - 2);
if(alpha[i] > 0)
++nSV;
}
Note that we group data in the same class together before calling this
subroutine. Thus the order of your training instances has been changed.
You can sort your data (e.g., positive instances before negative ones)
before using liblinear. Then indices will be the same.
On 2020-04-29 09:09, Jianjing Xu wrote:
Hi, just want to know how can I read the support vectors out (in
python interface)? Thanks.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub [1], or unsubscribe
[2]. [ { ***@***.***": "http://schema.org", ***@***.***": "EmailMessage",
"potentialAction": { ***@***.***": "ViewAction", "target":
"#61", "url":
"#61", "name": "View Issue"
}, "description": "View this Issue on GitHub", "publisher": { ***@***.***":
"Organization", "name": "GitHub", "url": "https://github.com" } } ]
Links:
------
[1] #61
[2]
https://github.com/notifications/unsubscribe-auth/ABI3BHWFGKLWHYKCYAPMFRDRO544JANCNFSM4MTJYAXA
Hi, just want to know how can I read the support vectors out (in python interface)? Thanks.
The text was updated successfully, but these errors were encountered: