问题
Generic formulation
I have a dataset consisting of a sequence of points with 12 features each.
I am interested in detecting an event in this data.
In the training data I know the moments the event occurred. When the event occurs I can see an observable pattern in the sequence of points before the event. The pattern is formed from about 300 consecutive points.
I am interested in detecting when the event occurred in a infinite sequence of points.
The analysis happens post factum. I am not interested in predicting if the event will occur.
Concrete example
You may skip this section
I am building a wearable that needs to detect when a old person has fallen. It will be weared on the wrist, like a watch and it has an IMU (3 axis accelerometer, 3 axis gyroscope and magnetometer)
The most relevant data is the absolute acceleration on the Z axis but there are many other information to be factored in because hand movements are complex and can generate many false positives.
The human observable pattern based on the absolute Z acceleration consists of 3 states:
- an acceleration towards the ground
- an impact acceleration up the Z axis
- silence - very small movements
Those states could be expanded further by supervised learning and should factor in the other accelerations in the wearable coordinate system and in the absolute coordinate system and rotation vectors expressed as Euler and quaternions.
Approach
My idea was to find an algorithm that uses the training data to calculate a graph of states, where in each state there are some thresholds based on the 12 features. If the thresholds are passed the state changes according to the graph.
What do you guys think?
Markov Models ?
Markov Model would have worked if I was interested to predict the event before it occurred based by example on the starting 200 points from the 300 pattern.
But I am interested to detect the event shortly after the pattern ended, no need to predict.
I'm not sure if Markov Models applies and if does I don't know how to calculate the model.
回答1:
Hidden Markov models are not unusual for event detection in sequences, especially separating the frames of a certain event from "background signal" in a sequence.
The most basic realization of this is to concatenate 2 HMMs, one specialized at modeling the "signal", the other at modeling the background, suitably combined to allow transitions like background-->signal-->background.
A specific example is keyword spotting in speech recognition (separate a "keyword" from background signal). A brief explanation is found in Section 11.2 of Grangier et al., "Discriminative keyword spotting". Figure 11.1 in that reference may be the model topology you're looking for.
Other alternatives are binary classification with a sliding window. This is discussed, for instance, in T. Dietterich, "Machine Learning for Sequential Data: A review" (among other alternatives).
来源:https://stackoverflow.com/questions/36567563/how-to-use-machine-learning-to-calculate-a-graph-of-states-from-a-sequence-of-da