scikit-learn-contrib / imbalanced-learn

A Python Package to Tackle the Curse of Imbalanced Datasets in Machine Learning
https://imbalanced-learn.org
MIT License
6.85k stars 1.29k forks source link

FIX InstanceHardnessThreshold accepts classifier included in a Pipeline #1049

Closed gmogol closed 8 months ago

gmogol commented 1 year ago

Added the option to add a pipeline as an estimator for instance hardness threshold. Currently using a pipeline as an estimator fails because of the instance check. I think it's useful to be able to use pipelines as estimators and have thus added it.

Reference Issue

What does this implement/fix? Explain your changes.

Any other comments?

glemaitre commented 1 year ago

The linter is failing. Could you add a non-regression test that would fail in master but that make it work in this PR.