Quantcast
Channel: Data Science, Analytics and Big Data discussions - Latest topics
Viewing all articles
Browse latest Browse all 4448

XGBoost Plot performance in Python

$
0
0

@FaguiCurtain wrote:

following the instructions from https://xgboost.readthedocs.io/en/latest/python/python_intro.html

after building my model, i tried on Jupyter (using Mac OS X, Chrome browser)

import matplotlib.pyplot as plt 
plt.style.use('ggplot') 
xgb.plot_importance(bst) 
xgb.plot_tree(bst, num_trees=2) 
xgb.to_graphviz(bst, num_trees=2)

but i have some problems: the to_graphviz does return me a plot, but its too big, and i can't see it whole. Its cut on the right side

the first two commands (if i put a # in front of the last line) don't show any plot at all. is there something like a.show() missing ?

Instead i get the following output

"matplotlib.axes._subplots.AxesSubplot at 0x12f0ee7d0" (between <>)
can anyone help ? thank you

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 4448

Trending Articles