## 2 Methodology
### Feature Importance and Selection  
To our knowledge, the importance of features in a layer-by-layer classification method have not been quantified yet. The synchronous data collection method that we employ for collecting process parameters in real-time allows for the possibility of exploring inter-layer feature relationships. Therefore, we have tested several methods for importance quantification including (1) Decision Tree (DT), (2) Random Forest (RF), and (3) XGBost (XGB) and compare these results. We value the RF ensemble method for feature importance quantification and use RF for baseline classification comparison to the CNN model. For the RF model, we use feature selection to reduce the feature dataset when predicting only with the RF technique. Feature selection was not utilized for the SVM or CNN models. The five most important features are used as the only variables input into our RF classification experiment. Results are reviewed in Section 3. However, the main focus of our feature analysis is to determine which features are most important for classification and to explore relationships among features at the inter-layer level. These results are displayed in Section 3.1. Literature defines feature selection as the development of reducing a subset of an originally complete feature dataset using a feature selection process [83]. Whenever a dataset is deemed highly dimensional or dynamical (or both), it is advantageous for the experimenter to reduce the workable dataset, especially when features are highly correlated. By performing feature selection, the overall experiment reduces computation time, improves prediction performance, and allows for more comprehension of results in a ML or pattern recognition investigation [84]. Figure 7: Porosity inter-layer evaluation (**a**) porosity diameter (mm) and (**b**) porosity quantity. Inter-Layer Importance Quantification  
Classification and Regression Trees (CART), also known as Decision Trees (DT), ML techniques utilized for creating prediction models from data [85]. The Gini index is a measure of impurity between the probability distribution and the target attributes values [86]. In the case of classification DT models, it is common to utilize the gini index cost function especially in situations where the domain of the target attribute is not wide [86]. Gini index for a given node in a binary classification problem is defined as [87]:  
\[p_{1}(1-p_{1})+p_{2}(1-p_{2}) \tag{4}\]  
Here, \(p_{1}\) and \(p_{2}\) represent Class 1 and Class 2. When the Gini index is calculated it reports a Gini score to determine splits based on the purity of the classes. As an example, a perfect separation of classes will result in a Gini score of 0. After the Gini score evaluates the cost of the split, each value within the dataset is evaluated as a candidate for splitting. Once the algorithm finds the best split a node is created, the first node created is typically called the root node. The tree is grown by repeating this process. The user can establish how large the tree will grow based on stopping rules. The Random Forest (RF) technique is an ensemble method with advantageous capabilities compared to other ML techniques due to its robustness, accuracy, and easily interpretable results in the form of ranking [88]. RF was introduced by [PERSON] in [89] and is used for reducing variance and utilizes bootstrap aggregation (bagging) to comprise a mean about noisy and unbiased models [90]. The process begins by connecting multiple decision trees in which random selection of input variables bootstraps on a dataset. This forms a forest of classifiers that vote for a particular class and de-correlates the ensemble of decision trees without increasing the variance [91]. Another feature of this method is that RF introduces randomness to the tree-growing process. RF selects \(m\) variables by randomly pulling from \(p\) variables so that \(m=\sqrt{p}\). Once a tree model is trained random splits are generated and selected from the original predictors.