# Pattern recognition in state sequences

I have a sequence of states of a system. Each state is defined by an abstract identifier e.g "Eating", "Sleeping" etc... and a duration. So a state is basically {id,duration}.

Additionally I have recordings of interesting "event" states that are defined by specific sequences of states; e.g "Eating for 20 minutes followed by driving for 10 minutes = Event state "Eating dinner out". (I know the sample makes no real sense, its just for general illustration. Note that events can have an arbitrary number of states.)

Now I would like to analyze the input state sequences to find those event states in them (in a fuzzy way) Note that there will be very few events in relation to the input data sequences.

I have experimented with basic neural networks, hidden Markov models etc... but nothing seems to give me good results.

Does anybody have some pointers on what kind of algorithms to use on this kind of problem?

• Do you know the "interesting states" that you are looking for? Is this essentially a clustering exercise? Commented Nov 9, 2014 at 16:25
• Yes those are predefined, and also for each of those predefined interesting states i have several recordings of patterns that denote them. Commented Nov 9, 2014 at 16:55
• Eg for "eating out" i have recordings like this: Recording 1: {"Eating",10} {"Driving: 5"} Recording 2: {"Eating",30} {"Driving: 20"} Recording 3: {"Eating",30} {"Walking": 10} {"Driving":5} Commented Nov 9, 2014 at 16:56
• Are the sequences of interesting states embedded in a larger sequence, i.e., do you have sequences like {Sleeping:20},{Showering:5},{Driving:5},{Eating:10},{Driving:10},{Working:100},{Driving:15} and you want to identify the subsequence {Driving:5},{Eating:10} as eating out?
– alto
Commented Nov 10, 2014 at 0:50
• Your states seem ill defined. Duration does not seem to be a state attribute, but rather a measurement of time between state transitions. Commented Mar 28, 2022 at 20:31