Posts

Showing posts from November, 2021

Hyper parameter tuning: Grid Search CV VS Randomized Search CV

Image
Hyperparameters are the variables that is defined by the developer of the model in order to get the best model possible. For example, max_depth and n_estimators in Random Forest. There are multiple ways to setup the these hyperparameters. Two basic methods are Grid and Random Search. Grid Search The way GS will work is such that it will take a combination of each and every hyperparameters that is decided to use. It is a very efficient method in terms of getting the best possible hyperparameters. But as there will be multiple combinations along with cross validation, it will be a time consuming and expensive business.                                                                                                                         Fig: encrypted-tbn0.gstatic           Some important arguments of Grid Search CV 1.  estimator  – A scikit-learn model 2.  param_grid  – A dictionary with parameter names as keys and lists of parameter values. 3.  scoring  – The performance measure. For e