Skip to content

Commit

Permalink
Merge pull request scikit-learn-contrib#79 from chkoar/fix-fit_sample…
Browse files Browse the repository at this point in the history
…-in-examples

Replace fit_transform method with the new fit_sample API
  • Loading branch information
glemaitre committed Jun 25, 2016
2 parents 20b2458 + bca099d commit 52ea6fd
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 52ea6fd

Please sign in to comment.