Deviation-based Dynamic Time Warping for Clustering Human Sleep

Chiying Wang, Sergio A. Alvarez, Carolina Ruiz, Majaz Moonis


In this paper, we propose two versions of a modified dynamic time warping approach for comparing discrete time series. This approach is motivated by the observation that the distribution of dynamic time warping paths between pairs of human sleep time series is concentrated around the path of constant slope. Both versions use a penalty term for the deviation between the warping path and the path of constant slope for a given pair of time series. In the first version, global weighted dynamic time warping, the penalty term is added as a post-processing step after a standard dynamic time warping computation, yielding a modified similarity metric that can be used for time series clustering. The second version, stepwise deviation-based dynamic time warping, incorporates the penalty term into the dynamic programming optimization itself, yielding modified optimal warping paths, together with a similarity metric. Clustering experiments over synthetic data, as well as over human sleep data, show that the proposed methods yield significantly improved accuracy and generative log likelihood as compared with standard dynamic time warping.


  1. Alvarez, S. A. and Ruiz, C. (2013). Collective probabilistic dynamical modeling of sleep stage transitions. In Proc. Sixth International Conference on Bio-inspired Systems and Signal Processing (BIOSIGNALS 2013), Barcelona, Spain.
  2. Bianchi, M. T., Cash, S. S., Mietus, J., Peng, C.-K., and Thomas, R. (2010). Obstructive sleep apnea alters sleep stage transition dynamics. PLoS ONE, 5(6):e11356.
  3. Candan, K. S., Rossini, R., Wang, X., and Sapino, M. L. (2012). sDTW: computing DTW distances using locally relevant constraints based on salient feature alignments. Proceedings of the VLDB Endowment, 5(11):15191530.
  4. Chu-Shore, J., Westover, M. B., and Bianchi, M. T. (2010). Power law versus exponential state transition dynamics: application to sleep-wake architecture. PloS one, 5(12):e14204.
  5. Clifford, D., Stone, G., Montoliu, I., Rezzi, S., Martin, F.-P., Guy, P., Bruce, S., and Kochhar, S. (2009). Alignment using variable penalty dynamic time warping. Analytical Chemistry, 81(3):1000-1007.
  6. Dijk, D. J. and Lockley, S. W. (2002). Invited review: Integration of human sleep-wake regulation and circadian rhythmicity. Journal of applied physiology, 92(2):852-862.
  7. Itakura, F. (1975). Minimum prediction residual principle applied to speech recognition. IEEE Transactions on Acoustics, Speech, and Signal Processing, 23(1):67- 72.
  8. Jeong, Y.-S., Jeong, M. K., and Omitaomu, O. A. (2011). Weighted dynamic time warping for time series classification. Pattern Recognition, 44(9):2231-2240.
  9. Kishi, A., Struzik, Z. R., Natelson, B. H., Togo, F., and Yamamoto, Y. (2008). Dynamics of sleep stage transitions in healthy humans and patients with chronic fatigue syndrome. American Journal of PhysiologyRegulatory, Integrative and Comparative Physiology, 294(6):R1980-R1987.
  10. Müller, M. (2007). Dynamic time warping. Information retrieval for music and motion, pages 69-84.
  11. Oates, T., Firoiu, L., and Cohen, P. R. (2001). Using dynamic time warping to bootstrap HMM-based clustering of time series. In Sequence learning: Paradigms, algorithms, and applications, pages 35-52. SpringerVerlag.
  12. Ratanamahatana, C. A. and Keogh, E. (2004). Making timeseries classification more accurate using learned constraints. In Proceedings of SIAM International Conference on Data Mining (SDM 7804), pages 11-22.
  13. Sakoe, H. and Chiba, S. (1978). Dynamic programming algorithm optimization for spoken word recognition. IEEE Transactions on Acoustics, Speech and Signal Processing, 26(1):43-49.
  14. Wang, C., Alvarez, S. A., Ruiz, C., and Moonis, M. (2014). Semi-Markov modeling-clustering of human sleep with efficient initialization and stopping. In Proc. Seventh International Conference on BioInspired Systems and Signal Processing (BIOSIGNALS 2014), Barcelona, Spain.

Paper Citation

in Harvard Style

Wang C., Alvarez S., Ruiz C. and Moonis M. (2016). Deviation-based Dynamic Time Warping for Clustering Human Sleep . In Proceedings of the 9th International Joint Conference on Biomedical Engineering Systems and Technologies - Volume 4: BIOSIGNALS, (BIOSTEC 2016) ISBN 978-989-758-170-0, pages 88-95. DOI: 10.5220/0005729200880095

in Bibtex Style

author={Chiying Wang and Sergio A. Alvarez and Carolina Ruiz and Majaz Moonis},
title={Deviation-based Dynamic Time Warping for Clustering Human Sleep},
booktitle={Proceedings of the 9th International Joint Conference on Biomedical Engineering Systems and Technologies - Volume 4: BIOSIGNALS, (BIOSTEC 2016)},

in EndNote Style

JO - Proceedings of the 9th International Joint Conference on Biomedical Engineering Systems and Technologies - Volume 4: BIOSIGNALS, (BIOSTEC 2016)
TI - Deviation-based Dynamic Time Warping for Clustering Human Sleep
SN - 978-989-758-170-0
AU - Wang C.
AU - Alvarez S.
AU - Ruiz C.
AU - Moonis M.
PY - 2016
SP - 88
EP - 95
DO - 10.5220/0005729200880095