AI-Powered Demand Forecasting in Retail Using MLOps

Our client
Confidential

 

Industry
Retail

_OUR CLIENT

Our client is one of the largest retailers in the Polish market, renowned for offering a wide range of electronic products.

The company owns a substantial number of physical stores, as well as online brands differentiated by their offerings and price levels. The issue they sought to address was the need for more accurate planning of future sales, leading to purchase plans and resulting stock levels that were not always aligned with demand. Orders were previously based on demand reported by product managers, which often lacked consistency and were prone to mistakes. Determined to introduce more order and stability, as well as streamline this process, the client decided to employ advanced machine learning solutions to create reliable sales forecasts.

_NEEDS & REQUIREMENTS

The main goal of the project was to implement a reliable sales forecasting platform with a user-friendly business interface for demand planners, aiming to achieve better precision and automation.

The key objectives were as follows:

The forecasting solution was expected to provide the organization with the following:

_OUR APPROACH

The project consisted of three main parts:

The MLOps platform was specifically designed to fulfill all of the client’s requirements, providing a comprehensive solution that supports training, scoring, versioning, and monitoring processes throughout the entire model lifecycle.

Within this MLOps framework, we trained and deployed a system of machine learning models that generated the final sales forecasts.

The final component of the implementation was the planning application, which enabled business users to analyze forecasts and initiate appropriate business actions

_OUR SOLUTION

An MLOps platform is a set of integrated technological solutions that facilitate the efficient deployment and maintenance of machine learning models. By incorporating various tools and processes, it ensures that technical and analytical users adhere to good DevOps practices while working with ML. The MLOps platform automates model deployment, reducing repetitive tasks for Data Scientists and simplifying development and deployment workflows.

Following the business analysis phase, we closely collaborated with the client’s data engineers to integrate all necessary data from various sources into the staging database. This raw input was then used to prepare data tables in the feature store, which contained the business features required for building the forecasting models. Once the features were implemented based on the data model designed during the analysis phase, our team of data scientists could commence work on the models.

The sales forecasting models were implemented within a short timeframe, thanks to Algomine’s extensive experience in similar projects and excellent cooperation with the client’s experts. Prior to development, we conducted a month-long analysis phase to gain a thorough understanding of the business requirements and formulate a clear and specific plan to meet the expectations.

The list of products was divided into several forecasting segments based on the product hierarchy and revenue. Four models were trained for four typical segments in the client’s business model. For most applications, we utilized variations of the Gradient Boosting algorithm to generate the results. Training, scoring, and monitoring were implemented as microservices that could be run in multiple instances, with data exchange handled using queues. We used MLflow as the model repository and set up a feature store using the Feast library.

At this phase of the project, we generate forecasts for over 5,000 products across approximately 6 price ranges each, resulting in predictions for about 30,000 time series over a 26-week horizon. These forecasts are based on data such as historical sales, stock levels, pricing and promotions, shelf availability, and calendar events. The use of segmentation methods and predecessor dictionaries enables the system to begin forecasting new products even before their launch.

This solution is highly scalable, as it ultimately generates forecasts for approximately 9,000,000 product sales models, which equates to over 50 million time series.

The demand planning application, designed specifically for business users, enables them to work effortlessly with forecast results generated by advanced machine learning models. They can analyze different scenarios and make purchasing decisions based on precise sales forecasts. If needed, users can independently apply expert adjustments, providing them with even greater flexibility in their actions.

 
 

_THE RESULTS

The solution enables the client to forecast sales and make effective purchasing decisions, resulting in a significant reduction in out-of-stock and overstock periods. The solution automates processes related to sales and operations planning (S&OP), purchasing, and the operationalization of business activities. As a result, the planning department’s efficiency has greatly increased, allowing them to tackle new business challenges.

The main objectives of the project were fully achieved:

Through parallelization, the entire training process was shortened to approximately 3 hours, achieving a mean absolute percentage error of only a few percent for a group of popular products.

The delivered pipeline is a comprehensive solution that automates the entire sales forecasting process while providing business users with control over the governing parameters.

top
HAVE A QUESTIONS?

Write to us

    Contact us

    1720249241178

    Marcin Wilczura

    TT InnOps CEO
    & COO of Transition Technologies PSC
    1728456380211

    Przemysław Niekraś

    TT InnOps CTO
    & DevOps Practice Lead