Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save Tathagatd96/1f79fedf4f074312581611b7f86418ce to your computer and use it in GitHub Desktop.
Save Tathagatd96/1f79fedf4f074312581611b7f86418ce to your computer and use it in GitHub Desktop.
bst_grid = GridSearchCV (
estimator = XGBClassifier(**static_params),
param_grid = variable_params,
scoring = "accuracy"
)
bst_grid.fit(X_data, y_data)
print("Best Accuracy:{}".format(bst_grid.best_score_))
for key,value in bst_grid.best_params_.items():
print("{}:{}".format(key,value))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment