pastas.solver.likelihood.GaussianLikelihood#

class pastas.solver.likelihood.GaussianLikelihood#

Gaussian likelihood function for homoscedastic, uncorrelated errors.

Notes

The Gaussian log-likelihood function [Smith et al., 2015] is defined as:

\[\begin{split}\\log(L) = -\\frac{N}{2}\\log(2\\pi\\sigma^2) - \\frac{\\sum_{t=1}^N \\epsilon_t^2}{2\\sigma^2}\end{split}\]

where \(N\) is the number of observations, \(\\sigma^2\) is the variance of the residuals, and \(\\epsilon_t\) is the residual at time \(t\). The parameter \(\\sigma^2\) needs to be estimated.

The current implementation is valid for equidistant time series only.

property nparam: int#

Number of parameters in the log-likelihood function.

Methods#

get_init_parameters(→ pandas.DataFrame)

Get initial parameters for the log-likelihood function.

compute(→ float)

Compute the log-likelihood.