您好,欢迎访问三七文档
当前位置:首页 > IT计算机/网络 > 数据库 > A Linear Classifier with MATLAB
AClassifierwithMATLAB——transformingmulti-problemintodualproblemZhangJunzheDatarequirement123Experimentalresultsfigure4TwoclassificationthoughtsExperimentalproceduresThequestiontransformingmulti-problemintodualproblemOurproblemsmaybeinfinitedimensionalCanstilluseduality?Data:1、imageofunmannedaerialvehicle:100*100pixels2、classifiedimageofdigitizerdrafted3、MATLAB+ClassificationtoolboxTwoclassificationthoughts:1、chooseonegeo-object,theotheristhesecondgeo-object2、deletethethirdgeo-object,classifythefirstandsecondgeo-objectStep1:pre-processingtransformtheimageintothefileformatofthetoolsPixels:Selecttwoclassgeo-objectsFeature:select2fromRGBimages,forexampleRG,GB,RB(1=R,2=G,3=B)Twomatrix:patterns:[2xN]featurematrixtargets:[1xN]classlabelmatrixSaveasa*.matfileClear;r=(:,:,1);提取第一波段Rg=(:,:,2);b=(:,:,3);a=double(Plane_100t);转换数据类型a=reshape(a,3,10000);转换矩阵维数a(3,:)=[];删除第三波段Bc=reshape(data,1,10000);c(c~=1)=0分出房屋与非房屋patterns=a;targets=c;Clear;a=targets;a=a(find(targets3));留下属性非3的像素b(1,:)=[];删除第一波段d1=b(find(targets3));b的范围与相同b=double(patterns);b(2,:)=[];d2=b(find(targets3));b=[d2:d1];合并第一二波段1-blackhouse2-graylawn3-whitefield(shadow)TotrainaclassifierusingasubsetofdataTotestthelearnedclassifierusingtherestofdataStep2:parametersetupSVM:Support-vectormachinealgorithmparameter:[‘RBF',0.05,'Perceptron',inf]Thekernelfunction:Gauss(orRBF),Poly,Sigmoid,orLinearRBFkernel:Gaussianwidth(scalarparameter)Thechoiceofsolver:Perceptron,Quadprog,orLagrangianPerceptron:Two-layerneuralnetVisualizeallpixelsoftheimagein2-dimensionalfeaturespaceHousevslawnHousevsfieldLawnvsfieldHousevsnon-houseLawnvsnon-lawnFieldvsnon-fieldStep3:RecordtheresultsRecordtheerrorrate:Testerror、TrainerrorOneimportantquestion:Generalimagepatternrecognitionisbasedonthespatiallocationinformation,twotypesofsurfacefeaturesaredistinguishedbythedistance.Butinthecolorspace,thedistributionofpixelsisnotinaccordancewiththespatiallocationofdivision,itisthedivisionwiththecolorgray.Sothatitistheothermethodtodistinguishthegeo-objectthathavesamekindsofsurfacefeatures.Thanks
本文标题:A Linear Classifier with MATLAB
链接地址:https://www.777doc.com/doc-3309665 .html