OpenViSTAI · Agents · Blockchain · Crypto
Menu
AI Evaluation & Observability

Pycm

Pycm is a Python library that evaluates multiclass classification results from actual and predicted label vectors or a direct confusion matrix, returning class-level and overall performance statistics.

Independent OpenViST project profile, based on linked sources.

Pycm — OpenViST project profile in AI Evaluation & Observability.
OpenViST project illustration. See the linked sources for product details.
Understand the project

Practical overview

When it fits

Use Pycm after a multiclass classifier has generated predictions, especially when class-by-class errors and a broad set of summary statistics are more useful than accuracy alone.

Who it is for

  • Data scientists evaluating multiclass predictive models
  • Python developers adding classification reports to machine-learning workflows
  • Teams comparing several classifiers through consistent confusion-matrix metrics
  • Developers building command-line evaluation utilities or dashboards

Documented uses

  • Construct a confusion matrix from actual and predicted labels
  • Analyze normalized and raw class-confusion counts
  • Calculate class-level and overall classification statistics
  • Compare evaluation outputs from multiple models
  • Use existing confusion-matrix data as direct input
Before you choose

Requirements & limits

The repository is public and MIT-licensed. Installation is documented through PyPI, source code and Conda; MATLAB integration is also documented through a configured Python interpreter.

  • Input can be supplied as actual and predicted vectors or as a direct confusion matrix.
  • The library exposes both class-level and overall statistics.
  • Plotting requires Matplotlib 3.0.0 or later or Seaborn 0.9.1 or later.
  • Python is the native implementation language, with documented MATLAB integration.
  • The project is suitable for local, self-hosted and command-line workflows rather than a hosted evaluation service.

Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.

Source-based practical guide

Create a confusion matrix from actual and predicted labels

Construct a Pycm confusion matrix from two documented classification-result vectors and inspect summary statistics.

Before you start

  • An installed Pycm environment
  • Actual labels and predicted labels in corresponding vectors

Steps

  1. Import Pycm's functionality.

  2. Create a ConfusionMatrix with actual_vector and predict_vector.

  3. Inspect classes and table.

  4. Use print_matrix() or print_normalized_matrix() for matrix views.

  5. Call stat(summary=True) for overall and class statistics.

Expected outcome

The evaluation object exposes class labels, matrix counts, normalized values and summary statistics.

Guide limitations

  • The documented example uses multiclass label vectors; it does not describe data validation, persistence or dashboard integration.
  • The guide reflects the repository example and is not a human-run execution test.
Evidence and transparency

Sources & review

Source record details
Source availability
Active
Sources checked
3 October 2026
Original website title
sepandhaghighi/pycm · Official homepage title · retained in its source language