International Journal of Information Technology and Computer Science(IJITCS)

ISSN: 2074-9007 (Print), ISSN: 2074-9015 (Online)

Published By: MECS Press

IJITCS Vol.13, No.4, Aug. 2021

Combining Fuzzy Logic and k-Nearest Neighbor Algorithm for Recommendation Systems

Full Text (PDF, 1076KB), PP.1-16

Views:1   Downloads:0


Paul Dayang, Cyrille Sepele Petsou, Damien Wohwe Sambo

Index Terms

Fuzzy logic;k-Nearest Neighbor;Recommendation systems;Dish recommendation;Nutrition recommendation for HIV/AIDS;Nutrition recommendation for Malaria


Recommendation systems are a type of systems that are able to help users finding relevant and personalized content in a wide variety of possibilities. To help computers perform recommendations, there are several approaches used nowadays such as the Content-based approach, the Collaborative filtering approach and the Hybrid recommendation approach. However, these approaches are sometimes inappropriate for use cases where there is no prior large datasets of users’ feedbacks or ratings needed for training Machine Learning models. Thus, in this work, we proposed a novel approach based on the combination of Fuzzy Logic and the k-Nearest neighbor algorithm (KNN). The proposed approach can be applied without any prior collected feedbacks of users and performs good recommendations. Moreover, our proposal uses Fuzzy Logic to infer values based on inputs and a set of rules. Furthermore, the KNN uses the output values of the Fuzzy Logic system to do some retrieval tasks based on existing distance measures. In order to evaluate our approach, we considered an expert system of food recommendation for people suffering from the two deadliest diseases in Cameroon: HIV/AIDS and Malaria. The obtained results are closed to the recommendation made by nutritionists. These results demonstrate how effective our approach can be used to solve a real nutrition problem for people suffering from Malaria or HIV/AIDS. Furthermore, this approach can be extended to other fields and even be used to perform any recommendation task where there is no prior collected user’s feedback or ratings by using the proposed approach as a framework.

Cite This Paper

Paul Dayang, Cyrille Sepele Petsou, Damien Wohwe Sambo, "Combining Fuzzy Logic and k-Nearest Neighbor Algorithm for Recommendation Systems", International Journal of Information Technology and Computer Science(IJITCS), Vol.13, No.4, pp.1-16, 2021. DOI: 10.5815/ijitcs.2021.04.01


[1]Y. O. Isinkaye, Folajimi, B.A. Ojokoh, “Recommendation systems: Principles, methods and evaluation.” In: Egyptian Informatics Journal16.3 Nov.2015, pp. 261–273, Doi: 0.1016/j.eij.2015.06.005. 

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

[3]T. N. T. Tran, M. Atas, A. Felfernig, M. Stettinger, “An overview of recommender systems in the healthy food domain.” In Intell Inf Syst50.3 June 1, 2018, pp. 501–526, doi:10.1007/s10844- 017- 0469-0.

[4]V. B. S. Prasath, H. A.A. Alfeilat, A.B.A. Hassanat, O. Lasassmeh, A.S. Tarawneh, M.B. Alhasanat,  H.S.E. Salman, “Distance and Similarity Measures Effect on the Performance of K-Nearest Neighbor Classifier – A Review.” In: Big Data7.4 Dec. 1, 2019, pp. 221–248, Doi:10.1089/big.2018.0175. arXiv: 1708.04321.

[5]Saudagar L. Jadhav, Manisha P. Mali, "Pre-Recommendation Clustering and Review Based Approach for Collaborative Filtering Based Movie Recommendation", International Journal of Information Technology and Computer Science (IJITCS), Vol.8, No.7, pp.72-80, 2016. DOI: 10.5815/ijitcs.2016.07.10

[6]Raghavendra C K, Srikantaiah K.C, Venugopal K. R, " Personalized Recommendation Systems (PRES): A Comprehensive Study and Research Issues", International Journal of Modern Education and Computer Science(IJMECS), Vol.10, No.10, pp. 11-21, 2018.DOI: 10.5815/ijmecs.2018.10.02

[7]K. S. Rana, “Food Recommendation System based on Content filtering Algorithm”. Bachelor’s Degree in Computer Science. Tribhuwan University, August 2016.

[8]J. Freyne, S. Berkovsky, “Recommending Food: Reasoning on Recipes and Ingredients.” In: User Modeling, Adaptation, and Personalization. Ed. by Paul De Bra, Alfred Kobsa, and David Chin. Lecture Notes in Computer Science. Berlin, Heidelberg: Springer, 2010, pp. 381–386, Doi:10.1007/978-3-642-13470-8_36. 

[9]T. Ueta, M. Iwakami, T. Ito, “Implementation of a Goal-Oriented Recipe Recommendation System Providing Nutrition Information.” In: International Conference on Technologies and Application of Artificial Intelligence Nov. 1, 2011, Doi:10.1109/TAAI.2011.39. 

[10]S. Sivilai,  C. Snae, M. Brückner, “Ontology-Driven Personalized Food and Nutrition Planning System for the Elderly.” In: the 2ndInternational Conference in Business Management and Information Sciences 19-20 January 2012 at: Phitsanulok, Thailand. Jan. 19, 2012. 

[11]J. Aberg, “Dealing with Malnutrition: A Meal Planning System for Elderly.” In: Argumentation for Consumers of Healthcare, Papers from the 2006AAAI Spring Symposium, Technical Report SS-06-01, Stanford, California, USA, March 27-29, 2006. Jan. 1, 2006, pp. 1–7.

[12]R. A Priyono, K. Surendro, “Nutritional Needs Recommendation based on Fuzzy Logic”. In: Procedia Technology. 4th International Conference on Electrical Engineering and Informatics, ICEEI 2013 11 Jan. 1,2013, pp. 1244–1251, Doi: 10.1016/j.protcy.2013.12.320.

[13]N. Mulla, S: Kurhade, N. Bakereywala, “An Intelligent Application for healthcare Recommendation using Fuzzy Logic.” In: 2019 3rd International conference on Electronics, Communication and Aerospace Technology (ICECA). June 1, 2019, pp. 466–472. Doi:10.1109/ICECA.2019.8821959  

[14]F. Dernoncourt, “Introduction to fuzzy logic.” In: Massachusetts Institute of Technology Fuzzy Logic Lecture, 01 jan 2013 (Jan. 1, 2013).

[15]M. Sharma, Fuzzy Logic System Architecture in Artificial Intelligence. URL: (visited on 12/05/2020). 

[16]Z. D. Xu, Y.Q Guo, J.T. Zhu, F.H. Xu, “Fuzzification - an overview”. Intelligent Vibration Control in Civil Engineering Structures. Academic Press. 2017, p. 21-67.

[17]GeeksforGeeks. Difference between Fuzzification and Defuzzification.  Section: Difference Between. Aug. 28, 2019. URL: (visited on 12/06/2020)

[18]D. Samanta, Indian Institute of Technology Kharagpur. “Defuzzification Methods”. URL:
%20Defuzzification%20Methods.pdf (visited on 12/25/2020).

[19]O. Harrison, Towards Data Science. “Machine Learning Basics with the K-Nearest Neighbors Algorithm”. Medium. July 14, 2019. URL: (visited on 01/10/2021). 

[20]World Health Organization. “Nutrient requirements for people living with HIV/AIDS”. Report of a technical consultation. Geneva, Switzerland. 2003. ISBN 9241591196.

[21]World Health Organization. “HIV/AIDS: A Guide For Nutrition Care and Support”. Food and Nutrition Technical Assistance (FANTA) Project. 2001.

[22]World Health Organization. Adolescent health. URL: (visited on 01/11/2021) 

[23]Wikipedia. “Old age”. Page Version ID: 998897633. Jan. 7, 2021. URL: (visited on 01/11/2021).

[24]World Health Organization. “Body mass index – BMI”. URL: (visited on 11/13/2020). 

[25]D. Whitbread, “Top 10 Foods Highest in Calories”. USDA Nutrition Data. URL: (visited on 01/11/2021).

[26]D. Whitbread, 2Top 10 Foods Highest in Protein”. USDA Nutrition Data. url: (visited on 01/11/2021).

[27]Heart UK. “Saturated fat”. URL: cholesterol-foods/saturated-fat (visited on 01/11/2021).

[28]Whitbread, D. “Top 10 Foods Highest in Iron”. USDA Nutrition Data. Top 10 Foods Highest in Carbohydrates (To Limit or Avoid). URL: (visited on 01/11/2021). 

[29]Whitbread, D. “Top 10 Foods Highest in Iron”. USDA Nutrition Data. URL: (visited on 01/11/2021).

[30]T. H. Harvard, Chan, “School of public health”. Food and Diet. Obesity Prevention Source. Oct. 21, 2012. URL: visited on 01/11/2021)

[31]B.A. Swinburn, I. Caterson, J.C. Seidell,“Diet, nutrition and the prevention of excess weight gain and obesity.” In: Public Health Nutr.7.1 Feb. 2004, pp. 123–146, Doi:10.1079/PHN2003585. 

[32]A. M. Prentice, H. Ghattas, C. Doherty, S.E. Cox, “Iron Metabolism and Malaria.” In: Food Nutr Bull 28.4 Dec. 1, 2007. Publisher: SAGE Publications Inc, Doi:10.1177/15648265070284S406.

[33]C.P. Kouebou, M. Achu, S. Nzali, M. Chelea, J. Bonglaisin, A. Kamda, P. Djiele, G. Yadang, R. Ponka, G. Ngoh Newilah, G. Nkouam, C.Teugwa, M. M. Kana Sop, “A review of composition studies of Cameroon traditional dishes: Macronutrients and minerals.” In: Food Chemistry. 9th International Food Data Conference: Food Composition and Sustainable Diets 140.3 Oct. 1, 2013, pp. 483–494, Doi:10.1016/j.foodchem.2013.01.003.