91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 6KB
    文件類型: .zip
    金幣: 2
    下載: 0 次
    發布日期: 2021-06-08
  • 語言: Matlab
  • 標簽: adaboost??

資源簡介

使用matlab實現的adaboost代碼,直接運行里面的demo.m,就可以運行。

資源截圖

代碼片段和文件信息

function?[Lhits]?=?ADABOOST_te(adaboost_modelte_func_handletest_settrue_labels)??
%??
%?ADABOOST?TESTING??
%??
%???[Lhits]?=?ADABOOST_te(adaboost_modelte_func_handletrain_set??
%??????????????????????????true_labels)??
%??
%????????????‘te_func_handle‘?is?a?handle?to?the?testing?function?of?a??
%????????????learning?(weak)?algorithm?whose?prototype?is?shown?below.??
%??
%????????????[Lhitserror_rate]?=?test_func(modeltest_setsample_weightstrue_labels)??
%?????????????????????model:?the?output?of?train_func??
%?????????????????????test_set:?a?KxD?dimensional?matrix?each?of?whose?row?is?a??
%?????????????????????????testing?sample?in?a?D?dimensional?feature?space.??
%?????????????????????sample_weights:???a?Dx1?dimensional?vector?the?i-th?entry??
%?????????????????????????of?which?denotes?the?weight?of?the?i-th?sample.??
%?????????????????????true_labels:?a?Dx1?dimensional?vector?the?i-th?entry?of?which??
??
%?????????????????????????is?the?label?of?the?i-th?sample.??
%?????????????????????L:?a?Dx1-array?with?the?predicted?labels?of?the?samples.??
%?????????????????????hits:?number?of?hits?calculated?with?the?comparison?of?L?and??
%?????????????????????????true_labels.??
%?????????????????????error_rate:?number?of?misses?divided?by?the?number?of?samples.??
%??
%????????????It?is?the?corresponding?testing??
%????????????module?of?the?function?that?is?specified?in?the?training?phase.??
%????????????‘test_set‘?is?a?NxD?matrix?where?N?is?the?number?of?samples??
%????????????in?the?test?set?and?D?is?the?dimension?of?the?feature?space.??
%????????????‘true_labels‘?is?a?Nx1?matrix?specifying?the?class?label?of??
%????????????each?corresponding?sample‘s?features?(each?row)?in?‘test_set‘.??
%????????????‘adaboost_model‘?is?the?model?that?is?generated?by?the?function??
%????????????‘ADABOOST_tr‘.??
%??
%????????????‘L‘?is?the?likelihoods?that?are?assigned?by?the?‘ADABOOST_te‘.??
%????????????‘hits‘?is?the?number?of?correctly?predicted?labels.??
%??
%?????????Specific?Properties?That?Must?Be?Satisfied?by?The?Function?pointed??
%?????????by?‘func_handle‘??
%?????????------------------------------------------------------------------??
%??
%?Notice:?Labels?must?be?positive?integer?values?from?1?upto?the?number?classes.??
%??
%?Bug?Reporting:?Please?contact?the?author?for?bug?reporting?and?comments.??
%??
%?Cuneyt?Mertayak??
%?email:?cuneyt.mertayak@gmail.com??
%?version:?1.0??
%?date:?21/05/2007??
%??
??
hypothesis_n?=?length(adaboost_model.weights);??
sample_n?=?size(test_set1);??
class_n?=?length(unique(true_labels));??
temp_L?=?zeros(sample_nclass_nhypothesis_n);???%?likelihoods?for?each?weak?classifier??
??
%?for?each?weak?classifier?likelihoods?of?test?samples?are?collected??
for?i=1:hypothesis_n??
????[temp_L(::i)hitserror_rate]?=?te_func_handle(adaboost_model.parameters{i}test_setones(sample_n1)true_labels);??
????temp_L(::i)?=?temp_L(::i)*adaboost_model.weights(i);

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2018-03-21?09:26??adaboost\
?????文件????????3078??2018-03-21?08:39??adaboost\ADABOOST_te.m
?????文件????????4798??2018-03-21?08:38??adaboost\ADABOOST_tr.m
?????文件????????2127??2018-03-20?16:37??adaboost\demo.m
?????文件?????????926??2018-03-21?08:39??adaboost\likelihood2class.m
?????文件????????1622??2018-03-21?08:37??adaboost\threshold_te.m
?????文件????????2586??2018-03-21?08:37??adaboost\threshold_tr.m

評論

共有 條評論