%0 Journal Article %A Shaheen Syed %A Bente Morseth %A Laila A. Hopstock %A Alexander Horsch %T A novel algorithm to detect non-wear time from raw accelerometer data using convolutional neural networks %D 2020 %R 10.1101/2020.07.08.20148015 %J medRxiv %P 2020.07.08.20148015 %X Current non-wear detection algorithms frequently employ a 30- to 90-minute interval in which recorded acceleration needs to be below a threshold value. Such intervals need to be long enough to prevent false positives (type I errors), while short enough to prevent false negatives (type II errors), limiting their ability to achieve a high F1 score. In this paper, we propose a novel non-wear detection algorithm that eliminates the need for an interval. Rather than inspecting acceleration within intervals, we explore acceleration patterns right before and right after an episode of non-wear time. By drawing on insights from the field of activity type recognition, we propose an algorithm that uses a convolutional neural network to detect the preceding activity ‘taking off the accelerometer’ and the following activity ‘placing it back on’. We evaluate our algorithm against several baseline and existing non-wear algorithms for raw accelerometer data, and our algorithm achieves a perfect precision, a recall of 0.9962, and an F1 score of 0.9981, outperforming all evaluated baseline and non-wear algorithms. Although our algorithm was developed using patterns learned from a hip-worn accelerometer, we propose algorithmic steps that can easily be applied to a wrist-worn accelerometer and a retrained classification model.Competing Interest StatementThe authors have declared no competing interest.Funding StatementNo external funding was receivedAuthor DeclarationsI confirm all relevant ethical guidelines have been followed, and any necessary IRB and/or ethics committee approvals have been obtained.YesThe details of the IRB/oversight body that provided approval or exemption for the research described are given below:The usage of data in this study has been approved by the Data Publication Committee of the Tromso StudyAll necessary patient/participant consent has been obtained and the appropriate institutional forms have been archived.YesI understand that all clinical trials and any other prospective interventional studies must be registered with an ICMJE-approved registry, such as ClinicalTrials.gov. I confirm that any such study reported in the manuscript has been registered and the trial registration ID is provided (note: if posting a prospective study registered retrospectively, please provide a statement in the trial ID field explaining why the study was not registered in advance).YesI have followed all appropriate research reporting guidelines and uploaded the relevant EQUATOR Network research reporting checklist(s) and other pertinent material as supplementary files, if applicable.YesThe legal restriction on data availability are set by the Tromso Study Data and Publication Committee in order to control for data sharing, including publication of datasets with the potential of reverse identification of de-identified sensitive participant information. The data can however be made available from the Tromso Study upon application to the Tromso Study Data and Publication Committee. Contact information: The Tromso Study, Department of Community Medicine, Faculty of Health Sciences, UiT The Arctic University of Norway; e-mail: tromsous{at}uit.no. https://github.com/shaheen-syed/CNN-Non-Wear-Time-Algorithm https://github.com/shaheen-syed/ActiGraph-ActiWave-Analysis %U https://www.medrxiv.org/content/medrxiv/early/2020/07/09/2020.07.08.20148015.full.pdf