Skip to content

Commit

Permalink
Replace fit_transform method with the new fit_sample API.
Browse files Browse the repository at this point in the history
Regards,
Chris
  • Loading branch information
chkoar authored and chkoar committed Jun 25, 2016
1 parent 20b2458 commit bca099d
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
# Apply the ENN
print('ENN')
enn = EditedNearestNeighbours()
X_resampled, y_resampled = enn.fit_transform(X, y)
X_resampled, y_resampled = enn.fit_sample(X, y)
X_res_vis = pca.transform(X_resampled)

ax2.scatter(X_res_vis[y_resampled == 0, 0], X_res_vis[y_resampled == 0, 1],
Expand All @@ -60,7 +60,7 @@
# Apply the RENN
print('RENN')
renn = RepeatedEditedNearestNeighbours()
X_resampled, y_resampled = renn.fit_transform(X, y)
X_resampled, y_resampled = renn.fit_sample(X, y)
X_res_vis = pca.transform(X_resampled)

ax3.scatter(X_res_vis[y_resampled == 0, 0], X_res_vis[y_resampled == 0, 1],
Expand Down

0 comments on commit bca099d

Please sign in to comment.