Skip to main content

A simple confusion matrix

Project description

Simple confusion matrix

Plot a simple confusion matrix using matplotlib

Usage:

confusion_matrix(matrix, labels)

labels is optional. Returns a matplotlib Figure

Example:

from plot_confusion_matrix import confusion_matrix
from matplotlib import pyplot

matrix = [[5, 2, 0],
		  [1, 2, 3],
		  [2, 1, 6]]

confusion_matrix(matrix)
pyplot.show(block=True)

Output:

Result

confusion_matrix(matrix, ["A", "B", "C"])

Plot with label

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

plot_confusion_matrix-0.0.2.tar.gz (70.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

plot_confusion_matrix-0.0.2-py3-none-any.whl (3.6 kB view details)

Uploaded Python 3

File details

Details for the file plot_confusion_matrix-0.0.2.tar.gz.

File metadata

  • Download URL: plot_confusion_matrix-0.0.2.tar.gz
  • Upload date:
  • Size: 70.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for plot_confusion_matrix-0.0.2.tar.gz
Algorithm Hash digest
SHA256 3dee868443c47b94ef8f1ff65e09f5b41c16febac32993eb0bcf90ffb75311aa
MD5 20f29193a6c0dc86117d1d24d9e6f405
BLAKE2b-256 072a8f595391c4289a7b6efbf72908be32aec4d9852e993029d49463a4fba1c1

See more details on using hashes here.

File details

Details for the file plot_confusion_matrix-0.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for plot_confusion_matrix-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 79f35748449737ec998351878aafe202f5d809f00735e5d9a62eac0948a55ed7
MD5 030ca0062e0367771a5837b9995fab10
BLAKE2b-256 b42b0727cb0b68164f6470c1fba3db38cb4f6fe626c84ac3b7690d82d81cbd67

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page