Importance de l'intrigue XGB Round
# Get the booster from the xgbmodel
booster = xg_reg.get_booster()
# Get the importance dictionary (by gain) from the booster
importance = booster.get_score(importance_type="gain")
# make your changes
for key in importance.keys():
importance[key] = round(importance[key],2)
# provide the importance dictionary to the plotting function
ax = plot_importance(importance, max_num_features=3, importance_type='gain', show_values=True)
Real Raccoon