]> granicus.if.org Git - liblinear/commitdiff
Add back warning for dual L1-loss SVM and dual L1-loss SVR
authorleepei <leepei@local>
Wed, 11 Nov 2020 19:53:50 +0000 (19:53 +0000)
committerleepei <leepei@local>
Wed, 11 Nov 2020 19:53:50 +0000 (19:53 +0000)
linear.cpp

index e52aa45a45c23e2cade7ed35d5a1fdaaac1d88ae..7e1b2eab236c394832adad0cd129d71fbf282ed7 100644 (file)
@@ -1048,6 +1048,8 @@ static int solve_l2r_l1l2_svc(const problem *prob, const parameter *param, doubl
        }
 
        info("\noptimization finished, #iter = %d\n",iter);
+       if (solver_type == L2R_L1LOSS_SVC_DUAL && iter >= max_iter)
+               info("\nWARNING: reaching max number of iterations\nUsing -s 2 may be faster (also see FAQ)\n\n");
 
        // calculate objective value
 
@@ -1262,6 +1264,8 @@ static int solve_l2r_l1l2_svr(const problem *prob, const parameter *param, doubl
        }
 
        info("\noptimization finished, #iter = %d\n", iter);
+       if(solver_type == L2R_L1LOSS_SVR_DUAL && iter >= max_iter)
+               info("\nWARNING: reaching max number of iterations\nUsing -s 11 may be faster\n\n");
 
        // calculate objective value
        double v = 0;