I trained a model using XGBClassifier, but when I try to get the score of features using get_score() function, it gives error : "TypeError: 'str' object is not callable". My code is as follows.
bst = xgb.XGBClassifier(**param).fit(X[tridx], Y[tridx])
preds = bst.predict_proba(X[teidx])
imps = bst.booster().get_score(importance_type='gain')
Traceback (most recent call last):
File "classify_metavisits_new.py", line 208, in <module>
main()
File "classify_metavisits_new.py", line 199, in main
classify_the_data (X, Y, metavisits_list)
File "classify_metavisits_new.py", line 161, in classify_the_data
imps = bst.booster().get_score(importance_type='gain')
TypeError: 'str' object is not callable
What should I do to fix it?