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.

Filter by
Sorted by
Tagged with
0 votes
0 answers
58 views

Why is InterClusterDistance from yellowbrick failing with "AttributeError: 'NoneType' object has no attribute '_get_renderer'"

I am trying to initialize a InterClusterDistance visualizer from the yellowbrick library. When I execute the following: from sklearn.datasets import make_blobs from sklearn.cluster import KMeans from ...
Data guy's user avatar
0 votes
0 answers
30 views

How can I change the location of my legend

I am using yellowbrick to generate my learning curve. How can I change the location of my legend? I have tried the following with no luck: plt.legend(loc="upper left") from yellowbrick....
z987's user avatar
  • 1
0 votes
0 answers
20 views

change the y axis label

I am trying to plot the learning curve using yellowbrick library (https://www.scikit-yb.org/en/latest/api/model_selection/learning_curve.html). How can I change the label for the y axis? Thanks. ...
z987's user avatar
  • 1
0 votes
0 answers
44 views

Neither visualizer 'ROCAUC' nor wrapped estimator 'RandomForestClassifier' have attribute 'target_type_'

I get the error of the title from the following code: clf = RandomForestClassifier(n_estimators=n_tree, max_depth=depth_tree, class_weight='balanced') clf.fit(x, y0) compl.append(clf....
Francesco Zonta's user avatar
0 votes
0 answers
34 views

How to flip the MSE Loss in Yellowbrick's ValidationCurve?

I am plotting Validation Curves using the Yellowbrick package here. I am using a Regressor model, and so naturally, my score of interest is MSE (or neg_mean_squared_error as the actual parameter). The ...
Katsu's user avatar
  • 8,509
0 votes
0 answers
110 views

Error while trying to import 'KElbowVisualizer' and 'SilhouetteVisualizer' from the 'yellowbrick.model_selection' module

I tried to install KElbowVisualizer and SilhouetteVisualizer from the yellowbrick.model_selection module as well as yellowbrick.cluster module . However, I'm facing the following problem. I tried to ...
SRK's user avatar
  • 1
0 votes
0 answers
46 views

Customize the secondary axis of a residuals plot in Yellowbrick

I am doing a residuals plot in yellowbrick, the code could be the same from sklearn.linear_model import Ridge from sklearn.model_selection import train_test_split from yellowbrick.datasets import ...
JoseRA's user avatar
  • 1
0 votes
0 answers
101 views

Sklearn yellowbrick classification_report could not decode y values into labels

I'm following this example from tsfresh: Multiclass . It is a classification example using feature extraction and a decision tree classifier. import matplotlib.pylab as plt from tsfresh import ...
kolrocket's user avatar
0 votes
0 answers
133 views

AttributeError: 'NoneType' object has no attribute 'split' in Yellowbrick Visualizer

I want to create a silhouette visualization with SilhouetteVisualizer (I use VSCode) but got this message: AttributeError: 'NoneType' object has no attribute 'split' Code is : from yellowbrick.cluster ...
Arc Angel's user avatar
0 votes
0 answers
67 views

How to solve YellowbrickTypeError: The supplied model is not a clustering estimator; try a classifier or regression score visualizer instead?

I am trying to visualize the silhouette score for the fuzzy c-means clustering method using yellowbrick's silhouette visualizer. This same code works perfectly fine for k-means clustering. However, it ...
Jyoti's user avatar
  • 35
1 vote
1 answer
112 views

yellowbrick module instalation affects matplotlib fonts avaliable

After instalation and import of yellowbrick module matplotlib can't find some of the fonts for its labels and titles like Arial, Liberation Sans, Bitstream Vera Sans, sans-serif the following warning ...
guilistocco's user avatar
0 votes
0 answers
99 views

Why RFECV visualizer from yellowbrick finds number of optimal features more than number of features in train set?

I am trying to perform feature selection and to use RFECV from yellowbrick.model_selection. I have 48 features in my train set. But when I run the code in below, the visualizer finds number of ...
ds_giz's user avatar
  • 1
0 votes
1 answer
78 views

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 = PredictionError(LL_dt) Visualizer.fit(...
Ningthoujam Jibanchand's user avatar
0 votes
0 answers
146 views

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 ...
Plewis's user avatar
  • 119
0 votes
2 answers
205 views

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 ...
clpoh's user avatar
  • 1
-2 votes
1 answer
88 views

How to change xtick of Yellowbrick's Learning Curve visualizer?

I'm trying to change the xtick of Yellowbrick's learning curve figure from number of samples to normalized number(%) of samples. I googled a lot but couldn't find the way.
Leena Kim's user avatar
1 vote
2 answers
729 views

AttributeError: 'KMeans' object has no attribute 'k'

I know there is an exactly similar question [here]. But it doesn't work for me, and another guy found it incorrect, as stated in the answer's comment. Although, the OP (who also answered his question) ...
Shayan's user avatar
  • 5,213
1 vote
1 answer
198 views

Unable to install Yellowbrick or Pipenv on Conda on Windows: infinite package conflicts

I have recently installed Anaconda3 on my Windows machine. I need to install Yellowbrick and followed their instructions on the quickstart page. Conda is not on my system's PATH, according to ...
Otávio Monteagudo's user avatar
1 vote
1 answer
232 views

Highlighting specific data points for parallel coordinates plot

I'm looking for help to highlight/color particular data points on the parallel coordinates plot. I can't seem to find a way that work. Essentially, I want to plot all the data as below, and then take, ...
Plewis's user avatar
  • 119
0 votes
1 answer
412 views

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 ...
Plewis's user avatar
  • 119
0 votes
1 answer
174 views

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 ...
sparc_spread's user avatar
  • 10.7k
2 votes
1 answer
234 views

Attempting to see the Discrimination Threshold Plot for Fitted models

I'm trying to use the Discriminationthreshold Visualizer for my fitted models; They're all binary classifiers (logistic regression, lightgbm, and xgbclassifier) however, based on the documentation I ...
data_newbie14's user avatar
3 votes
2 answers
2k views

error 'RandomForestClassifier' object has no attribute 'target_type_'

when I run this piece of code: from yellowbrick.classifier import ROCAUC from sklearn.ensemble import RandomForestClassifier rf = RandomForestClassifier(**{"max_features": 0.4, "...
mab66's user avatar
  • 31
0 votes
1 answer
387 views

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 ...
HadyKh's user avatar
  • 43
0 votes
1 answer
77 views

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 ...
plamb's user avatar
  • 5,636
4 votes
1 answer
2k views

Extracting k from Yellow brick KElbowVisualizer

I am trying to extract the value of k from Yellow brick KElbowVisualizer visualizer for further processing. I can see the k value on the visualization, but I cannot seem to extract it and put in a ...
Marius's user avatar
  • 41
1 vote
1 answer
96 views

How can I use yellowbrick on the output of non-scikit models

How can I use yellowbrick on the output of non-Scikit models? I have a PyTorch multi-class classifier network and would like to use the ClassificationReport functionality on the results of applying ...
Dave's user avatar
  • 7,565
0 votes
1 answer
256 views

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 ...
Joehat's user avatar
  • 999
0 votes
1 answer
198 views

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 ...
Chopin's user avatar
  • 74
1 vote
1 answer
471 views

YellowbrickTypeError for Keras Model: This estimator is not a classifier; try a regression or clustering score visualizer instead

I have the following Keras DNN model and have imported necessary Keras & Yellowbrick libraries: optimizer = RMSprop(0.001) finalDNNModel_wrap = KerasClassifier(build_fn=parkOptimalDNN(optimizer), ...
Bil's user avatar
  • 11
0 votes
1 answer
190 views

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....
user's user avatar
  • 5
-2 votes
1 answer
230 views

How to remove the title from yellowbrick ROCAUC

I am using yellowbrick to plot the AUCROC. I want to remove the title from the plot, to make it empty without the plot title. model = classifier visualizer = ROCAUC(model, encoder={0: 'class' , 1: '...
user's user avatar
  • 5
4 votes
0 answers
555 views

AttributeError: 'XGBRegressor' object has no attribute 'line_color'

Find below the code I used to create the residuals_plot from yellowbrick package. I ran the xgbregressor model, predicted the results and tried to create the residuals plot. The plot came out properly,...
Dayakar Malgari's user avatar
0 votes
1 answer
825 views

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 ...
gopinath's user avatar
0 votes
1 answer
91 views

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 ...
king53214's user avatar
1 vote
0 answers
49 views

How to change the marker in yellowbrick plots?

As the title suggests, I have some trouble changing the marker style in some of the Yellowbrick plots. For instance, I know it is possible to do so for the ScatterVisualiser, but I would like to do ...
Burger Bob's user avatar
0 votes
1 answer
186 views

How to change font size in yellowbrick classification report?

See classification report produced by the code below. The text for the class labels, scores, and color bar are way too big. How can I make the text smaller? for name, model in final_models: ...
srvguitarist's user avatar
1 vote
1 answer
514 views

KElbowvisualizer Re-Formatting other Plots

I randomly selected a number of clusters to plot my dataset with to see the distribution and then I went back and visualized the optimal # of clusters to use with my dataset by using KElbowvisualizer. ...
Cam's user avatar
  • 111
0 votes
1 answer
205 views

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 ...
unaied's user avatar
  • 197
0 votes
1 answer
965 views

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 ...
Anna Sikora's user avatar
8 votes
3 answers
11k views

YellowBrick ImportError: cannot import name 'safe_indexing' from 'sklearn.utils'

I'm trying to plot a silhouette plot for a K-Means model I've run, however, I get the error: ImportError: cannot import name 'safe_indexing' from 'sklearn.utils. I was initially getting the ...
softmax55's user avatar
  • 548
0 votes
1 answer
139 views

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() ...
sschron's user avatar
1 vote
3 answers
5k views

Yellowbrick Module NotFoundError in Python

I am trying to using Yellowbrick to make an elbow plot.(to make the k-means clustering) I have installed Yellowbrick in jupyter notebook. but, it keeps returning the error message like below. The ...
한솔지's user avatar
1 vote
2 answers
1k views

Cannot import installed python library yellowbrick to jupyter notebook

I installed the yellowbrick python library using pip "install yellowbrick". It was installed, but jupyter notebook cannot import the library. When it imports, results show "No module ...
Udishan's user avatar
  • 135
2 votes
1 answer
464 views

Scikit-learn and Yellowbrick giving different scores

I am using sklearn to compute the average precision and roc_auc of a classifier and yellowbrick to plot the roc_auc and precision-recall curves. The problem is that the packages give different scores ...
Slevin_42's user avatar
5 votes
2 answers
1k views

Pandas dataframe divide features to group of high correlation

I have a dataframe with over 280 features. I ran correlation map to detect groups of features that are highly correlated: Now, I want to divide the features to groups, such that each group will be a &...
Cranjis's user avatar
  • 1,610
0 votes
2 answers
282 views

Is there any way to connect to Yellowbrick database in Azure Data Factory

I wanted to connect to Yellowbrick(YB) database (Postgresql) as a source in the Azure Data Factory. The YB instance is on the cloud. And I had set the encryption to 'No Encryption'. In the server name,...
Daxesh Radadiya's user avatar
1 vote
1 answer
209 views

How to combine 2 plots in 1 cell, Python?

Could you change my code in this way so as to have these 2 plots alongside, means in 1 row and 2 column (subplot nrows=1, ncols=2) ? Currently I have these charts in 2 separate cells, and I want to ...
dingaro's user avatar
  • 2,156
0 votes
1 answer
333 views

Yellowbrick learningCurve: chage legend

I want to plot the learning curve of train and validation set using yellowbrick learning curve. I am not using cross validation when plotting the learning curve, but a hold out validation set. Anyway, ...
nopact's user avatar
  • 195
0 votes
1 answer
2k views

How to change axis labels when using YellowBrick's KElbowVisualizer?

I am using the following code to create a silhouette coefficient plot with KElbowVisualizer: # Import the KElbowVisualizer method # Instantiate a scikit-learn K-Means model model = KMeans(...
Thelonious Monk's user avatar