
PyCM
PyCM provides a Python library for working with multiclass confusion matrices.

About PyCM
PyCM is a Python library for working with multi-class confusion matrices, which are used to evaluate classification models. It can build a matrix from lists of actual and predicted labels, or from a matrix entered directly as a nested dictionary of counts. It prints raw and normalized matrices and reports overall and per-class statistics, including accuracy, F1, false positive rate, Kappa, and AUC. The source describes it as aimed mainly at data scientists who need a broad set of metrics for predictive models.
Plotting requires Matplotlib (3.0.0 or later) or Seaborn (0.9.1 or later). The project provides MATLAB examples, but using it from MATLAB requires a separate Python 3 installation. Support for older Python versions has ended: the source lists PyCM 4.3 as the last version for Python 3.6, PyCM 3.9 for Python 3.5, and PyCM 2.4 for Python 2.7 and 3.4.
Key features
- Builds a multi-class confusion matrix from actual and predicted label vectors
- Builds a confusion matrix directly from a nested dictionary of counts
- Prints raw and normalized confusion matrices
- Reports overall statistics such as overall accuracy, Kappa, and macro-averaged F1
- Reports per-class statistics such as precision, recall, false negatives, and AUC
- Includes MATLAB examples for use from MATLAB with Python installed
- Covers a wide range of class-level and overall evaluation statistics, as shown in its example output
- Can be installed with pip, conda, or from source
- Open source
- Plotting requires Matplotlib or Seaborn to be installed separately
- Recent releases no longer support older Python versions, such as Python 3.6 and earlier
- Using it from MATLAB requires a separate Python 3 installation and interpreter configuration
PyCM at a glance
- Category
- Development › Developer Tools
- Type
- Open-source project
- Pricing
- Not confirmed. Check the site
- Open source
- Yes · Source code
- Language
- English
- Last checked
- Oct 6, 2026 · Online when checked
- Listed
- Oct 5, 2026
Guides for Developer Tools
PyCM alternatives
Tools and sites you could use instead, ranked by how closely they match.
Python developers can use Streamlit to build and share data applications.
mlxtend adds helper modules for Python data analysis and machine learning libraries.
Apache Hamilton helps teams build modular, testable dataflows with lineage and metadata.
For Python data preparation, DataPrep offers an open-source low-code library to collect, clean, and visualize data.
statsmodels provides statistical modeling and econometrics tools in Python.
PipeRider provided code review tools for dbt data and has been superseded by Recce.
Popular in Developer Tools
Well-known listings from the same topic.
PyCM FAQ
How do I install PyCM with pip or conda?
Which Python versions are supported?
Do I need extra packages to plot confusion matrices?
Tell us and an editor will check it.
Claim the listing and suggest updates yourself. An editor checks every claim first.













