Last update: $Date: 2001/06/21 00:05:06 $
TinySVM is an implementation of Support Vector Machines (SVMs) [Vapnik 95], [Vapnik 98] for the problem of pattern recognition. Support Vector Machines is a new generation learning algorithms based on recent advances in statistical learning theory, and applied to large number of real-world applications, such as text categorization, hand-written character recognition.
TinySVM accepts the same representation of training data as SVM_light uses. This format has potential to handle large sparse feature vectors.
(BNF-like representation)
<class> .=. +1 | -1
<feature> .=. integer (>=1)
<value> .=. real
<line> .=. <class> <feature>:<value><feature>:<value> ... <feature>:<value>
Example (SVM) +1 201:1.2 3148:1.8 3983:1 4882:1 -1 874:0.3 3652:1.1 3963:1 6179:1 +1 1168:1.2 3318:1.2 3938:1.8 4481:1 +1 350:1 3082:1.5 3965:1 6122:0.2 -1 99:1 3057:1 3957:1 5838:0.3See tests/train.svmdata and tests/test.svmdata in the package.
In the case of SVR, you can give real value as class label
Example (SVR) 0.23 201:1.2 3148:1.8 3983:1 4882:1 0.33 874:0.3 3652:1.1 3963:1 6179:1 -0.12 1168:1.2 3318:1.2 3938:1.8 4481:1See tests/train.svrdata in the package
"svm_learn" accepts two arguments --- file name of training data stored in
the above formats and model file in which the SVs and their weights (alpha) are
stored after training.
Try --help option for finding out other options.
% svm_learn -t 1 -d 2 -c 1 train.svmdata model TinySVM - tiny SVM package Copyright (C) 2000 Taku Kudoh All rights reserved. 1000 examples, cache size: 1524 .................... 1000 1000 0.0165 1286/ 64.3% 1286/ 64.3% ............ Checking optimality of inactive variables re-activated: 0 Done! 1627 iterations Number of SVs (BSVs) 719 (4) Empirical Risk: 0.002 (2/1000) L1 Loss: 4.22975 CPU Time: 0:00:01 % ls -al model -rw-r--r-- 1 taku-ku is-stude 26455 Dec 7 13:40TinySVM prints the following messages during the learning iterations,
.................... 1000 15865 2412 1.6001 33.2% 33.2% .................... 2000 15864 2412 1.3847 39.5% 36.4%
"svm_classify" accepts two arguments --- file name of test data stored in
above formats and model file produced by svm_learn program.
"svm_classify" simply outputs the accuracy for given test data.
You can also employ interactive classification by giving "-" as file name of test example.
Try --help option for finding out other options.
% svm_classify test.svmdata model Accuracy: 77.80000% (389/500) Precision: 66.82927% (137/205) Recall: 76.11111% (137/180) System/Answer p/p p/n n/p n/n: 137 68 43 252 % svm_classify -V test.svmdata model -1 -1.04404 -1 -1.26626 -1 -0.545195 .. snip Accuracy: 77.80000% (389/500)
"svm_model" shows the estimated margin, VC dimension and number of SVs
of given some model file.
Try --help option for finding out other options.
% svm_model model File Name: model Margin: 0.181666 Number of SVs: 719 Number of BSVs: 4 Size of training data: 1000 L1 Loss (Empirical Risk): 4.16917 Estimated VC dimension: 728.219 Estimated xi-alpha(2): 573
% cvs -d :pserver:anonymous@chasen.aist-nara.ac.jp:/cvsroot login CVS password: # Just hit return/enter. % cvs -d :pserver:anonymous@chasen.aist-nara.ac.jp:/cvsroot co TinySVM
% ./configure % make % make check % su # make installYou can change default install path by using --prefix option of configure script.
$Id: index.html,v 1.11 2001/06/21 00:05:06 taku-ku Exp $;
taku-ku@is.aist-nara.ac.jp