Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(doc) add inline docstring for the equation of L function #53

Merged
merged 2 commits into from
Apr 23, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion doc/_static/references.bib
Original file line number Diff line number Diff line change
@@ -1,13 +1,26 @@
%% This BibTeX bibliography file was created using BibDesk.
%% https://bibdesk.sourceforge.io/

%% Created for weikang at 2019-11-20 20:52:19 -0800
%% Created for weikang at 2020-04-22 14:18:22 -0700


%% Saved with string encoding Unicode (UTF-8)



@inbook{Sullivan2010,
Author = {O'Sullivan, D. and Unwin, D. J.},
Booktitle = {Geographic Information Analysis},
Chapter = {5},
Date-Added = {2020-04-22 14:18:04 -0700},
Date-Modified = {2020-04-22 14:18:21 -0700},
Doi = {10.1002/9780470549094.ch5},
Pages = {121-156},
Publisher = {John Wiley \& Sons, Ltd},
Title = {Point Pattern Analysis},
Year = {2010},
Bdsk-Url-1 = {https://doi.org/10.1002/9780470549094.ch5}}

@article{Baker:2004,
Author = {Baker, Rose D},
Date-Added = {2019-11-20 20:48:20 -0800},
Expand Down
23 changes: 22 additions & 1 deletion pointpats/distance_statistics.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ def __init__(self, pp, intervals=10, dmin=0.0, dmax=None, d=None):

class L(DStatistic):
"""
Estimates the l function for a point pattern.
Estimates the :math:`L` function for a point pattern :cite:`Sullivan2010`.

Parameters
----------
Expand All @@ -287,6 +287,27 @@ class L(DStatistic):
The distance domain sequence.
l : array
L function over d.

Notes
-----

In the analysis of planar point processes, the :math:`L` function
is a scaled version of :math:`K` function. Its estimate is also
typically compared to the value expected from a process that displays
complete spatial randomness (CSR):

.. math::

L(d) = \\sqrt{\\frac{K(d)}{\\pi}}-d

where :math:`K(d)` is the estimator for the :math:`K` function
and :math:`d` is distance.

The expectation under the null of CSR is 0 (a horizonal line at 0).
For a clustered pattern, the empirical :math:`L`
function will be above the expectation, while for a uniform pattern the
empirical function falls below the expectation.

weikang9009 marked this conversation as resolved.
Show resolved Hide resolved
"""
def __init__(self, pp, intervals=10, dmin=0.0, dmax=None, d=None):
res = _l(pp, intervals, dmin, dmax, d)
Expand Down