Improving Demand Forecasting Models with Event Features
Learn how to integrate PredictHQ's event features into your demand forecasting model.
Last updated
Was this helpful?
Learn how to integrate PredictHQ's event features into your demand forecasting model.
Last updated
Was this helpful?
The inclusion of PredictHQ's event data can significantly enhance the performance of machine learning models, such as those used in demand forecasting. For example, the delivery company , with others noting decreases of up to 5-10% or more.
This tutorial will guide you through the process of identifying, retrieving and integrating relevant, demand-driving event data as features into a demand forecasting model. Follow along by running the accompanying Jupyter notebooks while referring to the provided links for more technical details. The tutorial concludes with a practical example of a demand forecasting model that incorporates PredictHQ event features.
Demand Forecasting
Accommodation, Consumer Packaged Goods, Grocery and Supermarkets, Leisure, Travel and Tourism, Marketing and Advertising, Parking, Restaurants, Retail, Transportation and Delivery and Others
Events, such as concerts, expos and public holidays, are known to affect consumer behavior and . PredictHQ offers event data across , featuring a . The ensures the delivery of high-quality, enriched event data that can be seamlessly incorporated as features into any demand forecasting model.
Built upon extensive event coverage, PredictHQ’s event features aggregate similar events into predefined groups for specific locations at set intervals, such as daily aggregations. These prebuilt, forecast-ready features can be added directly to machine learning models without further preprocessing. Access to an extensive library of features is available through the . We recommend starting with the Important Features identified by the .
The sections below guide you through integrating event features into your demand forecasting models. Follow these instructions and run the accompanying Jupyter notebooks to understand how you can adapt this approach to fit your workflow and improve the accuracy of your models.
Most steps are handled by PredictHQ APIs; you just need to provide the following for each store or location:
Historical demand data
Latitude and longitude
Industry
There are two main strategies for determining a list of Important Features for a store or location: Important Features tailored specifically to the store or location, or Important Features based on a group of stores or locations. See below and choose the approach that best suits your operational needs.
phq_attendance_*
sum
phq_impact_*
max
phq_rank_*
rank-weighted sum
phq_spend_*
sum
phq_viewership_*
max
Predicted Impact Patterns
By following this tutorial, you should now understand how to enhance your demand forecasting models by integrating PredictHQ's event features. As known drivers of demand, incorporating event signals can noticeably improve the accuracy of your forecasts, empowering you to make more informed decisions and strategize more effectively.
Adding event features to a demand forecasting model involves straightforward steps. These include pulling a list of Important Features from the and retrieving prebuilt, forecast-ready features from the for a store or location.
With countless events taking place globally throughout the year, identifying events that impact demand at your location is crucial. The automatically provides a list of Important Features based on your historical demand data and location. Alternatively, you can access in our and directly from your browser.
If you are able to implement individual models for each store or location, the Beam API’s endpoint is recommended. It provides a list of Important Features tailored specifically to your store or location. Also referred to as in our WebApp, these event features (or categories) are identified as having the greatest impact on your demand.
If you manage multiple stores or locations and require a unified set of features, the Beam API’s endpoint is recommended. It provides a consolidated list of Important Features across all stores or locations within an based on aggregating Feature Importance results from contributing stores or locations.
Ensure you have enough time-series data that meets . Demand can be quantified in any unit relevant to your forecasting model. Common examples include sales in USD for retail stores, number of orders for restaurants and revPAR for hotels.
Specify your industry as there are several industry-specific settings required in this step such as when using the . If your industry is not covered, please use the default other
:
Define the catchment area around your store or location using a center point and radius approach. The recommends a radius specific to your industry and latitude/longitude. Custom configuration is also available.
Set a minimum based on our to focus on events that are likely to influence your demand, while excluding those that are too small or irrelevant.
The provides access to a library of prebuilt, forecast-ready features ready for direct integration into your machine-learning models. Simply specify the date range, location and list of features, all of which can be sourced from the .
from the Features API vary based on the . Most come with a suite of statistics that indicates how the underlying event data is aggregated daily for a location, e.g. sum, max, count. For phq_rank_*
features, the response is the daily number of events for each of the . We recommend the following aggregations:
Some features consider the additional impact from events before and after scheduled dates, offering a more accurate representation of event impacts on demand. This is known as , which vary by event category and industry. Features including Predicted Impact Patterns are denoted with an industry suffix, such as phq_attendance_sports_accommodation
or phq_impact_severe_weather_air_quality_retail
.
Event features provided by the are prebuilt, forecast-ready and ready for immediate use. They can be integrated into your existing dataset by merging based on location ID and date. Incorporating these event features can enhance your model's performance by adding valuable demand-driving event data.
For future predictions, you can access forward-facing data, such as the next two weeks or the upcoming month, by querying the . Work closely with your engineering team to ensure these new features are effectively incorporated into your production pipeline.