petab_select.criteria

Implementations of model selection criteria.

Functions

calculate_aic(nllh, n_estimated)

Calculate the Akaike information criterion (AIC) for a model.

calculate_aicc(nllh, n_estimated, ...)

Calculate the corrected Akaike information criterion (AICc) for a model.

calculate_bic(nllh, n_estimated, ...)

Calculate the Bayesian information criterion (BIC) for a model.

Classes

CriterionComputer(model)

Compute various criteria.

class petab_select.criteria.CriterionComputer(model)[source]

Compute various criteria.

__init__(model)[source]
get_aic()[source]

Get the Akaike information criterion.

Return type:

float

get_aicc()[source]

Get the corrected Akaike information criterion.

Return type:

float

get_bic()[source]

Get the Bayesian information criterion.

Return type:

float

get_lh()[source]

Get the likelihood.

Return type:

float

get_llh()[source]

Get the log-likelihood.

Return type:

float

get_n_estimated()[source]

Get the number of estimated parameters.

Return type:

int

get_n_measurements()[source]

Get the number of measurements.

Return type:

int

get_n_priors()[source]

Get the number of priors.

Return type:

int

get_nllh()[source]

Get the negative log-likelihood.

Return type:

float

property petab_problem: Problem

The PEtab problem that corresponds to the model.

Implemented as a property such that the petab.Problem object is only constructed if explicitly requested.

Improves speed of operations on models by a lot. For example, analysis of models that already have criteria computed can skip loading their PEtab problem again.

petab_select.criteria.calculate_aic(nllh, n_estimated)[source]

Calculate the Akaike information criterion (AIC) for a model.

Parameters:
  • nllh (float) – The negative log likelihood.

  • n_estimated (int) – The number of estimated parameters in the model.

Return type:

float

Returns:

The AIC value.

petab_select.criteria.calculate_aicc(nllh, n_estimated, n_measurements, n_priors)[source]

Calculate the corrected Akaike information criterion (AICc) for a model.

Parameters:
  • nllh (float) – The negative log likelihood.

  • n_estimated (int) – The number of estimated parameters in the model.

  • n_measurements (int) – The number of measurements used in the likelihood.

  • n_priors (int) – The number of priors used in the objective function.

Return type:

float

Returns:

The AICc value.

petab_select.criteria.calculate_bic(nllh, n_estimated, n_measurements, n_priors)[source]

Calculate the Bayesian information criterion (BIC) for a model.

Args
nllh:

The negative log likelihood.

n_estimated:

The number of estimated parameters in the model.

n_measurements:

The number of measurements used in the likelihood.

n_priors:

The number of priors used in the objective function.

Returns:

The BIC value.