# Experiment Configuration for Ticket Sales Forecasting
# Apples-to-apples comparison: XGBoost vs Chronos FFM vs Chronos RAF+FFM

# Dataset Configuration
dataset:
  name: "ticket_sales"
  path: "data/raw/ProcessedTicketDataLogs.csv"
  target: "total_tickets"  # daily aggregated ticket sales
  loader: "TicketSalesLoader"  # src/data/ticket_loader.py

# Data Split Configuration
split:
  test_size_days: 56  # 8 weeks for testing
  validation_size_days: 28  # 4 weeks for validation

# Forecast Horizons to Test
forecast_horizons: [7, 14, 21, 28, 42]  # days ahead

# Model Configurations

models:
  # XGBoost: Temporal features ONLY (no artist covariates)
  # This tests traditional time series features without domain knowledge
  xgboost_temporal:
    enabled: true
    lags: [1, 3, 7, 14, 21, 28]  # Past values
    rolling_windows: [7, 14, 28]  # Rolling statistics
    temporal_covariates:
      # Calendar features with cyclical encoding
      - day_of_week_sin
      - day_of_week_cos
      - week_of_year_sin
      - week_of_year_cos
      - day_of_year_sin
      - day_of_year_cos
      - month_sin
      - month_cos
      - quarter_sin
      - quarter_cos
      - is_weekend
      - is_holiday
    xgb_params:
      n_estimators: 500
      learning_rate: 0.05
      max_depth: 5
      subsample: 0.8
      colsample_bytree: 0.8
      min_child_weight: 3

  # XGBoost Full: Temporal + Artist covariates
  # This tests whether classical ML also benefits from domain features
  xgboost_full:
    enabled: true
    lags: [1, 3, 7, 14, 21, 28]  # Past values
    rolling_windows: [7, 14, 28]  # Rolling statistics
    all_covariates:
      # Artist Popularity Features (12 features)
      - avg_familiarity
      - max_familiarity
      - min_familiarity
      - std_familiarity
      - avg_discovery
      - max_discovery
      - min_discovery
      - std_discovery
      - avg_hotttnesss
      - max_hotttnesss
      - min_hotttnesss
      - std_hotttnesss
      # Social Metrics (4 features)
      - avg_num_blogs
      - avg_num_news
      - avg_num_reviews
      - avg_years_active
      # Volume Metrics (2 features)
      - num_concerts
      - num_unique_artists
      # Price Metrics (2 features)
      - avg_min_price
      - avg_face_value
      # Calendar Features (12 features)
      - day_of_week_sin
      - day_of_week_cos
      - week_of_year_sin
      - week_of_year_cos
      - day_of_year_sin
      - day_of_year_cos
      - month_sin
      - month_cos
      - quarter_sin
      - quarter_cos
      - is_weekend
      - is_holiday
    xgb_params:
      n_estimators: 500
      learning_rate: 0.05
      max_depth: 5
      subsample: 0.8
      colsample_bytree: 0.8
      min_child_weight: 3

  # Chronos FFM: Zero-shot baseline (no covariates)
  # This tests pure foundation model capabilities without any features
  chronos_ffm:
    enabled: true
    model_name: "amazon/chronos-2"
    device: "cuda"
    use_covariates: false  # Pure zero-shot
    quantile_levels: [0.1, 0.25, 0.5, 0.75, 0.9]
    num_samples: 20

  # Chronos RAF + FFM: Rich artist covariates
  # This tests foundation model + domain-specific features (artist popularity, social metrics)
  chronos_raf_ffm:
    enabled: true
    model_name: "amazon/chronos-2"
    device: "cuda"
    use_covariates: true
    artist_covariates:
      # Artist Popularity Features (12 features)
      - avg_familiarity       # Mean artist familiarity score
      - max_familiarity       # Max artist familiarity (star power)
      - min_familiarity       # Min artist familiarity
      - std_familiarity       # Variability in artist popularity
      - avg_discovery         # Mean artist discovery score
      - max_discovery
      - min_discovery
      - std_discovery
      - avg_hotttnesss        # Mean artist "hotness" score
      - max_hotttnesss
      - min_hotttnesss
      - std_hotttnesss

      # Social Metrics (4 features)
      - avg_num_blogs         # Average blog mentions
      - avg_num_news          # Average news mentions
      - avg_num_reviews       # Average review mentions
      - avg_years_active      # Average artist experience

      # Volume Metrics (2 features)
      - num_concerts          # Number of concerts that day
      - num_unique_artists    # Number of unique artists

      # Price Metrics (2 features)
      - avg_min_price         # Average minimum ticket price
      - avg_face_value        # Average face value

      # Calendar Features (12 features)
      - day_of_week_sin
      - day_of_week_cos
      - week_of_year_sin
      - week_of_year_cos
      - day_of_year_sin
      - day_of_year_cos
      - month_sin
      - month_cos
      - quarter_sin
      - quarter_cos
      - is_weekend
      - is_holiday
    quantile_levels: [0.1, 0.25, 0.5, 0.75, 0.9]
    num_samples: 20

# Evaluation Configuration
evaluation:
  metrics:
    - MAE
    - RMSE
    - MAPE
  probabilistic_metrics: true  # For Chronos models (quantile coverage)
  save_predictions: true
  rolling_origin:
    enabled: true
    step_size: 7  # Weekly evaluation windows

# Output Configuration
output:
  results_dir: "results/tickets"
  plots_dir: "results/tickets/plots"
  save_models: false
  verbose: true

# Reproducibility
random_seed: 42

# Notes on Fair Comparison:
# 1. All models use same aggregated daily time series
# 2. XGBoost-Temporal: Temporal patterns only (lags, rolling, calendar)
# 3. XGBoost-Full: All features (temporal + 20 artist features)
# 4. Chronos FFM: Pure zero-shot (model priors only)
# 5. Chronos RAF+FFM: Domain features (32 total: 20 artist + 12 calendar)
#
# This tests:
# - Can foundation models beat classical ML on temporal patterns alone?
# - Do rich covariates improve both XGBoost and Chronos forecasts?
# - What's the value-add of artist features for ticket sales prediction?
# - Is there an advantage to foundation models over XGBoost with same features?
