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.2.tar.gz (2.9 kB view details)

Uploaded Source

File details

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

File metadata

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

File hashes

Hashes for dalmatian-0.1.2.tar.gz
Algorithm Hash digest
SHA256 33f7345851f10a535b012633e1d84c7ee4d237852e4a710ad74d920c6e4fc6d0
MD5 e837a281918029a1c2fefcb9dfd57330
BLAKE2b-256 d445d4bc1cdec35b104c821bebf0ca7627da466814a1b63a1e1b0714abcbbd42

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