Skip to content

Commit

Permalink
Compatibility python 3
Browse files Browse the repository at this point in the history
  • Loading branch information
Guillaume Lemaitre committed Jun 26, 2016
1 parent f16fb58 commit 7440fc1
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions unbalanced_dataset/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
# Lars Buitinck
# chkoar
# License: BSD
from __future__ import print_function
from __future__ import division

from warnings import warn

Expand Down Expand Up @@ -373,9 +375,7 @@ def score(self, X, y=None):
if hasattr(transform, "fit_sample"):
pass
else:
print Xt.shape
Xt = transform.transform(Xt)
print Xt.shape
return self.steps[-1][-1].score(Xt, y)


Expand All @@ -386,15 +386,6 @@ def make_pipeline(*steps):
does not permit, naming the estimators. Instead, their names will be set
to the lowercase of their types automatically.
Examples
--------
>>> from sklearn.naive_bayes import GaussianNB
>>> from sklearn.preprocessing import StandardScaler
>>> make_pipeline(StandardScaler(), GaussianNB(priors=None)) # doctest: +NORMALIZE_WHITESPACE
Pipeline(steps=[('standardscaler',
StandardScaler(copy=True, with_mean=True, with_std=True)),
('gaussiannb', GaussianNB(priors=None))])
Returns
-------
p : Pipeline
Expand Down

0 comments on commit 7440fc1

Please sign in to comment.