Skip to main content

IMCP: Imbalanced Multiclass Classification Performance Curve

ROC curves are a well known tool for multiple classifier performance comparison. However, it does not work with multiclass datasets (more than two labels for the target variable). Moreover, the ROC curve is sensitive to imbalance of class distribution.

The package provides a tool - called Imbalanced Multiclass Classification Performance curve - that solves both weaknesses of ROC: application to multiclass and imbalanced datasets.

With the IMCP curve the classification performance can be graphically shown for both multiclass and imbalanced datasets.

The package provides the methods for visualizing the IMCP curve and to provide the area under the IMCP curve.

Installation

IMCP can be installed from PyPI

pip install imcp

Or you can clone the repository and run:

pip install .

Sample usage

from imcp import plot_mcp_curve
from sklearn.linear_model import LogisticRegression
from sklearn.datasets import load_iris

X, y = load_iris(return_X_y=True)

clf = LogisticRegression(solver="liblinear").fit(X, y)
plot_mcp_curve(y, clf.predict_proba(X))

Citation

The methodology is described in detail in:

[1] J. S. Aguilar-Ruiz and M. Michalak, “Classification performance assessment for imbalanced multiclass data”, Scientific Reports, 14:10759, 2024, doi: 10.1038/s41598-024-61365-z.

Also, the mathematical background of the multiclass classification performance can be found in:

[2] J. S. Aguilar-Ruiz and M. Michalak, "Multiclass Classification Performance Curve," in IEEE Access, 10:68915-68921, 2022, doi: 10.1109/ACCESS.2022.3186444.

Documentation

Full documentation is available here

Metadata

Release files for imcp 1.0.1

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

Source distribution (sdist)

Source distribution for imcp 1.0.1
File Size Uploaded
imcp-1.0.1.tar.gz 8.2 kB Details

Built distribution (wheel)

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

Total release size: 15.9 kB

Release files / imcp-1.0.1.tar.gz

Download URL imcp-1.0.1.tar.gz
Size 8.2 kB
Tags Source
SHA-256 checksum
How to use checksums
b2108c2d5f91f9409e81c147d8e43c50604839726e8c77250bab694af372ccc5
BLAKE2b-256 checksum
How to use checksums
a58aa594123f02bd4b92cffaadd0a73b65aecb03545dfb8f8b0beeab8c09436e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.9.19

Release files / imcp-1.0.1-py3-none-any.whl

Download URL imcp-1.0.1-py3-none-any.whl
Size 7.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
76735abd939f014bdf5acaa82a7e4b760455a505051075cb1ee6e8807a065b9a
BLAKE2b-256 checksum
How to use checksums
09d8e0a794879a5c50af9028e3a1514dbdd2149b9fb396f629561445ed3db740
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.9.19

Release history Release notifications | RSS feed

This release

1.0.1 This release

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