]> granicus.if.org Git - liblinear/commitdiff
add LR dual for matlab interface
authorcjlin <cjlin@16e7d947-dcc2-db11-b54a-0017319806e7>
Sun, 5 Sep 2010 13:57:28 +0000 (13:57 +0000)
committercjlin <cjlin@16e7d947-dcc2-db11-b54a-0017319806e7>
Sun, 5 Sep 2010 13:57:28 +0000 (13:57 +0000)
matlab/train.c

index 6d6fbf9ff2c0cb21325e891cf285f43d91e36425..2eb77f000cba7bf8c548750a5e324a29ed0b2548 100644 (file)
@@ -24,19 +24,20 @@ void exit_with_help()
        "Usage: model = train(training_label_vector, training_instance_matrix, 'liblinear_options', 'col');\n"
        "liblinear_options:\n"
        "-s type : set type of solver (default 1)\n"
-       "       0 -- L2-regularized logistic regression\n"
+       "       0 -- L2-regularized logistic regression (primal)\n"
        "       1 -- L2-regularized L2-loss support vector classification (dual)\n"     
        "       2 -- L2-regularized L2-loss support vector classification (primal)\n"
        "       3 -- L2-regularized L1-loss support vector classification (dual)\n"
        "       4 -- multi-class support vector classification by Crammer and Singer\n"
        "       5 -- L1-regularized L2-loss support vector classification\n"
        "       6 -- L1-regularized logistic regression\n"
+       "       7 -- L2-regularized logistic regression (dual)\n"
        "-c cost : set the parameter C (default 1)\n"
        "-e epsilon : set tolerance of termination criterion\n"
        "       -s 0 and 2\n" 
        "               |f'(w)|_2 <= eps*min(pos,neg)/l*|f'(w0)|_2,\n" 
        "               where f is the primal function, (default 0.01)\n"
-       "       -s 1, 3, and 4\n"
+       "       -s 1, 3, 4 and 7\n"
        "               Dual maximal violation <= eps; similar to libsvm (default 0.1)\n"
        "       -s 5 and 6\n"
        "               |f'(w)|_inf <= eps*min(pos,neg)/l*|f'(w0)|_inf,\n"
@@ -171,7 +172,7 @@ int parse_command_line(int nrhs, const mxArray *prhs[], char *model_file_name)
        {
                if(param.solver_type == L2R_LR || param.solver_type == L2R_L2LOSS_SVC)
                        param.eps = 0.01;
-               else if(param.solver_type == L2R_L2LOSS_SVC_DUAL || param.solver_type == L2R_L1LOSS_SVC_DUAL || param.solver_type == MCSVM_CS)
+               else if(param.solver_type == L2R_L2LOSS_SVC_DUAL || param.solver_type == L2R_L1LOSS_SVC_DUAL || param.solver_type == MCSVM_CS || param.solver_type == L2R_LR_DUAL)
                        param.eps = 0.1;
                else if(param.solver_type == L1R_L2LOSS_SVC || param.solver_type == L1R_LR)
                        param.eps = 0.01;