Skip to main content

Easy CM

A simple python package to plot confusion matrices.

Confusion Matrix

Installation

foo@bar:~$ pip install easycm

Usage

You can simply call the function with predictions and true values from your classification problem.

from easycm import plot_confusion_matrix
import matplotlib.pyplot as plt


y_true = [False, True, True, False]
y_pred = [False, False, True, True]

plot_confusion_matrix(y_true, y_pred)
plt.show()

To include your confusion matrix in subplots, you can do the following

from easycm import plot_confusion_matrix
import matplotlib.pyplot as plt


y_true = [False, True, True, False]
y_pred = [False, False, True, True]

fig, axs = plt.subplots(1, 2)
plot_confusion_matrix(y_true, y_pred, ax=axs[0])
plt.show()

You can also customize the labels for the X and Y axis and the title.

from easycm import plot_confusion_matrix
import matplotlib.pyplot as plt


y_true = [False, True, True, False]
y_pred = [False, False, True, True]

plot_confusion_matrix(y_true, y_pred, title='Title', xlabel='X', ylabel='Y')
plt.show()

Release files for easycm 0.0.5

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

Source distribution (sdist)

Source distribution for easycm 0.0.5
File Size Uploaded
easycm-0.0.5.tar.gz 2.9 kB Details

Built distribution (wheel)

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

Total release size: 6.3 kB

Release files / easycm-0.0.5.tar.gz

Download URL easycm-0.0.5.tar.gz
Size 2.9 kB
Tags Source
SHA-256 checksum
How to use checksums
fbf75806647ff4a79b991c7808a19caef4987c7cafacd846738ecceffd502f02
BLAKE2b-256 checksum
How to use checksums
22ec71d6853431799d2f7a8936fdc8d2440a7c6d6fd665d81f5d2059cb112f7d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.10.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

Release files / easycm-0.0.5-py3-none-any.whl

Download URL easycm-0.0.5-py3-none-any.whl
Size 3.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f6ced6f9a3628d496952f680dc292608aafcde63b8bdee0192c1b88e6f57fbe3
BLAKE2b-256 checksum
How to use checksums
0e9524dd7991761ccc2bc61bb5884225a76c13df161352142d8c8e26b6f238cb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.10.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

Release history Release notifications | RSS feed

This release

0.0.5 This release

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

1 release file

0.0.1

1 release file

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