# Augmented Data and XGBoost Improvement for Sales Forecasting in the Large-Scale Retail Sector
## 4 Conclusions  
In this paper, we discussed the implementation of a predictive model, based on XGBoost algorithms, that was applied for forecasting sales in the large-scale retail sector. It is a multi-parameters model that allows for the consideration of various factors, such as, for example, the weather conditions that are very important for fresh products. However, the use of many parameters makes the method very precise, but it requires an adequate number of historical data to train the algorithm. To make up for the lack of data, the AD technique was used. This technique of enrichment of the training dataset has already been applied with excellent results to LSTM neural network models, but it was for the first time used for an XGBoost algorithm. Here the method, was tested on only one product, which is characterized by the 3000055 PLU code, with very promising results. The approach will be tested on the other products in future works. The test carried out for the prediction of the chosen product allowed us to validate the method through the calculation of MSE and RMSE errors. The results reported in Table 2 confirm that for both errors the accuracy improved due to the use of the technique. The improvement in the case of MSE is particularly advantageous; in fact, it decreased by an order of magnitude. Finally, the use of XGBoost algorithms corroborated by the AD technique allowed us to implement a sophisticated model, as it is based on the use of many parameters, but is also robust because it is capable of enriching the training dataset and obtaining an excellent accuracy measured in terms of MSE. \begin{table}
\begin{tabular}{c c c} \hline \hline
**Item** & \
\begin{tabular}{c} **Original Data** \\ **RMSE (RMSEP)** \\ \end{tabular} &
\begin{tabular}{c} **Augmented Data** \\ **RMSE (RMSEP)** \\ \end{tabular} \\ \hline cream (Figure 12a,b) & 1.56 (1.05) & 0.53 (0.16) \\ paper towel (Figure 12c,d) & 0.93 (0.65) & 0.38 (0.19) \\ flour (Figure 12e,f) & 2.10 (1.62) & 0.84 (0.66) \\ still water (Figure 12g,h) & 1.25 (0.89) & 1.20 (0.88) \\ sea salt (Figure 12i,j) & 1.00 (0.89) & 0.38 (0.19) \\ tomatoes (Figure 12k,l) & 4.00 (0.79) & 1.70 (0.28) \\ mozzarella (Figure 12m,n) & 2.13 (0.24) & 0.72 (0.072) \\ frozen soup (Figure 12o,p) & 0.76 (0.76) & 0.53 (0.53) \\ fresh milk (Figure 12q,r) & 2.04 (0.44) & 0.85 (0.13) \\ scarmorze (Figure 12s,t) & 0.62 (1.96) & 0.33 (0.40) \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Accuracy (RMSE and RMSEP) results of the XGBoost model when trained with original or augmented data for various items. \begin{table}
\begin{tabular}{c c c} \hline \hline
**Item** & \
\begin{tabular}{c} **Original Data** \\ **Run Time (s)** \\ \end{tabular} &
\begin{tabular}{c} **Augmented Data** \\ **Run Time (s)** \\ \end{tabular} \\ \hline bread (Figure 9a,b) & 84.54 & 69.77 \\ bread (Figure 9c,d) & 67.61 & 95.28 \\ cream (Figure 12a,b) & 55.69 & 69.65 \\ paper towel (Figure 12c,d) & 70.67 & 68.02 \\ flour (Figure 12e,f) & 79.33 & 62.17 \\ still water (Figure 12g,h) & 57.06 & 61.98 \\ sea salt (Figure 12i,j) & 57.94 & 59.19 \\ tomatoes (Figure 12k,l) & 109.36 & 84.59 \\ mozzarella (Figure 12m,n) & 55.77 & 58.65 \\ frozen soup (Figure 12o,p) & 56.87 & 60.55 \\ fresh milk (Figure 12q,r) & 76.95 & 118.38 \\ scarmorze (Figure 12s,t) & 60.62 & 66.53 \\ \hline \hline \end{tabular}
\end{table} 
Table 5: Computational cost of the XGBoost model when trained with original or augmented data for various items. **Author Contributions:** Conceptualization, A.M., A.P. and D.G. ; methodology, A.M.; software, D.G., A.P. and A.M.; validation, A.M. and A.G.; formal analysis, A.M.; investigation, A.M.; resources, A.G.; data curation, D.G. and A.M.; writing--original draft preparation, A.P. and A.M.; writing--review and editing, A.M., A.G. and A.P. ; visualization, A.M. and A.P. ; supervision, A.M.; project administration A.G.; funding acquisition, A.G. All authors have read and agreed to the published version of the manuscript. **Funding:** This research received no external funding.