
You're comparing several candidate models for a supervised learning task and want to improve generalization without overfitting. You need a structured way to choose hyperparameters rather than relying on ad hoc trial and error.
How would you tune hyperparameters for a machine learning model?