-
Notifications
You must be signed in to change notification settings - Fork 28
Open
Description
Hi @satra,
in the current implementation, Markov matrix is calculated by taking sums along axis 1:
d_alpha = np.power(np.array(L_alpha.sum(axis=1)).flatten(), -1)
And multiplying each row by the respective inverse sum:
L_alpha = d_alpha[:, np.newaxis] * L_alpha
In this scenario, ROWS sum to 1.
However, as far as I understand the wiki: https://en.wikipedia.org/wiki/Markov_kernel, the normalization should happen along axis 0. Thus, the code should be:
d_alpha = np.power(np.array(L_alpha.sum(axis=0)).flatten(), -1) L_alpha = d_alpha[np.newaxis,:] * L_alpha
Here the COLUMNS sum to 1.
Is that correct?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels