[liblinear] 08/123: Updated skeleton man pages for linear-train/linear-predict

Christian Kastner chrisk-guest at moszumanska.debian.org
Tue Aug 26 03:42:03 UTC 2014


This is an automated email from the git hooks/post-receive script.

chrisk-guest pushed a commit to branch master
in repository liblinear.

commit 0085a93075d6cb70dd8b2103473181409881d787
Author: Christian Kastner <debian at kvr.at>
Date:   Thu Jun 17 16:02:24 2010 +0200

    Updated skeleton man pages for linear-train/linear-predict
---
 debian/linear-predict.1 |  62 ++++++++---------
 debian/linear-train.1   | 175 +++++++++++++++++++++++++++++++++++++++---------
 2 files changed, 173 insertions(+), 64 deletions(-)

diff --git a/debian/linear-predict.1 b/debian/linear-predict.1
index 9290650..5446cd7 100644
--- a/debian/linear-predict.1
+++ b/debian/linear-predict.1
@@ -1,47 +1,43 @@
 .\"                                      Hey, EMACS: -*- nroff -*-
-.TH LINEAR-TRAIN 1 "June 12, 2010"
-.\" Please adjust this date whenever revising the manpage.
-.\"
-.\" Some roff macros, for reference:
-.\" .nh        disable hyphenation
-.\" .hy        enable hyphenation
-.\" .ad l      left justify
-.\" .ad b      justify to both left and right margins
-.\" .nf        disable filling
-.\" .fi        enable filling
-.\" .br        insert line break
-.\" .sp <n>    insert n+1 empty lines
-.\" for manpage-specific macros, see man(7)
+.TH LINEAR-PREDICT 1 "June 16, 2010"
 .SH NAME
-linear-train \- bla
+linear-predict \- Make predictions based on a trained linear classifier model
 .SH SYNOPSIS
-.B linear-train
-.RI [ options ] " files" ...
+.B linear-predict
+.RI [ options ] " test_file " "\fImodel_file\fP " \fIoutput_file\fP
 .br
 .SH DESCRIPTION
-This manual page documents briefly the
-.B linear-train
-and
-.B linear-predict
-commands.
-.PP
-\fBlinear-train\fP is a program that...
+\fBlinear-predict\fP uses the linear classifier \fImodel-file\fP to make
+predictions for each of the samples in \fItest_file\fP and stores the results
+in \fIoutput_file\fP.
 .SH OPTIONS
-These programs follow the usual GNU command line syntax, with long
-options starting with two dashes (`-').
 A summary of options is included below.
-For a complete description, see the Info files.
-.TP
-.B \-h, \-\-help
-Show summary of options.
 .TP
-.B \-v, \-\-version
-Show version of program.
+.B \-b \fI(0|1)\fP
+Whether to output probability estimates or not (default: \fB0\fP)
+.SH EXAMPLES
+Train a linear SVM using L2-loss function with \fBlinear-train\fP(1):
+.sp
+.RS 10
+.nf
+ linear-train data_file
+.fi
+.RE
+.sp
+Output probability estimates (for logistic regression only):
+.sp
+.RS 10
+.nf
+ predict -b 1 test_file data_file.model output_file
+.fi
+.RE
 .SH SEE ALSO
+.BR linear-train (1),
 .BR svm-predict (1),
-.BR svm-train (1).
+.BR svm-train (1)
 .SH AUTHORS
-linear-train and linear-predict were written by The LIBLINEAR Project.
+linear-predict was written by the LIBLINEAR authors at National Taiwan
+university for the LIBLINEAR Project.
 .PP
 This manual page was written by Christian Kastner <debian at kvr.at>,
 for the Debian project (and may be used by others).
diff --git a/debian/linear-train.1 b/debian/linear-train.1
index 9290650..21e51fd 100644
--- a/debian/linear-train.1
+++ b/debian/linear-train.1
@@ -1,47 +1,160 @@
 .\"                                      Hey, EMACS: -*- nroff -*-
-.TH LINEAR-TRAIN 1 "June 12, 2010"
-.\" Please adjust this date whenever revising the manpage.
-.\"
-.\" Some roff macros, for reference:
-.\" .nh        disable hyphenation
-.\" .hy        enable hyphenation
-.\" .ad l      left justify
-.\" .ad b      justify to both left and right margins
-.\" .nf        disable filling
-.\" .fi        enable filling
-.\" .br        insert line break
-.\" .sp <n>    insert n+1 empty lines
-.\" for manpage-specific macros, see man(7)
+.TH LINEAR-TRAIN 1 "June 16, 2010"
 .SH NAME
-linear-train \- bla
+linear-train \- train a linear classifier and produce a model
 .SH SYNOPSIS
 .B linear-train
-.RI [ options ] " files" ...
+.RI [ options ] " training_set_file " [ model_file ] 
 .br
 .SH DESCRIPTION
-This manual page documents briefly the
-.B linear-train
-and
-.B linear-predict
-commands.
-.PP
-\fBlinear-train\fP is a program that...
+\fBlinear-train\fP trains a linear classifier using liblinear and produces a
+model suitable for use with \fBlinear-predict\fP(1).
+
+\fItraining_set_file\fP is the file containing the data used for training.
+\fImodel_file\fP is the file to which the model will be saved. If
+\fImodel_file\fP is not provided, it defaults to \fItraining_set_file.model\fP.
+
+To obtain good performances, sometimes one needs to scale that data. This can be
+done with \fBsvm-scale\fP(1).
 .SH OPTIONS
-These programs follow the usual GNU command line syntax, with long
-options starting with two dashes (`-').
 A summary of options is included below.
-For a complete description, see the Info files.
 .TP
-.B \-h, \-\-help
-Show summary of options.
+.B \-s \fItype\fP
+Set the type of the solver:
+.sp
+.RS 10
+.nf
+0 ... L2-regularized logistic regression
+.sp
+1 ... L2-regularized L2-loss support vector classification (dual) (default)
+.sp
+2 ... L2-regularized L2-loss support vector classification (primal)
+.sp
+3 ... L2-regularized L1-loss support vector classification (dual)
+.sp
+4 ... multi-class support vector classification
+.sp
+5 ... L1-regularized L2-loss support vector classification
+.sp
+6 ... L1-regularized logistic regression
+.fi
+.RE
+.TP
+.B \-c \fIcost\fP
+Set the parameter C (default: \fB1\fP)
+.TP
+.B \-e \fIepsilon\fP
+Set the tolerance of the termination criterion
+.sp
+For -s 0 and 2:
+.RS 10
+.nf
+.sp
+|f'(w)|_2 <= \fIepsilon\fP*min(pos,neg)/l*|f'(w0)_2, where f is
+the primal function and pos/neg are the number of positive/negative data
+(default: \fB0.01\fP)
+.fi
+.RE
+.IP
+For -s 1, 3, and 4:
+.sp
+.nf
+.RS 10
+Dual maximal violation <= \fIepsilon\fP; similar to libsvm (default: \fB0.1\fP)
+.fi
+.RE
+.IP
+For -s 5 and 6:
+.sp
+.nf
+.RS 10
+|f'(w)|_inf <= \fIepsilon\fP*min(pos,neg)/l*|f'(w0)|_inf, where f is the primal
+function (default: \fB0.01\fP)
+.RE
+.TP
+.B \-B \fIbias\fP
+If \fIbias\fP >= 0, then instance x becomes [x; bias]; if \fIbias\fP < 0, then
+no bias term is added (default: \fB1\fP)
+.TP
+.B \-w \fIi\fP \fIweight\fP
+Weight-adjusts the parameter C of class \fIi\fP by the value \fIweight\fP
 .TP
-.B \-v, \-\-version
-Show version of program.
+.B \-v \fIn\fP
+\fIn\fP-fold cross validation mode
+.TP
+.B \-q
+Quiet mode (no outputs).
+.SH EXAMPLES
+.sp
+Train a linear SVM using L2-loss function:
+.sp
+.RS 10
+.nf
+ linear-train data_file
+.fi
+.RE
+.sp
+Train a logistic regression model:
+.sp
+.RS 10
+.nf
+ linear-train \-s 0 data_file
+.fi
+.RE
+.sp
+Do five-fold cross-validation using L2-loss SVM, using a smaller stopping
+tolerance 0.001 instead of the default 0.1 for more accurate solutions:
+.sp
+.RS 10
+.nf
+ linear-train \-v 5 -e 0.001 data_file
+.fi
+.RE
+.sp
+Train four classifiers:
+.RS 18
+.sp
+positive    negative        Cp  Cn
+.br
+class 1     class 2,3,4     20  10
+.br
+class 2     class 1,3,4     20  10
+.br
+class 3     class 1,2,4     20  10
+.br
+class 4     class 1,2,3     20  10
+.RE
+.sp
+.RS 10
+.nf
+ linear-train -c 10 -w1 2 -w2 5 -w3 2 four_class_data_file
+.fi
+.RE
+.sp
+If there are only two classes, we train ONE model. The C values for the two
+calsses are 10 and 50:
+.sp
+.RS 10
+.nf
+ linear-train -c 10 -w3 1 -w2 5 two_class_data_file
+.fi
+.RE
+.sp
+Output probability estimates (for logistic regression only) using
+\fBlinear-predict\fP(1):
+.sp
+.RS 10
+.nf
+ linear-predict -b 1 test_file data_file.model output_file
+.fi
+.RE
 .SH SEE ALSO
+.BR linear-predict (1),
 .BR svm-predict (1),
-.BR svm-train (1).
+.BR svm-train (1)
 .SH AUTHORS
-linear-train and linear-predict were written by The LIBLINEAR Project.
+linear-train was written by the LIBLINEAR authors at National Taiwan
+university for the LIBLINEAR Project.
 .PP
 This manual page was written by Christian Kastner <debian at kvr.at>,
 for the Debian project (and may be used by others).

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/liblinear.git



More information about the debian-science-commits mailing list