Matlab安装使用libsvm文件
(2015-11-30 12:49:33)
标签:
libsvm |
一.下载libsvm
http://www.csie.ntu.edu.tw/~cjlin/libsvm/
在libsvm的网站上下载
打开
Please choose your compiler for building MEX-files:
出现以下选项(因电脑而异)
Select a compiler:
[1] Intel C++ 11.1 (with Microsoft Visual C++ 2008 SP1 linker)
[2] Intel Visual Fortran 11.1 (with Microsoft Visual C++ 2008 SP1 linker)
[3] Intel Visual Fortran 11.1 (with Microsoft Visual C++ 2008 Shell linker)
[4] Lcc-win32 C 2.4.1
[5] Microsoft Visual C++ 6.0
[6] Microsoft Visual C++ 2005 SP1
[7] Microsoft Visual C++ 2008 SP1
[8] Microsoft Visual C++ 2010
[9] Microsoft Visual C++ 2010 Express
[10] Open WATCOM C++
[0] None
Your machine has a Microsoft Visual C++ 2010 compiler located at
C:\Program Files\Microsoft Visual Studio 10.0. Do you want to use this compiler [y]/n?
编译器默认路径,确认正确输入y,更改路径,输入n
输入y出现再次确认
Please verify your choices:
Location: C:\Program Files\Microsoft Visual Studio 10.0
编译器配置完成
Trying to update options file: C:\Documents and Settings\zhangduokun\Application Data\MathWorks\MATLAB\R2011a\mexopts.bat
From
template:
>> make
>>
%编译完成
为了检验
>> [predict_label, accuracy, dec_values] = svmpredict(heart_scale_label, heart_scale_inst, model); %
Accuracy =
86.6667% (234/270) (classification)%
如果运行正常并生成了model这个结构体(其中保存了所有的支持向量及其系数),那么说明