From: Chih-Jen Lin Date: Wed, 4 Nov 2020 07:20:10 +0000 (+0800) Subject: In train_one we specify max_iter of dual solvers to be 300, but X-Git-Tag: v243~13 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=02acaf9a125837792438b172a06cc4f37b7d3755;p=liblinear In train_one we specify max_iter of dual solvers to be 300, but the default max_iter in function definition was 500. For example, static int solve_l2r_l1l2_svc(const problem *prob, const parameter *param, double *w, double Cp, double Cn, int max_iter=500) Now 500 is changed to 300 to reflect what we really used. --- diff --git a/linear.cpp b/linear.cpp index 5426533..59c23ed 100644 --- a/linear.cpp +++ b/linear.cpp @@ -898,7 +898,7 @@ void Solver_MCSVM_CS::Solve(double *w) #define GETI(i) (y[i]+1) // To support weights for instances, use GETI(i) (i) -static int solve_l2r_l1l2_svc(const problem *prob, const parameter *param, double *w, double Cp, double Cn, int max_iter=500) +static int solve_l2r_l1l2_svc(const problem *prob, const parameter *param, double *w, double Cp, double Cn, int max_iter=300) { int l = prob->l; int w_size = prob->n; @@ -1103,7 +1103,7 @@ static int solve_l2r_l1l2_svc(const problem *prob, const parameter *param, doubl #define GETI(i) (0) // To support weights for instances, use GETI(i) (i) -static int solve_l2r_l1l2_svr(const problem *prob, const parameter *param, double *w, int max_iter=500) +static int solve_l2r_l1l2_svr(const problem *prob, const parameter *param, double *w, int max_iter=300) { const int solver_type = param->solver_type; int l = prob->l; @@ -1311,7 +1311,7 @@ static int solve_l2r_l1l2_svr(const problem *prob, const parameter *param, doubl #define GETI(i) (y[i]+1) // To support weights for instances, use GETI(i) (i) -static int solve_l2r_lr_dual(const problem *prob, const parameter *param, double *w, double Cp, double Cn, int max_iter=500) +static int solve_l2r_lr_dual(const problem *prob, const parameter *param, double *w, double Cp, double Cn, int max_iter=300) { int l = prob->l; int w_size = prob->n;