Content-Based Filtering with TF-IDF and Cosine Similarity for Bandung Raya Tourism Recommendation

Authors

DOI:

https://doi.org/10.65780/bima.v1i5.28

Keywords:

Machine Learning, recommender system, content-based filtering, TF-IDF, cosine similarity

Abstract

Bandung Raya offers hundreds of tourist destinations spread across Bandung City, Bandung Regency, and West Bandung Regency, which causes information overload and makes it difficult for tourists to select destinations that match their preferences. Recommender systems, as one of the most widely applied branches of machine learning, provide a way to filter such information automatically. This study develops a machine learning-based recommender system for tourism destinations in Bandung Raya using Content-Based Filtering, in which destination descriptions are represented as numerical vectors through TF-IDF weighting and compared using Cosine Similarity. The dataset consists of 331 destinations with name, description, category, and region attributes. Text preprocessing is performed in five stages using the Sastrawi library for the Indonesian language, producing a TF-IDF matrix of 331 by 583 and a similarity matrix of 331 by 331. The model is deployed as a website using Flask as the backend, React as the frontend, and a REST API as the interface, supporting both name-based search and free-text query search. Functional validation uses Black-Box Testing, while recommendation quality is measured using Precision at K and Mean Average Precision. All eight functional scenarios passed, with Precision at 5 of 96.00 percent, Precision at 10 of 90.00 percent, and Mean Average Precision of 98.86 percent, indicating that, for the five evaluated queries, relevant destinations are ranked highly.

Downloads

Download data is not yet available.

References

[1] D. Sutrisno, “Angka Kunjungan Wisatawan ke Bandung Naik Signifikan pada 2024,” IDN Times Jabar, 2025. [Online]. Available: https://jabar.idntimes.com/news/jawa-barat/angka-kunjungan-wisatawan-ke-bandung-naik-signifikan-pada-2024-00-9y7yl-xrvkyg

[2] D. M. Saputra, N. Angelia, and N. Yusliani, “Recommender system for tourist destinations in Indonesia using matrix factorization method,” JITSI, vol. 5, no. 3, pp. 122–127, 2024, doi: 10.62527/jitsi.5.3.254.

[3] I. Setianingsih and S. Widiono, “Inovasi aplikasi smart tourism berbasis mobile untuk optimalisasi informasi destinasi wisata,” Edumatic: J. Pendidik. Inform., vol. 9, no. 3, pp. 806–814, 2025, doi: 10.29408/edumatic.v9i3.32607.

[4] D. Roy and M. Dutta, “A systematic review and research perspective on recommender systems,” J. Big Data, vol. 9, art. 59, 2022, doi: 10.1186/s40537-022-00592-5.

[5] F. Christyawan, A. N. Rohman, and A. D. Hartanto, “Application of content-based filtering method using cosine similarity in restaurant selection recommendation system,” J. Inf. Syst. Informatics, vol. 6, no. 3, pp. 1559–1576, 2024, doi: 10.51519/journalisi.v6i3.806.

[6] R. Faurina and E. Sitanggang, “Implementasi metode content-based filtering dan collaborative filtering pada sistem rekomendasi wisata di Bali,” Techno.Com, vol. 22, no. 4, pp. 870–881, 2023, doi: 10.33633/tc.v22i4.8556.

[7] B. Prasetyo, V. Atina, and E. Purwanto, “Sistem rekomendasi pariwisata dengan metode content based recommendation berbasis website,” DutaCom, vol. 14, no. 1, pp. 51–58, 2021, doi: 10.47701/dutacom.v14i1.2017.

[8] W. Yulita et al., “Automatic scoring using term frequency inverse document frequency and cosine similarity,” Sci. J. Informatics, vol. 10, no. 2, pp. 93–104, 2023, doi: 10.15294/sji.v10i2.42209.

[9] J. F. U. Albab and A. N. Rohman, “Recommendation system Yogyakarta tourism using TF-IDF and cosine similarity,” J. Appl. Informatics Comput., vol. 10, no. 1, pp. 935–945, 2026, doi: 10.30871/jaic.v10i1.11751.

[10] C. Salsabilla and D. W. Utomo, “Pekalongan Regency tourism recommendation system with content based filtering,” SATIN, vol. 14, no. 1, pp. 262–270, 2025, doi: 10.32520/stmsi.v14i1.4839.

[11] A. W. Wicaksono, A. N. Rohman, and A. D. Hartanto, “Café recommendation using the content-based filtering method,” J. Inf. Syst. Informatics, vol. 6, no. 3, pp. 1598–1615, 2024, doi: 10.51519/journalisi.v6i3.813.

[12] A. Y. Timur, “Sistem rekomendasi lagu Indonesia menggunakan metode content-based filtering dan cosine similarity,” J. Informatika Tek. Elektro Terap., vol. 13, no. 1, pp. 1415–1423, 2025, doi: 10.23960/jitet.v13i1.5949.

[13] G. H. Setiawan and I. M. B. Adnyana, “Improving helpdesk chatbot performance with TF-IDF and cosine similarity models,” J. Appl. Informatics Comput., vol. 7, no. 2, pp. 252–257, 2023, doi: 10.30871/jaic.v7i2.6527.

[14] Y. S. Pasaribu and T. S. Sitompul, “Rekomendasi destinasi wisata Kota Bandung menggunakan algoritma collaborative filtering,” J. Mutiara, vol. 1, no. 6, pp. 382–392, 2023, doi: 10.59059/mutiara.v1i6.736.

[15] Y. Anis, E. N. Wahyudi, and H. C. Kurniawan, “Metode Waterfall dalam pengembangan sistem inventaris guna meningkatkan efisiensi manajemen stok barang,” J. Teknol. dan Sist. Inf. Bisnis, vol. 6, no. 2, pp. 329–338, 2024, doi: 10.47233/jteksis.v6i2.1351.

[16] H. L. Walingkas and P. O. N. Saian, “Penerapan framework Flask pada pembangunan sistem informasi pemasok barang,” J. JTIK, vol. 7, no. 2, 2023, doi: 10.35870/jtik.v7i2.729.

[17] E. Naresvari and Y. A. Susetyo, “Penerapan JavaScript React pada perancangan front-end website UMKM Jemari Ragil,” IT-EXPLORE, vol. 4, no. 1, pp. 16–32, 2025, doi: 10.24246/itexplore.v4i1.2025.pp16-32.

[18] M. Zen, I. Irwan, H. Hafni, and M. D. P. Ananda, “Implementasi dan pengujian menggunakan metode black box testing pada sistem informasi tracer study,” Bull. Comput. Sci. Res., vol. 4, no. 4, pp. 327–340, 2024, doi: 10.47065/bulletincsr.v4i4.359.

[19] Government of the Republic of Indonesia, Peraturan Presiden Republik Indonesia No. 45 Tahun 2018 tentang Rencana Tata Ruang Kawasan Perkotaan Cekungan Bandung [Presidential Regulation No. 45 of 2018 on the Spatial Plan of the Bandung Basin Urban Area], State Gazette of the Republic of Indonesia No. 91, Jakarta, 2018.

[20] D. Goldberg, D. Nichols, B. M. Oki, and D. Terry, “Using collaborative filtering to weave an information tapestry,” Communications of the ACM, vol. 35, no. 12, pp. 61–70, 1992, doi: 10.1145/138859.138867.

[21] P. Resnick and H. R. Varian, “Recommender systems,” Communications of the ACM, vol. 40, no. 3, pp. 56–58, 1997, doi: 10.1145/245108.245121.

[22] G. Adomavicius and A. Tuzhilin, “Toward the next generation of recommender systems: A survey of the state-of-the-art and possible extensions,” IEEE Transactions on Knowledge and Data Engineering, vol. 17, no. 6, pp. 734–749, 2005, doi: 10.1109/TKDE.2005.99.

[23] J. Bobadilla, F. Ortega, A. Hernando, and A. Gutiérrez, “Recommender systems survey,” Knowledge-Based Systems, vol. 46, pp. 109–132, 2013, doi: 10.1016/j.knosys.2013.03.012.

[24] J. Lu, D. Wu, M. Mao, W. Wang, and G. Zhang, “Recommender system application developments: A survey,” Decision Support Systems, vol. 74, pp. 12–32, 2015, doi: 10.1016/j.dss.2015.03.008.

[25] F. O. Isinkaye, Y. O. Folajimi, and B. A. Ojokoh, “Recommendation systems: Principles, methods and evaluation,” Egyptian Informatics Journal, vol. 16, no. 3, pp. 261–273, 2015, doi: 10.1016/j.eij.2015.06.005.

[26] M. J. Pazzani and D. Billsus, “Content-based recommendation systems,” in The Adaptive Web, LNCS vol. 4321, Springer, 2007, pp. 325–341, doi: 10.1007/978-3-540-72079-9_10.

[27] P. Lops, M. de Gemmis, and G. Semeraro, “Content-based recommender systems: State of the art and trends,” in Recommender Systems Handbook, Springer, 2011, pp. 73–105, doi: 10.1007/978-0-387-85820-3_3.

[28] J. Son and S. B. Kim, “Content-based filtering for recommendation systems using multiattribute networks,” Expert Systems with Applications, vol. 89, pp. 404–412, 2017, doi: 10.1016/j.eswa.2017.08.008.

[29] R. Burke, “Hybrid recommender systems: Survey and experiments,” User Modeling and User-Adapted Interaction, vol. 12, no. 4, pp. 331–370, 2002, doi: 10.1023/A:1021240730564.

[30] X. Su and T. M. Khoshgoftaar, “A survey of collaborative filtering techniques,” Advances in Artificial Intelligence, vol. 2009, art. 421425, 2009, doi: 10.1155/2009/421425.

[31] F. Ricci, L. Rokach, and B. Shapira, “Introduction to recommender systems handbook,” in Recommender Systems Handbook, Springer, 2011, pp. 1–35, doi: 10.1007/978-0-387-85820-3_1.

[32] G. Salton and C. Buckley, “Term-weighting approaches in automatic text retrieval,” Information Processing & Management, vol. 24, no. 5, pp. 513–523, 1988, doi: 10.1016/0306-4573(88)90021-0.

[33] K. Spärck Jones, “A statistical interpretation of term specificity and its application in retrieval,” Journal of Documentation, vol. 28, no. 1, pp. 11–21, 1972, doi: 10.1108/eb026526.

[34] F. Pedregosa et al., “Scikit-learn: Machine learning in Python,” Journal of Machine Learning Research, vol. 12, pp. 2825–2830, 2011.

[35] J. L. Herlocker, J. A. Konstan, L. G. Terveen, and J. T. Riedl, “Evaluating collaborative filtering recommender systems,” ACM Transactions on Information Systems, vol. 22, no. 1, pp. 5–53, 2004, doi: 10.1145/963770.963772.

[36] J. Beel, B. Gipp, S. Langer, and C. Breitinger, “Research-paper recommender systems: A literature survey,” International Journal on Digital Libraries, vol. 17, no. 4, pp. 305–338, 2016, doi: 10.1007/s00799-015-0156-0.

Downloads

Published

2026-07-31

How to Cite

Content-Based Filtering with TF-IDF and Cosine Similarity for Bandung Raya Tourism Recommendation. (2026). Bulletin of Intelligent Machines and Algorithms, 1(5), 191-198. https://doi.org/10.65780/bima.v1i5.28