Healthy Personalized Recipe Recommendations for Weekly Meal Planning †

. Abstract: Nowadays, in the pursuit of personalized health and well-being, dietary choices are critical. This paper introduces a novel recommendation system designed to provide users with personalized meal plans, consisting of breakfast, lunch, snack, and dinner, in alignment with their health history and preferences from other similar users. More specifically, our system exploits collaborative filtering first to identify other users with similar dietary preferences and uses this information to propose suitable recipes to individuals. The whole process is enhanced by analyzing the individual’s health history, including dietary restrictions, nutritional needs, and specific diet plans, such as low-carb or vegetarian. This ensures that the generated meal plans are not only aligned with the user’s taste but also contribute to the overall wellness of the user. A distinctive feature of our system is its dynamic adaptation feature, which enables users to make real-time adjustments to their meal plans based on their personal constraints and preferences, directly impacting future recommendations. We evaluate the usability of the system through a series of experiments on a large real-world data set of recipes, showing that our system is able to provide highly personalized, dynamic, and accurate recommendations.


Introduction
Recommendation systems (RS) are increasingly pivotal across various industries, leveraging data mining and machine learning to scrutinize vast datasets and furnish personalized suggestions to users.These tailored, pertinent recommendations aid users in discovering novel products or services, concurrently boosting sales, engagement, and customer retention for businesses [1][2][3].Popular entities like Amazon, Netflix, and YouTube have integrated recommendation systems to enhance user experience [4][5][6].Customized recommendations are generated based on customers' viewing histories and preferences, facilitating the swift delivery of more relevant content and significantly reducing users' browsing time.
The ubiquity of recommendation systems is evident in numerous facets of our daily lives.Despite their widespread applications, although there is a significant amount of work related to food and recipe recommendation, their utilization for concrete weekly meal plans remains surprisingly limited.Nevertheless, this presents an unexplored opportunity for research and innovation, particularly in dealing with the complex details of dietary needs, health factors, and individual choices in the field of meal planning.Hence, there is significant untapped potential for leveraging recommendation systems within this domain.
In addition, the prevalence of chronic health conditions has reached alarming levels, with well-established associations with increased morbidity and mortality [7,8].Mitigating the risk of developing or exacerbating these conditions, often linked to suboptimal dietary choices, underscores the significance of adopting a healthy, well-balanced diet.However, the process of identifying recipes that align with specific dietary requirements and preferences can be arduous and time-consuming for individuals, necessitating manual searches.This challenge is particularly pronounced for those managing specific health conditions requiring adherence to specialized diet plans, such as high-protein, gluten-free, or other targeted dietary regimens.
In this paper, we address the aforementioned problem by developing a hybrid recommendation system that utilizes a combination of collaborative filtering (CF) and contentbased filtering (CB) methods to recommend a personalized meal plan consisting of breakfast, lunch, snack, and dinner.The CF part of the system finds other users with similar preferences and uses this information to recommend recipes that are tailored to the individual user's needs.The CB part of the system incorporates a knowledge-base component and analyzes the nutritional information of the recipes to recommend recipes that are suitable for the user's health condition(s).Our approach centers around the idea of recommending healthy personalized recipes and making a weekly meal plan uniquely tailored to each user's specific needs.It can accommodate a wide variety of health constraints.This enables us to provide helpful suggestions suitable even for those suffering from chronic diseases who require strict attention when choosing recipes.
In the realm of dietary planning, our system features a dynamic adaptation that empowers users to actively engage in shaping their meal plans, promoting a sense of ownership and customization.Users are allowed to make alterations to the suggested meal plans based on their personal constraints and preferences like meal components and portion sizes.These modifications trigger an iterative feedback mechanism that directly impacts future recipe recommendations, ensuring that the system learns and adapts to the user's evolving tastes and requirements over time.
Specifically, in this paper, we present the design and implementation of a system called SHARE, a recommendation system, that exploits collaborative and hybrid filtering approaches for recipe recommendation.In order to evaluate the usability of SHARE, we conducted an experiment with 40 existing users of the Food.comwebsite.Users are divided equally between those who are perfectly healthy and those who have a chronic disease.We create 16 different use case scenarios of the system, each one designed to assess different aspects of the SHARE's usability and dynamic adaptation to the dynamic preferences and evolving needs of the user throughout the study duration.In greater depth, we investigate the system's adaptability when a user opts to modify the system's default recommendations by introducing hard constraints, soft constraints, and positive weight assignments.The results indicate that the system exhibits notable flexibility and responsiveness to user preferences and requirements.
This work extends our previous workshop paper presented in HEDAI 2023 [9].We extend our previous work, moving beyond individual recipe recommendations to generate a comprehensive weekly meal plan, including all meals in the day.In contrast to the traditional filtering method of our previous work (which has also been improved), the system now offers an even greater degree of user interaction.Users have the option to modify recommendations interactively, thus contributing to the system's learning and adaptability for future suggestions.This dynamic adaptation ensures the system remains attuned to the evolving preferences of its users.Another noteworthy evolution is the elimination of the need for predefined explanation templates accompanying recommendations.With the current refinements, users have the option to request detailed explanations directly from the system.When prompted, the system provides comprehensive information about the recommended recipe, enhancing transparency and user engagement.
The rest of the paper is structured as follows: In Section 2, we present related work.Then Section 3 presents the SHARE system.In Section 4, we evaluate the SHARE system, and finally, Section 5 concludes this paper and presents directions for further work.

Related Work
Most recommendation systems are designed to utilize information to provide users with items that are most relevant to them.There are two main approaches for this: the content-based [10,11] and the collaborative filtering approach [12,13], which can be further divided into model-based [14] and memory-based approaches [15].SHARE integrates collaborative filtering and content-based filtering methods to construct and present concrete meal plans.

Recipe and Meal Recommendations
There is a consideable amount of work focusing on recipe and meal recommendations.Content-based and Collaborative filtering approaches.Freyne et al. [16,17] devised a content-based recipe recommender.This system suggests recipes by evaluating their ingredients and cooking techniques.Freyne et al. [18] put forward a collaborative filtering approach for recipe suggestions, suggesting recipes to users based on the preferences of similar users.Stratigi et al. [19][20][21][22] also followed the collaborative filtering approach to producing recommendations in the health domain but without considering any recipe suggestions.In this line of work, for computing similarities between users, a semantic-aware function is used considering information that includes the patients' medical problems, and their education level, health literacy, and psycho-emotional status.SHARE intersects with these earlier investigations, extending their approaches by integrating content-based and collaborative filtering methods.This fusion results in a personalized recipe recommendation system that considers both user preferences and health background.However, SHARE stands distinct from prior works as it incorporates a knowledge-based component.Specifically, in content-based filtering, we utilize this component to assess recipes' nutritional data and recommend dishes tailored to the user's chronic conditions.In the context of meal planning, we also incorporate nutrition and user preferences along with health restrictions, but the main difference is that the process evolves and the system learns through the user's choices over time.
Recommendations considering dietary limitations and constraints.Regarding recipe recommendations considering dietary preferences or limitations, Agapito et al. [23] introduced a tailored recipe recommendation system that incorporates users' health profiles and chronic conditions, like hypertension and diabetes.Similarly, Yang et al. [24] created a food recommendation system that considers users' nutritional requirements, dietary limitations, and specific food preferences.Furthermore, previous studies related to meal planning include multiple decision variables and constraints.Mainly, most of the studies proposed meal recommenders based on nutrition like Noah SA et al. [25], and recent studies also incorporate factors such as the user's food preference [26].Further, numerous prior investigations have employed constraints, ranging from intricate formulations as exemplified by Parameswaran et al. [27] to more flexible approaches as demonstrated by Zanker et al. [28].Additionally, some studies have incorporated weight assignment methodologies, as observed in the work of Yang et al. [29].What sets our research apart from the above studies is our system's capability to employ both constraint types and positive weight assignment both separately and in combination, in order to offer highly personalized recommendations that account for evolving user preferences and constraints over time, thereby dynamically shaping their influence on future suggestions.
Hybrid Approaches.Regarding the incorporation of user-generated data such as recipe ratings and reviews into the recommendation process, Tian et al. [30] proposed a system that incorporates user history behavior and user feedback such as the ratings of recipes, which makes the recommendation consider user interest and preferences.In a similar fashion, Pessemier et al. [31] present a food recommendation strategy for patients in a care facility that utilizes explicit ratings for menu items, implicit feedback based on the patient's eating behavior and the amount of food that was eaten, and inferred preferences for the ingredients of the menu items.Finally, there are other hybrid approaches, which combine two or more different recommendation techniques; for example, Gaudani and Hetal [32] proposed a hybrid approach that combines CB and CF algorithms to recommend recipes.Overall, according to our research, there is no other hybrid approach for generating a meal plan that combines collaborative filtering, content-based filtering, and knowledge-based methods where the CB component extracts tags from recipe descriptions including nutritional information and other relevant characteristics and allows users to adjust their meal plans in real time based on their personal constraints and preferences, directly influencing future recommendations.

The SHARE System
In this section, we present the algorithms of our recommendation system, i.e., the SHARE system.Figure 1 depicts the process for generating weakly meal planning.As input, we have users' ratings and medical history along with a set of recipes.In addition, a knowledge-based component contains the nutrients related to chronic conditions.Then collaborative filtering and content-based filtering are exploited and combined with the chronic-conditions nutrients, in order to provide a weekly meal plan.Finally, based on user selections, the weekly meal plan is dynamically adapted.In the sequel, we describe each one of these components in detail.

User-Based Collaborative Filtering
To create recommendations for a specific user, we employ collaborative filtering (CF), utilizing their ratings and those of similar users.
Before implementing the similarity measure, we normalize all user ratings by subtracting each user's mean rating from their individual ratings.This process centers the ratings around the mean, where positive ratings indicate values higher than the mean and negative ratings indicate values lower than the mean [33].This normalization method is crucial as it accounts for the variations in absolute rating scales among different users.For instance, one user might consistently rate all recipes as five stars, while another might consistently rate the same recipes as one star.Without normalization, the similarity between these users would be artificially low due to their rating scale disparities.Normalization addresses this issue by aligning ratings onto a standardized scale.
Normalizing ratings plays a pivotal role in the CF process by ensuring that user similarities are based on their relative preferences rather than their distinct rating scales [33].To identify similar users, we first compute the similarity between each pair of users based on the cosine similarity measure.Cosine similarity measures the similarity between two nonzero vectors in a vector space based on its inner product and is defined as the cosine of the angle between the vectors (https://medium.com/@riyasisonline/cosine-similarity-is-a-measure-of-similarity-between-two-non-zero-vectors-of-an-inner-product-caa3cd05c10f, ac-cessed on 18 December 2023).The resulting similarity ranges from −1, meaning completely dissimilar, to 1, meaning completely similar, with 0 indicating orthogonality, while inbetween values indicate intermediate similarity or dissimilarity.We use it to measure the similarity between the ratings of two users ( https://en.wikipedia.org/wiki/Cosine_similarity, accessed on 18 December 2023).The formula for the cosine similarity is as follows: To compute the cosine similarity, we first convert the ratings of each user into a termfrequency representation, which represents the frequency with which each rating appears in an individual's rankings (https://blog.marketmuse.com/glossary/term-frequency-definition/, accessed on 18 December 2023).For example, if someone rated three recipes as five stars and then two more at four with one left over at three, their corresponding term frequency would be [3,2,1,0,0].We also ensure that each term-frequency vector for each user has the same dimension.Finally, we have to note that the database does not consider half-stars in the ratings.
Once we have the term-frequency representations of the ratings of two users, we compute the dot product of the vectors by multiplying the corresponding elements of the vectors and summing the results.The dot product is then divided by the product of the magnitudes of the vectors to give the cosine similarity.The magnitude of a vector is the square root of the sum of the squares of the elements of the vector (https://wumbo.net/formulas/magnitude-of-vector/, accessed on 18 December 2023).Intuitively, we use the cosine similarity because it can handle sparse data and does not require the ratings to be normally distributed (https://en.wikipedia.org/wiki/Cosine_similarity,accessed on 18 December 2023).
To generate recommendations for a given user, we use the ratings of a set of similar users to predict the rating that the user would give to each recipe.The formula for the predicted rating of a recipe, r t , by user u a , is as follows: In this formula, the N ("neighbors") are the users who are most similar to the target user u a , as determined by the cosine similarity measure.For this particular system, we select for similar users the square root of all users in the database of the system.Therefore the number is not fixed but dynamic and this is to cover the case when users are added or removed from the database.The predicted rating is a weighted average of the ratings of the neighbors, with the weights being the cosine similarities sim(u a , u n ), between the users.Finally, the average rating r u a of the target user u a is included in the prediction to take into account the fact that different users may have different overall rating tendencies.As we discussed above for "normalization", one user may tend to give higher ratings to recipes overall, while another user may tend to give lower ratings.Including the average rating of the user in the prediction formula helps to adjust for these differences in rating tendencies so that the predictions are more accurate and reflective of the user's true preferences.
Once the predictions have been computed for all recipes, we can rank them and recommend the top-rated recipes to the user.

Health Personalized Recommendation Method
To take into account the health needs of the individual user, we incorporated personalization techniques that allow the system to consider the user's health history.
For this purpose, we integrated collaborative filtering, content-based filtering, and knowledge-based methods.Collaborative filtering leverages similar users' preferences for item recommendations [12], while content-based filtering relies on the item's attributes to suggest recommendations [34].Knowledge-based recommendation systems utilize both explicit item information and user preferences to generate recommendations [35].
For the content-based component, tags were extracted from recipe descriptions including nutritional information and other relevant characteristics of the recipes.These features formed a vector for each recipe, which incorporated the recipe's nutritional information and other relevant attributes.
For the knowledge-based component, we identify the specific nutrients that are suitable for every chronic health condition supported by SHARE.The data were collected from official statistics (https://www.greenfacts.org/en/diet-nutrition/index.html/,https://www.hopkinsmedicine.org/health/conditions-and-diseases/cancer/cancer-diet-foods-to-add-and-avoid-during-cancer-treatment/, https://stanfordhealthcare.org/medical-clinics/cancernutrition-services.html/,https://www.eatingwell.com/our-food-nutrition-philosophy/,accessed on 18 December 2023).We used this information to calculate the nutritional profile that is most suitable for the user's health needs, taking into account their specific health condition(s).We then used this nutritional profile to create a target vector, which represents the types of recipes that are suitable for the user based on their specific health needs.
Finally, we used the cosine similarity between the feature and target vectors to identify recipes that are less suited to the nutritional profile of the user and we excluded them from the collaborative filtering we applied afterwards.
Once the CF process is finished, the system will produce a list of recommended recipes that are customized to meet the individual's health requirements and personal preferences.

Weekly Meal Planning
In both of the previously described methodologies, we introduce an innovative feature wherein recipes are presented in the format of a weekly meal plan.This entails selecting the highest-ranked recipes obtained from the aforementioned methods and categorizing them into breakfast, lunch, snack, and dinner based on their respective tags, and we form a meal plan for each day of the week.We take care to eliminate any meal repetitions within the plan, thereby ensuring a diverse and nutritionally balanced meal plan that takes into account the user's personal preferences and any individual health requirements.The program offers the flexibility to generate weekly meal plans for the duration of the user's choosing.Additionally, as elaborated upon in a subsequent section, users have the opportunity for real-time, active participation in shaping the program's recommendations.

Recipe Information
Another feature of our system is that we allow the user to request, for any recipe recommended by the system, to be given extra information for that recipe.Such information includes the type of meal, how many ingredients it needs, and what the nutritional values are, so the user can draw useful conclusions about the recipe, why it was suggested to him, and if it meets his needs and preferences.

Dynamic Adaptation Features
After formulating the daily schedule for a given day of the week, the program provides the user with the option to either maintain the schedule as is or make adjustments.If the user opts for the latter, they gain the ability to modify any of the recipes in the daily schedule.This includes the option to exclude a recipe entirely from the pool of recommendations or reposition it within the hierarchy.
Through this interactive approach, we enrich the system's knowledge base, enabling it to identify optimal choices for the user.Regarding the selection of the replacement recipe for any excluded or changed recipe, the system can either propose the next recipe in the recommendation order or employ a personalized filtering technique.
This iterative process can be repeated as often as the user desires, for as many days as needed.Consequently, through this continuous and interactive process, coupled with the assignment of both negative and positive weights, we achieve a higher degree of accuracy and personalization in the recommendation process, even accounting for extreme cases.In particular, if the user has a combination of dietary restrictions that rule out multiple recipe options for each available meal, or if the user has excluded a substantial number of recipes, resulting in limited available options, the system will issue a warning message indicating the remaining available recipes.When only a few recipes remain and are insufficient for an entire weekly schedule, the program ensures a rotation of recipes to prevent consecutive recommendations of the same dishes and meal combinations.This ensures diversity in the weekly meal plan.
In the following subsections, we delve into these interactive and continuous techniques in detail, elucidating their dynamic influence on future recommendations to the user.

Hard Constraints
When a user chooses to completely exclude a recipe from the recommendation pool, we employ this technique.Specifically, the excluded recipe is permanently removed from future recommendations to the user.Furthermore, in cases where the user has excluded two or more recipes belonging to the same meal group (e.g., breakfast), the program undertakes an attribute-based analysis.
In such instances, the program identifies the intersection of attributes, including ingredients, nutrition, and tags, among the excluded recipes.Within this shared attribute pool, the program identifies all recipes that exhibit the undesirable attribute pattern according to the user's preferences and assigns a negative weight to the ratings of these recipes.The magnitude of the negative weight increases with the prevalence of common undesirable attributes.
This process effectively filters out recipes that are most likely to be disliked by the user, thereby optimizing the recommendation order.For example if the user has excluded recipes containing eggs for breakfast, then no recipes containing eggs will be suggested again, e.g., omelet.
The new rating of the affected recipes is given by the following formula: Rat(u a , r t )− = length(common_attributes)r u a mod 0.1 In this formula for the new rating of a recipe, r t , by user u a , the new rating results from the old rating by subtracting from it a negative weight that we have set to be the modulo operation of the average grade given by the user to the recipes r u a divided by 0.1 and then multiplying this value by the number of common elements present in the excluded recipes.
In other words, the greater the number of shared elements among the excluded recipes, the more substantial the negative weight applied to the recipe's rating, reflecting the user's aversion to recipes with these common elements.

Soft Constraints
When a user wishes to modify a recommendation for a specific day of the week without outright excluding the recipe, they have the option to select this alternative.This option operates in a similar way to the 'hard restrictions' mechanism, with the distinction that instead of being completely excluded, the recipe is assigned a negative weight and retreated from the recommendation order, in a way that it retains the potential to be suggested again at a later time.
To calculate the new rating of the recipe that changes, the user uses the same Formula (3) as the hard constraints.
Moreover, when the user opts to change two or more recipes (even on different days), a similar process is applied as in the first option.Recipes that share common attributes with those being modified are subjected to a negative weight assignment.However, this negative weight is less pronounced compared to the 'hard constraints' scenario, as it is evidently less critical for the user to exclude a recipe than to defer its selection for a particular time.Using again the egg example mentioned in the hard constraints section, in this case, the recipes with eggs will not be completely excluded from the recommendation order but will be preceded by different recipes.
The new rating of the affected recipes is given by the following formula: Rat(u a , r t )− = length(common_attributes)r u a mod 0.01 (4) It is the same formula as above but now the modulo operation of the average grade given by the user to the recipes r u a is divided by 0.01 not 0.1, which is because we want lower diversification than in hard constraints 3.5.3.Personalized Filtering Regarding the selection of the recipe that will take the place of the recipe excluded/ changed by the user, either let the algorithm suggest the next recipe in the recommendation order after the changes in the pool or apply a personalized filtering technique.
SHARE offers personalized filtering, allowing users to customize the recommendations based on their tastes and dietary needs.Through personalized filtering, users are able to narrow down their recommendations based on tags extracted from recipe descriptions (e.g., vegan or gluten-free) and/or desired nutritional values like calories, protein, and saturated fat.This elevated level of customization helps ensure that our recommended recipes accurately meet individual preferences, resulting in highly relevant and useful results for maximized satisfaction.
At the same time, within this interactive process, in order to achieve the most accurate recommendations possible, the recipes that meet the filtering criteria are assigned positive weights in their rating and are moved ahead in the recommendation order.
In this way, we can identify all the recipes in a database that are not far from their optimal option according to the filters applied by the user.

Rating Decay
As previously discussed, SHARE evolves dynamically in response to the evolving preferences of the user.To achieve this in an optimal manner, we have implemented a foundational function that remains consistent regardless of whether negative or positive weights are assigned to one or more recipes.Essentially, on a daily basis, this function moderates the impact-whether positive or negative-of the user's selections on the modification of the daily meal plan.
The new rating for each recipe that has been modified is given by the following formulas: Formula ( 5) is for the recipes that have been assigned negative weights, and Formula ( 6) is for the recipes that have been assigned positive weights.
In the above formulas, the or_Rat(u a , r t ) is the rating predicted by the system for the user u a for the specific recipe r t , before there is any weight assignment.
By adopting this approach, we ensure that the user's decisions carry the most significant weight on the day they make their selections.As subsequent days unfold, the influence of these decisions on the recipe ratings gradually diminishes.
For example, we have a recipe that had an initial rating of five and after assigning negative weights it reached four.This rating will remain until the next day.Then, day by day, it will gradually increase, e.g., 4.1, 4.2, etc., until a week is completed, when the rating will gradually return to its initial value.
We employ this strategy to prevent scenarios where a user's choice is considered only once without any recurring pattern.However, with this approach, if a recurring pattern emerges in the days preceding the reset, the reset interval expands and may even become effectively permanent.This mechanism enables the system to exhibit dynamic adaptability.

Experiments
SHARE is implemented using Python, and the source code of our system is available online (https://github.com/konzioutos/SHARE-Updated,accessed on 18 December 2023).

Dataset and Set-Up
The dataset used for our experiments was obtained from food.com (https://www.kaggle.com/datasets/shuyangli94/food-com-recipes-and-user-interactions,accessed on 18 December 2023) containing real-world recipe ratings collected from numerous users, forming an ideal source for our RS.The dataset consists of user IDs and associates recipe IDs with their rating scores on a scale of 1 to 5. The scale reflects the level of satisfaction expressed by each individual user towards the recipe in question.All entries are arranged into a CSV file, wherein the first column includes the user ID, followed by a column with the recipe identifier and then the given rating.
By utilizing the health history of each user, we are able to make more personalized recommendations tailored to their health needs.To do so, we gather data from official statistics (https://www.who.int/news/item/04-03-2022-world-obesity-day-2022-accelerating-action-to-stop-obesity, https://diabetesresearch.org/diabetes-statistics/, https://www.cdc.gov/heartdisease/facts.htm, https://www.wcrf.org/cancer-trends/worldwide-cancer-data/, https://www.who.int/news-room/fact-sheets/detail/oral-health, https://www.bonehealthandosteoporosis.org/wp-content/uploads/2015/12/Osteoporosis-Fast-Facts.pdf,accessed on 18 December 2023) and we assign a collection of Boolean attributes outlining whether the users of the dataset have any chronic conditions or not.This allows us to generate suggestions that take into account people's medical history, making it easier for them to manage their chronic illnesses, and especially help them in decisions relating to food.

Experimental Methodology
In our experiment, we examine the functionality of the system as discussed in Section 3. To evaluate the usability of SHARE, we conducted a survey with 40 existing users of the food.comwebsite consisting of 2 questions.The recipes that were considered in total were 2.774.676.Users were divided equally between those who were perfectly healthy and those who had a chronic disease.The chronic conditions related to those 20 users were cancer, obesity, diabetes, cardiovascular diseases, chronic dental problems, and osteoporosis.We created 8 different use case scenarios, each one designed to assess different aspects of the system's usability and dynamic adaptation to the dynamic preferences and evolving needs of the user throughout the study duration.We applied the use case scenarios to both perfectly healthy people and people who had at least one chronic disease.For each scenario, we conducted the survey for 5 different users of the system.Specifically:

•
The first use case scenario examines the effect of hard constraints in the recommendations when a user excludes 2 or more recipes from his weekly meal plan.

•
The second use case scenario examines the effect of soft constraints in the recommendations when a user elects to change 2 or more recommendations from his weekly meal plan but without excluding them from the recommendation order.

•
The third use case scenario examines the effect of filtering with a keyword (e.g., highprotein, vegan) after the hard constraints have already been applied to 2 or more recommendations.

•
The fourth use case scenario examines the effect of filtering with a nutrition value (e.g., calories) after the hard constraints have already been applied to 2 or more recommendations.

•
The fifth use case scenario examines the effect of filtering with both filtering options (e.g., high-fiber recipes with 100 or more calories) after the hard constraints have already been applied to 2 or more recommendations.

•
The sixth use case scenario examines the effect of filtering with a keyword (e.g., highprotein, vegan) after the soft constraints have already been applied to 2 or more recommendations.

•
The seventh use case scenario examines the effect of filtering with a nutrition value (e.g., calories) after the soft constraints have already been applied to 2 or more recommendations.

•
The eighth use case scenario examines the effect of filtering with both filtering options (e.g., high-fiber recipes with 100 or more calories) after the soft constraints have already been applied to 2 or more recommendations.
The two questions were presented to the users and were used to evaluate the methods of our system through the use case scenarios shown in Table 1.The first question assesses personalization.By asking this question, the survey is attempting to understand how well the system is tailoring its recommendations to the user's preferences.It helps us understand whether the recommended recipes align with the user's preferences.
The second question assesses the relative relevance.Knowing the position or ranking of recommended items that match the user's preferences (common ingredients, keywords, or nutritional criteria) provides important context.It allows users to assess how relevant those items are compared to others.This information helps users understand whether the recommended recipes are among the top choices or if they are buried lower in the list.
These questions overall allow us to draw conclusions about the impact of user choices on future system recommendations.

Results
The results of the survey presented in the previous section are shown in Tables 2 and 3. Table 2 contains the detailed results of all the scenarios of the experiment for both healthy users and users with chronic health problems.The results represent the success rate of the scenario for each user.We also have the average for each scenario across all users who implemented the scenario.Table 3 includes only the scenarios that have a success rate of less than 100%.In these scenarios, for each user, we present the top 10 positions of the proposed recipes that have violated the criteria of the respective scenario.
Concerning Scenario 1 in Table 2, we observe that the application of the hard constraints technique consistently results in the absence of any recipes sharing common characteristics with those recipes previously excluded within the top 10 recommendations.This pattern holds for individuals who are in good health as well as those with chronic conditions.This outcome underscores the effectiveness of the system and highlights the system's ability to provide diverse and tailored recommendations.
Concerning Scenario 2 in Tables 2 and 3, we observe that within the top 10 recommendations, there are typically one or two recipes that exhibit similar characteristics to the recipes that the user has changed.This pattern remains consistent for both individuals in good health and those with chronic conditions.This indicates that the system accommodates these recipes in its suggestions, as the user has not opted for their complete exclusion and has expressed an interest in potentially considering such recipes in the future Concerning Scenario 3 in Tables 2 and 3, we observe for both healthy individuals and patients that within the top 10 recommendations more than half of the recipes have the specific tag chosen by the user and are mainly in the top 5 and top 3.
Concerning Scenario 4 in Table 2, we observe for both healthy and patients that in this scenario, it is noteworthy that all recipes within the top 10 recommendations consistently align with the user's specified criteria.This strict adherence is primarily attributed to the fact that when a user imposes restrictions on nutritional values, it is typically undertaken for specific health or dietary goals, such as weight loss or weight gain, often under the guidance of a nutritionist.
Concerning Scenario 5 in Tables 2 and 3, we observe for both healthy individuals and patients that within the top 10 recommendations more than half of the recipes have the specific tag and the specified nutrition criteria chosen by the user.
In the context of the remaining three scenarios, we conduct experiments similar to those performed in Scenarios 3, 4, and 5.However, in this iteration, soft constraints have been previously applied.As evidenced by Tables 2 and 3, the outcomes under these conditions are significantly better compared to the hard constraints scenarios (Scenarios 3, 4, 5).This outcome can be attributed to the soft constraints having a more modest impact on subsequent predictions, resulting in a broader pool from which recommended recipes can be drawn, so we have a wider range of recipes and more options after filtering.

Conclusions
In conclusion, the recommendation system we presented in this paper represents a significant advancement in the pursuit of personalized dietary planning and well-being.By integrating collaborative filtering and content-based filtering methods, SHARE addresses the unique needs and preferences of users, offering comprehensive meal plans that consider not only individual dietary tastes but also health histories, dietary restrictions, and specific diet plans.What sets SHARE apart is its dynamic adaptation feature, which empowers users to actively shape their meal plans, fostering a sense of ownership and customization.Users can modify recommendations in real time, triggering an iterative feedback process that ensures the system evolves alongside their changing tastes and requirements.Through experiments conducted on a real-world dataset of recipes, SHARE has proven its ability to provide highly personalized, accurate, and dynamic recommendations.Its adaptability in accommodating a variety of user-imposed constraints further underscores its flexibility and responsiveness.In an era where personalized health is of the utmost importance, SHARE stands as a promising and user-centric tool for improving dietary choices and overall well-being.

Figure 1 .
Figure 1.Overview of the process for generating weakly meal planning.