## 3 Materials and Methods
### Implementation Methodology
#### 3.9.4 Neural Network Training  
The historical demand data were divided into three categories i.e.,  
* Training set (80%);
* Validation set (20% of the training set decided based on literature review);
* Testing set (20%). The research process flowchart, given in Figure 5, shows the steps that were utilized to evaluate the best forecasting results. Dividing the dataset into training, validation and test sets is an essential step to develop an efficient machine learning model that requires sufficient observations. In our case, the data are randomly shuffled to ensure that samples are ordered randomly. Initially, they are divided into two parts: 80% of the data are kept in the training set, and 20% is kept in the test set to evaluate the final model. The training set is used to train the model while further selecting 20% as the validation set from the training data. The validation set is kept to monitor the model's performance during training to avoid overfitting while tuning the hyperparameters. The dataset has been collected from a spare depot that stocks fixed wing and helicopter spare parts and deals with their demand and supply process on a yearly basis and is in line with the operation shown in Figure 2. The sample size and the observations are around 23,600, including 3770 lumpy and rest as regular demand pattern spares from a list of 97,693 items related to flying machines from four different origins. Figure 2 is drawn for a single spare part number 8 AT-1250-00-02 with nomenclature vibration damper assembly that is demanded in 24 quarters (6 years, 2009-2015), and it shows no regular pattern. The attention is also drawn toward Table 2, where ten high-frequency spare parts that are lumpy in nature have been selected, and the necessary details are given. For lumpiness classification, neural network models can be used to identify which spare parts have irregular demand patterns. This is conducted by training the model on a labeled dataset that consists of spare parts with known demand patterns. The input to the model can include demand data for each spare part, and the output can be a binary classification, indicating whether a spare part has a lumpy or regular demand pattern. The ANN-based demand forecasting procedure is as follows. The first step is the input variable selection. For all networks, the number of factors is the same as denoted by alphabets starting from \(x_{1}\) through \(x_{3}\), which are listed as:  
* \(x_{1}\)--Average of difference between the demand and its mean of four quarters over three years;
* \(x_{2}\)--Average of four quarters demand over three years;
* \(x_{3}\)--Average of four quarter interdemand interval over three years. Figure 5: ANN-based research process flowchart. Data pre-processing is the second step. Data truncation of leading and trailing zeros was performed both in the known inputs and output dataset values. In the third step, scaling is performed. The scaling of the inputs and target values was performed according to the equation [58]. \[T=\frac{(x-x_{min})}{(x_{max}-x_{min})}+0.1 \tag{12}\]  
Training is the fourth step of the methodology. The network training algorithm 'traingdm' was used. The activation function utilized in the hidden layer was set as 'tan-sigmoid', whereas the output layer contained the 'log sig' activation function [41]. The learning rate was finalized as 0.05. The network was trained by setting the number of epochs as 500. The architecture of the proposed ANN model is given in Figure 6.