## 4 Experiments and Results
### Results and Discussion
To address this issue, we proposed the DWLF technique, which gives more weight for the samples of the minority classes during the model's training (more information about this technique can be found in Section 3.5). As shown in Table 3, this technique boosted the performance of the AraBERT and MARBERT models sharply on both datasets. In addition, the proposed technique shows a significant improvement in detecting the minority classes (e.g., _Denial, Thankful_). This is supported by the confusion matrices of the minority classes before and after applying this technique. Figure 6 shows the confusion matrices of three minority classes (_Empathetic, Thankful_, and _Denial_) before and after using DWLF with MARBERT model. As shown in the figure, the model has improved when detecting emotions that have very limited examples in the training set. Furthermore, we analyzed the output of the best model, MARBERT, with emojis replacement and DWLF. The analysis aims to better understand the source of errors for tweets' emotions that were incorrectly categorized. Table 4 shows examples of the misclassified tweets from the SenWave dataset. The manual inspection of these misclassified tweets indicates the following possible source of errors:  
* Unrelated tweets: It has been noticed that there are many tweets in the dataset that are not expressing any clear emotion, such as tweets #1, #2, and #3 in Table 4.
* Ambiguous emotions: There are some tweets that appear hard to have an agreement for emotion labeling. For example, tweet #4 could be labeled as \"surprise\" or \"optimistic\". Similarly, tweet #5 could be labeled as \"annoyed\" or both \"annoyed\" and \"sad\". Figure 6: Confusion matrices of three minority classes before (first row) and after (second row) applying DWLF technique with MARBERT model. using several preprocessing steps with different word embeddings and architectures. The proposed models achieved state-of-the-art results on a benchmarked dataset, SenWave. The best performance was achieved with fine-tuning MARBERT model with emojis replacement and DWLF. The obtained results show the importance of emojis description for sentiment analysis and how DWLF can boost the performance of these systems. However, the proposed model needs to be tested on other datasets to evaluate its generalization. In addition, the proposed model has not been evaluated on other languages, which need to be investigated in the future. As for future work, other models and datasets will be evaluated. In addition, we will evaluate the model on other languages. Moreover, the impact of morphological analysis of Arabic text on the sentiment analysis needs to be investigated further. Conceptualization, N.A. and H.L. ; methodology, N.A. and H.L. ; writing--original draft preparation, N.A. and H.L. ; writing--review and editing, N.A. and H.L. ; supervision, H.L. All authors have read and agreed to the published version of the manuscript. This research received no external funding. Not applicable. The authors would like to acknowledge the support provided by King Fahd University of Petroleum and Minerals (KFUPM) during this work. The authors declare no conflict of interest. The following abbreviations are used in this manuscript: \begin{tabular}{l l} BERT & Bidirectional Encoder Representations from Transformers \\ CNN & Convolution Neural Network \\ COVID-19 & Coronavirus Disease \\ DWLF & Dynamically weighted loss function \\ NLP & Natural Language Processing \\ SVM & Support Vector Machines \\ VADER & Valence Aware Dictionary and Sentiment Reasoner \\ WHO & World Health Organization \\ \end{tabular}