- #1
Lucchini
- 1
- 0
- Homework Statement
- I need an idea if it is possible to change the minimum value of a probability matrix, from 0% to a value greater than zero.
- Relevant Equations
- df['Eventos Anterior'] = df[f'Eventos'].shift(1)
transicoes = df.groupby(['Eventos Anterior', f'Eventos']).size().unstack(fill_value=0)
I am doing a study of the possibility of transition between 12 different events. I have a dataframe with these key events (listed from 1 to 12) over a period of time. I constructed a transition probability matrix between these events (photo of the matrix is attached below). As I don't have a very large dataframe, there are some changes that did not occur, for example from event 1 to event 12. How could I change the probability for events that did not occur so that there is a possibility, for example 1%, even if this transition is not present in the dataframe. And so that the rest of the probabilities are adjusted accordingly, maintaining the total probability of 100%.
Is it possible to make such a change? Thank you for your attention!
Is it possible to make such a change? Thank you for your attention!
Last edited by a moderator: