Skip to content

About

An intuitive library that seamlessly adds plotting capabilities and functionality to any model objects or outputs, compatible with tools like scikit-learn, XGBoost, TensorFlow, and more.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

3 stars

Watchers

0 watching

Forks

Latest commit

 

History

2,170 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

🐋🦜 🔜 EXPERIMENTAL RAG-CI — Source-Grounded 🇦🇮 via scikitplot.mcp, Locally or with Docker ✨:

🐬🦜 Give AI Better Context — Ground Responses in Curated Evidence

📖🔊 In simple terms, you first build a corpus from selected documents and data. scikitplot.corpus can prepare, structure, and index that material, while optional retrieval backends such as scikitplot.annoy can help find semantically related passages. scikitplot.mcp then makes the relevant retrieved context available to MCP-compatible AI applications when a question is asked.

Instead of relying only on what the model already knows, the application can answer with relevant source material available in its context.

scikitplot.mcp acts as the bridge between your evidence layer and the AI application:

  • RAG (Retrieval-Augmented Generation): Retrieves relevant evidence from your corpus to support model responses.
  • CI (Context Injection): Adds selected reference material to the model request at inference time.
  • MCP (Model Context Protocol): Provides a standard way for compatible AI applications to access external context, resources, and tools.

The data path is simple:

curated sources → corpus → retrieval → relevant evidence → MCP → AI response

The scientific principle is equally important:

relevant ≠ correct → evidence ≠ absolute truth → grounded ≠ guaranteed

Retrieved data should therefore be treated as evidence for a best-supported answer or hypothesis, not as unquestionable truth. Good grounding keeps sources, provenance, uncertainty, conflicting evidence, and missing information visible whenever possible.

This can improve accuracy, traceability, and reproducibility while reducing unsupported answers, but final conclusions should remain open to verification as the underlying data changes.

Run scikitplot.mcp directly on your system or inside Docker; Docker changes how the service is deployed, not how the grounding logic works.

🔜 Start the interactive container:

# (experimental) Force activate environment
# docker run -it --rm scikitplot/scikit-plots -p 8000:8000 -ic "bash -ic 'python -m scikitplot.mcp --docker'"
docker run -it --rm scikitplot/scikit-plots -p 8000:8000 -ic "bash -ic 'scikitplot mcp --docker'"

Note: If port 8000 is currently in use, you can fallback to port 3000 using -p 3000:8000.

🩺 Health Check (ready to use Claude Desktop, Cursor, or local LLMs)

Verify that your local corpus server is up, running, and ready to feed data to your AI model by pinging the health endpoint:

curl --fail --silent --show-error http://127.0.0.1:8000/healthz; echo

If successful, the terminal will return an OK status, meaning the "parrot" (MCP) is ready to talk.

🐋 Scikit-plots runtime|devel GitHub Container Registry (`ghcr.io`) :

docker pull ghcr.io/scikit-plots/scikit-plots:latest-devel-python3.11

🐋 Scikit-plots runtime|devel Red Hat Quay Container Registry (`quay.io`) :

# podman pull quay.io/scikit-plots/scikit-plots
docker pull quay.io/scikit-plots/scikit-plots:latest-devel-python3.11

🐋 Scikit-plots runtime|devel Docker Container Registry (`docker.io`) :

docker pull scikitplot/scikit-plots:latest-devel-python3.11
# docker run -it --rm scikitplot/scikit-plots[:latest|:latest-runtime|:latest-devel] -i -c "scikitplot -V"
# docker run -it --rm -v "$(pwd):/work/notebooks:delegated" -p 8891:8891 scikitplot/scikit-plots:latest-devel
docker run -it -v "$( (pwd -W >/dev/null 2>&1 && pwd -W) || pwd ):/work" -p 8891:8891 scikitplot/scikit-plots:latest-python3.11

✅ Run with/without pull Onto Vscode or Browser as Jupyter Notebook (*-jupyter):

docker run -it -v "$( (pwd -W >/dev/null 2>&1 && pwd -W) || pwd ):/work" -p 8891:8891 scikitplot/scikit-plots:latest-devel-python3.11
docker run -it -v "$( (pwd -W >/dev/null 2>&1 && pwd -W) || pwd ):/work" -p 8891:8891 scikitplot/scikit-plots:latest-devel-jupyter-python3.11

🧠 Gotchas:

  • 🚨 By running Docker with [bash] -ic "bash -i", you override Bash's normal startup logic. The -i option explicitly tells Bash: "Start as an interactive shell, regardless of how you were invoked."
  • ⚠️ Python 3.8 and 3.9 are only partially supported: optional packages such as array-api-compat, array-api-extra, and astropy.stats require Python 3.10+ and will fail to install on older versions. Upgrade to Python 3.10 or later for the full feature set.
  • 🚫 Never install into conda's base environment — it accumulates packages over time and is highly prone to conflicts. Always create a dedicated environment instead.
  • ✅ Use an isolated environment to keep installs clean and avoid conflicts with system packages: venv (built-in, zero setup) or pipenv (adds a lock file for reproducible installs).

💡 Hint: Troubleshooting

🛠️ Tip: Troubleshooting

  • 🚨 anaconda.org Try to install packages from this channel (branch main). https://anaconda.org/channels/scikit-plots-wheels-staging-nightly
  • 🖥️ Wheel built for a different CPU — Illegal instruction (core dumped): If pip downloads a pre-built wheel that was compiled with -march=native, that binary is optimised for the specific CPU it was built on and will crash immediately on any other CPU model. The fix is to build from source so the compiler targets your machine directly:
    ⚠️ Important Note
    -march=native creates binaries optimized for the current machine only.
    Builds produced this way may not run on different CPUs and can fail with errors such as:
    Illegal instruction (core dumped)
    pip install "git+https://github.com/scikit-plots/scikit-plots.git@main" -v
    The -v flag shows the build steps so you can confirm a local compile is happening rather than a cached wheel being unpacked.

🛠️ Build from Source — Safer Than Wheels — Avoid Prebuilt Wheel Pitfalls

# ⚠️ Install all required build and runtime dependencies before proceeding.

# ─────────────────────────────────────────────────────────────────────────
# Option A — Install directly from a remote Git ref (builds from source)
# ─────────────────────────────────────────────────────────────────────────
# Pin to a specific commit (for reproducible installs):
# pip install "git+https://github.com/scikit-plots/scikit-plots.git@<commit_sha>" -vvv
# Pin to a tagged release:
# pip install "git+https://github.com/scikit-plots/[email protected]" -vv
# Latest development build (main branch):
pip install --no-cache-dir "git+https://github.com/scikit-plots/scikit-plots.git@main" -v

# ─────────────────────────────────────────────────────────────────────────
# Option B — Clone locally, then install (useful for development or patching)
# ─────────────────────────────────────────────────────────────────────────
git clone https://github.com/scikit-plots/scikit-plots.git
cd scikit-plots

python -m pip install --no-build-isolation --no-cache-dir . -v
# Editable:
pip install --no-build-isolation --no-cache-dir -e . -v 2>&1 | tee build.log.txt

# ─────────────────────────────────────────────────────────────────────────
# ⚠️ Why not simply `pip install scikit-plots`?
#
#     PyPI wheels may be compiled with -march=native — a compiler flag that
#     generates CPU-specific instructions optimised for the build machine only.
#     Running those binaries on a different CPU model crashes immediately with:
#
#       Illegal instruction (core dumped)
#
#     Building from source (Option A or B above) compiles the extension
#     modules against YOUR machine's instruction set, which is always safe.
# ─────────────────────────────────────────────────────────────────────────
# pip install scikit-plots

See Also: conda-environment-guidelines

## (conda, mamba or micromamba) Create New Env and install ``scikit-plots``
## Create a new environment and install Python 3.11 with IPython kernel support
# conda create -y -n py311 python=3.11 ipykernel
# mamba create --yes --name py311 python=3.11 ipykernel
micromamba create -y -n py311 python=3.11 ipykernel
## (conda, mamba or micromamba) Activate the environment
# conda activate py311
# mamba activate py311
micromamba activate py311
## (conda, mamba or micromamba) Deep Explore scikit-plots
# conda repoquery search -c conda-forge "scikit-plots=0.4.0" --json
# mamba repoquery search -c conda-forge "scikit-plots=0.4.0" --json
# micromamba repoquery search -c conda-forge "scikit-plots=0.4.0" --json
# micromamba repoquery search -c conda-forge "scikit-plots=0.4.0" --json --platform osx-64
micromamba repoquery search -c conda-forge "scikit-plots=0.4.0" --json \
  | jq -r '.result.pkgs[] | "\(.subdir)  \(.build)"'
## (conda, mamba or micromamba) Install scikit-plots
# conda install -y scikit-plots-wheels-staging-nightly::scikit-plots
# conda install -y scikit-plots-wheels-staging::scikit-plots
# conda install -y conda-forge::scikit-plots
# mamba install --yes --channel conda-forge scikit-plots
micromamba install -y -c conda-forge scikit-plots

# Cause numpy>=2.0.0 but support old numpy
# pip install numpy==1.26.4
## (conda, mamba or micromamba) Install newest compatible build scikit-plots
# conda update -y conda-forge::scikit-plots
# mamba update --yes --channel conda-forge scikit-plots
micromamba update -y -c conda-forge scikit-plots

# Cause numpy>=2.0.0 but support old numpy
# pip install numpy==1.26.4
## (conda, mamba or micromamba) Verify version and location scikit-plots
# conda list | grep scikit-plots
# mamba list | grep scikit-plots
micromamba list | grep scikit-plots
micromamba clean --index-cache -y
# or stronger
micromamba clean -a -y
## (conda, mamba or micromamba) Explore scikit-plots
# conda search conda-forge::scikit-plots
# mamba search --channel conda-forge scikit-plots
micromamba search -c conda-forge "scikit-plots=0.4.0"

(Optionally) 📦 UV install all dependencies:

## (Optionally) uv dep for Python 3.11
sh -c 'curl -LsSf https://astral.sh/uv/install.sh | sh'

(Optionally) 📦 Pipenv install all dependencies:

See Also: pipenv-environment-guidelines

## (Optionally) Pipenv dep for Python 3.11
# wget https://raw.githubusercontent.com/scikit-plots/scikit-plots/main/docker/env_pipenv/Pipfile
curl -O https://raw.githubusercontent.com/scikit-plots/scikit-plots/main/docker/env_pipenv/py311/Pipfile
curl -O https://raw.githubusercontent.com/scikit-plots/scikit-plots/main/docker/env_pipenv/py311/Pipfile.lock
pip install pipenv && pipenv install
## (Optionally) Pipenv Activate the environment
pipenv shell

📦 From PIP :

✅ The easiest way to set up scikit-plots is to install it using pip with the following command:

✅ Installation by pypi , pypi.anaconda.org or github :

- By pypi :

## Now Install scikit-plots (via pip, conda, or local source)
# pip index versions scikit-plots
pip install scikit-plots

## Cause numpy>=2.0.0 but support old numpy
# pip install numpy==1.26.4
## (Optionally) Install the lost packages "Runtime dependencies" or use `pipenv`
## https://github.com/celik-muhammed/scikit-plots/tree/main/requirements
# wget https://raw.githubusercontent.com/scikit-plots/scikit-plots/main/requirements/default.txt
curl -O https://raw.githubusercontent.com/scikit-plots/scikit-plots/main/requirements/default.txt
pip install -r default.txt
## Try After Ensure all "Runtime dependencies" installed
pip install -U -i https://pypi.anaconda.org/scikit-plots-wheels-staging-nightly/simple scikit-plots

## Cause numpy>=2.0.0 but support old numpy
# pip install numpy==1.26.4

⚠️ scikit-plots-skinny as base required/dependency remaining scikit-plots-x.

## Pure Python - https://anaconda.org/channels/scikit-plots-wheels-staging-nightly
## ⚠️ ``scikit-plots-skinny`` as base required/dependency remaining ``scikit-plots-x``.
pip install -i https://pypi.anaconda.org/scikit-plots-wheels-staging-nightly/simple scikit-plots-skinny
## Pure Python - https://anaconda.org/channels/scikit-plots-wheels-staging-nightly
## ⚠️ ``scikit-plots-skinny`` as base required/dependency remaining ``scikit-plots-x``.
pip install -i https://pypi.anaconda.org/scikit-plots-wheels-staging-nightly/simple scikit-plots-cleanprompt
pip install -i https://pypi.anaconda.org/scikit-plots-wheels-staging-nightly/simple scikit-plots-corpus
pip install -i https://pypi.anaconda.org/scikit-plots-wheels-staging-nightly/simple scikit-plots-cython
pip install -i https://pypi.anaconda.org/scikit-plots-wheels-staging-nightly/simple scikit-plots-mcp
pip install -i https://pypi.anaconda.org/scikit-plots-wheels-staging-nightly/simple scikit-plots-mlflow
pip install -i https://pypi.anaconda.org/scikit-plots-wheels-staging-nightly/simple scikit-plots-rank-bm25
pip install -i https://pypi.anaconda.org/scikit-plots-wheels-staging-nightly/simple scikit-plots-sphinx-ext
## May Need Compiler (C++) - https://anaconda.org/channels/scikit-plots-wheels-staging-nightly
## ⚠️ ``scikit-plots-skinny`` as base required/dependency remaining ``scikit-plots-x``.
pip install -i https://pypi.anaconda.org/scikit-plots-wheels-staging-nightly/simple scikit-plots-annoy

✅ Remote GitHub URLs @<branch>, @<specific commit> or @<tag/release> suffix.

## pip install "[<distribution_metadata_name> @ ] git+<url>[@<branches|commit|ref|tag> ]#<subdirectory_fragment>"
#  pip install "mlflow  @ git+https://github.com/mlflow/mlflow.git@master#subdirectory=libs/skinny"
#  pip install "voyager @ git+https://github.com/spotify/[email protected]#subdirectory=python"

⚠️ scikit-plots-skinny as base required/dependency remaining scikit-plots-x.

## Pure Python - https://anaconda.org/channels/scikit-plots-wheels-staging-nightly
## ⚠️ ``scikit-plots-skinny`` as base required/dependency remaining ``scikit-plots-x``.
## Install it first: the parts below depend on it, and it is not on PyPI yet, so
## a part installed without it fails ("No matching distribution found").
# pip install scikit-plots-skinny@git+https://github.com/scikit-plots/scikit-plots.git@main#subdirectory=libs/skinny
pip install "scikit-plots-skinny @ git+https://github.com/scikit-plots/scikit-plots.git@main#subdirectory=libs/skinny"
## The same development builds from the staging index: the project's packages
## from it (--no-deps), then their dependencies from PyPI. Example, corpus:
pip install --index-url https://pypi.anaconda.org/scikit-plots-wheels-staging-nightly/simple --no-deps scikit-plots-skinny scikit-plots-corpus
pip install scikit-plots-skinny scikit-plots-corpus
pip install "scikit-plots-skinny @ git+https://github.com/scikit-plots/scikit-plots.git@main#subdirectory=libs/skinny" \
  "scikit-plots-corpus @ git+https://github.com/scikit-plots/scikit-plots.git@main#subdirectory=libs/corpus"
## 🔜🚀 A lightweight version that is designed to be used in environments where you want to minimize the size of the package.
## Pure Python - https://anaconda.org/channels/scikit-plots-wheels-staging-nightly
pip install "scikit-plots-cleanprompt @ git+https://github.com/scikit-plots/scikit-plots.git@main#subdirectory=libs/cleanprompt"
pip install "scikit-plots-corpus @ git+https://github.com/scikit-plots/scikit-plots.git@main#subdirectory=libs/corpus"
pip install "scikit-plots-cython @ git+https://github.com/scikit-plots/scikit-plots.git@main#subdirectory=libs/cython"
pip install "scikit-plots-mcp @ git+https://github.com/scikit-plots/scikit-plots.git@main#subdirectory=libs/mcp"
pip install "scikit-plots-mlflow @ git+https://github.com/scikit-plots/scikit-plots.git@main#subdirectory=libs/mlflow"
pip install "scikit-plots-rank-bm25 @ git+https://github.com/scikit-plots/scikit-plots.git@main#subdirectory=libs/rank-bm25"
pip install "scikit-plots-sphinx-ext @ git+https://github.com/scikit-plots/scikit-plots.git@main#subdirectory=libs/sphinx-ext"
## 🔜🚀 A lightweight version that is designed to be used in environments where you want to minimize the size of the package.
## May Need Compiler (C++) - https://anaconda.org/channels/scikit-plots-wheels-staging-nightly
pip install "scikit-plots-annoy @ git+https://github.com/scikit-plots/scikit-plots.git@main#subdirectory=libs/annoy"
- by GitHub Branches: @<branch>
## If you want to install the latest version from GitHub
pip install git+https://github.com/scikit-plots/scikit-plots.git@main
## (Added C, Cpp, Fortran Support) Works with standard Python (CPython)
pip install git+https://github.com/scikit-plots/scikit-plots.git@maintenance/0.4.x
## (Works with PyPy interpreter) Works with standard Python (CPython)
pip install git+https://github.com/scikit-plots/scikit-plots.git@maintenance/0.3.x
pip install git+https://github.com/scikit-plots/scikit-plots.git@maintenance/0.3.7
- by GitHub Tags: @<tag>
## If you want to install one of archived version from GitHub
pip install git+https://github.com/scikit-plots/[email protected]
pip install git+https://github.com/scikit-plots/[email protected]
pip install git+https://github.com/scikit-plots/[email protected]
- by GitHub Specific Commit: @<specific commit> (recommended for reproducibility)
## If you want to install one of archived version from GitHub
# abc123def456...full40chars pip install git+https://github.com/scikit-plots/scikit-plots.git@<commit_sha>
pip install git+https://github.com/scikit-plots/[email protected]
pip install git+https://github.com/scikit-plots/[email protected]

📁 From Source Code (e.g., .zip, .tar.gz):

✅ Installation by Source Code Downloaded Archive URLs (.tar.gz) (releases/tags suffix) to specify a version or GIT Clone :

🐍 Pitfalls:

  • 📥 Archive (Gzipped Source Tarball .tar.gz) (e.g., GitHub Source Code Archive, PyPI Source Code Archive, pypi.anaconda Source Code Archive)
  • 💡 You can download GitHub Source Code Archives (.zip or .tar.gz) by specifying a branch, tag, or a specific commit ID.
  • 🛠️ After unzipping the GitHub Source Code Archive (similar to cloning), remember require to run git submodule update to initialize submodules, If Needed.
  • ↔️ Alternatively, PyPI Source Code Distribution (.tar.gz) are also available for direct installation via PyPI (sdist), if applicable.
  • ↔️ Alternatively, pypi.anaconda Source Code Distribution (.tar.gz) are also available for direct installation via pypi.anaconda (sdist), if applicable.
  • 🔄 Alternatively, (git clone ...) you can install scikit-plots directly from the GitHub Source Code Repository to access the latest updates.

Install a Single Package from Source

## pip install package Installs wheel (.whl) if available, else source  # pip install scikit-plots
## pip install --no-binary=package package # Forces source installation only the specified package
pip install --no-binary=scikit-plots scikit-plots
## pip install --no-binary=:all: package # Forces source installation for Package + all dependencies
## This forces scikit-plots AND all its dependencies to be installed from source (from .tar.gz).
pip install --no-binary=:all: scikit-plots
## (Optionally) Install offline downloaded a source distribution (.tar.gz) of scikit-plots (wget or curl -O)
## PyPi Source Link: /packages/source/<first-letter>/<normalized-name>/<filename>
## https://files.pythonhosted.org/packages/af/3a/a7eb68ff8075e09f3b6e13de548fc71c999ee01abff441cc6506862bba09/scikit_plots-0.4.0.post11.tar.gz
## https://files.pythonhosted.org/packages/source/s/scikit-plots/scikit_plots-0.4.0.post11.tar.gz
curl -O https://files.pythonhosted.org/packages/source/s/scikit-plots/scikit_plots-0.4.0.post11.tar.gz
pip install ./scikit_plots-0.4.0.post11.tar.gz
## https://pypi.org/project/scikit-plots/#history
## pip install --require-hashes -r requirements.txt
## sha256sum ./scikit_plots-0.4.0.post11.tar.gz
## shasum -a 256 ./scikit_plots-0.4.0.post11.tar.gz
## Get-FileHash scikit_plots-0.4.0.post11.tar.gz -Algorithm SHA256
## scikit-plots==0.4.0.post11 --hash=sha256:<your-computed-hash-here>

✅ GitHub Source Code Archive URLs: (e.g., .zip, .tar.gz) (with build deps )

Source code archives are available at specific URLs for each repository. For example, consider the repository scikit-plots/scikit-plots .

✅ GitHub Source Code Repository Cloned: (with build deps )

## Forked repo: https://github.com/scikit-plots/scikit-plots.git
git clone https://github.com/YOUR-USER-NAME/scikit-plots.git
cd scikit-plots
## (if Necessary) Add safe directories for git
# bash docker/script/git_add_safe_dirs.sh
git config --global --add safe.directory '*'
## (Optionally) Git Submodules Clone/Download/Initialize Configs, Not Needed Every Time.
# git submodule update --init --recursive
## (Recommended) Ensure venv (e.g. conda, venv, pipenv)
# pip install -r ./requirements/all.txt
pip install -r ./requirements/build.txt
## Install the package in the current directory, ignore pip's cache,
## and show detailed logs of the installation process.
## If you have a local clone of the repository
pip install --no-cache-dir . -v

🧊🔧 Also possible to include optional deps with editable mode:

## (Optionally) Install the current package in editable mode,
## using the current environment for building, and ignore cached builds
pip install --no-cache-dir --no-build-isolation -e . -v
## (Optionally) Install the current package in editable mode,
## using the current environment for building, and ignore cached builds
## https://github.com/celik-muhammed/scikit-plots/tree/main/requirements
## For More in Doc: https://scikit-plots.github.io/dev/devel/guide_qu_contribute.html
python -m pip install --no-cache-dir --no-build-isolation -e .[build,dev,test,doc] -v
## https://github.com/celik-muhammed/scikit-plots/tree/main/requirements
## [cpu] refer tensorflow-cpu, transformers, tf-keras
## [gpu] refer Cupy tensorflow lib require NVIDIA CUDA support
pip install "scikit-plots[cpu]"
plot_feature_importances.png plot_classifier_eval.png plot_classifier_eval.png
plot_roc.png plot_precision_recall.png
plot_pca_component_variance.png plot_pca_2d_projection.png
plot_elbow.png plot_silhouette.png
plot_cumulative_gain.png plot_lift.png
plot_learning_curve.png plot_calibration_curve.png

Scikit-plots is the result of an unartistic data scientist's dreadful realization that visualization is one of the most crucial components in the data science process, not just a mere afterthought.

Gaining insights is simply a lot easier when you're looking at a colored heatmap of a confusion matrix complete with class labels rather than a single-line dump of numbers enclosed in brackets. Besides, if you ever need to present your results to someone (virtually any time anybody hires you to do data science), you show them visualizations, not a bunch of numbers in Excel.

That said, there are a number of visualizations that frequently pop up in machine learning. Scikit-plots is a humble attempt to provide aesthetically-challenged programmers (such as myself) the opportunity to generate quick and beautiful graphs and plots with as little boilerplate as possible.

Okay then, prove it. Show us an example.

Say we use Keras Classifier in multi-class classification and decide we want to visualize the results of a common classification metric, such as sklearn's classification report with a confusion matrix.

Let’s start with a basic example where we use a Keras classifier to evaluate the digits dataset provided by Scikit-learn.

# Before tf {'0':'All', '1':'Warnings+', '2':'Errors+', '3':'Fatal Only'} if any
import os

os.environ["TF_CPP_MIN_LOG_LEVEL"] = "3"
# Disable GPU and force TensorFlow to use CPU
import os

os.environ["CUDA_VISIBLE_DEVICES"] = ""
import tensorflow as tf

# Set TensorFlow's logging level to Fatal
import logging

tf.get_logger().setLevel(logging.CRITICAL)
import numpy as np
from sklearn.datasets import load_digits
from sklearn.model_selection import train_test_split

# Loading the dataset
X, y = load_digits(
    return_X_y=True,
)
# Split the dataset into training and validation sets
X_train, X_val, y_train, y_val = train_test_split(X, y, test_size=0.33, random_state=0)
# Convert labels to one-hot encoding
Y_train = tf.keras.utils.to_categorical(y_train)
Y_val = tf.keras.utils.to_categorical(y_val)
# Define a simple TensorFlow model
tf.keras.backend.clear_session()
model = tf.keras.Sequential(
    [
        # tf.keras.layers.Input(shape=(X_train.shape[1],)),  # Input (Functional API)
        tf.keras.layers.InputLayer(shape=(X_train.shape[1],)),
        tf.keras.layers.Dense(64, activation="relu"),
        tf.keras.layers.Dense(64, activation="relu"),
        tf.keras.layers.Dense(10, activation="softmax"),
    ]
)
# Compile the model
model.compile(
    optimizer="adam",
    loss="categorical_crossentropy",
    metrics=["accuracy"],
)
# Train the model
model.fit(
    X_train, Y_train, batch_size=32, epochs=2, validation_data=(X_val, Y_val), verbose=0
)
# Predict probabilities on the validation set
y_probas = model.predict(X_val)
# Plot the data
import matplotlib.pyplot as plt
import scikitplot as sp

# sp.get_logger().setLevel(sp.logging.WARNING)  # sp.logging == sp.logger
sp.logger.setLevel(sp.logger.INFO)  # default WARNING
# Plot precision-recall curves
sp.metrics.plot_precision_recall(
    y_val,
    y_probas,
)
quick_start_tf.png

Pretty.

Maximum flexibility. Compatibility with non-scikit-learn objects.

Although Scikit-plot is loosely based around the scikit-learn interface, you don't actually need scikit-learn objects to use the available functions. As long as you provide the functions what they're asking for, they'll happily draw the plots for you.

The possibilities are endless.

Release Notes

See the changelog for a history of notable changes to scikit-plots.

Contributing to Scikit-plots

Reporting a bug? Suggesting a feature? Want to add your own plot to the library? Visit our.

The Scikit-plots Project is made both by and for its users, so we welcome and encourage contributions of many kinds. Our goal is to keep this a positive, inclusive, successful, and growing community that abides by the Scikit-plots Community Code of Conduct.

For guidance on contributing to or submitting feedback for the Scikit-plots Project, see the contributions page. For contributing code specifically, the developer docs have a guide with a quickstart. There's also a summary of contribution guidelines.

Developing with Codespaces

GitHub Codespaces is a cloud development environment using Visual Studio Code in your browser. This is a convenient way to start developing Scikit-plots, using our dev container configured with the required packages. For help, see the GitHub Codespaces docs.

Governance (Acknowledging) Process and Citing Guide Scikit-plots

🔎 See the Governance Process, Citation Guide and the CITATION.bib, CITATION.cff files.

Cite all versions?

You can cite all versions by using the DOI 10.5281/zenodo.13367000 to https://doi.org/10.5281/zenodo.13367000. This DOI represents all versions, and will always resolve to the latest one. Read more about doi.

✍️ Citation Style APA:

Supporting the Project (Upcoming)

Powered by NumFOCUS Donate

NumFOCUS, a 501(c)(3) nonprofit in the United States.

License

Scikit-plots is licensed under a 3-clause BSD style license - see the LICENSE file, and LICENSES files.

About

An intuitive library that seamlessly adds plotting capabilities and functionality to any model objects or outputs, compatible with tools like scikit-learn, XGBoost, TensorFlow, and more.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

3 stars

Watchers

0 watching

Forks

Releases

Sponsor this project

Packages

Used by

Contributors

Languages