Skip to content

Commit

Permalink
Merge pull request #217 from weikang9009/lag
Browse files Browse the repository at this point in the history
(doc) explaining methods to break ties for spatial markov
  • Loading branch information
weikang9009 committed Jun 24, 2024
2 parents 8b4a5d3 + 1d9c2f1 commit 783529e
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion giddy/markov.py
Original file line number Diff line number Diff line change
Expand Up @@ -740,7 +740,14 @@ class Spatial_Markov:
(4) `Spatial_Markov` also accepts discrete time series and calculates
categorical spatial lags on which several transition probability matrices
are conditioned.
are conditioned. The categorical spatial lag is defined as the most common
categories of neighboring observations, weighted by their weight strengths.
Please note that occasionally there are ties for the "most common categories"
in the calculation of the categorical spatial lag. To break the tie, the
category of the focal observation is included with its neighbors. If this
does not resolve the tie, a winner is chosen randomly.
Let's still use the US state income time series to demonstrate. We first
discretize them into categories and then pass them to `Spatial_Markov`.
Expand Down

0 comments on commit 783529e

Please sign in to comment.