metadata: authors: 0: author: Mulder,Joris
1: author: Hocuk,Seyit
2: author: Kilic,Talip
3: author: Zezza,Alberto
4: author: Kumar,Pradeep
count: World
docna: 0: docna: Making Time Count : A Machine Learning
            Approach to Predict Time Use in Low-Income Countries from
            Physical Activity Tracking Data
docty: Policy Research Working Paper
abstracts: cdata!: Understanding men&#x2019;s and
            women&#x2019;s time use is a key factor in addressing
            issues and formulating policies related to division of
            labor, domestic work, and related gender disparities.
            However, obtaining data on individuals&#x2019; time use
            can be difficult and costly in the context of household
            surveys. Leveraging unique survey data collected in rural
            Malawi, this study investigates the possibility of
            predicting men&#x2019;s and women&#x2019;s time
            allocation to an extensive set of activities, using sensor
            signal data captured by accelerometers. Using machine
            learning techniques, the study builds a supervised
            classification model that is trained on the accelerometer
            data and a random subset of the time use survey data to
            predict individuals&#x2019; time allocation to 12 broad
            activity groups. The model can correctly classify each
            performed activity in 76 percent of the cases. The analysis
            shows that with 40 percent of the training data, this method
            can achieve 90 percent of the maximum level of predictive
            accuracy reached in the analysis. The findings prove the
            feasibility of this methodology and offer insights for
            enhancing both survey and accelerometer data collection
            processes to build better models. Using the method can
            improve the quality of costly and difficult to obtain time
            use surveys with cheaper, yet accurate, modeled estimates,
            obtained by combining objective data from wearable devices
            with time use data collected on smaller samples.
display_title: Making Time Count : A Machine
            Learning Approach to Predict Time Use in Low-Income
            Countries from Physical Activity Tracking Data
listing_relative_url: /research/2024/06/34354320/making-time-count-machine-learning-approach-predict-time-use-low-income-countries-physical-activity-tracking-data
topicv3: Gender m1327621 615,Household Surveys m1504071 2761
publishtoextweb_dt: 2024-06-28T00:00:00Z
dois: https://doi.org/10.1596/1813-9450-10835
origu: Off of Sr VP Dev Econ/Chief Econ (DECVP)
no_of_pages: 26
author_keys: 0: author_key: NA
1: author_key: NA
2: author_key: 886702
3: author_key: 635976
4: author_key: NA
model_extractions: Policy Research Working Paper 10835 50x2030 Data-Smart Agriculture Series

# Making Time Count

A Machine Learning Approach to Predict Time Use in Low-Income Countries from Physical Activity Tracking Data _Joris Mulder Seyit Hocuk Talip Kilic Alberto Zezza Pradeep Kumar_ Development Economics Development Data Group June 2024
Policy Research Working Paper 10835

# **Abstract**

Understanding men’s and women’s time use is a key factor in addressing issues and formulating policies related to division of labor, domestic work, and related gender disparities. However, obtaining data on individuals’ time use can be difficult and costly in the context of household surveys. Leveraging unique survey data collected in rural Malawi, this study investigates the possibility of predicting men’s and women’s time allocation to an extensive set of activities, using sensor signal data captured by accelerometers. Using machine learning techniques, the study builds a supervised classification model that is trained on the accelerometer data and a random subset of the time use survey data to predict individuals’ time allocation to 12 broad activity groups.

The model can correctly classify each performed activity in 76 percent of the cases. The analysis shows that with 40 percent of the training data, this method can achieve 90 percent of the maximum level of predictive accuracy reached in the analysis. The findings prove the feasibility of this methodology and offer insights for enhancing both survey and accelerometer data collection processes to build better models. Using the method can improve the quality of costly and difficult to obtain time use surveys with cheaper, yet accurate, modeled estimates, obtained by combining objective data from wearable devices with time use data collected on smaller samples.

This paper is a product of the Development Data Group, Development Economics. It is part of a larger effort by the World Bank to provide open access to its research and make a contribution to development policy discussions around the world. Policy Research Working Papers are also posted on the Web at http://www.worldbank.org/prwp. The authors may be contacted at tkilic@worldbank.org.

_The Policy Research Working Paper Series disseminates the findings of work in progress to encourage the exchange of ideas about development issues. An objective of the series is to get the findings out quickly, even if the presentations are less than fully polished. The papers carry the names of the authors and should be cited accordingly. The findings, interpretations, and conclusions expressed in this paper are entirely those of the authors. They do not necessarily represent the views of the International Bank for Reconstruction and Development/World Bank and its affiliated organizations, or those of the Executive Directors of the World Bank or the governments they represent._ Produced by the Research Support Team
# **Making Time Count**

**A Machine Learning Approach to Predict Time Use In Low-Income Countries**

# **from Physical Activity Tracking Data**

Joris Mulder<sup>†</sup> , Seyit Hocuk<sup>+</sup> , Talip Kilic*<sup>‡</sup> , Alberto Zezza<sup>‡</sup> , and Pradeep Kumar<sup>†1</sup>

**JEL Codes:** C63, C83, J22.

**<mark>Keywords</mark>** <mark>: time use, accelerometer data, activity recognition, predictive modeling, machine learning, classification models.</mark>

1 * Corresponding author: tkilic@worldbank.org. ‡ Development Data Group, World Bank; † Centerdata, the Netherlands; + Fabory, The Netherlands. The order in which the author names appear has been randomized. This paper was produced with the financial support from the World Bank Living Standards Measurement Study (LSMS), the World Bank Research Support Budget (RSB), and the 50x2030 Initiative to Close the Agricultural Data Gap, which is a multi-partner program that seeks to bridge the global agricultural data gap by transforming data systems in 50 countries in Africa, Asia, the Middle East and Latin America by 2030.
# **1 Introduction**

“Time is Money” wrote Benjamin Franklin nearly 300 years ago (Franklin, 1748). Indeed, for welfare economists a fundamental argument in utility and welfare models, alongside command over economic resources, involves the allocation of time, most notably the quantity of time devoted to leisure and other non-work activities (Wales and Woodland, 1977; Killingsworth and Heckman, 1986; Pencavel, 1986; Fafchamps, Kebede, and Quisumbing, 2009). Labor economists for their part are increasingly focusing on understanding and valuing that portion of work that does not result in market transactions, such as work spent on domestic chores as well as on household own production (Gaddis et al., 2023; Folbre, 2021; ILO, 2013; Beneria, 1999). As part of the Agenda 2030, Sustainable Development Goal (SDG) 5 on girls’ and women’s empowerment includes a target on valuing domestic and unpaid care work, to be monitored via indicator 5.4.1, the proportion of time spent on unpaid domestic and care work, by gender, age, and location.

Global patterns in men’s and women’s time use demonstrate the existence, particularly in low-income countries, of significant disparities in the time that men and women devote to activities such as unpaid domestic and care work and activities that are more closely tied to income generation. On average, women spend at least twice as much time as men in unpaid work, and often have a higher total work burden than men, when both paid and unpaid work are considered (UNDESA, 2010). These disparities impose several constraints on women’s well-being and livelihoods. Notably, women who choose to enter the labor market must contend with serious trade-offs in terms of their own personal needs (e.g., employment, education, leisure, personal care) and those of their families. Children’s diets and nutrition-related health behaviors are heavily dependent on mothers’ time allocation to a range of economic and nutrition- and health-enhancing activities (Black et al., 2013).

Efforts to formulate policies to address issues relating to income-generating activities, time allocation of domestic work, and gender disparities require accurate data on men’s and women’s time use. The revised statistical definition of ‘work’ which includes unpaid care and domestic activities (ILO, 2013), and Sustainable Development Goal Target 5.4 to “recognize and value unpaid care and domestic work through the provision of public services, infrastructure and social protection policies” have provided additional momentum for investments in time use data collection.

These analytical objectives, and the design of effective policies and programs for addressing gender disparities in both paid and unpaid work that they aim to inform, rely on the accurate measurement of men’s and women’s time use. The existing and persisting weaknesses in individual-level data and statistics on time use (Chatzitheochari et al., 2017; Harvey and Taylor, 2000; Juster et al., 2003; Kan and Pudney, 2008; Kes and Swaminathan, 2006) are a major bottleneck hindering progress towards these policy research goals. Time use surveys or time use modules as part of multi-topic household surveys are key sources of the required data. It is most common for these surveys and modules to elicit respondents’ recollection of their activities during the reference period, typically the previous 24 hours leading up to the interview (Fisher, 2015).<sup>2</sup> The shortcomings in terms of cross-country availability, comparability, and quality of individual-level data on time use can in part be traced back to underinvestment in rigorous methodological research for the development of scalable and accurate survey methods (Daum et al., 2019; Kilic et al., 2024). Research has drawn attention to the weaknesses in the availability and quality of individual-level survey data and statistics on time use measurement (Chatzitheochari et al., 2017; Harvey and Taylor, 2000; Juster et al., 2003; Kan and Pudney, 2008; Kes and Swaminathan, 2006). Studies have emphasized the importance of developing improved survey methods for time use (Bauman et al., 2017; Buvinic and King, 2018; Charmes, 2015), particularly in low-income contexts with high prevalence of illiteracy and unfamiliarity with clock-oriented time (Seymour et al., 2020).

> 2 Time use diaries can also be self-administered, and respondents can use a paper diary or an electronic device (e.g., tablet or smartphone) and are instructed to use it to record all their activities during the reference period.

2
Against this background, this paper reports on a proof-of-concept study that aims to evaluate whether machine learning and accelerometer technology can be leveraged to accurately predict time use patterns from physical activity sensor output collected in household surveys in low-income contexts. We derive our insights from a distinctive survey of agricultural families in rural Malawi. This survey combined twice-repeated 24-hour recall-based time use data collection with concurrent sensor-driven physical activity monitoring. Our paper sits at the intersection of the research streams on time use measurement and physical activity tracking in household surveys, and the main contributions are threefold. First, we build and validate a machine learning model within our sample, by pairing the highfrequency physical activity tracking data with time use survey data for the same individuals. Specifically, we train the model for a subset of the individuals and infer the time use in the rest of the sample and compare the predicted versus observed time use outcomes. If successful and crossculturally validated, this framework offers survey practitioners the possibility of increasing accuracy in time use data while managing respondent burden by combining data from low-cost, waist-worn, inconspicuous accelerometers and time use data collection from a subsample of survey respondents. Machine learning-based imputed estimates of time allocation to specific activities can then be obtained for the part of the sample that is not part of survey data collection on time use.

Second, by combining time use and sensor data, we identify issues in recall-based time use data collection that provide motivation for improving the activity lists used in surveys and assessing the accuracy of 24-hour recall. This can potentially motivate pairing real-time physical activity tracking with real-time self-administered time use diaries, inspired by the successful experience with smartphonebased time use data collection (henceforth referred to as mobile time diaries) elsewhere in Africa (Daum et al., 2019; Kilic et al., 2024).

Third, the paper brings in evidence from a rural, low-income context regarding the feasibility and utility of physical activity tracking data collection for time use measurement – a topic that has not been the subject of previous research – based on a significantly larger sample of human subjects vis-à-vis earlier work in low-income countries. While accelerometers<sup>3</sup> are widely used to document physical activity levels for specific population groups (see Troiano et al., 2008 and Colley et al., 2011, and the studies cited therein), the vast majority of accelerometer data collection campaigns has been implemented in high-income contexts. The uses of accelerometers in low-income contexts, and specifically as part of socioeconomic surveys and development research, have been rare events, except for a handful of small-scale studies (Benefice et al., 2001; Assah et al., 2011; Christensen et al., 2012; Zanello et al., 2017; Picchioni et al., 2020; Srinivasan et al., 2020).

The paper is organized as follows. Section 2 describes the data collection steps and provides descriptive statistics of the data. Section 3 presents the methodology of data preprocessing, and the machine learning models. Section 4 discusses the results, focusing on model outcomes, model and data validation, and insights into activity patterns of various population groups. Section 5 applies the trained model on actual data to obtain the time allocation of Malawian people. Section 6 concludes and draws implications for future work.

# **2 Data**

# **2.1 The datasets**

The data used in this paper were collected in the Ntcheu and Zomba districts of Malawi in 2017 as part of a larger methodological survey experiment on measurement of agricultural labor, managed by the World Bank Living Standards Measurement Study (LSMS). This was in collaboration with the World Bank’s Gender Group, Development Research Group, the Active Living Research (ALR) team at the

> 3 See Chen et al. (2012) for a scientific review of devices and technologies from the point of view of physical activity researchers.

3
University of California, San Diego (UCSD), and Wadonda Consult. The project spanned the period of November 2016 to June 2017 and yielded a unique dataset which includes a measure of physical activity of 415 adults (>15 years old) sampled from 215 rural households across 20 enumeration areas in the two districts (Pratt et al., 2020; Friedman et al., 2023).

The physical activity tracking data collection was spread over the period of February-April 2017 and was piggybacked onto the weekly visits that were paid to these 215 households for collecting weekly individual-disaggregated data on plot-level household agricultural labor inputs throughout the 2016/17 rainy season. The field staff were trained intensively on the activity tracking component prior to the start of the fieldwork. This training was led by a team of technical specialists on physical activity tracking from the Active Living Research laboratory at UCSD, who also monitored the incoming physical activity data daily and provided feedback to the field staff on the quality of the incoming data.

During fieldwork, each adult household member that was engaged in agriculture wore a researchgrade ActiGraph physical activity tracker for a two-week period during non-sleeping hours of each day. The enumerators visited the sampled households three times during the 17 days when the accelerometers were with the participants, typically days 1 (deployment), 9 (check in) and 17 (pick up). On day 1, the enumerators explained the study objectives to the participants, obtained their consent and demonstrated how to wear the accelerometers (with a belt around their waist). Day 9 was a checkin visit, during which data were downloaded and enumerators checked on battery status and for any unusual patterns in the data (which could signal that the devices were not worn correctly). On day 17 the remaining data were downloaded, and the accelerometers returned for reassignment to subsequent participants.

The participants in the study wore an accelerometer around the waist. Physical activity can be detected using accelerometers worn on various parts of the body, such as waist (hip), ankle, or wrist (Doherty et al., 2017; Menai et al., 2017; Willetts et al., 2018). Waist and wrist are the most frequently used body locations, and both have demonstrated to be valid locations for measuring and classifying physical activity intensity and sedentary time (Romazini et al., 2012; Hildebrand et al., 2014; Chandler et al., 2015). There are a few studies about how the physical activity detection using wrist and waistworn accelerometers correlate or differ. Kamada et al. (2016) and Dieu et al. (2016) report moderateto-high correlations between acceleration values from either wrist or waist. Hildebrand et al. (2014) find that wrist-worn accelerometers produce higher output as compared to waist-worn accelerometers. Shiroma et al. (2016) conclude that the waist-worn and the wrist-worn monitors may be employed for different behaviors during the day. Waist-worn devices may measure the whole-body movements while wrist-worn devices measure most of the whole-body movements in addition to the movements being specific to wrist or upper body. Zhang et al. (2012) used a wrist-worn GENEA with a waist-worn GENEA to compare classification accuracy for physical activity into walking, running, household, or sedentary activities. They report that the results from both devices are comparable. It becomes clear from these studies that while wrist worn accelerometers may offer higher accuracy for some activities, waist-worn devices offer a suitable alternative at low cost and with low profile to collect physical activity data in low-income contexts.

Complementing the activity tracking data, each participant also responded to a 24-hour recall time use module at the second and third visit (Days 9 and 17, respectively), which was modeled after the time use module of the Women’s Empowerment in Agriculture Index (WEIA). The module intended to capture each respondent’s main and secondary activities in 15-minute intervals during the reference day, relying on a list of 26 activities (Appendix A). One of the activities ‘Plan the household’s finances or bills’ was never reported. Only 25 activities are thus used during the analyses. The time use activities broadly describe how Malawian people allocate time in their daily lives, such as ‘Farming’ and ‘Cleaning house’. The time use activities can therefore be considered as broad group activities. **Figure 1** shows the relative subdivision of the 25 activities that is derived from the number of reported minutes in the time use survey.

4
<!-- Start of picture text --> Social or religious activities<br>Farming<br>Cook or prepare food<br>Travelling and commuting<br>Eating and drinking<br>Resting<br>Hunt or gather foodstuffs<br>Personal care<br>Clean the house<br>Fetch water<br>Work for a wage<br>Household business<br>School<br>Buy food or other items<br>Look after children<br>Collect firewood<br>Household maintenance<br>Livestock<br>Make goods<br>Tv, radio, reading<br>Other<br>Provide care to adults<br>Exchange laborer<br>Exercising<br>Fishing<br>0% 5% 10% 15% 20%<br>Relative percentage<br><!-- End of picture text -->
features to train their machine learning models. High frequency data may aid in predicting some activities more reliably. The study by Staudenmayer et al. (2009) showed that high frequency data can help in better predicting repetitive activities like cycling in free living conditions.

Regarding the time use data, the interviewers were trained to elicit a narrative of each participant’s reference day, establishing first when the participant woke up and went to bed, and then recording the type and timing of the activities in between, in accordance with the respondent’s recollection. The time use module allowed for the specification of both main and secondary activity for each 15-minute interval. This feature of the module aimed at capturing simultaneous activities.

Having said that, recall-based time use reports are prone to potential errors, such as bad recollection of the performed activity or attributing the activity to the wrong time interval (e.g., Bell et al., 2019). This way of labeling the data also has the caveat that simultaneous activities can get mixed (Seymour et al., 2020). Especially, for short duration activities there is a possibility that more than one activity can be performed within the 15-minute time window. Hence, overlap in the activities can lead to mislabeling the physical activity sensor signal data but also to rounding errors of the time frames in which different activities are performed.

Furthermore, the activity list for the time use module does not precisely identify tasks or activity levels but are meant to provide a broader classification of how people spend their time. For example, “Work for wage” could mean any number of different activities like working in the field (active work), in a school (less active), or in an office (near sedentary). The same applies for ‘Traveling and commuting’. Therefore, predicting some time use activities using physical activity sensor signal data can be more difficult than other, more exclusive activities like ‘Fetching water’, ‘Watching TV’, or ‘Resting’.

All these limitations can affect the performance of machine learning models. This study therefore also aims to assess the extent to which broadly grouped activities can be predicted using sensor signal data from wearable devices in combination with background information like age, gender, and the time of day.

# **3 Methods**

To achieve the goal of predicting time use activities using real-time physical activity sensor data, we leverage the power of machine learning techniques. In the past ‘vector magnitude’ methods have been employed to objectively gauge the intensity of physical activity from accelerometer data in large datasets (e.g., Mannini et al., 2013; Doherty et al., 2017; Menai et al., 2018; Kapteyn et al., 2018). More recent studies also employ machine learning methods in large scale accelerometer datasets to objectively measure specific activities (Willetts et al., 2018; Sundararajan et al., 2021; Nunavath et al, 2021; Pfeiffer et al., 2022), demonstrating the broad applicability of such methods.

Some of these studies effectively used machine learning techniques in similar contexts. For example, Willets et al. (2018) conducted an extensive study on 24-hour level physical activity on 96,220 UK Biobank participants. Utilizing a Random Forest machine learning algorithm trained on data from 132 adults, they were able to classify six distinct activities based on accelerometer data, which are bicycling, sitting/standing, walking, driving, sleeping, and mixed activities. Impressively, their model achieved an average prediction accuracy of 87 percent. Furthermore, their research highlighted variations in activity patterns on an hourly, daily, and seasonal basis among adults aged 45 to 79. In a more recent study, Sundararajan et al. (2021) employed a Random Forest model to identify sleep patterns using accelerometer data. Their model differentiated between sleep and wake states with a 74 percent score on unseen data. Moreover, by integrating their sleep detection algorithms with daytime data, they adeptly utilized machine learning to ascertain whether the accelerometer was being worn, achieving a score exceeding 93 percent. Both studies underscore the precision with which machine learning models can predict physical activities.

6
The main distinction lies in the fact that these studies primarily concentrated on specific, more easily identifiable activities, such as walking, running, driving, and sleeping. In contrast, our work, focuses on non-specific, broadly defined time allocation activities, like farming, taking care of children, working for wage, and collecting foodstuff.

# **3.1 Dataset merging**

Building a supervised machine learning model requires data on observations and relevant predictor variables. Data containing known outcomes, serving as dependent variables, are essential for model building and evaluation. We utilize the reported time use activities collected through the time use survey module as our dependent variable.

The first step in preparing the data for machine learning modeling involved merging the time use survey data with the physical activity sensor data. The sensor-based physical activity tracking study spanned over two consecutive weeks. During this period, participants were surveyed twice with 24hour recall-based surveys to gain insight into their time use activities. The amalgamation of the datasets took place on the participant level for these two days. The aggregated dataset was further augmented with demographic information of the participants as well as meta information derived from the timestamp.

Harmonizing the data registration time intervals was crucial. The physical activity sensor data were recorded at one-minute intervals, whereas the time-use data were recorded at 15-minute increments. To synchronize the datasets at a consistent granularity, the time-use data were restructured to align with the one-minute interval of the sensor data.

# **3.2 Dataset cleaning**

The combined dataset underwent cleaning, which involved discarding data points with missing or unclear information on time use activities. Subsequently, data points indicating the accelerometer was not being worn were also removed. The wearable device registers inactivity when detached from the body, such as during bathing, and the corresponding time stamps registered by the device as non-wear were marked and discarded accordingly. One additional consideration was that approximately 10 percent of the entries had reported secondary activities simultaneous with the primary activities. From a modeling standpoint, these dual activities introduce more uncertainty instead of clarity. Therefore, such entries were removed from the analysis.

Lastly, we scrutinized the minute level data to identify extreme outliers within 15-minute level epochs. The data-points deviating more than two-sigma from the sample distribution were discarded. This means that all data points diverging from the general behavior pattern of a specific activity within the 15-minute epoch were excluded from the dataset. The discarded outliers accounted for 2.6 percent of the data. The remaining data were considered suitable for the scope of the current study. The cleaned dataset comprised 388 unique participants, indicating, that 27 participants were removed during the cleaning process from the original sample size of 415 participants.

# **3.3 Feature engineering**

The raw data comprises four base variables: accelerations along three axes and the step count. Additional features were engineered from the extracted base variables of the triaxial accelerometer. In the realm of data science, a feature is a characteristic of data. These are used to enhance data analysis. In addition to the base and generated features, we incorporated extra features based on background information and on the timestamp of the time-use activities, representing the day of the week (weekday or weekend day) and segment of the day (am or pm).

We conducted a correlation analysis on the feature engineered data to avoid unnecessary growth of the data space. Correlated variables can add more weight to a variable without adding more value to a model. All highly correlated variables were identified and excluded from the dataset. A Pearson’s correlation (or anticorrelation) with a threshold _r_ -value of 0.95 was adopted.

7
The result is a set of 37 features, out of which 28 are derived features generated from the four base variables. These engineered features include the vector magnitude along the three axes, the 15-minute epoch means and standard deviations along the three axes, vector magnitude, and step count, the angles of inclination calculated from the acceleration components, like approximations of roll and pitch, and the direct products of the four base variables.

The complete list of features is summarized in **Table 1** . Appendix B provides more details on each of the features.

# **Table 1**

List of features present in the dataset.

|**Base features(4)**|**Background features(5)**|**Derived features(28)**|
|---|---|---|
|X acceleration|Age|Vector magnitude|
|Y acceleration|Gender|Angle variables(7)|
|Z acceleration|Weight|Directproducts(10)|
|Stepcount|Dayof week|Epoch means(5)|
||Time of day|Epoch standard deviations(5)|

# **3.4 Model building and evaluation**

The distribution of data points for the time use activities is skewed with respect to the number of reported minutes. Among the time use activities, 12 are reported more frequently, comprising over 90 percent of the data (see also **Figure 1** ). The remaining activities are infrequently reported; thus, their omission would not compromise the predictive model performance in ascertaining correct time use activities. Our analyses are therefore performed on the twelve major activities of the dataset only.

Nevertheless, within this subset of major activities, some are still more prevalent than others, resulting in an imbalanced dataset. Training a machine learning model on an imbalanced dataset can lead to biased results. To address this issue, we adopted a strategy of random down-sampling of the more commonly reported activities, ensuring uniform reporting instances (in terms of minutes) across all activities. The resulting dataset is then divided into a train set (80 percent) and a test set (20 percent). The train set is used to build the model, while the test set is used to evaluate its performance of the model. All data values are normalized prior to train-test splitting using a min-max scaling to give equal weights to all features.

Our analyses leverage two machine learning classifiers: Gradient Boosting and Random Forest. For Gradient Boosting, we utilize the XGBoost implementation in Python.<sup>4</sup> XGBoost is a highly effective and widely employed machine learning algorithm used in many challenging machine learning problems. By selecting a random subsample of the main dataset without replacement for each iteration, we effectively enforce the Stochastic Gradient Boosting (SGB) method. For Random Forest, we apply the scikit-learn implementation (Breiman, 2001). The Random Forest classifier is a popular machine learning model used in many scientific studies. The algorithm applies the general technique of bootstrap aggregating to tree learners, also known as bagging (Breiman, 1996).

Model performance hinges on multiple metrics. In this work, we primarily focus on prediction accuracy and the F1-score. All scores are based on the unseen test data. The F1-score represents the harmonic mean of precision and recall, optimizing for true positives of the prediction while minimizing false positives and false negatives. Since the evaluation metrics are provided on the activity level, we adopt the strict macro average class score as the ultimate measure of model performance.

> 4 https://xgboost.readthedocs.io/en/latest/python/python_api.html

8
# **4 Results**

# **4.1 Predicting time use activities**

We present the results for the two utilized predictive models, SGB and Random Forest. We find that our SGB model results in a macro average F1-score of 76 percent. Our Random Forest model results in an F1-score of 68 percent. As a basis for comparison, a random guess would result in a prediction accuracy and an F1-score of merely 8.33 percent since there are 12 balanced classes.

From our findings, we can conclusively assert the following:

1. Machine learning effectively utilizes accelerometer data to forecast time use.

2. The SGB model outperforms the Random Forest model.

Consequently, we have selected the SGB model as our best performing model, and all subsequent model results presented will pertain exclusively to the SGB model. Detailed prediction scores for the SGB machine learning model can be found in **Table 2** .

# **Table 2**

SGB model prediction scores and test set characteristics for the twelve main activities.

|**Activity**|**Set size**|<sup>**Participant**</sup><br>**s**|**Precisio**<br>**n**|**Recall**|**F1-score**|
|---|---|---|---|---|---|
|1. Social or religious activities and hobbies|2036|333|68 %|54 %|61 %|
|2. Farming|2036|199|75 %|77 %|76 %|
|3. Cook orprepare food or drinks|2036|239|56 %|69 %|62 %|
|4. Travellingand commuting|2036|316|80 %|55 %|65 %|
|5. Eatingand drinking|2036|380|68 %|55 %|61 %|
|6. Resting|2036|234|77 %|75 %|76 %|
|7. Hunt orgather foodstuffs|2036|149|79 %|86 %|82 %|
|8. Personal care|2036|345|91 %|67 %|77 %|
|9. Clean the house,wash,or iron|2036|170|79 %|93 %|86 %|
|10. Fetch water|2036|179|78 %|93 %|85 %|
|11. Work for a wage or salary|2036|37|89 %|99 %|94 %|
|12. Running or working in household<br>business|2036|40|85 %|99 %|92 %|
|Accuracy|||||77 %|
|Macro average F1-score|||||76 %|

The prediction scores demonstrate that our model accurately classifies the reported time use activities in over three-quarters of the cases, using the data from the physical activity sensor signal. To further validate the model's predictive power, we conducted a sensitivity test by varying the dataset size. As the dataset size increases, the prediction scores exhibit a positive trajectory, indicating the model's capacity to improve its performance with growing datasets. This evidence substantiates that time use activities can be reliably predicted using sensor data, effectively addressing our main research question.

For the trained eye **Table 2** also illustrates variations in prediction scores among different activities. Interestingly, despite having balanced train and test sets, the activities less frequently reported prior to the creation of the balanced dataset for analyses (see **Figure 1** ) exhibit higher prediction scores. One plausible explanation for these variations is that the more frequently reported activities also originate 9
<!-- Start of picture text --> 100<br>y=94.4-0.09x<br>90<br>®e<br>& 80<br>v r @<br>fe)<br>%<br>uo 70<br>@<br>e@<br>60 e<br>50<br>0 50 100 150 200 250 300 350 400<br>Numer of unique participants<br><!-- End of picture text -->
<!-- Start of picture text --> 100%()<br>Resting MA 3.6% 0.3% 2.7% 10% 2.0% 0.7% 5.4% 19% 2.7% 3.1% 2.0%<br>Farming 1.1% Vente 0.4% 3.7% 2.3% 4.2% 0.7% 2.8% 2.0% 2.3% 2.8% 0.8%<br>Personal care 7 29% 31% MER 2.4% 15% 2.3% 18% 71% 2.8% 2.9% 2.8% 31%<br>Cleaning 0.6% 0.6% 0.0% 92.9% Himes 0.5% 0.0% 2.4% 1.2% 0.2% 1.1% 0.2%<br>=ay Travellinglli 4 2.9%29% 0.8%8% 2.5%2.5% BER[BUREN 5.1%5.1% 3.8%3.8% 6.6.2% 2.6%6% 6,61% 4.4%M% 3.5%3.5%<br>rs] Fetching water 7 0.2% 0.4% 0.0% 1.6% 0.3% FEMME 0.3% 23% 0.9% 0.0% 0.5% 0.3%<br>. - 10%(-}<br>wi) Work for wage 0.0% 0.0% 0.0% 0.0% 0.0% 0.0% Pelee 0.0% 0.0% 0.0% 0.0% 0.0%<br>S<br>z~ Cooki. ng 3.0% 1.7% 1.0% 5.6% 1.3% 5.5% 0.3% 68.7% Beye 2.6% 3.7% 1.3%<br>Hunting 0.7% 18% 0.4% 1.0% 1.3% 1.7% 0.7% 25% MMO 1.2% 11% 16%<br>Social, religious 4.3% 3.6% 2.7% 2.3% 44% 3.0% 2.3% 12.4% Pak er 6.2% 1.7%<br>Eating 5.9% 3.1% 11% 25% 1.4% 2.5% 2.1% [BUY 3.7% 54.6% [ewe<br>Household work 7 9.9% 0.0% 0.0% 0.0% 0.0% 0.0% 0.0% 0.0% 0.0% 0.0% 0.0% FREE<br>- 0%<br>Dn Dn YW n on J) Dn oD YW mn x<br>Pe gcree oP EPR eS<br>>n EF= —UV co =O09 ©= 8& YYoofBp =DD SGOe =<br>os S& wow 2? ~ © Ss =ws<br>co uw Cc = © Dn Oo O I oO =<br>fo) O = Cc Se pa fo)<br>4 Fs ~ x<br>5 cS ic o<br>fo) ww fo) — wn<br>a O = U DS<br>uw o fe)<br>2) x=<br>Predicted activity<br><!-- End of picture text -->
in most cases. This leads us to question whether certain population groups exhibit characteristic traits in performing activities. For example, it may be that men perform cleaning in a very monotonic manner, making it easier to predict the activity for men. However, other factors also need to be considered before drawing definite conclusions. The prediction scores for the mentioned population groups are presented in **Table 3** .

**Table 3**

Gender specific model performance per activity.

|**Activity**|**Over**<br>**F1-**|**all**<br>|**Male**<br>||**Fema**<br>|**le**<br>|**Young ( <**<br>**yr.)**<br>|**30**<br>|**Old ( ≥ 30**<br>|**yr. )**<br>|
|---|---|---|---|---|---|---|---|---|---|---|
||**score**|**Np**|**F1-score**|**Np**|**F1-score**|**Np**|**F1-score**|**Np**|**F1-score**|**Np**|
|1. Social or religious<br>activities|61 %|332|67 %|152|50 %|180|62 %|15<br>7|60 %|175|
|2. Farming|76 %|199|79 %|101|72 %|98|74 %|81|77 %|118|
|3. Cook or prepare<br>food|62 %|239|68 %|34|61 %|205|64 %|11<br>3|60 %|126|
|4. Travelling and<br>commuting|65 %|317|66 %|146|64 %|171|66 %|13<br>4|64 %|183|
|5. Eating and drinking|61 %|379|61 %|167|60 %|212|65 %|17<br>3|56 %|206|
|6. Resting|76 %|234|76 %|102|76 %|132|71 %|11<br>3|78 %|121|
|7. Hunt or gather<br>foodstuffs|82 %|149|87 %|54|80 %|95|85 %|60|81 %|89|
|8. Personal care|77 %|345|77 %|149|78 %|196|80 %|16<br>2|75 %|183|
|9. Clean the house,<br>wash,or iron|86 %|170|94 %|30|84 %|140|86 %|86|85 %|84|
|10. Fetch water|85 %|179|95 %|21|84 %|158|87 %|90|83 %|89|
|11. Work for wage or<br>salary|94 %|37|93 %|28|96 %|9|96 %|14|93 %|23|
|12. Working<br>household business|92 %|40|92 %|21|92 %|19|92 %|17|91 %|23|
|All activities|76 %|388|79 %|171|75 %|217|77 %|17<br>5|75 %|213|

When evaluating population-specific prediction scores, one needs to keep in mind that the set sizes (minutes), and especially the underlying diversity of participants, as indicated by Np (number of participants), can significantly impact the scores. As previously demonstrated in **Section 4.1** with **Figure 2** , there is a noticeable correlation between prediction scores and participant diversity.

To isolate the effects of participant diversity, we apply a size correction to the population-specific prediction scores according to the earlier found linear approximation formula. Since the found relationship with participant diversity (slope) scales as 0.09, for comparing purposes, we adjust the obtained scores to a scaled score as follows: 12
<!-- Start of picture text --> 120<br>*— male<br>female<br>g 100<br>5S<br>a26 80<br>2<br>cs]oJ<br>o<br>2S 60<br>o<br>a<br>5<br>”40<br>20<br>&®=3a 2££€ Oo283soODe ‘©2 o>ePS$8 £DBDeS5 =os £aDoES£2i= vo2seno¢a<br>e o fo} > Ww cc 3° a vu oO 5 3<br>5 £ GO 8 €& § 6 ¢€¢ 2 a<br>To) i. D fa S 2 2<br>=(s) aoc 5vo PaOo Ss< So<br>wnfo) ras a iro ~~5 =o<br>= vn<br>=<br><!-- End of picture text --> <!-- Start of picture text --> 120<br>—@® young (<30)<br>te old (230)<br>g 100<br>v<br>.)°B 809<br>c<br>5=]<br>ie<br>s® 60<br>a<br>no]<br>3<br>8 40<br>20<br>2 a -8>£ Oo2 oOag£86>© p6%o tOo£ =ogeeS&S oSo€sveg.= ©& egopga<br>= 5 3 > Ww ¥ 5 | oO a 5 iw<br>° £ & & $s £6285 2B<br>= re = a) = aD no}<br>a& Pada ¢#oO Pa]iS zg= 3<br>re)5 =6 a ray2 x~ =7<br>8 %<br>2 8<br><!-- End of picture text -->
<!-- Start of picture text --> 80<br>70<br>60 oe<br>$ ee<br>o-° fee<br>v y 7=<br>1 40 / ,<br>i j y<br>30 o”<br>/<br>: full model<br>207 / —-= pure background<br>/,--- pure sensor signal;<br>10<br>| : - “6 80 100<br>Dataset size (%)<br><!-- End of picture text -->
<!-- Start of picture text --> 30 30<br>Mmm Time-use survey<br>—~ 25 mmm Predictive model 25<br>x<br>S 20 20<br>2<br>U<br>© 15 15<br>E<br>g<br>6 10 10<br>&<br>[ a<br> 55<br>00<br>wn> 2£ fo))2® ¢€¢oD F F baat5 co)§ &fo) Foo.- cD) wnyxy<br>£ rod xX = 6 6 D [o) c © gS c<br>on £& S$ TD © an ~ 5S 2 3s &<br>ra—_— Lo ° a Ww Iai) xo)° ce 2 D 6 wn2<br>—_ > " xo oD xe)<br>‘® > @ ¥Y £ 6<br>1S) = a () x =<br>fo} J ira - [)<br>Yn c )<br>3 = %<br>= lo)<br>x=<br><!-- End of picture text -->
<!-- Start of picture text --> 30 30<br>fg Male<br>= 25 MMM Female [25<br>x<br>e<br>c5 20 20<br>s<br>—© 15 15<br>co)<br>><br>+s 10 10<br>&<br>oO<br>55<br>00<br>2)2 £ 2P ef©) FFro) ba5S co)5 £Cfo} ED- co) wnB<br>2 = cv] = DS a] an (6) c © S c<br>a iS ° ov © Yn Do =_ © = ort<br>ic S 5 os 2 8<br>ce) — a oo %Z% «<br>iv)fo) =Cc uw fo)& [)n<br>S S Y<br>x= fo)<br>x=<br><!-- End of picture text -->
<!-- Start of picture text -->
* 30<br>Mm age< 30<br>—BS 25 MM age=30 7<br>c 20<br>6<br>=)<br>U<br>© 15 .<br>&<br>$<br>2s 10 .<br>&<br>oO<br>es<br>0<br>2awng €Do rsPDc =vCcP ®Cc=]DBD <aD €a =vosGv ££a=©5 wo5=$ oDwos8= gWwwna<br>= ©= 8 ©g w & 9 S C 9 5 8<br>Pa - 5<br>o oO O © Re) 5 £ = s<br>: :<br>—_ o a 5 2 3<br>&3 £3 5 ri5 2: 25<br>rv) 52 3 3<br>E<br><!-- End of picture text -->
constitutes too large a bucket including several, diverse activities. We found that some consecutively performed activities, such as fetching water, cooking, eating, and cleaning are often misclassified with each other. Since the motion patterns belonging to these activities should not be similar, the most logical conclusion is that the reported activities are overlapping in time. A key finding here is that misclassifications do not always behave symmetrically. Eating, for example, is often confused with cooking, but the opposite (cooking being confused with eating) is less common. This can be indicative of a systematic (mis)timing offset in one direction.

We evaluated potential differences by age and gender as well. In terms of predictions, we found that there are no significant differences by age or gender, after correcting for any size dependence intrinsic to the data. This suggests that the model is unbiased with respect to gender or age. When applying the model on the whole dataset, we see we pick up noticeable gendered differences in time allocation, which align well with the observed time use data.

One final interesting discovery is that background information, such as participant’s age and gender and information on the time of day and the day of week, plays a role in improving model predictions. By running multiple models with different subsets of the data as input, that is, pure sensor signal data, pure background data, and the complete data we were able to disentangle the impact of background information on model predictions. The analysis shows evidence of a fixed boost in model performance when background information is used in combination with the physical activity sensor signal data.

We conclude that it is feasible to predict time use data with high accuracy and that obtainable improvements in the quality of both time use and physical activity data collection hold promise of significantly elevating the predictive capabilities of the underlying models. Based on these results, we offer a few recommendations for the design of future data collection campaigns and suggest some priorities for future research to advance the agenda toward scalable adoption of these techniques for the integrated use of sensor data and time use survey data.

First, to reduce the possibility of misclassification it will be important to revisit the activity lists in time use modules such that the activities with broad definitions (‘Social, religious’ activities for instance) are split into multiple subcategories. Not only would this avoid ambiguity in reporting social and religious activities, thereby reducing misreporting of activities, but it would also improve the prediction of other activities. Inclusion of more disaggregated activity lists in recall-based time use modules are relatively costless exercises - since the interviewers aim to elicit respondent narratives and classify the activities in accordance with the narrative, rather than asking whether each respondent performed each potential activity in a list for a given time interval. The development of a more disaggregated activity list, however, may involve an initial investment and subsequent refinements, based on qualitative work and additional piloting. For instance, the current International Classification of Activities for TimeUse Statistics (ICATUS) is updated as of 2016 - comprising 165 activity groups, classified into 56 divisions and 9 major divisions – and still represents a manageable number of categories (UN Women, 2021). By comparison, the activity list used in this study included only 26 activity groups.

Second, a key source of misclassification, respondents’ recall, can be averted only by stepping away from recall-based time use surveys. Mobile phone apps that allow respondents to log activities in real time, particularly those with activity illustrations that are fit for low-literacy settings, offer promise to reduce recall bias (Daum et al., 2019; Kilic et al., 2024). If implemented well, mobile phone-based time use diaries, coupled with higher-frequency physical activity tracking data collection (i.e., at sub-minute data collection frequency, without additional data collection cost), can potentially improve the predictive power of machine learning models.

Future research in this area should document the predictive accuracy gains, if any, associated with using mobile phone-based time use diaries and sub-minute-level physical activity tracking data collection vis-à-vis relying on traditional, recall-based time use diaries and minute-level sensor data collection as in the case of our current paper. Fortunately, a follow-up study implemented in 2022/23 in Malawi (Kilic et al., 2024) - whose design has been informed by the analysis presented here - will 18
provide an opportunity to fill this knowledge gap. Leveraging this new data source, future research should also demonstrate whether the minimum-required training data on time use varies by whether the information is elicited through mobile phone- or recall-based time use diaries. Additionally, it will be important to replicate similar studies in different country contexts to understand the extent to which the predictive ability of the model varies in populations with different time use patterns and physical activity profiles.

19