from xgboost import plot_importance
from matplotlib import pyplot
plot_importance(model)
pyplot.show()
I got 150 features fitted into xgboost model and want to print out all the feature importance, however something mess printed out.
from xgboost import plot_importance
from matplotlib import pyplot
plot_importance(model)
pyplot.show()
I got 150 features fitted into xgboost model and want to print out all the feature importance, however something mess printed out.
You could either only plot the most important features with
plot_importance(model, max_num_features=10)
or you could increase the plot size with
fig, ax = plt.subplots(figsize=(h, w))
xgboost.plot_importance(model, ax=ax)
as described in How to change size of plot in xgboost.plot_importance?.