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?

  • $\begingroup$ Do you know the "interesting states" that you are looking for? Is this essentially a clustering exercise? $\endgroup$ Nov 9, 2014 at 16:25
  • $\begingroup$ Yes those are predefined, and also for each of those predefined interesting states i have several recordings of patterns that denote them. $\endgroup$
    – Gluber
    Nov 9, 2014 at 16:55
  • $\begingroup$ 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} $\endgroup$
    – Gluber
    Nov 9, 2014 at 16:56
  • $\begingroup$ 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? $\endgroup$
    – alto
    Nov 10, 2014 at 0:50
  • $\begingroup$ Your states seem ill defined. Duration does not seem to be a state attribute, but rather a measurement of time between state transitions. $\endgroup$
    – krkeane
    Mar 28, 2022 at 20:31

1 Answer 1


Given the sequence-like format, the Hidden Markov Model seems appealing.However, since the states are predefined you can't use it directly on data. Not sure how you've used the HMM but you can train an Hidden Markov Model for each class , like you do for speech recognition. Also , I guess you could try other supervised learning classification algorithms such as support vector machines(they usually work very well) ,k-nn , logistic regression(maybe?) or naive bayes( I know it is used for spam finding issues).


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.