Skip to main content

Explainable imbalanceD learninG compARatOr

main-check

deploy

Overview

The usage of many balancing methods like Random Undersampling, Random Oversampling, SMOTE, NearMiss is a very popular solution when dealing with imbalanced data. However, a question can be posed of whether these techniques can change the model behaviour or the relationships present in data.

As there are many kinds of Machine Learning models, this package provides model-agnostic tools to investigate the model behaviour and its changes. These tools are also known as Explainable Artificial Intelligence (XAI) tools and include techniques such as Partial Dependence Profile (PDP), Accumulated Local Effects (ALE) and Variable Importance (VI).

Apart from that, the package implements novel methods to compare the explanations, which are Standard Deviation of Distances (for PDP and ALE) and the Wilcoxon statistical test (for VI).

Generally speaking, this package aims to giving a user-friendly interface to investigate whether the described phenomena take place.

The package was written in Python and consists of four modules: dataset, balancing, model and explain. It provides a simple and user-friendly interface which aims to automate the process of data balancing with different methods, training Machine Learning models and calculating PDP/ALE/VI explanations. The package can be used for one input dataset or for a number of datasets arranged in arrays or nested arrays.

Technologies

The package was written in Python and was checked to be compatible with Python 3.8, Python 3.9 and Python 3.10.

It uses most popular libraries for Machine Learning in Python:

  • pandas, NumPy
  • scikit-learn, xgboost
  • imbalanced-learn
  • dalex
  • scipy, statsmodels
  • matplotlib
  • openml

User Manual

User Manual is available as a part of the documentation, here

Installation

The edgaro package is available on PyPI and can be installed by:

pip install edgaro

Documentation

The documentation is available at adrianstando.github.io/edgaro

Project purpose

This package was created for the purpose of my Engineering Thesis "The impact of data balancing on model behaviour with Explainable Artificial Intelligence tools in imbalanced classification problems".

This package was used in my paper "The Effect of Balancing Methods on Model Behavior in Imbalanced Classification Problems", presented at the Fifth International Workshop on Learning with Imbalanced Domains: Theory and Applications (LIDTA 2024).

Citation

@InProceedings{pmlr-v241-stando24a,
  title =       {The Effect of Balancing Methods on Model Behavior in Imbalanced Classification Problems},
  author =      {Stando, Adrian and Cavus, Mustafa and Biecek, Przemyslaw},
  booktitle =   {Proceedings of the Fifth International Workshop on Learning with Imbalanced Domains: Theory and Applications},
  pages =       {16--30},
  year =        {2024},
  volume =      {241},
  series =      {Proceedings of Machine Learning Research},
  publisher =   {PMLR},
  pdf =         {https://proceedings.mlr.press/v241/stando24a/stando24a.pdf}
}

Metadata

Release files for edgaro 1.0.2.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for edgaro 1.0.2.2
File Size Uploaded
edgaro-1.0.2.2.tar.gz 62.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for edgaro 1.0.2.2
File Interpreter ABI Platform
edgaro-1.0.2.2-py3-none-any.whl Python 3 none any Details

Total release size: 123.8 kB

Release files / edgaro-1.0.2.2.tar.gz

Download URL edgaro-1.0.2.2.tar.gz
Size 62.6 kB
Tags Source
SHA-256 checksum
How to use checksums
65151d61242bb16fb4381c2de7d04dc8c5f2a98d3e39ba06aed07fc3d45e7fb3
BLAKE2b-256 checksum
How to use checksums
a3b46c1babbcfef961935cb5eb5012c7b4eb34b879247e237c6a987b041af2eb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.12.8

Release files / edgaro-1.0.2.2-py3-none-any.whl

Download URL edgaro-1.0.2.2-py3-none-any.whl
Size 61.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fae91440fb8006141627d44df37abbf097c4d7c53020dcc4a4ab3d57b7c4eac9
BLAKE2b-256 checksum
How to use checksums
351d62313dee3d792acfbf0f1ff3c87ee22f3736042d6f3880681f77888ba6c4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.12.8

Release history Release notifications | RSS feed

This release

1.0.2.2 This release

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page