Description
`TypeError Traceback (most recent call last)
in ()
3 predictors = [x for x in train.columns if x not in [target, IDcol]]
4 xgb2 = XGBClassifier(learning_rate =0.1, n_estimators=1000, max_depth=5, min_child_weight=1, gamma=0, subsample=0.8,colsample_bytree=0.8, objective= 'binary:logistic', nthread=4, scale_pos_weight=1, seed=27)
----> 5 modelfit(xgb2, train, predictors)
in modelfit(alg, dtrain, predictors, useTrainCV, cv_folds, early_stopping_rounds)
20 print ("AUC Score (Train): %f" % metrics.roc_auc_score(dtrain['Loan_Status'], dtrain_predprob))
21
---> 22 feat_imp = pd.Series(alg.booster().get_fscore()).sort_values(ascending=False)
23 feat_imp.plot(kind='bar', title='Feature Importances')
24 plt.ylabel('Feature Importance Score')
TypeError: 'str' object is not callable
`