没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
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
Figure 1: Graphical Interface
•
the dataset,
•
the kernel,
•
the parameters,
•
the (output) model.
Data.
It contains the train set, test set and their labels. This structure can
be created thanks to the function
data
as follows:
mydata = data(trainMatrix, trainLabels, testMatrix, testLabels);
mydata
is now as shown:
mydata =
trainvec: [2x96 double]
trainlab: [96x1 double]
testvec: [2x48 double]
testlab: [48x1 double]
trainvec_t: []
trainlab_t: []
testvec_t: []
testlab_t: []
2
剩余8页未读,继续阅读
资源评论
qq_33715100
- 粉丝: 0
- 资源: 3
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功