# Visualization of multiple Markov models

I am working on a project where we compare over 10 different Markov models, each representing a different treatment plan.

Most often single models are visualized with a decision tree or transition state diagram. However, with multiple different models what are potential visualizations that could communicate the transition states that differentiate each model?

I have seen other people use a table to depict different models and the transition states.

For clarity, I am not referring to a transition probabilities chart but a method of communicating the differences between multiple models.

• Some attempts by neuroscientists: research.microsoft.com/en-us/um/people/nath/docs/…. – Valentas Sep 29 '16 at 18:04
• The different models have different state spaces, I suppose? – Emre Sep 30 '16 at 6:06
• That's correct. The models have different health states. The pattern is similar but I would like to highlight the differences. – Andrew Brown Sep 30 '16 at 10:36
• You could represent the different models with different colors on the same generalized space. The figure could be interactive with the ability to select one or more models at a time. – Brian Spiering Nov 26 '17 at 2:59
• How big are these? Number nodes? edges? – Pratik Deoghare Apr 20 '19 at 11:46

If we limit the question on comparing two graphs, I can propose a way based on adjacency matrices comparison. There is a sample notebook: graph_diff.ipynb

To summarize:

Having two graphs,

   A  B  C  D                  A  B  D  E  F
A  0  2  2  2               A  0  1  2  3  0
B  2  0  1  1               B  1  0  0  1  1
C  2  1  2  0               D  2  0  2  1  0
D  2  1  0  0               E  3  1  1  0  1
F  0  1  0  1  0



We can compare them and detect changes, producing result similar to diff output:

   A  B  C  D  E  F
A  1  0 -2  1  2  2
B  0  1 -2 -2  2  2
C -2 -2 -2 -2 -2 -2
D  1 -2 -2  2  2  2
E  2  2 -2  2  2  2
F  2  2 -2  2  2  2


Compare matrix nodes from both graphs. Edges values indicate change:

• 1 = same edge
• 0 = changed edge
• -2 = removed edge