## 2 Application of Machine Learning to Sales Prediction  
In recent years, machine learning has been applying more and more frequently to sales prediction, due to the different approaches it makes available based on the particular case study [14]. Machine learning allows the implementation of systems capable of automatically learning from data. The system processes historical data as input, in which it searches for repetitive models in order to extract patterns that allow it to predict future purchases and make better decisions. Therefore, the machine learning algorithm does not require any human programming as it automatically generates a model based on the data that it has analyzed. The main advantage of machine learning methods is the ability to process large amounts of data from various sources. However, the result obtained depends on the quality and quantity of the available data. Machine learning algorithms need to be trained in order to provide reliable output. The main types of training approaches are supervised learning, reinforcement learning and unsupervised learning [15]. In the case of supervised learning, a model is built by using a labeled training dataset. During training, the model processes input data where the output signals of the data are known. In this type of training, the model learns to generalize and will be able to match the correct output to new input data. Reinforcement learning seeks to develop a system that improves its performance based on interactions with the environment. In this case, the information about the current state of the environment does not come from a label, but the feedback is provided by a reward signal. During this interaction with the environment, the agent performs some actions that receive a reward (positive real value) or a penalty (negative real value). If the agent has approached the target after the action, the feedback is positive and the reinforcement function awards a reward. Conversely, when the agent moves away from the target after the action, the feedback is negative and a penalty is assigned. Through the interaction with the environment, the agent takes an exploratory approach during which it learns a series of actions that maximize the reward. Finally, in the case of unsupervised learning, the model cannot be trained on a set of data prepared with the correct corresponding output, but it must autonomously identify the differences or similarities between the inputs by identifying their main characteristics. Therefore, the algorithm must discover any existing relationships. Each machine learning forecasting method is characterized by different strengths and weaknesses, such as stability, responsiveness, the amount of data needed, the planning time horizon and computational efficiency. For this reason, sometimes a combination of multiple methods can achieve the best results. Authors [16] present a sales forecasting approach that combines different clustering techniques, such as a self-organizing map (SOM), a growing hierarchical self-organizing map (GHSOM) and k-means, with different machine learning methods, such as support vector regression (SVR) and extreme learning machine (ELM). The resulting models are discussed and compared for computer product sales forecasting. Authors [17] discuss the use of three different machine learning approaches, such as Generalized Linear Model (GLM), Decision Tree (DT) and Gradient Boosting (GB), to predict sales. The comparative study of these different approaches shows that the GB model achieves better performance and greater accuracy. In particular, Root Mean Square Error (RMSE), Mean Square Error (MSE) and Absolute Error (AE) are calculated for the various approaches. In the field of sales prediction, methodologies based on approaches that implement boosting algorithms are of particular importance, due to the accuracy of the predictions [18; 19; 20].