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