MaximumLikelihoodOptimizer#

class relife.base.MaximumLikelihoodOptimizer[source]#

Abstract generic class for maximum-likelihood estimation.

Subclasses provide the data-specific negative log-likelihood. This class runs SciPy minimization and builds the associated FittingResults.

Attributes:
nb_observationsint

The number of observations.

Notes

Jacobian and hessian are not required but they can be implemented in concrete likelihoods. To use the jacobian or hessian implementations in the likelihood, pass them into self.config["scipy_minimize_options"].

Methods

negative_log

Negative log likelihood.

optimize

Search parameter values that maximize the likelihood given data.

abstractmethod negative_log(params)[source]#

Negative log likelihood.

Parameters:
params1d array of floats

Parameter values.

Returns:
outfloat

Negative log likelihood value.

optimize()[source]#

Search parameter values that maximize the likelihood given data.

Returns:
outFittingResults

An object that encapsulates optimal parameters and fitting information (AIC, variance, etc.).