bilby.core.likelihood.ExponentialLikelihood
- class bilby.core.likelihood.ExponentialLikelihood(x, y, func, **kwargs)[source]
Bases:
Analytical1DLikelihood
- __init__(x, y, func, **kwargs)[source]
An exponential likelihood function.
- Parameters:
- x, y: array_like
The data to analyse
- func:
The python function to fit to the data. Note, this must take the dependent variable as its first argument. The other arguments will require a prior and will be sampled over (unless a fixed value is given). The model should return the expected mean of the exponential distribution for each data point.
- __call__(*args, **kwargs)
Call self as a function.
Methods
__init__
(x, y, func, **kwargs)An exponential likelihood function.
log_likelihood
([parameters])log_likelihood_ratio
([parameters])Difference between log likelihood and noise log likelihood
model_parameters
([parameters])This sets up the function only parameters (i.e. not sigma for the GaussianLikelihood) .
residual
([parameters])Residual of the function against the data.
Attributes
Make func read-only
Makes function_keys read_only
marginalized_parameters
meta_data
The number of data points
parameters
The independent variable.
Property assures that y-value is positive.
- property func
Make func read-only
- property function_keys
Makes function_keys read_only
- log_likelihood_ratio(parameters=None)[source]
Difference between log likelihood and noise log likelihood
- Returns:
- float
- model_parameters(parameters=None)[source]
This sets up the function only parameters (i.e. not sigma for the GaussianLikelihood)
- property n
The number of data points
- property x
The independent variable. Setter assures that single numbers will be converted to arrays internally
- property y
Property assures that y-value is positive.