Imbalanced-learn

Latest version: v0.12.2

Safety actively analyzes 621892 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 7

1.1.0

1.0.2

0.12.2

Changelog

Bug fixes

- Fix the way we check for a specific Python version in the test suite. [1075](https://github.com/scikit-learn-contrib/imbalanced-learn/pull/1075) by [Guillaume Lemaitre](https://github.com/glemaitre).

0.12.1

Changelog

Bug fixes

- Fix a bug in [InstanceHardnessThreshold](https://imbalanced-learn.org/stable/references/generated/imblearn.under_sampling.InstanceHardnessThreshold.html#imblearn.under_sampling.InstanceHardnessThreshold) where estimator could not be a Pipeline object. [1049](https://github.com/scikit-learn-contrib/imbalanced-learn/pull/1049) by [Gonenc Mogol](https://github.com/gmogol).

Compatibility

- Do not use distutils in tests due to deprecation. [1065](https://github.com/scikit-learn-contrib/imbalanced-learn/pull/1065) by [Michael R. Crusoe](https://github.com/mr-c).
- Fix the scikit-learn import in tests to be compatible with version 1.4.1.post1. [1073](https://github.com/scikit-learn-contrib/imbalanced-learn/pull/1073) by [Guillaume Lemaitre](https://github.com/glemaitre).
- Fix test to be compatible with Python 3.13. [1073](https://github.com/scikit-learn-contrib/imbalanced-learn/pull/1073) by [Guillaume Lemaitre](https://github.com/glemaitre).

0.12.0

Changelog
========

Bug fixes
---------

- Fix a bug in [SMOTENC](https://imbalanced-learn.org/dev/references/generated/imblearn.over_sampling.SMOTENC.html#imblearn.over_sampling.SMOTENC) where the entries of the one-hot encoding should be divided by sqrt(2) and not 2, taking into account that they are plugged into an Euclidean distance computation. [1014](https://github.com/scikit-learn-contrib/imbalanced-learn/pull/1014) by [Guillaume Lemaitre](https://github.com/glemaitre).
- Raise an informative error message when all support vectors are tagged as noise in [SVMSMOTE](https://imbalanced-learn.org/dev/references/generated/imblearn.over_sampling.SVMSMOTE.html#imblearn.over_sampling.SVMSMOTE). [1016](https://github.com/scikit-learn-contrib/imbalanced-learn/pull/1016) by [Guillaume Lemaitre](https://github.com/glemaitre).
- Fix a bug in [SMOTENC](https://imbalanced-learn.org/dev/references/generated/imblearn.over_sampling.SMOTENC.html#imblearn.over_sampling.SMOTENC) where the median of standard deviation of the continuous features was only computed on the minority class. Now, we are computing this statistic for each class that is up-sampled. [1015](https://github.com/scikit-learn-contrib/imbalanced-learn/pull/1015) by [Guillaume Lemaitre](https://github.com/glemaitre).
- Fix a bug in [SMOTENC](https://imbalanced-learn.org/dev/references/generated/imblearn.over_sampling.SMOTENC.html#imblearn.over_sampling.SMOTENC) such that the case where the median of standard deviation of the continuous features is null is handled in the multiclass case as well. [1015](https://github.com/scikit-learn-contrib/imbalanced-learn/pull/1015) by [Guillaume Lemaitre](https://github.com/glemaitre).
- Fix a bug in [BorderlineSMOTE](https://imbalanced-learn.org/dev/references/generated/imblearn.over_sampling.BorderlineSMOTE.html#imblearn.over_sampling.BorderlineSMOTE) version 2 where samples should be generated from the whole dataset and not only from the minority class. [1023](https://github.com/scikit-learn-contrib/imbalanced-learn/pull/1023) by [Guillaume Lemaitre](https://github.com/glemaitre).
- Fix a bug in [NeighbourhoodCleaningRule](https://imbalanced-learn.org/dev/references/generated/imblearn.under_sampling.NeighbourhoodCleaningRule.html#imblearn.under_sampling.NeighbourhoodCleaningRule) where the kind_sel="all" was not working as explained in the literature. [1012](https://github.com/scikit-learn-contrib/imbalanced-learn/pull/1012) by [Guillaume Lemaitre](https://github.com/glemaitre).
- Fix a bug in [NeighbourhoodCleaningRule](https://imbalanced-learn.org/dev/references/generated/imblearn.under_sampling.NeighbourhoodCleaningRule.html#imblearn.under_sampling.NeighbourhoodCleaningRule) where the threshold_cleaning ratio was multiplied on the total number of samples instead of the number of samples in the minority class. [1012](https://github.com/scikit-learn-contrib/imbalanced-learn/pull/1012) by [Guillaume Lemaitre](https://github.com/glemaitre).
- Fix a bug in [RandomUnderSampler](https://imbalanced-learn.org/dev/references/generated/imblearn.under_sampling.RandomUnderSampler.html#imblearn.under_sampling.RandomUnderSampler) and [RandomOverSampler](https://imbalanced-learn.org/dev/references/generated/imblearn.over_sampling.RandomOverSampler.html#imblearn.over_sampling.RandomOverSampler) where a column containing only NaT was not handled correctly. [1059](https://github.com/scikit-learn-contrib/imbalanced-learn/pull/1059) by [Guillaume Lemaitre](https://github.com/glemaitre).

Compatibility
-------------

- [BalancedRandomForestClassifier](https://imbalanced-learn.org/dev/references/generated/imblearn.ensemble.BalancedRandomForestClassifier.html#imblearn.ensemble.BalancedRandomForestClassifier) now support missing values and monotonic constraints if scikit-learn >= 1.4 is installed.
- [Pipeline](https://imbalanced-learn.org/dev/references/generated/imblearn.pipeline.Pipeline.html#imblearn.pipeline.Pipeline) support metadata routing if scikit-learn >= 1.4 is installed.
- Compatibility with scikit-learn 1.4. [1058](https://github.com/scikit-learn-contrib/imbalanced-learn/pull/1058) by [Guillaume Lemaitre](https://github.com/glemaitre).

Deprecations
-------------

- Deprecate estimator_ argument in favor of estimators_ for the classes [CondensedNearestNeighbour](https://imbalanced-learn.org/dev/references/generated/imblearn.under_sampling.CondensedNearestNeighbour.html#imblearn.under_sampling.CondensedNearestNeighbour) and [OneSidedSelection](https://imbalanced-learn.org/dev/references/generated/imblearn.under_sampling.OneSidedSelection.html#imblearn.under_sampling.OneSidedSelection). estimator_ will be removed in 0.14. [1011](https://github.com/scikit-learn-contrib/imbalanced-learn/pull/1011) by [Guillaume Lemaitre](https://github.com/glemaitre).
- Deprecate kind_sel in [1012](https://github.com/scikit-learn-contrib/imbalanced-learn/pull/1012) by [Guillaume Lemaitre](https://github.com/glemaitre).

Enhancements
---------------

- Allows to output dataframe with sparse format if provided as input. [1059](https://github.com/scikit-learn-contrib/imbalanced-learn/pull/1059) by [ts2095](https://github.com/ts2095).

0.11.0

Changelog

Bug fixes

- Fix a bug in [classification_report_imbalanced](https://imbalanced-learn.org/stable/references/generated/imblearn.metrics.classification_report_imbalanced.html#imblearn.metrics.classification_report_imbalanced) where the parameter `target_names` was not taken into account when `output_dict=True`. [989](https://github.com/scikit-learn-contrib/imbalanced-learn/pull/989) by [AYY7](https://github.com/AYY7).

- [SMOTENC](https://imbalanced-learn.org/stable/references/generated/imblearn.over_sampling.SMOTENC.html#imblearn.over_sampling.SMOTENC) now handles mix types of data type such as bool and `pd.CategoricalDtype` by delegating the conversion to scikit-learn encoder. [1002](https://github.com/scikit-learn-contrib/imbalanced-learn/pull/1002) by [Guillaume Lemaitre](https://github.com/glemaitre).

- Handle sparse matrices in [SMOTEN](https://imbalanced-learn.org/stable/references/generated/imblearn.over_sampling.SMOTEN.html#imblearn.over_sampling.SMOTEN) and raise a warning since it requires a conversion to dense matrices. [1003](https://github.com/scikit-learn-contrib/imbalanced-learn/pull/1003) by [Guillaume Lemaitre](https://github.com/glemaitre).

- Remove spurious warning raised when minority class get over-sampled more than the number of sample in the majority class. [1007](https://github.com/scikit-learn-contrib/imbalanced-learn/pull/1007) by [Guillaume Lemaitre](https://github.com/glemaitre).

Compatibility

- Maintenance release for being compatible with scikit-learn >= 1.3.0. [999](https://github.com/scikit-learn-contrib/imbalanced-learn/pull/999) by [Guillaume Lemaitre](https://github.com/glemaitre).

Deprecation

- The fitted attribute `ohe_` in [SMOTENC](https://imbalanced-learn.org/stable/references/generated/imblearn.over_sampling.SMOTENC.html#imblearn.over_sampling.SMOTENC) is deprecated and will be removed in version 0.13. Use `categorical_encoder_` instead. [1000](https://github.com/scikit-learn-contrib/imbalanced-learn/pull/1000) by [Guillaume Lemaitre](https://github.com/glemaitre).

- The default of the parameters `sampling_strategy` and replacement will change in [BalancedRandomForestClassifier](https://imbalanced-learn.org/stable/references/generated/imblearn.ensemble.BalancedRandomForestClassifier.html#imblearn.ensemble.BalancedRandomForestClassifier) to follow the implementation of the original paper. This changes will take effect in version 0.13. [1006](https://github.com/scikit-learn-contrib/imbalanced-learn/pull/1006) by [Guillaume Lemaitre](https://github.com/glemaitre).

Enhancements

- [SMOTENC](https://imbalanced-learn.org/stable/references/generated/imblearn.over_sampling.SMOTENC.html#imblearn.over_sampling.SMOTENC) now accepts a parameter `categorical_encoder` allowing to specify a `OneHotEncoder` with custom parameters. [1000](https://github.com/scikit-learn-contrib/imbalanced-learn/pull/1000) by [Guillaume Lemaitre](https://github.com/glemaitre).

- [SMOTEN](https://imbalanced-learn.org/stable/references/generated/imblearn.over_sampling.SMOTEN.html#imblearn.over_sampling.SMOTEN) now accepts a parameter `categorical_encoder` allowing to specify a `OrdinalEncoder` with custom parameters. A new fitted parameter `categorical_encoder_` is exposed to access the fitted encoder. [1001](https://github.com/scikit-learn-contrib/imbalanced-learn/pull/1001) by [Guillaume Lemaitre](https://github.com/glemaitre).

- [RandomUnderSampler](https://imbalanced-learn.org/stable/references/generated/imblearn.under_sampling.RandomUnderSampler.html#imblearn.under_sampling.RandomUnderSampler) and [RandomOverSampler](https://imbalanced-learn.org/stable/references/generated/imblearn.over_sampling.RandomOverSampler.html#imblearn.over_sampling.RandomOverSampler) (when `shrinkage` is not `None`) now accept any data types and will not attempt any data conversion. [1004](https://github.com/scikit-learn-contrib/imbalanced-learn/pull/1004) by [Guillaume Lemaitre](https://github.com/glemaitre).

- [SMOTENC](https://imbalanced-learn.org/stable/references/generated/imblearn.over_sampling.SMOTENC.html#imblearn.over_sampling.SMOTENC) now support passing array-like of `str` when passing the `categorical_features` parameter. [1008](https://github.com/scikit-learn-contrib/imbalanced-learn/pull/1008) by :user`Guillaume Lemaitre <glemaitre>`.

- [SMOTENC](https://imbalanced-learn.org/stable/references/generated/imblearn.over_sampling.SMOTENC.html#imblearn.over_sampling.SMOTENC) now support automatic categorical inference when `categorical_features` is set to `"auto"`. [1009](https://github.com/scikit-learn-contrib/imbalanced-learn/pull/1009) by :user`Guillaume Lemaitre <glemaitre>`.

Page 1 of 7

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.