Coffee Roast & Ground: predict quality values trend

Scenario

Companies in the agri-food sector are a fertile ground for the development of artificial intelligence models; in fact, they produce a large amount of data from the tools used, which are still not analysed to a great extent.

In this context, Technology Reply collaborated with the customer by studying the most suitable solution for his need, developing an algorithm that would allow processing the large amount of data generated by the grinders and automating the process of monitoring coffee quality parameters.

Solution

The development of the algorithm by Technoloy Reply took place via the Python programming language, in particular using the FbProphet library. The choice fell on the algorithm offered by this library as it was decided to understand the time course of the quality variables by exploiting the settings of the mill parameters as additional regressors. In fact, FbProphet is a time series data prediction algorithm based on an additive model in which non-linear trends are adjusted for annual, weekly and daily seasonality. FbProphet is also robust to missing data, a situation that mirrored the case under analysis as for business reasons the mill is not in operation during certain days.

The algorithm is asked, in the face of a new coffee sampling for quality control, to predict the trend over the next two hours of the three quality variables used. The trend of the predicted variables is then monitored on a dashboard where the customer can view the prediction made by the algorithm for each grinder and blend considered.

Advantages

The implementation of algorithms for the prediction of trends of quality variables results firstly in economic savings because, by generating a prediction of the trend for the next two hours, in the event that the predictions fall within the defined quality thresholds, the sampling time for coffee control can be extended, saving on the total quantity of coffee that is taken. Secondly, the use of this algorithm makes it possible to intervene promptly on the grinder settings in the event that an out-of-threshold is predicted in the following hours, thus saving considerable time by being able to anticipate the behaviour of the quality variables.