Skip to content

Particular values of parameters used when sampling the beta and gamma priors #5

@x-ji

Description

@x-ji

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions