In prior.py, in the sample_parameters and proposal_log_likelihood functions for gamma and beta priors:
Gamma:
def sample_parameters(self):
self.x = random.gammavariate(1, self.x) # Mean: x
if self.x <= 0:
self.x = 1e-12
Beta:
def sample_parameters(self):
self.x = random.betavariate(10, 10*(1-self.x)/self.x) # Mean: x
if self.x <= 0 or self.x >= 1:
self.x = 0.5
I get that the value 1 is chosen in the case of the gamma distribution so that the mean of the distribution is kept as x. I'm not sure why in the case of the beta distribution the value 10 is chosen instead of another one e.g. 5. Is there any particular reason behind it?