scikit-plots

Machine Learning Visualization in Python

  • Open source, commercially usable - BSD license
  •       Systems over Silos - SoS | Clarity over Complexity - CoC
  •     Reliability over Rush - RoR | Progress over Perfection - PoP
  • Better over Best - BoB | Value over Vanity - VoV

Dimensionality Reduction

Plotting the reducing the number of random variables to consider.

Applications: Visualization, increased efficiency.
Algorithms: Plots the 2-dimensional projection of PCA, Plots PCA components’ explained variance ratios, and more...

Tutorials

Metric Analysis

Model Evaluation: Metrics Performance Analysis.

Applications: Spam detection, image recognition.
Metrics: Feature Importances, ROC AUC Curves, Precision-Recall Curves, and more...

Tutorials

Decile-Wise Analysis

Model Evaluation: Decile-Based Performance Analysis.

Applications: Spam detection, image recognition.
Algorithms: Generates the KS Statistic plot, Generates the Cumulative Gains plot, Generates the Cumulative Gains plot, and more...

Tutorials

Statistical Analysis

Elegant quantitative analysis tools for clear, intuitive, and insightful data visualization and interpretation.

Applications: Selecting the bin width of histograms, Model Selection, Time Series Analysis...
Algorithms: Astrostatistics Tools, Tweedie Family, and more...

Tutorials

Array API Support (experimental)

The array API standard and specific compatibility functions for Numpy, CuPy and PyTorch is provided through `array-api-compat`.

Applications: Using the Array API standard to accelerate ML and DL model visualization.
Algorithms: and more...

Tutorials

Visualkeras

Visualize Keras (either standalone or included in tensorflow) neural network architectures.

Applications: ANN, CNN, NLP Tasks...
Algorithms: Graphical Visualization plot, Layered Visualization plot, and more...

Tutorials

Use the interactive shell to try scikit-plots in the browser.

🔔 Note: Pyodide (security note) uses older, compatible versions of some PyPI packages; latest versions may not be supported.

# Example code to try:
import micropip; await micropip.install("ipywidgets")
import io
import ipywidgets as widgets
import pandas as pd
from IPython.display import display
from sklearn.datasets import (
  load_breast_cancer as data_2_classes,
  load_iris as data_3_classes,
  load_digits as data_10_classes,
  make_classification,
)
upload = widgets.FileUpload(accept=".csv", multiple=False)
display(upload)

def process_file(change=None):
    if not upload.value:
        return
    file_info = next(iter(upload.value))
    return pd.read_csv(io.BytesIO(file_info["content"]))

upload.observe(
  process_file,
  names="value",
)

# Load the data
X, y = data_3_classes(return_X_y=True, as_frame=True)
X

To try the examples in the browser:

  • Type code in the input cell and press Shift + Enter to execute
  • Or copy-paste the code, and click on the Run button in the toolbar
  • Run micropip.list() to view installed packages.
# Check installed packages:
# import micropip; micropip.list()
df = process_file()
df

Adoptive Vanguards

Beyond the News

Meet the Community

Cite us!