(Matlab)SVM工具箱快速入手簡(jiǎn)易教程_第1頁(yè)
(Matlab)SVM工具箱快速入手簡(jiǎn)易教程_第2頁(yè)
(Matlab)SVM工具箱快速入手簡(jiǎn)易教程_第3頁(yè)
(Matlab)SVM工具箱快速入手簡(jiǎn)易教程_第4頁(yè)
(Matlab)SVM工具箱快速入手簡(jiǎn)易教程_第5頁(yè)
已閱讀5頁(yè),還剩4頁(yè)未讀, 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(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ì)自己和他人造成任何形式的傷害或損失。

評(píng)論

0/150

提交評(píng)論