Skip to content

Commit

Permalink
(doc) add docstrings explaining methods to break ties for categorical…
Browse files Browse the repository at this point in the history
… spatial lags in spatial markov
  • Loading branch information
weikang9009 committed Jun 24, 2024
1 parent 8b4a5d3 commit 1d9c2f1
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 1d9c2f1

Please sign in to comment.