-
Notifications
You must be signed in to change notification settings - Fork 31
Description
I'm just following the tutorial on your github page. When I hit sml.plot.xgb_importance() method, I get below error
python3.6\lib\site-packages\speedml\plot.py in xgb_importance(self)
145 X = X.drop([Base.target], axis=1)
146 self._create_feature_map(X.columns)
--> 147 fscore = Base.xgb_model.booster.get_fscore(fmap=Base._config['outpath'] + 'xgb.fmap')
148 self._plot_importance(list(fscore.keys()), list(fscore.values()))
AttributeError: 'str' object has no attribute 'get_fscore'
pdb Base.xgb_model below
XGBClassifier(base_score=0.5, booster='gbtree', colsample_bylevel=1,
colsample_bytree=0.8, gamma=0, learning_rate=0.1, max_delta_step=0,
max_depth=3, min_child_weight=1, missing=None, n_estimators=17,
nthread=-1, objective='binary:logistic', reg_alpha=0, reg_lambda=1,
scale_pos_weight=1, seed=0, silent=True, subsample=0.8)
booster is a string and not xgboost module
It is not clear how to resolve the issue. Python version 3.6, speedml version 0.9, xgboost version 0.6, running on Windows 10 with Jupyter notebook