# Automatic Identification of Peanut-Leaf Diseases Based on Stack Ensemble
## 3 Results
### Effect of Data Augmentation on Model Accuracy and F1 Score  
The area under the receiver operating characteristic (AUC-ROC) curve and AUC curves are often used to evaluate the performance of a machine-learning algorithm as well. The ROC curve plots the difference between the false positive rate (\(FPR\)) and true positive rate (\(TPR\)). A larger area under the curve means that the classifier has a better classification performance for that class. The formula is defined as in Equations (6) and (7):  
\[TPR=\ \frac{TP}{TP+FN} \tag{6}\]  
where TPR is the amount of positive data that is correctly predicted as positive with respect to all positive data.  
\[FPR\ =\ \frac{FP}{FP+TN} \tag{7}\]  
where TN represents a class that is truly false and predicted to be false, and FPR represents the amount of negative data points that are wrongly predicted as positive with respect to all negative data.  
It is necessary to emphasize the data used during training. For example, as shown in Table 3, Table 4, Figure 6, and Figure 7, when using the data-augmentation technique in this experiment, the accuracy of each model was improved, as well as the \(F1\) score, which is an important measure of the performance of a machine-learning model that weighs the recall and precision of the model to give an overall assessment of the performance of the model. Without data augmentation, the maximum overall \(F1\) score of VGG16 after ensemble was 78.52. After training with data augmentation, the maximum \(F1\) score reached 85.60. A larger \(F1\) score meant that the classifier was more stable and did not easily misclassify this class into other classes. Figure 7 randomly selects three of the 30 models and presents their ROC curves. According to Figure 7, the curve coverage area of the SD and LSD classes improved after using the data-augmentation method, which indicates that the classification performance of the classifier for the SD and LSD classes was improved. Many neural networks have millions of parameters, and making these parameters work correctly requires large amounts of data on which to train. Data-augmentation techniques can improve the generalizability of a model by providing more training samples for the network and reducing the model's dependence on certain attributes.  
\begin{table}
\begin{tabular}{c c c c c c c} \hline \hline \multirow{2}{*}{**Model**} & \multicolumn{6}{c}{**F1 Score**} \\ \cline{2-7}  & \multicolumn{3}{c}{**Data Augmentation**} & \multicolumn{3}{c}{**Without Data Augmentation**} \\ \cline{2-7}  & **RF** & **LR** & **SVM** & **RF** & **LR** & **SVM** \\ \hline AlexNet & 74.04 & **74.63** & 73.77 & 73.77 & 72.27 & 71.96 \\ VGG16 & 84.75 & **85.60** & 83.08 & 83.08 & 78.52 & 76.40 \\ ResNet50 & 89.93 & **90.07** & 90.04 & 90.04 & 87.74 & 87.64 \\ DenseNet121 & 90.45 & **90.50** & 89.31 & 89.31 & 86.22 & 84.59 \\ InceptionV3 & 80.25 & **87.48** & 86.75 & 79.78 & 82.17 & 86.75 \\ \hline \hline \end{tabular}
\end{table}
Table 4: \(F1\) scores for the model ensemble with and without data augmentation.  
\begin{table}
\begin{tabular}{c c c c c c c c c} \hline \hline \multirow{2}{*}{**Model**} & \multicolumn{6}{c}{**Accuracy**} \\ \cline{2-10}  & \multicolumn{3}{c}{**Data Augmentation**} & \multicolumn{3}{c}{**Without Data Augmentation**} \\ \cline{2-10}  & **RF** & **LR** & **SVM** & **WE1** & **RF** & **LR** & **SVM** & **WE** \\ \hline AlexNet & **93.19** & **93.19** & 92.94 & 91.79 & 92.19 & 92.54 & 92.44 & 90.98 \\ VGG16 & 96.01 & **96.10** & 95.51 & 93.35 & 93.77 & 94.44 & 94.02 & 93.14 \\ ResNet50 & 97.43 & **97.59** & 97.43 & 95.25 & 96.68 & 96.93 & 97.01 & 94.36 \\ DenseNet121 & **97.59** & 97.51 & 97.26 & 95.98 & 95.93 & 96.35 & 95.85 & 94.01 \\ InceptionV3 & 96.76 & **96.84** & 96.68 & 95.07 & 94.85 & 95.51 & 94.85 & 93.37 \\ \hline \hline \end{tabular} \({}^{\dagger}\) Without ensemble.  
\end{table}
Table 3: Accuracy of the model ensemble with and without data augmentation.