<s> import sys <EOL> import numpy as np <EOL> import scipy as sp <EOL> import scipy . sparse as sparse <EOL> from megaman . geometry import Geometry <EOL> from sklearn import datasets <EOL> from megaman . embedding import ( Isomap , LocallyLinearEmbedding , <EOL> LTSA , SpectralEmbedding ) <EOL> N = <NUM_LIT:10> <EOL> X , color = datasets . samples_generator . make_s_curve ( N , random_state = <NUM_LIT:0> ) <EOL> radius = <NUM_LIT:5> <EOL> adjacency_method = '<STR_LIT>' <EOL> adjacency_kwds = { '<STR_LIT>' : radius } <EOL> affinity_method = '<STR_LIT>' <EOL> affinity_kwds = { '<STR_LIT>' : radius } <EOL> laplacian_method = '<STR_LIT>' <EOL> laplacian_kwds = { '<STR_LIT>' : radius } <EOL> geom = Geometry ( adjacency_method = adjacency_method , adjacency_kwds = adjacency_kwds , <EOL> affinity_method = affinity_method , affinity_kwds = affinity_kwds , <EOL> laplacian_method = laplacian_method , laplacian_kwds = laplacian_kwds ) <EOL> geom . set_data_matrix ( X ) <EOL> adjacency_matrix = geom . compute_adjacency_matrix ( ) <EOL> geom = { '<STR_LIT>' : adjacency_method , '<STR_LIT>' : adjacency_kwds , <EOL> '<STR_LIT>' : affinity_method , '<STR_LIT>' : affinity_kwds , <EOL> '<STR_LIT>' : laplacian_method , '<STR_LIT>' : laplacian_kwds } <EOL> n_components = <NUM_LIT:2> <EOL> ltsa = LTSA ( n_components = n_components , eigen_solver = '<STR_LIT>' , <EOL> geom = geom ) <EOL> embed_ltsa = ltsa . fit_transform ( X ) <EOL> lle = LocallyLinearEmbedding ( n_components = n_components , eigen_solver = '<STR_LIT>' , <EOL> geom = geom ) <EOL> embed_lle = lle . fit_transform ( X ) <EOL> isomap = Isomap ( n_components = n_components , eigen_solver = '<STR_LIT>' , <EOL> geom = geom ) <EOL> embed_isomap = isomap . fit_transform ( X ) <EOL> spectral = SpectralEmbedding ( n_components = n_components , eigen_solver = '<STR_LIT>' , <EOL> geom = geom ) <EOL> embed_spectral = spectral . fit_transform ( X ) </s>
