# Damage Diagnosis for Offshore Wind Turbine Foundations Based on the Fractal Dimension
## 4 Results
### Results of Fractal Dimension and kNN as Classification Method  
As it has been said in Section 3.3.1, the one and only parameter of the \(k\)NN classifier is \(k\), the number of neighbors. Table 4 shows the performance of the proposed approach using \(k\)NN as the classification method, in terms of the number of neighbors \(k\). As described in Section 4.1.2, the metrics for the evaluation of this multiclass classification problem are the average accuracy, the average precision, the average recall, the average F\({}_{1}\) score and the average specificity. The best results for each metric have been highlighted in bold. The same results, as a function of the number of neighbors, are depicted in Figure 6. The case with the best performance corresponds to the case where the number of neighbors is \(k=20\). It can be observed that increasing further the number of neighbors does not increase the indicators' performance and only leads to a higher computational cost. Table 5 represents the confusion matrix for the best case (\(k=20\)). In Table 4, the performance measures are presented using macroaveraging. However, in the confusion matrix in Table 5, precision and recall can be extracted for each class, separately. Similarly, Table 5 also presents the false negative rate (fnr)--defined as 1\(-\)ptr-- and the false discovery rate (fdr)--defined as 1\(-\)ppv--. From this confusion matrix, it can be derived all the aforementioned metrics. In particular, it is noteworthy that an average accuracy of 96.9%, an average precision of 94.3% and an average specificity of 97.7% are obtained. hyperparameters. More precisely, we combine the box constraint for \(C=5\), 10, 20, 30, 40 and 50 and the kernel scale for \(\gamma=0.1\), 0.2, 0.5, 1, 2, 5, 10, 15, 20, 30 and 50. The best results for each metric have been highlighted in bold. The same results, for a box constraint \(C=30\) and as a function of the kernel scale \(\gamma\), are depicted in Figure 7. The case with the best performance corresponds to the case where the box constraint is \(C=30\) and the kernel scale is \(\gamma=1\). Table 7 represents the confusion matrix for this case, where it is worth remarking that an average accuracy of 98.4%, an average precision of 96.5% and an average specificity of 98.9% are obtained. \begin{table}
\begin{tabular}{c c c c c c} \hline \hline \(C\) & \(\gamma\) & \(\overline{\text{acc}}\) & \(\overline{\text{ppv}}\) & \(\overline{\text{tpr}}\) & \(\overline{\text{F}_{1}}\) & \(\overline{\text{tmr}}\) \\ \hline \multirow{9}{*}{5} & 0.1 & 0.971 & 0.935 & 0.937 & 0.936 & 0.981 \\  & 0.2 & 0.981 & 0.958 & 0.956 & 0.957 & 0.987 \\  & 0.5 & 0.982 & 0.961 & 0.959 & 0.960 & 0.988 \\  & 1 & 0.981 & 0.959 & 0.957 & 0.958 & 0.987 \\  & 2 & 0.980 & 0.958 & 0.953 & 0.956 & 0.986 \\
5 & 5 & 0.937 & 0.933 & 0.844 & 0.876 & 0.949 \\  & 10 & 0.924 & 0.928 & 0.809 & 0.850 & 0.937 \\  & 15 & 0.922 & 0.924 & 0.805 & 0.846 & 0.935 \\  & 20 & 0.919 & 0.918 & 0.798 & 0.838 & 0.933 \\  & 30 & 0.893 & 0.901 & 0.732 & 0.777 & 0.911 \\  & 50 & 0.868 & 0.887 & 0.669 & 0.720 & 0.890 \\ \hline \multirow{9}{*}{10} & 0.1 & 0.971 & 0.933 & 0.935 & 0.934 & 0.981 \\  & 0.2 & 0.980 & 0.956 & 0.955 & 0.955 & 0.987 \\  & 0.5 & 0.982 & 0.961 & 0.960 & 0.960 & 0.988 \\  & 1 & 0.982 & 0.961 & 0.959 & 0.960 & 0.988 \\  & 2 & 0.982 & 0.962 & 0.959 & 0.960 & 0.988 \\  & 5 & 0.963 & 0.940 & 0.910 & 0.922 & 0.972 \\  & 10 & 0.924 & 0.928 & 0.809 & 0.850 & 0.937 \\  & 15 & 0.923 & 0.926 & 0.808 & 0.849 & 0.936 \\  & 20 & 0.922 & 0.924 & 0.805 & 0.846 & 0.935 \\  & 30 & 0.918 & 0.916 & 0.796 & 0.837 & 0.933 \\  & 50 & 0.888 & 0.898 & 0.720 & 0.766 & 0.907 \\ \hline \hline \end{tabular}
\end{table} 
Table 6: Performance measures (per-unit) corresponding to the quadratic SVM strategy for the multiclass classification problem using different box constraints (\(C\)) and different kernel scales (\(\gamma\)). The cases with the best performance of each measure are highlighted in bold.