Evaluating XGBoost with tidymodels
Learn how to evaluate cross-validation results of the XGBoost algorithm using tidymodels.
We'll cover the following
Cross-validation
Cross-validation is the best practice for evaluating the quality of machine learning models. XGBoost ensembles are no exception to this rule. The following code performs these processes:
Prepares the Titanic training data.
Specifies the XGBoost classification ensemble with hyperparameter tuning.
Creates a tuning grid.
Performs five-fold cross-validation for each row of the tuning grid.
Outputs the best ten combinations of hyperparameters in terms of accuracy, sensitivity, and specificity metrics.
Get hands-on with 1200+ tech skills courses.