Expert System for Lifestyle and Nutrition Counseling

Expert System for Lifestyle and
Nutrition Counseling
GAÁL Balázs, VASSÁNYI István, KOZMANN György,
MÁK Erzsébet*, SZABOLCS István*
University of Pannonia, Dept. of Information Systems
*Semmelweis University, Dept. of Dietetics and Nutrition Sciences
Budapest, Hungary
18 August 2006
Importance of Nutrition
• Contribution of
nutrition to the
burden of disease
in the European
Union
• 30% of CVD and
Cancer could be
prevented by
proper nutrition
(WHO)
Importance of Nutrition (cont’d)
• mortality statistics
cancer
other
• Impact on
• Cancer
• Cardiovascular
• UN, WHO
• 2nd biggest impact
after smoking
cardiovascular
Workflow – Dietary Anamnesis (1)
• Questionnaire
• Age, Sex, BMI, Type of Work, etc.
• Allergies
• Family diseases
• Medical history analysis
• Patient records and physiological time-series analysis
• Blood glucose, triglyceride levels
• Accelerometer
• Next step: Calculating the personalized requirements
Workflow
–
Personalized Requirements (2)
• Nutritional constraints
• minimal, optimal, maximal values
e.g. on carbohydrate
• Food pyramid
• Harmony
• Variety, Contrast, Color, Appeal
• Keep balance, constraints and
harmony on every level
meal by meal basis, daily basis,
weekly basis
• Following step: Dietary menu planning
Workflow
–
Menu Planning (3)
• Week → days → meals → dishes (defined with recipes)
• Meal patterns
• Lunch = <soup, main_dish, drink>
• main_dish = <garnish, topping>
• Recipe database (recipe books)
• Food Composition database
•
•
USDA SR18 (more than 200 nutrients per food)
www.eurofir.net (EU version, work in progress)
• Case-Base, Building Blocks
• Assessment and Adaptation
• Daily plan: takes 3 hours for human experts
Software Tools
• Recipe database, meal preparation guide
Software Tools (cont’d)
• Workout log, estimate calories burned
Nutrition Counseling Expert Systems
• First algorithmic method in 1964
• Most of them employ case-based reasoning (CBR)
• or CBR combined with other techniques
• Rule-Based Reasoning (RBR)
• Machine Learning
• Short-term
• Single meal plan
• Daily plan
Our Approach
• Anamnesis: web-based questionnaire
• Personalized objectives: user classification
• Menu planning
• Assessment (of generated menu plans)
• Penalty function to assess nutritional content
• Domain ontology to describe dietitian knowledge
• Rules to avoid non-matching meal combinations
• Search (for better menu compilations)
• Evolutionary Divide and Conquer method
• Genetic Algorithms for near-optimum search
Assessment
• Numerical constraints
• Constraints (min, opt,
max) for nutrients,
foodstuffs, types of foods
• Constraint propagation
• Penalty function
• Linear fitness combination
• Rule Based Assessment (also penalizing the menu plan)
• allow no starch-based dishes in consecutive main_meals
• main_meals = [lunch, dinner]
• tomato-based garnish and tomato-soup is one-sided
Search
• Exhaustive search methods do not work,
around 10480 potential menu plan for a week
• Dimension of the search space depends on the number of
constraints (approximately 200)
• Shape of the search space is unpredictable, method have to
avoid getting stuck in local optimas
Evolutionary Divide and Conquer
• Divide the search space into sub-spaces
• Sub-spaces are defined to encompass solutions for subproblems of weekly, daily and meal level menu plans
• Use Genetic Algorithms (GA) to find good sub-solutions in the
sub-spaces
• Constraint satisfaction, Optimization
• Initialization
• Load good solutions from the Case-Base into the initial
populations of the GAs
• Adaptation
• Let individuals evolve on each level simultaneously
• Assessment
• Fitness function (described previously)
Individuals of the Search Space
• genotype: vector of components of the menu plan
x(garnish,topping,drink)=[potato,pork-chop,juice]
• phenotype: vector of nutritional content of the menu plan
y(protein,fat,…,carbohydrate)=[200g,150g,…,538g]
Phenotype space
Genotype space
Encoding
10010001
10010010
010001001
011101001
Decoding
GA operators: 1-point crossover
•
•
•
•
Choose a random point on the two parents
Split parents at this crossover point
Create children by exchanging tails
Pc typically in range (0.6, 0.9)
GA operators: mutation
• Alter each gene independently with a
probability pm
• pm is called the mutation rate
• Typically between 1/pop_size and 1/
chromosome_length
Individuals of the Search Space
• Main idea: better individuals get higher chance
• Chances proportional to fitness
• Implementation: roulette wheel technique
• Assign to each individual a part of the roulette
wheel
• Spin the wheel n times to select n individuals
1/6 = 17%
A
3/6 = 50%
B
fitness(A) = 3
C
2/6 = 33%
fitness(B) = 1
fitness(C) = 2
Workflow of the Genetic Algorithm
Scheduling of the Multi-Level Process
Results and experiments
• Relatively large
P(m) needed
• Fast convergence
• Distribution of
fitness values in
function of runtime
Results and experiments (cont’d)
• Reaction to the gradual diminution of the
constraints
• Numerical constraints are satisfied on each
level
• Rule-Based Assessment successfully omits
non-matching components
Thank you for your attention!