Skip to main content

Forecasting Election Result via Artificial Intelligence Approach: NLP and Machine Learning

  • Conference paper
  • First Online:
Proceedings of International Conference on Communication and Computational Technologies

Part of the book series: Algorithms for Intelligent Systems ((AIS))

  • 332 Accesses

Abstract

As election day approaches, politics, elections, and candidates are all topics that come up regularly in conversations. Citizens anticipate their favored candidate to be selected, and they try to predict how likely it is that their preferred candidate will be elected, as well as how likely it is that the other candidates will be elected. The goal of this article is to use NLP and machine learning algorithms to forecast the election outcome from Twitter data. For preprocessing, NLP technologies were used on the dataset. For a better result from machine learning models, punctuation and stop words were removed, lower casing, tokenization, stemming, and lemmatization were utilized. Then, using machine learning techniques such as LGBMClassifier, LogisticRegression, ExtraTreeClassifier, DecisionTreeClassifier, RandomForestClassifier, GaussianNB, and KNeighborsClassifier, each result was generated based on the input feature, which was tweet and user information, respectively. When the tweet was used as a variable, the total result was about 80% of the accuracy score, while the user information variable accounted for roughly 60% of the accuracy score. As a result of this finding, it is determined that the tweet column is a far more significant component than the user information one. Pre-trained models would be used for additional study, with the goal of getting a higher accuracy score and applying this outcome to the next Korean election.

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

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 259.00
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 329.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info
Hardcover Book
USD 329.99
Price excludes VAT (USA)
  • Durable hardcover edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Similar content being viewed by others

References

  1. Khan A, Zhang H, Boudjellal N, Ahmad A, Shang J, Dai L, Hayat B (2017) Election prediction on Twitter: a systematic mapping study. Complexity 1–27

    Google Scholar 

  2. WhatIs. https://whatis.techtarget.com/definition/social-media, last accessed 2021/12/13

  3. Statista. https://www.statista.com/statistics/278414/number-of-worldwide-social-network-users/, last accessed 2021/12/13

  4. Youngausint. https://www.youngausint.org.au/post/social-media-in-the-2020-u-s-election, last accessed 2021/12/14

  5. Nugroho DK (2021) US presidential election 2020 prediction based on Twitter data using lexicon-based sentiment analysis. In: 2021 11th International conference on cloud computing, data science & engineering (confluence), India

    Google Scholar 

  6. Joyce B, Deng J (2017) Sentiment analysis of tweets for the 2016 US presidential election. In: 2017 IEEE MIT undergraduate research technology conference (URTC), Cambridge, MA, USA

    Google Scholar 

  7. Bilal M, Asif S, Yousuf S, Afzal U (2018) Pakistan General Election: understanding the predictive power of social media. In: 2018 12th International conference on mathematics, actuarial science, computer science and statistics (MACS), Karachi, Pakistan

    Google Scholar 

  8. Sakiyama KM, Silva AQB, Matsubara ET (2019) Twitter breaking news detector in the 2018 Brazilian presidential election using word embeddings and convolutional neural networks. In: 2019 International joint conference on neural networks (IJCNN), Budapest, Hungary

    Google Scholar 

  9. Kaggle. https://www.kaggle.com/manchunhui/us-election-2020-tweets, last accessed 2021/12/14

  10. Bahad P, Saxena P (2020) Study of adaboost and gradient boosting algorithms for predictive analytics. In: International conference on intelligent computing and smart communication 2019. Springer, Singapore, pp 235–244

    Google Scholar 

  11. Maudes J, Rodríguez JJ, García-Osorio C, García-Pedrajas N (2012) Random feature weights for decision tree ensemble construction. Inf Fusion 13(1):20–30

    Article  Google Scholar 

  12. Ke G, Meng Q, Finley T, Wang T, Chen W, Ma W, Liu T Y (2017) Lightgbm: a highly efficient gradient boosting decision tree. Adv Neural Inf Process Syst 30:3146–3154

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Ook Lee .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2023 The Author(s), under exclusive license to Springer Nature Singapore Pte Ltd.

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Park, J., Cheon, M., Hou, S., Lee, O. (2023). Forecasting Election Result via Artificial Intelligence Approach: NLP and Machine Learning. In: Kumar, S., Hiranwal, S., Purohit, S.D., Prasad, M. (eds) Proceedings of International Conference on Communication and Computational Technologies . Algorithms for Intelligent Systems. Springer, Singapore. https://doi.org/10.1007/978-981-19-3951-8_57

Download citation

Publish with us

Policies and ethics