IMPLEMENTASI ALGORITMA K-NEAREST NEIGHBOR (KNN) PADA SOSIAL MEDIA X UNTUK ANALISIS SENTIMEN PENGALAMAN WARGANET TINGGAL DI LUAR NEGERI
Salsa Billa Permana Putri; irwansyah;
No. Panggil: eSTI-2103015152
ABSTRAK
Implementasi Algoritma K-Nearest Neighbor (KNN) Pada Sosial Media X
Untuk Analisis Sentimen Pengalaman Warganet Tinggal Di Luar Negeri
Perkembangan teknologi informasi, terutama melalui media sosial seperti Twitter,
telah mengubah cara masyarakat mencari informasi. Dengan lebih dari 6,43 juta
pengguna di Indonesia, Twitter menjadi platform utama untuk berbagi pendapat.
Penelitian ini bertujuan untuk menganalisis sentimen pengalaman Warga Negara
Indonesia (WNI) yang tinggal di luar negeri, yang sering kali menghadapi
tantangan dan peluang dalam beradaptasi dengan lingkungan baru. Mengingat
jumlah WNI yang terus meningkat, mencapai lebih dari 9 juta pada tahun 2020,
pemahaman terhadap sentimen mereka menjadi penting. Metode K-Nearest
Neighbor (KNN) digunakan untuk mengklasifikasikan sentimen menjadi positif,
negatif, atau netral. Penelitian ini melibatkan pengumpulan data melalui teknik
tweet-harvest, di mana 1.060 komentar berhasil dikumpulkan dan 600 di antaranya
memenuhi kriteria relevansi untuk analisis. Hasil analisis menunjukkan bahwa
60,4% sentimen adalah netral, 34,1% positif, dan 5,5% negatif, dengan akurasi
model KNN mencapai 81,67%. Evaluasi model menunjukkan presisi tertinggi pada
kelas netral dan recall 1,00, meskipun kelas positif dan negatif memerlukan
optimasi lebih lanjut. Penelitian ini diharapkan dapat memberikan wawasan bagi
masyarakat dan pengambil keputusan terkait pengalaman WNI di luar negeri.
Kata kunci : Analisis Sentimen, K-Nearest Neighbors, Klasifikasi Teks, Media Sosial (X), Pengalaman Warganet
Implementation of the K-Nearest Neighbor (KNN) Algorithm on Social
Media X for Sentiment Analysis of Netizens' Experiences of Living Abroad
The development of information technology, especially through social media such
as Twitter, has changed the way people search for information. With more than 6.43
million users in Indonesia, Twitter has become the main platform for sharing
opinions. This study aims to analyze the sentiments of Indonesian citizens (WNI)
living abroad, who often face challenges and opportunities in adapting to new
environments. Given the increasing number of WNI, reaching over 9 million in
2020, understanding their sentiments is crucial. The K-Nearest Neighbor (KNN)
method was used to classify sentiments as positive, negative, or neutral. This study
involved data collection through the tweet-harvest technique, where 1,060
comments were successfully collected, and 600 of them met the relevance criteria
for analysis. The analysis results showed that 60.4% of sentiments were neutral,
34.1% were positive, and 5.5% were negative, with the KNN model achieving an
accuracy of 81.67%. Model evaluation revealed the highest precision in the neutral
class and a recall of 1.00, although the positive and negative classes require further
optimization. This study is expected to provide insights for the public and decision-
makers regarding the experiences of Indonesian citizens abroad.
Keywords: Analysis Sentiment, Classification Text, K-Nearest Neighbor ,Netizen
Experience, Social Media (X)