From: cjlin Date: Sun, 5 Sep 2010 13:57:28 +0000 (+0000) Subject: add LR dual for matlab interface X-Git-Tag: v170~4 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5cbb5b8887ee7baf4058395c7f6dfbac3683e4b9;p=liblinear add LR dual for matlab interface --- diff --git a/matlab/train.c b/matlab/train.c index 6d6fbf9..2eb77f0 100644 --- a/matlab/train.c +++ b/matlab/train.c @@ -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;