Optimasi Hyperparameter Pada Algoritma K-Nearest Neighbor untuk Analisis Sentimen terhadap Pembelajaran Jarak Jauh

Authors

  • Ety Sutanty Sistem Informasi Universitas Gunadarma
  • Esti Setiyaningsih Teknik Informatika Universitas Gunadarma
  • Sari Noorlima Yanti Teknik Informatika Universitas Gunadarma

DOI:

https://doi.org/10.51454/decode.v5i2.1170

Keywords:

Akurasi, Analisis sentimen, Metrik Jarak, K-Nearest Neighbor, Pembelajaran Jarak Jauh

Abstract

Pandemi COVID-19 mendorong diberlakukannya kebijakan Pembelajaran Jarak Jauh (PJJ) secara masif di Indonesia. Kebijakan ini memunculkan beragam tanggapan dari masyarakat, baik positif maupun negatif, yang tersebar luas melalui media sosial. Namun, belum banyak penelitian yang secara sistematis menganalisis opini publik terhadap PJJ menggunakan pendekatan berbasis data. Penelitian ini bertujuan untuk mengidentifikasi dan menganalisis sentimen masyarakat terhadap kebijakan PJJ dengan memanfaatkan data dari Twitter. Penelitian ini menggunakan pendekatan kuantitatif dengan metode text mining dan analisis sentimen berbasis algoritma K-Nearest Neighbor (KNN). Data dikumpulkan melalui Application Programming Interface (API) Twitter dengan kata kunci tertentu, kemudian dilakukan proses prapengolahan yang mencakup pembersihan teks, tokenisasi, dan ekstraksi fitur menggunakan TF-IDF. Proses pelatihan dan pengujian model dilakukan menggunakan KNN, dengan eksplorasi hyperparameter melalui teknik GridSearchCV. Parameter yang diuji meliputi jumlah tetangga (k), metode pembobotan (uniform dan distance), serta metrik jarak (Euclidean, Minkowski, dan Cosine). Hasil menunjukkan konfigurasi terbaik pada k = 22, pembobotan distance, dan metrik Cosine, dengan akurasi pelatihan tertinggi mencapai 98,80%. Temuan ini menunjukkan bahwa pemilihan hyperparameter yang optimal serta tahapan prapengolahan yang tepat sangat berpengaruh dalam meningkatkan performa klasifikasi sentimen terhadap kebijakan PJJ.

References

Achmad, R. R., & Haris, M. (2023). Hyperparameter Tuning Deep Learning for Imbalanced Data. Tepian, 4(2), 90–101. https://doi.org/10.51967/tepian.v4i2.2216

Azahra, N. M., & Setiawan, E. B. (2023). Sentence-Level Granularity Oriented Sentiment Analysis of Social Media Using Long Short-Term Memory (LSTM) and IndoBERTweet Method. Jurnal Ilmiah Teknik Elektro Komputer Dan Informatika (JITEKI), 9(1), 85–95. https://doi.org/10.26555/jiteki.v9i1.25765

Cano-Marin, E., Mora-Cantallops, M., & Sánchez-Alonso, S. (2023). Twitter as a predictive system: A systematic literature review. Journal of Business Research, 157(December 2022). https://doi.org/10.1016/j.jbusres.2022.113561

Choo, S., & Kim, W. (2023). A study on the evaluation of tokenizer performance in natural language processing. Applied Artificial Intelligence, 37(1). https://doi.org/10.1080/08839514.2023.2175112

Dewi, S., & Arianto, D. B. (2023). Twitter Sentiment Analysis Towards Qatar as Host of the 2022 World Cup Using Textblob. Journal of Social Research, 2(2), 443–455. https://doi.org/10.55324/josr.v2i2.615

Gunawan, D., Saniyah, Z., & Hizriadi, A. (2019). Normalization of abbreviation and acronym on microtext in Bahasa Indonesia by using dictionary-based and longest common subsequence (LCS). Procedia Computer Science, 161, 553–559. https://doi.org/10.1016/j.procs.2019.11.155

Halder, R. K., Uddin, M. N., Uddin, M. A., Aryal, S., & Khraisat, A. (2024). Enhancing K-nearest neighbor algorithm: a comprehensive review and performance analysis of modifications. Journal of Big Data, 11(1). https://doi.org/10.1186/s40537-024-00973-y

Iparraguirre-Villanueva, O., Guevara-Ponce, V., Sierra-Liñan, F., Beltozar-Clemente, S., & Cabanillas-Carbonell, M. (2022). Sentiment Analysis of Tweets using Unsupervised Learning Techniques and the K-Means Algorithm. International Journal of Advanced Computer Science and Applications, 13(6), 571–578. https://doi.org/10.14569/IJACSA.2022.0130669

Olabiyi, W., Olaoye, G., & Daniel, O. (2024). Natural language processing ( nlp ) with nltk and spacy. November.

Oladipupo, M. A., Obuzor, P. C., Bamgbade, B. J., Olagunju, K. M., Adeniyi, A. E., & Ajagbe, S. A. (2023). An Automated Python Script for Data Cleaning and Labeling using Machine Learning Technique. Informatica (Slovenia), 47(6), 219–232. https://doi.org/10.31449/inf.v47i6.4474

Parhusip, M., Sudianto, S., & Laksana, T. G. (2023). Sentiment Analysis of the Public Towards the Kanjuruhan Tragedy with the Support Vector Machine Method. JUITA : Jurnal Informatika, 11(2), 241. https://doi.org/10.30595/juita.v11i2.17405

Pradana, A. W., & Hayaty, M. (2019). The Effect of Stemming and Removal of Stopwords on the Accuracy of Sentiment Analysis on Indonesian-language Texts. Kinetik: Game Technology, Information System, Computer Network, Computing, Electronics, and Control, 4(3), 375–380. https://doi.org/10.22219/kinetik.v4i4.912

Rifaldi, D., Fadlil A., & Herman, H. (2023). Teknik Preprocessing Pada Text Mining Menggunakan Data Tweet “Mental Health.” Decode: Jurnal Pendidikan Teknologi Informasi, 3(2), 161–171. https://doi.org/10.51454/decode.v3i2.131

Rizki, M., Hermawan, A., & Avianto, D. (2024). Optimization of Hyperparameter K in K-Nearest Neighbor Using Particle Swarm Optimization. JUITA : Jurnal Informatika, 12(1), 71. https://doi.org/10.30595/juita.v12i1.20688

Rodríguez-Ibánez, M., Casánez-Ventura, A., Castejón-Mateos, F., & Cuenca-Jiménez, P. M. (2023). A review on sentiment analysis from social media platforms. Expert Systems with Applications, 223(July). https://doi.org/10.1016/j.eswa.2023.119862

Rukmini, E., Angelina, H., & Anggreni, V. C. (2023). Indonesia higher education’s online learning during the pandemic state. International Journal of Evaluation and Research in Education, 12(4), 2286–2301. https://doi.org/10.11591/ijere.v12i4.25103

Siino, M., Tinnirello, I., & LaCascia, M. (2024). Is text preprocessing still worth the time? A comparative survey on the influence of popular preprocessing methods on Transformers and traditional classifiers. Information Systems, 121(December 2023), 102342. https://doi.org/10.1016/j.is.2023.102342

Trianda, D., Hartama, D., Engineering, I., Program, S., Systems, I., & Program, S. (2025). Comparison of Hyperparameter Tuning Methods for Optimizing K-Nearest Neighbor Performance in Predicting Hypertension. 18(1), 111–121.

UNICEF Indonesia, & Agency, National Development Planning, P. (2021). The situation of children and young people in indonesian cities. 124.

Uyun, M. (2025). From Isolation to Engagement : Understanding and Addressing Online Learning Challenges among University Students in Indonesia. 17, 1806–1818. https://doi.org/10.35445/alishlah.v17i1.6264

Downloads

Published

2025-07-23

How to Cite

Sutanty, E., Setiyaningsih, E., & Yanti, S. N. . (2025). Optimasi Hyperparameter Pada Algoritma K-Nearest Neighbor untuk Analisis Sentimen terhadap Pembelajaran Jarak Jauh. Decode: Jurnal Pendidikan Teknologi Informasi, 5(2), 348–364. https://doi.org/10.51454/decode.v5i2.1170

Issue

Section

Articles