资源简介
PCA 主成分分析代码 MATLAB版
PCA 主成分分析代码 MATLAB版
PCA 主成分分析代码 MATLAB版

代码片段和文件信息
function distMat = createDistMat (proj metric)
%
% PROTOTYPE
% function distMat = createDistMat (proj metric)
%
% USAGE EXAMPLE(S)
% pcaDistMatCos = createDistMat(pcaProj ‘COS‘);
%
% GENERAL DEscriptION
% Calculates distance matrix. Creates a matrix of distances between any
% pair of images (vectors) given the metric. L1 (City Block) L2
% (Euclidean) and COS (Cosine Angle) are supported. Once the distance
% matrix for a given metric is calculated feret tests (with specific
% gallery and probe test sets) or some other tests (e.g. various permutation
% tests) are easily implemented.
%
% REFERENCES
% -
%
% INPUTS:
% proj - projection matrix (all images projected onto a subspace)
% if using pca.m give pcaProj as the input
% metric - metric (L1 L2 MAH and COS supported)
%
% OUTPUTS:
% distMat - distance matrix where (ij) element is the distance between
% i-th and j-th image projection given the metric class
% double size (number of images)^2
%
% NOTES / COMMENTS
% * Developed using Matlab 7
%
% REVISION HISTORY
% -
%
% RELATED FUNCTIONS (SEE ALSO)
% pdist (Matlab) squareform (Matlab) feret pca
%
% ABOUT
% Created: 03 Sep 2005
% Last Update: -
% Revision: 1.0
%
% AUTHOR: Kresimir Delac
% mailto: kdelac@ieee.org
% URL: http://www.vcl.fer.hr/kdelac
%
% WHEN PUBLISHING A PAPER AS A RESULT OF RESEARCH CONDUCTED BY USING THIS CODE
% OR ANY PART OF IT MAKE A REFERENCE TO THE FOLLOWING PAPER:
% Delac K. Grgic M. Grgic S. Independent Comparative Study of PCA ICA and LDA
% on the FERET Data Set International Journal of Imaging Systems and Technology
% Vol. 15 Issue 5 2006 pp. 252-260
%
% Memory allocation
distMat = zeros(max(size(proj)));
switch (metric)
case ‘L1‘
distMat = pdist(proj‘ ‘cityblock‘);
case ‘L2‘
distMat = pdist(proj‘ ‘euclidean‘);
case ‘COS‘
distMat = pdist(proj‘ ‘cosine‘);
otherwise
error(‘%s metric not supported.‘ metric);
end; % switch (metric) ends here
distMat = squareform(distMat);
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 2162 2007-01-06 23:46 pca\createDistMat.m
文件 2979 2007-01-06 23:42 pca\dup1.mat
文件 1101 2007-01-06 23:42 pca\dup2.mat
文件 4177 2007-01-06 23:42 pca\fb.mat
文件 784 2007-01-06 23:42 pca\fc.mat
文件 5590 2007-01-06 23:46 pca\feret.m
文件 4169 2007-01-06 23:42 pca\feretGallery.mat
文件 14686 2007-01-06 23:43 pca\listAll.mat
文件 5476 2007-01-06 23:46 pca\pca.m
文件 2510 2007-01-06 23:51 pca\Readme.txt
文件 2980 2007-01-06 23:47 pca\trainList.mat
目录 0 2008-07-21 14:01 pca
----------- --------- ---------- ----- ----
46614 12
相关资源
- matlab_OFDM调制解调(来自剑桥大学)
- Matlab路面裂缝识别69319
- 高灵敏度GPS接收机MATLAB仿真,附捕获
- 基于MATLAB的质点弹道计算与外弹道优
- 阵列天线的matlab仿真
- MATLAB 经典程序源代码大全
- MATLAB小波软阈值去噪代码33473
- 天线阵的波束形成在MATLAB仿真程序及
- 非线性SVM算法-matlab实现
- 《MATLAB 智能算法超级学习手册》-程序
- 组合导航matlab程序
- 读取txt文件内容matlab代码实现
- Matlab实现基于相关的模板匹配程序
- matlab优化工具箱讲解
- 基于MATLAB的快速傅里叶变换
- 光纤传输中的分布傅立叶算法matlab实
- 基于matlab的图像处理源程序
- matlab 椭圆拟合程序
- 算术编码解码matlab源代码
- optical_flow 光流法 matlab 实现程序
- 引导图像滤波器 Matlab实现
- 分形几何中一些经典图形的Matlab画法
- OFDM系统MATLAB仿真代码
- SVM工具箱(matlab中运行)
- 图像小波变换MatLab源代码
- LU分解的MATLAB实现
- 冈萨雷斯数字图像处理matlab版(第三
- 替代数据法的matlab程序
- 用matlab实现的多站定位系统性能仿真
- 通过不同方法进行粗糙集属性约简m
评论
共有 条评论