pointpats.l

pointpats.l(coordinates, support=None, permutations=9999, distances=None, metric='euclidean', edge_correction=None, linearized=False)[source]

Ripley’s L function

This is a scaled and shifted version of the K function that accounts for the K function’s increasing expected value as distances increase. This means that the L function, for a completely random pattern, should be close to zero at all distance values in the support.

Parameters:
coordinatesnumpy.ndarray, (n,2)

input coordinates to function

supporttuple of length 1, 2, or 3, int, or numpy.ndarray

tuple, encoding (stop,), (start, stop), or (start, stop, num) int, encoding number of equally-spaced intervals numpy.ndarray, used directly within numpy.histogram

distances: numpy.ndarray, (n, p) or (p,)

distances from every point in a random point set of size p to some point in coordinates

metric: str or callable

distance metric to use when building search tree

hull: bounding box, scipy.spatial.ConvexHull, shapely.geometry.Polygon

the hull used to construct a random sample pattern, if distances is None

edge_correction: bool or str

whether or not to conduct edge correction. Not yet implemented.

linearizedbool

whether or not to subtract l from its expected value (support) at each distance bin. This centers the l function on zero for all distances. Proposed by Besag (1977)

Returns:
a tuple containing the support values used to evalute the function
and the values of the function at each distance value in the support.