# A Comparative Evaluation of Transformers and Deep Learning Models for Arabic Meter Classification
## 4 Results
### Deep Learning Models Results Comparison  
In the deep learning (DL) models, the text data are encoded using a character-encoding approach. Both BiLSTM and BiGRU models were fine-tuned with varying numbers of hidden layers. The complete performance results are presented in Table 4.  
The BiGRU model achieved its best performance at 5 layers, reaching a testing accuracy of 90.39%, with F1-score, recall, and precision scores all equal to 0.90. The BiLSTM model performed best at 6 layers, attaining a testing accuracy of 90.53%, with recall of 0.90, and both precision and F1-score reaching 0.91.  
The EarlyStopping parameter terminated the training process if the validation loss failed to increase or remained stable for eight epochs. Therefore, training stopped at the epochs indicated in the table for each layer.  
The performance per class for the BiLSTM model with 6 layers is shown in Table 5. The baseet and taweel meters achieved the highest F1-scores (0.96), while the rajaz meter recorded the lowest (0.79). The corresponding confusion matrix is illustrated in Figure 10.  
\begin{table}
\begin{tabular}{c c c c c c c c c c} \hline \hline \multirow{2}{*}{**Model**} & **Hidden** & **Training** & **Validation** & **Testing** & \multirow{2}{*}{**EarlyStopping**} & \multicolumn{2}{c}{**Testing**} & \multirow{2}{*}{**Recall**} & \multirow{2}{*}{**Precision**} & \multirow{2}{*}{**F1-Score**} \\  & **Layers** & **Time (in** & **Seconds)** & & & & & & \\ \hline \multirow{8}{*}{BiGRU} & 1 & 184.51 & 86.34 & 10.09 & 14 & 86.42 & 0.86 & 0.86 & 0.86 \\  & 2 & 439.77 & 89.16 & 16.57 & 18 & 88.88 & 0.89 & 0.89 & 0.89 \\  & 3 & 636.27 & 90.07 & 26.29 & 18 & 90.06 & 0.90 & 0.90 & 0.90 \\  & 4 & 1236.31 & 90.21 & 31.20 & 27 & 90.34 & 0.90 & 0.90 & 0.90 \\  & 5 & 1090.65 & 90.44 & 36.79 & 18 & 90.39 & 0.90 & 0.90 & 0.90 \\  & 6 & 2295.92 & 90.25 & 47.03 & 34 & 90.04 & 0.90 & 0.90 & 0.90 \\  & 7 & 3135.84 & 90.53 & 56.34 & 39 & 90.09 & 0.90 & 0.90 & 0.90 \\ \hline \multirow{8}{*}{BiLSTM} & 1 & 200.68 & 86.09 & 8.59 & 14 & 85.83 & 0.86 & 0.86 & 0.86 \\  & 2 & 390.16 & 88.88 & 15.88 & 14 & 88.68 & 0.89 & 0.89 & 0.89 \\ \cline{1-1}  & 3 & 712.73 & 88.79 & 23.63 & 17 & 89.13 & 0.89 & 0.89 & 0.89 \\ \cline{1-1}  & 4 & 907.06 & 89.84 & 32.77 & 16 & 89.66 & 0.90 & 0.90 & 0.90 \\ \cline{1-1}  & 5 & 1144.01 & 90.20 & 38.75 & 16 & 90.05 & 0.90 & 0.90 & 0.90 \\ \cline{1-1}  & 6 & 1632.94 & 90.37 & 47.11 & 18 & 90.53 & 0.90 & 0.91 & 0.91 \\ \cline{1-1}  & 7 & 2022.12 & 90.56 & 54.70 & 20 & 90.33 & 0.90 & 0.90 & 0.90 \\ \hline \hline \end{tabular}
\end{table}
Table 4: The performance of the DL models in the proposed study.  
\begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Meters** & **Encoded Meters** & **Precision** & **Recall** & **F1-Score** \\ \hline \multirow{2}{*}{saree} & 0 & 0.82 & 0.82 & 0.82 \\  & kamel & 1 & 0.88 & 0.88 & 0.88 \\ mutakareb & 2 & 0.92 & 0.93 & 0.93 \\ mutadarak & 3 & 0.90 & 0.88 & 0.89 \\ munsareh & 4 & 0.92 & 0.93 & 0.93 \\ maded & 5 & 0.80 & 0.85 & 0.82 \\ muitath & 6 & 0.94 & 0.96 & 0.95 \\ ramal & 7 & 0.93 & 0.93 & 0.93 \\ baseet & 8 & 0.96 & 0.96 & 0.96 \\ khafeef & 9 & 0.93 & 0.93 & 0.93 \\ tavel & 10 & 0.95 & 0.96 & 0.96 \\ wafer & 11 & 0.94 & 0.94 & 0.94 \\ hazaj & 12 & 0.91 & 0.90 & 0.91 \\ rajaz & 13 & 0.80 & 0.77 & 0.79 \\ \hline \hline \end{tabular}
\end{table}
Table 5: Class-wise results for the BiLSTM model with 6 hidden layers.