]> granicus.if.org Git - liblinear/commitdiff
add -R explanation in README (and mention that generally it's not needed)
authorChih-Jen Lin <cjlin@csie.ntu.edu.tw>
Mon, 20 Jul 2020 01:27:26 +0000 (09:27 +0800)
committerWei-Lin Chiang <infwinston@gmail.com>
Wed, 22 Jul 2020 07:21:56 +0000 (15:21 +0800)
README

diff --git a/README b/README
index b81ad8c9d85bfaea2d70e3f0c980218c16095e56..8a6b3851a011d1d9f1204fd09d3c17df9dc423f5 100644 (file)
--- a/README
+++ b/README
@@ -214,7 +214,15 @@ where
 
 Q is a matrix with Q_ij = x_i^T x_j.
 
-If bias >= 0, w becomes [w; w_{n+1}] and x becomes [x; bias].
+If bias >= 0, w becomes [w; w_{n+1}] and x becomes [x; bias].  For
+example, L2-regularized logistic regression (-s 0) becomes
+
+min_w w^Tw/2 + (w_{n+1})^2/2 + C \sum log(1 + exp(-y_i [w; w_{n+1}]^T[x_i; bias]))
+
+Some may prefer not having (w_{n+1})^2/2 (i.e., bias variable not
+regularized). For primal solvers (-s 0, 2, 5, 6, 11), we provide an
+option -R to remove (w_{n+1})^2/2. However, -R is generally not needed
+as for most data with/without (w_{n+1})^2/2 give similar performances.
 
 The primal-dual relationship implies that -s 1 and -s 2 give the same
 model, -s 0 and -s 7 give the same, and -s 11 and -s 12 give the same.