###xgboost在做Feature Importance图时候,新旧版存在差异https://blog.csdn.net/u013313168/article/details/80911422旧版用alg.booster().get_fscore()新版用alg.get_booster().get_fscore()否则会报错 File "", line 1, in modelfit(xgb1, train, predictors) File " ", line 22, in modelfit feat_imp = pd.Series(alg.booster().get_fscore()).sort_values(ascending=False)TypeError: 'str' object is not callable解决方案: 使用 “alg.get_booster().get_fscore()” 代替 “alg.booster().get_fscore()”.