RT Journal Article SR Electronic T1 Predicting lying, sitting and walking at different intensities using smartphone accelerometers at three different wear locations: hands, pant pockets, backpack JF BMJ Open Sport & Exercise Medicine JO BMJ OPEN SP EX MED FD BMJ Publishing Group Ltd SP e001242 DO 10.1136/bmjsem-2021-001242 VO 8 IS 2 A1 Seyed Javad Khataeipour A1 Javad Rahimipour Anaraki A1 Arastoo Bozorgi A1 Machel Rayner A1 Fabien A Basset A1 Daniel Fuller YR 2022 UL http://bmjopensem.bmj.com/content/8/2/e001242.abstract AB Objective This study uses machine learning (ML) to develop methods for estimating activity type/intensity using smartphones, to evaluate the accuracy of these models for classifying activity, and to evaluate differences in accuracy between three different wear locations.Method Forty-eight participants were recruited to complete a series of activities while carrying Samsung phones in three different locations: backpack, right hand and right pocket. They were asked to sit, lie down, walk and run three Metabolic Equivalent Task (METs), five METs and at seven METs. Raw accelerometer data were collected. We used the R, activity counts package, to calculate activity counts and generated new features based on the raw accelerometer data. We evaluated and compared several ML algorithms; Random Forest (RF), Support Vector Machine, Naïve Bayes, Decision Tree, Linear Discriminant Analysis and k-Nearest Neighbours using the caret package (V.6.0–86). Using the combination of the raw accelerometer data and the computed features leads to high model accuracy.Results Using raw accelerometer data, RF models achieved an accuracy of 92.90% for the right pocket location, 89% for the right hand location and 90.8% for the backpack location. Using activity counts, RF models achieved an accuracy of 51.4% for the right pocket location, 48.5% for the right hand location and 52.1% for the backpack location.Conclusion Our results suggest that using smartphones to measure physical activity is accurate for estimating activity type/intensity and ML methods, such as RF with feature engineering techniques can accurately classify physical activity intensity levels in laboratory settings.Data are available upon reasonable request. Please contact the corresponding author to request study data.