⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 kpcarec.m~

📁 很好的matlab模式识别工具箱
💻 M~
字号:
function Y = kpcarec(X,model)% KPCAREC Reconstructs image after kernel PCA.% % Synopsis:%  Y = kpcarec(X,model)%% Description:%  Input data X are projected using kernel projection trained%  the by Kernel PCA. The RBF kernel is assumed. This function %  computes the preimages Y from the input space corresponding %  to the projected data are.%%   X -> projection to -> preimage -> Y%        kernel space     problem%        by Kernel PCA%% Input:%  X [dim x num_data] Input vectors.%  model [struct] Kernel projection with RBF kernel;%   see 'help kernelproj'. %% Output:%  Y [dim x num_data] Output data.%% See also%  KPCA, PCAREC.%% About: Statistical Pattern Recognition Toolbox% (C) 1999-2003, Written by Vojtech Franc and Vaclav Hlavac% <a href="http://www.cvut.cz">Czech Technical University Prague</a>% <a href="http://www.feld.cvut.cz">Faculty of Electrical Engineering</a>% <a href="http://cmp.felk.cvut.cz">Center for Machine Perception</a>% Modifications:% 17-may-2004, VF% 22-apr-2004, VF% 17-mar-2004, VF, created.[dim, num_data] = size(X);fprintf('Projection data...');Z = kernelproj(X, model );fprintf('done.\n');% allocate memoryY = zeros(dim,num_data);img = model;fprintf('Computing preimages');for i=1:num_data,   fprintf('.');     img.Alpha = model.Alpha*(Z(:,i) - model.b);   Y(:,i) = rbfpreimg(img);       % Schoelkopf's fix-point algorithm%   Y(:,i) = rbfpreimg2(img);  % Gradient method%    Y(:,i) = rbfpreimg3(img,7);     % Kwok & Tsangendfprintf('done\n');return;% EOF

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -