Skip to main content

An Intelligent Mood-Aware Food Recommendation System

Page 1


International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056

Volume: 13 Issue: 03 | Mar 2026 www.irjet.net p-ISSN: 2395-0072

An Intelligent Mood-Aware Food Recommendation System

1 and

2

1PG Scholar, Dept. of CSE, Grace College of Engineering, Thoothukudi, India

2 Professor, Dept. of CSE, Grace College of Engineering, Thoothukudi, India

Abstract - Abstract - In thecurrent digitalera,fooddelivery and restaurant recommendation systems have become an essential part of everyday life. Despite the availability of numerous choices, users often struggle to select appropriate meals that match not only their taste preferences but also their emotional state. Traditional recommendation systems primarily rely on static parameterssuchasrestaurantratings, cost, distance, and popularity metrics. However, human emotions significantly influence eating behavior, and existing platforms fail to incorporate emotional context into decisionmaking processes. This paper proposes a Mood-Based Food Recommendation System developed usingPythonandDjango, integrating a Logistic Regression machine learning model to map user moods such as happy, sad, angry, tired, and excited to suitable food categories. The system provides personalized suggestions througharesponsivewebinterfacedesignedusing Bootstrap. Experimental evaluation demonstrates that the proposed model achieves an accuracy of 89% in mood-based classification. The system reduces decision fatigue, enhances personalization, and provides opportunities for small-scale food vendors to reach customers effectively. The results indicate that incorporating emotional intelligence into recommendation engines significantly improves user satisfaction and engagement.

Keywords Mood Detection, Food Recommendation, Machine Learning, Logistic Regression, Django Framework,Personalization.

1. INTRODUCTION

Online food ordering platforms have experienced tremendousgrowthoverthepastdecade.Applicationssuch as Zomato and Swiggy provide access to thousands of restaurants,cuisines,anddishes.Whiletheseplatformsoffer convenienceandvariety,theyoftenoverwhelmuserswith excessiveoptions,leadingtodecisionfatigue.Mostcurrent systems utilize filtering techniques based on restaurant ratings, pricing,deliverytime,and userreviews.Although these parameters are important, they do not consider the psychologicalandemotionalstateoftheuser,whichplaysa crucialroleinfoodselection.

Research in behavioral science suggests that emotions directly influence appetite, taste perception, and dietary preferences. For example, individuals experiencing happiness may prefer desserts and celebratory foods, whereas those feeling stressed or sad may seek comfort foodssuchaspizzaornoodles.Angryindividualsmaycrave

spicy items, and tired individuals may prefer light or refreshing options.Existing recommendation engineslack mechanismstointegratesuchemotionalvariablesintotheir algorithms.

TheproposedMood-BasedFoodRecommendationSystem aims to bridge this gap by combining machine learning techniques with web application deployment to create an intelligent, emotion-aware recommendation engine. The system captures user mood input, processes it using a trained Logistic Regression classifier, and suggests appropriate food categories and restaurants accordingly. Theprimaryobjectivesofthisresearcharetoreduceuser decision-makingtime,enhancepersonalization,andimprove overalldiningsatisfaction.

2. RELATED WORKS

Food recommendation systems have been extensively studied in recent years, primarily focusing on collaborative filtering, content-based filtering, and hybrid recommendationtechniques.Earlyresearchconcentratedon rating-based recommendation models that analyze user preferences and historical interactions to predict future choices.Gomathi et al. (2019) proposed a restaurant recommendation system that utilized ratings and servicebasedattributestogeneratesuggestions.Whilethesystem achievedhighaccuracyinpreferenceprediction,itdidnot incorporatecontextualoremotionalfactors.Minetal.(2020) conductedacomprehensivesurveyoffoodrecommendation systemsandhighlightedtheneedforintegratingmultimedia dataandcontextualawareness.Theirframeworkaddressed usermodelingandfoodimageanalysisbutlackedemotionbased personalization. Similarly, health-aware recommendation models have been developed to suggest nutritious meals based on dietary constraints; however, thesesystemsprimarilyfocusonphysicalhealthparameters ratherthanpsychologicalinfluences.

Recent studies have explored mood-based recommendationapproaches.Guptaetal.(2021)introduced a machine learning model that classified user moods and recommended food accordingly using Logistic Regression andNaïveBayesclassifiers.Theirfindingsdemonstratedthat emotion-aware systems significantly improved user satisfactioncomparedtotraditionalmodels.Anotherstudy by Deshmukh et al. (2023) utilized sentiment analysis techniquestodetectmoodfromtextualinputandachieved promising results. Despite these advancements, there remainslimitedintegrationofmood-basedmachinelearning

International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056

Volume: 13 Issue: 03 | Mar 2026 www.irjet.net p-ISSN: 2395-0072

modelswithfull-stackwebdeploymentframeworkssuchas Django. Additionally, most systems do not provide scalability, real-time interaction, or vendor collaboration features. The proposed work differentiates itself by combining Logistic Regression-based mood classification with Django-based web implementation and database integrationforreal-timepersonalizedrecommendations.

3. METHODOLOGY

TheproposedMood-BasedFoodRecommendation Systemfollowsastructuredmethodologyconsistingofmood detection, model training, system integration, and performance evaluation. The system analyzes user mood input and recommends suitable food categories using a machinelearningapproach.

1.Workflowdiagram

Theoverall workflowofthe systemisillustratedin Fig. 1. Theprocessbeginswithuserinput,wheretheuserselects their current mood through the web interface. The mood detectionmoduleforwardsthisinputtotheMoodAnalysis component.Basedontheidentifiedmoodcategorysuchas Happy, Sad, Angry, or Stressed, the system generates appropriatefoodsuggestions.

For example, Happy moods are associated with comfort foods,Sadmoodswithsweetandwarmfoods,Angrymoods with spicy foods, and Stressed moods with healthy food options. The final recommendations are displayed to the userthroughamobile-friendlyinterface.

3.1 System Architecture

Thearchitectureoftheproposedsystemconsistsoffour majorcomponents:

UserInterface(Frontend):DevelopedusingHTML, CSS,andBootstraptoprovidearesponsiveanduser-friendly interface.Itallowsuserstoinputtheirmoodandviewfood recommendations.

Django Web Framework (Backend): The Django framework handles HTTP request routing, authentication, andcommunicationbetweenthefrontend,machinelearning module,anddatabase.

MachineLearning Model: Implemented in Python usingtheScikit-learnlibrary.LogisticRegressionisusedas the classification algorithm to predict suitable food categoriesbasedonusermoodandcontextualfeatures.

Database(SQLite/MySQL):Storesuserinformation, mood categories, food items, restaurant details, and feedbackdata.

Fig. 2. SystemArchitectureoftheProposed Model.

3.2 Dataset Preparation

Thedatasetusedinthissystemincludesattributessuchas mood category, food type, and restaurant rating. Mood categories considered in this study include Happy, Sad, Angry,Stressed,Tired,andExcited.Foodcategoriesinclude itemssuchasIceCream,Pizza,SpicyBiryani,Juice,Burger, and other commonly preferred foods. Before training, the dataset was preprocessed by converting categorical variables into numerical representations using encoding techniques. Missing values were handled appropriately to maintaindataconsistency.Additionally,ratingvalueswere normalized to improve model performance and ensure balancedfeaturecontribution.Thedatasetwasdividedinto 80% training data and 20% testing data. Cross-validation wasperformedtoensurerobustness,andhyperparameter tuningwasconductedusingtheregularizationparameter(C) tooptimizemodelperformance

3.3 Machine Learning Model

Logistic Regression was selected as the classification algorithm due to its simplicity, interpretability, and effectiveness in multi-class classification problems with moderate dataset sizes.The logistic regression model estimates the probability of a particular food category matching the user's mood. The probability function is expressedas:

2026, IRJET | Impact Factor value: 8.315 | ISO 9001:2008

Fig.

Volume: 13 Issue: 03 | Mar 2026 www.irjet.net p-ISSN: 2395-0072

Where:

Yrepresentsthepredictedfoodcategory

Xdenotesinputfeatures

βrepresentsmodelcoefficients

Thetrainedmodelcomputesprobabilityscoresforeachfood category and selects the category with the highest probability

3.4

Workflow

Whenauserlogsintothesystem,theyselecttheircurrent moodfromtheinterface.Thebackendcontrollerencodesthe mood into a numerical vector and sends it to the trained LogisticRegressionmodel.Themodelcalculatesprobability scoresforeachfoodcategoryandranksthemindescending order.The system then queries the database to retrieve restaurants corresponding to the top predicted food category.Finally,thetop-Nrankedfoodrecommendations aredisplayedtotheuser.

Algorithm :

Input:MoodM,RestaurantRatingR

Output:RankedFoodRecommendations

Step1:EncodemoodMintonumericvector

Step2:NormalizeratingR

Step3:LoadtrainedLogisticRegressionmodel

Step4:ComputeprobabilityscoresPforeachfoodclass

Step5:Sortfoodcategoriesbydescendingprobability

Step 6: Query database for restaurants matching top category

Step7:ReturnTop-Nrecommendations

3.5 Model Performance Evaluation

Theperformanceoftheproposedmodelwasevaluatedby comparingitwithaTraditionalSystemandaNaïveBayes classifier.AsshowninFig.3,theTraditionalSystemachieved an accuracy of 73%, while the Naïve Bayes classifier achieved82%accuracy.TheProposedLogisticRegression Modeloutperformedbothapproacheswithanaccuracyof 89%, demonstrating improved predictive capability and betterrecommendationquality.

3. RESULT

The system was evaluated using standard classification metrics including accuracy, precision, recall, andF1-score. ModelPerformance:(Table1)

TheLogisticRegressionmodelachievedanoverallaccuracy of89%,withaprecisionof0.90andrecallof0.87.TheF1score was calculated as 0.88, indicating balanced model performance.The confusion matrix demonstrated that the model correctly classified most mood categories with minimalmisclassification.Performanceanalysisshowsthat the integration of mood-based features significantly enhances recommendation relevance compared to traditionalstaticfilteringsystems.

Sample Dataset Fields: (Table 2)

Attribute Description

Mood User mood (Happy, Sad, Angry, Tired,Excited,Unwell)

FoodType Suggested cuisine (Ice Cream, SpicyFood,Soup,Juice,etc.)

Rating Restaurantrating(outof5)

Computational Efficiency: Average response time: < 3 seconds.Datasetcapacitytested:10,000 records.Memory footprint:Lowduetolinearmodel.

Compared to static filtering systems, the proposed model:Reduces decision time by ~30%. Improves personalizationsatisfactionby~25%(survey-based).

Userinterfacetestingconfirmedsmoothnavigation,quick responsetimesunderthreeseconds,andeffectivedatabase retrieval.Thesystemsuccessfullyhandlesmoderatedatasets andprovidesreal-timesuggestionswithoutnoticeabledelay. The results validate that emotional context improves recommendationaccuracyanduserengagement.

Fig. 3. ModelPerformanceComparison

International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056

Volume: 13 Issue: 03 | Mar 2026 www.irjet.net p-ISSN: 2395-0072

3. CONCLUSION

ThispaperpresentedaMood-BasedFoodRecommendation Systemthatintegratesmachinelearningtechniqueswitha Django-based web framework to deliver personalized, emotion-aware food suggestions. Unlike traditional recommendation engines that rely solely on static parameters,theproposedsystemincorporatespsychological mood states into its prediction model. Experimental evaluation demonstrated 89% classification accuracy, confirmingtheeffectivenessofLogisticRegressionformoodbasedfoodmapping.

The system reduces decision fatigue, enhances user satisfaction, and supports local vendors by providing targetedexposure.Theresearchhighlightstheimportanceof emotionalintelligenceinmodernrecommendationsystems. Future work may involve integrating deep learning algorithms,facialemotiondetectionusingcomputervision, NLP-based sentiment analysis, and mobile application deploymenttofurtherenhancesystemcapabilities.

REFERENCES

[1] Y. Zhang and X. Wang, “Mood-Based Food RecommendationUsingMachineLearning,”Journalof FoodInformatics,2020.

[2] M. Gupta, S. Sharma, and R. Patel, “Mood-Based Food Recommendation System,” in Proc. Asian Conf. on InnovationinTechnology,2021.

[3] Gomathi, K. Ramesh, and S. Devi, “Restaurant Recommendation System for User Preference and Services,”inProc.ICCIDS,2019.

[4] P. A. Deshmukh, S. Rathi, and A. Patil, “Food RecommendationSystemBasedonMoodoftheUser,” 2023.

[5] L. Chen and P. Pu, “A User-Centric Approach to Personalized Food Recommendation,” ACM Trans. InteractiveIntelligentSystems,2020.

[6] R.SinghandP.Kaur,“HybridRecommendationModel for Food Suggestions Using Deep Learning and SentimentAnalysis,”IEEEAccess,2022.

[7] J.LiandY.Hu,“Emotion-BasedFoodRecommendation System Using Facial Expression Recognition,” Int. J. of ComputerApplications,2021.

[8] S. Patil and R. Kulkarni, “Context-Aware Food Recommendation System Using Machine Learning Techniques,”IRJET,2020.

[9] M.Hossain,T.Rahman,andS.Akter,“AReviewonFood Recommendation Systems Based on User Health and Preferences,”J.AmbientIntell.Humaniz.Comput.,2022.

[10]A. Sharma and S. Jain, “Mood Detection Using NLP for PersonalizedFoodRecommendation,”inProc.ICCIDS, 2023.

[11]]S.KimandH.Lee,“DietRecommendationSystemUsing DeepNeuralNetworks32andUserMoodPatterns,”in IEEEInt.Conf.onBigData,2019.

[12]]A.Das,B.Yadav,andR.Kumar,“Sentiment-AwareFood Recommendation Based on Social Media Analysis,” ExpertSystemswithApplications,2022.

[13]K. Suresh and P. Babu, “ML-Based Personalized Food SuggestionSystemforBetterUserExperience,”IJACSA, 2021.

[14]A. George and J. Mathew, “Mood-Driven Multi-Criteria Food Recommendation Using Django Framework,” IJIRCCE,2023

Turn static files into dynamic content formats.

Create a flipbook
An Intelligent Mood-Aware Food Recommendation System by IRJET Journal - Issuu