# Algorithm Development for the Non-Destructive Testing of Structural Damage
## 2 Damage Detection Using a Machine Learning Approach
### Developed Support Vector Machine  
In the implementation of a traditional SVM algorithm, the first type of support vectors or hyperplane position is the only information that is utilized in the test phase of SVM from the training phase, while the purpose of this algorithm is utilizing the second type of support vectors to provide the subsequent knowledge by the purpose of enhancement in SVM performance. The second type of support vectors is selected, as there is a lot of misclassified data, even in the existence of the optimized hyperplane [31]. Two potential sources of this misclassified data are the outliers and the non-linear separable data when using kernels. Traditional SVM do not consider non-linear separable data during the training phase. This happens in defining the constraints and also the tolerance parameters of the objective functions. The main concern herein is that if the data in the test set appears to be practically the same as these misclassified data in the training set, they will be essentially classified incorrectly as being misclassified data. This misclassification may reduce accuracy, as it happens because the SVM ignores the information in the training phase. Therefore, in order to obtain the benefits from misclassified data, the outlier's effect should be taken into account. Searching to find more similar data to the misclassified data, as proposed in this research, can enhance SVM performance. In this method, after determining the misclassified data in the training phase, the SVM will provide the advice weights, which are used in conjunction with the decision values in the testing phase. These defined advised weights will help SVM to improve its accuracy, while eliminating the outlier data. Equation (8) expresses the obtained misclassified data of the training phase as [29]:  
\[\mathrm{MD}=\underset{i=1}{\overset{N}{\cup}}x_{i}\left|y_{i}\right.\
eq \mathrm{sign}\left(\sum_{\alpha_{j}>0}y_{j}\alpha_{k}\left(x_{i},x_{j}\right)+b \right) \tag{8}\]  
The right side of the above equation may include any SVM decision function. Although there is the possibility that misclassified data may be null, experimental results have shown that the incidence of the misclassified data is prevalent. For each misclassified data in the MD set, the length from the corresponding k-nearest neighbor (k = 10) that has been correctly classified is computed as:  
\[\mathrm{CL(x_{i})}=\mathrm{Minimum}_{y_{i}}\left(\left|\mathrm{cl(x_{i})-cl \left(x_{j}\right)}\right|\right) \tag{9}\]  
\[\mathrm{N}=1,2,\ldots,10,\ y_{i}\#y_{j}\]  
\[\mathrm{cl(x_{i})}=\frac{x_{i}}{M_{d}} \tag{10}\]  
\[\mathrm{cl(x_{j})}=\frac{x_{j}}{M_{d}} \tag{11}\]  
\[\mathrm{M_{d}}=\frac{1}{N}\sum\
olimits_{j=1}^{N}(x_{i}-x_{j}) \tag{12}\]  
where \(\mathrm{CL(x_{i})}\) is the dispersion of the misclassified data from the 10-nearest neighbors that have been correctly classified. \(\mathrm{M_{d}}\) represents the average of the distances within the k-nearest neighbor (k = 10) of \(x_{i}\). However, by mapping the training data into a higher dimension, Equation (13) can be used with respect to kernel k to compute the length as:  
\[\left(\left|\left|\mathrm{ol(x_{i})-\mathrm{ol}\left(x_{j}\right)}\right| \right)\right)=\left(k(\mathrm{cl(x_{i})},\mathrm{cl(x_{i})})\right)+\left(k \left(\mathrm{cl(x_{j})},\mathrm{cl(x_{j})}\right)\right)-2k(\mathrm{cl(x_{i} )},\mathrm{cl(x_{j})})^{0.5} \tag{13}\]  
where \(k(\mathrm{cl(x_{n})},\mathrm{cl(x_{n})})=o(\mathrm{cl(x_{n})})\cdot o(\mathrm{ cl(x_{n})})\) [\(n=i\ or\ j\)], and represents the Kernel function. It defines the inner product in the transformed space, and reduces the complexity of finding the mapping function. By computing the CL for each \(x_{k}\) in the test set, the self-weightings (SWs) are assigned as:\[\mathrm{W}=\left\{