spacenet.point_patterns#

Pair correlation functions#

cross_pair_correlation_function

Compute the network-based pair correlation function (netPCF) or cross-pair correlation function (cross-netPCF) for populations of nodes embedded in a spatial network.

weighted_pair_correlation_function

Compute the weighted network-based pair correlation function (weighted-netPCF) between a reference population of nodes and a population of nodes with continuous marks.

dual_weighted_pair_correlation_function

Compute the dual-weighted network-based pair correlation function (dual-weighted netPCF) between two populations of nodes with continuous marks.

Correlation helper functions#

helpers.spatial_bootstrap

Compute the 95% confidence interval for the pair correlation function at each radius (and target marker, if applicable) using method of spatial bootstrap on spatial networks.

helpers.polynomial_kernel

Computes the polynomial kernel function for a given distance or array of distances.

helpers.integrated_poly_finite_kernel

Nearest-endpoint Gaussian weighted polynomial kernel integration for localised accessible space normalisation.

helpers.is_connected_filter

A helper function to check if the network is connected and filter to the largest connected component if not.

helpers.compute_contributions

Computes the local contributions to the pair correlation function for a given reference node (object_id_A) and a set of target nodes (object_indices_B) at specified radii (r).

helpers.compute_weighted_contributions

Compute the local contributions to the pair correlation function for a given reference node (object_id_A) and a set of target nodes (object_indices_B) at specified radii (r), weighted by marker contributions.

helpers.compute_contributions_parallel

Runs the compute_contributions function in parallel across multiple CPU cores for a list of object indices.

helpers.compute_weighted_contributions_parallel

Computes the local contributions to the pair correlation function for a list of reference nodes (object_indices_A) and a set of target nodes (object_indices_B) at specified radii (r), weighted by marker contributions, in parallel across multiple CPU cores.