Ultimate access to all questions.
Which Hyperopt function should you use to generate a real value that follows a normal distribution with a specified mean (mu) and standard deviation (sigma)?
Explanation:
The correct function is hp.normal(label, mu, sigma)
, which is specifically designed to generate values from a normal distribution with the given mean and standard deviation. The other options are not suitable for this purpose:
hp.qnormal(label, mu, sigma, q)
: Generates values from a q-normal distribution, not a standard normal distribution.hp.quniform(label, low, high, q)
: Generates values from a q-uniform distribution, not a normal distribution.hp.loguniform(label, low, high)
: Generates values from a log-uniform distribution, not a normal distribution.Using hp.normal(label, mu, sigma)
is ideal for hyperparameter optimization when you need values centered around a mean with a specific spread.