资源简介
内部包含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个文件信息
相关资源
- 冈萨雷斯数字图像处理MATLAB版图片及
- MNIST手写字体识别CNN+BP两种实现-Matl
- Matlab课程设计:对作业文档格式化批
-
MATLAB Simuli
nk系统仿真 课件 李献 - 基于MATLAB的数字图像处理研究_郑继刚
- 梁瑞宇赵力语音信号处理实验教程m
- 《卡尔曼滤波原理及应用-MATLAB仿真》
- 光流法包括LK光流,HS光流,论文,
- 节点电价预测,电力系统负荷预测
- MATLAB从入门到精通-pdf非扫描版本
- matlab_tdm_example
- 卷积神经网络matlab代码下载153575
- MATLAB小波变换.pdf
- 《MATLAB GUI设计学习手记(第2版)》
- 现代永磁同步电机控制原理及MATLAB仿
- MATLAB车牌识别课程设计源码(带界面
- Matlab GUI 编程
- 《matlab算法大全》pdf+源码
- 《MATLAB优化算法案例分析与应用》p
- 《有限元方法及MATLAB编程》pdf电子书
- SAR图像分类识别(matlab)
- MATLAB图像配准
-
电力系统的MATLAB SIMUli
nk仿真与应用 - 无线传感器网络无需测距定位算法m
- 复杂网络MATLAB工具包和源程序(好不
- matlaB程序的有限元法解泊松方程
- 《MATLAB统计分析与应用:40个案例分析
- MATLAB时频分析程序和演示(有几百个
- 《MATLAB R2016a神经网络设计与应用28个
- 基于MATLAB的雷达信号处理
评论
共有 条评论