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

📄 lmvudemo.m

📁 流形学习中的重要方法MVU的源代码
💻 M
字号:
N=2000; % Number of pointsfact=3; % Length of rollfigure;fprintf('landmark-mvu Demo\n');fprintf('(assumes that CSDP is installed)\n');% Generate Swiss roll colormap jet;tt = (fact*pi/2)*(1+2*rand(1,N));  height = fact*7*rand(1,N);X = [tt.*cos(tt); height; tt.*sin(tt)];M=min(min(abs(X)));color=tt;% centralizing inputX=X-repmat(mean(X,2),1,N);% Display Inputfprintf('Display Input ... \n');hin=scatter3(X(1,:),X(2,:),X(3,:),50,color,'filled');set(hin,'MarkerEdgeColor',[0.5 0.5 0.5]);axis equal;box on;view([    0.9194   -0.3934   -0.0000   -0.2630          0.0511    0.1193    0.9915   -0.5809          0.3901    0.9116   -0.1297    5.5152          0         0         0         1.0000]);set(gca,'XTick',[],'YTick',[],'ZTick',[])fprintf('Input consists of %i data points sampled form a swiss roll.\n',N);          drawnow;          % Run lmvufprintf('Unfold Input ... \n');[Y,Details]=lmvu(distance(X),20);% Display Outputfprintf('Display Output ... \n');figure;hout=scatter(Y(1,:),Y(2,:),50,color,'filled');set(hout,'MarkerEdgeColor',[0.5 0.5 0.5]);axis equal;box on;set(gca,'XTick',[],'YTick',[],'ZTick',[]);drawnow;          % Write a cheesy linefprintf('Done! (%2.2f Minutes)\n',Details.time/60);

⌨️ 快捷键说明

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