I'm making a weather prediction program in Python using a Markov chain. The programs asks the user for input on past days' weather and predicts the next seven days.
I was wondering how I can change my transition matrix so it uses the percentages of how often the specified pair happens i.e. 'DD' 'DR' 'RR' 'RD' rather than default probability as I have shown below.
#Possible sequences of events
transitionName = [["DD","DR"],["RR","RD"]]
pastweather = input("Enter a string of D's and R's to represent dry/rainy days: ")
#transition matrix
transitionMatrix = [[0.8,0.2],[0.4,0.6]]