8000 Sample weights in LinearSVC L2 squared hinge primal liblinear solver by melnikovsky · Pull Request #15018 · scikit-learn/scikit-learn · GitHub
[go: up one dir, main page]

Skip to content

Sample weights in LinearSVC L2 squared hinge primal liblinear solver #15018

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions sklearn/svm/src/liblinear/linear.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2287,9 +2287,9 @@ static int train_one(const problem *prob, const parameter *param, double *w, dou
for(int i = 0; i < prob->l; i++)
{
if(prob->y[i] > 0)
C[i] = Cp;
C[i] = sample_weight[i]*Cp;
else
C[i] = Cn;
C[i] = sample_weight[i]*Cn;
}
fun_obj=new l2r_l2_svc_fun(prob, C);
TRON tron_obj(fun_obj, primal_solver_tol, max_iter, blas_functions);
Expand Down
0