# Drawing Trees, finding Probabilities and Predicting

My first post here :)

I have some transition states. Like below, where each row reflect to a specific process:

array([[192., 192.,   0.,   0.,   0.],
[185., 171.,   0.,   0.,   0.],
[ 17.,   1.,  16.,  17.,   1.],
[185., 185.,   0.,   0.,a   0.],
[185., 185.,   0.,   0.,   0.]])


So the first process traansitioned from state 192 to state 192 (zeros mean no further info available) Third process transitioned from process 17 to 1, to 16, to 17 and finally to 1.

First, I would like to make, in python, a tree that shows based on the entire data set (many entries) what transitions look like; but, also calculate the statistics. For example, from transition 185 with 60% you can go to transition 32 and 40% remains at 185.

1. Are you aware of such technique that can do this plotting and statistical calculation? The available code in python I have found handles the design of simpler state problems, where the states are also just a handful.

2. Which technique would you suggest to make inference/predictions? Ideally, I would like to get smaller inputs, like two transitions which are the most likely outputs, with their relevant transitions.

Small note: these transitions also have timestamps. So, one can describe the problem as a date-time problem where there are transitions that happened over different time periods. For now, we can only, for terms of simplicity, discuss just the states. :)

Can you please provide any help or suggestions on what I should read further? I am using python but I can also do it in R if needed.

Thanks a lot. Regards Alex.