Compute the Akaike Information Criterion (AIC) for a given model.
Source:R/prediction.R
compute_aic.Rd
Compute the Akaike Information Criterion (AIC) for a given model.
Arguments
- p
Number of dimensions of the data set.
- total
Total mean squared error (MSE) of the model.
- num_bins
Total number of bins without empty bins used in the model.
- num_obs
Total number of observations in the training or test set.
Examples
# Example usage of compute_aic function
p <- 5
total <- 1500
num_bins <- 10
num_obs <- 100
aic_value <- compute_aic(p, total, num_bins, num_obs)
cat("AIC Value:", aic_value, "\n")
#> AIC Value: 2951.891