Machine learning may improve use of observational data to understand the nutritional epidemiology of cardiovascular disease (CVD) through better modelling of non-linearity, non-additivity, and dietary complexity. Our objective was to develop machine learning prediction models for exploring how nutrients are related to CVD risk and to evaluate their predictive performance. We established a population-based cohort from the Canadian Community Health Survey and measured CVD incidence and mortality from 2004 to 2018 using administrative databases of national hospital discharges and deaths. Predictors included 61 nutrition variables and fourteen socioeconomic, demographic, psychological, and behavioural variables. Conditional inference forest models were interpreted and evaluated by permutation feature importance, accumulated local effects, and predictive discrimination and calibration. A total of 12 130 individuals were included in the study. Use of supplements, caffeine, and alcohol were the most important nutrition variables for prediction of CVD. Supplement use was associated with decreased risk, caffeine was associated with increasing risk, and alcohol had a u-shaped association with risk. The model had an out-of-sample c-statistic of 0.821 (95% confidence interval = 0.801–0.842). Exploratory findings included both known and novel associations and predictive performance was competitive, suggesting that further application of machine learning to nutritional epidemiology may help elucidate risks and improve predictive models.
Novelty: Machine learning prediction models were developed for CVD using dietary data. Models were interpreted with interpretable machine learning techniques, revealing diverse associations between diet and CVD. Models achieved comparable or superior predictive performance to existing CVD risk prediction models.