bayespecon.graph.FlowDesignMatrix¶
- class bayespecon.graph.FlowDesignMatrix(X_dest, X_orig, X_intra, intra_indicator, dist_vec, combined, feature_names, n, k_d, k_o, k)[source]¶
Combined design matrix for an O-D flow regression.
- X_dest[source]¶
Destination-side characteristics: \(\iota_n \otimes X_d\).
- Type:¶
np.ndarray, shape (N, k_d)
- X_orig[source]¶
Origin-side characteristics: \(X_o \otimes \iota_n\).
- Type:¶
np.ndarray, shape (N, k_o)
- X_intra[source]¶
Intra-zonal characteristics (non-zero only on the diagonal of the flow matrix): rows of X_d selected by
vec(I_n). Uses destination-side columns becauseflow_design_matrix()constructsX_intra = intra_indicator * X_dest.- Type:¶
np.ndarray, shape (N, k_d)
- intra_indicator[source]¶
Binary indicator for diagonal (intra-zonal) O-D pairs.
- Type:¶
np.ndarray, shape (N,)
- dist_vec[source]¶
Vectorised distance/cost matrix
vec(dist)if provided.- Type:¶
np.ndarray or None, shape (N,)
- combined[source]¶
Full design matrix ready for regression. Column order: intercept | intra_indicator | X_dest (k_d cols) | X_orig (k_o cols) | X_intra (k_d cols) [| dist (1 col if provided)].
- Type:¶
np.ndarray, shape (N, p)
- __init__(X_dest, X_orig, X_intra, intra_indicator, dist_vec, combined, feature_names, n, k_d, k_o, k)[source]¶
Methods
__init__(X_dest, X_orig, X_intra, ...)Attributes