Leveraging Machine Learning and Semi-Structured Information to Identify Political Views from Social Media Posts
Social media platforms make a significant contribution to modeling and influencing people’s opinions and decisions, including political views and orientation. Analyzing social media content can reveal trends and key triggers that will influence society. This paper presents an exhaustive analysis of...
Main Authors: | , , |
---|---|
Format: | Article |
Language: | English |
Published: |
MDPI AG
2022-12-01
|
Series: | Applied Sciences |
Subjects: | |
Online Access: | https://www.mdpi.com/2076-3417/12/24/12962 |
_version_ | 1797461595756953600 |
---|---|
author | Adriana Olteanu Alexandra Cernian Sebastian-Augustin Gâgă |
author_facet | Adriana Olteanu Alexandra Cernian Sebastian-Augustin Gâgă |
author_sort | Adriana Olteanu |
collection | DOAJ |
description | Social media platforms make a significant contribution to modeling and influencing people’s opinions and decisions, including political views and orientation. Analyzing social media content can reveal trends and key triggers that will influence society. This paper presents an exhaustive analysis of the performance generated by various implementations of the Naïve Bayes classifier, combined with a semi-structured information approach, to identify the political orientation of Twitter users, based on their posts. As research methodology, we aggregate in a semi-structured format a database of over 86,000 political posts from Democrat (right) and Republican (left) ideologies. Such an approach allows us to associate a Democrat or Republican label to each tweet, in order to create and train the model. The semi-structured input data are processed using several NLP techniques and then the model is trained to classify the political orientation based on semantic criteria and semi-structured information. This paper examines several variations of the Naïve Bayes classifier suite: Gaussian Naïve Bayes, Multinomial Naïve Bayes, Calibrated Naïve Bayes algorithms, and tracks a variety of performance indices and their graphical representations: Prediction Accuracy, Precision, Recall, Confusion Matrix, Brier Score Loss, etc. We obtained an accuracy of around 80–85% in identifying the political orientation of the users. This leads us to the conclusion that this type of application can be integrated into a more complex system and can help in determining political trends or election results. |
first_indexed | 2024-03-09T17:21:39Z |
format | Article |
id | doaj.art-f77551730ca24cdda9167b5345f8d78d |
institution | Directory Open Access Journal |
issn | 2076-3417 |
language | English |
last_indexed | 2024-03-09T17:21:39Z |
publishDate | 2022-12-01 |
publisher | MDPI AG |
record_format | Article |
series | Applied Sciences |
spelling | doaj.art-f77551730ca24cdda9167b5345f8d78d2023-11-24T13:07:44ZengMDPI AGApplied Sciences2076-34172022-12-0112241296210.3390/app122412962Leveraging Machine Learning and Semi-Structured Information to Identify Political Views from Social Media PostsAdriana Olteanu0Alexandra Cernian1Sebastian-Augustin Gâgă2Faculty of Automatic Control and Computers, Politehnica University of Bucharest, 060042 Bucharest, RomaniaFaculty of Automatic Control and Computers, Politehnica University of Bucharest, 060042 Bucharest, RomaniaFaculty of Automatic Control and Computers, Politehnica University of Bucharest, 060042 Bucharest, RomaniaSocial media platforms make a significant contribution to modeling and influencing people’s opinions and decisions, including political views and orientation. Analyzing social media content can reveal trends and key triggers that will influence society. This paper presents an exhaustive analysis of the performance generated by various implementations of the Naïve Bayes classifier, combined with a semi-structured information approach, to identify the political orientation of Twitter users, based on their posts. As research methodology, we aggregate in a semi-structured format a database of over 86,000 political posts from Democrat (right) and Republican (left) ideologies. Such an approach allows us to associate a Democrat or Republican label to each tweet, in order to create and train the model. The semi-structured input data are processed using several NLP techniques and then the model is trained to classify the political orientation based on semantic criteria and semi-structured information. This paper examines several variations of the Naïve Bayes classifier suite: Gaussian Naïve Bayes, Multinomial Naïve Bayes, Calibrated Naïve Bayes algorithms, and tracks a variety of performance indices and their graphical representations: Prediction Accuracy, Precision, Recall, Confusion Matrix, Brier Score Loss, etc. We obtained an accuracy of around 80–85% in identifying the political orientation of the users. This leads us to the conclusion that this type of application can be integrated into a more complex system and can help in determining political trends or election results.https://www.mdpi.com/2076-3417/12/24/12962political orientationNaïve Bayesmachine learningsemi-structured informationsocial media postsstatement analysis |
spellingShingle | Adriana Olteanu Alexandra Cernian Sebastian-Augustin Gâgă Leveraging Machine Learning and Semi-Structured Information to Identify Political Views from Social Media Posts Applied Sciences political orientation Naïve Bayes machine learning semi-structured information social media posts statement analysis |
title | Leveraging Machine Learning and Semi-Structured Information to Identify Political Views from Social Media Posts |
title_full | Leveraging Machine Learning and Semi-Structured Information to Identify Political Views from Social Media Posts |
title_fullStr | Leveraging Machine Learning and Semi-Structured Information to Identify Political Views from Social Media Posts |
title_full_unstemmed | Leveraging Machine Learning and Semi-Structured Information to Identify Political Views from Social Media Posts |
title_short | Leveraging Machine Learning and Semi-Structured Information to Identify Political Views from Social Media Posts |
title_sort | leveraging machine learning and semi structured information to identify political views from social media posts |
topic | political orientation Naïve Bayes machine learning semi-structured information social media posts statement analysis |
url | https://www.mdpi.com/2076-3417/12/24/12962 |
work_keys_str_mv | AT adrianaolteanu leveragingmachinelearningandsemistructuredinformationtoidentifypoliticalviewsfromsocialmediaposts AT alexandracernian leveragingmachinelearningandsemistructuredinformationtoidentifypoliticalviewsfromsocialmediaposts AT sebastianaugustingaga leveragingmachinelearningandsemistructuredinformationtoidentifypoliticalviewsfromsocialmediaposts |