As implementing Feature 11, I found some changes should be made to the current FoodRecommender, on the theory and mechanism part. I open up a issue to discuss these.
Use more user_info in score calculation
For now, score weakly depends the user data, but we can easily change 2000kcal default to things like BMR*1.2. Also, the recommended daily nutrient intake could depend on user_info, these changes could make the score more reasonable.
More user_info needed for reasoning
Some more user_info may be provided to improve reasoning. Two of them are good to have: exercise rate (one of 5 possibilities: little/no, light, moderate, active, intensive) and number of meals a day (2, 3 or 4). To make things simple, I propose to ask user these information in the FoodRecommender directly. One another thing to note that is MealRecorder currently only ask latest weight but not update it in database, which should be fixed in milestone3. With these info, we can have personalized total calorie intake per day and personalized energy per meal.
Recommendation generator
To generate recommendation, I will not only compare the sum of scores of dishes, but also the score of each nutrient. I will record the order of each sub-score of a dish. I will impose an importance order on the nutrients in consideration.
Firstly, I will explain the recommended intake and give reason based on the user_info, including why BMR is that according to your age, weight, height. And why daily intake is ratio* BMR based on your exercise rate.
Secondly, I generate reason for recommending a specific dish, and the algorithm is: for the recommended dish (highest score), choose the two nutrients whose sub-score order are smallest and importance are the highest, generate reason based on the fact that these two nutrients have high score. For the rest dishes (not recommended), choose the one nutrient whose sub-score order is the largest and importance is the highest, generate reason based on the fact that this nutrient has low score.
Thirdly, I will have a detailed explanation of our theory when user input reference. Just print our prepared texts.
As implementing Feature 11, I found some changes should be made to the current
FoodRecommender
, on the theory and mechanism part. I open up a issue to discuss these.Use more user_info in score calculation For now, score weakly depends the user data, but we can easily change
2000kcal
default to things likeBMR*1.2
. Also, the recommended daily nutrient intake could depend on user_info, these changes could make the score more reasonable.More user_info needed for reasoning Some more user_info may be provided to improve reasoning. Two of them are good to have: exercise rate (one of 5 possibilities: little/no, light, moderate, active, intensive) and number of meals a day (2, 3 or 4). To make things simple, I propose to ask user these information in the
FoodRecommender
directly. One another thing to note that isMealRecorder
currently only ask latest weight but not update it in database, which should be fixed in milestone3. With these info, we can have personalized total calorie intake per day and personalized energy per meal.Recommendation generator To generate recommendation, I will not only compare the sum of scores of dishes, but also the score of each nutrient. I will record the order of each sub-score of a dish. I will impose an importance order on the nutrients in consideration. Firstly, I will explain the recommended intake and give reason based on the user_info, including why BMR is that according to your age, weight, height. And why daily intake is
ratio* BMR
based on your exercise rate. Secondly, I generate reason for recommending a specific dish, and the algorithm is: for the recommended dish (highest score), choose the two nutrients whose sub-score order are smallest and importance are the highest, generate reason based on the fact that these two nutrients have high score. For the rest dishes (not recommended), choose the one nutrient whose sub-score order is the largest and importance is the highest, generate reason based on the fact that this nutrient has low score. Thirdly, I will have a detailed explanation of our theory when user inputreference
. Just print our prepared texts.