Main Article Content

Riska Dwi Ayu Lestari
Bagus Setya Rintyarna
Moh. Dasuki

Abstract

This study contains sentiment analysis on Twitter data with the direction of sentiment on the TikTokShop feature. In this study, the k nearest neighbor method is implemented in which the metric distance cosine similarity is used with the value of the nearest neighbor distance k = 3, 5, 7, and 9. In the modeling, a k-fold cross-validation scenario is used with a value of k = 10 fold. This study also uses unigram, bigram, and trigram selection features to handle imbalanced data using undersampling techniques. From the modeling results, it is found that the best modeling is the model with unigram feature selection with nearest neighbor k = 3. From this model, the average accuracy value is 89.92%, the average precision is 90.54% and the recall average is 87.37%. In the test, the results showed that the unigram feature selection had the best performance with 91% accuracy, 92% precision, and 89% recall

Downloads

Download data is not yet available.

Article Details

How to Cite
Lestari, R. D. A., Rintyarna, B. S. and Dasuki, M. (2022) “Application Of N-Gram On K-Nearest Neighbor Algorithm To Sentiment Analysis Of TikTok Shop Shopping Features ”, Jurnal Mantik, 6(3), pp. 2998-3006. Available at: https://iocscience.org/ejournal/index.php/mantik/article/view/3019 (Accessed: 29April2026).
References
Artanti, D. P., Syukur, A., Prihandono, A., & Setiadi, D. R. I. M. (2018). Analisa Sentimen Untuk Penilaian Pelayanan Situs Belanja Online Menggunakan Algoritma Naïve Bayes. 8–9.
Bowes, D., Hall, T., & Gray, D. (2012). Comparing the performance of fault prediction models which report multiple performance measures: Recomputing the confusion matrix. ACM International Conference Proceeding Series, 109–118. https://doi.org/10.1145/2365324.2365338
Candra, R. M., & Nanda Rozana, A. (2020). Klasifikasi Komentar Bullying pada Instagram Menggunakan Metode K-Nearest Neighbor. IT Journal Research and Development, 5(1), 45–52. https://doi.org/10.25299/itjrd.2020.vol5(1).4962
Fitri, M. (2013). Perancangan Sistem Temu Balik Informasi Dengan Metode Pembobotan Kombinasi Tf-Idf Untuk Pencarian Dokumen Berbahasa Indonesia. Jurnal Sistem Dan Teknologi Informasi, Vol. 1(1), 1–6.
Han, J., Kamber, M., & Pei, J. (2012). Data Mining: Concepts and Techniques. In Data Mining: Concepts and Techniques. Elsevier Inc. https://doi.org/10.1016/C2009-0-61819-5
Herwijayanti, B., Ratnawati, D. E., & Muflikhah, L. (2018). Klasifikasi Berita Online dengan menggunakan Pembobotan TF-IDF dan Cosine Similarity. Pengembangan Teknologi Informasi Dan Ilmu Komputer, 2(1), 306–312. https://j-ptiik.ub.ac.id/index.php/j-ptiik/article/view/796
Prayogo, R. D. (2018). Implementasi Bigram Model dan Markov Chain dalam Add-in Microsoft Word untuk Membentuk Kalimat Bahasa Inggris dari Bag of Words. Tangerang: Universitas Mutltimedia Nusantara. https://kc.umn.ac.id/5069/
Saadah, M. N., Atmagi, R. W., Rahayu, D. S., & Arifin, A. Z. (2013). SISTEM TEMU KEMBALI DOKUMEN TEKS DENGAN PEMBOBOTAN TF-IDF DAN LCS. JUTI: Jurnal Ilmiah Teknologi Informasi, 11(1), 19. https://doi.org/10.12962/j24068535.v11i1.a16
Sulistianti, R. A., & Sugiarta, N. (2022). Konstruksi Sosial Konsumen Online Shop Di Media Sosial Tiktok ( Studi Fenomenologi Tentang Konstruksi Sosial Konsumen Generasi Z Pada Online Shop Smilegoddess Di Media Sosial Tiktok ). 6(1), 3456–3466.
Tan, S., & Zhang, J. (2008). An empirical study of sentiment analysis for chinese documents. Expert Systems with Applications, 34(4), 2622–2629. https://doi.org/10.1016/j.eswa.2007.05.028
Tri Romadloni, N., Santoso, I., Budilaksono, S., & Ilmu Komputer STMIK Nusa Mandiri Jakarta, M. (2019). Perbandingan Metode Naive Bayes, Knn Dan Decision Tree Terhadap Analisis Sentimen Transportasi Krl Commuter Line. Jurnal IKRA-ITH Informatika, 3(2), 1–9.
Yasni, L., Subroto, I. M. I., & Haviana, S. F. C. (2018). IMPLEMENTASI COSINE SIMILARITY MATCHING DALAM PENENTUAN DOSEN PEMBIMBING TUGAS AKHIR. Transmisi, 20(1), 22. https://doi.org/10.14710/transmisi.20.1.22-28
Yuniarti, N., Ismawati, A., & Aini, A. N. (2020). Pengaruh Promosi Online Melalui Tiktok Terhadap Peningkatan Penjualan Produk Usaha di Masa Pandemi Covid-19. Proceedings The 1st UMYGrace 2020 (Universitas Muhammadiyah Yogyakarta Undergraduate Conference).