Horseshoe prior
smac.model.gaussian_process.priors.horseshoe_prior
#
HorseshoePrior
#
Bases: AbstractPrior
Horseshoe Prior as it is used in spearmint.
| PARAMETER | DESCRIPTION |
|---|---|
scale
|
Scaling parameter.
TYPE:
|
seed
|
TYPE:
|
Source code in smac/model/gaussian_process/priors/horseshoe_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.
| PARAMETER | DESCRIPTION |
|---|---|
theta
|
Hyperparameter configuration in log space
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
gradient
|
The gradient of the prior at theta.
TYPE:
|
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!
| PARAMETER | DESCRIPTION |
|---|---|
theta
|
Hyperparameter configuration in log space.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
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.
| PARAMETER | DESCRIPTION |
|---|---|
n_samples
|
The number of samples that will be drawn.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
samples
|
TYPE:
|