Why following hyparameter tuning function is incorrect?

In Week 3 Quiz, there is following question

If you think β (hyper parameter for momentum) is between 0.9 and 0.99, which of the following is the recommended way to sample a value for beta?
I am confused in two options

  1. beta= 1-10**(-r-1)
  2. beta=0.09*r +0.9

The correct answer is 1st option but I am unable to understand what is wrong with 2nd option

Please help me to clarify this

Hello, @sahil5710,

Approach 1 uses log scale, and approach 2 linear scale. Andrew introduced both of them and recommended approach 1 in the C2 W3 lecture video titled “Using an Appropriate Scale to pick Hyperparameters”. Log scale tries values that are more different (in terms of the effect to the model training process) from one another than linear scale does. However, I would recommend you to go through that video again first.

Cheers,
Raymond

3 Likes

Thank you! Will surely look into this

1 Like

Example:
Say you wanted to explore the effect of a model parameter that perhaps varies between 1 and 100.

You could try values between 1 and 100, incrementing by 10 each time. That’s a linear progression, and would require 11 test runs.

Or you could try the values 1, 3, 10, 30, and 100 (a common approximation of log scaling), and explore the same range with 5 tests.

If necessary, you can then perform another narrower search.

Got it thanks