bayespecon.graph.destination_weights

bayespecon.graph.destination_weights(G)[source]

Build the N×N destination weight matrix \(W_d = I_n \otimes W\).

A non-zero entry at position \((i \cdot n + j,\; i \cdot n + k)\) indicates that destination k is a spatial neighbour of destination j (for flows originating from i).

Parameters:
G

Row-standardised libpysal.graph.Graph of shape n×n.

Returns:

\(N \times N\) destination weight matrix (\(N = n^2\)).

Return type:

scipy.sparse.csr_matrix