Skip to main content

Providing a Prettier Confusion Matrix for your Command Line

Project description

presentable

Providing a Prettier Confusion Matrix for your Command Line

presentablelogo

GitHub Repo Stars PyPI - Downloads PyPI PyPI - License

Installation

presentable is available on PyPI. Install it with pip install presentable.

Usage

presentable is a drop in replacement from sklearn.metrics.confusion_matrix that just includes some nice formatting and only ever prints to the terminal, helpful on remote hardware accessible only from the CLI.

>>> confusion_matrix(gtr, pred, tabulate_args={"tablefmt":"github","floatfmt":".2f"},sklearn_args={"normalize":"all"})
| Truth\Model   |   cat |   dog |
|---------------|-------|-------|
| cat           |  0.17 |  0.17 |
| dog           |  0.33 |  0.33 |

tabulate_args and sklearn_args are optional dictionaries to specify additional configurations arguments for tabulate and sklearn's confusion_matrix. Check the tabulate documentation and sklearn documentation for a list of which args are supported.

Online Documentation

Click here to read the documentation

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

presentable-1.0.0.tar.gz (4.6 kB view hashes)

Uploaded Source

Built Distribution

presentable-1.0.0-py3-none-any.whl (4.9 kB view hashes)

Uploaded Python 3

Supported by

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