![](https://csdnimg.cn/release/download_crawler_static/10353331/bg1.jpg)
Toolbox SimpleSVM Documentation
Gaëlle Loosli
Abstract
Here is a quick guide for SimpleSVM toolbox for Matlab. It contains
a quick start tour as well as some details about special features. We also
give an overview of the algorithm.
1 How to use it
1.1 Installation and test
After downloading the archive, you just need to unzip it where it is the most
convenient for you. Then you add your repertory in your matlab path (
'addpath
('/home/.../simpleSVM/')'
). You're done!
To check how well it works, you can launch
'graphicalInterface'
if you are
running Matlab 7, or
'graphicalInterface_v6'
if you are running a previous
version (I didn't check for Matlab 5 but it should work). You can also launch
'demo_online'
. This little program will execute a serie of examples that uses
the dierent features of the toolbox.
1.2 Quick start tour
Here we give a code sample that uses the toolbox the simplest way. It computes
the binary SVM solution for a checkers problem.
global svModel
[x,y,xt,yt]=dataset('Checkers',200,50,0.5); % generates data
donnees = data(x,y,xt,yt); % stores data
noyau = kernel('rbf',.9); % stores kernel
parametres = param(500,50,'binary','chol'); % stores parameters
trainSVM(donnees, noyau, parametres); % train the SVM
prediction = testSVM; % gives the results
% on the test set
1.3 Description of structures and main functions
This toolbox uses ve structures to store the data, parameters and results.
The main one is a global variable called
svModel
that should be declared in
any program using the toolbox. It was made as a global variable for memory
purpose. Matlab makes a copy of every input parameter called for a function
which is a problem for large datasets. The global variable prevents it, but you
need to be careful about it.
This structure contains four structures:
1