Detecting abundance of a certain periodic pattern in a time series?



I am really stumped at the moment about how to solve a particular problem. I have many time series like this:

enter image description here

This represents the number of hours a person spends on a website each day throughout the year. Any days where they are not seen to be using the website have zero values, rather than missing values.

What I really want to do is to calculate a metric telling me to what extent there is a consistent "1 hour per day, once per week" pattern, or, say a "10 minutes a day 6 times per week" pattern and I have written some code that produces this pattern. I don't have any background really in machine learning or deep learning, but I have looked into some techniques from spectral analysis and time series. I also found a technique called "Dynamic Time Warping" which I could in theory use to find out how much of a cost there is in mapping this time series onto the "ideal" one (representing the usage patterns I just mentioned).

I tried plotting the periodogram and correlogram, but there seems to be very little correlation indicating periodicity of any kind:

enter image description here

Can anyone shed some light onto how I could use certain techniques to get the information I need, or any introductory texts on periodicity detection or data mining for those who have never really used it before?


Posted 2019-09-15T12:19:03.440


This sounds like a problem where a matrix profile will be helpful. – Dave – 2019-12-03T21:02:26.690

I am afraid that you already did what any introduction to periodicity detection in time series will adivse : plotting the spectrogram and the correlogram. they seems to indicate that you don't have such correlation. Without your data it will be very difficult for us to say if there is any problem with your approach or if the pattern you are looking for isn't just here. – lcrmorin – 2020-01-05T10:46:46.993



Time warping is used to align different time series, is more useful for data preprocessing rather than for what you want.

"What I really want to do is to calculate a metric telling me to what extent there is a consistent '1 hour per day, once per week' pattern"

I don't know if you have a specific reason to use a 'metric', if what you need if to find periodical patterns across people what you could do is apply different moving averages to every time series to extract different periodical patterns, then you could evaluate the cross-correlation between different people time series to evaluate which patterns are subjective and which can be instead considered true across people.

Edoardo Guerriero

Posted 2019-09-15T12:19:03.440

Reputation: 460