@@ -126,7 +126,8 @@ def plot_embedding(X, title=None):
126
126
# Isomap projection of the digits dataset
127
127
print ("Computing Isomap projection" )
128
128
t0 = time ()
129
- X_iso = manifold .Isomap (n_neighbors , n_components = 2 ).fit_transform (X )
129
+ X_iso = manifold .Isomap (n_neighbors = n_neighbors , n_components = 2
130
+ ).fit_transform (X )
130
131
print ("Done." )
131
132
plot_embedding (X_iso ,
132
133
"Isomap projection of the digits (time %.2fs)" %
@@ -136,7 +137,7 @@ def plot_embedding(X, title=None):
136
137
# ----------------------------------------------------------------------
137
138
# Locally linear embedding of the digits dataset
138
139
print ("Computing LLE embedding" )
139
- clf = manifold .LocallyLinearEmbedding (n_neighbors , n_components = 2 ,
140
+ clf = manifold .LocallyLinearEmbedding (n_neighbors = n_neighbors , n_components = 2 ,
140
141
method = 'standard' )
141
142
t0 = time ()
142
143
X_lle = clf .fit_transform (X )
@@ -149,7 +150,7 @@ def plot_embedding(X, title=None):
149
150
# ----------------------------------------------------------------------
150
151
# Modified Locally linear embedding of the digits dataset
151
152
print ("Computing modified LLE embedding" )
152
- clf = manifold .LocallyLinearEmbedding (n_neighbors , n_components = 2 ,
153
+ clf = manifold .LocallyLinearEmbedding (n_neighbors = n_neighbors , n_components = 2 ,
153
154
method = 'modified' )
154
155
t0 = time ()
155
156
X_mlle = clf .fit_transform (X )
@@ -162,7 +163,7 @@ def plot_embedding(X, title=None):
162
163
# ----------------------------------------------------------------------
163
164
# HLLE embedding of the digits dataset
164
165
print ("Computing Hessian LLE embedding" )
165
- clf = manifold .LocallyLinearEmbedding (n_neighbors , n_components = 2 ,
166
+ clf = manifold .LocallyLinearEmbedding (n_neighbors = n_neighbors , n_components = 2 ,
166
167
method = 'hessian' )
167
168
t0 = time ()
168
169
X_hlle = clf .fit_transform (X )
@@ -175,7 +176,7 @@ def plot_embedding(X, title=None):
175
176
# ----------------------------------------------------------------------
176
177
# LTSA embedding of the digits dataset
177
178
print ("Computing LTSA embedding" )
178
- clf = manifold .LocallyLinearEmbedding (n_neighbors , n_components = 2 ,
179
+ clf = manifold .LocallyLinearEmbedding (n_neighbors = n_neighbors , n_components = 2 ,
179
180
method = 'ltsa' )
180
181
t0 = time ()
181
182
X_ltsa = clf .fit_transform (X )
0 commit comments