Analytical1DLikelihood¶
- class Analytical1DLikelihood(x, y, func, **kwargs)[source]¶
Bases:
LikelihoodA general class for 1D analytical functions. The model parameters are inferred from the arguments of 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).
- __init__(x, y, func, **kwargs)[source]¶
Empty likelihood class to be subclassed by other likelihoods
- __call__(*args, **kwargs)¶
Call self as a function.
Methods
__init__(x, y, func, **kwargs)Empty likelihood class to be subclassed by other likelihoods
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_parametersmeta_dataThe number of data points
The independent variable.
The dependent variable.
- property func¶
Make func read-only
- property function_keys¶
Makes function_keys read_only
- log_likelihood(parameters)[source]¶
- Parameters:
- parameters: dict
A dictionary of the parameter names and associated values
- Returns:
- float
- log_likelihood_ratio(parameters)[source]¶
Difference between log likelihood and noise log likelihood
- Parameters:
- parameters: dict
A dictionary of the parameter names and associated values
- Returns:
- float
- model_parameters(parameters)[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¶
The dependent variable. Setter assures that single numbers will be converted to arrays internally