Explanatory AI Predicts the Diet Adopted Based on Nutritional and Lifestyle Habits in the Spanish Population
Abstract
:1. Introduction
2. Materials and Methods
2.1. Type of Study and Sampling
2.2. Inclusion and Exclusion Criteria
- Inclusion criteria:
- Individuals aged 18 years or older.
- Spanish citizens.
- Residents of Spain.
- Exclusion criteria:
- Individuals with chronic conditions could influence their dietary habits.
- Participants experiencing temporary circumstances during the survey period that disrupted their usual diet, such as hospitalization, incarceration, or similar situations.
2.3. Ethical Approval
2.4. Instrument
2.5. Data Collection
2.6. Grouping and Categorisation of Variables
2.7. Comparison and Selection of Machine Learning Algorithms
2.8. SHapley Additive exPlanations (SHAP) Approach
- (1)
- Additivity SHAP values are additive, meaning that the contribution of each feature to the final prediction can be computed independently and then summed up.
- (2)
- Local accuracy SHAP values sum up to the difference between the expected model output and the actual output for a given input.
- (3)
- Missingness SHAP values are zero for features that are missing or irrelevant to a prediction.
- (4)
- Consistency SHAP values only change when the model is modified if the contribution of a feature changes.
- (1)
- Dependency plot: A scatter plot that shows the effect a single feature has on the predictions made by the model.
- (2)
- Force plot: Shows how features contribute to the model’s prediction for a specific observation.
- (3)
- Waterfall plot: Used to gain insights into how features contribute to a single prediction. Starting from a base value, each row shows how the positive (red) or negative (blue) contribution of each feature moves the value from the expected model output (E[f(x)]) to the model output for that prediction (f(x)).
- (4)
- Decision plot: Provides insights into how each feature contributes to the model’s prediction for a specific instance and how a model arrives at its predictions. It is similar to a force plot, but it is more useful when there are a large number of significant features involved due to the direction in which the plot goes.
- (5)
- Summary plot: Provides insights into how each feature contributes to the output of the model from a global point of view. Its components are:
- feature importance: represented on the Y-axis with the most important features at the top and the least important at the bottom;
- SHAP values: represented on the X-axis, they can be positive (to the right) or negative (to the left);
- feature value: represented by the colour scale that can be seen on the right of the plot.
2.9. Approach for Interpretable Machine Learning
- Data Preparation:
- ○
- Data Loading and Cleaning: The dataset was first read into the analysis environment. The target feature, which indicates the dietary pattern, and the sex variable were removed since the dataset only included female participants. This step was crucial to prevent any potential bias in the model that could arise from gender-specific dietary habits.
- ○
- Unification of Classes: The various vegetarian dietary patterns (ovolactovegetarian, flexitarian, lactovegetarian, ovovegetarian) were unified into a single ’Vegetarian’ class. This decision was based on the rationale that these diets share significant similarities and consolidating them would enhance the model’s ability to generalize across different vegetarian diets.
- ○
- Handling Missing Data: Any rows with missing values (NaNs) were removed to ensure that the dataset was complete. This step was critical to avoid introducing biases or inaccuracies in the model due to incomplete data.
2.10. Model Selection and Optimization
- Dataset Splitting:
- ○
- The dataset was split into training and test sets using an 80-20 split ratio. This stratified split ensured that the test set was representative of the overall dataset, allowing for robust evaluation of the model’s performance. The rationale behind this split is to maintain enough data for training while preserving a portion for unbiased testing.
- Feature Standardization:
- ○
- Z-score normalization (Z-points scaler) was applied to standardize the features.
- Model Training:
- ○
- Several machine learning models have been tested including Random Forest, Decision Trees, Feed Forward Neural Networks, and CatBoost. The best performing model was the CatBoost classifier due to its superior handling of categorical features and its ability to provide high-quality predictions without extensive parameter tuning. Additionally, its implementation of Ordered Encoding for categorical features significantly reduced the risk of overfitting.
- Model Testing:
- ○
- The trained CatBoost model was then tested on the test set. Performance metrics, including precision, recall, and F1-score, were calculated and the confusion matrix was generated. These metrics provided a comprehensive evaluation of the model’s classification capabilities across different dietary classes.
- Interpretability with SHAP:
- ○
- To interpret the model’s predictions, the TreeExplainer model from the SHAP package was utilized. SHAP values, which are grounded in game theory, were calculated to assign an importance value to each feature. This approach ensures transparency in the model’s decision-making process, allowing for a detailed understanding of how each feature influences the predictions.
- ○
- SHAP Plots Generation:Several SHAP plots were generated to visualize the feature contributions:
- Summary plot: This plot provided a global view of feature importance, highlighting which features had the most significant impact on the model’s predictions.
- Dependency plot: This plot illustrated the relationship between individual features and the predicted output.
- Force plot and waterfall plot: These plots provided insights into the contributions of each feature to individual predictions, demonstrating how the model arrived at specific decisions.
- Oversampling with SMOTENC:
- ○
- The Synthetic Minority Over-sampling Technique for Nominal and Continuous (SMOTENC) was applied to address class imbalance in the training set. SMOTENC generates synthetic samples for minority classes, balancing the dataset. This technique was particularly effective in improving the classification performance for underrepresented dietary patterns. Importantly, oversampling was only applied to the training set to ensure that the test set remained a valid benchmark for evaluating model performance.
3. Results
3.1. Socio-Demographic Characteristics of the Sample
3.2. Summary Plots
- -
- Fish: A strong divide exists between non-consumers (negative influence) and consumers (positive influence).
- -
- IASE: Higher values generally correlate with a greater likelihood of following the diet.
- -
- Income: Though influential, values cluster between 0.2 and 0.5.
- -
- Sport: Those practicing more sport tend to not follow this diet.
- -
- Age: Older individuals are more likely to follow the Mediterranean diet.
- -
- Junk Food: Non-consumers of junk food tend not to follow this diet.
- -
- Age: Confirms the tendency for older individuals to follow the diet, with a specific age where adherence increases. Younger people consume less fish.
- -
- Body Image: Better self-image correlates with more controlled eating habits, though with low impact.
- -
- BMI: A low BMI predicts adherence, especially in physically active individuals. Neutral BMI has minimal influence, but higher BMI positively impacts predictions.
- -
- Sport: Less sport correlates with higher adherence.
- -
- Eating Disorders: Anorexia nervosa positively impacts predictions, while binge eating has the opposite effect.
- -
- Illness: Illnesses like diabetes and fructose intolerance increase adherence.
- -
- CCAA (Autonomous Regions, Comunidades Autónomas): Catalans tend not to follow this diet.
- -
- Fish: Non-consumers tend not to follow this diet.
- -
- Age: Younger people are less likely to follow the diet, while older individuals are more likely to adhere.
- -
- Sport: Those who practice sport are more likely to follow this diet, though the group is small.
- -
- BMI: Lower BMI negatively impacts predictions, while higher BMI positively influences adherence.
- -
- Income: Similar influence as in the Mediterranean diet category.
- -
- Home: Unclear impact, similar to the Mediterranean diet.
- -
- Junk Food: Consumers are less likely to follow this diet, though the overall impact is minimal.
- -
- Sleep Quality: Lower sleep quality correlates with a reduced likelihood of adherence.
- -
- Body Image: Minimal impact overall, but extreme values show a strong positive (high body image) or negative (low body image) influence.
- -
- BMI: Neutral BMI has little effect. Two trends emerge: lower BMI decreases adherence probability, while higher BMI increases it.
- -
- Sport: In general, less sport correlates with lower adherence, but exceptions exist.
- -
- Fried Food: Lower fried food consumption predicts adherence. Among younger individuals, fried food strongly reduces adherence, but this effect diminishes with age.
- -
- Sleep: Longer sleeping hours slightly decrease adherence, but better sleep quality significantly increases it.
- -
- CCAA: Galicians are less likely to follow this diet.
- -
- Fish: People who do not eat fish are more likely to follow a vegan diet.
- -
- Sleep Quality: Poor sleep quality is associated with higher adherence.
- -
- Age: Younger individuals are more likely to be vegan, while older people are less likely.
- -
- No Control: Those with less control over their eating habits tend to follow the vegan diet.
- -
- Sport: Non-athletic individuals are less likely to follow this diet.
- -
- BMI: Higher BMI correlates with lower adherence.
- -
- Sleeping Hours: People who sleep less are more likely to follow the diet.
- -
- Ultra-Processed Food: Higher consumption of ultra-processed food decreases the likelihood of adherence.
- -
- Obesophobia: Fear of obesity is a factor; those unconcerned about obesity tend not to follow the diet.
- -
- Age: Strong confirmation that younger individuals follow the vegan diet.
- -
- BMI: As BMI increases, adherence decreases.
- -
- Fried Food: Avoidance of fried food is linked to veganism; interestingly, some sport participants eat fried food and are vegan.
- -
- Ultra-Processed Food: Minimal consumption strongly predicts adherence, while high consumption has a stronger negative impact.
- -
- Sleeping Patterns: Less sleep correlates with adherence, and worse sleep quality strengthens this connection.
- -
- Eating Disorders: Most vegans do not report eating disorders.
- -
- Illness: Lactose intolerance significantly reduces the likelihood of following a vegan diet.
- -
- CCAA: Catalonia and Galicia show the highest concentrations of vegans.
- -
- Fish: People who do not consume fish are more likely to follow a vegetarian diet.
- -
- Age: Younger individuals are more likely to follow the diet, while older individuals are less likely.
- -
- BMI: Higher BMI correlates with lower adherence, whereas those with a low BMI are more likely to follow the diet.
- -
- Sport: Those who engage in sports are less likely to follow the diet.
- -
- Sleeping Hours: Individuals who sleep less are more likely to follow the diet.
- -
- Junk Food: Higher consumption of junk food is associated with lower adherence.
- -
- Body Image: People with a lower body image and poorer self-perceived health tend to follow the diet.
- -
- Age: Younger people consistently show higher adherence.
- -
- Body Image: Those with very negative self-perception are more likely to follow the diet, while those with a highly positive image are less likely.
- -
- BMI: As BMI increases, adherence decreases.
- -
- Junk Food: Individuals consuming more junk food tend not to follow the diet.
- -
- Fish: Avoidance of fish strongly predicts vegetarianism.
- -
- Eating Disorders: Most vegetarians do not report any diagnosed eating disorders.
- -
- CCAA: Similar to veganism, Galicia and Catalonia have the highest concentrations of vegetarians.
3.3. Analysis of the Decision Plots
3.3.1. Discovering How the Model Decides the Class
- -
- The error arises primarily from the fried food feature, with subsequent features worsening the prediction.
- -
- This is consistent with the confusion matrix (Figure 2), which shows poor accuracy for classes 2 (Mediterranean), 3 (vegan), and 4 (vegetarian).
- -
- Initially unsure, the model gains confidence as important features (e.g., fish) are analyzed.
- -
- Fish is a key feature, splitting positive predictions for classes 1 and 2 and negative predictions for classes 3 and 4.
- -
- The initial prediction seems correct, but uncertainty arises with the fish feature.
- -
- This individual likely has a confusing diet (e.g., doesn’t eat fish but consumes junk food), making classification challenging.
- -
- Certain features (e.g., fish) exponentially increase the probability of a Mediterranean diet, suggesting overlapping characteristics between classes 1 (Mediterranean) and 4 (vegetarian).
- -
- The model struggles with nuanced differences, despite being confident about the prediction.
- -
- The model performs well for simpler cases (e.g., Observation 702) but struggles with overlapping or contradictory dietary patterns.
- -
- Fish, fried food, and class-specific features strongly influence predictions, often determining class distinctions.
- -
- Misclassifications reveal areas where the model could be improved, particularly for better differentiation among classes 2, 3, and 4.
3.3.2. Individual Conditional Expectation Plots
3.3.3. Discovering the Typical Prediction Paths
3.3.4. Summary of Main Results
- -
- Age: Positively impacts Mediterranean diet predictions as it increases, and negatively impacting vegan and vegetarian diets as it decreases.
- -
- Junk food: Positively influences classes 1 and 2 (Mediterranean and intermittent fasting).
- -
- BMI: Vegetarians tend to have lower BMI, though the causal relationship remains unclear.
- -
- Sport: Particularly significant for classes 2 (intermittent fasting) and 4 (vegetarian), often correlating with age.
3.4. Interaction Between the Variables IASE and Fish
- -
- A strong correlation exists between IASE and fish consumption.
- -
- Low IASE values correspond to low fish consumption, but as IASE increases, there is a clear turning point where higher IASE values lead to increased fish consumption.
- -
- The correlation between IASE and fish is weaker compared to the Mediterranean diet.
- -
- While similar trends are observed, greater data dispersion indicates less consistency in the relationship.
- -
- As IASE scores increase, fish consumption nearly disappears.
- -
- This pattern aligns with the vegan diet’s exclusion of all animal proteins, including fish.
- -
- A complex relationship emerges.
- -
- Initially, higher IASE scores correlate with increased fish consumption. However, fish intake then drops drastically, mimicking the vegan diet’s behaviour (Figure 8c).
- -
- The red dots (indicating correct classifications) highlight this shift, suggesting that as IASE increases, vegetarian diets align more closely with vegan patterns regarding fish consumption.
4. Discussion
Strengths and Limitations
5. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Acknowledgments
Conflicts of Interest
Appendix A
Variables | Typology | |
---|---|---|
Sex | Categorical | Demographical features |
Age | Numerical | |
Municipality | Categorical | |
Region | Categorical | |
CCAA (Autonomous Communities) | Categorical | |
Residence | Categorical | |
Studies | Categorical | |
Income | Categorical | |
Home | Categorical | |
Alone | Categorical | |
Obesophobia | Categorical | Eating habits |
No control | Categorical | |
Body image | Categorical | |
Fried Food | Categorical | |
Fast Food | Categorical | |
Ultra Processed Food | Categorical | |
Fish | Categorical | |
Water | Categorical | |
Soft drinks | Categorical | |
Juice | Categorical | |
Coffee | Categorical | |
Drink meal | Categorical | |
Fermented beverages | Categorical | |
Distilled beverages | Categorical | |
Fortified beverages | Categorical | |
Liquors and creams | Categorical | |
IASE | Numerical | |
Sedentary lifestyle | Categorical | Lifestyle |
Sport | Categorical | |
Reasons No Sport | Categorical | |
Sleeping hours | Categorical | |
Getting up rested | Categorical | |
Sleep quality | Numerical | |
Smoking | Categorical | |
Night outings | Categorical | |
Alcohol | Categorical | |
Getting drunk | Categorical | |
BMI | Numerical | Health |
Self-perceived health | Numerical | |
Diagnosed Eating Disorders | Categorical | |
Illness | Categorical |
References
- Abellán Alemán, J., Zafrilla Rentero, M. P., Montoro-García, S., Mulero, J., Pérez Garrido, A., Leal, M., Guerrero, L., Ramos, E., & Ruilope, L. M. (2016). Adherence to the Mediterranean diet in Spain and its relationship with cardiovascular risk (DIMERICA study). Nutrients, 8(11), 680. [Google Scholar] [CrossRef] [PubMed] [PubMed Central]
- Acevedo Cantero, P., Ortega Santos, C. P., & López-Ejeda, N. (2023). Vegetarian diets in Spain: Temporal evolution through national health surveys and their association with healthy lifestyles. Endocrinología, Diabetes y Nutrición, 70(Suppl. 2), 1–8. [Google Scholar] [CrossRef]
- Ali, A., Wei, S., Ali, A., Khan, I., Sun, Q., Xia, Q., Wang, Z., Han, Z., Liu, Y., & Liu, S. (2022). Research progress on nutritional value, preservation and processing of fish: A review. Foods, 11(22), 3669. [Google Scholar] [CrossRef] [PubMed] [PubMed Central]
- Arija, V., Pérez, C., Serra-Majem, L., & Aranceta, J. (2019). Gastronomy and nutrition in Catalonia. Nutricion Hospitalaria, 36, 78–85. [Google Scholar] [CrossRef] [PubMed]
- Arik, S. Ö., & Pfister, T. (2021, February 2–9). TabNet: Attentive interpretable tabular learning [Conference session]. AAAI Conference on Artificial Intelligence (Vol. 35 No. 8. , pp. 6679–6687), Virtual Event. [Google Scholar]
- Bali, A., & Naik, R. (2023). The impact of a vegan diet on many aspects of health: The overlooked side of veganism. Cureus, 15(2), e35148. [Google Scholar] [CrossRef] [PubMed] [PubMed Central]
- Bini, S. A. (2018). Artificial intelligence, machine learning, deep learning, and cognitive computing: What do these terms mean and how will they impact health care? The Journal of Arthroplasty, 33(8), 2358–2361. [Google Scholar] [CrossRef] [PubMed]
- Breiman, L. (2001). Random forests. Machine Learning, 45, 5–32. [Google Scholar] [CrossRef]
- Cena, H., & Calder, P. C. (2020). Defining a healthy diet: Evidence for the role of contemporary dietary patterns in health and disease. Nutrients, 12(2), 334. [Google Scholar] [CrossRef] [PubMed]
- Chen, T., & Guestrin, C. (2016). XGBoost: A scalable tree boosting system. In KDD ’16: Proceedings of the 22nd ACM SIGKDD international conference on knowledge discovery and data mining, ACM 2016. Association for Computing Machinery. [Google Scholar] [CrossRef]
- Cooper, C. B., Neufeld, E. V., Dolezal, B. A., & Martin, J. L. (2018). Sleep deprivation and obesity in adults: A brief narrative review. BMJ Open Sport & Exercise Medicine, 4(1), e000392. [Google Scholar] [CrossRef]
- Dentamaro, V., Giglio, P., Impedovo, D., Pirlo, G., & Di Ciano, M. (2024). An interpretable adaptive multiscale attention deep neural network for tabular data. IEEE Transactions on Neural Networks and Learning Systems, 15, 1–15. [Google Scholar] [CrossRef]
- Diab, A., Dastmalchi, L. N., Gulati, M., & Michos, E. D. (2023). A heart-healthy diet for cardiovascular disease prevention: Where are we now? Vascular Health and Risk Management, 19, 237–253. [Google Scholar] [CrossRef] [PubMed]
- DiNicolantonio, J. J., & O’Keefe, J. H. (2020). The importance of marine omega-3s for brain development and the prevention and treatment of behavior, mood, and other brain disorders. Nutrients, 12(8), 2333. [Google Scholar] [CrossRef] [PubMed] [PubMed Central]
- Dixon, K. A., Michelsen, M. K., & Carpenter, C. L. (2023). Modern diets and the health of our planet: An investigation into the environmental impacts of food choices. Nutrients, 15, 692. [Google Scholar] [CrossRef]
- Dominguez, L. J., Veronese, N., Di Bella, G., Cusumano, C., Parisi, A., Tagliaferri, F., Ciriminna, S., & Barbagallo, M. (2023). Mediterranean diet in the management and prevention of obesity. Experimental Gerontology, 174, 112121. [Google Scholar] [CrossRef] [PubMed]
- Dorogush, A. V., Ershov, V., & Gulin, A. (2018). CatBoost: Gradient boosting with categorical features support. arXiv. [Google Scholar] [CrossRef]
- Euromonitor International. (2024). Going plant-based: The rise of vegan and vegetarian food. Euromonitor. Available online: https://go.euromonitor.com/sb-packaged-food-210330-rise-vegan-vegetarian-food.html (accessed on 15 January 2023).
- Font-I-Furnols, M. (2023). Meat consumption, sustainability and alternatives: An overview of motives and barriers. Foods, 12(11), 2144. [Google Scholar] [CrossRef] [PubMed] [PubMed Central]
- Fuhrman, J. (2018). The hidden dangers of fast and processed food. American Journal of Lifestyle Medicine, 12(5), 375–381. [Google Scholar] [CrossRef] [PubMed] [PubMed Central]
- Ganesan, K., Habboush, Y., & Sultan, S. (2018). Intermittent fasting: The choice for a healthier lifestyle. Cureus, 10(7), e2947. [Google Scholar] [CrossRef] [PubMed] [PubMed Central]
- Gherasim, A., Arhire, L. I., Nițǎ, O., Popa, A. D., Graur, M., & Mihalache, L. (2020). The relationship between lifestyle components and dietary patterns. Proceedings of the Nutrition Society, 79, 311–323. [Google Scholar] [CrossRef]
- Goldberg, J. H., & King, A. C. (2007). Physical activity and weight management across the lifespan. Annual Review of Public Health, 28, 145–170. [Google Scholar] [CrossRef]
- Goodyear, V. A., Armour, K. M., & Wood, H. (2018). Young people and their engagement with health-related social media: New perspectives. Sport, Education and Society, 24, 673–688. [Google Scholar] [CrossRef] [PubMed] [PubMed Central]
- Gropper, S. S. (2023). The role of nutrition in chronic disease. Nutrients, 15(3), 664. [Google Scholar] [CrossRef]
- Guasch-Ferré, M., & Willett, W. C. (2021). The Mediterranean diet and health: A comprehensive overview. Journal of Internal Medicine, 290(3), 549–566. [Google Scholar] [CrossRef]
- Gunning, D., Stefik, M., Choi, J., Miller, T., Stumpf, S., & Yang, G. Z. (2019). Explainable artificial intelligence. Science Robotics, 4(37), eaay7120. [Google Scholar] [CrossRef] [PubMed]
- Hancock, J. T., & Khoshgoftaar, T. M. (2020). CatBoost for big data: An interdisciplinary review. Journal of Big Data, 7, 94. [Google Scholar] [CrossRef]
- Hargreaves, S. M., Rosenfeld, D. L., Moreira, A. V. B., & Zandonadi, R. P. (2023). Plant-based and vegetarian diets: An overview and definition of these dietary patterns. European Journal of Nutrition, 62(3), 1109–1121. [Google Scholar] [CrossRef] [PubMed]
- Herrera-Ramos, E., Tomaino, L., Sánchez-Villegas, A., Ribas-Barba, L., Gómez, S. F., Wärnberg, J., Osés, M., González-Gross, M., Gusi, N., Aznar, S., Marín-Cascales, E., González-Valeiro, M. Á., Terrados, N., Tur, J. A., Segú, M., Fitó, M., Homs, C., Benavente-Marín, J. C., Labayen, I., . . . Serra-Majem, L. (2023). Trends in adherence to the Mediterranean diet in Spanish children and adolescents across two decades. Nutrients, 15, 2348. [Google Scholar] [CrossRef] [PubMed]
- Hetherington, M. M. (2000). Eating disorders: Diagnosis, etiology, and prevention. Nutrition, 16, 547–551. [Google Scholar] [CrossRef] [PubMed]
- Hillsdon, M., & Foster, C. (2018). What are the health benefits of muscle and bone strengthening and balance activities across life stages and specific health outcomes? Journal of Frailty, Sarcopenia and Falls, 3(2), 66–73. [Google Scholar] [CrossRef] [PubMed]
- Hopwood, C. J., Bleidorn, W., Schwaba, T., & Chen, S. (2020). Health, environmental, and animal rights motives for vegetarian eating. PLoS ONE, 15(4), e0230609. [Google Scholar] [CrossRef] [PubMed] [PubMed Central]
- Ivanova, S., Delattre, C., Karcheva-Bahchevanska, D., Benbasat, N., Nalbantova, V., & Ivanov, K. (2021). Plant-based diet as a strategy for weight control. Foods, 10, 3052. [Google Scholar] [CrossRef] [PubMed]
- Jiménez Monreal, A. M., Antonia Murcia Tomás, M., & Martínez Tomé, M. (2019). Nutrition and gastronomy in the community of Murcia Region. Nutricion Hospitalaria, 36, 92–97. [Google Scholar] [CrossRef]
- Kandel, S. (2019). An evidence-based look at the effects of diet on health. Cureus, 11(5), e4715. [Google Scholar] [CrossRef]
- Khan, M. A., & Al-Jahdali, H. (2023). The consequences of sleep deprivation on cognitive performance. Neurosciences, 28(2), 91–99. [Google Scholar] [CrossRef]
- Lim, S. (2018). Eating a balanced diet: A healthy life through a balanced diet in the age of longevity. Journal of Obesity & Metabolic Syndrome, 27(1), 39–45. [Google Scholar] [CrossRef]
- Lundberg, S. M., Erion, G., Chen, H., DeGrave, A., Prutkin, J. M., Nair, B., Katz, R., Himmelfarb, J., Bansal, N., & Lee, S. I. (2020). From local explanations to global understanding with explainable AI for trees. Nature Machine Intelligence, 2(1), 2522–5839. [Google Scholar] [CrossRef]
- Lundberg, S. M., & Lee, S. I. (2017). A unified approach to interpreting model predictions. In I. Guyon, U. Von Luxburg, S. Bengio, H. Wallach, R. Fergus, S. Vishwanathan, & R. Garnett (Eds.), Advances in neural information processing systems 30 (pp. 4765–4774). Curran Associates, Inc. Available online: http://papers.nips.cc/paper/7062-a-unified-approach-to-interpreting-model-predictions.pdf (accessed on 15 January 2023).
- Mahindru, A., Patil, P., & Agrawal, V. (2023). Role of physical activity on mental health and well-being: A review. Cureus, 15(1), e33475. [Google Scholar] [CrossRef]
- Marquez, D. X., Aguiñaga, S., Vásquez, P. M., Conroy, D. E., Erickson, K. I., Hillman, C., Stillman, C. M., Ballard, R. M., Sheppard, B. B., Petruzzello, S. J., King, A. C., & Powell, K. E. (2020). A systematic review of physical activity and quality of life and well-being. Translational Behavioral Medicine, 10(5), 1098–1109. [Google Scholar] [CrossRef]
- Mathur, M. B., Robinson, T. N., Reichling, D. B., Gardner, C. D., Nadler, J., Bain, P. A., & Peacock, J. (2020). Reducing meat consumption by appealing to animal welfare: Protocol for a meta-analysis and theoretical review. Systematic Reviews, 9, 3. [Google Scholar] [CrossRef]
- Mazzotti, D. R., Guindalini, C., Moraes, W. A., Andersen, M. L., Cendoroglo, M. S., Ramos, L. R., & Tufik, S. (2014). Human longevity is associated with regular sleep patterns, maintenance of slow wave sleep, and favorable lipid profile. Frontiers in Aging Neuroscience, 6, 134. [Google Scholar] [CrossRef]
- Miki, A. J., Livingston, K. A., Karlsen, M. C., Folta, S. C., & McKeown, N. M. (2020). Using evidence mapping to examine motivations for following plant-based diets. Current Developments in Nutrition, 4(3), nzaa013. [Google Scholar] [CrossRef] [PubMed] [PubMed Central]
- Moreiras, O., & Cuadrado, C. (2001). Mediterranean diet and lifestyle: Special aspects of Spain. International Journal for Vitamin and Nutrition Research, 71(3), 154–158. [Google Scholar] [CrossRef] [PubMed]
- Nelson, M. E., Hamm, M. W., Hu, F. B., Abrams, S. A., & Griffin, T. S. (2016). Alignment of healthy dietary patterns and environmental sustainability: A systematic review. Advances in Nutrition, 7, 1005. [Google Scholar] [CrossRef]
- Neuhouser, M. L. (2019). The importance of healthy dietary patterns in chronic disease prevention. Nutrition Research, 70, 3–6. [Google Scholar] [CrossRef]
- Nhat-Duc, H., & Van-Duc, T. (2023). Comparison of histogram-based gradient boosting classification machine, random forest, and deep convolutional neural network for pavement raveling severity classification; Automation in Construction. Available online: https://www.nstl.gov.cn/paper_detail.html?id=4d53926ab8e76e705f898065f8a78833 (accessed on 19 April 2024).
- Norte Navarro, A. I., & Ortiz Moncada, R. (2011). Spanish diet quality according to the healthy eating index. Nutricion Hospitalaria, 26(2), 330–336. [Google Scholar]
- North, M., Klas, A., Ling, M., & Kothe, E. (2021). A qualitative examination of the motivations behind vegan, vegetarian, and omnivore diets in an Australian population. Appetite, 167, 105614. [Google Scholar] [CrossRef] [PubMed]
- Palar, P. S., Zuhal, L. R., & Shimoyama, K. (2023). Enhancing the explainability of regression-based polynomial chaos expansion by Shapley additive explanations. Reliability Engineering & System Safety, 232, 109045. [Google Scholar]
- Pilař, L., Kvasničková Stanislavská, L., & Kvasnička, R. (2021). Healthy food on the Twitter social network: Vegan, homemade, and organic food. International Journal of Environmental Research and Public Health, 18, 3815. [Google Scholar] [CrossRef]
- Pinckard, K., Baskin, K. K., & Stanford, K. I. (2019). Effects of exercise to improve cardiovascular health. Frontiers in Cardiovascular Medicine, 6, 69. [Google Scholar] [CrossRef]
- Prokhorenkova, L., Gusev, G., Vorobev, A., Dorogush, A. V., & Gulin, A. (2017). CatBoost: Unbiased boosting with categorical features. arXiv, arXiv:1706.09516. [Google Scholar]
- Puetz, T. W. (2006). Physical activity and feelings of energy and fatigue: Epidemiological evidence. Sports Medicine, 36(9), 767–780. [Google Scholar] [CrossRef]
- Rodríguez-Pérez, R., & Bajorath, J. (2020). Interpretation of machine learning models using Shapley values: Application to compound potency and multi-target activity predictions. Journal of Computer-Aided Molecular Design, 34(10), 1013–1026. [Google Scholar] [CrossRef] [PubMed] [PubMed Central]
- Rynders, C. A., Thomas, E. A., Zaman, A., Pan, Z., Catenacci, V. A., & Melanson, E. L. (2019). Effectiveness of intermittent fasting and time-restricted feeding compared to continuous energy restriction for weight loss. Nutrients, 11(10), 2442. [Google Scholar] [CrossRef]
- Sabaté, J., & Soret, S. (2014). Sustainability of plant-based diets: Back to the future. The American Journal of Clinical Nutrition, 100(Suppl. 1), 476S–482S. [Google Scholar] [CrossRef] [PubMed]
- Sandri, E., Borghesi, D., Cantín Larumbe, E., Cerdá Olmedo, G., Vega-Bello, M. J., & Bernalte Martí, V. (2024a). Intermittent fasting: Socio-economic profile of Spanish citizens who practice it and the influence of this dietary pattern on the health and lifestyle habits of the population. Nutrients, 16, 2028. [Google Scholar] [CrossRef]
- Sandri, E., Cantín Larumbe, E., Capoferri, M., Cerdá Olmedo, G., Werner, L. U., & Vega-Bello, M. J. (2024b). Socio-Demographic Determinants of Dietary Choices and Their Impact on Health in Spanish Adults. Frontiers in Public Health, 12, 1417925. [Google Scholar] [CrossRef]
- Sandri, E., Cantín Larumbe, E., Part-Ferrer, R., Ferrer-Torregrosa, J., & Fernández-Ehrling, N. (2023a). Diet and lifestyle in the Spanish population and their relationship with sociodemographic variables: A descriptive study. Foods, 12, 3409. [Google Scholar] [CrossRef] [PubMed]
- Sandri, E., Modesto i Alapont, V., Cantín Larumbe, E., & Cerdá Olmedo, G. (2023b). Analysis of the Influence of Socio-Demographic Variables and Some Nutrition and Lifestyle Habits on Beverage Consumption in the Spanish Population. Foods, 12, 4310. [Google Scholar] [CrossRef]
- Sandri, E., Piredda, M., De Maria, M., Mancin, S., Sguanci, M., Cabo, A., & Cerdá Olmedo, G. (2024c). Development and psychometric testing of the nutritional and social health habits scale (NutSo-HH): A methodological review of existing tools. MethodsX, 12, 102768. [Google Scholar] [CrossRef] [PubMed]
- Sandri, E., Sguanci, M., Cantín Larumbe, E., Cerdá Olmedo, G., Werner, L. U., Piredda, M., & Mancin, S. (2024d). Plant-based diets versus the Mediterranean dietary pattern and their socio-demographic determinants in the Spanish population: Influence on health and lifestyle habits. Nutrients, 16, 1278. [Google Scholar] [CrossRef]
- Shen, D., Wu, G., & Suk, H. I. (2017). Deep learning in medical image analysis. Annual Review of Biomedical Engineering, 19, 221–248. [Google Scholar] [CrossRef]
- Shen, J., Wilmot, K. A., Ghasemzadeh, N., Molloy, D. L., Burkman, G., Mekonnen, G., Gongora, M. C., Quyyumi, A. A., & Sperling, L. S. (2015). Mediterranean dietary patterns and cardiovascular health. Annual Review of Nutrition, 35, 425–449. [Google Scholar] [CrossRef] [PubMed]
- Short, S. E., & Mollborn, S. (2015). Social determinants and health behaviors: Conceptual frames and empirical advances. Current Opinion in Psychology, 5, 78–84. [Google Scholar] [CrossRef] [PubMed] [PubMed Central]
- Tantamango-Bartley, Y., Jaceldo-Siegl, K., Fan, J., & Fraser, G. (2015). Vegetarian diets and the incidence of cancer in a low-risk population. Cancer Epidemiology, Biomarkers & Prevention, 22, 286–294. [Google Scholar] [CrossRef]
- Trabazo, R. L., Pérez C de L, Castro Pérez, X., & Solla, P. (2019). Atlantic diet. Nutrition and gastronomy in Galicia. Nutricion Hospitalaria, 36, 7–13. [Google Scholar] [CrossRef]
- Tsofliou, F., Vlachos, D., Hughes, C., & Appleton, K. M. (2022). Barriers and facilitators associated with the adoption of and adherence to a Mediterranean style diet in adults: A systematic review of published observational and qualitative studies. Nutrients, 14(20), 4314. [Google Scholar] [CrossRef] [PubMed] [PubMed Central]
- Tyagi, M., Shah, U., Patel, G., Toshniwal, V., Bhongade, R., & Sharma, P. (2023). The impact of sleep on physical and mental health: Importance of healthy sleep habits. Georgian Medical News, 89–94. [Google Scholar]
- Ui, T. (2000). A Shapley value representation of potential games. Games and Economic Behavior, 31, 121–135. [Google Scholar] [CrossRef]
- Usmani, D., Ganapathy, K., Patel, D., Saini, A., Gupta, J., & Dixit, S. (2023). The role of exercise in preventing chronic diseases: Current evidence and recommendations. Georgian Medical News, 137–142. [Google Scholar]
- Welton, S., Minty, R., O’Driscoll, T., Willms, H., Poirier, D., Madden, S., & Kelly, L. (2020). Intermittent fasting and weight loss: Systematic review. Canadian Family Physician, 66, 117–125. [Google Scholar] [PubMed] [PubMed Central]
- World Medical Association. (2013). Declaration of Helsinki: Ethical principles for medical research involving human subjects. JAMA, 310, 2191–2194. [Google Scholar] [CrossRef] [PubMed]
- Yandex. (2017). CatBoost. Available online: https://catboost.ai/ (accessed on 15 January 2023).
- Yokoyama, Y., Nishimura, K., Barnard, N. D., Takegami, M., Watanabe, M., Sekikawa, A., Okamura, T., & Miyamoto, Y. (2014). Vegetarian diets and blood pressure: A meta-analysis. JAMA Internal Medicine, 174, 577–587. [Google Scholar] [CrossRef] [PubMed]
- Yuan, X., Wang, J., Yang, S., Gao, M., Cao, L., Li, X., Hong, D., Tian, S., & Sun, C. (2022). Effect of intermittent fasting diet on glucose and lipid metabolism and insulin resistance in patients with impaired glucose and lipid metabolism: A systematic review and meta-analysis. International Journal of Endocrinology, 2022, 6999907. [Google Scholar] [CrossRef] [PubMed] [PubMed Central]
Class | Precision | Recall | F1-Score | Support |
---|---|---|---|---|
1. Mediterranean diet | 0.91 | 0.96 | 0.93 | 3248 |
2. Intermittent fasting | 0.26 | 0.09 | 0.13 | 166 |
3. Vegan | 0.47 | 0.46 | 0.46 | 70 |
4. Vegetarian | 0.47 | 0.36 | 0.4 | 253 |
Accuracy | 0.87 | 3737 | ||
Macro average | 0.53 | 0.47 | 0.48 | 3737 |
Weighted average | 0.84 | 0.87 | 0.85 | 3737 |
Mean; SD or N (%) | |||
---|---|---|---|
Male | 4251 (19.2%) | ||
Female | 17,930 (80.8%) | ||
Age (years) | 34.9; 11.7 | range (18–89) | |
Male Age | 36.5; 13.4 | range (18–84) | |
Female Age | 34.5; 11.2 | range (18–89) | |
Total | |||
Age | N (%) | ||
Young (18–30) | 9692 (43.7%) | ||
Middle Age (31–50) | 9913 (44.7%) | ||
Adults (>50) | 2576 (11.6%) | ||
Level of education | |||
Basic | 7027 (31.7%) | ||
Higher | 15,154 (68.3%) | ||
Income level | |||
Low | 9727 (43.8%) | ||
Medium–high | 10,616 (47.7%) | ||
Do not know/no answer | 1838 (8.3%) | ||
City size | |||
<2000 | 1014 (4.6%) | ||
2000–10,000 | 3587 (16.2%) | ||
>10,000 | 17,580 (79.3%) |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2025 by the authors. Published by MDPI on behalf of the University Association of Education and Psychology. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Sandri, E.; Cerdá Olmedo, G.; Piredda, M.; Werner, L.U.; Dentamaro, V. Explanatory AI Predicts the Diet Adopted Based on Nutritional and Lifestyle Habits in the Spanish Population. Eur. J. Investig. Health Psychol. Educ. 2025, 15, 11. https://doi.org/10.3390/ejihpe15020011
Sandri E, Cerdá Olmedo G, Piredda M, Werner LU, Dentamaro V. Explanatory AI Predicts the Diet Adopted Based on Nutritional and Lifestyle Habits in the Spanish Population. European Journal of Investigation in Health, Psychology and Education. 2025; 15(2):11. https://doi.org/10.3390/ejihpe15020011
Chicago/Turabian StyleSandri, Elena, Germán Cerdá Olmedo, Michela Piredda, Lisa Ursula Werner, and Vincenzo Dentamaro. 2025. "Explanatory AI Predicts the Diet Adopted Based on Nutritional and Lifestyle Habits in the Spanish Population" European Journal of Investigation in Health, Psychology and Education 15, no. 2: 11. https://doi.org/10.3390/ejihpe15020011
APA StyleSandri, E., Cerdá Olmedo, G., Piredda, M., Werner, L. U., & Dentamaro, V. (2025). Explanatory AI Predicts the Diet Adopted Based on Nutritional and Lifestyle Habits in the Spanish Population. European Journal of Investigation in Health, Psychology and Education, 15(2), 11. https://doi.org/10.3390/ejihpe15020011