We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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 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 `
The text was updated successfully, but these errors were encountered:
Its a data type issue when you learn data type you can solve such type of issues you can also used chat gpt to solve this issue it can solve easliy
Sorry, something went wrong.
No branches or pull requests
`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
`
The text was updated successfully, but these errors were encountered: