IMBENS: Class-imbalanced Ensemble Learning in Python
⏳Quick Start with our 5-minute Guide & Detailed Examples
IMBENS (imported as imbens
) is a Python library for quick implementation, modification, evaluation, and visualization of ensemble learning from class-imbalanced data.
Currently, IMBENS includes over 15 ensemble imbalanced learning algorithms (SMOTEBoost, SMOTEBagging, RUSBoost, EasyEnsemble, SelfPacedEnsemble, etc) and 19 over-/under-sampling methods (SMOTE, ADASYN, TomekLinks, etc) from imbalance-learn.
🌈 IMBENS Highlights
- 🧑💻 Ease-of-use: Unified, easy-to-use APIs with documentation and examples.
- 🚀 Performance: Optimized performance with parallelization using joblib.
- 📊 Benchmarking: Running & comparing multiple models with our visualizer.
- 📺 Monitoring: Powerful, customizable, interactive training logging.
- 🪐 Versatility: Full compatibility with scikit-learn and imbalanced-learn.
- 📈 Functionality: Extending existing techniques from binary to multi-class setting.
✂️ Use IMBENS for class-imbalanced classification with <5 lines of code:
# Train an SPE classifier
from imbens.ensemble import SelfPacedEnsembleClassifier
clf = SelfPacedEnsembleClassifier(random_state=42)
clf.fit(X_train, y_train)
# Predict with an SPE classifier
y_pred = clf.predict(X_test)
🤗 Citing IMBENS
🍻 We appreciate your citation if you find our work helpful! The BibTeX entry:
@article{liu2023imbens,
title={IMBENS: Ensemble Class-imbalanced Learning in Python},
author={Liu, Zhining and Kang, Jian and Tong, Hanghang and Chang, Yi},
journal={arXiv preprint arXiv:2111.12776},
year={2023}
}
👯♂️ Contribute to IMBENS
Join us and become a contributor! Please refer to the contributing guidelines.
📚 Table of Contents
- Installation
- List of implemented methods
- 5-min Quick Start with IMBENS
- About imbalanced learning
- Acknowledgements
- References
- Related Projects
- Contributors ✨
Installation
It is recommended to use pip for installation.
Please make sure the latest version is installed to avoid potential problems:
$ pip install imbalanced-ensemble # normal install
$ pip install --upgrade imbalanced-ensemble # update if needed
Or you can install imbalanced-ensemble by clone this repository:
$ git clone https://github.com/ZhiningLiu1998/imbalanced-ensemble.git
$ cd imbalanced-ensemble
$ pip install .
imbalanced-ensemble requires following dependencies:
- Python (>=3.6)
- numpy (>=1.16.0)
- pandas (>=1.1.3)
- scipy (>=1.9.1)
- joblib (>=0.11)
- scikit-learn (>=1.2.0)
- matplotlib (>=3.3.2)
- seaborn (>=0.11.0)
- tqdm (>=4.50.2)
List of implemented methods
Currently (v0.1.3, 2021/06), 16 ensemble imbalanced learning methods were implemented:
(Click to jump to the document page)
- Resampling-based
- Under-sampling + Ensemble
- Over-sampling + Ensemble
OverBoostClassifier
SMOTEBoostClassifier
[6]KmeansSMOTEBoostClassifier
- **
OverBaggingClassifier
[5] ([imblearn