Easy CM
A simple python package to plot confusion matrices.
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)
| File | Size | Uploaded | |
|---|---|---|---|
| easycm-0.0.5.tar.gz | 2.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| 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
|