← Back to projects

Ticket Predictor: Production ML Forecasting System

Python scikit-learn Flask NLP Time Series

The Problem

IT support management across multiple corporate sites was entirely reactive. No one knew whether tomorrow would bring 5 walk-ups or 50. Staffing decisions were based on gut feel, leading to either overstaffing (wasted budget) or understaffing (long wait times and frustrated employees).

What I Built

An end-to-end ML system that predicts daily contact volume per site for the next 14 days, detects historical spikes, and identifies repeat requester patterns. Predictions are served through a 6-page Flask web application used by management for staffing decisions.

Core Components

Feature Engineering

Feature GroupFeatures
Day patternsDay of week, cyclical encoding (sin/cos), is_weekend
CalendarDay of month, week of year, month
Holidaysis_holiday, day before/after holiday (US holidays)
Lag features1, 2, 3, 7, 14, and 30 days ago
Rolling averages3-day, 7-day, and 14-day rolling mean
Same-weekday historyAverage of last 4 and 8 same weekdays

Model Performance

Trained on 534 days of historical data across multiple sites with independent per-building models.

MetricTop SitesMedianDescription
R-squared0.990.94Variance explained by the model
MAE<0.1 contacts1.5 contactsAverage daily prediction error
Error %<2%8%MAE as % of average volume

Floor rule: Predictions cannot drop below 80% of the same-weekday 4-week average. This prevents anomalous quiet days from dragging future predictions unrealistically low.

Impact

Architecture

Design Decisions

What I Would Improve