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 a spatial logit model
      • 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
      • How to predict at new locations
      • Why neighbayes
      • Architecture
      • Supported Models
      • API reference
        • 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.od_weights
        • Runtime Configuration
      • 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", "od".

    Return type:¶

    dict[str, scipy.sparse.csr_matrix]

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