Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: 'str' object is not callable #1

Open
sd-shukla opened this issue Oct 17, 2018 · 0 comments
Open

TypeError: 'str' object is not callable #1

sd-shukla opened this issue Oct 17, 2018 · 0 comments

Comments

@sd-shukla
Copy link

`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
`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant