svm-train(1)
π svm-train β the girlies are TRAINING π
okay so bestie, welcome to svm-train(1) from the User Manuals section, and yes this is the one that makes the magic model file happen β¨
β¨ NAME β¨
svm-train β train one or more SVM instance(s) on a given data set to produce a model file π
πΈ SYNOPSIS πΈ
svm-train [-s svm_type ] [ -t kernel_type ] [ -d degree ] [ -g gamma ] [
-r coef0 ] [ -c cost ] [ -n nu ] [ -p epsilon ] [ -m cachesize ] [ -e
epsilon ] [ -h shrinking ] [ -b probability_estimates ] ] [ -wi weight ]
[ -v n ] [ -q ]
training_set_file [ model_file ]
no fr, that's the whole vibe of it π
π¦ DESCRIPTION π¦
so svm-train trains a Support Vector Machine to learn the data you point it at in the training_set_file, and then it produces a model_file to save the results of the learning optimization π§
that model is literally your main character moment β you can use it later with svm_predict(1) or with other LIBSVM enabled software. slay π₯
π OPTIONS π
-ssvm_type βsvm_typedefaults to0and can be any value between0and4, like this:0β C-SVC1β nu-SVC2β one-class SVM3β epsilon-SVR4β nu-SVR
-tkernel_type βkernel_typedefaults to2(Radial Basis Function (RBF) kernel) and can be any value between0and4, as follows:0β linear:u.v1β polynomial:(gamma*u.v + coef0)^degree2β radial basis function:exp(-gamma*|u-v|^2)3β sigmoid:tanh(gamma*u.v + coef0)4β precomputed kernel (kernel values intraining_set_file) --
-ddegree β sets the degree of the kernel function, defaulting to3β-ggamma β adjusts the gamma in the kernel function (default1/k) π-rcoef0 β sets thecoef0(constant offset) in the kernel function (default0) π-ccost β sets the parameterC(cost) of C-SVC, epsilon-SVR, and nu-SVR (default1) π°-nnu β sets the parameternuof nu-SVC, one-class SVM, and nu-SVR (default0.5) π-pepsilon β set the epsilon in the loss function of epsilon-SVR (default0.1) π-mcachesize β set the cache memory size tocachesizein MB (default100) π§-eepsilon β set the tolerance of termination criterion toepsilon(default0.001) β±οΈ-hshrinking β whether to use the shrinking heuristics,0or1(default1) πͺ-bprobability-estimates βprobability_estimatesis a binary value indicating whether to calculate probability estimates when training the SVC or SVR model. values are0or1and defaults to0for speed ποΈ-wiweight β set the parameterC(cost) of classitoweight*C, for C-SVC (default1) βοΈ-vn β setnforn-fold cross validation mode π-qβ quiet mode; suppress messages to stdout π€«
π 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 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.
ok so this part is IMPORTANT bestie: indices must be in an ASCENDING order. do not come at it out of order, it will not eat π
πΏ ENVIRONMENT πΏ
No environment variables. that's it, nothing to set up, we love a low-maintenance queen π
π 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) β icons, all of them π
π SEE ALSO π
svm-predict(1), svm-scale(1) β go read those next, iykyk β¨
and that's the whole page bestie!! this one comes from the Linux corner of the world, dated MAY 2006 β yeah she's a classic, an OG, and she still serves ππ no cap, go train something iconic, periodt β¨π¦πΈ
π¦ 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