?? kpcarec.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 + -