imbalanced-ensemble

imbalanced-ensemble

专注类别不平衡的Python集成学习库

imbalanced-ensemble是一个针对类别不平衡数据的Python集成学习库。该库提供15种以上的集成不平衡学习算法和19种采样方法,特点包括易用API、优化性能和强大可视化功能。完全兼容scikit-learn和imbalanced-learn,支持二分类和多分类任务。imbalanced-ensemble适用于类别不平衡集成学习模型的快速实现、修改、评估和可视化。

IMBENS类别不平衡集成学习Python机器学习Github开源项目

<!-- ![](https://raw.githubusercontent.com/ZhiningLiu1998/figures/master/imbalanced-ensemble/example_gallery_snapshot_horizontal.png) --> <h1 align="center"> IMBENS: Class-imbalanced Ensemble Learning in Python </h1> <table align="center"> <tr> <td>Status</td> <td> <a href="https://codecov.io/gh/ZhiningLiu1998/imbalanced-ensemble"> <img src="https://codecov.io/gh/ZhiningLiu1998/imbalanced-ensemble/branch/main/graph/badge.svg?token=46Y73QPA68"></a> <a href='https://dl.circleci.com/status-badge/redirect/gh/ZhiningLiu1998/imbalanced-ensemble/tree/main'> <img src='https://dl.circleci.com/status-badge/img/gh/ZhiningLiu1998/imbalanced-ensemble/tree/main.svg?style=shield' alt='CircleCI Status'></a> <a href='https://imbalanced-ensemble.readthedocs.io/en/latest/?badge=latest'> <img alt="Read the Docs" src="https://img.shields.io/readthedocs/imbalanced-ensemble"></a> <!-- <img src='https://readthedocs.org/projects/imbalanced-ensemble/badge/?version=latest'></a> --> <a href="https://github.com/psf/black"> <img src="https://img.shields.io/badge/code%20style-black-000000.svg"></a> <a href="https://github.com/ZhiningLiu1998/imbalanced-ensemble/blob/master/LICENSE"> <img src="https://img.shields.io/github/license/ZhiningLiu1998/imbalanced-ensemble"></a> <a href="https://github.com/ZhiningLiu1998/imbalanced-ensemble/issues"> <img src="https://img.shields.io/github/issues/ZhiningLiu1998/imbalanced-ensemble?logo=github"></a> </td> </tr> <tr> <td>PyPI</td> <td> <a href="https://pypi.org/project/imbalanced-ensemble/"> <img src="https://img.shields.io/badge/PyPi-imbalanced--ensemble-3775A9?logo=pypi&labelColor=white"></a> <a href="https://pypi.org/project/imbalanced-ensemble/"> <img src="https://img.shields.io/pypi/v/imbalanced-ensemble?logo=pypi&label=version&labelColor=white&color=3775A9"></a> <a href="https://www.python.org/"> <img src="https://img.shields.io/pypi/pyversions/imbalanced-ensemble.svg?logo=python&labelColor=white"></a> </td> </tr> <tr> <td>Traffic</td> <td> <a href="https://pepy.tech/project/imbalanced-ensemble"> <img src="https://img.shields.io/github/stars/ZhiningLiu1998/imbalanced-ensemble"></a> <a href="https://github.com/ZhiningLiu1998/imbalanced-ensemble/network/members"> <img src="https://img.shields.io/github/forks/ZhiningLiu1998/imbalanced-ensemble"></a> <a href="https://pepy.tech/project/imbalanced-ensemble"> <img src="https://pepy.tech/badge/imbalanced-ensemble"></a> <a href="https://pepy.tech/project/imbalanced-ensemble"> <img src="https://pepy.tech/badge/imbalanced-ensemble/month"></a> <!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section --> <a href="https://github.com/ZhiningLiu1998/imbalanced-ensemble#contributors-"><img src="https://img.shields.io/badge/all_contributors-5-orange.svg"></a> <!-- ALL-CONTRIBUTORS-BADGE:END --> </td> </tr> <tr> <td>Documentation</td> <td> <a href="https://imbalanced-ensemble.readthedocs.io/en/latest/"> <img src="https://img.shields.io/badge/ReadTheDoc-Latest-green?logo=readthedocs&labelColor=376681"></a> <a href="https://imbalanced-ensemble.readthedocs.io/en/latest/release_history.html"> <img src="https://img.shields.io/badge/Doc-Changelog-blue?logo=readthedocs"></a> <a href="https://imbalanced-ensemble.readthedocs.io/en/latest/auto_examples/index.html#"> <img src="https://img.shields.io/badge/Doc-Examples & Gallery-blue?logo=readthedocs"></a> <a href="https://imbalanced-ensemble.readthedocs.io/en/latest/api/ensemble/api.html"> <img src="https://img.shields.io/badge/Doc-API Reference-blue?logo=readthedocs"></a> </td> </tr> <tr> <td>Paper & Citation</td> <td> <a href="https://arxiv.org/abs/2111.12776"> <img src="https://img.shields.io/badge/arXiv-2111.12776-B31B1B?logo=arXiv"></a> <a href="https://arxiv.org/pdf/2111.12776"> <img src="https://img.shields.io/badge/arXiv-PDF-B31B1B?logo=arXiv"></a> <a href="https://zhuanlan.zhihu.com/p/376572330"> <img src="https://img.shields.io/badge/Blog-知乎/Zhihu-0084ff?logo=Zhihu&labelColor=white"></a> <a href="https://scholar.google.com/scholar?q=IMBENS%3A+Ensemble+class-imbalanced+learning+in+Python"> <img src="https://img.shields.io/badge/Citation-Bibtex-4285F4?logo=googlescholar&labelColor=white"></a> </td> </tr> <tr> <td>Language</td> <td> <a href="https://github.com/ZhiningLiu1998/imbalanced-ensemble"> <img src="https://img.shields.io/badge/README-English-blue?logo=github&labelColor=black"></a> <a href="https://github.com/ZhiningLiu1998/imbalanced-ensemble/blob/main/docs/README_CN.md"> <img src="https://img.shields.io/badge/README-中文-blue?logo=github&labelColor=black"></a> </td> </tr> </table> <h3 align="center"> ⏳Quick Start with our <a href="https://github.com/ZhiningLiu1998/imbalanced-ensemble#5-min-quick-start-with-imbens">5-minute Guide</a> & <a href="https://imbalanced-ensemble.readthedocs.io/en/latest/auto_examples/index.html#">Detailed Examples</a> </h3>

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.

<h2 align="left">🌈 IMBENS Highlights</h2>
  • 🧑‍💻 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.

<h2 align="left">📚 Table of Contents</h2>

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:

<!-- ## Highlights - &#x1F34E; ***Unified, easy-to-use API design.*** All ensemble learning methods implemented in IMBENS share a unified API design. Similar to sklearn, all methods have functions (e.g., `fit()`, `predict()`, `predict_proba()`) that allow users to deploy them with only a few lines of code. - &#x1F34E; ***Extended functionalities, wider application scenarios.*** *All methods in IMBENS are ready for **multi-class imbalanced classification**.* We extend binary ensemble imbalanced learning methods to get them to work under the multi-class scenario. Additionally, for supported methods, we provide more training options like class-wise resampling control, balancing scheduler during the ensemble training process, etc. - &#x1F34E; ***Detailed training log, quick intuitive visualization.*** We provide additional parameters (e.g., `eval_datasets`, `eval_metrics`, `training_verbose`) in `fit()` for users to control the information they want to monitor during the ensemble training. We also implement an [`EnsembleVisualizer`](https://imbalanced-ensemble.readthedocs.io/en/latest/api/visualizer/_autosummary/imbens.visualizer.ImbalancedEnsembleVisualizer.html) to quickly visualize the ensemble estimator(s) for providing further information/conducting comparison. See an example [here](https://imbalanced-ensemble.readthedocs.io/en/latest/auto_examples/basic/plot_basic_example.html#sphx-glr-auto-examples-basic-plot-basic-example-py). - &#x1F34E; ***Wide compatiblilty.*** IMBENS is designed to be compatible with [scikit-learn](https://scikit-learn.org/stable/) (sklearn) and also other compatible projects like [imbalanced-learn](https://imbalanced-learn.org/stable/). Therefore, users can take advantage of various utilities from the sklearn community for data processing/cross-validation/hyper-parameter tuning, etc. --> <!-- ## Background Class-imbalance (also known as the long-tail problem in multi-class) is the fact that the classes are not represented equally in a classification problem, which is quite common in practice. For instance, fraud detection, prediction of rare adverse drug reactions and prediction gene families. Failure to account for the class imbalance often causes inaccurate and decreased predictive performance of many classification algorithms. Imbalanced learning (IL) aims to tackle the class imbalance problem to learn an unbiased model from imbalanced data. This is usually achieved by changing the training data distribution by resampling or reweighting. However, naive resampling or reweighting may introduce bias/variance to the training data, especially when the data has class-overlapping or contains noise. Ensemble imbalanced learning (EIL) is known to effectively improve typical IL solutions by combining the outputs of multiple classifiers, thereby reducing the variance introduce by resampling/reweighting. -->

List of implemented methods

Currently (v0.1.3, 2021/06), 16 ensemble imbalanced learning methods were implemented:
(Click to jump to the document page)

编辑推荐精选

扣子-AI办公

扣子-AI办公

职场AI,就用扣子

AI办公助手,复杂任务高效处理。办公效率低?扣子空间AI助手支持播客生成、PPT制作、网页开发及报告写作,覆盖科研、商业、舆情等领域的专家Agent 7x24小时响应,生活工作无缝切换,提升50%效率!

堆友

堆友

多风格AI绘画神器

堆友平台由阿里巴巴设计团队创建,作为一款AI驱动的设计工具,专为设计师提供一站式增长服务。功能覆盖海量3D素材、AI绘画、实时渲染以及专业抠图,显著提升设计品质和效率。平台不仅提供工具,还是一个促进创意交流和个人发展的空间,界面友好,适合所有级别的设计师和创意工作者。

图像生成AI工具AI反应堆AI工具箱AI绘画GOAI艺术字堆友相机AI图像热门
码上飞

码上飞

零代码AI应用开发平台

零代码AI应用开发平台,用户只需一句话简单描述需求,AI能自动生成小程序、APP或H5网页应用,无需编写代码。

Vora

Vora

免费创建高清无水印Sora视频

Vora是一个免费创建高清无水印Sora视频的AI工具

Refly.AI

Refly.AI

最适合小白的AI自动化工作流平台

无需编码,轻松生成可复用、可变现的AI自动化工作流

酷表ChatExcel

酷表ChatExcel

大模型驱动的Excel数据处理工具

基于大模型交互的表格处理系统,允许用户通过对话方式完成数据整理和可视化分析。系统采用机器学习算法解析用户指令,自动执行排序、公式计算和数据透视等操作,支持多种文件格式导入导出。数据处理响应速度保持在0.8秒以内,支持超过100万行数据的即时分析。

AI工具酷表ChatExcelAI智能客服AI营销产品使用教程
TRAE编程

TRAE编程

AI辅助编程,代码自动修复

Trae是一种自适应的集成开发环境(IDE),通过自动化和多元协作改变开发流程。利用Trae,团队能够更快速、精确地编写和部署代码,从而提高编程效率和项目交付速度。Trae具备上下文感知和代码自动完成功能,是提升开发效率的理想工具。

AI工具TraeAI IDE协作生产力转型热门
AIWritePaper论文写作

AIWritePaper论文写作

AI论文写作指导平台

AIWritePaper论文写作是一站式AI论文写作辅助工具,简化了选题、文献检索至论文撰写的整个过程。通过简单设定,平台可快速生成高质量论文大纲和全文,配合图表、参考文献等一应俱全,同时提供开题报告和答辩PPT等增值服务,保障数据安全,有效提升写作效率和论文质量。

AI辅助写作AI工具AI论文工具论文写作智能生成大纲数据安全AI助手热门
博思AIPPT

博思AIPPT

AI一键生成PPT,就用博思AIPPT!

博思AIPPT,新一代的AI生成PPT平台,支持智能生成PPT、AI美化PPT、文本&链接生成PPT、导入Word/PDF/Markdown文档生成PPT等,内置海量精美PPT模板,涵盖商务、教育、科技等不同风格,同时针对每个页面提供多种版式,一键自适应切换,完美适配各种办公场景。

AI办公办公工具AI工具博思AIPPTAI生成PPT智能排版海量精品模板AI创作热门
潮际好麦

潮际好麦

AI赋能电商视觉革命,一站式智能商拍平台

潮际好麦深耕服装行业,是国内AI试衣效果最好的软件。使用先进AIGC能力为电商卖家批量提供优质的、低成本的商拍图。合作品牌有Shein、Lazada、安踏、百丽等65个国内外头部品牌,以及国内10万+淘宝、天猫、京东等主流平台的品牌商家,为卖家节省将近85%的出图成本,提升约3倍出图效率,让品牌能够快速上架。

下拉加载更多