parameterspace.priors.beta
Beta
Beta prior for variables in the interval [0,1].
loglikelihood(self, value)
Compute the log PDF (up to an additive constant) of a given value.
Note
Values for the priors are always after the transformation!
Parameters:
Name | Type | Description | Default |
---|---|---|---|
value |
|
[description] |
required |
Returns:
Type | Description |
---|---|
|
[descriptions] |
Source code in parameterspace/priors/beta.py
def loglikelihood(self, value):
return self.sps_beta_dist.logpdf(value)
pdf(self, value)
Computes the PDF of a given value.
Note
Values for the priors are always after the transformation!
Parameters:
Name | Type | Description | Default |
---|---|---|---|
value |
|
[description] |
required |
Returns:
Type | Description |
---|---|
|
[descriptions] |
Source code in parameterspace/priors/beta.py
def pdf(self, value):
return self.sps_beta_dist.pdf(value)
sample(self, num_samples=None, random_state=<module 'numpy.random' from '/home/runner/.cache/pypoetry/virtualenvs/parameterspace-9AYrJA9h-py3.8/lib/python3.8/site-packages/numpy/random/__init__.py'>)
Draw random samples from the prior.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
num_samples |
|
[description] |
None |
Returns:
Type | Description |
---|---|
|
[descriptions] |
Source code in parameterspace/priors/beta.py
def sample(self, num_samples=None, random_state=np.random):
return self.sps_beta_dist.rvs(size=num_samples, random_state=random_state)