Python 2.7 xgboost模型getfscore:&x27;str';对象不可调用

Python 2.7 xgboost模型getfscore:&x27;str';对象不可调用,python-2.7,xgboost,callable,Python 2.7,Xgboost,Callable,我可以在pycharm中运行它,但是当我在pyspark中运行它时,有一个类型错误 谁能告诉我为什么?谢谢!将xgbPara.booster()替换为xgbPara.get\u booster(),如果这不起作用,您的版本不匹配,需要升级sklearn、xgboost或两者。希望这有帮助。谢谢,这解决了问题!很难找到关于何时更新的任何文档。 feat_imp = pd.Series(xgbPara.booster().get_fscore()).sort_values(ascending=Fal

我可以在pycharm中运行它,但是当我在pyspark中运行它时,有一个类型错误


谁能告诉我为什么?谢谢!

xgbPara.booster()
替换为
xgbPara.get\u booster()
,如果这不起作用,您的版本不匹配,需要升级sklearn、xgboost或两者。希望这有帮助。

谢谢,这解决了问题!很难找到关于何时更新的任何文档。
feat_imp = pd.Series(xgbPara.booster().get_fscore()).sort_values(ascending=False) 

TypeError: 'str' object is not callable