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)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| imcp-1.0.1.tar.gz | 8.2 kB | Without provenance | Details for imcp-1.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| imcp-1.0.1-py3-none-any.whl | Python 3 | none | any | Details for imcp-1.0.1-py3-none-any.whl |
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
|
Security for imcp 1.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.