资源简介
模式分类 Richard O.Duda第二版【Pattern Classification 2nd edition】 (代码和手册)
代码片段和文件信息
function [test_targets E] = ada_boost(train_patterns train_targets test_patterns params)
% Classify using the AdaBoost algorithm
% Inputs:
% train_patterns - Train patterns
% train_targets - Train targets
% test_patterns - Test patterns
% Params - [NumberOfIterations Weak Learner Type Learner‘s parameters]
%
% Outputs
% test_targets - Predicted targets
% E - Errors through the iterations
%
% NOTE: Suitable for only two classes
%
[k_max weak_learner alg_param] = process_params(params);
[NiM] = size(train_patterns);
W = ones(1M)/M;
IterDisp = 10;
full_patterns = [train_patterns test_patterns];
test_targets = zeros(1 size(test_patterns2));
%Do the AdaBoosting
for k = 1:k_max
%Train weak learner Ck using the data sampled according to W:
%...so sample the data according to W
randnum = rand(1M);
cW = cumsum(W);
indices = zeros(1M);
for i = 1:M
%Find which bin the random number falls into
loc = max(find(randnum(i) > cW))+1;
if isempty(loc)
indices(i) = 1;
else
indices(i) = loc;
end
end
%...and now train the classifier
Ck = feval(weak_learner train_patterns(: indices) train_targets(indices) full_patterns alg_param);
%Ek <- Training error of Ck
E(k) = sum(W.*(Ck(1:M) ~= train_targets));
if (E(k) == 0)
break
end
%alpha_k <- 1/2*ln(1-Ek)/Ek)
alpha_k = 0.5*log((1-E(k))/E(k));
%W_k+1 = W_k/Z*exp(+/-alpha)
W = W.*exp(alpha_k*(xor(Ck(1:M)train_targets)*2-1));
W = W./sum(W);
%Update the test targets
test_targets = test_targets + alpha_k*(2*Ck(M+1:end)-1);
if (k/IterDisp == floor(k/IterDisp))
disp([‘Completed ‘ num2str(k) ‘ boosting iterations‘])
end
end
test_targets = test_targets > 0;
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2016-08-04 15:27 Pattern Classification 2nd edition (代码和手册)\
目录 0 2016-08-04 15:28 Pattern Classification 2nd edition (代码和手册)\模式分类教材\
文件 622735 2011-04-28 10:46 Pattern Classification 2nd edition (代码和手册)\模式分类教材\Computer manual in MATLAB to accompany Pattern Classification.pdf
文件 7932266 2016-08-04 15:07 Pattern Classification 2nd edition (代码和手册)\模式分类教材\Pattern Classification.pdf
目录 0 2008-08-01 09:08 Pattern Classification 2nd edition (代码和手册)\模式分类(Matlab程序)\
文件 952782 2002-05-20 08:36 Pattern Classification 2nd edition (代码和手册)\模式分类(Matlab程序)\About.bmp
文件 1892 2003-06-26 20:48 Pattern Classification 2nd edition (代码和手册)\模式分类(Matlab程序)\Ada_Boost.m
文件 2815 2003-06-10 20:38 Pattern Classification 2nd edition (代码和手册)\模式分类(Matlab程序)\ADDC.m
文件 4439 2003-08-31 20:47 Pattern Classification 2nd edition (代码和手册)\模式分类(Matlab程序)\AGHC.m
文件 3397 2003-06-26 21:06 Pattern Classification 2nd edition (代码和手册)\模式分类(Matlab程序)\Backpropagation_Batch.m
文件 5308 2003-06-26 21:06 Pattern Classification 2nd edition (代码和手册)\模式分类(Matlab程序)\Backpropagation_CGD.m
文件 6494 2003-02-22 20:26 Pattern Classification 2nd edition (代码和手册)\模式分类(Matlab程序)\Backpropagation_Quickprop.m
文件 5029 2003-02-22 20:42 Pattern Classification 2nd edition (代码和手册)\模式分类(Matlab程序)\Backpropagation_Recurrent.m
文件 3334 2003-02-22 20:46 Pattern Classification 2nd edition (代码和手册)\模式分类(Matlab程序)\Backpropagation_SM.m
文件 3117 2003-02-22 20:50 Pattern Classification 2nd edition (代码和手册)\模式分类(Matlab程序)\Backpropagation_Stochastic.m
文件 1421 2003-03-05 19:07 Pattern Classification 2nd edition (代码和手册)\模式分类(Matlab程序)\Balanced_Winnow.m
文件 3343 2003-04-02 20:27 Pattern Classification 2nd edition (代码和手册)\模式分类(Matlab程序)\Bayesian_Model_Comparison.m
文件 588 2001-12-27 09:56 Pattern Classification 2nd edition (代码和手册)\模式分类(Matlab程序)\Bhattacharyya.m
文件 3248 2003-03-09 22:07 Pattern Classification 2nd edition (代码和手册)\模式分类(Matlab程序)\BIMSEC.m
文件 5599 2003-06-10 20:37 Pattern Classification 2nd edition (代码和手册)\模式分类(Matlab程序)\C4_5.m
文件 905 2003-02-22 21:13 Pattern Classification 2nd edition (代码和手册)\模式分类(Matlab程序)\calculate_error.m
文件 756 2003-02-18 17:57 Pattern Classification 2nd edition (代码和手册)\模式分类(Matlab程序)\calculate_region.m
文件 3721 2003-11-06 22:06 Pattern Classification 2nd edition (代码和手册)\模式分类(Matlab程序)\CART.m
文件 846 2003-02-22 21:36 Pattern Classification 2nd edition (代码和手册)\模式分类(Matlab程序)\CARTfunctions.m
文件 5527 2003-02-22 21:45 Pattern Classification 2nd edition (代码和手册)\模式分类(Matlab程序)\Cascade_Correlation.m
文件 902 2001-12-27 10:15 Pattern Classification 2nd edition (代码和手册)\模式分类(Matlab程序)\Chernoff.m
文件 2745 2003-11-08 22:59 Pattern Classification 2nd edition (代码和手册)\模式分类(Matlab程序)\Classification.txt
文件 1995 2003-02-22 21:48 Pattern Classification 2nd edition (代码和手册)\模式分类(Matlab程序)\classification_error.m
文件 19454 2003-09-21 21:04 Pattern Classification 2nd edition (代码和手册)\模式分类(Matlab程序)\classifier.m
文件 4520 2003-03-04 20:47 Pattern Classification 2nd edition (代码和手册)\模式分类(Matlab程序)\classifier.mat
文件 26413 2004-07-18 20:28 Pattern Classification 2nd edition (代码和手册)\模式分类(Matlab程序)\classifier_commands.m
............此处省略151个文件信息
- 上一篇:egret做的游戏
- 下一篇:STM32F407+OV2640+ONENET
相关资源
- Combining Pattern Classifie Methods and Algori
- 模式分类Pattern Classification第二版英文
- 模式分类第二版课后习题答案 完整英
- 模式分类 第二版答案
- 模式分类 duda第二版课后习题答案
- Pattern Classification(英文第二版+课后全
- 模式识别-中科院-黄庆明-视频教程视
- 模式分类 中文第二版,duda
- 模式分类中文版PDF
- 模式分类Pattern Classification-英文版-第
- 模式分类第二版中文版Duda.pdf全
- 模式分类- PDF版-一本很经典的书,强
- 模式分类中文版第二版
- 模式分类Pattern Classification Second Edit
- 模式分类第二版Richard O.Duda
- 模式分类 Richard O.Duda 中译本
- 国科大模式分类期末考试2006-2010.zip
- 模式分类答案
评论
共有 条评论