A simple python package to plot confusion matrices
Project description
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()
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file easycm-0.0.5.tar.gz.
File metadata
- Download URL: easycm-0.0.5.tar.gz
- Upload date:
- Size: 2.9 kB
- Tags: Source
- Uploaded using 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
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fbf75806647ff4a79b991c7808a19caef4987c7cafacd846738ecceffd502f02
|
|
| MD5 |
de8a3f297488bc18064e4468a93b6571
|
|
| BLAKE2b-256 |
22ec71d6853431799d2f7a8936fdc8d2440a7c6d6fd665d81f5d2059cb112f7d
|
File details
Details for the file easycm-0.0.5-py3-none-any.whl.
File metadata
- Download URL: easycm-0.0.5-py3-none-any.whl
- Upload date:
- Size: 3.4 kB
- Tags: Python 3
- Uploaded using 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
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f6ced6f9a3628d496952f680dc292608aafcde63b8bdee0192c1b88e6f57fbe3
|
|
| MD5 |
94f1449741aeb64ee24c1ce6c429483d
|
|
| BLAKE2b-256 |
0e9524dd7991761ccc2bc61bb5884225a76c13df161352142d8c8e26b6f238cb
|