Skip to content

epymorph.parameter_fitting.likelihood

Likelihood

Bases: ABC

Abstract base class for likelihood functions for computing the likelihood of observational data predicted by a model.

compute abstractmethod

compute(observed: int, expected: int)

Computes the likelihood of the observed data given the data expected by a model.

Parameters:

  • observed (int) –

    The observational data.

  • expected (int) –

    The data predicted by the model.

Poisson

Poisson(jitter: float = 0.0001)

Bases: Likelihood

Encapsulatees the Poisson likelihood function for observational data. The expected value of the observation is used as the parameter for the Poisson distribution. The observed values must be nonnegative integers.

Attributes:

  • jitter (float) –

    A small number added to the expected value to avoid the degenerate case when the expected value is zero.

jitter instance-attribute

jitter = jitter

compute

compute(observed, expected)

Computes the Poisson likelihood.

Parameters:

  • observed (int) –

    The observational data.

  • expected (int) –

    The data predicted by the model.