I\'m using xgboost to build a model, and try to find the importance of each feature using get_fscore(), but it returns {}
get_fscore()
{}
and my train code
For feature importance Try this:
Classification:
pd.DataFrame(bst.get_fscore().items(), columns=['feature','importance']).sort_values('importance', ascending=False)
Regression:
xgb.plot_importance(bst)