How Demand Forecasting Is Affected by Demand Data Discontinuity

Jul 13, 2021

Yahya Sowti is a Senior Data Scientist at Legion. Yahya has extensive experience in Predictive Analytics and Machine Learning and earned a Ph.D in CS from Louisiana State University.

Demand forecasting is a key focus at Legion. As data scientists, we see demand forecasting as a function of time and categorized as a time series. And even though it would be simpler, one general model can’t be applied to all industries and partners. Each industry has its challenges. In this article, we’ll explain data discontinuity and how we tackle this problem.

For some industries, demand happens at specific predetermined times and for some durations too. For example, businesses that schedule appointments or classes. In other industries, businesses may only be open on certain days, weeks, or hours that vary throughout the year. For example, entertainment industries like amusement parks have varied open days, hours, and weeks. And different locations and parks can have multiple seasons in a year with gaps. So, when a new season starts, there might not be recent historical information to extract about recent trends. That adds further complications for modeling techniques that rely only on recent trends to generate forecasts. For data with these properties, we call it discontinuous demand, and forecasting techniques that try to tackle all or some of these edge cases are called discontinuous demand forecasting.

For these businesses, regular time-series forecasting models won’t work because they mainly rely on historical data that’s aligned with a day, hour, or even week level for extraction features. This alignment requirement restricts models to generating forecasts only for days and hours that are aligned with the historical data, and it doesn’t always match the actual open days/hours. It may also restrict models to generating forecasts only for weeks that have recent history, and that data doesn’t exist when a new season starts.

With all these requirements in mind, we concluded that discontinuous demand forecasting models couldn’t rely on historical data to decide which days, hours, or weeks in the future are required to generate predictions. And these models need customer input on future operating hours, and they need an easy way to create an operating hours table. 

Legion WFM has a new forecasting platform that covers all of these edge cases and requirements for forecasting discontinuous demand data. It uses forecasting models that extract historical data in a way that doesn’t restrict models from generating forecasts for variable operating hours in the future.

How Legion WFM Deals with Variable Operating Hours

It’s important to remember that using regular trend-based features which use historically-aligned days or hours as features will not work when operating hours are variable in day and hour levels. A more reliable level to align with the historical data is week-level, assuming that data is more consistent in most businesses. Namely, using the total demand for each of the past couple of weeks as features allows the model to learn how demands at each hour or day are associated with the recent weekly demand, which provides a viable solution to deal with variable operating hours and days. For these features, we recommend you use normalized weekly demand as features for the model because total demand is oblivious to operating hours. Also, it can undermine high-demand weeks with fewer operating days or hours, which is common during holiday seasons. Another point to consider is whether you should use the number of operating hours at the day and week levels as features for the models. Demand at each hour can vary when the number of operating hours for that day expands or shrinks, and the same goes with the demand for each day when the business is only open for a few days versus every day of a week.

How Legion WFM Handles Forecasting at the Beginning of a New Season

Generating forecasts is even more complicated when a new season begins because there isn’t existing recent history that trend-based features can use. Legion WFM effectively detects these periods and automatically excludes trend-based features like past weekly values from the model. Instead, it uses other features like year-over-year seasonal features that are based on aligning the target days with days or weeks from the previous year. When using yearly seasonal features, it’s important to align the new season in the current year with its closest season in the past year. Therefore, it’s critical to have a configurable calendar that can align data for the current and previous corresponding seasons.

Operating Hours Calendar

Another key requirement for discontinuous demand forecasting is a flexible operating hours calendar that indicates which days, hours, or weeks in the future forecasts need to be generated. Unfortunately, this information can’t be reliably extracted from the historical data. Again, that goes back to the nature of discontinuous demand data – any week or day operating days or hours can vary from what it was in recent history. Therefore, it’s not 100% reliable to look at the past data to derive which future hours or days of forecasting are required.


Now that more businesses are using machine learning models for forecasting, these techniques must adapt to the businesses’ characteristics. Forecasting model requirements for discontinuous demand data have to include strategies like normalized weekly features for trends and exclude recent trends from models when forecasting a new season. And a configurable operating hours calendar is key to addressing edge cases with discontinuous demand data. It will greatly improve the forecasting models’ accuracy and performance.