登录
首页 » Matlab » LS_SVMlab多分类

LS_SVMlab多分类

于 2022-05-14 发布 文件大小:1,000.82 kB
0 62
下载积分: 2 下载次数: 2

代码说明:

支持向量机的多类分类支持向量机的基本理论是从二类分类问题提出的。我想绝大部分网友仅着重于理解二类分类问题上了,我当初也是这样,认识事物都有一个过程。二类分类的基本原理固然重要,我在这里也不再赘述,很多文章和书籍都有提及。我觉得对于工具箱的使用而言,理解如何实现从二类分类到多类分类的过渡才是最核心的内容。下面我仅以1-a-r算法为例,解释如何由二类分类器构造多类分类器。二类支持向量机分类器的输出为[1,-1],当面对多类情况时,就需要把多类分类器分解成多个二类分类器。在第一种工具箱LS_SVMlab中,文件Classification_LS_SVMlab.m中实现了三类分类。训练与测试样本分别为n1、n2,它们是3 x 15的矩阵,即特征矢量是三维,训练与测试样本数目均是15;由于是三类分类,所以训练与测试目标x1、x2的每一分量可以是1、2或是3,分别对应三类,如下所示:n1 = [rand(3,5),rand(3,5)+1,rand(3,5)+2];x1 = [1*ones(1,5),2*ones(1,5),3*ones(1,5)];     n2 = [rand(3,5),rand(3,5)+1,rand(3,5)+2];x2 = [1*ones(1,5),2*ones(1,5),3*ones(1,5)];     1-a-r算法定义:对于N类问题,构造N个两类分类器,第i个分类器用第i类训练样本作为正的训练样本,将其它类的训练样本作为负的训练样本,此时分类器的判决函数不取符号函数sign,最后的输出是N个两类分类器输出中最大的那一类。在文件Classification_LS_SVMlab.m的第42行:codefct = "code_MOC",就是设置由二类到多类编码参数。当第42行改写成codefct ="code_OneVsAll",再去掉第53行最后的引号,按F5运行该文件,命令窗口输出有:codebook =     1    -1    -1    -1   &n

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论


0 个回复

  • envelop
    应用表面粗糙度曲线上寻找上下包络线,其过程:找到极大极小值,之后画出直线(envelop)
    2009-03-05 14:40:46下载
    积分:1
  • fdtda
    3-dimension fdtd code using matlab
    2010-07-31 22:33:51下载
    积分:1
  • Laser-Guided-Door-Opener
    This project proves to be a very useful home and office appliance as it eliminates the worry of user to open & close a door. In this project we have not operate door as we did manually as push and pull a door.Project circuit sens a human interference and accordingly it is open & close door. The term automated doors includes full powered automated doors such as those that are commonly used at supermarkets and transportation terminals and low energy and “power assist doors that are used in less demanding situations. Here it doesn’t require conventionally pull and push the door. So it can be useful for Handicap people. It is easy to use and affordable.
    2015-02-08 00:54:28下载
    积分:1
  • JPDAF
    这个程序能实现在杂波环境下对多目标的跟踪。(This program can realize multi-target tracking in clutter environment with JPDA algorithm.)
    2018-11-11 18:40:16下载
    积分:1
  • OFDM信道估计系统仿真
    资源描述OFDM信道估计系统仿真,采用ls、ls/DFT估计,线性插值方法,最后对比采用不同信道估计方法下的误码率
    2023-03-25 21:00:04下载
    积分:1
  • segyread
    可以利用c#读取segy数据,对地震初学者有很大的用处。(Can use c# read segy data, are of great use for the beginners of the earthquake.)
    2015-01-17 12:53:17下载
    积分:1
  • Sparse-representation
    稀疏低秩表示,基于稀疏表示的子空间谱聚类方法(Sparse representation)
    2015-09-19 14:00:38下载
    积分:1
  • Matlab
    该文件是《matlab教程》图书的源代码,图书的作者是张志涌,对matlab的初学者很有帮助!(The file is " matlab Tutorial" book source code, book author is Zhang Yong, of the matlab beginners help!)
    2010-06-29 21:25:09下载
    积分:1
  • MPEG-and-MP3-WITH-MATLAB-AA
    . This book describes the fundamentals and the MATLAB implementation details of the MPEG algorithm. Several demonstrations using MATLAB® software are presented.
    2012-10-08 02:48:44下载
    积分:1
  • ICA
    it is the matlab code of the imperialistic competitive algorithm.
    2014-01-22 00:53:30下载
    积分:1
  • 696518资源总数
  • 104647会员总数
  • 52今日下载