Registry / ai-ml / yellowbrick

yellowbrick

JSON →
library1.5pypypiunverified

Yellowbrick is a Python library that extends the scikit-learn API with a suite of visual analysis and diagnostic tools for machine learning. It allows users to visualize model performance, feature relationships, and evaluate model selection processes directly within their existing scikit-learn workflows. The library is currently at version 1.5 and historically has had a release cadence of several major updates per year, though the latest release (v1.5) is from August 2022.

ai-mltesting
Install & Compatibility
Where this runs
tested against v1.5 · 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.940 runs
build_error
glibc
py 3.103.940 runs
installs and imports cleanly · install 13.4s · import 3.611s · 357MB
372MB installed
● package 372MB
Code
Verified usage

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

from yellowbrick.cluster import KElbowVisualizer

This example demonstrates how to use the `KElbowVisualizer` to determine the optimal number of clusters for a KMeans model using synthetic data. It fits the visualizer to the data and then displays the resulting elbow plot.

from yellowbrick.cluster import KElbowVisualizer from sklearn.cluster import KMeans from sklearn.datasets import make_blobs # Generate synthetic dataset X, y = make_blobs(n_samples=1000, n_features=12, centers=8, random_state=42) # Instantiate the clustering model and visualizer model = KMeans(random_state=42, n_init=10) # n_init added for KMeans > sklearn 1.2 visualizer = KElbowVisualizer(model, k=(2,12)) visualizer.fit(X) # Fit the data to the visualizer visualizer.show() # Finalize and render the figure
Debug
Known footguns
breakingThe `poof()` method for rendering visualizers was deprecated in v1.0.1 and subsequently removed. It was replaced by `show()`.
breakingYellowbrick dropped support for Python 2.x with the release of v1.0.
gotchaYellowbrick frequently updates to maintain compatibility with rapidly evolving upstream libraries like scikit-learn, NumPy, SciPy, and Matplotlib. Specific versions of these dependencies can be required.
breakingThe internal `set_params` and `get_params` API for `ModelVisualizers` changed to align with `scikit-learn` v1.0+.
gotchaThe `nltk` library and its associated data are required for text-based visualizers (e.g., `FreqDistVisualizer`, `WordCorrelationPlot`) but are not installed by default with `pip install yellowbrick`.
Upgrade
Version history

Breaking-change detection hasn't run for this library yet.

Audit
Security & dependencies

CVE tracking and dependency tree are planned for a later release.

Agent activity
11 hits · last 30 days
ahrefsbot
4
dotbot
1
script
1
chatgpt-user
1
Resources