Hyperparameter Tuning
Hyperparameter Tuning
Machine Learning
Hyperparameter Tuning
Hyperparameter Tuning
• Models have internal and external parameters.
• External parameters are called hyperparameters that need to be set
for model to perform optimally
• Internal parameters are taken care by the model itself.
• Hyperparameters generally control the over-fitting and under-fitting
of the model. Optimal hyperparameters often differ for different
datasets.
• For each proposed hyperparameter setting, the model is evaluated
• The hyperparameters that give the best model are selected
1
11-08-2024
Hyperparameter Tuning
Hyperparameters Search
• Grid Search: It picks a grid of hyperparameter values and evaluates each of
them, one at a time. Min and max of each hyperparameter must be defined,
basing on the educated guess.
• Method: GridSearchCV
• Random Search: It chooses the hyperparameter sample combinations
randomly from the grid space, in contrast to Grid Search that tries with every
possible combination supplied to the algorithm. It is very effective in practice
as it reduces computational time but there is not guarantee that we will find
the best result like Grid Search.
• Method: RandomizedSearchCV
• URL: https://www.geeksforgeeks.org/hyperparameter-tuning/
• Complete List: https://neptune.ai/blog/hyperparameter-tuning-in-python-complete-guide
2
11-08-2024
3
11-08-2024