您好,欢迎访问三七文档
当前位置:首页 > 临时分类 > 支持向量机分类算法在MATLAB环境下的实现
:2008)04)18:(1981)),,,,,E-mai:ldongting@163.com支持向量机分类算法在MATLAB环境下的实现(榆林学院计算机与网络工程系,陕西榆林719000):支持向量机算法SVM(SupportVectorMachine)做为新一代机器学习算法近年来被成功的应用到很多模式识别问题中,其在数学上表示为求解一个二次规划问题主要论述了支持向量机分类算法在MATLAB环境下的具体实现方法,为支持向量机算法的学习者和非计算机专业的广大研究人员提供一种简单方便高效可行实现方法:SVM;二次归划;MATLAB:TP181:A:1008-3871(2008)04-0094-03V.Vapnik,,[1],(),;,,[2]SVM(SupportVectorMachine),[3],,MATLAB,1MATLAB1.1最优超平面SVM(OptimaHlyperplane)(xi,yi),i=1,,,n;y={+1,-1},:w#x+b=0(1),,,+w+2,w,:yi[(w#xi)+b]-1E0,i=1,2,L,n(2),+w+2H1H2(2),(2),U(w)=12+w+2=12(w#w)(3),:L(w,b,a)=12+w+2-rni=1ai{yi[(w#x)+b]-1}(4)(4),ai0:maxQ(a)=rni=1ai-12rni=1,j=1aiajyiyj(xi#xj)s..trni=1yiai=0aiE0,i=1,,,n1.2非线性SVM,,,,,Mercer:K(x,xc),,U(x)0,QU2(x)dx],20087184JOURNALOFYULINCOLLEGEJuly.2008Vo.l18No.4kK(x,y)U(x)U(y)dxdy40,[4]K(x,y),,:MAXQ(a)=rni=1ai-12rni=1j=1aiajyiyjK(xi,xj)s.trni=1yiai=00Fa,FCi=1,,,n:f(x)=sgnrni=1ai*yiK(xi,x)+b*,:,,,,:linear:K(x,y)=x#y;ploy:K(x,y)=[(x#y)+1]q;rb:fK(x,y)=exp-|x-y|2R21.3MATLABMATLABMathWork,MATLAB,,,[2],,2,(QP),,(6)(7)(5)A=(51,52,,,5n)T,Q(A)=-ATI+1/2ATDA(5)0FAFC(6)ATy=0(7):A=(51,52,,,5n)Tn,;Dij=yiyjK(xi,xj);y=(y1,y2,,,yn)T,1-1;xi,,A=(51,52,,,5n)T,,MATLAB,MATLAB,,(quadraticprogramming):minfcx+12xcHxsub.toAxFbAeqx=beqlbFxFub,HAAeq;fbbeqlbubx,MATLAB5.xqp6.0quadprogquadprog:[x,fval]=quadprog(H,,fA,b,Aeq,beq,lb,ub,x0)HfAbAeqbeqlbub;x,;lbubx,&bFxFub;AeqbeqAeq#x=beq;x0,x,x;fval,,;H=Dij=yiyjK(xi,xj),;f=-1;,Ab;Aeq=AT,beq=y,ATy=0;Lb=0ub=C,0FAFC;x0=0,A,C,MATLAB:function[nsv,alpha,b]=svc(X,Y,ker,C)%X-%Y-%ker-%C-%nsv-#95#:MATLAB%alpha-%b-H=zeros(n,n);fori=1:nforj=1:nH(,ij)=Y(i)*Y(j)*svkernel(ker,X(,i:),X(,j:));endend%Dij=yyjK(xi,xj)f=-ones(n,1);lb=zeros(n,1);%alphas=0ub=C*ones(n,1);%alphas=Cx0=zeros(n,1);%[0000]A=Yc,b=0;%Ax=b[alphalambdahow]=qp(H,c,A,b,vlb,vub,x0,neqcstr)%qpsvkernel,,svc(51,52,,,5n)Tb,x,f(x)=sgnEni=1a*iyiK(xi,x)+b*,sgn,sgn(x)=1x0-1x03MATLAB,,,,MATLABMATALAB:[1](英)克里斯特安尼.支持向量机导论[M].李国正,王猛,曾华军译.北京:电子工业出版社,2004.[2]张瑞丰.精通MATLAB6.5[M].北京:中国水利水电出版社,2004.[3]VlandimirN.Vapnik.统计学习理论的本质[M].张学工译.北京B清华大学出版社,1999.[4]边肇祺,张学工.模式识别[M].北京:清华大学出版社,1988.(责任编辑:王瑞斌)SVMAlgorithmRealizedinMABLABDONGTing(DepartmentofComputerandNetworkEngineering,YulinCollege,Yulin719000,Shaanxi)Abstract:Asanovelgeneration-machinelearning-method,SupportVectorMachinehascaughtmucha-ttentioninrecentyears,andsuccessfullyusedinsometopicsofpatternrecognition.Inmathematicsitpresentsaquadraticprogramming.ThewaysandmeanstorealizeSVMinMATLABaremainlyintroducedinthispaper,andalsoasimple,efficien,ttrustfulmethodisofferedtothepeoplewhostudySVMandthepeoplewhodotheresearchwork.Keywords:SVM;QP;MATLAB#96#20084(74)
本文标题:支持向量机分类算法在MATLAB环境下的实现
链接地址:https://www.777doc.com/doc-4517574 .html