資源簡介
內部包含orl人臉數據庫;樸素貝葉斯分類數值型數據、取點測比例距、訓練數據集特征向量化、(PCA+adaboost PCA+SVM人臉識別(可用,全面))四種人臉識別相關的功能,經過測試均可用,4者代碼相互之間沒有關系,且第四個“測試成功@(PCA+adaboost PCA+SVM(可用,全面))”可以完整進行人臉識別,下載者根據功能需要選擇使用
代碼片段和文件信息
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‘
%????????------------------------------------------------------------------
hypothesis_n?=?length(adaboost_model.weights);
sample_n?=?size(test_set1);
if?nargin==4
????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);
????end
????L?=?sum(temp_L3);
????hits?=?sum(likelihood2class(L)==true_labels);
else
????class_n=2;
????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)?=?te_func_handle(adaboost_model.parameters{i}...
?test_setones(sampl
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2017-12-07?21:41??人臉識別?MATLAB代碼\
?????目錄???????????0??2017-12-05?17:01??人臉識別?MATLAB代碼\orl_\
?????目錄???????????0??2017-12-05?17:01??人臉識別?MATLAB代碼\orl_\s1\
?????目錄???????????0??2017-12-05?17:01??人臉識別?MATLAB代碼\orl_\s10\
?????文件???????10318??2017-12-05?11:08??人臉識別?MATLAB代碼\orl_\s10\1.pgm
?????文件???????10318??2017-12-05?11:08??人臉識別?MATLAB代碼\orl_\s10\10.pgm
?????文件???????10318??2017-12-05?11:08??人臉識別?MATLAB代碼\orl_\s10\2.pgm
?????文件???????10318??2017-12-05?11:08??人臉識別?MATLAB代碼\orl_\s10\3.pgm
?????文件???????10318??2017-12-05?11:08??人臉識別?MATLAB代碼\orl_\s10\4.pgm
?????文件???????10318??2017-12-05?11:08??人臉識別?MATLAB代碼\orl_\s10\5.pgm
?????文件???????10318??2017-12-05?11:08??人臉識別?MATLAB代碼\orl_\s10\6.pgm
?????文件???????10318??2017-12-05?11:08??人臉識別?MATLAB代碼\orl_\s10\7.pgm
?????文件???????10318??2017-12-05?11:08??人臉識別?MATLAB代碼\orl_\s10\8.pgm
?????文件???????10318??2017-12-05?11:08??人臉識別?MATLAB代碼\orl_\s10\9.pgm
?????目錄???????????0??2017-12-05?17:01??人臉識別?MATLAB代碼\orl_\s11\
?????文件???????10318??2017-12-05?11:08??人臉識別?MATLAB代碼\orl_\s11\1.pgm
?????文件???????10318??2017-12-05?11:08??人臉識別?MATLAB代碼\orl_\s11\10.pgm
?????文件???????10318??2017-12-05?11:08??人臉識別?MATLAB代碼\orl_\s11\2.pgm
?????文件???????10318??2017-12-05?11:08??人臉識別?MATLAB代碼\orl_\s11\3.pgm
?????文件???????10318??2017-12-05?11:08??人臉識別?MATLAB代碼\orl_\s11\4.pgm
?????文件???????10318??2017-12-05?11:08??人臉識別?MATLAB代碼\orl_\s11\5.pgm
?????文件???????10318??2017-12-05?11:08??人臉識別?MATLAB代碼\orl_\s11\6.pgm
?????文件???????10318??2017-12-05?11:08??人臉識別?MATLAB代碼\orl_\s11\7.pgm
?????文件???????10318??2017-12-05?11:08??人臉識別?MATLAB代碼\orl_\s11\8.pgm
?????文件???????10318??2017-12-05?11:08??人臉識別?MATLAB代碼\orl_\s11\9.pgm
?????目錄???????????0??2017-12-05?17:01??人臉識別?MATLAB代碼\orl_\s12\
?????文件???????10318??2017-12-05?11:08??人臉識別?MATLAB代碼\orl_\s12\1.pgm
?????文件???????10318??2017-12-05?11:08??人臉識別?MATLAB代碼\orl_\s12\10.pgm
?????文件???????10318??2017-12-05?11:08??人臉識別?MATLAB代碼\orl_\s12\2.pgm
?????文件???????10318??2017-12-05?11:08??人臉識別?MATLAB代碼\orl_\s12\3.pgm
?????文件???????10318??2017-12-05?11:08??人臉識別?MATLAB代碼\orl_\s12\4.pgm
............此處省略1356個文件信息
評論
共有 條評論