Skip to main content

ML VizKit

PyPI Docs Site Python uv License: MIT

CI Docs Links Dependabot

profile logo

Reusable visualizations for inspecting, comparing, and explaining trained machine-learning models.

ML VizKit provides high-level Python functions for common machine-learning visualizations. It works with trained models, predictions, and experiment results produced by libraries such as scikit-learn.

The package does not train models, select features, choose algorithms, or make analytical decisions.

Design

  • Accept already-trained models, predictions, or completed experiment results.
  • Reuse established visualization primitives from scikit-learn when they exist.
  • Add small higher-level visualizations where the underlying libraries do not.
  • Return Matplotlib Axes objects.
  • Never call plt.show().
  • Keep analytical choices visible to the caller.
  • Keep the implementation readable and replaceable.

Install

uv add ml-vizkit

Example

from ml_vizkit import show_confusion_matrix

ax = show_confusion_matrix(y_test, y_pred)
ax.set_title("Penguin Species Classification")

The caller controls display and composition. In a script, for example:

import matplotlib.pyplot as plt

ax = show_confusion_matrix(y_test, y_pred)
plt.show()

Initial API

Classification:

  • show_decision_boundary()
  • show_confusion_matrix()
  • show_prediction_errors()
  • show_class_distribution()

Regression:

  • show_actual_vs_predicted()
  • show_residuals()

Model inspection:

  • show_feature_importance()

Experiment inspection:

  • show_train_test_split()
  • compare_splits()
  • compare_models()

Output:

  • save_chart()

Example: Classification

from ml_vizkit import show_confusion_matrix

ax = show_confusion_matrix(
    y_test,
    y_pred,
)

Example: Regression

from ml_vizkit import show_actual_vs_predicted

ax = show_actual_vs_predicted(
    y_test,
    y_pred,
)

Example: Model Inspection

from ml_vizkit import show_feature_importance

ax = show_feature_importance(
    model,
    feature_names,
)

Example: Save Chart

from ml_vizkit import save_chart, show_confusion_matrix

ax = show_confusion_matrix(
    y_test,
    y_pred,
)

save_chart(
    ax,
    "docs/images/confusion-matrix.png",
)

Example: Show Chart

import matplotlib.pyplot as plt

plt.show()

Developer Command Reference

Show command reference

In a machine terminal

Open a machine terminal where you want the project:

git clone https://github.com/analytics-toolworks/ml-vizkit

cd ml-vizkit
code .

In a VS Code terminal

uv self update
uv python pin 3.14
uv python install
uv lock --upgrade
uv sync

uv run pre-commit install
uv run pre-commit autoupdate

git add -A
uv run pre-commit run --all-files
# repeat if changes were made
uv run pre-commit run --all-files

# types, tests, docs
uv run ty check
uv run python -m pytest
uv run python -m zensical build

# save progress
git add -A
git commit -m "update"
git push -u origin main

Documentation

Annotations

.annotations/annotations.md

Citation

CITATION.cff

License

MIT

Release files for ml-vizkit 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ml-vizkit 0.1.0
File Size Uploaded
ml_vizkit-0.1.0.tar.gz 13.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ml-vizkit 0.1.0
File Interpreter ABI Platform
ml_vizkit-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 25.3 kB

Release files / ml_vizkit-0.1.0.tar.gz

Download URL ml_vizkit-0.1.0.tar.gz
Size 13.8 kB
Tags Source
SHA-256 checksum
How to use checksums
32bcc19aa4836fd2b23da541e3f75404e5deeab72df87d21bef13a4c0b80b682
BLAKE2b-256 checksum
How to use checksums
efc8389d353a4475ac67adac13cf6aa858b8dd290505d0f2999243fe0fdd2e91
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 21, 2026.

Transparency log

Release files / ml_vizkit-0.1.0-py3-none-any.whl

Download URL ml_vizkit-0.1.0-py3-none-any.whl
Size 11.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
851adcc9d9ff468c4a00520cb278fd8c768f1145c2839a2d51132ff7deadcb8a
BLAKE2b-256 checksum
How to use checksums
f1cf29a0121ea46069d6bbb9ba28e09307ec8a94bb789cd3b926368ee41fa85e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 21, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page