## 4 Discussion
All these factors, which are known to have a smaller influence on the defect population, can, however, contribute to the large experimental scatter and can be integrated into the ML algorithms to improve their predictive capability, provided that significantly larger datasets are available and can be used for a reliable training process. The influence of defect location has not been considered in the present work, since the NN algorithms have been trained to predict the defect sizes, regardless of their location. However, the defect location has a significant influence on the fatigue response, with surface defects being more critical. An effective approach for modelling the larger criticality of surface defects is to multiply the defect size predicted with the developed NN by the ratio between the Stress Intensity Factor (SIF) associated with a surface defect and the SIF of an internal defect (i.e., 0.65/0.5=1.3). Accordingly, the predicted defect is considered as an internal defect and its equivalent size can be increased by a factor of 1.3 for the design with damage-tolerant approaches against surface defect failures, i.e., to model the largest criticality associated with surface defects with a reliable fracture mechanics approach. The Probability and the LEVD ML algorithms have confirmed their effectiveness in the proposed architecture, as demonstrated by the validation using two of the most used SLM materials, the AlSi10 Mg and the Ti6 Al4V alloy. The loss functions computed for the validation datasets were shown to be almost constant for both approaches and materials, apart, in general, from one validation dataset. However, it is widely known that the predicting capability tends to decrease for datasets characterized by large differences with respect to the other available datasets, since the ML algorithm is required to predict the defect probabilities or the LEVD parameters outside the domain explored by the training data (Figures 7a and 14a). The LEVD ML algorithm has proven to work better for this type of dataset, as confirmed by comparing Figures 14a and 17a for the Ti6 Al4V alloy dataset (validation fold for k = 1). Indeed, the Probability ML algorithm has overestimated the probability associated with each defect, whereas the LEVD has provided good predictions, with limited differences in the slope and the intercept. For the Probability ML, the number of training data is larger (one probability for each defect and set of process parameters for the Probability ML, the location and the scale parameters for each dataset for the LEVD ML), enhancing the predictive capability of the NN. On the other hand, this approach does not ensure that, given the same set of process parameters, larger defects will be characterized by larger probabilities, violating the physical linearly increasing trend on the Gumbel plot. This is a limitation of the Probability ML algorithm, as shown in Figure 14a, which may be overcome by increasing the number of training data. On the other hand, the LEVD ML embeds a statistical model based on experimental evidence, thus overcoming this criticality and providing better predictions. To conclude, the proposed approaches can be reliably used to address this important subject concerning the structural integrity of AM components. It must be noted that more complex models and architectures dealing with reliability analysis [46, 47, 48, 49] may have also been used. However, the proposed algorithms, despite their simple architecture, properly and reliably work for two of the most used SLM materials, the AlSi10 Mg and the Ti6 Al4V alloy, even for a number of available data for the training that is smaller than that generally considered for this kind of algorithms. The performances of the developed NN are expected to be further enhanced by increasing the number of literature data, especially in the defect size ranges where data are missing, without the need for further complicating their architecture.