svm-predict(1)
๐ svm-predict ๐
okay so bestie, you already know svm-predict(1) from the User Manuals gang โ it's the girlies who take a trained SVM and go predict, predict, predict ๐ฎโจ
๐ธ NAME ๐ธ
svm-predict โ make predictions based on a trained SVM model file and test data. that's it, that's the whole job, and she does it flawlessly ๐
โจ SYNOPSIS โจ
svm-predict [ -b probability_estimates ] [ -q ] test_data model_file [ output_file ]
๐ฆ DESCRIPTION ๐ฆ
svm-predict uses a Support Vector Machine specified by a given input model_file to make predictions for each of the samples in test_data. no cap, it just vibes through your data and hands you answers ๐ซถ
The format of this file is identical to the training_data file used in svm_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. lowkey elegant.
For classification, <label> is an integer indicating the class label (multi-class is supported, slay). 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 โ like, do not come in here with your indices all chaotic, the SVM will simply not be having it ๐ญ
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. it's giving "mystery test set" energy but we move ๐
If 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 test_data file. order preserved, always, queen behavior ๐
๐ OPTIONS ๐
-b probability-estimatesโprobability_estimatesis a binary value indicating whether to calculate probability estimates when training the SVC or SVR model. Values are0or1and defaults to0for speed. so like,0= fast girl,1= thorough girl, pick your fighter โก-qโ quiet mode; suppress messages to stdout. for when you want her to work in silence, no commentary, just results ๐คซ
๐ FILES ๐
training_set_file must 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. periodt. โจ
๐ง ENVIRONMENT ๐ง
No environment variables. none. zero. empty. she takes nothing from the environment, she is self-made ๐
๐ฅ DIAGNOSTICS ๐ฅ
None documented; see Vapnik et al. that's the whole tea โ
๐ BUGS ๐
Please report bugs to the Debian BTS. if she's acting up, tell the Debian girlies, not me ๐
๐ AUTHOR ๐
Chih-Chung Chang, Chih-Jen Lin <cjlin@csie.ntu.edu.tw>, Chen-Tse Tsai <ctse.tsai@gmail.com> (packaging). icons, all of them, truly the main characters of this whole operation ๐
๐ SEE ALSO ๐
and that's the page bestie!! this little Linux manual page has been serving since MAY 2006, brought to you by the Linux crew โ decades of relevance and she's still iconic, we love to see it ๐๐โจ
๐ฆ where this page comes from
- debian bookworm: libsvm-tools 3.24+ds-6 ยท BSD-3-Clause
- debian trixie: libsvm-tools 3.24+ds-6.1 ยท BSD-3-Clause
- ubuntu jammy: libsvm-tools 3.24+ds-6 ยท BSD-3-Clause
- ubuntu noble: libsvm-tools 3.24+ds-6ubuntu2 ยท BSD-3-Clause
- ubuntu resolute: libsvm-tools 3.24+ds-6.1 ยท BSD-3-Clause
- ubuntu stonking: libsvm-tools 3.24+ds-6.1 ยท BSD-3-Clause
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms