% % Written by: % -- % John L. Weatherwax 2005-08-14 % % email: wax@alum.mit.edu % % Please send comments and especially bug reports to the % above email address. % %----- addpath( '../../Code/eda_data' ); addpath( '../../Code/eda_toolbox' ); close all; drawnow; clc; clear; randn('seed',0); rand('seed',0); % Modifications on Example 3.5 % This shows how to use the LLE routines on the swissroll dataset % % Now run the example from Grimes and Donoho. % Saved in swissroll.dat load swissroll % RUN LLE ALGORITHM % Note that the data matrix input argument is p x n. % Don't need to actually run this. The Y array is saved % in scurve.mat. K = 7; % <- number of nearest neighbors ... d = 3; % <- max dimension of embedding ... Y=lle(X,K,d); figure; plot(Y(1,:),Y(2,:),'.k'); title( 'lle projection of the swissroll data' ); saveas( gcf, '../../WriteUp/Graphics/Chapter3/prob_3_12_lle', 'epsc' );