Skip to content

Commit f764536

Browse files
committed
MIN Scale features
1 parent 5bdba98 commit f764536

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

‎ch10/neighbors.py‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737

3838
print('Computing neighbors...')
3939
sc = StandardScaler()
40+
features = sc.fit_transform(features)
4041
dists = distance.squareform(distance.pdist(features))
4142

4243
print('Plotting...')
@@ -51,6 +52,7 @@
5152
left = images[i]
5253
dists_left = dists[i]
5354
right = dists_left.argsort()
55+
# right[0] is the same as left[i], so pick the next closest element
5456
right = right[1]
5557
right = images[right]
5658
left = mh.imread(left)

0 commit comments

Comments
 (0)