Improvement in the purchase of imported goods through machine learning models for intelligent decision making

Demand planning related to making purchases of SKUs to maintain the SLA given by the company’s strategy and thus avoid stock breaks has an important role in the operation of the supply chain and the company’s operation. Demand forecasts based on qualitative methods and manual methods based on historical data obtained impact on production planning, consequently, the fulfillment of the products the customer requires. The objective of defining and implementing a purchasing recommender has been raised based on the machine learning model that more effectively adapts to variations in demand for products classified under an ABC model. Scikit-learn libraries are used to implement demand prediction models trained with historical product information. The result is a proposed prediction model with a better confidence level than the company’s current prediction model.


RESUMEN
La planificación de la demanda relacionada con la realización de compras de SKU para mantener el SLA dado por la estrategia de la empresa y así evitar quiebres de stock, tiene un papel importante en la operación de la cadena de suministro y la operación de la empresa.Los pronósticos de demanda basados en métodos cualitativos y métodos manuales, basados en datos históricos obtenidos, tienen un impacto en la planificación de la producción, en consecuencia en el cumplimiento de los productos requeridos por el cliente.Se ha planteado el objetivo de definir e implementar un recomendador de compras, basado en el modelo de machine learning que se adecue de forma más efectiva a las variaciones de la demanda para productos que están clasificados bajo un modelo ABC.Se utilizan las librerías Scikit-learn, para implementar modelos de predicción de demanda que son entrenados con la información histórica de los productos.El resultado es un modelo de predicción propuesto con un mejor nivel de confianza que el modelo de predicción actual usado por la empresa.

INTRODUCTION
The purchase of products to satisfy the demand is a vital part of the company's business that participates in the industry of bolts and screws and is oriented to the competitive strategy of cost leadership.The strategy implies that purchases must be made with a forecast of at least nine months since it is considered that the stock is stored between three to six months with the estimated consideration of three months of transportation.The competitive environment drives the company to buy products effectively to avoid overstock or outages; this implies that the demand forecasting methods to make purchases must reach an optimal level of confidence.
This paper aims to propose a purchase recommender that responds to a prediction model using machine learning techniques with specialized libraries in the use of time series based on predictive analysis techniques.The recommender uses historical data that allows machine learning models to be trained and then to evaluate and establish the confidence level of each proposed model based on the model used.Each model is applied to four groups that are made based on the application of the ABC model of inventory classification.
Five machine learning models are applied to each SKU from each group, and the model that delivers the most correlated error concerning the historical demand for each SKU is selected.
The proposed recommender model exposes an improvement of 20% on average.Compared to the current model, which allows it to be implemented in applications used by purchase analysts.
The present work proposes a platform that allows adding demand prediction models, whether statistical or neural networks, for demand prediction so that all the models are applied to the platform, and then the result of the model that best responds to each Stock Keeping Unit (SKU) Behavior.As a reference, this project uses the CRISP-DM methodology [1] [35] to apply machine learning models in this project.Therefore, following the framework shown in Figure 1, used in this research, the data extraction, cleaning, and processing phase is performed at the initial stage, followed by machine learning models that finally provide a trained model as a recommendation.

OVERVIEW
The company and its competitive strategy Chile's Bolts and Screws Industry gravitate in a highly competitive environment or red ocean [2].Therefore, it must differentiate itself from the competition by creating a blue ocean, to achieve more significant market shares.The company uses the competitive strategy of cost leadership [3] and seeks to differentiate itself from its competition, adding to its strategy, innovations that drive it to change the operation in its value chain demanding to be more flexible oriented to the needs of the client and/or changing conditions of the market and the environment.
The company focuses on the import and sale of bolts, fasteners, and screws in general, orienting itself to the customer through the mix of products and the availability of its products, where the guidelines are followed; "always have available the products sought by the customer" and "always have the products available when customers need them." The guidelines guide the company's value chain, generating coordination of the areas based on the company's competitive strategy.The requirement to separate channels to reach groups of clients generates the need to convert the products purchased and imported in large volumes from abroad into packages with smaller volumes through the process called "maquilado," which consists of packaging of products.
The company calls the products imported from abroad in large volumes "Parent SKUs" or "Parent Codes," and the manufactured products, which correspond to the parent products grouped in various packaging formats, are called "Child SKUs" or "Codes Son."

The inventory management model
In a company that must purchase products to satisfy customers' product needs sales information is the source of information for determining demand, understanding that the information incorporates variations due to uncertainty due to external market conditions and internal operations of the company.
The company that uses an inventory management model based on competitive strategy [4] uses ABC classification models to organize internal operational management.In this context, inventory planning becomes important, given its impact on costs and economic results of the company based on compliance with the SLA, as shown in Figure 2.
The first step identifies or places the company's strategy in a competitive environment concerning service levels, defined as a percentage of product delivery to the customer, given by equation (1) that the company sets at 98%.
Where: N S : Percentage of the Service Level, per sales note.P f : The SKU number, effectively delivered to the customer in a sales note.P nv : Number of SKUs committed to deliver to the Customer in a Sales Note.
The second step establishes a classification of the products according to criteria consistent with the company's strategy.This classification establishes the relevance of products based on demand, such as where they are named in groups A. B. C and D, where: • Classification A: represents 3% of the Child SKUs and 1% of the Parent SKUs that generate 80% of the turnover.These products require strict checkout, with periodic reviews regarding stock levels with attention to the records' accuracy.These products need to be reviewed to determine whether to remove or promote their sale.
The actions defined to be carried out for each classification are;  In the third step, a demand forecast is made for each Parent SKU.The forecast is made for each product by analyzing the historical behavior of 12 moving months from the month prior to the one in which it is located.
For products classified as A, B, and C, demand is forecast using the Simple Average Method, Simple Moving Average Method, Moving Weighted Average Method, Simple Exponential Smoothing, and Double Exponential Smoothing [5][6].Classified products are only applied to Simple Average Method analysis if they are in demand.
After applying the statistical techniques for the analysis of demand, the most appropriate model for the historical behavior of the product is selected through the analysis of the absolute standard deviation, the accumulated forecast error, the mean absolute percentage error, and the signal tracking [7] and the use of the cumulative sum of the errors for the bias together with the mean absolute deviation for the dispersion.
In the analysis process, it is taken into consideration that the company assigns the same weight to bias errors and dispersion errors; consequently, for each Parent SKU, the forecast method that best represents the variability of the variation is used, demand and allow better adjustment of inventories based on the guidelines of the company's strategy [5], [8].
A criterion that the company defines as part of the company's competitive strategy concerning inventories is the existence of three months of inventory per monthly rotation for the Child SKUs and 9 months for the Parent SKUs, that is, the number of monthly turnovers multiplied by three months for the Child SKUs and the amount of monthly turnover multiplied by 9 months for the Parent SKUs [9].
The cycle for calculating the demand for each product is reviewed periodically based on the classification of the products, from classification A to C; therefore, the variability of the demand caused by commercial actions, market conditions, or changes in the company strategy cause changes in stocks that affect the level of service.
The fourth step is oriented to the selection of an inventory policy following the needs of the company's competitive strategy; the analysis of the demand provides guidelines based on the variability of this and the seasonal nature.Based on this, coupled with the given classification, inventory policies are selected for classifications A, B, and C [10], [11].
Classification A. It is defined to use a periodic review policy since this policy contains a stricter control criterion in accordance with the definition of the product classification [12], [13].
For classification B and C; it is defined to use a continuous review policy since this policy contains less strict control criteria following the definition of the classification [10].

Problematic situation
The purchase of SKUs from foreign suppliers carried out by the company's import area requires a high degree of coordination with the suppliers to avoid falling into stock breaks due to delays in the dispatch and transportation processes of the SKUs acquired, mainly from China and India.Therefore, the increase in time dedicated to analyzing the quantities of Parent SKUs to be purchased, which include demand projections, added to the time it takes for suppliers to respond to quotes and send orders once the conditions have been commercially accepted become more complex as the number of SKUs increases.
There are diverse situations that make the analyst's job difficult.First of all, although the analyst is supported by tools that provide him with the data calculated with the mobile monthly demand and the classification, the associated regression analysis work that must be applied to the Parent SKUs, together with the increase in the demand in a sustained way, does not allow to review in its entirety the SKUs classified as C. Another problem is observed in the Parent SKUs classified as D since not all have zero demand, and they can also be products that are on the rise.These issues can turn into high-turnover products, and if they go bankrupt, even if the SLA is met, the loss of competitiveness is latent.
Lastly, the current market uncertainty, inflation, and the increase in currency exchange, among others, do not allow simple product purchase decisions without considering the company's historical data on purchases.
Given this context, the following questions arise: How can a support system for analysts be implemented to calculate demand, which considers statistical regression analyses automatically?Is it possible that the model delivers a function that estimates the demand and indicates whether the demand is rising or falling for the Parent SKUs of all the product master classifications?Is it possible to have a purchase recommender for Parent SKUs that reduce analysis times for purchase?Availability of a medium-long-term demand projection.Machine Learning processes historical sales data to transform it into useful information.
It is possible to use empirical information to understand better the behavior of the products purchased in the company, train a model, and thus make better decisions based on data.This understanding is how the future prediction of the demand for different products is an area where Machine Learning contributes to reducing risk when purchasing.This risk reduction provides valuable tools for studying variables that will facilitate decision-making related to inventory management, by predicting an attribute of continuous value using the supervised learning perspective.

Related Works
The study of the demand prediction models' state of the art concludes, "It is necessary to evaluate and test different models to find the most suitable for the reality under analysis.A resource used in different realities is constructing its demand forecasting model using techniques, aspects, concepts, and characteristics of different methods and models.However, monitoring the adopted model by measuring the forecast error is essential to exercise control over the model and make corrections as quickly as possible."In this sense, apply prediction models and compare them based on their error coefficients to select the most suitable for prediction at a given time [14].
As described in the work of Qian and Rasheed [15], stock market prediction is a challenge where some machine learning models can contribute to increasing such prediction.The researchers Nayyeri, Jabani, and Mosavi [16] applied a similar approach, where ten different machine learning algorithms were applied.Some other approaches have been included in the literature, such as the work presented by Singh and Srivastava [17], where deep learning improved the accuracy of stock market forecasts.
The article by Diaz [18] addresses the application of a Machine Learning forecast model to establish the demand for the main material used in oil well drilling by applying a model leaving aside other models, so that this work is necessary to evaluate more models that participate in the prediction and thus select the model that best responds in predicting the demand for each SKU in a given time.
Demand estimation through machine learning models or forecasting techniques based on quantitative and qualitative historical information [19].The research work called "Comparative analysis of traditional and modern models for demand forecasting" [20] performs an analysis of demand forecasting methods through time series analysis, concluding that; "There is no forecasting model that can perfectly determine future demand," exposing the situation in which applying several methods for a future forecast in a given time, it will not be known which is the best until the result is at any given moment.The work exposes that the precision of the prediction will depend on the quantity, the quality, and the particular behavior of the time series data.This information indicates that the ABC grouping helps to obtain better results in the SKUs with higher rotation, therefore, greater quantity and quality of dataAn approach to selecting the prediction model applied to anticipate a demand is addressed in the work of Porteiro, L. Hernández-Callejo, and S. Nesmachnow [21], where the model is selected through the error coefficients.

ABC classification
The ABC classification is used in companies of various industries to categorize products based on demand or a relationship between demand and costs, among other possible combinations.That is why this type of classification groups the products from the most significant to the least significant [22].
After classification, forecasting techniques are used to obtain a future value based on the historical information of the classified products.This estimate determines the pattern that allows exposing the product's behavior in the future under similar conditions, both within and in the environment of the company, understanding that the conditions are a source of variability generation.

Forecast Methods
Forecasting methods are classified as qualitative and quantitative.The qualitative ones, in general, depend on the expert judgment of actors who have been studying the variables of the company's products for a long time and support future predictions.In this context, techniques such as the so-called Delphi are used, which consists of bringing together several experts and establishing a consensus forecast.In this context, techniques such as the so-called Delphi are used to bring together several experts and establish a consensus forecast.Curve fitting is also used, where the expert prepares a representative curve of the product's behavior and compares new products with characteristics similar to the one represented with this curve.These methods are currently used in the company under study to support our forms of estimation that have been incorporated.
Quantitative methods aim to find patterns in the products' historical data and establish future projections of behavior.These methods lead to the application of numerical analysis, such as time series methods that use historical data to estimate future results; where there are several methods for such an effect, such as the naive method, which assumes that the variable to be predicted has the same value as its measurement, previous; moving average, where the prediction is the result of the average of n previous observations; decomposition methods, which break down the time series into four components to describe each of them separately, thus managing to describe and predict the time series as a whole; exponential smoothing, seeks to smooth the series to have a better idea of the behavior of the trend, to obtain a more reliable forecast [23].
Predictive statistical analysis in multi-product environments guides the company to find ways to apply supervised models to determine the demand in specific periods of time.In this sense, Méndez and López [22] expose the application of various predictive models for estimating demand, where by analysis criteria, Exponential Smoothing (SE), Additive Exponential Smoothing (EA), Multiplicative Exponential Smoothing (EM), Linear Additive Smoothing (LA), Linear Multiplicative Smoothing (LM), On the other hand, low-involvement techniques such as Linear Models (ML).

Regression Analysis
Regression analyzes are used to discover trends in data sets.An equation determines the prediction based on the input data entered into the equation.In this sense, a dependent variable must be defined that will be explained given one or more independent variables.
Nonlinear regression aims to find a function that describes the nonlinear relationship between a continuous response variable and one or more variables, predicting new observations.The aim is to find a polynomial function of a higher degree that minimizes the error.This method allows an almost perfect fit, obtaining an error equal to zero.With this comes the problem of considering the noise (outliers) as part of the valid data, which means that the function obtained does not correctly represent the behavior since it considers the noise data as part of the phenomenon.In the context of Machine Learning models, overfitting should be considered, called "overfitting," it is a problem that causes a model to be unable to generalize [24].

Machine Learning Models
Machine Learning Models use historical information to improve the performance of predictions through training processes.This condition makes the application of Machine Learning models allow the arrangement of classes to which a new entry belongs.The regressions, where it seeks to predict a value; ranking, where data is ordered based on some criteria, clustering, used for the segmentation of customers and products to guide commercial actions, reduction of dimensionality, where it is sought to transform a large number of dimensions into fewer dimensions, maintaining the properties of the original representation [25].
Machine learning is the discipline that guides the development and application of models, algorithms to learn from data.This learning refers to learning from data; this indicates that an algorithm is not developed to solve a specific problem; instead, a generic learning algorithm provides solutions and allows learning how to solve the problem [34].

Generalized linear models
Regression analysis belongs to the area of supervised Machine Learning to establish a model for the relationship between a specific number of characteristics and a target variable, seeking to obtain a quantitative answer.
Regarding a data set, the regression algorithm will establish a model that adjusts the dependency relationship between the independent variable and the value of the dependent variable; it is obtained by establishing an arbitrary line and the distance from the line to the given points.This distance, the vertical lines, are the "residuals" or the "prediction errors."The regression algorithm recalculates and moves the line with each interaction until it reaches the line that fits the data points with the slightest error.
Simple linear Regression is a relationship between a dependent and an independent variable.Equation (2) exposes the relationship, called the equation of the line, where m is the slope and n is the intercept When obtaining the equation of the line from a sample, the coefficients are statistical and not parametric.The equation is obtained by incorporating the error into the equation of the line, which is known as random error or noise and is defined as the difference between the real value and the approximate value = Y R -T A , as shown in equation ( 3).This method allows obtaining a prediction of Y knowing the variable X, seeking to obtain an ε close to 0. Several methods can be applied to find the relationship between the variables x and y, each trying to mitigate the problems the other model does not address [36].
Least square approach is a numerical analysis method where, given a set of data, it is sought to determine the function that best represents the data employing a fit line.In its simplest form, this method seeks to minimize the sum of squares of the difference in ordinates between points generated by the function and the input data.This method is used to analyze data obtained from a study to express its behavior in a linear way, minimizing the errors of the data set obtained, as shown in equation (4).
Bayesian Linear Regression is a regression model defined in probabilistic terms.The estimate is not made as a single value but is drawn from a probability distribution.The model for Bayesian linear regression with the response sampled from a normal distribution is given by equation (5).
The mean for the linear regression is the transpose of the weight matrix multiplied by the predictor matrix.The variance is the square of the standard deviation σ multiplied by the Identity matrix because this is a multidimensional model formulation.This regression model aims to determine the posterior distribution of the model parameters.The response is generated from a probability distribution, and the model parameters are assumed to come from a distribution.The posterior probability of the model parameters depends on the training inputs and outputs, as shown in equation ( 6), where P (β | y.X) is the posterior probability distribution of the model parameters given the inputs and outputs [26].
Linear Lasso Model (Least Absolute Shrinkage and Selection Operator) combines a regression model with a procedure of contraction of some parameters towards zero and selection of variables, imposing a restriction or a penalty on the regression coefficients [27].Robert Tibshirani introduced lasso in 1996 based on Leo Breiman's work on the Garrote [28] Non-Negative to improve the accuracy of the predictions of statistical regression models.
As shown in equation (7), it mathematically consists of a linear model with an added regularization term.Where the exact relationship between t and λ depends on the data.
This linear model estimates scattered coefficients.It is used in contexts where the tendency to prefer solutions with fewer non-zero coefficients effectively reduces the number of characteristics on which the given solution depends [29].
Polynomial regression is a form of linear regression where the relationship between the independent and dependent variables is modeled as a polynomial of order n.It is used to describe non-linear phenomena, where the linear model is extended by adding additional predictors obtained by raising each of the original predictors to power, as shown in equation (8).

Determination coefficient
The R-squared coefficient of determination (R 2 ) predicts outcomes or tests a hypothesis.It determines the quality of the model and the proportion of variation in the results.In simple linear regression, R 2 the square of the Pearson correlation coefficient indicates the percentage of the variation in one variable due to the variation in the other.If there are several results for a single variable, R 2 corresponds to the square of the coefficient of multiple determination.
In both cases, the R 2 acquires values between 0 and 1 [30].Table 1 shows a way to classify the results of R 2 , to have an interpretation of the results obtained: In this study, when applying a linear regression model to a set of values, the application delivers an R 2 , where the model that delivers a higher value will be the one with the highest correlation.

Automatic adaptation to change
Machine Learning trains a model from a data set.The selected model is evaluated for errors; if not found or within acceptability parameters, the model can be used.Otherwise, the errors are analyzed, and the algorithm is retrained [31].Thus, a model of automatic adaptation to applied change is presented in this proposal, where the operational relationships between each stage are found, as can be seen in Figure 3.
Steps one (1) and two (2) are the business applications that are related to the business database where the transactions are recorded.Then, through the ETL (Extract, Transform, and Load), the data is processed (step 3) and transferred to the analysis database (step 4).Consecutively, in the stage of applying Machine Learning (step 5), the data is taken from the database, processed, and the results are delivered, which are entered again into the analysis database (step 4).Subsequently, it returns to the ETL stage (step 3), where the information is taken from the analysis base and deposited in the business base, remaining available for use in step 1. Special mention should be given to steps 3 and 5, which an Automator coordinates to synchronize the executions temporarily.

IMPLEMENTATION Data identification
Given the monthly demand volumes, the company uses a four-stage inventory management model [4] to organize the company's sales resources and meet market needs.As shown in Table 2, there are 20,003 SKUs in the company's product sample (10,525 + 9,478).In addition, the sum of the monthly demands of each parent SKU added to the demands of the child SKUs adds up to an average of 65,782,846 monthly units, as shown in Table 3.
Generally, there is a significant rotation of A-class products, with 80% of the total units, but it represents 1% of Parent SKUs of the same class.In comparison, a high percentage of parent SKUs are classified D (92%) but with a low turnover (5%).
There are 9,478 existing Parent SKUs in Table 3, which is the current number of Parent SKUs selected.However, this number varies from month to month depending on the variations and needs of both the business and the market; therefore, a set of Parent SKUs with data history was selected, eliminating the new Parent SKUs and leaving a stratification by classification as shown in Table 4, leaving 267 SKUs out of the analysis.
The company, based on its business definitions and considering that it makes purchases with a scope of 6, 9, and 12 months to avoid bankruptcy, defines to consider only products that are sold six months in a period of one year, leaving out the SKU Parents that do not meet this condition, as shown in Table 5, where the largest number of products that will not be selected are classified D, mostly for sales projections between 11 and 12 months.
As a result of eliminating the Parent SKUs that do not meet the sales forecast condition in short periods (6, 9, and 12 months), the number of Parent SKUs is reduced by 45% of the data set.
The distribution of Parent SKUs by classification is show in Table 6.

Data subsets
The data set extracted from the company's database is divided into subsets, which comprise the training, validation, and testing data set.The data from the training subset is used to train the model.The results obtained are contrasted with the validation set to evaluate the results.Finally, the model is used with data from the test subset to generalize with the model on data yet be used.
The subset selection is usually made with 80% for the training subset and 20% for the validation subset.The validation subset is selected with diverse samples and a sufficient number of samples to check the results once the model has been trained.

Data collection and organization
The data extraction from the business database (Base of Operations) is executed through the ETL process.The implementation is done with the Pentaho tool [32].Finally, the data is deposited in an analysis database, as shown in Figure 4.
The data obtained from the operational system corresponds to the database tables that contain the following features: • Product Master: Contains the information on the active codes of master products and their relationship with the child codes and the packaging units to be able to carry out a normalization of demand units.

Data selection
The selection of the data considers the performance of cross-validation as a statistical technique to test the performance of a machine learning model.
The monthly demand historical table data is segmented into groups of 12 moving months, which are used to train the model and validate.The segmentation is selected based on the definitions of the business, which must acquire the parent SKUs with a projection of 6, 9, and 12 months.
The groups selected for training and testing are separated by a split at the time of training the model in 80% training and 20% testing.The groups called for validation are the data used to evaluate the prediction of the trained model, as shown in Table 7, Table 8, and Table 9.
Here it has been considered that the percentage of data selected for validation is much higher than the data group for testing because it was necessary to ensure that the model entered values very close to those projected by the validation set.Thus, group 1 of Table 7 is used for the base configuration of the model, to then begin training and data validation with those of the validation group.The data segmentation structure is oriented to measure the variations of the prediction.

Machine Learning Models
Given the nature of the problem to be solved, regression models were selected to be able to make product demand predictions.These models are part of the supervised machine learning algorithms group since it will be necessary to train the models with historical data from the business.The libraries used to implement the models are obtained from Scikit-learn [33].A brief description of the models used is shown below: • Ordinary Least Squares (M1).This model is linearly fitted with coefficients w = (w1..... wp) to minimize the residual sum of squares between the targets observed in the data set and those predicted by the linear approximation.
• Bayesian Ridge Regression (M2).This model includes regularization parameters in the estimation procedure.The regularization parameter is not set strictly but is adjusted to the available data.• LARS Lasso (M3) has been implemented based on the LARS algorithm.Unlike the implementation based on coordinate descent, this model provides a more exact solution, which is piecewise linear based on the norm of its coefficients.• Polynomial Regression (M4), this model focuses on maintaining the generally fast performance of linear methods while allowing them to fit a large volume of data.
The following sequence of steps is applied to train the models (M1, M2, M3, and M4) for each proposed machine-learning technique: 1.The first model selected (M1) has the normalization parameters applied and is parameterized with 10% of the data to create the test data set.2. The algorithm is executed, and the score is recorded for each SKU evaluated.Then the process is repeated for the same algorithm from the first step; however, the test data set is parameterized at 20% this time.Finally, the process is repeated, with the parameterization of the test data set at 30%. 3. The recorded score data of the three executions are evaluated, and the parameterization with the best score is selected, registering the slope (M1_P), the intercept (M1_B), and the score (M1_err) for the model executed by each SKU of the model data set.
With the information obtained, the data for each SKU of the columns M1_err, M2_err, M3_err, and M4_err are evaluated, which represents the score of each applied model and is used to identify the model that best fits the prediction (with the best score) for each Evaluated SKU.For example, if the best score corresponds to the M3 model, the prediction for the SKU is made using the third model.

Data Processing
Through Python, the outputs of the 4 applied models are processed to consolidate the best SKUs.The script must pick the largest M_err of each SKU for the four models.
Subsequently, a column called Trend with the values <Down Linear, Rising> must be added to the consolidated file and stored in a company database.Finally, the developed application connects to the analysis database, extracting data and processing it to deliver the result of the application of the models, as shown in Figure 5.
The result of the processing is deposited in the analysis database, obtaining information in the data set for each SKU as shown in Table 10, Table 11, Table 12, and Table 13.The tables are highlighted in color, indicating which model is selected; the model with the highest correlation is selected, being used for the prediction highlighting in the column ending in "_P" the slope, for example, for the SKU 7410209999900G, the M1_err is the prediction that is closest to a positive correlation; therefore, for the prediction made for the SKU 7410209999900G with the given data set, for a given time the model M1_P is selected, and the slope is -1,589.17.This process is applied for each SKU used by the company's product master every time the model is applied, and the data set changes as the month progresses.
Table 14 shows the selected model for each SKU that the models to be evaluated apply to.

Current model
The current demand forecasting model for Parent SKUs is grouped using the ABC classification.This classification is used to keep under strict control the products that represent 20% of the SKUs of the total but that represent 80% of the products that are most in demand.From this perspective, a period of 12 months is evaluated, obtaining the results shown in Table 15.
It is observed that the predictions at 12 months of group A have a confidence level of 60%; that is, the model predicts, on average, with 60% effectiveness, the future demand of the Parent SKUs classified in group A. For the other classifications, lower percentages of effectiveness are observed.The estimated general percentage of the currently applied model is 43%, lower than that obtained by the proposed model.
The details of the model's behavior based on the classification and ranges of successes in the predictions are shown in Table 16, Table 17, and Table 18.These tables report the quantity of SKUs for importing merchandise without ABC classification grouping, where the number of SKUs are segmented into groups of predictions from 1 to 12 months.
Table 16 shows that the 3-month forecast groups several 1,107 SKUs in a confidence range of between 60% and 100%, regardless of the ABC classification.
Figure 6, shows the behavior of the predictions of the current model, which shows predictions with an accuracy level between 0 and 40% affectivity in the prediction.

Proposed model
The proposed demand prediction model for Parent SKUs is evaluated over a 12-month in the same way that the current model is evaluated.The results obtained are shown in Table 19.
The predictions at 12 months of group A are 80% reliable; the proposed model predicts future demand with 80% effectiveness.For the other classifications,   it is observed that the proposed model obtains 70% confidence for classification B, 65% confidence for classification C and 25% confidence for classification D. The general estimated result of the proposed model is 60%.
Table 20, Table 21, and Table 22 show the details of the behavior of the proposed model based on the classification ranges of success in the predictions.
Figure 6 shows the behavior of the predictions where the tendency to improve the predictions with an interval between 60% and 100% confidence in the prediction is observed.
The proposed model recommends the future demand trend for the Parent SKU (Table 14).This trend is expressed based on three criteria.The first is called Rising, which indicates that the trend is for an increase in demand relative to the demand when making the prediction.
The second trend is called Linear, which indicates that the trend does not vary concerning the demand when making the prediction.
The third trend is called Down, which indicates that the trend is downward concerning the demand when making the prediction.Table 23, Table 24, and Table 25 show the result of the analysis of the trend predictions made at 6, 9, and 12 months, respectively, where classification groups also separate the analyses.

Comparison Current Model and Proposed Model
The reliability percentages of the proposed model are contrasted with the current model, where the current model exposes classification A with a confidence level of 60%, classification B with a confidence level of 47%, classification C with a confidence level of 47%, and classification D with a confidence level of 19%.These results validate the tendency of the proposed model to improve the prediction for each classification compared to the current model.
The results presented after applying the proposed model show a marked improvement.Now, from the perspective of an overall evaluation, the current model provides a confidence level of 43%, as shown in Table 15.The proposed model provides a confidence level of 60%, as shown in Table 19, exposing the tendency of the proposed model to improve the prediction.
Figure 7, shows the results when applying the proposed model to the Parent SKUs, where the confidence level is between 60% and 100% and groups the most significant number of Parent SKUs, unlike the current model shown in Figure 6, where most of the Parent SKUs are in the confidence intervals from 0% to 40%, this illustrates a tendency to improve the predictions made with the proposed model.
The monthly review of the results after the application of the current model and the proposed model for the third month, as shown in Figure 6 and Figure 7, shows a decrease in the level of confidence for the predictions between the intervals of 60% to 100% and intervals from 0% to 40%, showing a low level of confidence in the application of the current model and the proposed model.The review of the Parent SKUs involved in this month exposes a problem related to out-of-stock in the indicated month, which impacts sales by not having products available; therefore, the prediction is affected.
From a general point of view, the increase in the level of confidence from 43% of the current model (Table 15) to 60% of the proposed model (Table 19) shows a greater precision in the demand predictions, marked in the products of classification A and B, where, due to the inventory management model followed by the company, they carry out significant control of stocks.
Applying machine learning models to each Parent SKU offers a prediction for the next twelve months.When reviewing the results of the proposed model, applied to each Parent SKU, a reliability level of 80% for classification A, 70% for classification B, 65% for Classification C, and 25% for classification D is illustrated.
The proposed model delivers three types of trends along with the predictions, which are; upward, downward, or unchanged trend of the Parent SKU, with an average confidence of 58% for rank A, 56% for rank B, 52% for rank C and 32% for rank D, for the projections from 6 to 9 months as shown in tables 22 and 23, information that the current model does not provide.

Recommender Proposal
The recommender system exposes the information of the predictions that the end user needs to support the purchase decision.The operation of the proposed recommender is shown in Figure 8.
The recommender is an application that integrates with the system modules used by analysts, as shown in Figure 9.The recommender application is connected to the business database, allowing synchronous access to information.In addition, it exposes the operational view of the recommender used by the purchase analyst, where the code of the SKU to be reviewed is entered, and the recommender provides information for the purchase decision.

CONCLUSIONS
Using a predictive inventory management model allows the company to make better decisions.The model, which in one of its stages uses the ABC classification to organize purchasing logistics and focus logistics models, helps the purchasing department in logistics to align with the ABC classification used in the organization, which generates groups with a priority of merchandise replacement.For this purpose, five machine learning models are applied to each parent SKU belonging to each classification group, where the application automatically selects the model that offers the best score concerning historical demand.
It is possible to deliver timely and relevant information to the company of those Parent SKU products that have a low correlation in the prediction.Such is the case of classification group D, which according to the ABC classification that the company uses, these products are not highly supervised or controlled by the company's operations.Identified Parent SKUs are tagged as new Parent SKUs with no sales history or less than the defined six-month sales minimum to feed back into the machine learning model.
The reliability of the predictions obtained by applying the proposed model exceeds the reliability obtained by applying the current model.Confirmed that technology adapted to predict future demands in multi-product scenarios delivers greater speed and accuracy in prediction in orientation to the company's business model.
The decrease in the confidence level of the prediction when comparing the two models at the third month of execution, caused by stock breaks, indicates that the proposed model and the current model are equally  sensitive to a stock break; therefore, handling this cause requires consideration when handling the prediction according to the affected SKU.
The implemented operating model responds to the problematic situation exposed.It automatically calculates for each SKU, through a data management system and prediction models, if the demand rises or falls while recommending quantities to acquire and maintain stocks.
The prediction model selection process allows adding and assessing new demand prediction models.This process means that models or algorithms such as Support Vector Machine (SVM) and Recurrent Neural Networks, among others, are added to the current models of the platform.
The recommender operation model exposed in Figure 9 exposes a simplified view for the user of the processed data; therefore, it exposes in a simplified way the result of the application of the Machine Learning models used, delivering a tool with usability to User Level.
The proposed model allows the integration of new machine-learning prediction models.Future work should continue with the validation methodology used, seeking to improve the prediction with higher reliability levels.

Figure 3 .
Figure 3. Automatic adaptation to change model.

Figure 6 .
Figure 6.Behavior of the prediction for classification A, B, C, and D -Current Model.

Figure 7 .
Figure 7. Behavior of the prediction for classification A, B, C, and D -Proposed Model.

Figure 8 .
Figure 8. Scheme of the recommender system.

Figure 9 .
Figure 9. Operational view of the recommender.

Table 3 .
Classification of Parent SKU products by rotation.(Author's elaboration).

Table 5 .
Number of Parent SKUs with more than six months without sale.(Author's elaboration).

Table 6 .
Quantity of Parent SKUs used by classification.(Author's elaboration)

Table 16 .
Behavior between 1 to 4 months of the prediction for classification A, B, C, and D -Current Model.(Author's elaboration).

Table 17 .
Behavior between 5 to 8 months of the prediction for classification A, B, C, and D -Current Model.(Author's elaboration).

Table 18 .
Behavior between 9 to 12 months of the prediction for classification A, B, C, and D -Current Model.(Author's elaboration)

Table 20 .
Behavior between 1 to 4 months of the prediction for classification A, B, C, and D -Proposed Model.(Author's elaboration).

Table 21 .
Behavior between 5 to 8 months of the prediction for classification A, B, C, and D -Proposed Model.(Author's elaboration).

Table 22 .
Behavior between 9 to 12 months of the prediction for classification A, B, C, and D -Proposed Model.(Author's elaboration).