资源简介
使用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
相关资源
- 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程序设计
评论
共有 条评论