Skip to main content

get_aic_nb

get_aic_nb(
    arr: numpy.ndarray,
) ‑> float
Calculate the Akaike Information Criterion (AIC) from a log-likelihood array. The AIC is defined as: AIC=2loglikelihood+2k AIC = -2 * loglikelihood + 2 * k where:
  • log-likelihood is the sum of the log-likelihood values in the input array,
  • k is the number of estimated parameters (assumed to be 1 in this implementation).
Parameters:
NameTypeDefaultDescription
arrtp.Array1d--A one-dimensional array containing log-likelihood values.
Returns:
TypeDescription
floatThe computed AIC value if the input contains valid data; otherwise, NaN.

get_bic_nb

get_bic_nb(
    arr: numpy.ndarray,
) ‑> float
Calculate Bayesian Information Criterion (BIC) from a log-likelihood array. The BIC is defined as: BIC=2loglikelihood+klog(n)BIC = -2 * loglikelihood + k * log(n) where:
  • loglikelihood is the sum of the log-likelihood values in the input array,
  • k is the number of estimated parameters (assumed to be 1 in this implementation),
  • n is the number of observations (length of the input array).
Parameters:
NameTypeDefaultDescription
arrtp.Array1d--A 1-dimensional array of log-likelihood values.
Returns:
TypeDescription
floatThe BIC value if valid data is provided. Returns NaN if the input array is empty or contains no valid data.

get_aicc_nb

get_aicc_nb(
    arr: numpy.ndarray,
) ‑> float
Calculate Corrected Akaike Information Criterion (AICc) from a log-likelihood array. The AICc is defined as: AICc=AIC+2kk+1nk1AICc = AIC + 2k \frac{k + 1}{n - k - 1} where:
  • AIC is the Akaike Information Criterion,
  • k is the number of estimated parameters (assumed to be 1 in this implementation),
  • n is the number of observations (length of the input array).
Parameters:
NameTypeDefaultDescription
arrtp.Array1d--A 1-dimensional array of log-likelihood values.
Returns:
TypeDescription
floatThe AICc value if valid data is provided. Returns NaN if the input array is empty or contains no valid data.