Skip to content

Commit ee7773b

Browse files
authored
Update pipeline.py
1 parent d4e7aea commit ee7773b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

imblearn/pipeline.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,12 @@ def _validate_steps(self):
170170
def _iter(
171171
self, with_final=True, filter_passthrough=True, filter_resample=True
172172
):
173+
"""Generate (idx, (name, trans)) tuples from self.steps
174+
175+
When `filter_passthrough` is `True`, 'passthrough' and None transformers
176+
are filtered out. When `filter_resample` is `True`, estimator with a
177+
method `fit_resample` are filtered out.
178+
"""
173179
it = super()._iter(with_final, filter_passthrough)
174180
if filter_resample:
175181
return filter(lambda x: not hasattr(x[-1], "fit_resample"), it)

0 commit comments

Comments
 (0)