Modeling Strategy
This page outlines the methodologies, mathematical frameworks, and key decisions driving our two-stage pipeline: Demand Forecasting and Workforce Optimization.
Problem Framing
- Prediction target: Incoming call volumes aggregated at 30-minute intervals ((C_t)).
- Business KPIs: Operational labor costs and customer wait times. The models connect volume predictions to optimal interval-level agent staffing ((N_t)), minimizing minimum headcount as a proxy for labor cost.
- Constraints: Staffing optimization is strictly bound by three business thresholds:
- Service Level (SLA) (\ge) 0.80 (80% of calls answered within 60 seconds)
- Average Wait Time (\le) 60 seconds
- Agent Occupancy (\le) 0.85 (85%)
Baseline Model
- Forecasting Baseline: We utilize a one-step naïve forecast as our standard baseline to compute the Mean Absolute Scaled Error (MASE). This ensures the model fundamentally outperforms a simple “carry-forward” assumption of the prior interval’s volume.
- Queueing Baseline: The baseline probability that an arriving call must wait relies on the classic Erlang-C formula:
[ P_{\text{wait}}(N_t, a_t) = \frac{\frac{a_t^{N_t}}{N_t!}\left(\frac{N_t}{N_t-a_t}\right)}{\sum_{k=0}^{N_t-1}\frac{a_t^k}{k!} + \frac{a_t^{N_t}}{N_t!}\left(\frac{N_t}{N_t-a_t}\right)} ]
(Where (a_t) is the offered load. Factorial terms are evaluated in log space to avoid overflow.)
Feature Engineering
Our forecasting pipeline engineers a comprehensive feature space from raw 30-minute interval data, shifting focus depending on the prediction horizon:
- Temporal & Cyclical Indicators: Standard calendar components (hour, day, month) and cyclical transformations (sine/cosine) for smooth period transitions.
- Tax Seasonality & Holidays: Binary flags for standard U.S. holidays and custom tax-urgency metrics (e.g.,
days_to_tax_deadlinecountdown,is_post_tax_dropflag) to capture massive ramp-ups before April 15th. - Autoregressive Lags (Short-Term): Direct volume lags (previous interval, same time yesterday/last week), rolling means, standard deviations, and exponential moving averages to capture intraday momentum.
- Historical Baselines & Year-Over-Year (Long-Term): Historical averages/medians for specific time cross-sections and YoY data to establish baseline expectations without relying on immediate recent momentum.
- Platform Operational States: Channel distribution ratios (inbound vs. chat/callback) and expert efficiency indicators (First Call Resolution, mean hold times, occupancy).
Evaluation Strategy
- Validation Approach: Sequential time-series testing. Training data is strictly misaligned from the test period to prevent leakage, utilizing an aligned 319-day test period (January 1, 2025 – November 15, 2025) to ensure YoY alignment of tax patterns.
- Performance Metrics:
- Mean Absolute Error (MAE): Average absolute deviation in calls per day.
- Mean Absolute Scaled Error (MASE): Normalizes against the naïve baseline.
[ \text{MASE} = \frac{\text{MAE}{\text{model}}}{\frac{1}{n-1}\sum{t=2}^{n}|y_t - y_{t-1}|} ]
- Weighted Mean Absolute Percentage Error (WMAPE): Expresses error as a percentage of total actual volume.
Advanced Techniques: Workforce Optimization & Queueing
To translate forecasted volumes into staffing requirements, we treat interval-level staffing as a discrete optimization problem.
Abandonment-Aware Performance Emulator
Instead of slow discrete-event simulation, the optimizer queries a deterministic analytical emulator. It modifies the standard Erlang-C wait probability with an Erlang-A-inspired adjustment for caller abandonment, assuming an average patience ((\eta)) of 180 seconds:
[ P_{\text{abandon}}(N_t) \approx P_{\text{wait}}(N_t, a_t) \cdot \frac{\theta_t a_t}{N_t(1-\rho_t) + \theta_t a_t} ]
(Where (\theta_t = \frac{\eta}{\mu_t}) and (\rho_t = \frac{a_t}{N_t}))
Wait time and SLA metrics are subsequently derived from these abandonment-adjusted probabilities:
[ \widehat{W}t(N_t) \approx \frac{P{\text{wait}}(N_t, a_t)}{N_t \mu_t (1-\rho_t) + \eta} ]
[ \widehat{SL}t(N_t) \approx 1 - P{\text{wait}}(N_t, a_t)\exp\left[-\left(N_t\mu_t(1-\rho_t)+\eta\right)T\right] - P_{\text{abandon}}(N_t) ]
Optimization Algorithm
Since queueing performance monotonically improves with staffing, we locate the minimum feasible headcount ((N_t^\star)) using binary search instead of a linear scan.
- We compute an occupancy-aware lower bound: (N_{\min} = \max\left(1,\left\lceil \frac{a_t}{\tau_\rho} \right\rceil + 1\right)).
- We evaluate midpoints between (N_{\min}) and a safety upper bound (N_{\max}).
- The minimum feasible integer satisfying SLA, Wait Time, and Occupancy thresholds is selected.
[ N_t^\star = \min \left{ N \in \mathbb{Z}{\ge 0} : \widehat{SL}_t(N) \ge \tau{SL}, \ \widehat{W}t(N) \le \tau_W, \ \widehat{\rho}_t(N) \le \tau\rho \right} ]
Deployment Considerations
For full model specifications, feature lists, hyperparameters, and evaluation benchmarks, see the Model Card.
- Pipeline Integration: The workforce optimization module directly connects the LightGBM forecaster to downstream operational planning. For every interval (t), the system predicts (C_t), retrieves historical Average Handle Time ((H_t)), computes (N_t^\star), and outputs recommended headcounts alongside emulator metrics.
- Handling Edge Cases: The optimization module contains logic guards for zero-demand intervals (returns (N_t^\star = 0)) and overloaded intervals (bounds overflow rather than evaluating unstable queueing expressions).
- Downstream Usage: Interval-level outputs act as operational benchmarks for downstream shift scheduling modules, dictating the construction of actual agent shifts based on historical availability patterns.