From: cjlin Date: Tue, 11 Oct 2011 07:01:35 +0000 (+0000) Subject: indicate in predict option that -b 1 is for logistic regression only X-Git-Tag: v190~13 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=632c4af57f774e1cbace148a69dceab59db99dca;p=liblinear indicate in predict option that -b 1 is for logistic regression only --- diff --git a/README b/README index 4e45c2e..73afde7 100644 --- a/README +++ b/README @@ -193,7 +193,7 @@ and C^m_i = C if m = y_i, Usage: predict [options] test_file model_file output_file options: --b probability_estimates: whether to predict probability estimates, 0 or 1 (default 0) +-b probability_estimates: whether to output probability estimates, 0 or 1 (default 0); currently for logistic regression only Examples ======== diff --git a/matlab/predict.c b/matlab/predict.c index b700a3e..972d249 100644 --- a/matlab/predict.c +++ b/matlab/predict.c @@ -181,9 +181,8 @@ void exit_with_help() mexPrintf( "Usage: [predicted_label, accuracy, decision_values/prob_estimates] = predict(testing_label_vector, testing_instance_matrix, model, 'liblinear_options','col')\n" "liblinear_options:\n" - "-b probability_estimates: whether to predict probability estimates, 0 or 1 (default 0)\n" - "col:\n" - " if 'col' is setted testing_instance_matrix is parsed in column format, otherwise is in row format" + "-b probability_estimates: whether to output probability estimates, 0 or 1 (default 0); currently for logistic regression only\n" + "col: if 'col' is setted testing_instance_matrix is parsed in column format, otherwise is in row format" ); } diff --git a/predict.c b/predict.c index 0b4be97..9c3a9ab 100644 --- a/predict.c +++ b/predict.c @@ -156,7 +156,7 @@ void exit_with_help() printf( "Usage: predict [options] test_file model_file output_file\n" "options:\n" - "-b probability_estimates: whether to output probability estimates, 0 or 1 (default 0)\n" + "-b probability_estimates: whether to output probability estimates, 0 or 1 (default 0); currently for logistic regression only\n" ); exit(1); } diff --git a/python/liblinearutil.py b/python/liblinearutil.py index bf23b5f..8a8b3c0 100644 --- a/python/liblinearutil.py +++ b/python/liblinearutil.py @@ -139,8 +139,7 @@ def predict(y, x, m, options=""): Predict data (y, x) with the SVM model m. "options": - -b probability_estimates: whether to predict probability estimates, - 0 or 1 (default 0); + -b probability_estimates: whether to output probability estimates, 0 or 1 (default 0); currently for logistic regression only The return tuple contains p_labels: a list of predicted labels