So i just learn Markov Chain by usecases. The use case are, we want to know what the next product and user's space will be used. In here i encode the state as [current_balance, age_category, product_1, product_2, product_3, product_4]
.
So if i have [1, 2, 1, 3, 2, 0]
It means, the users have low balance (elm 0), he's a teenager (elm 1), have savings as his first product (elm 2), have credit card as his second product (elm 4), have mobile banking as his third product (elm 3), and doesn't have any deposits (elm 5).
I creaete 3 files
- generator.py to create random users timeline that the product used
- markov.py create markov chain table
- interact to interact with the table