[SVMTorch II]
A Support Vector Machine for Large-Scale Regression and Classification
Problems
Ronan Collobert
(collober@iro.umontreal.ca)
(collober@idiap.ch)
Universite de Montreal
C.P. 6128 Succ. Centre-Ville
Montr�al, Qu�bec, Canada H3C 3J7
or
IDIAP, CP 592, rue du Simplon 4, 1920 Martigny, Switzerland
<========>
[o][Description]
SVMTorch II is a new implementation of Vapnik's Support Vector Machine that
works both for classification and regression problems, and that has been
specifically tailored for large-scale problems (such as more than 20000
examples, even for input dimensions higher than 100).
[New] What are the differences with the old version ?
* The code has been completly rewritten in C++. It's now cleaner and
optimized for a chunk of size 2.
* Options are a little bit different.
* The optimality check is now similar to SMO. (Faster)
* The sparse file format and binary file format are different. Please
check the manual.
* A converter is available to convert files from the old format to the
new one.
* No more HACK option.
* The output of the test program in multiclass mode is different.
You can check the ChangeLog file.
For some datasets SVMTorch II is as fast as the old version. However, for
other datasets it is faster or even stupendously faster than the previous
version.
But you now need a C++ compiler; if you do not have access to such compiler,
the old version of SVMTorch is still available here.
[o][Source Code]
As usual, the source code is free for academic use. It must not be modified
or distributed without prior permission of the author. When using SVMTorch
in your scientific work, please cite the following article:
Ronan Collobert and Samy Bengio, Support Vector Machines for Large-Scale
Regression Problems, Journal of Machine Learning Research, vol 1, pp 143-160,
2001.
The software has been successfully compiled on Sun/SOLARIS, Intel/LINUX
operating systems. Your can download it from
ftp.idiap.ch/pub/learning/SVMTorch.tgz.
[o][Try It !!!]
First, you should download the source code from
ftp.idiap.ch/pub/learning/SVMTorch.tgz and the examples from
ftp.idiap.ch/pub/learning/TrainData.tgz. Note
that the file format for the multiclass example in this archive is not the
same than the previous version. Put this two archive files in the same
directory, and decompress them with
zcat SVMTorch.tgz | tar xf -
zcat TrainData.tgz | tar xf -
It creates two new directories : "SVMTorch" and "TrainData".
Now, go in the "SVMTorch" directory and edit the Makefile. You should only
have to change the following lines, depending on your specific platform :
# C-compiler
CC=g++
#CC=CC
# C-Compiler flags
CFLAGS=-Wall -W -O9 -funroll-all-loops -finline -ffast-math
#CFLAGS=-native -fast -xO5
# linker
LD=g++
#LD=CC
# linker flags
LFLAGS=-Wall -W -O9 -funroll-all-loops -finline -ffast-math
#LFLAGS=-native -fast -xO5
# libraries
LIBS=-lm
The default configuration is set for a machine running with the GNU g++
compiler. An alternate (commented) configuration is proposed for the Sun
Workshop compiler.
Type "make" and pray.
It should compile without any warning. If you have a problem, please send me
a mail which describes the error and you compiler.
For some platform, you could have to change the include files needed for
"times", a non-standard function used by SVMTorch. You would have to edit
the file "general.h" and change the lines
#ifdef I_WANT_TIME
#include <sys/times.h>
/*#include <limits.h>*/
#include <time.h>
#endif
If it doesn't work or if you don't want to measure the time of the learning
machine, just comment the line :
#define I_WANT_TIME
Note that in "general.h" you can comment the line
#define USEDOUBLE
in order to do the computations in float. IT'S A BAD IDEA : SVMTorch needs
precision.
If everything went well, you should have three programs : "SVMTorch" ,
"SVMTest" and "convert". The first one is the learning machine and the
second one is the testing machine. The last one is to convert files from the
old format into the new one.
If you want to show all the options, just run the programs without any
parameter.
To test the program in classification, try :
SVMTorch ../TrainData/classif_train.dat ../TrainData/model_dummy
It takes less than one minute on a 300Mhz computer. You should have around
913 support vectors (this number could slightly change depending on the
precision of your machine).
To test the SVM on the train data, try :
SVMTest ../TrainData/model_dummy ../TrainData/classif_train.dat
You should have around 0.78% missclassified.
To test the program in regression, try :
SVMTorch -rm -std 900 -eps 20 ../TrainData/regress_train.dat
../TrainData/model_dummy
You should have around 596 support vectors.
Test the model with :
SVMTest ../TrainData/model_dummy ../TrainData/regress_train.dat
The mean squared error should be around 187.27.
To test the program in multiclass and sparse data mode, try :
SVMTorch -multi -sparse -std 7000 ../TrainData/multi_train.dat
../TrainData/model_dummy
It should detect 10 classes (0-9) and the last one should have around 187
support vectors.
(Note that multi_train.dat is 1000 examples taken from the MNIST database)
Test the model with :
SVMTest -sparse -multi ../TrainData/model_dummy ../TrainData/multi_train.dat
You should not have any misclassified example for the multiclass output, and
the model for the class 9 should have 3 missclassified examples.
[o][Options]
The general syntax of SVMTorch and SVMTest is
SVMTorch [options] example_file model_file
SVMTest [options] model_file test_file
Where "example_file" is your training set file, "test_file" is your testing
set file and "model_file" is the SVM-model created by SVMTorch.
All options are described when you launch SVMTorch or SVMTest without any
argument.
By default, SVMTorch is a classification machine. If you want the regression
machine, use option -rm.
Note that the current error displayed by SVMTorch is only an indicator. It
can oscillate.
The default format of SVMTorch and SVMTest is the ASCII format. Therefore,
don't forget to put -bin in the command line if you use binary files !!!
No test are made, and you could have an error such as "Check your data" or
"Segmentation fault". Also, don't forget to put -sparse if your data is in
sparse format.
Now you can take a look at the manual.
[o][File Format]
There are two main input formats for "input_file" and "test_file" in
SVMTorch : an ASCII format, and a binary one.
The ASCII format is the following:
<Number n of training/testing samples> <Dimension d of each sample+1>
<a11> <a12> <a13> .... <a1d> <a1_out>
.
.
.
<an1> <an2> <an3> .... <and> <an_out>
where <aij> is an ASCII floating point number corresponding to the j-th
value of the i-th example and <ai_out> is the i-th desired output (in
classification, it should be +1/-1).
The binary format is the same, without carriage returns.
There is another special input format for SVMTest, when you don't have the
desired output. (To use with the -no option).
The ASCII version of this format is :
<Number n of training/testing samples> <Dimension d of each sample>
<a11> <a12> <a13> .... <a1d>
.
.
.
<an1> <an2> <an3> .... <and>
The binary format is the same, without carriage returns.
Check the manual for the sparse format, and the multiclass format.
[o][Useful Links]
* www.kernel-machines.org
* SVM-Light
------------------------------------------------------------------------
Number of visitors:[Counter]
没有合适的资源?快使用搜索试试~ 我知道了~
SVMTorch.rar_SVMTor_svmtorch_torch
共26个文件
cc:11个
h:8个
txt:3个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 32 浏览量
2022-09-19
12:52:59
上传
评论
收藏 176KB RAR 举报
温馨提示
svm支持向量模型的标准torch的源代码,下载自svmtorch的网站,在其中有说明文档,介绍很详细的,但人家要求在引用的时候要注明来源。
资源推荐
资源详情
资源评论
收起资源包目录
SVMTorch.rar (26个子文件)
www.pudn.com.txt 218B
SVMTorch
IOTorch.h 2KB
README.txt 8KB
general.cc 1KB
SVMTorch.cc 14KB
SVM.h 3KB
UserKernel.cc 2KB
Kernel.h 3KB
IOTorch.cc 6KB
manual.ps 261KB
Cache.h 2KB
Cache.cc 5KB
StandardSVM.cc 11KB
manual.pdf 148KB
OldIOTorch.h 1KB
SVM.cc 8KB
Kernel.cc 6KB
SVMTest.cc 12KB
StandardSVM.h 2KB
Makefile 3KB
convert.cc 4KB
ChangeLog 1KB
OldIOTorch.cc 5KB
general.h 2KB
UserKernel.h 2KB
LICENSE.txt 2KB
共 26 条
- 1
资源评论
周楷雯
- 粉丝: 80
- 资源: 1万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- TbReactions(BaseModel)
- request-validator.cpython-37
- pygments.lexers.javascript ~~~~~~~~~~~~~~~~~~~~~~~~~~
- 简单小游戏制作-飞行棋
- Python数学建模例子.rar
- Java项目-基于SSM+JSP的校园外卖配送系统的设计与实现(源码+万字LW+部署视频+代码讲解视频+全套软件)
- Color-Transformer introduction
- FastStone Capture屏幕长截图软件包
- Table IoT物联网工具,简单快速的搭建物联网服务平台
- zheng2020 ecg new dataset-12 lead-add-label
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功