I have a list looking like this:
[2, 1, 3, 1, 2, 3, 1, 2, 2, 2]
What I want is a transition matrix which shows me the sequence like:
- How often is a 1 followed by a 1
- How often is a 1 followed by a 2
How often is a 1 followed by a 3
How often is a 2 followed by a 1
- How often is a 2 followed by a 2
- How often is a 2 followed by a 3
and so on...
((0,2,1), (1,2,1), (2,0,0))
Is there a premade module go get this?