# Affect Analysis in Arabic Text: Further Pre-Training Language Models for Sentiment and Emotion
## 5 Results and Discussion
\begin{table}
\begin{tabular}{c c c c c c c} \hline \hline
**Source** & **Datasets** & **Models** & **Precision** & **Recall** & **Accuracy** & **Macro-F1** \\ \hline \multirow{5}{*}{Twitter} & \multirow{5}{*}{SS2030} & SVM [75] & 90.1\% & - & 89.83\% & 89.7\% \\  & & BERT-base-QaRiB & 90.87\% & 90.56\% & 91.06\% & 90.70\% \\  & & QE3 & 93.21\% & 92.62\% & 93.18\% & **92.89\%** \\  & & QE6 & 91.09\% & 91.50\% & 91.53\% & **91.27\%** \\ \hline \multirow{5}{*}{Twitter} & \multirow{5}{*}{Twitter-AB} & SVM [77] & - & - & 87.2\% & - \\  & & BERT-base-QaRiB & 94.74\% & 94.32\% & 94.39\% & 94.37\% \\  & & QE3 & 96.41\% & 96.49\% & 96.43\% & **96.43\%** \\  & & QE6 & 96.06\% & 95.83\% & 95.92\% & **95.90\%** \\ \hline \multirow{5}{*}{**Reviews**} & \multirow{5}{*}{40k-Tweets} & LSTM [76] & 86.94\% & 88.9\% & 88.05\% & 87.24\% \\  & & BERT-base-QaRiB & 90.56\% & 90.51\% & 90.50\% & 90.49\% \\  & & QE3 & 91.22\% & 91.19\% & 91.20\% & **91.20\%** \\  & & QE6 & 91.40\% & 91.40\% & 91.40\% & **91.40\%** \\ \hline \multirow{5}{*}{**Reviews**} & \multirow{5}{*}{ArSentiment} & SVM [78] & - & - & 59.9\% & - \\  & & BERT-base-QaRiB & 81.21\% & 72.52\% & 90.62\% & 75.93\% \\  & & QE3 & 80.57\% & 77.83\% & 91.10\% & **79.12\%** \\ \cline{1-1}  & & QE6 & 80.25\% & 77.50\% & 91.32\% & **78.65\%** \\ \cline{1-1} \cline{2-6}  & \multirow{5}{*}{MASC} & LLR [79] & - & - & - & 97.8\% \\ \cline{1-1}  & & BERT-base-QaRiB & 95.65\% & 93.81\% & 95.10\% & 94.61\% \\ \cline{1-1}  & & QE3 & 96.03\% & 95.95\% & 96.29\% & **95.99\%** \\ \cline{1-1}  & & QE6 & 95.45\% & 95.60\% & 95.84\% & **95.52\%** \\ \hline \hline \end{tabular}
\end{table} 
Table 12: Results of fine-tuning emotion models on sentiment datasets (All-metrics). Overall, as shown in Tables 12 and 13, all sentiment models, including QST, QSR, and QSRT, and emotion models, including QE3, and QE6, outperformed the BERT-base-QaRiB model for all sentiment and emotion datasets. In the tables, results that exceeded the BERT-base-QaRiB model results are highlighted in bold. Table 12 reveals that the QE3 model outperformed BERT-base-QaRiB on the SS2030, Twitter-AB, 40k-Tweets, ArSentiment, and MASC datasets by 2.18%, 2.06%, 0.70%, 3.18%, and 1.38%, respectively. In addition, the QE6 model outperformed BERT-base-QaRiB on the SS2030, Twitter-AB, 40k-Tweets, ArSentiment, and MASC datasets by 0.57%, 1.53%, 0.90%, 2.71%, and 0.91%, respectively. When comparing emotion models, including QE3 and QE6, across five sentiment datasets, QE3 outperforms QE6 on the SS2030, Twitter-AB, ArSentiment, and MASC datasets, obtaining macro-F1 by 92.89%, 96.43%, 79.12%, and 95.99%, respectively. On the 40k-Tweets dataset, the QE6 model outperforms the QE3 and obtains macro-F1 by 91.40%. These results may provide insight into the fact that pre-training the model for longer training steps does not necessarily give optimal performance. In addition, the further pre-training of the model using sentiment data and fine-tuning it with an emotion dataset can improve the final emotion classification results. In Table 13, compared to the BERT-base-QaRiB model, the QST model improved performance on the EATD dataset by 4.71%, making it the best model on this dataset with a macro-F1 of 90.18%. On the same dataset and using the QSR model, a 2.80% improvement in performance was observed. On the same dataset, the QSRT model showed a performance improvement of 4.32%, which was better compared to the QSR models. Using the ExaEC dataset, QST model outperformed all other models with an improvement of 1.24% and a macro-F1 of 65.05%. While using the QSR and QSRT models, performance improvements of 1.17% and 0.57% were achieved. Comparing the results of the QST and QSR models on emotion datasets, including EATD and ExaAEC on all emotion datasets, we noticed that the QST model outperformed the QSR model. This was expected because the QST model was further trained using tweet data, and the emotion datasets were also taken from Twitter.