You tune XGBoost with 200 trials on GPUs. Which approach finds good settings efficiently?
- Exam domain
- Machine Learning15% of the exam
- Difficulty
- Medium
- In this mock
- 7 questions on this domainPractise this domain
Why the exam asks this
Machine Learning (15% of the exam)
Objective in the exam guide: Optimizing hyperparameters of machine learning models
Hyperparameter optimization is named.
Why B is the answer
Bayesian or random search with early stopping on validation data
Bayesian or random search explores many settings within the budget, and early stopping ends weak trials quickly. A full grid of 10^8 points is impossible.
Remember: Use guided search with early stopping.
How it works
Hyperparameter optimization uses random or Bayesian search, often in parallel on GPUs.
In detail
- Random or Bayesian search.
- Early stopping saves time.
Every option, checked
Knowing why each wrong option fails is how you rule it out on exam day.
A. Changing settings by hand until boredWrong
Manual tuning is slow and biased.
B. Bayesian or random search with early stopping on validation dataRight
Use guided search with early stopping.
C. A full grid with ten values for each of eight parametersWrongMost tempting
That grid has 100 million combinations.
Why it tempts: Grids feel complete.
D. Tuning on the test setWrong
Test-set tuning leaks.
Use case
An illustrative scenario, not a real incident.
Illustrative: 200 Bayesian trials on 4 GPUs finish in an hour and beat the default by 0.03 AUC.
See it in different ways
flowchart LR S0["Define ranges"] --> S1["Sample trial"] --> S2["Train with early stopping"] --> S3["Record score"] --> S4["Update search"]
How to read this chart
- Read it in order: Define ranges, then Sample trial, then Train with early stopping, then Record score, then Update search.
mindmap
root(("Search"))
n1["Grid"]
n2["Exhaustive"]
n3["Random"]
n4["Sampled"]
n5["Bayesian"]
n6["Model of past trials"]How to read this chart
- The centre is "Search".
- "Grid" covers "Exhaustive".
- "Random" covers "Sampled".
- "Bayesian" covers "Model of past trials".
Related questions
Learn more
- Our lesson: Machine learning at scale
- Practise Machine Learning questions in the mock exam
- Source: Tuning the hyper-parameters of an estimator (scikit-learn)
- Source: XGBoost GPU support
- XGBoost GPU support
- cuML documentation (RAPIDS)
- Tuning the hyper-parameters of an estimator (scikit-learn)
- Train With Mixed Precision (NVIDIA Docs)