{'fraction_non_alphanumeric': 0.023660403618649965, 'fraction_numerical': 0.006263048016701462, 'mean_word_length': 5.307017543859649, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Sleep and Wakefulness State Detection in Nocturnal Actigraphy Based on Movement Information

Wrist actigraphy (ACT) is a low-cost and well-established technique for long-term monitoring of human activity. It has a special relevance in sleep studies, where its noninvasive nature makes it a valuable tool for behavioral characterization and for the detection and diagnosis of some sleep disorders. The traditional sleep/ wakefulness state estimation algorithms from the nocturnal ACT data are unbalanced from a sensitivity and specificity points of view since they tend to overestimate sleep state, with severe consequences from a diagnosis point of view. They usually maximize the overall accuracy that does not take into account the highly unbalanced state distribution. In this paper, a method is proposed to appropriately deal with this unbalanced problem, achieving similar sensitivity and specificity scores in the state estimation process. The proposed method combines two linear discriminant classifiers, trained with two different criteria involving movement detection to generate a first state estimate. This result is then refined by a Hidden Markov Model-based algorithm. The global accuracy, the sensitivity, and the specificity of the method are 77.8 %, 75.6 %, and 81.6 %, respectively, performing better than the tested algorithms. If the performance is assessed only for movement periods, this improvement is even higher.