Skip to main content

Network Validation using the Spatial Coherence Framework.

Project description

Network Spatial Coherence

What's the quality of your spatial network?

This package quantifies the spatial coherence of a network by measuring if network distances align with physical (Euclidean) distances. It helps you answer questions like: Do shortest-path network distances make spatial sense? Where, and by how much, does the network deviate from the geometric reality?

Additionally, it can reconstruct the network's original positions in space using the STRND algorithm. Networks can be simulated (if you don't have any) or imported, and weighted and bipartite networks are supported. For details, see Spatial Coherence and STRND papers.

Features

  • Analyze the spatial coherence of a network
  • Reconstruct images from purely network information - like drawing a country by only knowing which train stations are connected
  • Efficient graph loading and processing (sparse matrices)
  • Handles simulated graphs, custom graphs, unweighted graphs, weighted graphs, bipartite graphs

Install

Python 3.11 is reccomended, although older versions should work. See requirements.txt for dependencies.

pip install network_spatial_coherence

Example Results

OG Image SP Constant Net Dim Gram Mat REC Image
Coherent Network OG Image SP Constant Net Dim Gram Mat REC Image
Incoherent Network OG Image SP Constant Net Dim Gram Mat REC Image

Quick Intro

For a quick introduction refer to Usage and Examples!

Detailed information

Interactive Network Viz

Citation

If you use this method or refer to its concepts in your research, please cite:

Bonet, D. F., Blumenthal, J. I., Lang, S., Dahlberg, S. K., & Hoffecker, I. T. (2025). Spatial coherence in DNA barcode networks. Patterns, 6(12), 101428. Full text

Bonet, D. F., & Hoffecker, I. T. (2023). Image recovery from unknown network mechanisms for DNA sequencing-based microscopy. Nanoscale, 15(18), 8153–8157. Full text

Contact

[dfb@kth.se]

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

network_spatial_coherence-0.2.27.tar.gz (4.8 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

network_spatial_coherence-0.2.27-py3-none-any.whl (4.8 MB view details)

Uploaded Python 3

File details

Details for the file network_spatial_coherence-0.2.27.tar.gz.

File metadata

File hashes

Hashes for network_spatial_coherence-0.2.27.tar.gz
Algorithm Hash digest
SHA256 cddcbae9d94c6a1dc00e7ea141c54984865599f0e8c104dd5524a28952497001
MD5 a6fb32d76d8243f563bbdc530849b863
BLAKE2b-256 3f54ea8cd57f895cba6cc8ad92716998ce931ae550f12ab52337c98d495e2856

See more details on using hashes here.

File details

Details for the file network_spatial_coherence-0.2.27-py3-none-any.whl.

File metadata

File hashes

Hashes for network_spatial_coherence-0.2.27-py3-none-any.whl
Algorithm Hash digest
SHA256 8b322be51a12589b48d1230c581dd6c259e503b8eaa6701387ddac22c3f3d45e
MD5 0a7ca4e65c7b849de9874d6f3d3d7eeb
BLAKE2b-256 1c7759fd2529593f8fad5efd83da3ad5ef118b8de9f44042035ea19e1c0e3a2b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page