File: svm-predict.1

package info (click to toggle)
libsvm 3.24%2Bds-6
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye
  • size: 992 kB
  • sloc: java: 3,680; cpp: 3,146; ansic: 2,253; python: 1,270; makefile: 153; sh: 41
file content (73 lines) | stat: -rw-r--r-- 3,212 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
.\" Process this file with
.\" groff -man -Tascii svm-predict.1
.\"
.TH svm-predict 1 "MAY 2006" Linux "User Manuals"
.SH NAME
svm-predict \- make predictions based on a trained SVM model file and test data
.SH SYNOPSIS
.B svm-predict [ -b
.I probability_estimates ] [ -q ]
.I test_data
.I model_file
.I [ output_file ]
.SH DESCRIPTION
.B svm-predict
uses a Support Vector Machine specified by a given input
.I model_file
to make predictions for each of the samples in
.I test_data
  The format of this file is identical to the training_data file used in
.BR svm_train(1)
and is just a sparse vector as follows:
.TP
<label> <index1>:<value1> <index2>:<value2> . . .
.TP
 .
.TP
 .
.TP
 .

.TP
There is one sample per line.  Each sample consists of a target value (label or regression target) followed by a sparse representation of the input vector.  All unmentioned coordinates are assumed to be 0.  For classification, <label> is an integer indicating the class label (multi-class is supported). For regression, <label> is the target value which can be any real number. For one-class SVM, it's not used so can be any number.  Except using precomputed kernels (explained in another section), <index>:<value> gives a feature (attribute) value.  <index> is an integer starting from 1 and <value> is a real number. Indices must be in an ASCENDING order.  If you have label data available for testing then you can enter these values in the test_data file.  If they are not available you can just enter 0 and will not know real accuracy for the SVM directly, however you can still get the results of its prediction for the data point.

If
.I output_file
is given, it will be used to specify the filename to store the predicted
results, one per line, in the same order as the
.I test_data
file.
.SH OPTIONS
.IP "-b probability-estimates"
.I probability_estimates
is a binary value indicating whether to calculate probability estimates when training the SVC or SVR model.  Values are 0 or 1 and defaults to 0 for speed.
.IP "-q"
quiet mode; suppress messages to stdout.
.SH FILES
.I training_set_file
must be prepared in the following simple sparse training vector format:

.TP
<label> <index1>:<value1> <index2>:<value2> . . .
.TP
 .
.TP
 .
.TP
 .

.TP
There is one sample per line.  Each sample consist of a target value (label or regression target) followed by a sparse representation of the input vector.  All unmentioned coordinates are assumed to be 0.  For classification, <label> is an integer indicating the class label (multi-class is supported). For regression, <label> is the target value which can be any real number. For one-class SVM, it's not used so can be any number.  Except using precomputed kernels (explained in another section), <index>:<value> gives a feature (attribute) value.  <index> is an integer starting from 1 and <value> is a real number. Indices must be in an ASCENDING order.

.SH ENVIRONMENT
No environment variables.

.SH DIAGNOSTICS
None documented; see Vapnik et al.
.SH BUGS
Please report bugs to the Debian BTS.
.SH AUTHOR
Chih-Chung Chang, Chih-Jen Lin <cjlin@csie.ntu.edu.tw>, Chen-Tse Tsai <ctse.tsai@gmail.com> (packaging)
.SH "SEE ALSO"
.BR svm-train (1),
.BR svm-scale (1)