Citation: Saleh, H.; Mostafa, S.;
Alharbi, A.; El-Sappagh, S.;
Alkhalifah, T. Heterogeneous
Ensemble Deep Learning Model for
Enhanced Arabic Sentiment Analysis.
Sensors 2022, 22, 3707. https://
doi.org/10.3390/s22103707
Academic Editors: Sławomir
Nowaczyk, Rita P. Ribeiro and
Grzegorz Nalepa
Received: 3 April 2022
Accepted: 10 May 2022
Published: 12 May 2022
Publisher’s Note: MDPI stays neutral
with regard to jurisdictional claims in
published maps and institutional affil-
iations.
Copyright: © 2022 by the authors.
Licensee MDPI, Basel, Switzerland.
This article is an open access article
distributed under the terms and
conditions of the Creative Commons
Attribution (CC BY) license (https://
creativecommons.org/licenses/by/
4.0/).
Article
Heterogeneous Ensemble Deep Learning Model for Enhanced
Arabic Sentiment Analysis
Hager Saleh
1,
* , Sherif Mostafa
1
, Abdullah Alharbi
2
, Shaker El-Sappagh
3,4
and Tamim Alkhalifah
5,
*
1
Faculty of Computers and Artificial Intelligence, South Valley University, Hurghada 84511, Egypt;
sherif.mostafa@fcih.svu.edu.eg
2
Department of Information Technology, College of Computers and Information Technology, Taif University,
P.O. Box 11099, Taif 21944, Saudi Arabia; amharbi@tu.edu.sa
3
Faculty of Computer Science and Engineering, Galala University, Suez 435611, Egypt;
sh.elsappagh@gmail.com
4
Information Systems Department, Faculty of Computers and Artificial Intelligence, Benha University,
Banha 13518, Egypt
5
Department of Computer, College of Science and Arts in Ar Rass, Qassim University,
Buraydah 52571, Saudi Arabia
* Correspondence: hager.saleh@fcih.svu.edu.eg (H.S.); tkhliefh@qu.edu.sa (T.A.)
Abstract:
Sentiment analysis was nominated as a hot research topic a decade ago for its increasing
importance in analyzing the people’s opinions extracted from social media platforms. Although
the Arabic language has a significant share of the content shared across social media platforms, its
content’s sentiment analysis is still limited due to its complex morphological structures and the
varieties of dialects. Traditional machine learning and deep neural algorithms have been used in a
variety of studies to predict sentiment analysis. Therefore, a need of changing current mechanisms is
required to increase the accuracy of sentiment analysis prediction. This paper proposed an optimized
heterogeneous stacking ensemble model for enhancing the performance of Arabic sentiment analysis.
The proposed model combines three different of pre-trained Deep Learning (DL) models: Recurrent
Neural Network (RNN), Long Short-Term Memory (LSTM), Gated Recurrent Unit (GRU) in con-
junction with three meta-learners Logistic Regression (LR), Random Forest (RF), and Support Vector
Machine (SVM) in order to enhance model’s performance for predicting Arabic sentiment analysis.
The performance of the proposed model with RNN, LSTM, GRU, and the five regular ML techniques:
Decision Tree (DT), LR, K-Nearest Neighbor (KNN), RF, and Naive Bayes (NB) are compared using
three benchmarks Arabic dataset. Parameters of Machine Learning (ML) and DL are optimized using
Grid search and KerasTuner, respectively. Accuracy, precision, recall, and f1-score were applied to
evaluate the performance of the models and validate the results. The results show that the proposed
ensemble model has achieved the best performance for each dataset compared with other models.
Keywords: machine learning; deep learning; ensemble learning; Arabic sentiment analysis
1. Introduction
With the noticeable increase and availability of internet forums, blogs, press sites,
and social networks, people have the opportunity to show and express their sentiments
and opinions publicly available to everyone. The steady increase in information and
data volumes created a new branch of science called sentiment analysis (SA). Sentiment
analysis can be summarized as the operation of analyzing opinions and also emotions
to deduce the tendencies appearing in the analyzed data, classifying them as positive,
negative, or even neutral. Sentiment analysis helps companies realize people’s opinions on
different topics and even various commodities, which has a tangible impact on helping the
concerned companies make the right economic and productivity decisions at the right time.
Its importance is extended even to the financial markets and stock exchange [1].
Sensors 2022, 22, 3707. https://doi.org/10.3390/s22103707 https://www.mdpi.com/journal/sensors