]> granicus.if.org Git - liblinear/commitdiff
In train_one we specify max_iter of dual solvers to be 300, but
authorChih-Jen Lin <cjlin@csie.ntu.edu.tw>
Wed, 4 Nov 2020 07:20:10 +0000 (15:20 +0800)
committerChih-Jen Lin <cjlin@csie.ntu.edu.tw>
Wed, 4 Nov 2020 07:20:10 +0000 (15:20 +0800)
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.

linear.cpp

index 5426533064fa9dd6525b27ae46253f3cae5f945b..59c23ede638b979e7cdef6b98514b4f6c269be34 100644 (file)
@@ -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;