## 4 ML Techniques
### Learning Approach
#### 4.2.1 Supervised Learning  
The supervised learning approach is a \"task-driven approach\"; it is carried out when certain goals are identified to be achieved from a specific input [104]. The algorithm is provided by two sets, a training set and a test set; the goal is \"to learn from a set of labeled data in the training set so that it can identify unlabeled data from a test set with the highest possible accuracy\" [27]. First, a cost function is calculated to determine the error between the predicted output and the actual output from the training set. Then, to validate the algorithm, an unseen data \"test data\" is used to evaluate the model's accuracy. The labels can be numerical or ordinal, taking the form of a predicted parameter in the case of a regression-based ML task or a class/grouping if the ML model is used as a classifier. This input-output pairing, inherent in supervised learning, allows an ML algorithm to be trained to analyze and correlate the input data related to its corresponding output, thus, enabling the ML model to establish a set of metrics to predict the output value of a new input data sample. However, this same reliance on a defined output makes supervised learning more susceptible to human error, as mislabeled data samples can be misinterpreted when training a model.  
As most ML applications discussed in AM focus on predicting a target parameter or class, supervised learning remains predominant in the application of ML in AM. Data labeling is usually associated with using post-evaluation methods such as microcomputed tomography (microCT) in case of defects. In some cases, mechanical characterization tests are used to determine and label faulty parts and acceptable parts. Most of the time, the parts printed at certain process parameters or with specific defect levels are labeled manually by the operator to train the ML model.  
Most of the supervised ML models used in analyzed sensor data collected from the L-PBF process can be categorized as regression or classification problems. Regression models are usually used in AM applications for process parameters optimization. In addition, regression models can sometimes be used for defect detection. For example, linear regression was used to investigate the LPBF process quality by monitoring spatter formation [86]. The authors used high-speed images, image segmentation, and feature extraction to estimate different statistical descriptions of the spatter formation during the LPBF process. The developed regression model was able to predict under-melting and over-melting conditions successfully. Linear regression models were also used to predict the probability of subsurface porosity formation [67]. Infrared images were acquired to detect the unnormalized surface temperature of parts being printed at different process conditions. Accurate predictions of the subsurface porosity from the thermal history of the parts being printed were obtained.  
Classification tasks are used to differentiate between different groups of defects or quality levels. If infrared cameras or vision sensors are used, a convolution neural network can be used to separate different classes. For instance, [PERSON] et al. [105] proposed using a convolution neural network (CNN) to classify infrared images captured from delamination, spatters, and high-quality parts. The input, in this case, represents images acquired from the infrared camera for the parts being melted. The parts were printed at known process parameters that will induce specific conditions; the data labeling was performed manually in this case. Each input is regarded as a three-dimensional array; multiple small-filter kernels are applied to the image array. The convolutional layers combine several layers such as activation, batch normalization, and pooling layers to extract useful features from raw data and classify them into specific target classes. Asillustrated in Figure 10, the output is to associate each layer of the parts printed to three different classes: accepted, metal splatters, or delamination.