## 4 Discussion  
In this Section, the architecture, as well as the input parameters, of the developed ML algorithms are analyzed and discussed, to highlight their strengths and weaknesses and point out possible improvements. It must be noted that the proposed ML algorithms have been developed to address a challenging open issue concerning the structural integrity and the design against the fatigue of AM components and to show that NN networks can be reliably employed in industrial and research fields. The methodologies analyzed in the Introduction section employ ML algorithms with this objective, but with a different approach. \"Traditional\" approaches, such as the one in [35] can be also considered for the sake of comparison. In [35], the process parameters are varied to assess their influence on the defect population. However, a model that provides the probability associated with  
Figure 16: k-fold cross-validation: loss function with respect to the k-fold considered for the validation. Figure 17: Gumbel plot for k = 1 considered for the validation; (**a**) validation fold; (**b**) training fold. a defect size directly from the process parameters has not been proposed yet and it can be hardly developed with this \"traditional\" approach, due to the unfeasible number of data required for a reliable estimation. As pointed out in the Introduction Section, the surface roughness has not been considered in the present work, even if it is the factor that most affects the fatigue response. However, for the prediction of the surface roughness, a specific NN with additional inputs, such as surface treatments, should be considered. Similarly, the influence of the loading direction with respect to the building orientation has not been considered, since this work focuses on critical defects and it does not provide in its output the fatigue response. However, starting from the predicted defect size, which accounts for the influence of the building direction, and by considering damage-tolerant approaches, the effect of the load direction on the fatigue response of AM parts can be reliably modelled. In this work, the most relevant SLM process parameters have been considered as input for the ML algorithms, generally reported in the literature papers on the fatigue response of SLM specimens. By analyzing the available datasets (Figures 5 and 12), it must be noted that the scatter associated with the defect size is large, even for the same set of process parameters. Process parameters different from those considered in the present paper, or post-treatments, can be the reason for this large scatter or can influence the critical defect population. For example, heat treatments have not been considered as inputs for the ML algorithms, since the literature results agree that they do not affect the defect size, especially low-temperature heat treatments. However, the influence of heat treatments is still debated in the literature, since some researchers have proven that they can enlarge porosities [42; 43]. Similarly, heating the building platform helps to stabilize the melt pool [44], with a positive effect on the defect size and with the part being more \"damage tolerant\" [45]. Moreover, in place of the average powder size, the powder size range can be considered as input. Indeed, a large dispersion of the powder size could induce the formation of larger defects and this cannot be accounted for by considering the average powder size. Other \"hidden\" factors can also contribute to the defect size scatter observed in Figures 5 and 12 and may have stressed the predictive capability of the developed ML algorithms. For example, the AM production systems can influence the defect size population, providing different defect sizes, even for the same set of process parameters.