fitsvm in MATLAB 2014 and svmtrain in previous version
来源:互联网 发布:javascript显示和隐藏 编辑:程序博客网 时间:2024/05/17 07:25
matlab 2014以前的版本不包含fitcsvm()训练函数,而是以svmtrain()函数代替。网上找到的关于此函数的资料
原文:http://blog.163.com/liu_xi_en/blog/static/2817450620102297336227/
最近结合ACO和SVM做分类,于是仔细看了下svmtrain的help文档。现结合该doc文档,做简单整理,希望对
svm入门者有点帮助哦。
svmtrain:用于训练支持向量机分类器。语法格式如下:
SVMStruct = svmtrain(Training, Group)
SVMStruct = svmtrain(..., 'Kernel_Function', Kernel_FunctionValue, ...)
SVMStruct = svmtrain(..., 'RBF_Sigma', RBFSigmaValue, ...)
SVMStruct = svmtrain(..., 'Polyorder', PolyorderValue, ...)
SVMStruct = svmtrain(..., 'Mlp_Params', Mlp_ParamsValue, ...)
SVMStruct = svmtrain(..., 'Method', MethodValue, ...)
SVMStruct = svmtrain(..., 'QuadProg_Opts', QuadProg_OptsValue, ...)
SVMStruct = svmtrain(..., 'SMO_Opts', SMO_OptsValue, ...)
SVMStruct = svmtrain(..., 'BoxConstraint', BoxConstraintValue, ...)
SVMStruct = svmtrain(..., 'Autoscale', AutoscaleValue, ...)
SVMStruct = svmtrain(..., 'Showplot', ShowplotValue, ...)
解释如下:
Training是一个M行N列的矩阵,M是样本数,N是特征维数。Group:是个列向量,表示样本对应的类别,用字符串表示(可以用数字或单个字符)。
classifier is returned in SVMStruct, a structure with the following fields. 'Kernel_Function', Kernel_FunctionValue,.......'Showplot',ShowplotValue这些在svmtrain中是可选项。他们在svmtrain中出现的顺序是无关紧要的。但必须成对出现,前面单引号里的是字符标记,后面给出的是对应的值。Kernel_FunctionValue 有如下些可选类别:
- linear — Default. Linear kernel or dot product.
- quadratic — Quadratic kernel.
- rbf — Gaussian Radial Basis Function kernel with a default scaling factor, sigma, of 1.
- polynomial — Polynomial kernel with a default order of 3.
- mlp — Multilayer Perceptron kernel with default scale and bias parameters of [1, -1].
如可通过如下来设定核函数为Gaussian Radial Basis Function kernel :
SVMStruct = svmtrain(Training, Group, 'Kernel_Function', rbf);
- fitsvm in MATLAB 2014 and svmtrain in previous version
- How to rollback to the previous version in svn
- In previous chapters,
- In previous chapters
- Save .mat file in older version matlab
- currentpoint in axes and figure matlab
- Image acquisition and basic operations in matlab
- round() Function in Python and Matlab
- Operators and special characters in matlab
- Real-time plotting in Python and Matlab
- How to Manage and Use LVM (Logical Volume Management) in Ubuntu In our previous article we told you
- precompiled header file is from a previous version of the compiler, or the precompiled hea in vs2005
- Leetcode_swap-nodes-in-pairs(c++ and python version)
- **Leetcode_largest-rectangle-in-histogram(c++ and python version)
- qSort implemented in recursion and non-recuision version
- switch php version between 5.6 and 7.0 in Ubuntu
- File Locking And Concurrency In SQLite Version 3
- in the previous lessons我们遗传的
- 【转自Oracle ACS--惜总】绕过win中服务开启oracle数据库
- 小米3在Eclipse中真机调试
- 中介者模式
- WebStorm/PhpStorm License
- Intercepting requests
- fitsvm in MATLAB 2014 and svmtrain in previous version
- 关于后盾网yii框架的学习小结(1)--yii模块的安装
- 7.1 MaxProfit
- CUICatalog: Invalid asset name supplied: (null) 日志处理
- Mac命令行、Mac的文件系统
- Servlet(接口)
- 甜品加盟店:2015年甜蜜宣言占领餐饮千亿市场
- MyEclipse使用DB Browser 连接数据库
- Jfinal框架学习系列之一