LifetimeLikelihood#

final class relife.lifetime_models.LifetimeLikelihood(model, data, config)[source]#

Maximum likelihood estimator from lifetime data.

Parameters:
modelgeneric FittableParametricLifetimeModel

Every model parameters must be initialized before passing it to the likelihood.

dataLifetimeData

An object that encapsulate and preprocess lifetime observations and truncations.

configOptimizerConfig

An object that groups configurations used by the optimizer.

Attributes:
model: FittableParametricLifetimeModel

A copy of the original model.

dataLifetimeData

An object that encapsulate and preprocess lifetime observations and truncations.

configOptimizerConfig

An object that groups configurations used by the optimizer.

Methods

jac_negative_log

Jacobian of the negative log likelihood.

negative_log

Negative log likelihood.

optimize

Search parameters values that maximize the likelihood given data.

jac_negative_log(params)[source]#

Jacobian of the negative log likelihood.

The jacobian is computed with respect to parameters.

Parameters:
modelparametric model

A parametrized model with appropriate parameters values.

Returns:
outndarray
negative_log(params)[source]#

Negative log likelihood.

Parameters:
params1d array

Parameters values.

Returns:
outnp.float64

Negative log likelihood value.

optimize()#

Search parameters values that maximize the likelihood given data.

Returns:
outFittingResults

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