xgboost在做Feature Importance图时候,新旧版存在差异
发布日期:2021-06-24 18:46:06 浏览次数:2 分类:技术文章

本文共 551 字,大约阅读时间需要 1 分钟。

hot3.png

###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()”.

转载于:https://my.oschina.net/kyo4321/blog/2254872

转载地址:https://blog.csdn.net/weixin_34248258/article/details/91902527 如侵犯您的版权,请留言回复原文章的地址,我们会给您删除此文章,给您带来不便请您谅解!

上一篇:AngularJS 笔记
下一篇:关于java.util.concurrent.Callable来实现线程之间的控制

发表评论

最新留言

能坚持,总会有不一样的收获!
[***.219.124.196]2024年04月22日 19时45分31秒