flip.likelihood¶
Attributes¶
Classes¶
Functions¶
|
|
|
|
|
|
|
Module Contents¶
- flip.likelihood.log¶
- flip.likelihood._available_priors = ['gaussian', 'positive', 'uniform']¶
- class flip.likelihood.BaseLikelihood(covariance=None, data=None, parameter_names=None, prior=None, likelihood_properties={})[source]¶
Bases:
object- _default_likelihood_properties¶
- covariance¶
- data¶
- parameter_names¶
- prior¶
- likelihood_properties¶
- 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, prior=None, likelihood_properties={})[source]¶
Bases:
BaseLikelihood
- class flip.likelihood.MultivariateGaussianLikelihoodInterpolate1D(covariance=None, data=None, parameter_names=None, prior=None, likelihood_properties={}, interpolation_value_name=None, interpolation_value_range=None)[source]¶
Bases:
BaseLikelihood- interpolation_value_name¶
- interpolation_value_range¶
- verify_covariance()[source]¶
- The verify_covariance function is used to ensure that the covariance matrix of each
parameter in the model has been computed. If it has not, then this function will compute it and store it as a full matrix.
- Parameters:
self – Bind the method to the object
- Returns:
Nothing
- __call__(parameter_values)[source]¶
The __call__ function is the function that is called when you call an instance of a class. For example, if you have a class named ‘Foo’ and create an instance of it like this:
foo = Foo()
then calling foo(x) will actually run the __call__ function in your Foo class with x as its argument.
- Parameters:
self – Refer to the object itself
parameter_values – Pass the values of the parameters to be used in this evaluation
interpolation_value – Interpolate the covariance_sum
- Returns:
The log likelihood value of the data vector given a set of parameters and an interpolation value
- 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:
BaseLikelihood- interpolation_value_name_0¶
- interpolation_value_name_1¶
- interpolation_value_range_0¶
- interpolation_value_range_1¶
- __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¶
- prior_standard_deviation¶