ONLINE-DO00020392.tex Journal of Clinical Monitoring and Computing (2005) 19: 411–414 DOI: 10.1007/s10877-005-0392-8 C© Springer 2006 ANALYSIS OF NIGHTTIME ACTIVITY AND DAYTIME PAIN IN PATIENTS WITH CHRONIC BACK PAIN USING A SELF-ORGANIZING MAP NEURAL NETWORK John J. Liszka-Hackzell, MD, PhD1 and David P. Martin, MD, PhD2 From the 1University of Arizona, Department of Anesthesiology, 1501 N. Campbell Ave., Tucson, AZ 85724, 2Mayo Clinic Col- lege of Medicine, Department of Anesthesiology, 200 1st Street SW, Rochester, MN 55905. Received April 6 2005. Accepted for publication June 22 2005. Address correspondence to John J. Liszka-Hackzell, University of Arizona, Department of Anesthesiology, 1501 N. Campbell Ave., Tucson, AZ 85724 USA. E-mail: hackzell@u.arizona.edu Liszka-Hackzell JJ, Martin DP. Analysis of nighttime activity and daytime pain in patients with chronic back pain using a self-organizing map neural network. J Clin Monit Comput 2005; 19: 411–414 ABSTRACT. There may be a relationship between sleep and pain in patients with chronic back pain. We collected day- time pain and nighttime activity data from 18 patients diagnosed with chronic back pain. The patients were followed for 6 days and 5 nights. Pain levels were collected every 90 min between 0800 hours and 2200 hours using a computerized electronic di- ary. Activity levels were collected using a wrist accelerometer (Actiwatch AW-64). The Actiwatch sampled activity counts ev- ery 1 min. Patients were asked to wear the Actiwatch on their non-dominant arm. The pain level measurements were interpolated using cu- bic splines. A mean pain level was calculated for each period 0800 hours to 2200 hours as well as for the 6-day period. The difference between the mean pain levels for the 6-day period and each 0800 hours to 2200 hours period was calculated for each pa- tient. Nighttime activity data were analyzed using the Actiwatch Sleep Analysis software. Correlations were calculated between the Actiwatch Sleep Analysis variables and the mean pain level differences for each patient and period. The correlation analysis was performed with SPSS 7.5. We were unable to show any significant relationships. A different approach to analyze the data was used. A Self- Organizing Map (SOM) Neural Network was trained using the original nighttime activity level time series from 10 randomly se- lected patients. Recall was then performed on all the activity level data. Correlations were calculated between the pain level vari- ance for the 6-day period for each patient and the corresponding difference in the SOM output coordinates. The correlation was found to be r = 0.73, p < 0.01). We conclude that daytime pain levels are not directly corre- lated with sleep in the following night and that sleep is not directly correlated with daytime pain levels on the following day in this group of patients. There appears to be a correlation between the difference in nighttime activity levels and patterns and the day- time pain variance. Patients who experience large fluctuations in daytime pain levels also show a higher variability in their night- time activity levels and patterns. Even though we were unable to show a direct relationship between daytime pain and sleep, it may be reasonable to assume that better pain control resulting in less daytime pain fluctuations can provide more stable nighttime activity levels and patterns in this limited group of patients. By using a neural network model, we were able to extract informa- tion from the nighttime activity levels even though a traditional statistical analysis was unsuccessful. KEY WORDS. activity, chronic back pain, correlation, self-organizing map neural network. INTRODUCTION Patients with chronic back pain may complain of disturbed sleep [1–3]. It is often assumed that poor sleep in this group 412 Journal of Clinical Monitoring and Computing Vol 19 No 6 2005 of patients may contribute to increased daytime pain. There may also be associations between sleep and mood, which may further affect patient’s perception of pain. Many times, patients with chronic back pain are treated with antide- pressants, often with sedative properties, in an attempt to provide better nighttime rest and secondly for improved daytime pain control [4]. Pain is a subjective experience which makes it difficult to measure and analyze. However, analysis of pain levels collected at different times from the same patient may be more easily performed. If a scale between 0 and 10 is used, the scale may not always follow linear properties. Analy- sis of pain levels collected from different patients can be more difficult, since the measurements are subjective. In this study, we have correlated pain levels with activity lev- els collected from the same patient. Sleep can be evaluated using polysomnography, however, it requires extensive preparations. It has to be performed in a laboratory environment and is expensive. More re- cently, activity monitors such as the Actigraph (Minimitter Inc.) are available for studies of sleep quality [5]. There are software packages which may be used to analyze the infor- mation from the activity monitor, and a number of sleep parameters may be derived [6–10]. Studies have shown that activity monitor derived sleep parameters correlate with the information provided from polysomnography. We used the Actigraph activity monitor and its software package to in- vestigate nighttime activity (sleep) in the patients enrolled in this study. The neural network analysis used in this study was based on a Self-Organizing Map Network (SOM) [11]. Neu- ral networks have been used in a variety of applications and in many fields including medicine [12, 13]. The SOM network provides a powerful tool for analyzing problems which involves categorization and pattern recognition [14, 15]. The algorithm used in the SOM network allows the order in the data to be preserved in the output. Another ad- vantage with SOM networks is their insensitivity to noise, since it will be evenly distributed throughout the entire output layer. METHOD Pain is typically measured using a linear scale between 0 and 10, where 0 indicates no pain and 10 indicates the worst possible pain. Often, patients are asked to record their pain levels using a paper diary [16]. In this study, we have used a semi-automatic pocket sized electronic pain diary. This diary may be programmed to prompt the patients to en- ter a current pain level at various time intervals. We pro- grammed the diary to prompt the patients to enter a pain level between 0 and 10 every 90 min between 0800 hours and 2200 hours for 6 consecutive days. Patients were al- lowed to enter additional pain levels if they experienced fluctuations in their pain outside the scheduled measure- ments. However, additional pain measurements only con- tributed an additional 10–15% compared to the scheduled measurements in any single patient. Since the pain levels were only collected on average every 90 min and at uneven intervals, an interpolation using cubic splines [17, 18] was performed. A total mean pain level was calculated from the interpolated pain levels for each patient. Also, a daily mean pain level was calculated for each patient and each day. The difference between the total pain level and the daily pain level was calculated for each patient and each day. Pain level variance was also calculated for each patient for the entire measurement period. Nighttime activity was recorded using an Actigraph AW- 64 (Minimitter Inc.) for the corresponding 5 nights. The Actigraph is an automatic passive device for activity moni- toring [19]. It is often placed on the non-dominant arm, as in this study, but other sites may be used. It is assumed that the Actigraph reflects the patients overall activity. Previ- ous studies have established good correlations between dif- ferent monitoring sites as well as between Actigraph data and other measurements of activity [20]. The Actigraph can be programmed to sample activity counts at different time intervals. In this study the sampling rate was set to 1 min. The Actigraph has been used to characterize sleep qual- ity through a number of different parameters which can be derived using a sleep software package [6]. In the first part of this study, the Actigraph sleep software was used to derive a number of parameters which were then in- vestigated for correlations with daytime pain levels. The sleep software parameters used were: Actual Sleep Per- centage, Sleep Efficiency, Wake Bouts, Number of Min- utes Immobile, Number of Immobile Phases and Move- ment/Fragmentation Index. A bedtime of 2400 hours and a get up time of 0600 hours was assumed. In the second part of the study, the activity data was analyzed using a neural network technique where a Self- Organizing Map Network (SOM) was used [11]. The software package used was the Nworks Professional 2 (NeuralWare Inc.). The SOM consisted of 360 process- ing elements in the input layer, 10 processing elements (10 × 1) in the Kohonen layer and 1 processing element in the output layer. The network was trained with the activity data from 10 randomly selected patients. Recall was then performed on the entire data set, one patient at the time. The output from the SOM provides a measurement of the appearance of the nighttime activity level data from each patient and each night. A difference between the maxi- mum and minimum SOM output data was calculated for Liszka-Hackzell and Martin: Analysis of Nighttime Activity and Daytime Pain in Patients 413 each patient as a measure of fluctuations in that particular patient’s nighttime activity. In the first part of the study, correlations were calculated between each patient’s difference in daily mean pain lev- els and the corresponding sleep software parameters for the previous night as well as the following night using SPSS 7.5 [21]. In the second part of the study, we calculated corre- lations between the pain variance and the SOM difference for each patient. RESULTS The average age of the patients was 52 ± 10.5 years and consisted of 10 males and 8 females. Of the 19 patients who were initially enrolled, 18 patients completed the study. We were unable to show any significant correlations between the Actiwatch sleep parameters and daytime mean pain differences, which would have indicated a temporal rela- tionship between sleep and daytime pain (day before and following day). The analysis of correlations between the SOM difference and pain variance revealed a significant relationship for the entire group of patients. A correlation coefficient of r = 0.73 (p < 0.01) was found (Figure 1). The SOM difference, being a measurement of the fluc- tuations in patient’s nighttime activity levels/patterns, pro- vides information about how different each patient’s night- time activity was during the measurement period (Figure 2). The length of each line (each patient), indicates how different each nighttime activity levels and patterns were. For example, patient number 11 showed a large difference between each nighttime activity levels and patterns, while Fig. 1. Scatter plot of the variance in daytime pain levels and the difference in SOM output coordinates for all patients in the study (r = 0.73, p < 0.01). Fig. 2. Plot of the output coordinates from the 1-dimensional SOM Network (Kohonen layer). The output is standardized to a value between −1 and 1. There are 5 values (5 nights) from each patient. patient number 17 appeared to have similar nighttime ac- tivity levels and patterns during the measurement period. DISCUSSION A combination of the electronic symptom diary and the activity monitor can be used to measure pain semi- automatically and nighttime activity continuously. This re- duces problems of inaccuracy and likely improves com- plience. The electronic diary requires an active patient in- put, or else will automatically prompt the patients to do so. Also, previous measurements are not available to the patient, which will likely reduce the possibility of patient recall bias. The activity monitor is a passive device which requires no active patient input and actually provides an objective measurement of the patients overall activity. Previous studies [20] have indicated that the placement of the activity monitor is less important as long as it is placed consistently at the same location during a study. It has also been shown that the activity monitor correlates well with other measurements of activity. The actiwatch has been used to monitor sleep [6], and together with spe- cialized software, it may be used to derive a number of sleep parameters which has been shown to correlate well with other sleep monitoring methods. The analysis of correlation between the sleep parame- ters derived from the Actiwatch using the sleep analysis software and the individual mean pain levels did not re- veal any significant relationships. We were unable to show a temporal relationship between the sleep parameters and the mean daytime pain levels the day before or after. Even though the sleep analysis parameters have been shown to correlate with information derived from polysomnography, they are calculated using fairly simple algorithms based on 414 Journal of Clinical Monitoring and Computing Vol 19 No 6 2005 the number of activity counts within a defined period of time. This approach does not consider the appearance and patterns of the data since it utilizes a strictly rule based system to interpret the activity information. By using a neural network technique (SOM), the activity level data can be analyzed not only depending on its level, but also depending on its appearance and patterns [14]. The SOM network is a helpful tool for providing categorization and pattern recognition. It is important that the order in the data is preserved in the output. This means that output values that are close to each other implies that the input data is similar while output values that are far apart indicates a large difference in the input data. A SOM network is not sensitive to noise, since it tends to be evenly distributed throughout the output layer. We could show that there was a significant correlation between the difference in the SOM output data and the daytime pain variance for each patient over the entire study period. The SOM difference may be considered a measure- ment of how different the nighttime activity is from night to night in a single patient. A patient with a small SOM dif- ference likely behaves similarly from night to night, while a patient with a large SOM difference may have an uneven nighttime activity pattern. The daytime pain variance is an indicator of the magnitude of pain fluctuations during the study period. A relationship between these two parameters may indicate that large fluctuations in nighttime activity is related to large fluctuations in daytime pain. This may indi- rectly suggest that better daytime pain control may provide a more homogenous nighttime activity with less fluctua- tions from night to night in this category of patients. In the first part of the study, conventional statistical anal- ysis was used to explore correlations between daytime pain and nighttime activity. A neural network model was used to further explore the nighttime activity data in the second part of the study. The neural network model provided in- formation about the appearance of the nighttime activity data, which could be correlated with daytime pain fluctu- ations. This study was funded by a grant from Mayo Foundation, Rochester, Minnesota. References 1. Drewes AM, Svendsen L, Taagholt SJ, Bjerregard K, Nielsen KD, Hansen B. Sleep in Rheumatoid arthritis: A comparison with healthy subjects and studies of sleep/wake interactions. Br J Rheumatol 1998; 37: 71–81. 2. Lobbezoo F, Thon MT, Remillard G, Montplaisir JY, Lavigne GJ. Relationship between sleep, neck muscle activity, and pain in cervical dystonia. Can J Neuro Sci 1996; 23(4): 285– 290. 3. Pilowsky I, Crettenden I, Townley M. Sleep disturbance in pain clinic patients. Pain 1985; 23: 27–33. 4. Wilson KG, Watson ST, Currie SR. Daily diary and ambulatory activity monitoring of sleep in patients with insomnia associated with chronic musculosceletal pain. Pain 1998; 75: 75–84. 5. Cole RJ, Kripke DF, Gruen W, Mullaney DJ, Gillin JC. Auto- matic sleep/wake identification from wrist activity. Sleep 1992; 15(5): 461–469. 6. Jean-Louis G, von Gizycki H, Zizi F, Fookson J, Spielman A, Nunes J, Fullilove R, Taub H. Determination of sleep and wake- fulness with the actigraph data analysis software. Sleep 1996; 19(9): 739–743. 7. Jean-Louis G, von Gizycki H, Zizi F, Spielman A, Hauri A, Taub H. The actigraph data analysis software: I. A novel approach to scoring and interpreting sleep-wake activity. Perceptual and Motor Skills 1997; 85: 207–216. 8. Jean-Louis G, von Gizycki H, Zizi F, Spielman A, Hauri A, Taub H. The actigraph data analysis software: II. A novel approach to scoring and interpreting sleep-wake activity. Perceptual and Motor Skills 1997; 85: 219–226. 9. Jean-Louis G, Zizi F, von Gizycki H, Hauri P. Actigraph as- sesment of sleep in insomnia: Application of the actigraph data analysis software (ADAS). Physiol Behav 1999; 65: 659– 663. 10. Jean-Louis G, Mendlowicz MV, Gillin JC, Rapaport MH, Kelsoe JR, Zizi F, Landolt H-P, von Gizycki H. Sleep Esti- mation from wrist activity in patients with major depression. Physiol Behav 2000; 70: 49–53. 11. Klimasauskas K. Neural Computing, A Technology Handbook. NeuralWare Inc. 1993. 12. Gabor AJ, Leach RR, Dowla FU. Automated seizure detection using a self-organizing neural network. Electroencephalogr Cli Neurophysiol 1996; 99: 257–266. 13. Kaartinen J, Hiltunen Y, Kovanen PT, Ala-Korpela M. Applica- tion of self-organizing maps for the detection and classification of human blood plasma lipoprotein lipid profiles on the basis of 1H NMR spectroscopy data. NMR Biomed 1988; 11: 168– 176. 14. Kohonen T. Self-Organizing and Associative Memory. Springer-Verlag, 1989. 15. Pao YH. Adaptive Pattern Recognition and Neural Networks. Addison-Wesley, 1989. 16. Rosier EM, Iadarola MJ, Coghill RC. Reproducibility of pain measurement and pain perception. Pain 2002; 98: 205–216. 17. Giakas G, Baltzopoulos V. A comparison of automatic filtering techniques applied to biomechanical walking data. J Biomech 1997; 30: 847–850. 18. Golitschek MV, Schardt FW. Determination of transients and compensation capacities of breath-by-breath analysis by cubic splines. Med Eng Phy 1997; 19: 475–480. 19. Shirota A, Tamaki M, Hayashi M, Hori T. Effects of daytime activity on nocturnal sleep in elderly. Psy Cli Neurosci 2000; 54: 309–310. 20. Patterson SM, Krantz DS, Montgomery LC, Deuster PA, Hedges SM, Nebel LE. Automated physical activity monitoring: Validation and comparison with physiological and self-report measures. Psychophysiology 1993; 30: 296–305. 21. SPSS Version 7.5 Users Manual.