# Rotating Machinery Fault Detection Using Support Vector Machine via Feature Ranking
## 5 Explore Different Machine Learning Models with ClassificationLearner
### Classification Learner with All 58 Predictors  
All 58 predictors were tested with all available machine-learning models in MATLAB ClassificationLearner. As displayed in Table 6, the three best models are from Support Vector Machine (SVM): Linear, Quadratic, and Cubic, with an accuracy of 99.8%.  
To choose the best possible model from the Linear, Quadratic, and Cubic SVM, a closer observation of their Confusion Matrix was needed. Model 6.2 of the Quadratic SVM has a slightly better performance with Class 2 and Class 3 than the Linear and Cubic SVM. For the Quadratic SVM, these two classes have 99.8% and 100% accuracy, which are higher than the other two models at 99.5% and 99.8% respectively. The differences are highlighted in the Figure 13 below, with red boxes indicating lower accuracy and green boxes indicating higher accuracy.  
Figure 12: Receiver Operating Characteristic curve of Improved Decision Tree model.  
\begin{table}
\begin{tabular}{l l l l l} \hline \hline
**Class** & **Accuracy** & **Precision** & **Recall** & **F-score** \\ \hline
1 & 99.96\% & 100\% & 99.8\% & 99.6\% \\
2 & 99.92\% & 99.206\% & 99.602\% & 100\% \\
3 & 99.82\% & 98.614\% & 99.104  
Figure 13: Cont.  
\begin{table}
\begin{tabular}{l l l l l} \hline \hline
**Model Number** & **Model Type** & **Neural Network** & **Predictors** & **Accuracy (Validation)** \\ \hline
3.1 & Decision Tree & Fine Tree & All & 99.1\% \\
3.2 & Decision Tree & Medium & All & 98.9\% \\
3.3 & Decision Tree & Coarse Tree & All & 50.0\% \\
4.1 & Linear Discriminant & Linear Discriminant & All & 99.1\% \\
5.2 & Naive Bayes & Kernel Naive Bayes & All & 87.7\% \\
**6.1** & **SVM** & **Linear SVM** & **All** & **99.8\%** \\
**6.2** & **SVM** & **Quadratic SVM** & **All** & **99.8\%** \\
**6.3** & **SVM** & **Cubic SVM** & **All** & **99.8\%** \\
6.4 & SVM & Fine Gaussian SVM & All & 41.0\% \\
6.5 & SVM & Medium Gaussian SVM & All & 99.3\% \\
6.6 & SVM & Coarse Gaussian SVM & All & 99.6\% \\
7.1 & KNN & Fine KNN & All & 99.0\% \\
7.2 & KNN & Medium KNN & All & 97.9\% \\
7.3 & KNN & Coarse KNN & All & 91.0\% \\
7.4 & KNN & Cosine KNN & All & 98.6\% \\
7.5 & KNN & Cubic KNN & All & 97.4\% \\
7.6 & KNN & Weighted KNN & All & 98.4\% \\
8.1 & Kernel & SVM Kernel & All & 92.4\% \\
8.2 & Kernel & Logistic Regression Kernel & All & 91.5\% \\
9.1 & Ensemble & Boosted Trees & All & 99.4\% \\
9.2 & Ensemble & Bagged Trees & All & 99.4\% \\
9.3 & Ensemble & Subspace Discriminant & All & 98.1\% \\
9.4 & Ensemble & Subspace KNN & All & 91.4\% \\
9.5 & Ensemble & RUS Boosted Trees & All & 98.9\% \\
10.1 & Neural Network & Narrow Neural Network & All & 99.3\% \\
10.2 & Neural Network & Medium Neural Network & All & 99.4\% \\
10.3 & Neural Network & Wide Neural Network & All & 99.5\% \\
10.4 & Neural Network & Bilayer Neural Network & All & 99.3\% \\
10.5 & Neural Network & Trilayered Neural Network & All & 99.4\% \\ \hline \hline \end{tabular}
\end{table}
Table 6: Summary of Accuracy for the Trained Model Using All Predictors in MATLAB Classification Learner.