Log normal prior
smac.model.gaussian_process.priors.log_normal_prior
#
LogNormalPrior
#
Bases: AbstractPrior
Implements the log normal prior.
Parameters#
sigma : float Specifies the standard deviation of the normal distribution. mean : float Specifies the mean of the normal distribution. seed : int, defaults to 0
Source code in smac/model/gaussian_process/priors/log_normal_prior.py
get_gradient
#
Computes the gradient of the prior with respect to theta. Internally, his method calls self._get_gradient
.
Warning#
Theta must be on the original scale.
Parameters#
theta : float Hyperparameter configuration in log space
Returns#
gradient : float The gradient of the prior at theta.
Source code in smac/model/gaussian_process/priors/abstract_prior.py
get_log_probability
#
Returns the log probability of theta. This method exponentiates theta and calls self._get_log_probability
.
Warning#
Theta must be on a log scale!
Parameters#
theta : float Hyperparameter configuration in log space.
Returns#
float The log probability of theta
Source code in smac/model/gaussian_process/priors/abstract_prior.py
sample_from_prior
#
Returns n_samples
from the prior. All samples are on a log scale. This method calls
self._sample_from_prior
and applies a log transformation to the obtained values.
Parameters#
n_samples : int The number of samples that will be drawn.
Returns#
samples : np.ndarray