# A Fast Parallel Random Forest Algorithm Based on Spark
## 5 Experiments
### Evaluation of Algorithm Performance
\begin{table}
\begin{tabular}{c c c c c c c} \hline  & \multicolumn{2}{c}{**Our Algorithm**} & \multicolumn{2}{c}{**RF**} & \multicolumn{2}{c}{**MGARF**} \\ \hline
**Data Set** & **Acc** & **Time (s)** & **Acc** & **Time (s)** & **Acc** & **Time (s)** \\ \hline Wine & **0.9815** & 3.7 & 0.9455 & 3.8 & 0.9735 & 68.8 \\ Glass & **0.7538** & 4.4 & 0.7425 & 4.1 & 0.7325 & 73 \\ Image & 0.9547 & 4.7 & 0.9018 & 3.9 & **0.9679** & 34.3 \\ Ionosphere & 0.9057 & 8.3 & **0.9146** & 9.5 & 0.8928 & 25.3 \\ Letter & **0.9532** & 43.2 & 0.9321 & 46.4 & 0.9482 & 477.6 \\ Optical & 0.9564 & 51.9 & 0.9608 & 30.6 & **0.9652** & 98.2 \\ Adult & **0.8688** & 167.2 & 0.8512 & 173.8 & 0.8466 & 358.9 \\ \hline \end{tabular} The best performance is shown in bold.  
\end{table} 
Table 4: Accuracy and runtime comparison. Figure 5: Comparison of running time under small and medium data sets. \begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**Data Set** & & **Our Algorithm** & **KNN** & **SVM** & **NB** \\ \hline \multirow{6}{*}{Wine} & _Accuracy_ & 0.9815 & 0.7782 & 0.9255 & **0.9818** \\  & _Precision_ & 0.9833 & 0.7933 & 0.9433 & **0.9867** \\  & _Recall_ & 0.9825 & 0.7611 & 0.9278 & **0.9867** \\  & _F1-value_ & 0.9824 & 0.7602 & 0.9245 & **0.9852** \\  & _Accuracy_ & **0.7538** & 0.6705 & 0.6000 & 0.5692 \\  & _Precision_ & **0.8559** & 0.5316 & 0.5279 & 0.4306 \\  & _Recall_ & **0.6846** & 0.5601 & 0.5509 & 0.4980 \\  & _F1-value_ & **0.7058** & 0.5296 & 0.5200 & 0.4482 \\  & _Accuracy_ & **0.9547** & 0.9079 & 0.9460 & 0.7984 \\  & _Precision_ & **0.9563** & 0.9123 & 0.9510 & 0.8378 \\  & _Recall_ & **0.9543** & 0.9134 & 0.9489 & 0.8126 \\  & _F1-value_ & **0.9533** & 0.9105 & 0.9483 & 0.7982 \\  & _Accuracy_ & 0.9057 & 0.8784 & 0.8403 & 0.8221 \\  & _Precision_ & 0.9095 & **0.9247** & 0.8936 & 0.8224 \\  & _Recall_ & **0.8642** & 0.8357 & 0.7870 & 0.8385 \\  & _F1-value_ & **0.8769** & 0.8482 & 0.8022 & 0.8171 \\  & Accuracy & **0.9532** & 0.9017 & 0.8352 & 0.6437 \\  & _Precision_ & **0.9542** & 0.9053 & 0.8367 & 0.6562 \\  & _Recall_ & **0.9531** & 0.8997 & 0.8331 & 0.6423 \\  & _F1-value_ & **0.9532** & 0.9004 & 0.8327 & 0.6390 \\  & _Accuracy_ & 0.9564 & 0.9538 & **0.9695** & 0.8204 \\  & _Precision_ & 0.9569 & 0.9552 & **0.9713** & 0.8613 \\  & _Recall_ & 0.9564 & 0.9519 & **0.9688** & 0.8174 \\  & _F1-value_ & 0.9564 & 0.9527 & **0.9691** & 0.8167 \\  & _Accuracy_ & **0.8688** & 0.7749 & 0.7828 & 0.7983 \\  & _Precision_ & 0.8207 & 0.6811 & **0.8795** & 0.7419 \\ Adult & _Recall_ & **0.7792** & 0.6032 & 0.5457 & 0.6297 \\  & _F1-value_ & **0.7962** & 0.6154 & 0.5216 & 0.6494 \\  & _Accuracy_ & **0.9106** & 0.8379 & 0.8738 & 0.7672 \\  & _Precision_ & **0.9195** & 0.8148 & 0.8576 & 0.7624 \\  & _Recall_ & 0.8820 & 0.7893 & **0.8953** & 0.7465 \\  & _F1-value_ & **0.8892** & 0.7881 & 0.7883 & 0.7363 \\ \hline \hline \end{tabular} The best performance is shown in bold.  
\end{table} 
Table 5: Comparison results of different algorithms. It can be seen from Table 5 that other classification algorithms are only better than the algorithm in this paper in some indicators, and only the SVM algorithm is better than the algorithm in this paper in calculating the average of the classification indicators of all test data sets. Therefore, compared with other classification algorithms, the proposed algorithm has a better classification performance. In order to conduct statistical analysis on the test results, this paper uses the Friedman test [29] to verify whether there is a significant difference between the methods, where the null-hypothesis of Friedman test is that the tested indices are equivalent. There are seven data sets and six classifiers, the Friedman statistics \(F_{F}\) are distributed according to the F-distribution with 5 and 30 degrees of freedom, and the significance level for the critical value of \(\alpha\) = 0.05 is 2.534. According to the average rank of the Accuracy indicators in Tables 4 and 5, the \(F_{F}\) statistic is 5.321, which is greater than 2.534.