Provided by: libsvm-tools_3.21+ds-1.2_amd64

**NAME**

svm-predict - make predictions based on a trained SVM model file and test data

**SYNOPSIS**

svm-predict[-bprobability_estimates][-q]test_datamodel_file[output_file]

**DESCRIPTION**

svm-predictuses a Support Vector Machine specified by a given inputmodel_fileto make predictions for each of the samples intest_dataThe format of this file is identical to the training_data file used insvm_train(1)and is just a sparse vector as follows: <label> <index1>:<value1> <index2>:<value2> . . . . . . 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. Ifoutput_fileis given, it will be used to specify the filename to store the predicted results, one per line, in the same order as thetest_datafile.

**OPTIONS**

-b probability-estimatesprobability_estimatesis 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. -q quiet mode; suppress messages to stdout.

**FILES**

training_set_filemust be prepared in the following simple sparse training vector format: <label> <index1>:<value1> <index2>:<value2> . . . . . . 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.

**ENVIRONMENT**

No environment variables.

**DIAGNOSTICS**

None documented; see Vapnik et al.

**BUGS**

Please report bugs to the Debian BTS.

**AUTHOR**

Chih-Chung Chang, Chih-Jen Lin <cjlin@csie.ntu.edu.tw>, Chen-Tse Tsai <ctse.tsai@gmail.com> (packaging)

**SEE** **ALSO**

svm-train(1),svm-scale(1)