DIMENSIONALITY REDUCTION AND MANIFOLD ESTIMATION Mlden Victor Wickerhauser PMF/Matematika -- University of Zagreb Winter, 2022 Example Computer Programs (for Octave/Matlab) 1. Manifolds: %% Piecewise linear plots of the unit 2-sphere with 10, 20, and 50 latitudes for n=[10,20,50] [x,y,z]=sphere(n); figure; surf(x,y,z); axis equal; end %% Graph parametrizations of the unit 2-sphere embedded in E^3. F = @(p) sumsq(p)-1; % M={p:F(p)=0} DF = @(p) 2*p; % maximal rank 1 at all p in M p=[0,0,-1]; % south pole F(p) % should be 0, indicating that p is on M rank(DF(p)) % should be 1, the maximal rank t=-0.5:0.05:0.5; [xx,yy]=meshgrid(t,t); % parameter space (xx,yy) near (0,0) zz= -sqrt(1-xx.^2-yy.^2); % implicit function giving (xx,yy,zz) on M figure; mesh(xx,yy,zz); axis equal; % plot of the graph %% Union of two unit 2-spheres embedded in R^4 as a differentiable variety FF = @(p) [sumsq(p)-2; p(4)^2-1]; DFF = @(p) [2*p; 0,0,0,2*p(4)]; p=[0,0,1,1]; % where is this? the north pole of the upper 2-sphere! FF(p) % should be [0;0], indicating that p is on M rank(DFF(p)) % should be 2, the maximal rank t=-0.5:0.05:0.5; [xx,yy]=meshgrid(t,t); % parameter space (xx,yy) near (0,0) zz= sqrt(1-xx.^2-yy.^2); % implicit function giving (xx,yy,zz,1) on M figure; mesh(xx,yy,zz); axis equal; % plot of the graph