Skip to main content
1 of 14
Tugrul Temel
  • 6.4k
  • 3
  • 14
  • 33

how to convert a weighted, directed graph to a discrete Markov transition matrix

Not to repeat the same thing, please just read the question in:

https://mathematica.stackexchange.com/questions/179613/constructing-transition-probability-matrix

and the answer by @Anton Antonov and @kglr.

I like to create a transition matrix using a weighted, directed graph with a domain of weights in the interval [0, 1.5]. My states will be randomly chosen intervals. I may divide the domain into equal sub-intervals or different-length intervals at my choice. The transition matrix will consist of the number of binary links in each subset. The following weighted graphs with 5 vertices can be used to answer.

SeedRandom[0];
matT1=RandomReal[{0,1.5}, {5,5}];  (* time t *)
matT2=RandomReal[{0,1.5}, {5,5}];  (* time t+1 *)
Tugrul Temel
  • 6.4k
  • 3
  • 14
  • 33