Grid Search and Random Search
GridSearchCV, RandomizedSearchCV, param_grid design, refitting on best params.
Why Tune Hyperparameters
Models have hyperparameters (like max_depth or C) that are not learned from data but set before training. The right values can hugely improve performance, so we search for them systematically.
Manual Tuning Is Error-Prone
Trying values by hand is slow and easy to bias. Automated search combined with cross-validation evaluates each candidate fairly and finds the best combination reproducibly.
All lessons in this course
- Cross-Validation Strategies
- Classification Metrics Deep Dive
- Grid Search and Random Search
- Bayesian Optimization with Optuna