Evaluation Metrics
Within the package, three primary evaluation metrics are implemented to assess the performance of fitted temporal mixture models: Akaike Information Criterion (AIC), Bayesian Information Criterion (BIC), and Log-Likelihood. These metrics provide insights into the goodness-of-fit of the models while accounting for model complexity.
TemporalMixtureModels.loglikelihood — Method
loglikelihood(result::MixtureResult, t::AbstractVector{T}, y::AbstractMatrix{Y}, ids::AbstractVector{Int}; inputs=nothing) where {T<:Real, Y<:Union{Real, Missing}}Compute the total log-likelihood of the fitted mixture model on the given data.
Arguments
result::MixtureResult: The result of fitting the mixture model.t::AbstractVector: Time points of the observations.y::AbstractMatrix: Observed data (vector or matrix).ids::AbstractVector{Int}: Cluster assignments for each observation.inputs: Optional additional inputs for prediction.
Returns
Float64: The total log-likelihood of the model on the data.
TemporalMixtureModels.aic — Function
aic(result::MixtureResult, t::AbstractVector{T}, y::AbstractMatrix{Y}, ids::AbstractVector{Int}; inputs=nothing) where {T<:Real, Y<:Union{Real, Missing}}Compute the Akaike information criterion of the fitted mixture model on the given data.
Arguments
result::MixtureResult: The result of fitting the mixture model.t::AbstractVector: Time points of the observations.y::AbstractMatrix: Observed data (vector or matrix).ids::AbstractVector{Int}: Cluster assignments for each observation.inputs: Optional additional inputs for prediction.
Returns
Float64: The Akaike information criterion of the model on the data.
TemporalMixtureModels.bic — Function
bic(result::MixtureResult, t::AbstractVector{T}, y::AbstractMatrix{Y}, ids::AbstractVector{Int}; inputs=nothing) where {T<:Real, Y<:Union{Real, Missing}}Compute the Bayesian information criterion of the fitted mixture model on the given data.
Arguments
result::MixtureResult: The result of fitting the mixture model.t::AbstractVector: Time points of the observations.y::AbstractMatrix: Observed data (vector or matrix).ids::AbstractVector{Int}: Cluster assignments for each observation.inputs: Optional additional inputs for prediction.
Returns
Float64: The Bayesian information criterion of the model on the data.