# Fault Diagnosis for Wind Turbines Based on ReliefF and eXtreme Gradient Boosting
## 4 Case Analysis and Result Comparison
### Comparison of Experimental Results  
In order to evaluate the fault diagnosis performance of the algorithm described in this paper, we used the accuracy, macro precision (\(P_{Macro}\)), macro recall (\(R_{Macro}\)) and macro F1-Score (\(F_{1,Macro}\)) of the final classification results as the evaluation indexes. Accuracy is the most common evaluation index. Accuracy refers to the number of correctly classified samples divided by all samples. Generally speaking, the higher the accuracy, the better the classifier performance. The precision, recall and F1-Score are the evaluation indexes of the binary classification model, which are now used in the evaluation of the multi classification model. We treat each category individually as \"positive\" and all other categories as \"negative\". Precision refers to the ratio between the number of samples that are predicted to be positive and the number of samples actually positive. Recall refers to the ratio between the number of samples predicted as positive and the actual number of samples in this category. F1-Score is a classification accuracy of the model which is obtained by combining the precision and recall. Macro precision is the average value of precisions in multiple binary classification models. Macro recall is the average value of recalls in multiple binary classification models. Macro F1-Score is the average of all F1-Score values. In order to prove the superiority of the algorithm described in this paper, we used the test set to carry out the following two experiments. Experiment 1: \"ReliefF + Support Vector Machine based on radial basis kernel function (rbf-SVM)\" algorithm. Support Vector Machine (SVM) algorithm was originally designed for the binary classification problem. The basic principle of SVM is to find the hyperplane with the maximum interval in feature space. In the face of multi classification tasks, SVM can use different mapping kernel functions to map the feature points that are difficult to be separated in low dimension to high dimension, and create a hyperplane to separate them in high dimension. After the completion of the model construction, the optimal parameters selected through repeated adjustment are: \"C = 3\", \"kernel = RBF\", \"gamma = 0.01\", \"decision_function_shape = ovr\". The value of \"C\" is the penalty coefficient, which refers to the tolerance of error. The higher the value of \"C\", the more intolerable the error is, and it is easy to over fit. The smaller the value of \"C\", the less fitting it is. The value of \"kernel\" is used to set the kernel function of the model. \"Gamma\" is a parameter that comes with the RBF function when it is selected as the kernel. The value of gamma determines the distribution of data mapped to the new feature space. The larger the value of gamma, the less the support vector. The smaller the value of gamma, the more the support vector. The number of support vectors affects the speed of training and prediction. Experiment 2: \"ReliefF + Adaptive Boosting (AdaBoost)\" algorithm. AdaBoost is also a kind of boosting algorithm. AdaBoost's core idea is to train different classifiers (weak classifiers) for the same training set, and then combine these weak classifiers to form a stronger final classifier. There are two  
Figure 4: The confusion matrix. kinds of weights in AdaBoost: sample weight and classifier weight. In the iterative process, the sample weight of the wrong samples will increase, and the next classification will pay more attention to the wrong samples. Each iteration will produce a classifier, each classifier has a classifier weight, and finally the weak classifier will be combined according to the classifier weight to form a strong classifier. After the completion of the ReliefF + AdaBoost model, the final optimization parameters of the model are: \"n estimators = 500\", \"learning rate = 1.0\". The value of \"n estimators\" is the maximum number of iterations. The value of \"learning rate\" is the model's learning rate, which refers to the step length of each iteration.