[doc] Fix typos in code (#10023)

change `resutls` to `results`
This commit is contained in:
Ammar Azman 2024-01-31 15:18:16 +08:00 committed by GitHub
parent 5e00a71671
commit c53d59f8db
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -104,7 +104,7 @@ using cross validation with early stopping, here is a snippet to begin with:
clf = xgb.XGBClassifier(tree_method="hist", early_stopping_rounds=3) clf = xgb.XGBClassifier(tree_method="hist", early_stopping_rounds=3)
resutls = {} results = {}
for train, test in cv.split(X, y): for train, test in cv.split(X, y):
X_train = X[train] X_train = X[train]
@ -114,7 +114,7 @@ using cross validation with early stopping, here is a snippet to begin with:
est, train_score, test_score = fit_and_score( est, train_score, test_score = fit_and_score(
clone(clf), X_train, X_test, y_train, y_test clone(clf), X_train, X_test, y_train, y_test
) )
resutls[est] = (train_score, test_score) results[est] = (train_score, test_score)
*********************************** ***********************************