You are on page 1of 2

Bsc Topic

Analisis Sentimen pada Tweet Tentang UU Cipta Kerja Menggunakan Algoritma Support Vector
Machine dan Particle Swarm Optimization
(Sentiment Analysis on Tweet about Law on Job Creation by using Support Vector Machine and
Particle Swarm Optimization Algorithm)

Introduction:
The growth of social media, especially Twitter, has played a significant role in modern digital life.
With over 330 million active users, Twitter is a popular platform for communication, sharing
experiences, and expressing opinions. This research focuses on sentiment analysis of public
opinions, particularly regarding the approval of the Job Creation Law in Indonesia, a topic that
received significant attention and debate among the Indonesian people, particularly laborers on
social media, including Twitter.
Sentiment analysis, an automated process for understanding sentiment in text data, is used for this
purpose. The Support Vector Machine (SVM) algorithm, known for its effectiveness in sentiment
analysis, is central to this study. However, choosing the right SVM parameters remains a challenge.
This research aims to conduct sentiment analysis on public opinions expressed on Twitter
regarding the Job Creation Law. It employs SVM and integrates Particle Swarm Optimization
(PSO) to enhance the performance of SVM in the sentiment analysis process.
Methodology:
The steps for this research are Data collection → Data annotation → Data preprocessing
(normalization, case folding, cleansing, tokenization, stopword removal, stemming) → Term
weighting (TF-IDF) → Classification process (Only SVM and SVM+PSO) → Evaluation (10-fold
cross validation)
Data collection in this research used opinions sourced from Twitter, specifically tweets in the
Indonesian language related to the Job Creation Law (UU Cipta Kerja). The data collection was
carried out through crawling using two different tools: Twitter API and snscrape, resulting in a
total of 1000 tweets.
Key findings:
• Using the Support Vector Machine (SVM) algorithm alone resulted in an accuracy of 92.99%
in the first testing scenario, where no optimization with Particle Swarm Optimization (PSO)
was applied.
• Integrating PSO with SVM in the second testing scenario with 10 PSO iterations improved the
accuracy to 94.89%.
• The subsequent testing scenarios, with increasing PSO iterations (50, 100, 150, 200, 250, and
300), yielded accuracy scores ranging from 95% to 95.10%. However, the accuracy
improvements were relatively modest, with a maximum increase of 0.21% from the scenario
with 10 PSO iterations to the scenario with 150 PSO iterations.
• Importantly, the addition of more PSO iterations did not have a significant impact on
performance, despite a substantial increase in testing time. For example, in the scenario with
10 PSO iterations, the testing time took 1.083 seconds, while in the scenario with 150 PSO
iterations, the testing time required 14.316 seconds.
• Furthermore, in the scenario with 300 PSO iterations, testing time significantly increased to
29.519 seconds, but the improvement in accuracy was only 0.11% compared to the scenario
with 10 PSO iterations. Interestingly, there was even a 0.10% decrease in accuracy compared
to the scenario with 150 PSO iterations.
Conclusion:
In conclusion, the study found that while the integration of Particle Swarm Optimization (PSO)
with the Support Vector Machine (SVM) showed some improvements in accuracy. Increasing the
number of PSO iterations did not substantially impact performance. This suggests that the choice
of the optimal number of iterations should consider the trade-off between improved accuracy and
the time required for the testing process. However, from the classification process, it can be
concluded that the Particle Swarm Optimization optimization method effectively addresses the
weaknesses of the Support Vector Machine algorithm in terms of parameter selection and enhances
all testing parameters, including accuracy, precision, and recall for the constructed model.

You might also like