DEV Community

Chris Aridas
Chris Aridas

Posted on

3

imbalanced-learn 0.7.0 is out

imbalanced-learn, probably, is your favorite python package that offers a number of re-sampling techniques commonly used in datasets showing strong between-class imbalance.

This is release should be be fully compatible with the latest version of scikit-learn.

Maintenance

  • Pipelines can cope with older versions of joblib.
  • Common tests have been refactored.
  • Feature warnings have been removed.
  • Imposing keywords only arguments as in scikit-learn.

Changed models

  • imblearn.ensemble.BalancedRandomForestClassifier is expected to give different results for the same input (using the same random state).
  • Fix make_index_balanced_accuracy which was unusable due to the latest version of scikit-learn.
  • Raise a proper error message when only numerical or categorical features are given in imblearn.over_sampling.SMOTENC.
  • Fix a bug when the median of the standard deviation is null in imblearn.over_sampling.SMOTENC.

Bug fixes

  • min_samples_leaf default value has been changed to be consistent with scikit-learn ### Enhancements
  • The classifier implemented in imbalanced-learn, imblearn.ensemble.BalancedBaggingClassifier, imblearn.ensemble.BalancedRandomForestClassifier, imblearn.ensemble.EasyEnsembleClassifier, and imblearn.ensemble.RUSBoostClassifier, accept sampling_strategy with the same key than in y without the need of encoding y in advance.
  • Import keras module lazily.

Installation

You can install it either by using pip

pip install imbalanced-learn -U
Enter fullscreen mode Exit fullscreen mode

or by using the conda package manager

conda update imbalanced-learn
Enter fullscreen mode Exit fullscreen mode

The changelog can be found here, while installation instructions, API documentation, examples and a user guide can be found here.

Happy hacking,
Chris

AWS Q Developer image

Your AI Code Assistant

Automate your code reviews. Catch bugs before your coworkers. Fix security issues in your code. Built to handle large projects, Amazon Q Developer works alongside you from idea to production code.

Get started free in your IDE

Top comments (0)

Qodo Takeover

Introducing Qodo Gen 1.0: Transform Your Workflow with Agentic AI

Rather than just generating snippets, our agents understand your entire project context, can make decisions, use tools, and carry out tasks autonomously.

Read full post

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay