keshavsingh4522 / hacktoberfest

Submit Just 4 PRs to earn SWAGS and Tshirts🔥
https://hacktoberfest.digitalocean.com/
Creative Commons Zero v1.0 Universal
844 stars 3.95k forks source link

Create randomSearch.py #4616

Open riyanshgupta opened 8 months ago

riyanshgupta commented 8 months ago

What type of PR is this? (check all applicable)

Description

Random search is a method in which random combinations of hyperparameters are selected and used to train a model. The best random hyperparameter combinations are used. Random search bears some similarity to grid search.

However, a key distinction is that we do not specify a set of possible values for every hyperparameter. Instead, we sample values from a statistical distribution for each hyperparameter. A sampling distribution is defined for every hyperparameter to do a random search.

This technique allows us to control the number of attempted hyperparameter combinations. Unlike grid search, where every possible combination is attempted, random search allows us to specify the number of models to train. We can base our search iterations on our computational resources or the time taken per iteration. The image below shows a random layout.

Add Link of GitHub Profile

https://github.com/riyanshgupta