Our Stories
The challenge of Pastificio Trafilata: forecasting sales in the near future
The main problem addressed in this project was the development of a reliable sales forecasting model for the Trafilata pasta factory. This model needed to be able to analyze historical sales data from the past three years and use it to predict future sales trends. This is not a simple task, as sales can be influenced by a number of factors, many of which can change over time. Therefore, the model needed to be flexible and adaptable to account for these variations. Additionally, the model had to be implemented in a way that could be easily integrated into the company's existing operational processes.
Our solution was the implementation of a predictive artificial intelligence model. This model was trained using the company's historical sales data from the past three years, allowing it to identify trends and patterns in sales. The model was then optimized through a training and validation process to ensure its reliability and accuracy.
The result is a web service, in the form of an API, that the company can easily integrate into its operational processes. This service allows the company to obtain accurate forecasts of future sales based on the predictive artificial intelligence model.
This tool not only improves the company's ability to predict its sales but also facilitates business planning and optimization. In fact, thanks to these forecasts, the company can anticipate customer demand, manage inventory more effectively, and optimize production.
For predicting the sales of Trafilata pasta factory, AI was used with Python as the programming language. Tools used include Pandas for data manipulation, Scikit-learn for machine learning models, Matplotlib for plotting, Google Colab as the environment, and Prophet for time series analysis.
The model deployment process involved several key steps to ensure a secure, reliable, and scalable execution environment. Here is a detailed description of the steps followed:
Thanks to this structured approach, we benefited from greater operational efficiency and better application availability. The combination of Docker, AWS ECR, and ECS facilitated the management of the deployment lifecycle, from building the image to releasing it in production, ensuring horizontal scalability for variable workloads and flexibility to quickly adapt to the evolving needs of our project.
Our product, a web API, integrates easily into business processes to provide precise sales forecasts through a predictive artificial intelligence model. The API is intuitive, customizable, and enhances sales forecasting, production optimization, and inventory management.
Here is an example of a chart created to estimate sales forecasts for a specific type of pasta on a monthly scale.
The data shows actual sales with the black dot, the estimated sales average with the blue line, and the margin of error with the blue shade.
The numbers above describe the accuracy of the estimate, in detail:
Next, we have RMSE. It works similarly to MAE, but it calculates the square root of the mean squared error, which means smaller values have less weight.
Finally, we have MAPE. In this case, its value of 0.56 indicates that on average, the prediction error is 56%. This means that if the forecast was 100, the actual value could vary by 56% on average, either up or down.
Artificial intelligence has the potential to revolutionize every aspect of business, including improving sales forecasts. As demonstrated by the case of Trafilata pasta factory, a predictive artificial intelligence model can provide valuable insights and help optimize business operations.
If you are interested in seeing how your company can benefit from artificial intelligence, we are here to help. Contact us to discuss a personalized case study. Send us an email or use the form below.
Not sure where to start? Talk to us.
If you need to design and build a prototype, take your project from concept to fruition.
Contact us today for your free consultation.
hello@palmabit.com
Via Monsignor Oscar Romero 5
25018, Montichiari (BS)
Via Francesco Olgiati 26,
20143 Milano