Support Vector Machine
|
|||
SVMlight: Support Vector MachineOverviewSVMlight is an implementation of Support Vector Machines (SVMs) in C. The main features of the program are the following:
DescriptionSVMlight is an implementation of Vapnik's Support Vector Machine [Vapnik, 1995] for the problem of pattern recognition. The optimization algorithm used in SVMlight is described in [Joachims, 1998b]. The algorithm has scalable memory requirements and can handle problems with many thousands of support vectors efficiently. So far the code has mainly been used for learning text classifiers [Joachims, 1997][Joachims, 1998a], but was also tested on several image recognition tasks and a medical application. Many tasks have the property of sparse instance vectors. This implementation makes use of this property which leads to a very compact and efficient representation.Source CodeThe source code is free for scientific use. It must not be modified and distributed without prior permission of the author. The implementation was developed on Solaris 2.5 with gcc, but compiles also on SunOS 3.1.4, Linux and Windows NT (after small modifications). The source code is available at the following location: Please send me email and let me know that you got svm-light. I will put you on my mailing list to inform you about new versions and bug-fixes. SVMlight needs a quadratic programming tool for solving small intermediate quadratic programming problems. The current version comes with interfaces to
The PR_LOQO optimizer was written by A. Smola and is the preferred solver to be used in SVMlight. It can be requested from After filling in the copyright form, the sources are sent to you automatically via email. The DONLP2 optimization package was written by P. Spellucci. It can be downloaded from Please read the copyright information. It is slower than PR_LOQO, but more stable. DONLP2 is written in Fortran, but compiles and links just fine into C code using gcc. If you do not have the G77 part of gcc installed, you might want to download the f2c converted version. It is less flexible and uses more memory, though: InstallationTo install SVMlight you need to download svm_light.tar.gz and PR_LOQO (or donlp2.tar.gz or donlp2_c.tar.gz). Create a new directory:
Create a subdirectory in the svm_light directory with
Copy the tar-file with DONLP2 into the svm_light directory. Unzip and untar the file with the following command:
svm_classify (classification module) How to usesvm_learn is called with the following parameters:
-v [0..3] -> Verbosity level (default 2) . -i [0,1] -> Remove training examples from training set for which the upper bound C on the Lagrange multiplier is active at some point during training (default 0). After removal the SVM is trained from scratch on the remaining examples. -q [2..400] -> Maximum size of QP-subproblems (default 10). Different values may improve training speed, but do not influence the resulting classifier. -h [5..] -> number of iterations a variable needs to be optimal before considered for shrinking (default 100) -f [0,1] -> do final optimality check for variables removed by shrinking. Although this test is usually positive, there is no guarantee that the optimum was found if the test is omitted. (default 1) -m [5..] -> size of cache for kernel evaluations in MB (default 40). The larger the faster... -c float -> C: Trade-off between training error and margin (default 1000). -e [1..0[ -> eps: Allow that error when fitting constraints [y [w*x+b] - 1] <= eps at KT-point (default 0.001). Larger values speed up training, but may result in a worse classifier. -t int -> Type of kernel function: 0: linear K(a,b)= a*b (default) 1: polynomial K(a,b)= (s a*b+c)^d 2: radial basis function K(a,b)= exp(-gamma ||a-b||^2) 3: sigmoid K(a,b)= tanh(s a*b + c) 4: user defined kernel from 'kernel.h' -d int -> Parameter d in polynomial kernel. -g float -> Parameter gamma in rbf kernel. -s float -> Parameter s in sigmoid/polynomial kernel (default 1). -r float -> Parameter c in sigmoid/polynomial kernel (default 1). -u string -> Parameters of user defined kernel.
<feature> .=. integer <value> .=. real <line> .=. <class> <feature>:<value> <feature>:<value> ... <feature>:<value> The result of svm_learn is the model which is learned from the training data in example_file. The model is written to model_file. To classify test examples, svm_classify reads this file. svm_classify is called with the following parameters:
-v [0..3] -> Verbosity level (default 2). -f [0,1] -> 0: old output format of V1.0 1: output the value of decision function (default) If you want to find out more, try this FAQ. Getting started: an Example ProblemYou will find an example text classification problem at Download this file into your svm_light directory and unpack it with
svm_classify example1/test.dat example1/model example1/predictions Questions and Bug ReportsIf you find bugs or you have problems with the code you cannot solve by yourself, please contact me via email <svm-light@ls8.cs.uni-dortmund.de>.DisclaimerThis software is free only for non-commercial use. It must not be modified and distributed without prior permission of the author. The author is not responsible for implications from the use of this software.HistoryV2.00 -> V2.01
V1.00 -> V2.00
V0.91 -> V1.00
V0.9 -> V0.91
References[Joachims, 1997] T. Joachims, Text Categorization with Support VectorMachines, LS VIII Technical Report, No. 23, University of Dortmund,1997. (postscript) [Joachims, 1998a] T. Joachims, Text Categorization with Support Vector Machines, European Conference on Machine Learning (ECML),1997. (postscript) [Joachims, 1998b]
T. Joachims, Making large-Scale SVM Learning Practical,
[Vapnik, 1995]
V. Vapnik, The Nature of Statistical Learning Theory,
Other SVM Resources
Last modified August 6th, 1998 by Thorsten Joachims <thorsten@ls8.cs.uni-dortmund.de> |
|||
|
|
![]() |
[Internal...] [Research...] [Teaching...] [Staff...] [Funstuff...] [...Index] [...Frames Version] |