资源简介
模式分类Pattern Classification第二版(Duda)英文版教材及参考答案(含matlab代码)
代码片段和文件信息
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;
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 9682107 2016-09-21 15:24 pattern classification.pdf
目录 0 2016-09-26 15:06 PatternClassification_Solution\
文件 2812830 2016-09-26 15:03 PatternClassification_Solution\Duda-problemsolutions.pdf
目录 0 2016-09-26 15:06 PatternClassification_Solution\Pattern Classification 2nd edition (代码和手册)\
目录 0 2016-09-26 15:11 PatternClassification_Solution\Pattern Classification 2nd edition (代码和手册)\模式分类教材\
文件 622735 2011-04-28 10:46 PatternClassification_Solution\Pattern Classification 2nd edition (代码和手册)\模式分类教材\Computer manual in MATLAB to accompany Pattern Classification.pdf
目录 0 2016-09-26 15:06 PatternClassification_Solution\Pattern Classification 2nd edition (代码和手册)\模式分类(Matlab程序)\
文件 952782 2002-05-20 08:36 PatternClassification_Solution\Pattern Classification 2nd edition (代码和手册)\模式分类(Matlab程序)\About.bmp
文件 1892 2003-06-26 20:48 PatternClassification_Solution\Pattern Classification 2nd edition (代码和手册)\模式分类(Matlab程序)\Ada_Boost.m
文件 2815 2003-06-10 20:38 PatternClassification_Solution\Pattern Classification 2nd edition (代码和手册)\模式分类(Matlab程序)\ADDC.m
文件 4439 2003-08-31 20:47 PatternClassification_Solution\Pattern Classification 2nd edition (代码和手册)\模式分类(Matlab程序)\AGHC.m
文件 3397 2003-06-26 21:06 PatternClassification_Solution\Pattern Classification 2nd edition (代码和手册)\模式分类(Matlab程序)\Backpropagation_Batch.m
文件 5308 2003-06-26 21:06 PatternClassification_Solution\Pattern Classification 2nd edition (代码和手册)\模式分类(Matlab程序)\Backpropagation_CGD.m
文件 6494 2003-02-22 20:26 PatternClassification_Solution\Pattern Classification 2nd edition (代码和手册)\模式分类(Matlab程序)\Backpropagation_Quickprop.m
文件 5029 2003-02-22 20:42 PatternClassification_Solution\Pattern Classification 2nd edition (代码和手册)\模式分类(Matlab程序)\Backpropagation_Recurrent.m
文件 3334 2003-02-22 20:46 PatternClassification_Solution\Pattern Classification 2nd edition (代码和手册)\模式分类(Matlab程序)\Backpropagation_SM.m
文件 3117 2003-02-22 20:50 PatternClassification_Solution\Pattern Classification 2nd edition (代码和手册)\模式分类(Matlab程序)\Backpropagation_Stochastic.m
文件 1421 2003-03-05 19:07 PatternClassification_Solution\Pattern Classification 2nd edition (代码和手册)\模式分类(Matlab程序)\Balanced_Winnow.m
文件 3343 2003-04-02 20:27 PatternClassification_Solution\Pattern Classification 2nd edition (代码和手册)\模式分类(Matlab程序)\Bayesian_Model_Comparison.m
文件 588 2001-12-27 09:56 PatternClassification_Solution\Pattern Classification 2nd edition (代码和手册)\模式分类(Matlab程序)\Bhattacharyya.m
文件 3248 2003-03-09 22:07 PatternClassification_Solution\Pattern Classification 2nd edition (代码和手册)\模式分类(Matlab程序)\BIMSEC.m
文件 5599 2003-06-10 20:37 PatternClassification_Solution\Pattern Classification 2nd edition (代码和手册)\模式分类(Matlab程序)\C4_5.m
文件 905 2003-02-22 21:13 PatternClassification_Solution\Pattern Classification 2nd edition (代码和手册)\模式分类(Matlab程序)\calculate_error.m
文件 756 2003-02-18 17:57 PatternClassification_Solution\Pattern Classification 2nd edition (代码和手册)\模式分类(Matlab程序)\calculate_region.m
文件 3721 2003-11-06 22:06 PatternClassification_Solution\Pattern Classification 2nd edition (代码和手册)\模式分类(Matlab程序)\CART.m
文件 846 2003-02-22 21:36 PatternClassification_Solution\Pattern Classification 2nd edition (代码和手册)\模式分类(Matlab程序)\CARTfunctions.m
文件 5527 2003-02-22 21:45 PatternClassification_Solution\Pattern Classification 2nd edition (代码和手册)\模式分类(Matlab程序)\Cascade_Correlation.m
文件 902 2001-12-27 10:15 PatternClassification_Solution\Pattern Classification 2nd edition (代码和手册)\模式分类(Matlab程序)\Chernoff.m
文件 2745 2003-11-08 22:59 PatternClassification_Solution\Pattern Classification 2nd edition (代码和手册)\模式分类(Matlab程序)\Classification.txt
文件 1995 2003-02-22 21:48 PatternClassification_Solution\Pattern Classification 2nd edition (代码和手册)\模式分类(Matlab程序)\classification_error.m
文件 19454 2003-09-21 21:04 PatternClassification_Solution\Pattern Classification 2nd edition (代码和手册)\模式分类(Matlab程序)\classifier.m
............此处省略153个文件信息
- 上一篇:运动目标检测算法Matlab
- 下一篇:算法导论 kindle mobi
评论
共有 条评论