src.llm_interpreter.results_aggregator¶
Results Aggregator for AMMM Model Outputs.
This module consolidates all model outputs (CSV files, JSON config, diagnostics) into a detailed JSON structure for LLM interpretation.
Module Contents¶
- class src.llm_interpreter.results_aggregator.ResultsAggregator(results_dir: str = 'results')¶
Aggregates all model outputs into a detailed JSON structure.
- aggregate_convergence_diagnostics() Dict[str, Any]¶
Aggregate convergence diagnostics from model summary.
- Returns:
Dictionary of convergence metrics.
- aggregate_model_fit_metrics() Dict[str, Any]¶
Aggregate model fit metrics including ELPD and R-squared.
- Returns:
Dictionary of model fit metrics.
- aggregate_channel_performance() Dict[str, Any]¶
Aggregate marketing channel performance metrics.
- Returns:
Dictionary of channel performance metrics.
- aggregate_optimization_results() Dict[str, Any]¶
Aggregate optimization results and recommendations.
- Returns:
Dictionary of optimization results.
- aggregate_model_configuration() Dict[str, Any]¶
Aggregate model configuration and priors.
- Returns:
Dictionary of model configuration.
- aggregate_all_results() Dict[str, Any]¶
Aggregate all results into a detailed JSON structure.
- Returns:
Complete aggregated results dictionary.
- save_aggregated_results(output_path: str | None = None) str¶
Save aggregated results to JSON file.
- Parameters:
output_path – Optional custom output path.
- Returns:
Path to saved file.