Questions tagged [yellowbrick]

Yellowbrick is a Python visualization library for machine learning. It extends the Scikit-Learn API to provide visual diagnostic tools for classifiers, regressors, clusterers, transformers, pipelines, feature extraction tools and more. This tag should be used to ask questions about how to use visualizers, how to extend or modify visualizations, or how to interpret diagnostics. This tag is commonly used with the scikit-learn and matplotlib tags.

Yellowbrick (sometimes referred to as scikit-yellowbrick) is a Python library that extends the Scikit-Learn API to enhance the machine learning workflow with visual diagnostics with matplotlib. The yellowbrick tag is therefore usually applied in combination with the scikit-learn, python, and matplotlib tags. Good questions for this tag include:

  1. Questions about how to work with or extend existing visualizers
  2. Questions about how to interpret visual results
  3. Questions about how to modify resulting figures or annotate them
  4. Questions about how to create new visualizers

The best questions will include a code example along with the figure being generated by Yellowbrick. In order to allow others to run your code, if the visualization is not data specific (e.g. the questions is not the result of specific input), please use one of the example datasets from the Yellowbrick tutorial or one of Scikit-Learn's dataset generation methods. It is also very helpful if you include the version of Yellowbrick you're using, which can be found with print(yellowbrick.__version__).

For result interpretation questions, please be as general as possible and focused on the content of the visualizer. For example, a good question is "what is the meaning of the macro-average curve on ROC/AUC with more than two classes?" A poor question is "how do I make my model have a higher F1 score?"

Finally, for both folks asking questions and those responding, Yellowbrick contributors and developers take seriously respectful discourse. In addition to be nice, the StackExchange code of conduct, Yellowbrick also follows the Python Software Foundation Code of Conduct

Definitions

Yellowbrick extends the Scikit-Learn API with a new Estimator called a Visualizer. Visualizers are estimators, in that they can be fit with data in order to produce a visualization. Anything that produces a visualization in Yellowbrick is a Visualizer, though there are different types.

A FeatureVisualizer produces a representation of the feature space or data space. These are used to explore the input to models or the relationship of data to the model.

A ModelVisualizer produces a representation of the model space, describing how the model interacts with data or behaves. It does this in two ways, by describing internal parameters of the model, or by describing the relationship to test data with a ScoreVisualizer.

73 questions
0
votes
1 answer

How can I labeled the X axis and Y axis in yellowbrick plot? The code is I used is show below

How can I labeled the X axis and Y axis in yellowbrick plot? The code is I used is show below. from yellowbrick.regressor import PredictionError Visualizer =…
0
votes
0 answers

Yellowbrick Silhouette Visualizer without fitting KMeans

I was hoping someone could help me get a the silhouette visualizer to work/show, without having to pass the model. Under their documentation the following must be supplied: # Instantiate the clustering model and visualizer model = KMeans(5,…
Plewis
  • 119
  • 10
0
votes
2 answers

How to resolve "Not Fitted" error in YellowBrick SilhouetteVisualizer?

I was trying to use the SilhouetteVisualizer function in YellowBrick to create a silhouette plot for kmeans clustering, but I keep getting the error below. I didn't encounter this issue when I applied the KElbowVisualizer function (in YellowBrick)…
clpoh
  • 1
  • 1
0
votes
1 answer

Increase font size of title, labels and legend for Yellowbrick Parallel Coordinates Plot

I'm using a Parallel Coordinates plot, and I wish to increase the font size of the Axis Labels, Legend and Title, can someone help me out? Here's what I have: from sklearn import datasets from yellowbrick.features import ParallelCoordinates iris =…
Plewis
  • 119
  • 10
0
votes
1 answer

Yellowbrick: PredictionError dimensionality issue

I'm trying to use the yellowbrick PredictionError and am running into strange dimensionality issues. I am using yellowbrick version 1.4. Suppose we had this very simple linear regression: import pandas as pd import numpy as np import matplotlib as…
sparc_spread
  • 10,643
  • 11
  • 45
  • 59
0
votes
1 answer

How to get the best K for self organizing maps "SOM" using Elbow method?

I am trying to use SOM to cluster my data, firstly I want to get the best K. but I need a line or something to detect the best K on the plot. I tried to use KElbowVisualizer() but it always diplay an error: YellowbrickTypeError: The supplied model…
0
votes
1 answer

Yellowbrick: is it possible to pass in different pairwise distance metrics for scoring methods

sklearn defines a large number of pairwise distance metrics for something like silhouette score: https://scikit-learn.org/stable/modules/generated/sklearn.metrics.pairwise_distances.html For e.g. it can be initiated with any of these distance…
plamb
  • 5,636
  • 1
  • 18
  • 31
0
votes
1 answer

Issue with the prediction error plot using the yellowbrick library (regression)

I have three models for regression: linear regression: using ols_regressor = sm.OLS() random forest: using rf = RandomForestRegressor() artificial neural network: using tensorflow and keras I would like to plot a prediction error plot for the…
Joehat
  • 979
  • 1
  • 9
  • 36
0
votes
1 answer

Adjust figure yellow bricks model - python

I am trying to adjust the axes limits on a yellow bricks figure. However, I can't seem to adjust it. I can change axes labels and titles but not the limits. It works if I don't render the figure with visualizer.show() but then I lose labels, titles,…
Chopin
  • 96
  • 1
  • 10
  • 35
0
votes
1 answer

ROCAUC legend and x/y-axis font size using Yellowbrick

I am using Yellowbrick ROCAUC. The plot font size (legend and x/y axis) is very small. Is there a way to increase the font size of the ROCAUC plot? model = clf visualizer = ROCAUC(model) visualizer.fit(X_train, y_train) …
user
  • 5
  • 3
0
votes
1 answer

yellowbrick implementation error - AttributeError: 'LogisticRegression' object has no attribute 'fig'

I am a new user for yellowbrick. While implementing a sklearn LogisticRegression API in yellowbrick ClassificationReport, I found some unusual error. I have tried many syntaxes as suggested by yellowbrick official document as well as in most data…
gopinath
  • 13
  • 4
0
votes
1 answer

How do I get ybsql results to load without requiring hitting the enter button repeatedly?

We're using ybsql now via command prompt. If a ybsl query has more than x results, it's requiring me to hit enter while being prompted with '-- More --'. I just want it to load all results of the query. right now, it's only loading 65 rows of…
king53214
  • 1
  • 2
0
votes
1 answer

yellowbrick.model_selection does not work for Regression but works for Classification

I have a dataframe df which has spotify data features. When I run the model using RandomForestClassifier I get the feature important plot but when I run RandomForestRegressor I get only a bar against the popularity. Can someone help? from…
unaied
  • 197
  • 11
0
votes
1 answer

Cannot import Silhouette Visualizer - tried almost everything

I am trying to import Silhouette Visualizer and always get some errors, I have already updated the version of python and pip and tried uninstalling and installing scikit-learn and nothing works. I am getting this error:
0
votes
1 answer

change title in a dispersion plot created with yellowbrick

I would like to change the title of the dispersion plot created using yellowbrick: I use the following code: wl = [] with open('my-text.txt', 'r', encoding='utf8') as f: wl = f.read().split() topics =…