Mastering Time Series Modeling: Challenges and Cutting-Edge Solutions
By Nick Mishkin, Data Scientist at Intelichain
Forecasting time series data can be a complex puzzle. Unlike typical datasets that can be split in numerous ways, time series data is all about sequences. To forecast the future, data scientists need to use the past, and there’s only one past. Imagine you have data on ten thousand patients, recording metrics like heart rate, age, weight, blood pressure, and breaths per minute. To predict if patients have COVID-19, you can randomly split this data into training sets with equal variances (e.g., sets that include 50% men and 50% women). Conversely, you cannot randomly shuffle time series data. If you need the last three years of data to predict the next six months, you must use those three years in their natural order.
At Intelichain, we specialize in time series modeling. We forecast our customers’ sales with up to 97.53% accuracy. This precision translates into large savings—millions of dollars—by helping businesses capitalize on increased demand and maintain near-perfect inventory levels.
In this article, we share two insights from our Intelichain that improve time series modeling and empower supply-chain businesses to hit their targets. First, we tailor forecasting models to match each customer’s unique demand schedule. Second, we build models that train across multiple time series to boost accuracy.
Customizing Demand Schedules for Cultural Nuances
Every country has its own unique culture and holidays. In the United States, Christmas and Thanksgiving are the heavy hitters. Demand for items like clothing, children’s toys, and electronics skyrocket, and companies must ramp up their supply stock to meet their customers’ needs.
In Israel, companies forecast sales using the Gregorian calendar but experience heightened demand during the Jewish holidays, which are based on the Hebrew calendar. This mismatch creates a significant challenge for demand forecasting and supply-chain management. That’s why Intelichain customizes models to align with each customer’s unique demand schedule.
Leveraging Meta's Prophet Model for Seasonal Forecasting
Most people recognize Meta for their social media platforms—Facebook, Instagram, and WhatsApp. But what many don’t know is that Meta has a dedicated team focused on data science and machine learning innovations. Fortunately for companies worldwide, Meta generously shares many of their breakthroughs with the public. In 2017, they launched the first version of their time series model, Prophet, designed to predict data with strong seasonal and holiday effects. By 2021, Meta updated Prophet to include the supply-demand shocks brought on by COVID-19.
At Intelichain, we tailor Prophet models to account for Jewish holidays. This requires adding specific holiday data for each year. Take Rosh Hashana, for example. In 2023, it started on September 16, but in 2024, it begins on October 3—that’s nearly a month apart on the Gregorian calendar!
By integrating Prophet with custom holidays, we achieve great results. Take a look at the graph below, which includes a stock keeping unit highly sensitive to Jewish holidays. The spikes occur in March and August right before the Passover and Rosh Hashana holidays. The blue line represents Prophet’s forecast, which captures these peaks as well as the regular months. Notice the last forecast in August 2024—the model anticipates another significant spike due to the upcoming Rosh Hashana holiday.
Meta’s Prophet model is a top-tier technology for supply-chain businesses and forecasting projects. By implementing Prophet, we boosted forecasting accuracy by 41.47% in terms of Mean Absolute Percentage Error (MAPE). At Intelichain, we’re committed to continually optimizing and fine-tuning Prophet for our customers.
Optimizing Forecasts Across Multiple Time Series
Deep learning models, also known as neural networks, have the power to train on multiple time series simultaneously. Many of our customers manage hundreds of stock keeping units. With deep learning models, we fill forecasting gaps by analyzing patterns across all sales products at once.
Fine-Tuning the N-HiTS Deep Learning Model
The N-HiTS model is designed for large-scale forecasting systems. According to Cornell University, the model improves accuracy by nearly 20% in half the time compared to the latest Transformer architecture. For some customer products, we’ve seen improvements in Mean Absolute Error (MAE) of up to 84.05%. In the graph below, the black line represents the customer’s actual sales, the purple line shows the forecast with exponential smoothing, and the dark blue line highlights the accuracy boost from the N-HiTS model.
A key part of our success with N-HiTS is training multiple products simultaneously. This is crucial because the graph shows just one stock-keeping unit, but the model actually leverages hundreds to make that prediction. We used the Darts library to test various models, and N-HiTS came out on top, outperforming both statistical models and the TiDE neural network.
Concluding Remarks
Time series forecasting isn’t your typical data science task. It demands specific data splitting for training and nuanced fine-tuning for models. While we’ve seen forecasting accuracy improve by over 80%, even small gains are significant when customers manage thousands of products. A few percentage points of improvement can translate into millions of dollars in sales and inventory savings. For more information on Intelichain and our supply-chain philosophy, please visit our resource center.
Author bio: Nick Mishkin is a data scientist specializing in time series, deep learning, and large language models. He has written for prestigious publications such as NoCamels, MoneyGeek, and SeekingAlpha.
Mishkin earned his bachelor’s degree in economics from the University of Pennsylvania and his master’s degree in behavioral economics, magna cum laude, from Reichman University. Additionally, he completed the hands-on Data Science & Machine Learning training program at the Israel Tech Challenge (ITC).