## 3 Artificial Neural Networks and Optimization
#### Artificial Neural Network Application  
In this study, a semi cross Hybrid DED component will be optimized using the multi-physical approach with both process and structural three point bending analysed as a thermomechanic couple. Thermomechanic analyses generally require high CPU time. As a result of this situation, using thermomechanic analyses directly is not reasonable in the optimization process. On the other hand, ANN can be used as an artificial intelligence-based approximation technique in order to reduce the computational cost and enhance optimization efficiency and the approximation accuracy for modelling complex systems with computational difficulties. Recently, ANN has been applied to various engineering areas due to its benefits and efficiency in some aspects, such as acknowledging and learning the relations between inputs and outputs with no demand for any precise relation, regardless of the system linearity or nonlinearity, and the high tolerance to the noise in the data and measurement errors. In this study, the ANN method is proposed to develop metamodels of objective and constraint functions [33]. Within the scope of this study, the ANN method is proposed to develop metamodels of objective and constraint functions to predict the optimum design parameters of the semi cross hybrid component with a dimension of 400 mm including the DED process parameter effects. ANNs are computer algorithms inspired by the computational abilities of interconnected neurons in the brain. The ANN method is based on the synaptic connections between biological neuron cells and these cells. The general architecture of an ANN is composed of a collection of connected neurons associated with three kinds of layers: the input layer, the hidden layer(s), and the output layer [34; 35]. The structure of the ANN used in this paper is pointed out in Figure 16. ANN structure is composed of three layers network. MATLAB is utilized for developing a suitable generalized feedforward ANN for metamodeling objective and constraint functions. Pearson correlation coefficient (R) and mean square error (MSE) values are examined to find the best ANN structure [36]. \begin{table}
\begin{tabular}{c c c c} \hline \hline  & **DOE RSM** & **CAE/CAD** & **Correlation** \\  & **Prediction** & **Results** & **(\% error)** \\ \hline FORCE (kN) & 7.115 & 7.951 & 11.75\% \\ ENERGY (Joule) & 3.889 & 2.877 & \(-\)26.15\% \\ TOTAL MASS (kg) & 0.464 & 0.5636 & 21.46\% \\ \hline \hline \end{tabular}
\end{table} 
Table 10: DOE RSM Prediction of force, energy dissipation and total mass. Figure 16: The architecture of Artificial Neural Network (ANN). ANN structures are constituted by 36 data points which receive 25 of the input data from Taguchi and 11 via LHS method. All the results of these data are obtained from DED simulations. The learning rate is determined as starting from 0.01 and increasing in 0.01 steps up to 1. Some researchers investigated the number of neurons up to 30 and between 4 and 12 number of neurons gave the best R values and lowest MSE [33; 34; 35; 36]. Thus, the number of neurons is defined between 1 and 30 in this study. The training functions, Levenberg-Marquardt and Scaled conjugate gradient backpropagation, which are MATLAB built-in training algorithms, are chosen. Parameters used in ANN structures are given in Table 11.  
A hold-out technique for cross-validation is used by partitioning the data into two segments, which are the data used for the validation test and the other for training the neural network model [31; 32]. This technique is preferred as the data set is small, at almost 30 data. In total, 70%, 15%, and 15% of data points are used for training, testing, and validation, respectively. In order to find the optimum ANN structure, a nested loop is designed using the learning rate, number of neurons, and different training functions. The ANN model and predictions are saved when the Pearson correlation coefficient (R) of the test is higher than 0.965, as well as finding better MSE values throughout the cycle.