AxModelFitter_calculate_information_criteria
Calculate AIC, BIC, and AICc to compare model architectures and avoid overfitting. Provide MSE or MAE loss, parameter count, and noise sigma for Gaussian or Laplace likelihood.
Instructions
Calculate AIC and BIC information criteria for model selection.
REQUIRED INPUTS:
- loss_value: MSE or MAE value from your optimization
- cost_function_type: Either 'mse' or 'mae' only
- n_parameters: Number of fitted parameters in your model
- sigma: Noise standard deviation (REQUIRED for MSE, None for MAE)
- data_file: Path to your data file
- output_data: Which columns contain your output data
WHEN TO USE:
- Compare different model architectures (linear vs exponential vs polynomial)
- Select best model complexity (avoid overfitting)
- Use AIC/BIC values: lower is better
SIGMA PARAMETER:
- For MSE (Gaussian noise): Provide noise std dev from domain knowledge
- For MAE (Laplace noise): Set sigma to None
- Example: experimental measurement error ±0.1 volts → sigma=0.1
RETURNS: AIC, BIC, AICc values with interpretable model comparison metrics.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| n_obs | No | Explicit count of independent residuals. If None, infers from output data | |
| sigma | Yes | REQUIRED noise std dev for diagonal covariance Σ=σ²I. Specify from domain knowledge or estimate based on available data. | |
| data_file | Yes | Path to data file (CSV, Excel, JSON, Parquet). All data must be provided via file. | |
| loss_value | Yes | Mean loss value from optimization (MSE or MAE only) | |
| file_format | No | File format: 'csv', 'excel', 'json', 'parquet' (auto-detect if None) | |
| output_data | Yes | Output column mapping: {'columns': ['y'], 'name': 'y', 'unit': 'volt'} or {'columns': ['y1', 'y2'], 'name': 'y', 'unit': 'volt'} | |
| df_effective | No | Effective degrees of freedom for penalized models (EXCLUDING scale) | |
| n_parameters | Yes | Number of fitted parameters in mean function (scale param added automatically) | |
| n_scale_params | No | Number of scale parameters: 1 for single-output, d for d-output with separate scales | |
| aicc_include_scale | No | Include scale parameter in AICc correction (literature varies) | |
| cost_function_type | Yes | Loss function type: 'mse' (Gaussian) or 'mae' (Laplace) only | |
| include_scale_param | No | Include scale parameter (σ² or b) in k count |