Registry / ai-ml / scikit-plot

scikit-plot

JSON →
library0.3.7pypypiunverified

Scikit-plot is an intuitive Python library (v0.3.7) that extends scikit-learn objects with easy-to-use plotting functionality. It aims to simplify the visualization of machine learning models and metrics, such as confusion matrices, ROC curves, and learning curves, with minimal boilerplate code. The library has had infrequent releases, with the latest stable version published in August 2018.

pip install scikit-plot
INSTALL
IMPORT
SIG · SCIKIT-PLOT
S
scikit-plot
ai-mlpythonv0.3.7
Install
13.5s avg
Import
Disk
370MB
Pass rate
5/ 10
Env Coverage5 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.3.7 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.920 runs
build_error
glibc
py 3.103.920 runs
installs and imports cleanly · install 13.5s · import 0.000s · 354MB
370MB installed
● package 370MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

scikitplot
import scikitplot as skplt
import scikitplot as skplt

This quickstart demonstrates how to train a RandomForestClassifier on the digits dataset and then use scikit-plot to visualize its normalized confusion matrix with a single function call. It shows the typical import pattern and the use of a common metric plotting function.

import matplotlib.pyplot as plt import scikitplot as skplt from sklearn.datasets import load_digits from sklearn.ensemble import RandomForestClassifier from sklearn.model_selection import train_test_split, cross_val_predict # Load dataset X, y = load_digits(return_X_y=True) # Split data (though cross_val_predict handles internal splits) X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.33, random_state=42) # Train a classifier clf = RandomForestClassifier(n_estimators=100, random_state=42) clf.fit(X_train, y_train) # Get predictions y_pred = clf.predict(X_test) # Plot confusion matrix skplt.metrics.plot_confusion_matrix(y_test, y_pred, normalize=True) plt.title('Normalized Confusion Matrix') plt.show()
Debug
Known issues
breakingThe Factory API, a previous way to instantiate plots, was deprecated in v0.3.0 and announced for removal in v0.4.0. Direct function calls from specific modules should be used instead.
fix
Migrate to the Functions API, importing plotting functions directly from `skplt.metrics`, `skplt.estimators`, `skplt.clusterer`, or `skplt.decomposition`.
affects: >=0.3.0
deprecatedFunctions `plot_precision_recall_curve` and `plot_roc_curve` were deprecated in v0.3.5. They have been replaced by `plot_precision_recall` and `plot_roc`, respectively, which offer more control over plotted curves.
fix
Replace `skplt.metrics.plot_precision_recall_curve` with `skplt.metrics.plot_precision_recall` and `skplt.metrics.plot_roc_curve` with `skplt.metrics.plot_roc`.
affects: >=0.3.5
deprecatedThe `scikitplot.plotters` module was deprecated in v0.3.0, and its functions were distributed to more specialized modules (e.g., `skplt.metrics`, `skplt.estimators`).
fix
Update import statements to directly reference the new module paths, e.g., `from scikitplot.metrics import plot_confusion_matrix` (or `import scikitplot as skplt; skplt.metrics.plot_confusion_matrix`).
affects: >=0.3.0
gotchaThe `spectral` colormap used internally was deprecated and changed to `nipy_spectral` in v0.3.2 to avoid Matplotlib warnings/errors.
fix
Upgrade to scikit-plot v0.3.2 or later, or manually specify a different colormap where applicable if using older versions.
affects: <0.3.2
gotchaAs of its latest release (v0.3.7, August 2018), `scikit-plot` was built for Python versions and `scikit-learn` versions prevalent at that time (e.g., Python 3.5-3.7). Using it with very recent Python or `scikit-learn` versions (e.g., Python 3.9+ or scikit-learn 1.0+) may lead to compatibility issues or require specific dependency pinning.
fix
Consider running `scikit-plot` within an environment that matches its original dependencies, typically Python 3.5-3.8 and a compatible `scikit-learn` version (e.g., <1.0). Alternatively, evaluate `scikit-plots` (note the plural), a potentially distinct and more recently maintained library with similar goals, if targeting newer Python environments.
affects: All versions
Upgrade
Version history
0.3.7latest on PyPI · released Aug 19, 2018
Audit
Dependencies
scikit-learnrequiredCore functionality, it extends scikit-learn estimators and objects for plotting.
matplotlibrequiredUsed for all plotting and visualization functionalities.
Agent activity
17 hits · last 30 days
node
12
Amazon
1
OpenAI (training)
1
Resources
scikit-plot — pip install scikit-plot · libregistry