Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
determine_transition_matrix [2026/06/29 13:22]
chrystian Add usage examples to functor documentation
determine_transition_matrix [2026/08/28 03:17] (current)
hermann Sync from local documentation review
Line 1: Line 1:
-====== Determine Transition Matrix ====== ​+====== Determine Transition Matrix ======
  
 ===== Description ===== ===== Description =====
  
-This functor determines ​a matrix of transition rates between two time-series maps.+Determines ​a matrix of transition rates between two time-series maps: a single-step transition matrix for the entire period between the initial and final landscape maps, and a multi-step transition matrix for a given number of time steps into which that period is divided.
  
 ===== Inputs ===== ===== Inputs =====
  
-^ Name              ^ Type                                       ​^ Description ​                               +^ Name  ^ Type  ^ Description ​ 
-| Initial Landscape | [[Categorical Map Type]] ​ | Initial map of land use and cover classes. | +| Initial Landscape ​ | [[Categorical Map Type]] ​ | Initial map of land use and cover classes. ​ 
-| Final Landscape ​  ​| [[Categorical Map Type]] ​ | Final map of land use and cover classes. ​  ​+| Final Landscape ​ | [[Categorical Map Type]] ​ | Final map of land use and cover classes. ​ 
-| Time Steps        | [[Positive Integer Value Type]] ​ | Number of time steps between initial and final landscape maps. Step can be any time unit, such as yearmonth, ​etc.  |+| Time Steps  | [[Positive Integer Value Type]] ​ | Number of time steps between ​the initial and final landscape maps. A step can be any unit of time, such as year or a month, ​since Dinamica EGO uses it only as an external reference parameter.  |
  
-===== Output ​=====+===== Optional Inputs ​=====
  
-^ Name                   ​^ Type                                           ​^ Description ​                              ​+None. 
-| Single Step Matrix ​    ​| [[Transition Matrix Type]] ​ | Transition matrix for the entire period. ​ | + 
-Single ​Step Matrix ​    ​| [[Transition Matrix Type]] ​ | Transition matrix for the time step specified ​by the number of units that the time period ​is divided.  |+===== Outputs ===== 
 + 
 +^ Name  ^ Type  ^ Description ​ 
 +| Single Step Matrix ​ | [[Transition Matrix Type]] ​ | Transition matrix for the entire period ​between the initial and final landscape maps.  | 
 +Multi Step Matrix ​ | [[Transition Matrix Type]] ​ | Transition matrix for a single ​time step, derived ​by dividing ​the period ​between the initial and final landscape maps by Time Steps.  |
  
 ===== Group ===== ===== Group =====
Line 24: Line 28:
 ===== Notes ===== ===== Notes =====
  
-To analyze a historical context, ​the initial map should be considered ​the older map of the time series.+Only the classes present in the categorization of the initial ​or final map are used when determining ​the transitions that occurred between ​the two maps; any other values are ignored.
  
-Multi-step transition matrix only applies to an ergodic matrix, i.e. a matrix that possesses eigenvalues and vectors.+A cell is ignored in the calculation if its value is null in either the initial or the final map.
  
-The transition matrix describes ​system that changes over discrete time incrementsin which the value of any variable in a given time period is the sum of fixed percentages of the value of the variables in the previous time period. The sum of fractions along the column of the transition matrix is equal to one. The diagonal Line of the transition matrix needs not to be filled in since it models ​the percentage ​of unchangeable cells. The transition rates are passed on to the model as a fixed parameter within a given phase. For Dinamica, ​time step can comprise any span of time, since the time unit is only a reference parameter externally set.+To analyze ​historical contextInitial Landscape should ​be the older map of the time series.
  
-<m> +Deriving the multi-step ​matrix ​from the single-step ​matrix ​requires an eigendecomposition of the single-step ​matrix, which is only possible when that matrix is ergodic, that is, when it has well-defined eigenvalues and eigenvectors. See http://​mathworld.wolfram.com/EigenDecompositionTheorem.html for details on this decomposition and on why it is not always possible.
-delim{[} +
-{matrix{5}{1} +
-   { +
-     1 +
-     2 +
-     3 +
-     ​vdots +
-     j +
-   } +
-+
-{]}_{t=v} +
-+
-delim{[} +
-{matrix{5}{5} +
-   { +
-     ​P_{11} P_{21} P_{31} cdots P_{i1} +
-     ​P_{12} P_{22} P_{32} cdots P_{i2} +
-     ​P_{13} P_{23} P_{33} cdots P_{i3} +
-     vdots vdots vdots ddots vdots +
-     ​P_{1j} P_{2j} P_{3j} cdots P_{ij} +
-   } +
-+
-{]} +
-+
-delim{[} +
-{matrix{5}{1} +
-   { +
-     1 +
-     2 +
-     3 +
-     ​vdots +
-     j +
-   } +
-+
-{]}_{t=0} +
-</m>+
  
-<m> +The transition matrix describes a system that changes over discrete time incrementsin which the value of any variable in a given period ​is the sum of fixed percentages of the values of the variables in the previous period. The fractions in each column of the transition matrix ​sum to one; the diagonal need not be filled ​in, since it represents the percentage of unchanged cellsThe transition rates are passed ​to the model as a fixed parameter within a given phase; ​the time step itself can span any amount ​of time, since Dinamica treats ​the time unit only as an externally set reference parameter.
-sum{i=1}{n}{ +
-  P_{ij} +
-+
-</m>j = 1, 2 ... n +
- +
-An estimation ​of <​m>​P_{ij}</​m>​ is given below, where n is the number ​of states +
- +
-... +
- +
-The transition matrix ​is calculated for a time period. Dinamica can also be run in multiple time stepsIt is necessary for this purpose ​to derive ​the multiple time step transition matrix, ​as this is equivalent to the number ​of time steps in which the time period is divided. +
- +
-<m> +
-P^t=H*V^t*H^{-1} +
-</​m>​ +
- +
-H and V are Eigen values and Eigen vector matrices.+
  
 ===== Internal Name ===== ===== Internal Name =====
Line 93: Line 45:
  
 See practical examples of this functor in [[lesson_18|Lesson 18: Building a land-use and land-cover change simulation model]] See practical examples of this functor in [[lesson_18|Lesson 18: Building a land-use and land-cover change simulation model]]
 +