?? kpca_plot.m
字號:
function kpca_plot(basis,gr,ip);%KPCA_PLOT visualizes the kpca basis.%% usage% kpca_plot(basis);%% input% basis kpca basis generated by kpca_calc (see there)% gr resolution (default == 17)% ip if ip==1 then the input vectors are plotted as well% (default ip==1)%% see also% kpca_calc, kpca_map%% STH * 12MAR2002if ~exist('gr')|isempty(gr), gr = 17; endif ~exist('ip')|isempty(ip), ip = 1; endif size(basis.xs,1)~=2 error([mfilename ': can only visualize two dim input spaces.'])end% plot resulting directionsx1min = min(basis.xs(1,:)); x1max = max(basis.xs(1,:));x2min = min(basis.xs(2,:)); x2max = max(basis.xs(2,:));[X,Y] = meshgrid(linspace(x1min,x1max,gr),linspace(x2min,x2max,gr));Z = [X(:) , Y(:)]';phiZ = kpca_map(Z,basis);clfd = size(basis.V,2);for i = 1:d supplot(d,i) pcolor(X,Y,reshape(phiZ(i,:),[gr gr])) hold on contour(X,Y,reshape(phiZ(i,:),[gr gr]),10) shading flat if ip==1 plot(basis.xs(1,:),basis.xs(2,:),'.','markersize',1) end title(['\lambda_{' num2str(i) '}=' num2str(basis.Lambda(i,i))]) axis equal, axis tight, axis offend
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -