RESWARA: Jurnal Riset Ilmu Teknik
Vol. 4 No. 3 (2026): RESWARA: Jurnal Riset Ilmu Teknik, July 2026

Comparison of Content-Based Filtering and K-Nearest Neighbor in Genre-Based Movie Recommendations

Irfan Nur Sofiyanto (Faculty of Computer Science, Universitas Duta Bangsa, Surakarta, Indonesia)
Nurmalitasari Nurmalitasari (Faculty of Computer Science, Universitas Duta Bangsa, Surakarta, Indonesia)
Rudi Susanto (Faculty of Computer Science, Universitas Duta Bangsa, Surakarta, Indonesia)



Article Info

Publish Date
31 Jul 2026

Abstract

The rapid growth of digital movie platforms has increased the number of available movies, making it difficult for users to find films that match their preferences. This study aims to implement and compare Content-Based Filtering and K-Nearest Neighbor methods in a genre-based movie recommendation system. The data used in this study were obtained from the Full TMDB Movies Dataset from Kaggle, consisting of 1,422,047 initial records. The dataset was processed through several stages, including attribute selection, missing value handling, genre transformation, duplicate data removal, and feature weighting using TF-IDF, resulting in 796,425 movie records ready for modeling. Content-Based Filtering was implemented using cosine similarity to calculate the similarity between user genre preferences and movie features, while K-Nearest Neighbor was applied by identifying movies with the closest distance to the user preference vector. The results show that both methods were able to generate relevant movie recommendations based on the selected genres, namely Action, Adventure, and Science Fiction. Based on the evaluation results, both methods achieved the same accuracy of 99.92%. However, K-Nearest Neighbor showed slightly better performance, with a precision of 86.56%, recall of 80.32%, and F1-score of 83.32%, compared to Content-Based Filtering, which achieved a precision of 86.45%, recall of 79.58%, and F1-score of 82.87%. These findings indicate that K-Nearest Neighbor is slightly more effective in identifying relevant movie recommendations based on user genre preferences.

Copyrights © 2026






Journal Info

Abbrev

reswara

Publisher

Subject

Aerospace Engineering Automotive Engineering Chemical Engineering, Chemistry & Bioengineering Civil Engineering, Building, Construction & Architecture Control & Systems Engineering Electrical & Electronics Engineering Industrial & Manufacturing Engineering Mechanical Engineering Transportation

Description

RESWARA: Jurnal Riset Ilmu Teknik is a leading scholarly platform that examines the strategic role of engineering disciplines in advancing the Sustainable Development Goals (SDGs). The journal is dedicated to publishing recent research, innovations, and engineering solutions that support sustainable ...