Search code examples
python-3.xyellowbrick

Changing Yellowbrick visiualization colors


In Yellowbrick visiualization library, the default color for the classification report is red: from lighter to darker tones. Is there a way to change this color and use green, blue, etc.?


Solution

  • when defining the visualizer, you can set a color sequence(cmap).

    viz = ClassificationReport(model,  cmap='PuRd')
    viz.score(X_test, y_test)
    

    PurpletoRedReport

    You can find the different color sequences at

    http://www.scikit-yb.org/en/latest/api/palettes.html#color-sequences