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
1
vote
2 answers

Plot Learning Curve of CatBoostClassifier with Yellowbrick

I'm trying to plot a learning curve for the CatBoostClassifier. The error occurs when I fit the CatBoostClassifier into LearningCurve from yellowbrick. I think this should work since CatBoost is sklearn compatible and yellow brick is a sklearn…
Diogo Silva
  • 320
  • 2
  • 14
1
vote
1 answer

Can we use numpy array confusion matrix in Yellowbrick visualization

I was excited by the machine learning models visualization yellowbric, and wanted to visualize the confusion matrix. I have obtained the confusion using LOF algorithm using scikit learn (this is not implemented in yellowbrick) Apparently yellowbrick…
BhishanPoudel
  • 15,974
  • 21
  • 108
  • 169
1
vote
1 answer

How to change the font size and position of legend in ROCAUC in yellowbrick, micoro avg and macro avg. How do I make the two lines different?

I used ROCAUC in yellowbrick. I want to change the font size and position of the legend. What should I do? Micro average and macro average appear in the same line color. Is there a way to make the two lines different? from yellowbrick.classifier…
권영석
  • 11
  • 1
1
vote
1 answer

yellowbrick t-SNE fit raises ValueError

I am trying to visualize data with t-SNE from the yellowbrick package. And I am getting an error. import pandas as pd from yellowbrick.text import TSNEVisualizer from sklearn.datasets import make_classification ## produce random data X, y =…
galapah
  • 379
  • 1
  • 2
  • 14
0
votes
0 answers

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 yellowbrick.cluster import…
0
votes
0 answers

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.model_selection import ( learning_curve, …
z987
  • 1
  • 2
0
votes
0 answers

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. X_normalized, y_for_normalized = scaled_df[[ "Part's…
z987
  • 1
  • 2
0
votes
0 answers

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.score(x, y0)) results0=clf.predict(x) …
0
votes
0 answers

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 example code in the documentation uses R^2, so…
Katsu
  • 8,479
  • 3
  • 15
  • 16
0
votes
0 answers

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 follow some of the directions provided in threads…
SRK
  • 1
  • 1
0
votes
0 answers

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 load_concrete from yellowbrick.regressor import…
JoseRA
  • 1
  • 1
0
votes
0 answers

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 extract_features, extract_relevant_features,…
0
votes
0 answers

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 import SilhouetteVisualizer from…
0
votes
0 answers

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 provides the following error for the fuzzy…
0
votes
0 answers

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 features as 49. xgboost_base_model =…