资源简介
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
相关资源
- Pattern Recognition and Machine Learning(高清
- MATLAB 编程 第二版 Stephen J. Chapman 著
- 均值滤波和FFT频谱分析Matlab代码
- 《MATLAB扩展编程》代码
- HDB3码、AMI码的MATLAB实现
- 3点GPS定位MATLAB仿真
- MATLAB数字信号处理85个实用案例精讲入
- matlab从入门到精通pdf94795
- 欧拉放大论文及matlab代码
- 跳一跳辅助_matlab版本
- 全面详解LTE MATLAB建模、仿真与实现
- MIMO-OFDM无线通信技术及MATLAB实现_孙锴
- MATLAB Programming for Engineers 4th - Chapman
- matlab 各种谱分析对比
- 分数阶chen混沌matlab程序
- 蚁群算法论文+源代码
- 基于粒子群算法的非合作博弈的matl
- MATLAB车流仿真 包括跟驰、延误
- matlab空间桁架计算程序
- 基于MATLAB的图像特征点匹配和筛选
- DMA-TVP-FAVAR
- GPS信号的码捕获matlab代码.7z
- 一维光子晶体MATLAB仿真代码吸收率折
- newmark法源程序
- 传统关联成像、计算鬼成像matlab
- pri传统分选算法
- 摆动滚子推杆盘形凸轮设计
- 高斯正反算批量计算
- 医学图像重建作业matlab源码
- Matlab实现混沌系统的控制
评论
共有 条评论