Skip to content

glauberss2007/AI-ModernNutrition

Repository files navigation

Actions Status Actions Status Actions Status

Modern Nutrition

Since the classic diet planning problem, several mathematical models and programming techniques have been shown to generate menus following several restrictions. However, a new trend not yet addressed is behavioral nutrition. This scientific approach, focused on nutritional counseling, proves to be more effective than the common restrictive diets, by adapting to the habits and preferences of users. Therefore, aiming to contribute to a non-restrictive and intuitive diet, in this project we propose a new dinamic optimization model considering preferences predictions.

Features

  • Clean separation of library and executable code
  • Continuous integration via GitHub Actions
  • Reproducible dependency management via CPM.cmake

Usage

Adjust the model to your needs

  • Change the enum Model (.../test/benchmark/main.cpp) replacing by one of current availables:

static_caloric_deviation

  • nutritional deviation values:

  • nutrition facts separated by categories with diferent portion size:

  • penalties applied according to nutritional deviations intensity:

  • result: a list of foods to be eat freely during the day.

static_mealstime_caloric_deviation

  • separate dayle recomendation menu into 6 diferents mealtimes:

  • penalties formulation applied according to nutritional deviations proportionally to mealstime (the penalties are applied according to mealstime caloric target inporcentage of total):

  • result: a list of food considering mealtimes proportionaly (caloric and nutrients).

dinamic_only_caloric_deviation

  • user interations after each mealstime inputing.caloric deviation consume diference of user consume input and mealstime menu recomended calculation:

  • compensatory system to equilibrate/recalculate further mealstimes considering current user consume:

  • result: dinamic menu that changes/recalculate according to user input on each mealstime

dinamic_preferences_prediction_caloric_deviation

  • prediciton instance (consume history database) based on mealstime category preferences instance generation rule:

PS: The category preference was used due a limitation provided due no real consume database availability actually. It is necessary to create a real food consume per mealstime database in ten future...
  • item-item score matrix created using colaborative filtering

    magnitude calculation:

    item importance:

    cossine similarity calculation:

    final vector score of itens in a specific mealstime for an user:

  • first-fit algorithym to include high scored itens limited on 50% of mealstime caloric target.

dinamic_preferences_prediction_cost_minimization

  • populate TACO DB with prices based on ENAPE.
  • (on going) change the objective function to maxmizing and avaliation function to cost minimization + nutritional deviation:

  • caloric value as a nutrient range like others using 1600-2400 for womens and 2000-3000 for mens.

Solver algorithm

Genetic

  • initial random population
  • pattern select scale/strategy: windows/tournament
  • child select scale/strategy: windows/tournament
  • mutation type: flip reseting
  • mutation_strenght: 0.4
  • crossover_probability: 0.6

Coming soon

  • easy database change using cereal lib for txt/csv nutrition facts serealize or sql DB conection for MYSQL ralational db query
  • dinamic minimization cost considering
  • diferents metaheuristcs solvers

References

  • Dissertation available on http:// (on going)

About

Project created during MSc Science Computer course promoted by UFOP and oriented by Alan Freitas.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages