资源简介
matlab版的Adaboost对数据集分类,并测试准确率,阅读readme.txt即知
代码片段和文件信息
function [ acGControl ] = Adaboost( TrainDataTrainLabelsControlDataControlLabelsMaxIter)
%UNtitleD2 Summary of this function goes here
% Detailed explanation goes here
% and initializing matrices for storing step error
RAB_control_error = zeros(1 MaxIter);
MAB_control_error = zeros(1 MaxIter);
GAB_control_error = zeros(1 MaxIter);
ac=zeros(14);
% Step3: constructing weak learner
weak_learner = tree_node_w(1); % pass the number of tree splits to the constructor
% and initializing learners and weights matices
GLearners = [];
GWeights = [];
% RLearners = [];
% RWeights = [];
% NuLearners = [];
% NuWeights = [];
% Step4: iterativly running the training
for lrn_num = 1 : MaxIter
clc;
disp(strcat(‘Boosting step: ‘ num2str(lrn_num)‘/‘ num2str(MaxIter)));
% training gentle adaboost
[GLearners GWeights] = GentleAdaBoost(weak_learner TrainData TrainLabels 1 GWeights GLearners);
%evaluating control error
GControl = sign(Classify(GLearners GWeights ControlData));
GAB_control_error(lrn_num) = GAB_control_error(lrn_num) + sum(GControl ~= ControlLabels) / length(ControlLabels);
%training real adaboost
% [RLearners RWeights] = RealAdaBoost(weak_learner TrainData TrainLabels 1 RWeights RLearners);
%
% %evaluating control error
% RControl = sign(Classify(RLearners RWeights ControlData));
%
% RAB_control_error(lrn_num) = RAB_control_error(lrn_num) + sum(RControl ~= ControlLabels) / length(ControlLabels);
%
% %training modest adaboost
% [NuLearners NuWeights] = ModestAdaBoost(weak_learner TrainData TrainLabels 1 NuWeights NuLearners);
%
% %evaluating control error
% NuControl = sign(Classify(NuLearners NuWeights ControlData));
%
% MAB_control_error(lrn_num) = MAB_control_error(lrn_num) + sum(NuControl ~= ControlLabels) / length(ControlLabels);
end
ac(1)=1-GAB_control_error(end);
ac(2)=1-RAB_control_error(end);
ac(3)=1-MAB_control_error(end);
ac=ac(1);
% all_label= NuControl+GControl+RControl;
% all_label(all_label>0)=1;
% all_label(all_label<0)=-1;
% ac(4)=sum(all_label==ControlLabels)/length(all_label);
% Step4: displaying graphs
% figure plot(GAB_control_error);
% hold on;
% plot(MAB_control_error ‘r‘);
%
% plot(RAB_control_error ‘g‘);
% hold off;
%
% legend(‘Gentle AdaBoost‘ ‘Modest AdaBoost‘ ‘Real AdaBoost‘);
% xlabel(‘Iterations‘);
% ylabel(‘Test Error‘);
end
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2016-06-20 17:03 Adaboost\
文件 2493 2016-05-27 09:16 Adaboost\Adaboost.m
文件 2803 2016-05-25 11:38 Adaboost\newtest_random1.m
文件 277 2016-06-20 17:09 Adaboost\readme.txt
- 上一篇:批量读ORL图片 批量处理 再批量保存的MATLAB程序
- 下一篇:相位解缠算法
相关资源
- 用Adaboost+PCA进行特定的目标识别
- adaboost算法Matlab代码及训练数据
- 使用matlab实现的adaboost的代码
- adaboost人脸识别 matlab程序
- adaboost算法matlab实现
- AdaBoost在matlab下的简单实现
- matlab基于knn算法的adaboost实现
- adaboost详解及matlab
- 基于树型弱分类器的adaboost演示程序(
- AdaBoost等MatLab代码
- GML_AdaBoost_Matlab_Toolbox
- 对训练集测试集采用adaboost算法并比较
- adaboost的matlab实现代码,适合给初学者
- adaboost 演示demo基于Matlab,学习算法包
- AdaBoost 分类器训练学习
- 神经网络与adaboost的强分类器
- adaboost法人脸检测
- PNN,smote,BP-AdaBoost等类别不平衡分类
- 超级实用。容易理解的Adaboost的Matla
- 基于adaboost和深度学习网络的人脸表情
- adaboost 基于adaboost的人脸识别程序
- VideoFaceDetect 使用matlab调用opencv做成的
- FaceRec 基于matlab2008的人脸识别系统
- HOGadaboost 用matla实现的行人检测
- clustering 使用K-means
- adaboost-train-test 级联分类器学习
- matlab-face-detection pca+svm 与pca +adaboost
- a-useful-adaboost-programme 一个基于adaboo
- adaboostPknnPlbp
- AdaBoost算法的matlab程序设计
评论
共有 条评论