Skip to main content

Visualizing a confusion matrix with gradations

Project description

Visualizing a confusion matrix with gradations.

Installation

pip install dalmatian

Usage

import numpy as np
import dalmatian

labels = ["ostrich", "swallow", "cuckoo", "chicken", "quail"]
data = np.array([
  [50, 0, 0, 0, 0],
  [1, 41, 5, 3, 0],
  [2, 9, 34, 4, 1],
  [1, 1, 8, 38, 2],
  [1, 0, 2, 3, 44],
  ])

mx = dalmatian.Matrix(labels, data)

#Options
mx.cell_size = 10.0 #[mm]
mx.font_size = 14
mx.label_font_size = 7
mx.cell_color = "black" #black, red, yellow, green, blue, purple
mx.label_color = "black" #black, white
mx.line_type = "normal" #normal, dot
mx.percentage = False

mx.draw()

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

dalmatian-0.1.4.tar.gz (2.9 kB view details)

Uploaded Source

File details

Details for the file dalmatian-0.1.4.tar.gz.

File metadata

  • Download URL: dalmatian-0.1.4.tar.gz
  • Upload date:
  • Size: 2.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for dalmatian-0.1.4.tar.gz
Algorithm Hash digest
SHA256 e11f0725d513479b3f9c52659d4ed1e9862f3fd525c3cc5e6c5a361fa97e4791
MD5 2f87917e7954276f496c6533310ceedf
BLAKE2b-256 fbcf2f43a129d033fb3ea49859621bd7dcc9e5b8c9f1781970d354b34aec0dd4

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