feat_imp = pd.Series(xgbPara.booster().get_fscore()).sort_values(ascending=False)
TypeError: 'str' object is not callable
I can run it in pycharm, but when I run it in pyspark, there is a Type Error.
could anyone tell me why? Thanks!
Replace xgbPara.booster()
with xgbPara.get_booster()
, if that wont work, you have a version mismatch and you need to upgrade either sklearn, xgboost or both. Hope this helps.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With