presentable

Providing a Prettier Confusion Matrix for your Command Line


License
MIT
Install
pip install presentable==0.0.0

Documentation

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