flip.likelihood#
Attributes#
Classes#
Helper class that provides a standard way to create an ABC using |
|
Helper class that provides a standard way to create an ABC using |
|
Helper class that provides a standard way to create an ABC using |
|
Helper class that provides a standard way to create an ABC using |
|
Functions#
|
|
|
|
|
|
|
|
|
|
|
|
|
Module Contents#
- flip.likelihood.jax_installed = True#
- flip.likelihood.log#
- flip.likelihood._available_priors = ['gaussian', 'positive', 'uniform']#
- flip.likelihood._available_inversion_methods = ['inverse', 'solve', 'cholesky', 'cholesky_regularized', 'cholesky_inverse']#
- flip.likelihood.log_likelihood_gaussian_inverse_jit#
- class flip.likelihood.BaseLikelihood(covariance=None, data=None, parameter_names=None, likelihood_properties={})[source]#
Bases:
abc.ABCHelper class that provides a standard way to create an ABC using inheritance.
- _default_likelihood_properties#
- covariance = None#
- data = None#
- parameter_names = None#
- free_par#
- likelihood_properties#
- prior#
- classmethod init_from_covariance(covariance, data, parameter_names, likelihood_properties={}, **kwargs)[source]#
The init_from_covariance function is a class method that initializes the likelihood object from a covariance matrix.
- Parameters:
cls – Create a new instance of the class
covariance – Compute the full matrix of the covariance
parameter_names – Set the names of the parameters
density – Compute the vector and its error
density_err – Compute the vector_err
velocity – Compute the vector and vector_err
velocity_err – Compute the error in the vector
:param : Compute the vector
- Returns:
A likelihood object
- class flip.likelihood.MultivariateGaussianLikelihood(covariance=None, data=None, parameter_names=None, likelihood_properties={})[source]#
Bases:
BaseLikelihoodHelper class that provides a standard way to create an ABC using inheritance.
- class flip.likelihood.MultivariateGaussianLikelihoodInterpolate1D(covariance=None, data=None, parameter_names=None, likelihood_properties={}, interpolation_value_name=None, interpolation_value_range=None)[source]#
Bases:
BaseLikelihoodHelper class that provides a standard way to create an ABC using inheritance.
- interpolation_value_name = None#
- interpolation_value_range = None#
- free_par#
- class flip.likelihood.MultivariateGaussianLikelihoodInterpolate2D(covariance=None, data=None, parameter_names=None, prior=None, likelihood_properties={}, interpolation_value_name_0=None, interpolation_value_name_1=None, interpolation_value_range_0=None, interpolation_value_range_1=None)[source]#
Bases:
BaseLikelihoodHelper class that provides a standard way to create an ABC using inheritance.
- interpolation_value_name_0 = None#
- interpolation_value_name_1 = None#
- interpolation_value_range_0 = None#
- interpolation_value_range_1 = None#
- __call__(parameter_values)[source]#
The __call__ function is the function that will be called when the likelihood object is called. It takes in a list of parameter values, and returns a float value representing the log-likelihood value for those parameters. The __call__ method should not be overwritten by subclasses unless you know what you are doing!
- Parameters:
self – Refer to the object itself
parameter_values – Compute the covariance matrix
interpolation_value_0 – Interpolate the covariance matrix along the first dimension
interpolation_value_1 – Interpolate the covariance matrix
:param : Compute the covariance sum
- Returns:
The log-likelihood function
- class flip.likelihood.GaussianPrior(parameter_name=None, prior_mean=None, prior_standard_deviation=None)[source]#
Bases:
Prior- prior_mean = None#
- prior_standard_deviation = None#