"""
Prior distributions for GP hyperpriors.
"""
from scipy import stats
from scipy.special import ndtri
[docs]class Normal(Prior):
"""
A normal prior probability distribution.
"""
def __init__(self, mean, std):
self.mean = mean
self.std = std
self.distro = stats.norm
[docs] def transform(self, x):
"""
Transform from unit normalisation to this prior.
Parameters
----------
x : float
The position in the normalised hyperparameter space
"""
return self.mean + self.srd * ndtri(x)