Sentiment Analysis of Presidential Candidates in 2024: A Comparison of the Performance of Support Vector Machine and Random Forest with N-Gram Method

Abstract. This paper conducts a sentiment analysis of presidential candidates in Indonesia's 2024 election using Twitter data. Utilizing the "Indonesia Presidential Candidate’s Dataset, 2024" from Kaggle, containing 8555 Twitter entries, sentiment was categorized as positive or negative. Preprocessing techniques cleaned and normalized the data, followed by labeling with the VADER lexicon. This study contributes insights into public sentiment towards presidential candidates and the effectiveness of machine learning algorithms for political sentiment analysis. Purpose: This study aims to analyze public sentiment towards presidential candidates in Indonesia's 2024 election using the N-Gram method. By employing Support Vector Machine and Random Forest algorithms, we compare their performance in sentiment analysis. Utilizing the "Indonesia Presidential Candidate’s Dataset, 2024" from Kaggle, containing 8555 Twitter data entries, we seek to provide insights into the electorate's perceptions and preferences, contributing to a deeper understanding of the political landscape during this crucial period. Methods/Study design/approach: The study uses Support Vector Machine (SVM) and Random Forest algorithms for sentiment analysis on a dataset of 8555 tweets about Indonesia’s 2024 presidential candidates. SVM, paired with TF-IDF, and Random Forest, paired with N-Gram, are used for feature extraction. The data is labeled using the Vader lexicon. Result/Findings: The study compared Support Vector Machine (SVM) with TF-IDF and Random Forest with N-Gram methods in analyzing public sentiment towards Indonesia's 2024 presidential candidates. Results showed Random Forest with N-Gram achieved 85% accuracy, outperforming SVM with TF-IDF at 82%. Novelty/Originality/Value: This study provides insights into sentiment analysis applied to the 2024 Indonesian presidential election, enhancing understanding of public sentiment dynamics. Comparing SVM with TF-IDF and Random Forest with N-Gram contributes to the field, suggesting avenues for future research such as integrating contextual information or social network analysis for deeper insights into political opinion trends.

Authors

Institutions

Publication Details

Journal
Recursive Journal of Informatics
Published
2025-03-28
DOI
https://doi.org/10.15294/rji.v3i1.8385
Citations
1
Primary Topic
Data Mining and Machine Learning Applications
Type
article
Field-Weighted Citation Impact
3.25
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Sentiment Analysis of Presidential Candidates in 2024: A Comparison of the Performance of Support Vector Machine and Random Forest with N-Gram Method

Muhammad Ramadhan, Kholiq Budiman
1 citations
Recursive Journal of Informatics
Data Mining and Machine Learning Applications
3.25
article

Sentiment Analysis of Presidential Candidates in 2024: A Comparison of the Performance of Support Vector Machine and Random Forest with N-Gram Method

Muhammad Ramadhan, Kholiq Budiman
article en
1 citations

Abstract

Abstract. This paper conducts a sentiment analysis of presidential candidates in Indonesia's 2024 election using Twitter data. Utilizing the "Indonesia Presidential Candidate’s Dataset, 2024" from Kaggle, containing 8555 Twitter entries, sentiment was categorized as positive or negative. Preprocessing techniques cleaned and normalized the data, followed by labeling with the VADER lexicon. This study contributes insights into public sentiment towards presidential candidates and the effectiveness of machine learning algorithms for political sentiment analysis. Purpose: This study aims to analyze public sentiment towards presidential candidates in Indonesia's 2024 election using the N-Gram method. By employing Support Vector Machine and Random Forest algorithms, we compare their performance in sentiment analysis. Utilizing the "Indonesia Presidential Candidate’s Dataset, 2024" from Kaggle, containing 8555 Twitter data entries, we seek to provide insights into the electorate's perceptions and preferences, contributing to a deeper understanding of the political landscape during this crucial period. Methods/Study design/approach: The study uses Support Vector Machine (SVM) and Random Forest algorithms for sentiment analysis on a dataset of 8555 tweets about Indonesia’s 2024 presidential candidates. SVM, paired with TF-IDF, and Random Forest, paired with N-Gram, are used for feature extraction. The data is labeled using the Vader lexicon. Result/Findings: The study compared Support Vector Machine (SVM) with TF-IDF and Random Forest with N-Gram methods in analyzing public sentiment towards Indonesia's 2024 presidential candidates. Results showed Random Forest with N-Gram achieved 85% accuracy, outperforming SVM with TF-IDF at 82%. Novelty/Originality/Value: This study provides insights into sentiment analysis applied to the 2024 Indonesian presidential election, enhancing understanding of public sentiment dynamics. Comparing SVM with TF-IDF and Random Forest with N-Gram contributes to the field, suggesting avenues for future research such as integrating contextual information or social network analysis for deeper insights into political opinion trends.

Recursive Journal of InformaticsVol. 3(1)
State University of Semarang (ID)
Openalex Percentile: Top 10%
Data Mining and Machine Learning Applications
3.25
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.