Detect time pattern in sequence of events
I have a time series with a timestamp and an associated event:
Time | Event |
---|---|
1 | A |
2 | B |
3 | C |
T | A |
I was wondering if there is a technique/method to figure out which events most often precede others in a given time window. I.e. 10 seconds before A happens B and C occur with 90% chance. Ideally the output should be the sequences that occur most often.
So far I have thought of using some sort of clustering, though a cluster would not suffice as I need to get the time direction right.
Does anyone have an idea?
Thanks