Supervised Machine Learning Classification Algorithms for Detection of Fracture Location in Dissimilar Friction Stir Welded Joints

Machine Learning focuses on the study of algorithms that are mathematical or statistical in nature in order to extract the required information pattern from the available data. Supervised Machine Learning algorithms are further sub-divided into two types i.e. regression algorithms and classification algorithms. In the present study, four supervised machine learning-based classification models i.e. Decision Trees algorithm, K- Nearest Neighbors (KNN) algorithm, Support Vector Machines (SVM) algorithm, and Ada Boost algorithm were subjected to the given dataset for the determination of fracture location in dissimilar Friction Stir Welded AA6061-T651 and AA7075-T651 alloy. In the given dataset, rotational speed (RPM), welding speed (mm/min), pin profile, and axial force (kN) were the input parameters while Fracture location is the output parameter. The obtained results showed that the Support Vector Machine (SVM) algorithm classified the fracture location with a good accuracy score of 0.889 in comparison to the other algorithms.


Introduction
Machine Learning algorithms are vital tools or methods for understanding and handling the data. It should be noted that a statistic can be a graphical or numerical summary of a collection of the given data [1][2][3]. Data is overwhelming in nature which involves summarization and reduction which makes the dataset comprehensible to a human observer. Understanding the data is very important because sometimes the available data can be misleading. So, the implementation of Machine Learning algorithms provide statistical framework for assessing the quality of available data [4][5].
Data is further classified into two key types i.e. Organic/Processed data and "Designed" data collection [6]. Organic data is extracted by a computerized system or from audio and video recordings. This type of data is generated organically as a result of some process and is generated over time. These processes generate massive quantities of data which is called Big Data. In order to process this type of data, significant computational resources are required. On the other hand, "designed" data collection is used to specifically address a stated research objective for example a particular individual sampled from the population.
Machine Learning algorithms have gained some popularity in the Friction Stir Welding Process [7][8][9]. Machine Learning classification-based approach was used for predicting the mechanical properties of friction stir welded copper joints [10]. The results showed that the Artificial Neural Network model resulted in a good accuracy score of 0.94. Balachandar et al. [11] monitored the Friction Stir Welding tool condition by using the Random Forest algorithm which gave better results. There is a limited number of research studies available on the application of Supervised Machine Learning Classification models in the Friction Stir Welding Process.
In the present work, the fracture position of dissimilar Friction Stir Welded joints is determined by using four Supervised Machine Learning Classification algorithms which will be discussed in the next sections.

Experimental Procedure
In the present research work, Python programming language was executed on Jupyter lab notebook for subjecting the Supervised Machine Learning algorithms on the given dataset [12]. Jupyter is a web-based interactive development environment that supports multiple programming languages used in which commonly used language is Python Programming. Table 1 shows the parameters involved in the experimental study. Rotational Speed (RPM), Welding Speed (mm/min), Pin profile, and Axial Force (kN) are input parameters while Fracture position is an output parameter. Pin profiles such as Simple Square is labeled as 1, Taper  The required Python libraries such as pandas, NumPy, seaborn, and pyplot were imported. After importing the libraries, the dataset was loaded into the Jupyter environment. Pair plot function is used for establishing the relationship between the multiple pairwise bivariate distributions in a given dataset as shown in Figure 2. Count function was subjected to the given dataset to obtain the number of 0s and 1s in the output column i.e. in the Fracture position column as shown in Figure 3. As shown in Figure 4, Exploratory Data Analysis is used to know about the data pattern and further summarize their main characteristics. In order to find out the important input parameters affecting the output parameter, the feature importance method was used. From Figure 5 it is observed that the Axial Force (kN) parameter creates no effect on the output parameter. So due to this reason, this parameter is dropped from the input parameters which are subjected to Machine Learning algorithms.

Decision Tree Algorithm
A Decision Tree is a supervised machine learning algorithm that can be both implemented for classification and regression analysis. A Decision Tree model consists of a Terminal node, a decision node, and a root node as seen in Figure 6. The main objective is to create many pure nodes with the help of the splitting process. The nodes can be further categorized as pure or homogenous nodes and impure or heterogeneous nodes. After the splitting operation, the pure node contains the data points which belong to the same class while the impure node contains the data points that belong to a different class. The three important parameters which are used to determine the level of impurity are Gini Index, Entropy, and Classification Error. It should be noted that the Information Gain and Entropy are related to each other as seen in Equation 1 while entropy can be further calculated by Equation 2. (1) Where probabilities of success and failure are represented by p and q respectively. Figure 7 shows the decision tree plot for the given parameters in the dataset. Figure 8 shows the confusion matrix which is used to describe the performance of the classification model. Table 2 shows the classification report of the decision tree algorithm.    Table 2 it is observed that the accuracy score obtained from the Decision Tree algorithm is 0.78.

K-Nearest Neighbor Algorithm
K-Nearest Neighbors (KNN) are the most popularly used Machine Learning algorithm where learning is based on the availability of similar data points. KNN represents the model which is nonparametric in nature and its classification mechanism depends on the simple majority votes obtained from the neighbors. The KNN model can be successfully implemented on classification tasks where there is a complex relationship between the target class and attributes. Figure 9 a) Table 3 shows the classification report of K-Nearest Neighbor algorithm and Figure 8 shows the confusion matrix obtained.   Table 3 it is observed that the accuracy score of K-Nearest Neighbor is 0.67 which is less than the accuracy score of Decision Tree algorithm.

Support Vector Machine (SVM) Algorithm
Decision boundaries generally classify the class based on which the data point falls on as shown in Figure 10 a) which represents a bad decision boundary as it is unable to properly separate the two classes. There is an infinite number of decision boundaries so the main goal is to choose the best decision boundary. In order to find the optimal line, the Support Vector Machine (SVM) algorithm is used that can perfectly separate the two classes i.e. fracture location at stir zone and fracture position at the heat-affected zone of 6061 as shown in Figure  10 b).
The decision boundary line can be represented by Equation 6. In order to calculate the distance from the decision boundary to any point Equation 7 is used. The main goal is to maximize the value of r for the support vectors points to the required optimal decision boundary.
|| || (7) Table 4 shows the classification report of SVM algorithm. From the results it is observed that it resulted in the accuracy score of 0.89. Figure 11 shows the confusion matrix obtained for the SVM algorithm

AdaBoost Algorithm
AdaBoost is also known as Adaptive boosting falls into the classification category of ensemble boosting as shown in Figure 12. The multiple weak classifiers are combined to increase the accuracy of the classifiers. Adaptive boosting works on an iterative ensemble method that allocates the weights of the classifiers and further data samples are trained in each iteration step.  Table 5 shows the classification report of Ada Boost algorithm and Figure 13 shows its performance. It is observed that the Ada Boost algorithm resulted in lowest accuracy score of 0.56 in comparison to the other algorithms.

Conclusion
The present study successfully implemented the four supervised machine learning classification-based algorithms for the determination of fracture location in dissimilar Friction Stir Welded joints. Support Vector Machine algorithm resulted in highest accuracy score of 0.89 in comparison to the other algorithms while Ada Boost algorithm resulted in the lowest accuracy score of 0.56. It can be concluded that the Support Vector Machine algorithm works really well with a clear margin of separation and is effective in cases where the number of dimensions is greater than the number of samples i.e. in high-dimensional spaces. The future scope of this work is to implement Genetic Algorithms and to check whether they can classify the given task better than the Machine Learning algorithms.