XGBoost Best Iteration
问题 I am running a regression using the XGBoost Algorithm as, clf = XGBRegressor(eval_set = [(X_train, y_train), (X_val, y_val)], early_stopping_rounds = 10, n_estimators = 10, verbose = 50) clf.fit(X_train, y_train, verbose=False) print("Best Iteration: {}".format(clf.booster().best_iteration)) It correctly trains itself, but the print function raises the following error, TypeError: 'str' object is not callable How can I get the number of the best iteration of the model? Furthermore, how can I