Skip to main content
Nature Portfolio logoLink to Nature Portfolio
. 2026 Nov 23;1(1):19. doi: 10.1038/s44437-026-00014-1

Explaining physical activity energy expenditure for active lifestyle and activity-friendly cities using machine learning-based approach

Ka Yan Lai 1,2,3, Sarika Kumari 1, John Gallacher 4, Chris Webster 1,2,3, Chinmoy Sarkar 1,2,3,4,✉
PMCID: PMC13792921  PMID: 43080311

Abstract

Physical activity (PA) is central to active living and healthy city policy, which means we need better science linking lifestyle and city configuration to objectively measured PA. We employed explainable machine learning techniques to identify and explain population-, city-, and individual-level predictors of physical activity energy expenditure (PAEE) estimated from accelerometer data among 53,614 residents across 18 UK cities and using 137 input predictor features. Lifestyle features contributed 36% to predicted PAEE, socio-demographics 28%, anthropometry 14%, individual health 9%, and physical environment 14%, with variations observed across cities. For the proportion of PAEE from moderate-to-vigorous PA, the respective contributions to prediction were 28%, 27%, 14%, 14%, and 17%. Our study is novel in a number of ways, including its ability to decipher domain-specific contributions to PAEE, build individualised PAEE models, and show that urban residents not engaging in high intensity PA can still achieve higher PAEE levels through engagement in low intensity PA. We found compensations between lifestyle, active living, social and built environment in explaining PAEE, suggesting the importance of coordinated strategies at individual- (motivational), community- (amenity enrichment), built environment- (urban planning and design), and policy- (health education) levels for promoting active lifestyle.

Subject terms: Lifestyle modification, Public health

Introduction

Nineteenth-century industrialisation and urbanisation had produced an urban penalty, with poorer health and lower life expectancies observed in cities, relative to those living in rural areas. Such urban-rural health inequalities were ameliorated to an extent by the hygiene and sanitary awakening movement of the late nineteenth century. However, rural-to-urban migrations and socioeconomic transformations in the post-1945 antibiotic era resulted in epidemiologic transitions and another form of modern urban plague with higher burdens of chronic sedentary diseases (such as cardiometabolic diseases)1,2. Promoting physical activity (PA), as a lifestyle intervention for chronic disease prevention, has become one of the central planks in the healthy city agenda. Inadequate PA has been consistently shown to be associated with higher risks of obesity3, cardiovascular disease4, diabetes5, cancer6 and all-cause mortality7. An analysis of 7.5 million adults from 507 population-based surveys reported that one-third of adults (1.8 billion) had insufficient PA worldwide, with an age-standardised prevalence of 31.3% in 20228. The global economic burden of physical inactivity in 2013 was estimated to be $53.9 billion in healthcare costs and 13.4 million in disability-adjusted life years9. The WHO’s Global Action Plan on Physical activity (GAPPA) stresses the importance of promoting active living in achieving 13 of seventeen UN Sustainable Development Goals10, and national policy has followed suit11,12.

PA, however, is a complex and multi-dimensional behavioural construct. It includes intentional exercise such as exercise in a gym, as well as incidental activities such as taking the stairs or walking to the bus stop. It has a range of intensities (from low, light, moderate to vigorous) with varied motivations. PA is linked to socio-demographic, lifestyle and behavioural factors13, including employment type14 and travel behaviour15. For example, prior evidence from a cohort study has found that participants who were men, obese and had low muscle strength showed a lower level of PA than those who were women, non-obese and with high muscle strength16,17. The associations of PA with attributes of neighbourhood social18 and built environments are well-established, particularly residential density19, green exposure20, density of services such as recreational facilities21, access to public transport22, retail services23,24, and neighbourhood deprivation25. The relative contribution of each of these attributes to PA, however, has not yet been systematically quantified.

Recent evidence highlights the importance of accurately characterised physical activities, across the intensity spectrum, including light PA26,27. In pursuit of this, the importance of objectively quantifying PA volume (measured as intensity × time) from the variable component of total daily energy expenditure (TDEE) has been proposed28. Physical activity energy expenditure (PAEE) comprises spontaneous exercise and non-exercise-related activities and accounts for ~30% of TDEE in free-living non-athlete humans28. The availability of wearable devices such as accelerometers has made it possible to objectively quantify intensity and volume of PA and PAEE at scale.

Machine learning (ML) has emerged as an innovative data-driven method for obtaining insights from complex datasets29, including high-volume and high-dimensional wearable sensor data30. Previous studies on PA in urban settings have employed unsupervised clustering algorithms on accelerometer data to decipher distinct patterns, types and categories of activities and sedentary behaviours31. Unsupervised machine learning techniques, such as principal component analysis and k-means clustering, can directly identify underlying patterns and clusters in accelerometry data without relying on human supervision, such as inputting pre-labelled or categorised data. A few studies have employed supervised machine learning such as regression trees and decision trees on pre-labelled data to classify and predict PA behaviours32,33. In recent years, eXplainable Machine Learning (XML) has gained popularity as a holistic approach due to its capacity to learn and predict health and behavioural outcomes from high-dimensional datasets as well as systematically explain and rank features that contributed to prediction, accounting for higher-order relationships between predictive features34,35.

Explaining and quantifying specific contributions to PA across distinct domains (such as lifestyle, socio-demographics, physical environment, anthropometry and health) using objective data are of value, especially in informing multi-level behavioural and urban interventions and policy making for creating activity-friendly lifestyles and cities. However, there has thus far been a lack of objectively measured PA datasets at scale and resolution with a systematic range of multi-domain individual-level predictors. We employed a systematic tree-based XML technique leveraging the largest accelerometer-derived PA data in a UK-wide cohort to identify and explain population-, city-, and individual-level predictors of PAEE.

Results

Of the 240,000 invitations to wear an accelerometer, 103,671 participated. Of these, 53,614 provided complete data after excluding unreliable accelerometer data and missingness (Supplementary Fig. 1). Included participants were 46–78 years of age (M = 62.0, SD = 7.9) during the accelerometry assessment, with 54.2% being female and distributed across the UK’s 18 cities. Mean PAEE was 41.6 kJ/kg/d (SD = 11.3), while mean proportion of PAEE from MVPA was 34.8% (SD = 11.1%). Descriptive statistics are presented in Supplementary Table 1. Highly correlated features (r > 0.7) were dropped from analysis (Supplementary Fig. 2), resulting in 137 features being input into the ML processes with the correlation coefficients ranging between −0.62 and 0.68 (Supplementary Fig. 3).

Predictive performance

CatBoost outperformed all other ML regressors for predictions of PAEE, achieving the lowest root mean square error (RMSE) value at 9.9 kJ/kg/d (95% confidence interval (CI): 9.8, 10.1) with 57 selected features. Correlation between predicted and actual (measured) PAEE remained moderate at r = 0.48. Comparison of CatBoost performance with the other regressors is shown in Supplementary Fig. 4. Consistently, CatBoost achieved the best fit for the proportion of PAEE from MVPA, with the lowest RMSE value at 9.5% (9.3%, 9.8%) with 57 features (Supplementary Fig. 4). The correlation between the predicted and actual PAEE attributed to MVPA was comparable at r = 0.52.

Global and local explanations

Overall, decomposing the population-level PAEE predictions by domain-specific percentage SHAP contributions reveals that lifestyle is the most important predictor domain (Fig. 1a). The 10 selected lifestyle features accounted for 35.7% SHAP contribution to PAEE prediction. Socio-demographics, such as age, sex and job type, are the second most important domain, with seven selected features accounting for 28% of global predictive power. Physical environment, with 33 features covering urban configuration, accessibility and so on, accounts for 13.5% of SHAP explanation. Within the physical environment domain (Fig. 1b), distance to destinations, street network characteristics and density remained top predictors, independently contributing 4.4%, 3.2% and 2.6% of the SHAP explanations for PAEE, followed by greenspace (1.8%), pollutants (1.1%), and neighbourhood deprivation (0.4%) (Fig. 1b). The remaining domains are anthropometry with two features contributing 13.8%; individual health with five features accounting for 9% of SHAP contributions to PAEE prediction.

Fig. 1. The impact of the input features on prediction of PAEE.

Fig. 1

The explanations are based on the CatBoost models with 57 input features. a Bar chart of percentage SHAP contribution of the input features by different domains. b Bar chart of percentage SHAP contribution of the input features by different sub-domains of physical environment. c Bar chart of the mean absolute SHAP value enabling global explanation for the top 30 input features. The y axes represent the input features ordered by descending mean absolute SHAP value. d Beeswarm plot of the SHAP value for local explanation for the top 30 input features. Each dot represents the impact of a feature on the PAEE prediction for an individual in the study. The colours represent feature values, with a brighter pink hue representing a higher feature value, whereas a lighter blue hue denotes a lower feature value. Dots to the right represent participants with feature values that pull the prediction towards higher PAEE, whereas dots to the left represent participants with feature values that drag the prediction towards lower PAEE. The x axis shows the positive or negative impact on the model’s prediction of the feature. PAEE, physical activity energy expenditure, SHAP, SHapley Additive exPlanations.

Much of the power in XML comes from mapping a global model onto individual participants. The global explanation reveals a map of relative influence, that is, the features that optimise prediction of PAEE, accounting for all other features. While the global SHAP visualisation maps the relative importance of a feature to the PAEE ordered by mean absolute SHAP value, regardless of directionality, the local explanation in the form of a beeswarm plot also graphs the prevalence, magnitude and direction of influence of the predictor feature on PAEE for each individual, the latter forming the building blocks for the former36. Figure 1c, d present the global and local explanations, mapping the top-30 most important features in PAEE prediction, while full models are illustrated in Supplementary Fig. 5. Unpacking constituent features of the five domains, the horizontal bars in panel c are colour-coded by specific feature domains and display relative importance of features in descending order of mean absolute SHAP value. Age, whole body fat mass, self-reported MVPA, sex, and time spent watching TV remained the top features contributing to population-level prediction of PAEE in the global model. In the local models, the magnitude of influence and directionality of a specific feature to the overall model are shown for every individual of the cohort. This is represented by the position and the gradient of colour (blue to pink) of each dot in panel d. Generally, a lower SHAP (blue) may drive overall prediction either towards higher PAEE or lower PAEE, while higher values (pink) can push the prediction in the opposite direction. For some features, the directionality may not be consistently similar for all individuals within the study. For example, among lifestyle factors, lower self-reported MVPA minutes per day mostly drives the prediction towards lower PAEE, while higher MVPA minutes mostly in the opposite direction. Less sedentary time (watching TV, computer use and playing computer games), and shorter sleep duration all drove the prediction towards higher PAEE and vice versa. While an inactive lifestyle (lower daily time in exercise activities, walking for pleasure, strenuous sports, heavy DIY and light DIY) contributed to lower PAEE prediction. Among socio-demographics, being younger, female, occupations with lower daily times in sedentary work, heavy manual or physical work and occupations with lower daily times walking or standing all drove the prediction towards higher PAEE; whereas having a college or university degree, and lower time spent at the current address pushed towards lower PAEE prediction. Among physical environment predictors, residing nearer to retail services predicted higher PAEE. Higher street betweenness centrality (a measure of the number of shortest paths between local streets passing the study participant’s home address, and an indicator of traffic congestion) and mean angular distance (a measure of the difficulty of accessing all destinations within an area) predicted lower PAEE. Living in a neighbourhood with higher density of PA facilities pushed the prediction towards higher PAEE. Higher housing density, PM2.5 exposure and neighbourhood deprivation contributed to lower PAEE predictions, reflecting various disincentives of getting out. Higher whole body fat mass and waist-hip-ratio were the key anthropometric features driving lower PAEE predictions. Among features in the health domain, elevated pulse rate; long-standing illness, disability or infirmity; slow gait speed; poor reaction time and visual episodic memory contributed to lower PAEE.

For the PAEE attributable to moderate to vigorous physical activity (MVPA), percentage SHAP contributions to prediction across lifestyle, socio-demographics, physical environment, anthropometry and health domains were 28.3%, 27%, 16.9, 14% and 13.8% respectively (Fig. 2a). Contributions to prediction by key sub-domains of the physical environment domain are shown in Fig. 2b. Similar sets of features were selected in our models explaining relative global absolute and local directional contributions (Fig. 2c, d; Supplementary Fig. 6). Among the top five predictors, older age, higher whole body fat mass and lower daily time in self-reported MVPA, walking for pleasure and exercise activities drove predictions towards lower PAEE attributable to MVPA.

Fig. 2. The impact of the input features on the prediction of the proportion of PAEE from MVPA.

Fig. 2

The explanations are based on the CatBoost models with 57 input features. a Bar chart of percentage SHAP contribution of the input features by different domains. b Bar chart of percentage SHAP contribution of the input features by different sub-domains of physical environment. c Bar chart of the mean absolute SHAP value enabling global explanation for the top 30 input features. The y axes represent the input features ordered by descending mean absolute SHAP value. d Beeswarm plot of the SHAP value for local explanation for the top 30 input features. Each dot represents the impact of a feature on the prediction of the proportion of PAEE from MVPA for an individual in the study. The colours represent feature values, with a brighter pink hue representing a higher feature value, whereas a lighter blue hue denotes a lower feature value. Dots to the right represent participants with feature values that pull the prediction towards a higher proportion of PAEE from MVPA, whereas dots to the left represent participants with feature values that drag the prediction towards a lower proportion. The x axis shows the positive or negative impact on the model’s prediction of the feature. MVPA moderate to vigorous intensity physical activity, PAEE physical activity energy expenditure, SHAP SHapley Additive exPlanations.

Tree-based machine learning models can also capture underlying non-linear relationships. Plotting SHAP values against the distribution of important features, we found that older age, higher whole body fat mass and higher pulse rate contribute to lower PAEE (Fig. 3a, b, d). Within the lifestyle domain, we found that more time spent on self-reported MVPA contributes to higher PAEE in the range between 0 and 200 minutes per day (Fig. 3c). Above the threshold of 200 minutes per day, PAEE prediction largely remains flat. There was an overall negative trend between street betweenness measured at a scale of 800 m and PAEE (Fig. 3e). For a proportion of participants, betweenness contributed to higher PAEE, indicating the protective contributions of centrality and walkable communities, whereas for the remaining, these benefits would have been obscured by negative environmental externalities associated with central locations (e.g., overcrowding). Among the physical environment features, there was a negative non-linear relationship with distance to retail services; residing farther away from retail service agents contributed to lower PAEE (Fig. 3f).

Fig. 3. Non-linear relationship between SHAP value and key domain features on prediction of PAEE.

Fig. 3

Six examples of dependence plots showing the effect of the most important feature in each feature domain on the prediction of PAEE. Dependence plots are shown for age in the domain of socio-demographics (a); whole body fat mass in the domain of anthropology (b); self-reported MVPA in the domain of lifestyle (c); pulse rate in the domain of health (d); and betweenness and retail service agent in the domain of physical environment (e, f). MVPA, moderate to vigorous intensity physical activity, PAEE, physical activity energy expenditure, SHAP, SHapley Additive exPlanations.

City-level explanations

Rerunning individual models for the 18 UK cities, the top twenty predictors were further mapped for each city in terms of the mean absolute SHAP contribution to predicted PAEE. Figure 4 illustrates the waffle chart of city-wide feature rankings of relative importance, wherein; the sorting has been frozen to the overall order obtained in the main analysis of Fig. 1c. Local explanations showing the magnitude and directionality of top-20 most important features contributing to PAEE prediction are illustrated in Supplementary Fig. 7. Within the lifestyle domain, self-reported MVPA minutes per day and sedentary time (watching TV, computer use) remained top twenty features explaining PAEE prediction across all cities, while daily time in exercise activities and walking for pleasure remained important predictors in 17 cities. Important physical environment features explaining PAEE included residential proximities to restaurant/cafeteria (Manchester, Glasgow, Edinburgh, Stoke, Newcastle, Nottingham), GP practice surgery or clinic (Edinburgh, Bury, BARTS, Middlesbrough, Hounslow), density of educational institution (Manchester, Bristol, Sheffield, Liverpool, Middlesbrough, Birmingham) and neighbourhood deprivation (Manchester, Glasgow, Edinburgh, Newcastle, Bristol). Other important contextual physical environments included noise level (Manchester, Bristol, Croydon), area under natural greenspace (Edinburgh, Reading, Nottingham), and density of PA facilities (Bury, Sheffield, Liverpool). Top 20 predictors related to street network configurations included diversion ratio (Edinburgh, Newcastle, BARTS, Liverpool, Hounslow), betweenness (Manchester, Sheffield, Liverpool) and mean angular distance (Stoke, Leeds, Middlesbrough, Hounslow).

Fig. 4. The impact of the top 20 features on the prediction of PAEE by cities.

Fig. 4

The explanations are based on the CatBoost models with 57 features trained on UK Biobank participants from each city-cluster. Bar chart of the mean absolute SHAP value trained on participants from 18 cities. The x axes represent the input features ordered by descending mean absolute SHAP value (from left to right). kJ/kg/day kilojoules per kilogram per day, M mean, n number of participants in each city-level model, SD, standard deviation, SHAP, SHapley Additive exPlanations.

Individualised explanations

The waterfall plots in Fig. 5 visualise a set of features in ascending order of importance in driving predicted individual PAEE upwards or downwards, relative to the background cohort population for three participants across different PAEE and MVPA thresholds.

Fig. 5. Individualised prediction.

Fig. 5

Waterfall plots showing the cumulative effects of sequentially introduced positive and negative values for a participant who had high PAEE and a high proportion of PAEE from MVPA, b a participant who had high PAEE and a low proportion of PAEE from MVPA, and c a participant who had low PAEE and a low proportion of PAEE from MVPA. E[f(X)] is the model output for the background population. f(x) is the individualised model output for a participant. If f(x) is smaller than E[f(X)], the participant has a PAEE lower than the background population. Contrarily, if f(x) is greater than E[f(X)], the participant has a PAEE higher than the background population. Each arrow represents how a specific feature increases (red) or decreases (blue) the participants’ PAEE. PAEE, physical activity energy expenditure, pct, percentile.

Participant A is a 64-year-old man. The combined effect of participating in strenuous sports (upper-5th percentile), self-reported MVPA (upper-15th percentile), low whole body fat mass (bottom-20th percentile), normal pulse rate (bottom-25th percentile), fast reaction time (bottom-20th percentile), absence of long standing illness, disability or infirmity, engaging in few sedentary behaviours (TV watching for 2 h per day, and not engaging in computer games and sedentary work), and residing in a neighbourhood with low PM2.5 (bottom-10th percentile) in the multi-factorial characterisation model resulted in a higher PAEE prediction (f(X) = 48.7) compared to the overall mean in the population model (E(f(X)) = 41.6). Not participating in exercise activities, limited participation in pleasure walking (bottom-40th percentile), and having a sleep duration of 8 h per day (upper-30th percentile) reduced her PAEE prediction. Participant B is a 56-year-old woman. She participates in heavy DIY (top 10th percentile), has low whole body fat mass (bottom-25th percentile), has no long-standing illness/disability/infirmity, and engages in few sedentary behaviours (TV watching for 2 h per day, and not engaging in computer games or use). These all contributed to her having a higher PAEE prediction compared to the population. Living in a neighbourhood with a lower level of betweenness (bottom-5th percentile) and lower PM2.5 exposure (bottom-20th percentile) also contributed positively to PAEE prediction for her; but limited engagement in MVPA (bottom-10th percentile), not engaging in exercise activities, and relatively high pulse rate (upper-30th percentile) reduced her PAEE prediction. Participant C is a 72-year-old man with a lower PAEE prediction (f(X) = 28.8) relative to the background population (E(f(X)) = 41.6). Slow gait speed, high pulse rate (upper-10th percentile), limited self-reported MVPA (bottom-25th percentile) and walking for pleasure (bottom-40th percentile), not engaging in exercises, high waist-hip-ratio (upper-30th percentile), long hour spent on TV watching (7 h per day; upper-5th percentile), having a slow reaction time (upper 15th percentile), residing in a deprived neighbourhood (Townsend index = upper-5th percentile) with close proximity to fast food outlet/takeaway (bottom-5th percentile), all contributed to his low PAEE prediction; however, a moderate level of whole body fat mass (50th percentile) and not having long standing illness, disability or infirmity contributed positively to his PAEE.

Rerunning the CatBoost regressor with the imputed dataset for 96,636 participants produced equivalent results as in our primary analysis. We observed that with a larger sample size, convergence to optimum prediction was achieved with a lesser number of predictor features. For PAEE, the lowest RMSE value was achieved at 9.9 kJ/kg/d (95% CI: 9.8, 10.1) with 51 selected features, 49 of which were also selected in the main analysis. (Supplementary Table 2). For the proportion of PAEE from MVPA, the lowest RMSE value was achieved at 9.5% (9.5%, 9.6%) with 47 features, and these were consistently selected in the main analysis (Supplementary Table 3).

Discussion

We developed explainable machine learning models leveraging the largest accelerometer-derived PA dataset from the UK Biobank and 137 multi-domain features for 53,614 adults to predict and explain overall PAEE and proportion attributable to MVPA. Our models were able to map and explain the most impactful features by measuring the magnitude and directionality of their relative contributions to prediction. Overall, for PAEE, lifestyle features contributed 35.7% of population-level prediction, socio-demographics 28%, and physical environment 13.5%. For PAEE attributable to MVPA, lifestyle contributed 28.3%, socio-demographics 27%, and physical environment 16.9% to the prediction. Previous epidemiological studies have reported statistical associations between predictor features and PA, and our results largely corroborate this evidence as well as provide newer insights in terms of accounting for a wider range of multi-domain predictor features, mapping domain-specific contributions to prediction, exploring non-linear relationships as well as individualised explanations of PAEE.

Explainable machine learning enabled us to include a range of lifestyle, sociodemographic and physical environment features and identify the top-most important predictors. Our study was informed by previous studies in the cohort and prior literature. Our models included 14 lifestyle-level predictors of PAEE informed by a prior UK Biobank study37 plus other predictors related to smoking, alcohol consumption, sleeping traits, and eleven dietary features. Lifestyle factors such as active lifestyle behaviours (self-reported MVPA minutes per day, daily time in exercise activities, walking for pleasure, strenuous sports, heavy DIY), sedentary time (time spent watching TV, computer use and playing computer games), and sleep duration were top features predicting PAEE and its proportion attributable to MVPA. These results corroborate prior evidence showing a positive association of mobility-encouraging activities with PAEE increment28, and inverse associations between sedentary behaviour38 and sleep duration39 with energy expenditure. Socio-demographics, including age, sex, minutes per day in specific job type (sedentary work, heavy manual or physical work, walking or standing work), and educational level, were found to be the key predictors of PAEE. Prior evidence from the UK Biobank has been consistent, showing that the mean acceleration vector magnitude declined by 7.5% per decade of age and remained lower in men as compared to women16. The observed gradual decline of energy expenditure with aging is plausibly related to tissue metabolism40. Our results also confirm previous UK-based findings from the Fenland study of higher energy expenditure among people in energy-demanding occupations relative to their sedentary counterparts14. The inverse relationship between educational attainment and predicted PAEE is consistent with previous findings that more educated people derive less PA from their commutes41. Predictive built environment features included proximity to retail service agents, street betweenness (a measure of connectivity), density of PA facilities, density of housing, exposure to PM2.5 and neighbourhood deprivation. Previous studies have reported that residential proximity to points of interest such as grocery stores24 and supermarkets23 facilitate active daily travel. A higher number of PA facilities within a residential catchment has also been associated with more minutes of accrued MVPA per day42. The influence of destination density on walking behaviour is commonly assumed, making ‘mixed land-use’ a standard ‘tick-box’ item on place-based health impact assessments12. We were able to verify this with accelerometer data. Higher local-scale (800 m) betweenness centrality of a person’s place of residence in relation to the neighbourhood road grid may serve as a proxy for both activity-promoting and inhibiting neighbourhoods. A suburb with high betweenness may indicate a compact, well-designed and walkable community promoting active living. While in a high-density neighbourhood, betweenness may plausibly be a proxy for crowdedness, traffic intensity and poor perception of safety43, suppressing the protective contributions of good design and discouraging PA, as observed in our data. The beeswarm plots and dependence plots in explainable machine learning help deconstruct how underlying nuances at the individual level constitute building blocks for population-level non-linearity. In other words, it enables us to succinctly disaggregate overall population-level (global) explanations into individual-level (local) positive and negative contributions within the cohort. A similar non-linear association was observed between housing density and PAEE, suggesting that up to a point, housing density provides more opportunities for PA (social visits, more vibrant commercial centres), but that beyond the inflection point, crowding, security and anomie take over as negative influences on physical activity44. Previously, a US study found that higher residential density was associated with the purpose of walking (such as recreational, transport) but not the overall PA45. Another study from Metro Vancouver and Metro Portland reported that traffic hazards and safety may constitute obstacles to PA in high-density neighbourhoods relative to those of lower density46. Our evidence reemphasises that higher residential density alone is not the panacea towards a more active lifestyle. Relatedly, there has been growing attention on exploring the composite walkability index of multiple types of urban features, including residential density, which was found to be associated with moderate levels of PA47. How density can be configured with other attributes of built and natural environments to create multi-functional compact communities that can promote PA deserves more attention. As expected, both PM2.5 and neighbourhood deprivation drove the prediction towards lower PAEE. Prior evidence from this cohort has consistently reported positive associations between mean accelerations and number of PA facilities and walkability, while negative associations with PM2.5 and neighbourhood deprivation were found48. Higher whole body fat mass and waist-hip-ratio predicted lower PAEE due to low PA engagement among obese individuals, as previously reported14. This also corroborates previous findings from the cohort that body mass index and body fat percentage were inversely associated with survey-based PA49. The observed decrement in energy expenditure with weight loss can be attributed to altered skeletal muscle50. Among individual health factors, the positive predictive PAEE contribution of lower resting pulse rate may be a response to enduring exercises51, although a lower heart rate may also be associated with heart-rate-lowering drug use, thereby acting as a proxy of cardiovascular conditions such as myocardial infarction52. Our models were able to adjust for cardiovascular disease by including it as a predictor feature. Illness, disability or infirmity, and slow gait speed may be markers of frailty and constitute barriers to mobility due to greater activity-induced energy cost in older adults53.

Our population-level findings, whilst confirmatory of previous work, integrate these findings in a novel way and demonstrate the complex interplay across multi-domain predictors in explaining variation in individual energy expenditure. Our reported domain-specific contributions to PAEE explainability demonstrate the synergy and trade-offs across the five domains in influencing PAEE. This is important for holistic healthy city policy, informing the design of effective and efficient interventions to promote active living as well as protecting against sedentary lifestyles and obesogenic environments. The motives and barriers to engaging in an active lifestyle depend on socio-demographic factors, physical environment and individual health vulnerabilities. City planners and designers, on the other hand, can co-locate activity-promoting facilities and services to constitute multifunctional compact communities, thereby providing a quality environment which can encourage engagement in an active lifestyle. Apart from linear associational studies, a few prior studies have examined potential non-linearity in the associations between built environment and health19,54. From a policy perspective, such details enable development of prescriptive policy thresholds for urban interventions. The IPEN adult study of 14 cities in ten countries54, for example, used generalised additive mixed models to examine nuanced non-linear associations between probability of walking for transport and urban design variables with an objective of identifying inflection points or minimum thresholds for these variables beyond which they may promote walking, thereby informing/refining existing policies. The dependence plots in XML approach can consistently confirm such non-linearity by identifying and visualising how the relative contributions of each predictor feature to PAEE for every cohort participant, and how they combine to produce global (population-level) explanations. Besides providing overall population-level explanations of PAEE for the cohort, the XML approach can also decipher city-specific and individual-level explanations which have thus far not been possible using conventional approaches. These multi-level nuances in PAEE explanations are crucial in informing strategies and policies at population-, city- and individual-levels.

Our city-scale analysis identified contextual differences in the relative importance of key predictors explaining PAEE across cities. Among the contextual environmental features, in the London borough of Croydon, residing in close proximity to GPs and clinics, post offices, and community services may be a proxy for a walkable community, predicting higher PAEE. While in Bristol, higher density of educational institutions, neighbourhood deprivation and noise level all pushed towards lower PAEE prediction. In Liverpool, higher density of PA facilities predicted higher PAEE, while higher betweenness, traffic intensity on the nearest road and higher density of educational institutions predicted lower PAEE. These results can provide guidance for geographically and socially contextualised place-based planning interventions, investments and policies for active travel and living. The observed variations in the relative importance of features to PAEE predictions across cities (Fig. 4) reflect the complex interactions between population characteristics of individual residents, environmental exposures, socio-cultural norms and existing health-specific policies with the potential to influence active living in a city. The city-scale variations observed within the physical environment domain may also reflect that beyond accessibility, actual usage of urban environments, for example, public space in a city, depends upon factors such as quality and vitality, which form an individual’s environmental perception of a place. Local models present the relative importance of each predictor feature measured for each individual residing in a specific city, which constitute building blocks for city-specific averages. Though the models comprised a more rigorous set of predictor features than have been previously accounted for, we don’t rule out residual confounding associated with potential unmeasured variables and their interactions.

Our individualised explanations, which identify weighted sets of predictive features unique to individuals, provide further insights. The illustrated difference in PAEE prediction profiles between individuals with high, medium and low PAEE (Fig. 5) illustrates the value of targeted precision strategies for improving PA. Specifically, these multi-domain individualised explanations can help optimise behavioural and clinical interventions. For participant A, at the higher end of PAEE and MVPA, our model predicted a PAEE of 48.7 kJ/kg/d, 62% of which was attributable to MVPA. He achieved the better-than-mean prediction by a combination of regular strenuous sports, a healthy lifestyle such as low sedentary time and residing in an activity-friendly environment with low PM2.5. For participant B, also on the higher end of PAEE but with a lower MVPA proportion of 18.5%, our model interestingly predicted a higher than the upper tertile of the PAEE value at 46.1 kJ/kg/d; roughly equivalent to participant A. But importantly, this was achieved by a different mix of factors: a limited MVPA, no exercise activities; but less sedentary time, undertaking heavy DIY, and residing in a neighbourhood with a low level of betweenness and low PM2.5 exposure. The latter activities and physical environments had a compensatory effect, being able to compensate for the absence of exercise activities (in the form of high MVPA), with multiple low-intensity activities in daily routines. For participant C, however, compensatory factors are not present: a sedentary lifestyle (TV watching for 7 h per day), high waist-hip ratio and pulse rate, slow gait speed, residing in a highly deprived neighbourhood, and a non-exerciser all contributed to low predicted PAEE. These results illustrate the need for coordinated multi-domain interventions targeting individual (motivational), community (amenity enrichment), built environment (planning), and policy-led (health education) mechanisms to leverage more PA in cities. They also highlight the urgent necessity of customising interventions based on the needs of vulnerable groups55.

Of particular interest is the compensatory effect, that is, individuals not engaging in high-intensity PA can still achieve higher PAEE levels through engagement in low-intensity PA. Evidence shows that as much as 89% of body movements can be attributable to ambulation, which has been classified as purpose-oriented non-exercise activity thermogenesis56. Our findings show that while social and built environment features might be down the ladder in terms of their relative individual contributions to PAEE, they can have a multiple and synergistic compensatory role in enhancing overall PAEE through higher volume of activity in the low intensity spectrum among non-exercisers. Just as a mixed and varied diet is considered to provide health benefits, so a mixed and varied PA schedule could be a realistic means of maintaining PAEE levels, with attendant health benefits. This is a novel finding with implications for creating and designing healthy cities.

Strengths of our study include its large and diverse multi-city population cohort, the use of objective PA measurement, the use of XML to identify and explain contributions to the predictions, and the inclusion of a broad range of multi-domain predictors. Estimating PA in terms of PAEE and MVPA by accelerometry reduces the impact of reporting bias. The use of XML in identifying and explaining important determinants of PAEE is innovative. Tree-based models, including categorical boosting, can capture underlying non-linear relationships and feature interaction effects with minimal assumptions regarding data distribution57. The explanations reported in the present study are generally consistent with those previously reported within the cohort. The availability of a broad range of multi-domain predictors enabled a relatively comprehensive picture of the determinants of PAEE and attributable MVPA, and their potential synergies captured in our XML models, providing a stronger evidence base for designing interventions and policies. This evidence with respect to domain-specific contributions to PAEE explanations is of importance, given the increasing use of HIAs, health-extended EIAs and other check-box methods that assume a relationship between an urban feature, PA and health. For the first time, as far as we know, our local XML analysis demonstrates the possibility of trade-offs between categories of impact assessment factors, which is likely to lead to more thoughtful application of such instruments.

Among the limitations, firstly, a cross-sectional design means the case for causal inference may not be wholly compelling. For example, we cannot completely rule out the impact of reverse causation. Secondly, machine learning approaches have been criticised for their ability to achieve high prediction at the expense of explanatory power. We hence employed XML, which goes beyond prediction, profiling the relative importance of features contributing to the predicted PAEE and MVPA. We limited the selection of features to those closely related to PA in order to minimise noise associated with high-dimensional data. Thirdly, overfitting remains a challenge in machine learning models. The selected Catboost model belongs to the family of gradient-boosting algorithms that are robust to multicollinearity between features through boosting29. Our study employed a large country-wide dataset and incorporated five-fold cross-validation and hyperparameter optimisation for optimal model tuning to minimise overfitting, though this cannot be completely ruled out. Fourth, it must be acknowledged that the accelerometry data in the UK Biobank were collected after the baseline as part of post-baseline data enhancements. The mean time lag between baseline assessments of self-reported predictor features and accelerometer-derived PAEE assessment was 5.6 years. The environmental exposure metrics were measured towards the end of baseline (built environment around 2010, air pollution in 2010, noise pollution in 2010 and Townsend’s index in 2011). We were able to ameliorate this temporal mismatch to the degree possible by measuring age and features related to health status up to the time of accelerometry assessment. UK Biobank participants had relatively stable residential histories, and the urbanisation phenomenon is mostly stabilised in the UK, yet it is likely that some of the self-reported predictors, such as those related to employment status, commute patterns and self-reported behaviours may have changed over this time lag. Fifth, it must be acknowledged that our models were developed based on the available large predominantly white UK cohort; as such, it is necessary to ascertain the external validity of our findings to diverse contexts and racial groups. The accuracy and sensitivity of PAEE may likely vary by the type of accelerometer device used (sensor type, wrist-worn, arm-worn etc58). As such, our models represent first work in capturing local optimality (UK-context), while universal optimality remains desirable. Resources must be invested to collect and share harmonised accelerometry datasets internationally58. Future studies should leverage multi-cohort datasets with harmonised variables for PAEE, lifestyle, environment and socio-demographic data to examine generalisability to other populations from diverse geographical settings, thereby strengthening the external validity of the developed machine learning approach. Sixth, our complete case analysis may be subject to bias attributed to missingness in predictor features, potentially reducing statistical power. Supplementary analysis with an imputed dataset for 96,636 participants produced consistent results with models of equivalent optimal RMSE values. Lastly, the UK Biobank is not a representative sample. Compared with the national survey data59, UK Biobank had a higher proportion of white ethnicity (94.6% vs. 91.3%) and participants remained relatively healthy, with lower mean body mass index (kg/m2) as compared with the Health Survey for England59 (27.9 vs. 28.5 in men and 27.3 vs. 28.0 in women aged 55-64) and lower prevalence of self-reported cardiovascular disease (11.5% vs. 18.5% in men and 5% vs. 15.2% in women aged 55-64) and diabetes (7.8% vs. 10.5% in men and 6.3% vs. 8.0% in women aged 55-64). Despite being non-representative, its large scale and measurements across a wide range of exposure distributions mean our results are broadly generalisable, even if the prevalence profiles are not.

In summary, applying an explainable machine learning models to national cohort data, we predicted and explained PA Energy Expenditure at population, city, and individual levels for the first time. A moderate correlation between accelerometer-measured and predicted PAEE was achieved. The use of a high-dimensional but explainable data plane enabled us to characterise the relative importance of the five key domains (lifestyle, socio-demographics, physical environment, anthropometrics and health) and measure contributions of their component predictor features to PAEE at the population and city levels. We found that lifestyle features contributed 35.7% to predicted PAEE, socio-demographics 28%, physical environment 13.5%, anthropometry 13.8% and individual health 9%. For the proportion of PAEE from moderate-to-vigorous PA, the respective contributions to prediction were 28.3%, 27%, 16.9%, 14% and 13.8%. These results, highlighting synergistic trade-offs between important predictors across five domains, are novel and have important implications for ongoing research in lifestyle medicine53, place-based planning for healthy cities11 and population health policy12. Our individualised models found that similar levels of PAEE can be achieved via different factor mixes, implying that healthy lifestyle and physical environment may encourage higher volume of low-intensity (light) PA among non-exercisers, thereby compensating for high-intensity PA prevalent among exercisers. This is under-emphasised or ignored in studies and practice and has not been examined systematically at such a large scale before. We suggest leveraging a mix of context-specific multi-level strategies, including individual- (motivational), community- (amenity enrichment), built environment- (planning and design), and policy- (health education) levels for promoting an active lifestyle.

Methods

Study design and setting

This cross-sectional study involved N = 53,614 individuals from the UK Biobank living in 18 cities for which accelerometer-measured PA data were available. UK Biobank sent out 240,000 invitations to participants with valid email for the accelerometer study over 2013 to 2015, of which >100,000 consented, yielding a response rate of 44%16. Participants were extensively phenotyped using questionnaires, anthropometry, cognitive tests, and detailed objective assessment of their residential environment. Ethical approval was received by the UK Biobank from the National Health Service National Research Ethics Service (ref: 11/NW/0382) and subsequently renewed on a 5-year cycle (refs: 16/NW/0274 and 21/NW/0157). We further obtained institutional ethical approval from The University of Hong Kong’s Human Research Ethics Committee (ref: EA220302). All participants provided informed consent to participate in the study.

PA energy expenditure derived from wrist-measured acceleration

Participants were requested to continuously wear the Axivity AX3 triaxial accelerometer for a 7-day period. Accelerometers were mailed to participants, worn on the dominant wrist (including when sleeping, having a bath, engaging in water sport activities and doing heavy manual work), and then returned by mail. Tri-axial acceleration data were recorded at 100 Hz resolution within a dynamic range of ±8 g. To achieve consistent device outputs under similar conditions, the acceleration signals derived from different devices were calibrated to local gravity after compensation for ambient temperature16,60. For each individual, PAEE in kilojoules per kilogram per day (kJ/kg/day) was calculated by summing the energy expenditures from various available activity intensity categories61. Proportion of PAEE from MVPA was also calculated as the percentage of energy expenditure ≥209.8 kJ/kg/day, equivalent to three metabolic equivalents of task (METs)61. A previous validation study of this PAEE estimation method against the gold standard doubly labelled water technique had reported a low mean bias of ~6% and a Pearson correlation of 0.68 for 97 UK participants62.

Predictors developed for inclusion in XML model of PA energy expenditure

Based on previous evidence, we selected 140 features across six domains: physical (built and natural) environment, lifestyle, socio-demographics, anthropometry, health, and life stressors and social network for inclusion in XML models of PAEE (Supplementary Table 4).

Physical environment

Forty-six activity-influencing built environment features were extracted from the UK Biobank Urban Morphometric Platform (UKBUMP) database, which is described elsewhere63. This provides a comprehensive characterisation of the environment around study participants’ homes at baseline, covering green exposure, housing and destination densities, street network configuration, neighbourhood social ecology, traffic, air pollution, and so on (further details in Supplementary Table 4).

Lifestyle

Thirty-six lifestyle features were included, including smoking, alcohol drinker status, sleeping traits, activity participation, active travel behaviours, sedentary time, and diet. Sleeping traits included sleeping duration, insomnia, daytime nap, daytime dozing or sleeping, and chronotype (morning-person or not). Features related to participation in activities included self-reported MVPA, walking for pleasure, exercise activities, strenuous sports, light DIY, heavy DIY, and sports club or gym. Features related to active travel behaviours included time spent driving, transport type for travelling to the workplace, and transport type excluding journeys travelling to the workplace. Features related to sedentary time included time spent watching TV, computer use, computer games, and mobile phone use. We included 11 dietary features from the questionnaire survey. These were based on the dietary recommendation64 and prior evidence37, and included consumption of vegetables, fruit, fish, processed meat, unprocessed meat, whole grains, and refined grains, salt, sugar, dairy food and fibre.

Socio-demographics

Twenty-five socio-demographic features were selected, including age, sex, ethnicity, educational level, employment status, ownership of accommodation, number of household members, job type (involving heavy manual work, mainly walking or standing, shiftwork), frequency of travelling from home to workplace, number of vehicles and length of stay in current residence.

Anthropometry

Five anthropometric features were used: objectively measured obesity (body mass index ≥30 kg/m2), waist-hip ratio, whole-body fat mass, self-reported weight loss and grip strength as a proxy of muscle strength17.

Health

Seventeen features related to participants’ physical, mental and cognitive health were included. Features related to physical health included pulse rate, gait speed, exhaustion, wheeze or whistling in the chest, chest pain or discomfort, falls, experience of pain (neck or shoulder, back, and knee), long-standing illness, disability or infirmity, and chronic diseases (diabetes, cardiovascular diseases, and cancer). Depression was self-reported or ascertained from nurse-led interviews. Features related to cognitive health included reaction time (stop-go card game) and visual pair memory task (memorise and identify six pairs of cards before being electronically turned over in 5 seconds).

Life stressors & social support

Eleven features associated with life stressors and social support were included in the study. Life stressors comprised serious illness, injury or assault to self or of a close relative, death of a close relative or spouse, marital separation or divorce, financial difficulties, loneliness and mood swings. Features of social support included frequency of friend or family visits and with and without siblings. Participants were also asked if they participated in pub visits or social clubs, religious groups, and education classes at least once a week.

Predicting PA energy expenditure: feature selection and ranking

The data described above present a highly characterised model of lifestyle, socio-demographics, social, physical and personal environments experienced by each of the N = 53,614 study participants, which we used to predict PAEE. We adopted an XML-based approach under the umbrella of an ensemble framework, involving data preprocessing, feature selection, prediction, and statistical techniques to identify the best prediction models for explaining PAEE and the proportion of PAEE attributable to MVPA (Supplementary Fig. 8). Complete case analysis was adopted, with participants having missing values on one or more features being excluded. One-hot encoding was performed to convert categorical variables into binary structures prior to inputting into the ML processes. An iterative recursive feature elimination (RFE) method was used to select features.

RFE uses a greedy (wrapper model) algorithm that selects the optimal subset of features for inputting to an ML regressor. Features are introduced into the regressors, ranked iteratively based on overall model fit, with the feature of lowest ranking eliminated after each iteration65. Four tree-based ML regressors were employed, including Categorical Boosting (Catboost)66, Decision Trees67, Extremely Randomised Trees (Extra Trees)68, and Random Forest69 for prediction.

The ML process comprised iteratively inputting predictors in each of the four ML regressors. The RFE algorithm enabled selection of the optimal subset of features beyond which there was no observable improvement in prediction performance by addition of new features. Prediction performance of each of the model was evaluated based on RMSE. A lower RMSE value indicates a higher prediction performance. This feature selection process was carried out independently for each regressor. All models were ranked in the fivefold cross-validation using the KFold package to ensure robustness of estimates. The data was randomly divided into five subsets, with a model being trained on four and validated on the fifth, and this process was repeated five times, with each subset being treated as a testing set once. We selected the model achieving the lowest RMSE value.

We used the Shapley Additive exPlanations (SHAP) value to evaluate the relative contribution of each feature to the PAEE prediction. The SHAP value algorithm is based on the concept of fair allocation of credits in cooperative game theory and computes the marginal and potentially unequal contribution of each collaborating individual of a game (input features) to the outcome. SHAP values were calculated and visualised using the shap package, version 0.45.0. We employed TreeExplainer, an inbuilt algorithm devised to calculate the exact SHAP values using the internal architecture of tree-based models. It thus intuitively presents the magnitude and direction of contribution of each feature to the overall prediction, accounting for interactions with all other features36. SHAP values were used to predict global and local prediction models. Global explanations of predicted PAEE are quantified as the relative importance of features in terms of population-level mean absolute SHAP. These are presented as horizontal bar charts. Local explanations, on the other hand, quantify the contribution of each participant to the overall prediction in terms of the individual SHAP value associated with a selected feature. They thus indicate the prevalence, magnitude and direction of contribution of a feature for each individual. These are presented as beeswarm diagrams with every individual participant represented as a dot. We further optimised the parameters for the trained models based on the lowest RMSE value using the Hyperopt algorithm, a Bayesian optimisation approach employing the tree-structured Parzen estimator70. This approach optimised a couple of key parameters, including l2_leaf_reg: (2, 3, 4, 5, 6, 7, 8) and depth: (4, 5, 6, 7, 8, 9, 10). We further calculated the percentage global SHAP contribution for each of the five domains to explore domain-specific contributions to the prediction as below:

Domainspecific%SHAP=∑1−nSHAPd∑1−NSHAP×100 1

where SHAPd represents the global SHAP value of a feature of domain d, while n and N are the number of domain-specific features and the total number of features respectively. To further understand the contribution of specific physical environments to the PAEE predictions, we additionally calculated the percentage global SHAP contribution for six sub-domains of physical environment (distance, street network, density, greenspace, pollutants, and neighbourhood deprivation). We analysed the non-linear effect of selected features on predicted PAEE by developing dependence plots showing variation of SHAP contribution of the features against the continuum of feature values for all participants.

We further reran models for each of the 18 UK cities to explore the relative importance of features for PAEE predictions at city-level. The beeswarm plots showing local SHAP explanations for the top twenty features across each city were presented.

We then used XML to develop individualised PAEE models using waterfall plots. These plots visualise how each feature, in order of relative importance, contributes positively or negatively to the expected model output in the individualised predicted PAEE of an individual relative to that of the background population of the cohort. Three participants were selected to illustrate individualised predictions: one chosen for a high PAEE (upper tertile) and high proportion of PAEE derived from MVPA (upper tertile); a second selected for high PAEE and low proportion of PAEE from MVPA (bottom tertile); and a third, for low PAEE and low proportion of PAEE from MVPA. To account for missingness in predictor features, we performed multiple imputation by chained equations using ‘miceforest’ to impute for missingness across the features for 96,636 participants with complete data on the outcome variables. In the regressor with the best fit, all the predictors and the outcome variables served as input parameters for the respective imputations.

Supplementary information

Acknowledgements

The research used the UK Biobank resource (approved application number: 11730). Lai was funded by the University Research Committee Postdoctoral Fellowship (URC-PDF Project: 2311101555) of The University of Hong Kong. Sarkar acknowledges funding support from the Sino-British Fellowship Trust Visitorships. Gallacher acknowledges funding from the Medical Research Council: MR/T033377/1 award for the Dementias Platform UK. The machine learning computation work reported in this study was performed using High Performance Computing facilities (HPC-2021) offered by Information Technology Services of The University of Hong Kong.

Author contributions

C.S. and K.Y.L. contributed to the concept and design of the study. K.Y.L. and S.K. contributed to the data cleaning and pre-processing. K.Y.L. contributed to coding and data analyses with inputs from C.S. K.Y.L. prepared the first draft of the manuscript. All authors participated in the interpretation of the data. C.S., C.W., K.Y.L. and J.G. contributed to critical revision of the manuscript. C.S. supervised the work. All authors read and approved the final paper.

Data availability

Data cannot be shared directly due to the material transfer agreement from the UK Biobank. UK Biobank data, including linked environmental exposure metrics, are available from the UK Biobank at: https://www.ukbiobank.ac.uk/ for researchers who meet the criteria for access to de-identified data. The built environment metrics of UKBUMP were developed by the authoring team based at The University of Hong Kong and linked to the UK Biobank.

Code availability

Custom analysis sample code is available at GitHub https://github.com/kyylai/PAEE with a Zenodo deposit (https://doi.org/10.5281/zenodo.21768572)71.

Declarations

Competing interests

Gallacher was a member of the UK Biobank Steering Group until 2023. The remaining authors declare no competing interests.

Supplementary information

The online version contains supplementary material available at https://doi.org/10.1038/s44437-026-00014-1.

Footnotes

Publisher’s note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

References

  • 1.Rydin, Y. et al. Shaping cities for health: complexity and the planning of urban environments in the 21st century. Lancet379, 2079–2108 (2012). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 2.Sarkar, C. & Lai, K. Y. Urban built environments: interventions for reducing cardiometabolic risks. Nat. Rev. Endocrinol.19, 315–316 (2023). [DOI] [PubMed] [Google Scholar]
  • 3.Cleven, L., Krell-Roesch, J., Nigg, C. R. & Woll, A. The association between physical activity with incident obesity, coronary heart disease, diabetes and hypertension in adults: a systematic review of longitudinal studies published after 2012. BMC Public Health20, 726 (2020). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 4.Lavie, C. J., Ozemek, C., Carbone, S., Katzmarzyk, P. T. & Blair, S. N. Sedentary behavior, exercise, and cardiovascular health. Circ. Res.124, 799–815 (2019). [DOI] [PubMed] [Google Scholar]
  • 5.Wahid, A. et al. Quantifying the association between physical activity and cardiovascular disease and diabetes: a systematic review and meta-analysis. J. Am. Heart Assoc.5, e002495 (2016). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 6.Kerr, J., Anderson, C. & Lippman, S. M. Physical activity, sedentary behaviour, diet, and cancer: an update and emerging new evidence. Lancet Oncol.18, e457–e471 (2017). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 7.Paluch, A. E. et al. Daily steps and all-cause mortality: a meta-analysis of 15 international cohorts. Lancet Public Health7, e219–e228 (2022). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 8.Strain, T. et al. National, regional, and global trends in insufficient physical activity among adults from 2000 to 2022: a pooled analysis of 507 population-based surveys with 7.5 million participants. Lancet Glob. Health12, e1232–e1243 (2024). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 9.Ding, D. et al. The economic burden of physical inactivity: a global analysis of major non-communicable diseases. Lancet388, 1311–1324 (2016). [DOI] [PubMed] [Google Scholar]
  • 10.World Health Organization. Global action plan on physical activity 2018–2030: more active people for a healthier world. Report No. 9241514183 (World Health Organization, 2019).
  • 11.NHS England. Putting health into place: introducing NHS England’s healthy new towns programme (NHS England Publications, 2018).
  • 12.NHS London Healthy Urban Development Unit. HUDU Planning for Health Rapid Health Impact Assessment Tool (2019).
  • 13.Bauman, A. E. et al. Correlates of physical activity: why are some people physically active and others not? Lancet380, 258–271 (2012). [DOI] [PubMed] [Google Scholar]
  • 14.Lindsay, T. et al. Descriptive epidemiology of physical activity energy expenditure in UK adults (The Fenland study). Int. J. Behav. Nutr. Phys. Act.16, 126 (2019). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 15.Sahlqvist, S., Song, Y. & Ogilvie, D. Is active travel associated with greater physical activity? The contribution of commuting and non-commuting active travel to total physical activity in adults. Prev. Med.55, 206–211 (2012). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 16.Doherty, A. et al. Large scale population assessment of physical activity using wrist worn accelerometers: the UK Biobank study. PLoS ONE12, e0169649 (2017). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 17.Kim, Y. et al. Adiposity and grip strength as long-term predictors of objectively measured physical activity in 93 015 adults: the UK Biobank study. Int. J. Obes.41, 1361–1368 (2017). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 18.Kepper, M. M. et al. The neighborhood social environment and physical activity: a systematic scoping review. Int. J. Behav. Nutr. Phys. Act.16, 124 (2019). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 19.Sarkar, C., Webster, C. & Gallacher, J. Association between adiposity outcomes and residential density: a full-data, cross-sectional analysis of 419 562 UK Biobank adult participants. Lancet Planet. Health1, e277–e288 (2017). [DOI] [PubMed] [Google Scholar]
  • 20.Sallis, J. F. et al. Physical activity in relation to urban environments in 14 cities worldwide: a cross-sectional study. Lancet387, 2207–2217 (2016). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 21.Roux, A. V. D. et al. Availability of recreational resources and physical activity in adults. Am. J. Public Health97, 493–499 (2007). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 22.Chaix, B. et al. Active transportation and public transportation use to achieve physical activity recommendations? A combined GPS, accelerometer, and mobility survey study. Int. J. Behav. Nutr. Phys. Act.11, 124 (2014). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 23.Gunn, L. D. et al. Identifying destination distances that support walking trips in local neighborhoods. J. Transp. Health5, 133–141 (2017). [Google Scholar]
  • 24.Jiao, J., Moudon, A. V. & Drewnowski, A. Grocery shopping:how individuals and built environments influence choice of travel mode. Transport. Res. Rec.2230, 85–95 (2011). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 25.Xiao, Q., Keadle, S. K., Berrigan, D. & Matthews, C. E. A prospective investigation of neighborhood socioeconomic deprivation and physical activity and sedentary behavior in older adults. Prev. Med.111, 14–20 (2018). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 26.Saint-Maurice, P. F., Troiano, R. P., Berrigan, D., Kraus, W. E. & Matthews, C. E. Volume of light versus moderate-to-vigorous physical activity: similar benefits for all-cause mortality? J. Am. Heart Assoc.7, e008815 (2018). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 27.Smith, L., Ekelund, U. & Hamer, M. The potential yield of non-exercise physical activity energy expenditure in public health. Sports Med.45, 449–452 (2015). [DOI] [PubMed] [Google Scholar]
  • 28.Fernández-Verdejo, R., Sanchez-Delgado, G. & Ravussin, E. Energy expenditure in humans: principles, methods, and changes throughout the life course. Annu. Rev. Nutr.44, 51–76 (2024). [DOI] [PubMed] [Google Scholar]
  • 29.Leist, A. K. et al. Mapping of machine learning approaches for description, prediction, and causal inference in the social and health sciences. Sci. Adv.8, eabk1942 (2022). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 30.Farrahi, V. & Rostami, M. Machine learning in physical activity, sedentary, and sleep behavior research. J. Act. Sedentary Sleep. Behav.3, 5 (2024). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 31.Jones, P. J. et al. Feature selection for unsupervised machine learning of accelerometer data physical activity clusters–a systematic review. Gait Posture90, 120–128 (2021). [DOI] [PubMed] [Google Scholar]
  • 32.Farrahi, V. et al. Correlates of physical activity behavior in adults: a data mining approach. Int. J. Behav. Nutr. Phys. Act.17, 94 (2020). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 33.Biswas, A. et al. Identifying the sociodemographic and work-related factors related to workers’ daily physical activity using a decision tree approach. BMC Public Health23, 1853 (2023). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 34.Loh, H. W. et al. Application of explainable artificial intelligence for healthcare: a systematic review of the last decade (2011–2022). Comput. Methods Programs Biomed.226, 107161 (2022). [DOI] [PubMed] [Google Scholar]
  • 35.Rudin, C. Stop explaining black box machine learning models for high stakes decisions and use interpretable models instead. Nat. Mach. Intell.1, 206–215 (2019). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 36.Lundberg, S. M. et al. From local explanations to global understanding with explainable AI for trees. Nat. Mach. Intell.2, 56–67 (2020). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 37.Pearce, M. et al. Estimating physical activity from self-reported behaviours in large-scale population studies using network harmonisation: findings from UK Biobank and associations with disease outcomes. Int. J. Behav. Nutr. Phys. Act.17, 40 (2020). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 38.Bonn, S. E. et al. Associations of sedentary time with energy expenditure and anthropometric measures. Med. Sci. sports Exerc.50, 2575 (2018). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 39.Patterson, R. E. et al. Short sleep duration is associated with higher energy intake and expenditure among African-American and non-Hispanic white adults. J. Nutr.144, 461–466 (2014). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 40.Pontzer, H. et al. Daily energy expenditure through the human life course. Science373, 808–812 (2021). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 41.Kwaśniewska, M. et al. Socio-demographic and lifestyle correlates of commuting activity in Poland. Prev. Med.50, 257–261 (2010). [DOI] [PubMed] [Google Scholar]
  • 42.Eriksson, U., Arvidsson, D. & Sundquist, K. Availability of exercise facilities and physical activity in 2,037 adults: cross-sectional results from the Swedish neighborhood and physical activity (SNAP) study. BMC Public Health12, 607 (2012). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 43.Sarkar, C., Gallacher, J. & Webster, C. Built environment configuration and change in body mass index: the Caerphilly Prospective Study (CaPS). Health Place19, 33–44 (2013). [DOI] [PubMed] [Google Scholar]
  • 44.Lai, K. Y. et al. Calculating a national Anomie Density Ratio: measuring the patterns of loneliness and social isolation across the UK’s residential density gradient using results from the UK Biobank study. Landsc. Urban Plan.215, 104194 (2021). [Google Scholar]
  • 45.Forsyth, A., Oakes, J. M., Schmitz, K. H. & Hearst, M. Does residential density increase walking and other physical activity? Urban Stud.44, 679–697 (2007). [Google Scholar]
  • 46.Chaudhury, H., Mahmood, A., Michael, Y. L., Campo, M. & Hay, K. The influence of neighborhood residential density, physical and social environments on older adults’ physical activity: an exploratory study in two metropolitan areas. J. Aging Stud.26, 35–43 (2012). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 47.Frank, L. D., Schmid, T. L., Sallis, J. F., Chapman, J. & Saelens, B. E. Linking objectively measured physical activity with objectively measured urban form: findings from SMARTRAQ. Am. J. Prev. Med.28, 117–125 (2005). [DOI] [PubMed] [Google Scholar]
  • 48.Smith, L., Panter, J. & Ogilvie, D. Characteristics of the environment and physical activity in midlife: findings from UK Biobank. Prev. Med.118, 150–158 (2019). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 49.Bradbury, K. E., Guo, W., Cairns, B. J., Armstrong, M. E. G. & Key, T. J. Association between physical activity and body fat percentage, with adjustment for BMI: a large cross-sectional analysis of UK Biobank. BMJ Open7, e011843 (2017). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 50.Leibel, R. L., Rosenbaum, M. & Hirsch, J. Changes in energy expenditure resulting from altered body weight. N. Engl. J. Med.332, 621–628 (1995). [DOI] [PubMed] [Google Scholar]
  • 51.Huang, G., Shi, X., Davis-Brezette, J. A. & Osness, W. H. Resting heart rate changes after endurance training in older adults: a meta-analysis. Med. Sci. Sports Exerc.37, 1381–1386 (2005). [DOI] [PubMed] [Google Scholar]
  • 52.Fox, K. et al. Resting heart rate in cardiovascular disease. J. Am. Coll. Cardiol.50, 823–830 (2007). [DOI] [PubMed] [Google Scholar]
  • 53.Wert, D. M., Brach, J., Perera, S. & VanSwearingen, J. M. Gait biomechanics, spatial and temporal characteristics, and the energy cost of walking in older adults with impaired mobility. Phys. Ther.90, 977–985 (2010). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 54.Cerin, E. et al. Determining thresholds for spatial urban design and transport features that support walking to create healthy and sustainable cities: findings from the IPEN Adult study. Lancet Glob. Health10, e895–e906 (2022). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 55.Sallis, J. F. Needs and challenges related to multilevel interventions: physical activity examples. Health Educ. Behav.45, 661–667 (2018). [DOI] [PubMed] [Google Scholar]
  • 56.Levine, J. A. et al. Interindividual variation in posture allocation: possible role in human obesity. Science307, 584–586 (2005). [DOI] [PubMed] [Google Scholar]
  • 57.Qiu, W. et al. Interpretable machine learning prediction of all-cause mortality. Commun. Med.2, 125 (2022). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 58.O’Driscoll, R. et al. How well do activity monitors estimate energy expenditure? A systematic review and meta-analysis of the validity of current technologies. Br. J. Sports Med.54, 332 (2020). [DOI] [PubMed] [Google Scholar]
  • 59.Fry, A. et al. Comparison of sociodemographic and health-related characteristics of UK biobank participants with those of the general population. Am. J. Epidemiol.186, 1026–1034 (2017). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 60.van Hees, V. T. et al. Autocalibration of accelerometer data for free-living physical activity assessment using local gravity and temperature: an evaluation on four continents. J. Appl. Physiol.117, 738–744 (2014). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 61.Strain, T. et al. Wearable-device-measured physical activity and future health risk. Nat. Med.26, 1385–1391 (2020). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 62.White, T. et al. Estimating energy expenditure from wrist and thigh accelerometry in free-living adults: a doubly labelled water study. Int. J. Obes.43, 2333–2342 (2019). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 63.Sarkar, C., Webster, C. & Gallacher, J. UK Biobank Urban Morphometric Platform (UKBUMP) – a nationwide resource for evidence-based healthy city planning and public health interventions. Ann. GIS21, 135–148 (2015). [Google Scholar]
  • 64.Mozaffarian, D. Dietary and policy priorities for cardiovascular disease, diabetes, and obesity. Circulation133, 187–225 (2016). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 65.Guyon, I., Weston, J., Barnhill, S. & Vapnik, V. Gene selection for cancer classification using support vector machines. Mach. Learn.46, 389–422 10.1023/A:1012487302797 (2002). [DOI] [Google Scholar]
  • 66.Prokhorenkova, L., Gusev, G., Vorobev, A., Dorogush, A. V. & Gulin, A. CatBoost: unbiased boosting with categorical features. Adv. Neural Inf. Process. Syst.31 (2018).
  • 67.Kotsiantis, S. B. Decision trees: a recent overview. Artif. Intell. Rev.39, 261–283 (2013). [Google Scholar]
  • 68.Geurts, P., Ernst, D. & Wehenkel, L. Extremely randomized trees. Mach. Learn.63, 3–42 (2006). [Google Scholar]
  • 69.Breiman, L. Random forests. Mach. Learn.45, 5–32 (2001). [Google Scholar]
  • 70.Bergstra, J., Bardenet, R., Bengio, Y. & Kégl, B. Algorithms for hyper-parameter optimization. Adv. Neural Inf. Process. Syst.24 (2011).
  • 71.Lai, K. Y. et al. Explaining physical activity energy expenditure for active lifestyle and activity-friendly cities using machine learning-based approach. Zenodo 10.5281/zenodo.21768572 (2026). [DOI]

Associated Data

This section collects any data citations, data availability statements, or supplementary materials included in this article.

Supplementary Materials

Data Availability Statement

Data cannot be shared directly due to the material transfer agreement from the UK Biobank. UK Biobank data, including linked environmental exposure metrics, are available from the UK Biobank at: https://www.ukbiobank.ac.uk/ for researchers who meet the criteria for access to de-identified data. The built environment metrics of UKBUMP were developed by the authoring team based at The University of Hong Kong and linked to the UK Biobank.

Custom analysis sample code is available at GitHub https://github.com/kyylai/PAEE with a Zenodo deposit (https://doi.org/10.5281/zenodo.21768572)71.


Articles from Npj Exercise Medicine and Health are provided here courtesy of Nature Publishing Group

RESOURCES