Machine Learning: Don't Let Weather Fluctuations Take Your Supply Chain by Storm

Machine learning algorithms can improve demand forecast accuracy and provide significant time savings.

Andrew Blatherwick 5a0de90521130

Weather can cause significant fluctuations in consumer demand, and because of the bullwhip effect, it can produce unnecessarily high fluctuations on the supply side as well. And these types of variations typically turn into costs.

Prepare too extensively, and you’ll end up breaching the capacity limitations at every level of your supply chain and increasing your fresh goods spoilage, but failing to prepare sufficiently leads to significant lost sales. What’s more, lost sales do not only apply to products that go out of stock, especially during extreme weather conditions when customers are more likely to make their decision on which store to visit based on the availability of a key product, for example bottled water, snow shovels, quality barbecue meats or candles.

So how can retailers optimally prepare for weather-related fluctuations?

It’s relatively easy to come up with rules or models when thinking about examples of relationships between demand and specific weather elements: high temperature and ice cream sales, rainfall and umbrella sales, and so on. But when looking at the whole assortment, how can a retailer separate the products that react to weather from those that do not? How do you measure which product reacts to which weather element (e.g. temperature, sunshine, cloudiness, rain, snow) and the strength of that reaction?

Clearly, automation is needed to process the data and make recommendations on the degree of weather sensitivity and the underlying relationships between demand and weather variables. This is one area in supply chain planning where machine learning provides a substantial benefit.

As individuals, we do not know the actual relationships between the demand of a particular product and weather variables, and we don’t have the time to analyze those relationships for each product, product category or store separately. However, machine algorithms can be taught to learn the relevant patterns and utilize the outcome in demand forecasting. That way we also use only weather variables that really affect demand, leading to more stable and accurate results.

More interestingly, the algorithm can also find relationships that a person might not notice, for example if the correlation with weather is statistically significant but weak in strength. Utilizing machine learning algorithms brings two kinds of benefits: demand forecast accuracy is improved and time savings are significant.

So, what should these models encompass?

Weather-based Demand Forecasting

It’s most effective to build weather-based demand forecasting on top of stable baseline forecasts, which automatically consider things like weekday variation, seasonality, trends, holidays and promotions, allowing the weather model to concentrate on the weather effects. This leads to several benefits in the actual use of weather models.

Different models and their outputs can be separated to quantify whether the weather model really does improve forecast accuracy. In addition, different models and their outputs can be compared transparently, so any potential weather-based forecast uplift can be put into context to verify if it makes sense or not—and whether the retailer should act on it.

It’s also advisable to build a weather-based sales forecasting process that looks iteratively at models on different levels, so that each product in each store get the model that fits its data best. The SKU-store combination is the lowest level and, usually, the most accurate as well. So in theory, each product in each store can get a separate model, because each product and each store can have a different response to weather.

For example, when comparing the weather reactivity in a store in a central city location with a lot of tourists to that of a hypermarket in a location only reachable by car, usually the central city location is much more weather reactive than the hypermarket.

In addition to basic weather data, the best results are achieved when some of the more sophisticated weather effects are considered. Weekday variation is something worth considering. In addition to normal weekday variation, weather reactivity can differ from weekday to weekend.

Another data point to consider is past and future weather conditions. Responsiveness towards weather is usually stronger on the first sunny weekend of the spring, for example, than a sunny weekend in the middle of the summer. Consumers also tend to plan ahead based on forecasted weather, and thus shift their purchases to earlier in the week in the case of an upcoming nice weekend.

Consider Anomalies

Lastly, anomalies in the weather effect need to be considered. It’s possible that high temperatures increase demand, but extremely high temperatures actually decrease the demand because consumers stay home.

Weather reactivity can also vary significantly at different times of the year; while ice cream can be weather sensitive during summer, it is less so during winter. Although the variation in temperature is approximately the same throughout the year, the variation in sales differs significantly during summer and winter. In this scenario, there’s absolutely no point in adding any weather-based sales forecasting during winter, but during the summer the need to incorporate weather into sales forecasts becomes paramount.

Machine learning algorithms can now start to model the relationships between weather and demand and automatically find the products that are sensitive to demand, the relationships between the demand for those products and different weather variables, and the magnitude of those relationships.

It’s time to stop fluctuations in weather from taking your supply chain by storm.

Latest