Skip to content
logo
neighbayes
neighbayes.graph.flow_weight_matrices
Initializing search
    pysal/neighbayes
    pysal/neighbayes
    • Home
    • Installation
      • Getting Started with neighbayes
      • Bayesian spatial models: a walkthrough
      • Spatial panel models: a walkthrough
      • How to set priors
      • How to choose and configure the Gibbs sampler
      • How to fit spatial logit models
      • How to estimate spatial negative binomial models
      • How to fit zero-inflated SAR negative binomial models
      • How to estimate Poisson origin–destination flow models
      • How to fit spatial tobit models
      • How to fit spatial tobit panel models
      • How to estimate origin–destination flow models
      • How to estimate panel flow models
      • How to run Bayesian LM specification tests
      • How to run spatial block cross-validation
      • Why neighbayes
      • Architecture
      • Supported Models
      • API reference
        • Cross-Sectional Spatial Models
        • Panel Spatial Models (Fixed Effects)
        • Panel Spatial Models (Random Effects)
        • Dynamic Panel Spatial Models
        • Non-Linear Spatial Models
        • Panel Spatial Models (Tobit)
        • Flow Models
        • Default Gibbs Priors
        • Default NUTS Priors
        • Bayesian Diagnostics
        • Data Generating Processes
        • Graph Utilities
          • neighbayes.graph.FlowDesignMatrix
          • neighbayes.graph.flow_design_matrix
          • neighbayes.graph.flow_design_matrix_asymmetric
          • neighbayes.graph.flow_design_matrix_with_orig
          • neighbayes.graph.flow_weight_matrices
            • F neighbayes.graph.flow_weight_matrices
              • Parameters
                • p G
              • Returns
              • Return type
          • neighbayes.graph.destination_weights
          • neighbayes.graph.origin_weights
          • neighbayes.graph.network_weights
      • References
      • External Validation & Replication
      • Performance & Profiling
      • GitHub
      • Changelog
    • F neighbayes.graph.flow_weight_matrices
      • Parameters
        • p G
      • Returns
      • Return type

    neighbayes.graph.flow_weight_matrices¶

    neighbayes.graph.flow_weight_matrices(G)[source]¶

    Build all three N×N flow weight matrices from a single Graph.

    Parameters:¶
    G¶

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

    Returns:¶

    Dictionary with keys "destination", "origin", "network".

    Return type:¶

    dict[str, scipy.sparse.csr_matrix]

    © Copyright 2018-, pysal developers.
    Created using Sphinx 8.2.3. and Sphinx-Immaterial