Skip to main content
Log in

Deep learning-based election results prediction using Twitter activity

  • Focus
  • Published:
Soft Computing Aims and scope Submit manuscript

Abstract

Nowadays, political parties have widely adopted social media for their party promotions and election campaigns. During the election, Twitter and other social media platforms are used for political coverage to promote the party and its candidates. This research discusses and estimates the stability of many volumetric social media approaches to forecast election results from social media activities. Numerous machine learning approaches are applied to opinions shared on social media for predicting election results. This paper presents a machine learning model based on sentiment analysis to predict Pakistan's general election results. In a general election, voters vote for their favorite party or candidate based on their personal interests. Social media has been extensively used for the campaign in Pakistan general election 2018. Using a machine learning technique, we provide a five-step process to analyze the overall election results, whether fair or unfair. The work is concluded with detailed experimental results along with discussion on the outcomes of sentiment analysis for real-world forecasting and approval of general elections in Pakistan.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5

Similar content being viewed by others

References

  • Ahmad J, Farman H, Jan Z (2019) Deep learning methods and applications. Deep learning: convergence to big data analytics. Springer, New York, pp 31–42

    Chapter  Google Scholar 

  • Anjaria M, Guddeti RMR (2014) Influence factor based opinion mining of Twitter data using supervised learning. In: 2014 Sixth International Conference on communication systems and networks (COMSNETS). IEEE, pp 1–8

    Google Scholar 

  • Bansal B, Srivastava S (2019) Lexicon-based Twitter sentiment analysis for vote share prediction using emoji and N-gram features. Int J Web Based Communities 15(1):85–99

    Article  Google Scholar 

  • Batra PK, Saxena A, Goel C (2020) Election result prediction using twitter sentiments analysis. In: 2020 Sixth International Conference on Parallel, Distributed and Grid Computing (PDGC). IEEE

  • Cambria E (2016) Affective computing and sentiment analysis. IEEE Intell Syst 31(2):102–107

    Article  Google Scholar 

  • Castro R, Kuffó L, Vaca C (2017) Back to# 6D: predicting Venezuelan states political election results through Twitter. In: 2017 Fourth international conference on edemocracy & egovernment (ICEDEG). IEEE, pp 148–153

    Chapter  Google Scholar 

  • Gayo-Avello D (2013) A meta-analysis of state-of-the-art electoral prediction from Twitter data. Soc Sci Comput Rev 31(6):649–679

    Article  Google Scholar 

  • Hall M, Frank E, Holmes G, Pfahringer B, Reutemann P, Witten IH (2009) The WEKA data mining software: an update. ACM SIGKDD Explor Newsl 11(1):10–18

    Article  Google Scholar 

  • Hasan A, Moin S, Karim A, Shamshirband S (2018) Machine learning-based sentiment analysis for twitter accounts. Math Comput Appl 23(1):11

    Google Scholar 

  • Hussain A, Ahmad M, Mughal IA (2018) Automatic disease detection in wheat crop using convolution neural network. In: The 4th International Conference on Next Generation Computing

  • Jan B, Farman H, Khan M, Imran M, Islam IU, Ahmad A, Ali S, Jeon G (2019) Deep learning in big data analytics: a comparative study. Comput Electr Eng 75:275–287

    Article  Google Scholar 

  • Kanavos A, Nodarakis N, Sioutas S, Tsakalidis A, Tsolis D, Tzimas G (2017) Large scale implementations for twitter sentiment classification. Algorithms 10(1):33

    Article  MathSciNet  Google Scholar 

  • Kanavos A, Perikos I, Hatzilygeroudis I, Tsakalidis A (2018) Emotional community detection in social networks. Comput Electr Eng 65:449–460

    Article  Google Scholar 

  • Kaplan AM, Haenlein M (2010) Users of the world, unite! The challenges and opportunities of Social Media. Bus Horiz 53(1):59–68

    Article  Google Scholar 

  • Khan M, Jan B, Farman H (2019) Deep learning: convergence to big data analytics. Springer, New York

    Book  Google Scholar 

  • Lewis DD (1998) Naive (Bayes) at forty: The independence assumption in information retrieval. In: European conference on machine learning. Springer, Berlin, Heidelberg, pp 4–15

    Google Scholar 

  • Miranda Filho R, Almeida JM, Pappa GL (2015) Twitter population sample bias and its impact on predictive outcomes: a case study on elections. In: 2015 IEEE/ACM international conference on advances in social networks analysis and mining (ASONAM). IEEE, pp 1254–1261

    Google Scholar 

  • Mohbey KK (2020) Multi-class approach for user behavior prediction using deep learning framework on twitter election dataset. J Data Inf Manag 2(1):1–14

    Article  Google Scholar 

  • Navigli R (2009) Word sense disambiguation: a survey. ACM Comput Surv (CSUR) 41(2):1–69

    Article  Google Scholar 

  • Pang B, Lee L (2004) A sentimental education: sentiment analysis using subjectivity summarization based on minimum cuts. arXiv:cs/0409058

  • Porter MF (1980) An algorithm for suffix stripping. Program 14(3):130–137

    Article  Google Scholar 

  • Ramos J (1983) Using tf-idf to determine word relevance in document queries. pp 133–142

  • Raschka S (2014) Naive bayes and text classification i-introduction and theory. arXiv preprint arXiv:1410.5329

  • Razzaq MA, Qamar AM, Bilal HSM (2014) Prediction and analysis of Pakistan election 2013 based on sentiment analysis. In: 2014 IEEE/ACM International conference on advances in social networks analysis and mining (ASONAM 2014). IEEE, pp 700–703

    Chapter  Google Scholar 

  • Saxena A, Kushik N, Chaurasia A, Kaushik N (2020) Predicting the outcome of an election results using sentiment analysis of machine learning. In: International conference on innovative computing and communications. Springer, Singapore, pp 503–516

    Chapter  Google Scholar 

  • Sebastiani F (2002) Machine learning in automated text categorization. ACM Comput Surv (CSUR) 34(1):1–47

    Article  Google Scholar 

  • Segnini A, Motchoffo JJT (2021) Random Forests and Text Mining. http://www.academia.edu/11059601/Random_Forest_and_Text_Mining Accessed 26 June 2021

  • Skoric M, Poor N, Achananuparp P, Lim EP, Jiang J (2012) Tweets and votes: A study of the 2011 singapore general election. In: 2012 45th hawaii international conference on system sciences. IEEE, pp 2583–2591

    Chapter  Google Scholar 

  • Soucy P, Mineau GW (2001) A simple KNN algorithm for text categorization. In: Proceedings 2001 IEEE International Conference on Data Mining. IEEE, pp 647–648

    Chapter  Google Scholar 

  • Taboada M, Brooke J, Tofiloski M, Voll K, Stede M (2011) Lexicon-based methods for sentiment analysis. Comput Linguist 37(2):267–307

    Article  Google Scholar 

  • Tumasjan A, Sprenger TO, Sandner PG, Welpe IM (2011) Election forecasts with Twitter: how 140 characters reflect the political landscape. Soc Sci Comput Rev 29(4):402–418

    Article  Google Scholar 

  • Wang H, Can D, Kazemzadeh A, Bar F, Narayanan S (2012) A system for real-time twitter sentiment analysis of 2012 us presidential election cycle. In: Proceedings of the ACL 2012 system demonstrations. pp 115–120

  • Wilson T, Wiebe J, Hoffmann P (2005) Recognizing contextual polarity in phrase-level sentiment analysis. In: Proceedings of human language technology conference and conference on empirical methods in natural language processing, pp 347–354

Download references

Acknowledgements

This work is supported by Prince Sultan University, Riyadh, Saudi Arabia.

Funding

Prince Sultan University, 786, Zahid Khan

Author information

Authors and Affiliations

Authors

Corresponding authors

Correspondence to Haleem Farman or Zahid Khan.

Ethics declarations

Conflict of interest

The authors declare that they have no conflicts of interest to report regarding the present study.

Additional information

Communicated by Irfan Uddin.

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Ali, H., Farman, H., Yar, H. et al. Deep learning-based election results prediction using Twitter activity. Soft Comput 26, 7535–7543 (2022). https://doi.org/10.1007/s00500-021-06569-5

Download citation

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s00500-021-06569-5

Keywords

Navigation