Method for predicting future state, based on time spent in previous states

So what I'm looking for is the best approach to predict a future state.

Say we have three states: A, B, C.

I want to predict if in the next time-interval (f.e. a day or a week) the state will become C.

My (historical) data looks like this:

ID  Date        State
1   2021-12-01  A
1   2021-12-02  B
1   2021-12-06  A
1   2021-12-24  C
2   2021-12-05  A
2   2021-12-12  B
2   2021-12-27  C

For a new ID The history could look like this:

ID  Date        State
1   2022-01-01  A
1   2022-01-24  B

I was thinking in a few different directions:

  1. Time Series based, since the time an ID spent in a state is basically all information I have.
  2. Event Driven based, such as markov chains. However Markov Chains only look at the current state, and not its history.
  3. Some process mining technique that might help? Since one can see the history of an ID as a process flow, running through different events? Not sure how to program this though.
  4. Classification model, since I'm trying to predict a category in the future. However I'm not sure which features to calculate. I was thinking about:
    1. total time spent in A
    2. total time spent in B
    3. current state

Any thoughts would be welcomed

Topic data-science-model forecasting markov-process time-series python

Category Data Science

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.