




版權(quán)說(shuō)明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡(jiǎn)介
1、(Matlab)SVM工具箱快速入手簡(jiǎn) 易教程SVM工具箱快速入手簡(jiǎn)易教程(byfaruto)一 . matlab 自帶的函數(shù) (matlab 幫助文件里的例子)只有較新版本的matlab中有這兩個(gè)SVM的函數(shù)svmtrain svmclassify=簡(jiǎn)要語(yǔ)法規(guī)則 =svmtrainTrain support vector machine classifierSyntaxSVMStruct = svmtrain(Training, Group)SVMStruct = svmtrain(.,Kernel_Function, Kernel_FunctionValue, .)SVMStruct =
2、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_OptsVa
3、lue, .)SVMStruct = svmtrain(., BoxConstraint, BoxConstraintValue, .)SVMStruct = svmtrain(., Autoscale, AutoscaleValue, .)SVMStruct = svmtrain(., Showplot, ShowplotValue, .)svmclassifyClassify data using support vector machineSyntaxGroup = svmclassify(SVMStruct, Sample)Group = svmclassify(SVMStruct,
4、Sample, Showplot, ShowplotValue)=實(shí)=例研究 = load fisheriris賊入matlab自帶的數(shù)據(jù)有關(guān)數(shù)據(jù)的信息可以自己到 UCI查找,這是UCI的經(jīng) 典數(shù)據(jù)之一 , 得到的數(shù)據(jù)如下圖 :tu1NdmeValueMinH- 回 rmeas species150x4 doubles model = svmtrain(training_label_vector, training_instance_matrix , libsvm_options);-training_label_vector:An mby 1 vector of training label
5、s (type must be double).-training_instance_matrix:An m by n matrix of m training instances with n features.It can be dense or sparse(type must be double).-libsvm_options:A string of trainingoptions in the same format as that of LIBSVM.matlab predicted_label, accuracy, decision_values/prob_estimates
6、= svmpredict(testing_label_vector, testing_instance_matrix, model , libsvm_options);-testing_label_vector:An m by 1 vector of prediction labels. If labels of testdata are unknown, simplyuse any random values. (type must be double) -testing_instance_matrix:An mby n matrix of mtesting instances with n
7、 features.It can be dense or sparse.(type must be double)-model:The output of svmtrain. -libsvm_options:A string of testing options in the same format as that of LIBSVM.Returned Model Structure實(shí)例研究 :load heart_scale.mat%工具箱里自帶的數(shù)據(jù)如圖:tu4NameVlueFR heart_scakjn5t 270x13 doubfe?1 heart sal label -其中 hea
8、rt_scale_i nst是樣本,heart_scale_label是樣本標(biāo)簽model = svmtrai n(heart_scaleabel, heart_scale_i nst, -c 1 -g 0.07);%訓(xùn)練樣本,具體參數(shù)的調(diào)整請(qǐng)看幫助文件predict_label, accuracy, dec_values= svmpredict(heart_scaleabel, heart_scale_i nst, model);%分類預(yù)測(cè),這里把訓(xùn)練集當(dāng)作測(cè)試集,驗(yàn)證效果如下 predict_label, accuracy, dec_values= svmpredict(heart_scaleabel, heart_scale_i nst, model); % test the training dataAccuracy = 86.6667% (234/270) (classificatio n) 這回把SVM這點(diǎn)入門(mén)的東西都說(shuō)完了 ,大家可以參照 著上手了 ,有關(guān)SVM的原理我下面有個(gè)簡(jiǎn)易的PPT,是 以前做項(xiàng)目時(shí)我做的當(dāng)時(shí)我負(fù)責(zé)有關(guān)SVM這一塊代 碼實(shí)現(xiàn)講解什么的,感興趣的你可以看看,都是上手 較快的東西,想要深入學(xué)習(xí)SVM你的學(xué)習(xí)統(tǒng)計(jì)學(xué)習(xí)理 論什么的挺多的呢.SVM.ppt (391 KB)
溫馨提示
- 1. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒(méi)有圖紙預(yù)覽就沒(méi)有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 二零二五年度汽車銷售折扣及售后服務(wù)合同
- 2025年度環(huán)保主題紀(jì)錄片制作及授權(quán)使用合同
- 中學(xué)生社會(huì)實(shí)踐感悟之旅的讀后感
- 施工總承包合同
- 農(nóng)產(chǎn)品品牌國(guó)際化與差異化發(fā)展戰(zhàn)略方案
- 人工智能輔助教育產(chǎn)品開(kāi)發(fā)流程
- 企業(yè)員工福利管理信息系統(tǒng)采購(gòu)合同
- 物聯(lián)網(wǎng)設(shè)備安全監(jiān)測(cè)協(xié)議
- 古詩(shī)文觀止的教學(xué)教案與文學(xué)評(píng)析
- 食品營(yíng)養(yǎng)與健康管理試題集
- 小故事大道理兩只山羊
- GB 19522-2024車輛駕駛?cè)藛T血液、呼氣酒精含量閾值與檢驗(yàn)
- 水泥窯替代燃料技術(shù)改造項(xiàng)目可行性研究報(bào)告
- 婦女兩癌篩查培訓(xùn)
- 印刷品承印五項(xiàng)管理新規(guī)制度
- 2024年湖南鐵路科技職業(yè)技術(shù)學(xué)院?jiǎn)握新殬I(yè)技能測(cè)試題庫(kù)及答案解析
- CPK過(guò)程能力分析報(bào)告
- 店鋪診斷報(bào)告
- 2024陜西延長(zhǎng)石油集團(tuán)礦業(yè)公司所屬單位招聘筆試參考題庫(kù)附帶答案詳解
- 安徽省六安市裕安中學(xué)2023-2024學(xué)年八年級(jí)上學(xué)期第一次月考數(shù)學(xué)試卷(含答案)
- 2024年黑龍江省專升本考試法學(xué)基礎(chǔ)模擬試題含解析
評(píng)論
0/150
提交評(píng)論