Jurnal Ilmiah Betrik : Besemah Teknologi Informasi dan Komputer
Vol. 16 No. 03 (2025): Jurnal Ilmiah BETRIK : Besemah Teknologi Informasi dan Komputer

Optimization of K value in the K-NN For Classification Review Pagar Alam City Tourism using Expectation Maximization and Grid Search CV

Risnaini Masdalipa (Insitut Teknologi Pagar Alam)
Yogi Isro' Mukti (Insitut Teknologi Pagar Alam)
Ferry Putrawansyah (Insitut Teknologi Pagar Alam)



Article Info

Publish Date
30 Dec 2025

Abstract

The development of the tourism sector in Pagar Alam City requires a sentiment analysis system capable of accurately capturing tourists’ perceptions. Sentiment analysis of online reviews can serve as a valuable foundation for decision-making in managing and improving tourism destinations. This study aims to produce an accurate sentiment classification by optimizing the K value in the K-Nearest Neighbor (KNN) algorithm using Expectation Maximization (EM) and Grid Search Cross Validation (GS-CV). The research employs the Cross Industry Standard Process for Data Mining (CRISP-DM) methodology, consisting of six stages: business understanding, data understanding, data preparation, modeling, evaluation, and deployment. Data were collected through web scraping of online tourism reviews, resulting in 4,806 reviews across eight major tourist attractions, including Tugu Rimau, Mount Dempo, and Tujuh Kenangan Waterfall. The results indicate that Tugu Rimau received the highest positive sentiment score (0.678), while Tujuh Kenangan Waterfall showed the lowest (0.006). Model performance evaluation revealed that KNN accuracy improved from 81% to 89% after optimization using EM and GS-CV, achieving 88% precision, 89% recall, and an F1-score of 85%. These findings demonstrate that the integration of EM and GS-CV effectively enhances the classification accuracy of KNN in sentiment analysis for Pagar Alam’s tourism reviews

Copyrights © 2025






Journal Info

Abbrev

betrik

Publisher

Subject

Computer Science & IT

Description

Besemah Teknologi Informasi dan Komputer (BETRIK) is a national journal published by Pusat Penelitian dan Pengabdian kepada Masyarakat (P3M), Institut Teknologi Pagar Alam (ITPA). This scientific work was published in 3 editions, with topics related to Computers, Technology, and Science. Topics ...