ANALISIS SENTIMEN PUBLIK TERHADAP LHKPN DI MEDIA
SOSIAL X MENGGUNAKAN METODE SUPPORT VECTOR
MACHINES DAN NAIVE BAYES
Ahmad Rijal Hermawan; Isa Faqihuddin Hanif;
No. Panggil: eSTI-2103015122
Analisis Sentimen Publik terhadap LHKPN di Media Sosial X Menggunakan
Metode Support Vector Machines dan Naive Bayes
Ahmad Rijal Hermawan
Persepsi publik terhadap Laporan Harta Kekayaan Penyelenggara Negara (LHKPN) menjadi tolok
ukur penting kepercayaan terhadap komitmen pemerintah terhadap transparansi dan upaya
pemberantasan korupsi. Penelitian ini berupaya mengkaji sentimen publik sebagaimana tercermin
pada platform media sosial. Cuitan-cuitan tersebut kemudian dianotasi secara manual ke dalam dua
kategori sentimen: positif dan negatif, dengan 77,3% cuitan berlabel positif dan 22,7% berlabel
negatif. Klasifikasi sentimen dilakukan dengan menggunakan dua algoritma machine learning:
Support Vector Machine (SVM) dan Naive Bayes. Algoritma Naive Bayes mencatat akurasi 86,66%,
dengan presisi 0,93, skor recall 0,88, dan skor F1 0,87. Sebaliknya, model SVM dengan kernel linier
menunjukkan kinerja yang unggul, mencapai tingkat akurasi 93,33%, bersama dengan presisi 0,93,
recall 0,98, dan skor F1 0,95. Untuk mengungkap topik yang sering muncul, visualisasi WordCloud
dibuat. Ini mengungkapkan bahwa tweet positif sering kali menyertakan kata-kata seperti 'lapor' dan
'transparan', sedangkan yang negatif lebih cenderung mengandung istilah seperti 'bohong' dan
'korupsi'. Temuan ini menunjukkan bahwa sentimen publik terhadap inisiatif LHKPN sebagian besar
menguntungkan, meskipun ada kekhawatiran terus-menerus seputar integritas dan kepercayaan
dalam pelaporan aset. Studi ini menyoroti efektivitas analisis sentimen dalam mengukur opini publik
dan menginformasikan perbaikan kebijakan di masa mendatang.
Kata Kunci: Analisis Sentimen; Naive Bayes; Support Vector Machine; LHKPN; Social Media
Analisis Sentimen Publik terhadap LHKPN di Media Sosial X Menggunakan
Metode Support Vector Machines dan Naive Bayes
Ahmad Rijal Hermawan
The public’s perception of the State Officials’ Wealth Report (LHKPN) serves as a vital measure of
confidence in the government's commitment to transparency and efforts to combat corruption.This
research seeks to examine public sentiment as reflected on the social media platform X. A dataset
comprising 1,200 tweets was gathered and processed through various text mining methods, such as
case folding, data cleaning, tokenization, normalization, stemming, stopword elimination, and TF-
IDF vectorization. The tweets were then manually annotated into two sentiment categories: positive
and negative, with 77.3% of tweets labeled as positive and 22.7% as negative. Sentiment
classification was conducted using two machine learning algorithms: Support Vector Machine
(SVM) and Naive Bayes. The Naive Bayes algorithm recorded an accuracy of 86.66%, with a
precision of 0.93, a recall score of 0.88, and an F1-score of 0.87. Conversely, the SVM model with
a linear kernel demonstrated superior performance, achieving an accuracy rate of 93.33%, along
with a precision of 0.93, recall of 0.98, and an F1-score of 0.95. To uncover frequently occurring
topics, WordCloud visualizations were generated. These revealed that positive tweets often included
words such as ‘lapor’ and ‘transparan’, while negative ones were more likely to contain terms like
‘bohong’ and ‘korupsi’. These findings indicate that public sentiment toward the LHKPN initiative
is largely favorable, despite persistent concerns surrounding integrity and trustworthiness in asset
reporting. This study highlights the effectiveness of sentiment analysis in gauging public opinion
and informing future policy improvements.
Keywords: Sentiment Analysis; Naive Bayes; Support Vector Machine; LHKPN; Social Media