资源简介
LDA人脸识别 Matlab code 。。。。。。。。。。。
代码片段和文件信息
function [DFLD_Trans]=F_JDLDAPro(TrainDatavNumEachClass);
%
% Syntax: [DFLD_Trans]=F_JDLDAPro(TrainDatavNumEachClass);
%
% This function builds a regularized LDA subspace based on Juwei‘s R-LDA
% method which presented in the following paper
% Juwei Lu K.N. Plataniotis A.N. Venetsanopoulos “Regularization Studies
% of Linear Discriminant Analysis in Small Sample Size Scenarios with Application
% to Face Recognition“ Pattern Recognition Letter in press.
%
% TrainData: Input training data should be a matrix with each column vector being
% a sample.
% vNumEachClass: the number of the samples per class in [TrainData].
%
% Author: Lu Juwei - Bell Multimedia Lab Dept. of ECE U. of Toronto
% Created in 08 Dec 2003.
%
VERY_SMALL=1e-3;
I=find(vNumEachClass<=2);
sss_rate=sum(vNumEachClass(I))/sum(vNumEachClass);
if sss_rate>=0.5
% For L=2; L is the number of training samples per subject.
stRegParam=struct(‘Eta_Sw‘{1}‘Threshold_EigVal_Sb‘{0.02}‘Update_EigVal_Sb‘{0.05}‘RemainEigVec‘{1});
else
% For L>2;
stRegParam=struct(‘Eta_Sw‘{1e-3}‘Threshold_EigVal_Sb‘{0.02}‘Update_EigVal_Sb‘{0.2}‘RemainEigVec‘{0.8});
end
% regularization parameter for ill-posed within-class scatter matrix.
% smaller number of training samples per subject need stronger regularizer.
% \eta \in [01]. Try different values of eta to find the best one.
% For simplicity set eta_sw=1e-3 for L>2 while eta_sw=1 for L=2.
eta_sw=stRegParam.Eta_Sw;
% The threshold is used to determine which small eigenvalues of Sb need to
% be adjusted. For simplicity set thresh_eigval_sb=0.02 (of the biggest
% eigenvalue of Sb).
thresh_eigval_sb=stRegParam.Threshold_EigVal_Sb;
% The the new value for those eigvalues of Sb needed to be adjusted.
% For simplicity set update_eigval_sb=0.2 (of the biggest eigenvalue of
% Sb).
update_eigval_sb=stRegParam.Update_EigVal_Sb;
% The rate of remaining eigenvectors of Sb others will be thrown away.
% For simplicity set remain_eigvec=1 i.e. keep all the eigenvectors.
remain_eigvec=stRegParam.RemainEigVec;
[rowTraincolTrain]=size(TrainData);
sample_num=colTrain;
eachclass_num=vNumEachClass;
class_num=length(eachclass_num);
mean_class=mean(double(TrainData)2);
mean_eachclass=zeros(rowTrainclass_num);
t=1;
for j=1:class_num
tt=t+eachclass_num(j)-1;
a=double(TrainData(:t:tt));
mean_eachclass(:j)=mean(a2);
t=tt+1;
end
clear(‘a‘);
% The first m_b eigenvectors corresponding to largest eigenvalues will be extracted
% from eigenvectors of Sb
m_b=class_num-1;
% Sw : the within-class scatter conviariance matrix
% Sw=zeros(rowTrainrowTrain);
% Sw=Phi_w*Phi_w‘;
Phi_w=zeros(rowTraincolTrain);
j=1;
for i=1:class_num
t=double(TrainData(:j:j+eachclass_num(i)-1));
m=kron(mean_eachclass(:i)ones(1eachclass_num(i)));
b=t-m;
Phi_w(:j:j+eachclass_num(i)-1)=b;
% Sw=Sw+b*b‘;
j=j+eachclass_num(i);
end
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 2214 2004-11-09 14:39 readme.txt
文件 4990 2004-11-02 11:31 F_JDLDAPro.m
文件 335890 2004-10-29 10:05 R_LDA_PRL.pdf
文件 483064 2004-11-01 17:02 DF_LDA_TNN.pdf
- 上一篇:Matlab 6.5免安装版
- 下一篇:盲信号分离算法 matlab
相关资源
- LDA散度矩阵的计算
- 用LDA和PCA模式识别方法对人脸特征进
- LDA人脸识别MATLAB含k近邻算法
- LDA算法MATLAB代码及其结果截图
- LDA算法的matlab源代码
- fisher鉴别分析FLDAMatlab代码实现
- 线性判别分析matlab代码及pdf 讲解
- 基于fisher的线性判别分析(LDA)人脸
- Matlab线性判别分析.zip
- 线性判别分析LDA算法代码
- fisher 线性判别分析matlab实现
- LDA,matlab实现
- MATLAB人脸识别PCALDAKPCABP,可视化界面
- PCA和LDA人脸识别matlab代码最紧邻分类
- LDA的matlab版本Latent Dirichlet Allocation
- MATLAB人脸识别PCALDAKPCABP,可视化界面
- LDA降维经典程序
- 基于LDA(fisherface)和KNN的人脸识别
- LDA线性判别分析人脸识别MATLAB代码/
- LDA算法(MATLAB实现)
- PCALDA PCA+LDA经典人脸识别算法
- face 收集的最全的人脸识别代码 有小
- plslda 偏最小二乘线性判别分析
- PCA_LDA_Face_Verification PCA+LDA人脸识别
- PCALDA
- Zernike Zernike矩是具有尺度、移位和旋
- LDA 使用matlab实现的LDA(线性判别分析
- 线性判别式分析(Linear Discriminant An
- 基于LDA的人脸识别matlab源代码
- LDA人脸识别matlab程序代码
评论
共有 条评论