# Time-Series Prediction of Failures in an Industrial Assembly Line Using Artificial Learning
## 4 Results and Discussion
### Discussion
In particular, the ability of the NAR and MLP models to achieve MAPE values below 1% underscores their potential for high-precision prediction and confirms their superior performance relative to existing models. At the beginning of this study, it was hypothesised that AL techniques could be used to model and predict failures in an industrial assembly line. At the end of the study, it is seen that these techniques have a better modelling and prediction performance. Configuration data inherently contain numerous peaks and dips. Machine-learning techniques generally exhibit a better modelling performance for data with periodic or non-periodic peak-and-dip patterns compared to traditional regression methods. A key distinction of machine-learning models is their dynamic structure, which allows them to achieve a higher predictive performance. For instance, in the NAR network, this adaptability is achieved by updating the weights during training. In the ANFIS method, it is accomplished by adjusting the cluster size of MFs throughout the training process. LSTM networks, on the other hand, are composed of self-repeating units. During training, such networks can become more adaptive to the input data due to their layered architecture and features such as gated structures, bias terms, dropout mechanisms, and activation thresholds. The training algorithm essentially represents an optimisation process aimed at minimising the prediction error. In this study, the Levenberg-Marquardt algorithm was selected [38]. To construct an MLP network, its hyper-parameters must first be appropriately selected [39; 40]. The NAR network is a type of MLP [41]. Even when the training performance of the network is high, overfitting and issues such as gradient exploding or vanishing must be prevented. Model accuracy is evaluated through validation sets, cross-validation, and error analysis, while its true performance is measured with the test set. Within the scope of this study, the terms \"network\" and \"model\" are used interchangeably, since a network essentially represents a mathematical function, as well. The optimisation used here is based on gradient descent. The term _gradient_ refers to change. Vanishing gradients occur when a gradient shrinks during backpropagation, thereby reducing the model's learning capacity. Gradient vanishing usually occurs when activation functions such as sigmoid or _tanh_ are used. Gradient explosion, on the other hand, causes the optimisation to become unbalanced due to the excessive growth of the weights. Functions such as ReLU and its derivatives are preferred to prevent gradient vanishing, while weight normalisation and gradient-limiting techniques are applied to prevent gradient explosion. Also, different initialisation techniques (e.g., Xavier or He), gradient clipping, learning rate adjustment, and adaptive optimisation algorithms provide effective solutions. Dataset partitioning is a critical step for assessing model performance and enhancing generalisation. The training set is used for learning, the validation set is employed for hyper-parameter tuning and early stopping, and the test set is employed to evaluate generalisation. The proportions of these partitions depend on dataset size. A commonly adopted portion is 70-80% for training, 10-15% for validation, and 10-15% for testing. Open-loop prediction is performed when test data are available. For example, if actual values of a time series are known from time steps 1 to \(t-1\), the value at time \(t+1\) can be predicted. In this case, the actual value at time \(t\) should be recorded and used as input for the \(t+1\) prediction. Closed-loop prediction, by contrast, uses previous predictions as inputs to forecast future time steps, requiring no actual values. For instance, if the goal is to predict values from time \(t\) to \(t+k\) using data only from time steps 1 to \(t-1\), the predicted value at \(t-1\) becomes the input for predicting the value at \(t\).