Movie Recommendation System Using Content-Based Filtering with TF-IDF and Cosine Similarity Implemented in Python

Authors

  • Heru Tri Ahmanto Faculty of Engineering, Universitas Bakti Indonesia, 68462, Indonesia Author
  • Sugeng Hendra Wijaya Faculty of Engineering, Universitas Bakti Indonesia, 68462, Indonesia Author
  • I Gede Wiryawan Information Technology Departement, Politeknik Negeri Jember, 68121, Indonesia Author

DOI:

https://doi.org/10.51747/intro.v5i1.p42-55

Keywords:

content base filtering, Movie recomendation system, cosine similaryty, text mining, TF-IDF, Phyton

Abstract

The rapid growth of digital movie streaming platforms has significantly increased the number of movies available to users. Although this abundance of content provides greater viewing options, it also creates challenges for users in identifying movies that match their preferences. Conventional search methods are often inefficient because users must manually browse large collections of movies before making a selection. Therefore, an intelligent recommendation system is required to provide personalized movie recommendations based on movie characteristics. This study aims to develop a movie recommendation system using the Content-Based Filtering (CBF) approach implemented in Python. The proposed system utilizes movie metadata, including genres, overviews, keywords, cast members, and directors, to represent each movie. Text preprocessing techniques are applied to clean and normalize the textual data before transforming it into numerical vectors using the Term Frequency–Inverse Document Frequency (TF-IDF) method. Subsequently, Cosine Similarity is employed to calculate the similarity between movies and generate recommendation lists according to user preferences. The system is developed using Python and several supporting libraries, including Pandas, NumPy, and Scikit-learn. Mean Average Precision (MAP) of 0.876, and an NDCG@10 of 0.904. The system also obtained a Recall@10 of 0.893, indicating that a high proportion of relevant movies were successfully retrieved. These results demonstrate that the integration of TF-IDF and Cosine Similarity with multiple movie metadata features can effectively generate relevant and well-ranked movie recommendations.

Downloads

Published

2026-06-28

How to Cite

[1]
H. Tri Ahmanto, S. H. . Wijaya, and I. gede . I Gede Wiryawan, “Movie Recommendation System Using Content-Based Filtering with TF-IDF and Cosine Similarity Implemented in Python”, IJITE, vol. 5, no. 1, pp. 42–55, Jun. 2026, doi: 10.51747/intro.v5i1.p42-55.