一直修改程序,虽然svmpredict用训练数据做出来没问题,但是把训练数据进行特征提取后,用svmpredict预测出来完全错的离谱,搞了一整天,最后终于还是用READEME文档解决了我的问题,核心就是:svmpredict里面['libsvm_options']参数的选择。所以README文档要仔细阅读。特此将其复制如下,方便以后查阅。
-----------------------------------------
--- MATLAB/OCTAVE interface of LIBSVM ---
-----------------------------------------
Table of Contents
=================
- Introduction
- Installation
- Usage
- Returned Model Structure
- Other Utilities
- Examples
- Additional Information
Introduction
============
This tool provides a simple interface to LIBSVM, a library for support vector
machines (http://www.csie.ntu.edu.tw/~cjlin/libsvm). It is very easy to use as
the usage and the way of specifying parameters are the same as that of LIBSVM.
Installation
============
On Unix systems, we recommend using GNU g++ as your
compiler and type 'make' to build 'svmtrain.mexglx' and 'svmpredict.mexglx'.
Note that we assume your MATLAB is installed in '/usr/local/matlab',
if not, please change MATLABDIR in Makefile.
Example:
linux> make
To use Octave, type 'make octave':
Example:
linux> make octave
On Windows systems, pre-built binary files are already in the directory
`..\windows', so no need to conduct installation. Now we include both
32bit binary files and 64bit binary files, but in future releases, we
will provide binary files only for 64bit MATLAB on Windows. If you have
modified the sources and would like to re-build the package, type
'mex -setup' in MATLAB to choose a compiler for mex first. Then type
'make' to start the installation.
Example:
matla
--- MATLAB/OCTAVE interface of LIBSVM ---
-----------------------------------------
Table of Contents
=================
- Introduction
- Installation
- Usage
- Returned Model Structure
- Other Utilities
- Examples
- Additional Information
Introduction
============
This tool provides a simple interface to LIBSVM, a library for support vector
machines (http://www.csie.ntu.edu.tw/~cjlin/libsvm). It is very easy to use as
the usage and the way of specifying parameters are the same as that of LIBSVM.
Installation
============
On Unix systems, we recommend using GNU g++ as your
compiler and type 'make' to build 'svmtrain.mexglx' and 'svmpredict.mexglx'.
Note that we assume your MATLAB is installed in '/usr/local/matlab',
if not, please change MATLABDIR in Makefile.
Example:
linux> make
To use Octave, type 'make octave':
Example:
linux> make octave
On Windows systems, pre-built binary files are already in the directory
`..\windows', so no need to conduct installation. Now we include both
32bit binary files and 64bit binary files, but in future releases, we
will provide binary files only for 64bit MATLAB on Windows. If you have
modified the sources and would like to re-build the package, type
'mex -setup' in MATLAB to choose a compiler for mex first. Then type
'make' to start the installation.
Example:
matla