scikit-plots
| Original author(s) | Reiichiro Nakano |
|---|---|
| Developer(s) | scikit-plots developers |
| Initial release | August 2024 |
| Written in | Python, Cython, C and C++ |
| Engine | |
| Operating system | Linux, macOS, Windows |
| Type | Library for machine learning |
| License | New BSD License |
| Website | scikit-plots |
Search Scikit-plots on Amazon.
| Part of a series on |
| Machine learning and data mining |
|---|
|
Problems |
|
Learning with humans |
|
Model diagnostics |
Template:Data visualization Template:Python sidebar
scikit-plots (formerly scikitplot) is a free and open-source machine learning library for the Python programming language.
scikit-plots is a Python library for creating visualizations related to machine learning workflows. It provides a set of tools for visualizing model performance, data distribution, and algorithm-specific insights, and is compatible with common Python data science libraries such as scikit-learn, NumPy, and pandas.
Overview
The project originated as an extension of earlier visualization utilities for machine learning and was officially released in 2024. It aims to make the evaluation and explanation of models more accessible by offering off-the-shelf plotting functions. Its design emphasizes usability and seamless integration with common data science tools and workflows.
Features
- Visualizations for supervised and unsupervised learning models
- Support for metrics such as ROC curves, precision-recall curves, and confusion matrices
- Tools for dimensionality reduction visualization (e.g., PCA, t-SNE)
- Diagnostic tools for regression and classification
- Support for plotting decile reports and cumulative gains
- Compatibility with Jupyter notebooks, standalone scripts, and automated reporting
- Utility methods for common data-science tasks, such as evaluate results
decileplot.
Examples
A minimal example of generating a decile-based performance report:
>>> import matplotlib.pyplot as plt
>>> import numpy as np; np.random.seed(0) # reproducibility
>>> import pandas as pd
>>> from sklearn.datasets import make_classification
>>> from sklearn.datasets import (
... load_breast_cancer as data_2_classes,
... load_iris as data_3_classes,
... load_digits as data_10_classes,
... )
>>> from sklearn.linear_model import LogisticRegression
>>> from sklearn.model_selection import train_test_split
>>> # Generate a sample dataset
>>> X, y = make_classification(
... n_samples=5000, n_features=20, n_informative=15,
... n_redundant=2, n_classes=2, n_repeated=0,
... class_sep=1.5, flip_y=0.01, weights=[0.85, 0.15],
... random_state=0
... )
>>> X_train, X_val, y_train, y_val = train_test_split(
... X, y, stratify=y, test_size=0.2, random_state=0
... )
>>> np.unique(y)
>>> model = (
... LogisticRegression(
... # max_iter=int(1e5),
... # C=10,
... # penalty='l1',
... # solver='liblinear',
... class_weight='balanced',
... random_state=0
... )
... .fit(X_train, y_train)
... )
>>> y_val_prob = model.predict_proba(X_val)
>>> df = pd.DataFrame({
... "y_true": y_val==1, # target class (0,1,2)
... "y_score": y_val_prob[:, 1], # target class (0,1,2)
... "y_pred": y_val_prob[:, 1] > 0.5, # target class (0,1,2)
... })
>>> import scikitplot.snsx as sp
>>> p = sp.decileplot(
... df,
... x="y_true",
... y="y_score",
... kind="report",
... n_deciles=10,
... digits=4,
... annot=True,
... verbose=True,
... )
Implementation
scikit-plots is largely written in Python, and uses scikit-learn, NumPy for vectorized operations and core numerical functionality. Advanced computation and performance-sensitive components may leverage Cython, and plotting functions integrate with libraries such as Matplotlib and Plotly.
scikit-plots integrates well with many other Python libraries, such as scikit-learn, Matplotlib and plotly for plotting, NumPy for array vectorization, Pandas dataframes, SciPy, and many more.
History
The original concept behind scikit-plots can be traced to the scikit-plot project, introduced by Reiichiro Nakano in 2018 as a helper library for visualizing scikit-learn models.[1] The library was later extended, renamed, and formalized under the scikit-plots name to accommodate more advanced visualization needs.
See also
scikit-learn, Matplotlib, Plotly, Pandas (software)
References
- ↑ Nakano, Reiichiro. "scikit-plot". GitHub. Archived from the original on 2025-09-19. Retrieved 2025-03-08. Unknown parameter
|url-status=ignored (help)
External links
Category:Data mining and machine learning software Category:Free statistical software Category:Python (programming language) scientific libraries Category:Software using the BSD license Category:2010 in artificial intelligence Category:2010 software
This article "Scikit-plots" is from Wikipedia. The list of its authors can be seen in its historical and/or the page Edithistory:Scikit-plots. Articles copied from Draft Namespace on Wikipedia could be seen on the Draft Namespace of Wikipedia and not main one.

