## 4 Dimensional Deviations Study
### Data Processing  
A multi-objective optimization using a genetic algorithm (GA) was employed to evaluate a given objective function, utilizing a randomly generated population within a predefined range for the input parameters. Based on the data presented in Table 5, an artificial neural network (ANN) was trained using the input and output datasets structured as follows:  
* Input matrix: (27 \(\times\) 3). * Output matrix: (27 \(\times\) 2). \begin{table}
\begin{tabular}{c c c c c c} \hline
**No.** & \
\begin{tabular}{c} **Layer** \\ **Thickness** \\ \end{tabular} &
\begin{tabular}{c} **Infill** \\ **Density** \\ \end{tabular} & **In, Ln (mm)** & **lm (mm)** & **lm (mm)** \\ \hline
18. & 0.14 & 80 & 10 & 10.096 & 9.896 \\
19. & 0.19 & 20 & 8 & 8.082 & 7.834 \\
20. & 0.19 & 20 & 8 & 8.062 & 7.867 \\
21. & 0.19 & 20 & 8 & 8.081 & 7.9 \\
22. & 0.19 & 50 & 9 & 9.059 & 8.848 \\
23. & 0.19 & 50 & 9 & 9.08 & 8.849 \\
24. & 0.19 & 50 & 9 & 9.078 & 8.794 \\
25. & 0.19 & 80 & 10 & 10.065 & 9.858 \\
26. & 0.19 & 80 & 10 & 10.082 & 9.845 \\
27. & 0.19 & 80 & 10 & 10.076 & 9.858 \\ \hline \end{tabular}
\end{table} 
Table 4: _Cont._  
\begin{table}
\begin{tabular}{c c c c c} \hline
**No. ** & \begin{tabular}{c} **Layer** \\ **Thickness** \\ \end{tabular}  & \begin{tabular}{c} **Infill** \\ **Density** \\ \end{tabular}  & \begin{tabular}{c} **Od1,** \(\O\)**D1n** \\ **(mm)** \\ \end{tabular}  & \ \begin{tabular}{c} **and** \(\O\)**d1** \\ \end{tabular}  & \begin{tabular}{c} **and** \(\O\)**d1** \\ \end{tabular}  \\ \hline
1. & 0.09 & 20 & 48 & 0.0048 & 0.0069 \\
2. & 0.09 & 20 & 48 & 0.0038 & 0.0077 \\
3. & 0.09 & 20 & 48 & 0.0037 & 0.0071 \\
4. & 0.09 & 50 & 54 & 0.0042 & 0.0058 \\
5. & 0.09 & 5  
The Neural Network Toolbox in MATLAB 2024a was used for this purpose. A multilayer perceptron (MLP) based on a feedforward ANN was implemented to develop the predictive model. The network architecture consists of an input layer, a hidden layer, and an output layer. The input parameters for the ANN were layer thickness, infill density, and \(\mathcal{O}\)1 n (nominal diameter). The output parameters were as follows:  
* Absolute relative deviation for the shaft (ard \(\mathcal{O}\)d1), defined as a ratio in Equation (1). * Absolute relative deviation for the hole (ard \(\mathcal{O}\)D1), defined similarly. \[\mathbf{ard_{Od1}}=\left|\frac{\boldsymbol{\partial}\mathbf{d1m}-\boldsymbol{ \partial}\mathbf{d1n}}{\boldsymbol{\partial}\mathbf{d1n}}\right| \tag{1}\]  
Table 5 presents the absolute relative deviations at \(\mathcal{O}\)d1, \(\mathcal{O}\)D1 for the shaft and hub. The connections between inputs, hidden layer, and output were transposed into weights (w) and biases (b), which are considered parameters of the artificial neural network. The sigmoid tangent function was chosen for the activation of the ANN, and the type of the network was feedforward backpropagation. For the training of the ANN, 70% of the datasets were selected; 15% datasets were used for testing and another 15% for validation. A value of the correlation coefficient near zero indicates that there is no relationship between the inputs and outputs, and a value very close to 1 indicates a very good correlation. The already-trained network was used as an objective function by multi-objective optimization using a genetic algorithm, which seeks to minimize the objective function. The intervals for the three input parameters were [0.09; 20; 48] and [0.19; 80; 60]. The architecture of the network used in this study consisted of the following: three input neurons, corresponding to the input parameters; two output neurons, corresponding to the output parameters; and ten neurons on the hidden layer, empirically chosen, shown in Figure 3.  
Using the \"Levenberg-Marquardt\" backpropagation algorithm, the ANN was trained. The training process is an iterative one. For this study, seven iterations were performed for the training of the network.