-1

I'm working on pattern detection of data in PHP. The data consists of timeseries with an interval of 1 minute and a value (integer). Now I'm trying to detect patterns in it, e.g.

  • Every 10 minutes there's a spike.
  • Every 7th day of the week there's a drop.
  • Every day between 10pm and 6am there's low traffic.
  • ...

Does anyone have a clue how to manage to do this, and where to start?

Thank you in advance!

JSON sample data (take a look at the "data" array):

{"data":[5,4,4,3,4,12,4,4,4,3,6,4,3,4,4,10,4,4,3,4,6,3,4,4,3,10,4,3,4,4,5,4,4,3,4,11,3,4,4,3,6,4,3,6,4,9,4,4,3,8,6,3,4,4,3,8,4,2,4,8],"trend":[29.111667641538,27.867587040805],"start":"10-08-2012 09:55","stop":"10-08-2012 10:55"}
RobinUS2
  • 955
  • 6
  • 17

1 Answers1

0

The best way to do pattern detection is through statistical analysis - this allows you to express your pattern as a mathematical model, and the statistical analysis tool looks at the data to see if that model is matched.

The daddy in open source stats tools is R - and it's possible to call this from PHP.

Community
  • 1
  • 1
Neville Kuyt
  • 29,247
  • 1
  • 37
  • 52
  • The keyword in our application is dynamic. How can I realize a dynamic detection without expressing the models myself? – RobinUS2 Aug 10 '12 at 09:49