pointpats.Kenv¶
-
class
pointpats.
Kenv
(pp, intervals=10, dmin=0.0, dmax=None, d=None, pct=0.05, realizations=None)[source]¶ Simulation envelope for K function.
- Parameters
- pp
PointPattern
Point Pattern instance.
- intervalsint
The length of distance domain sequence. Default is 10.
- dminfloat
The minimum of the distance domain.
- dmaxfloat
Upper limit of distance range. If dmax is None, dmax will be set to maximum nearest neighbor distance.
- dsequence
The distance domain sequence. If d is specified, intervals, dmin and dmax are ignored.
- pctfloat
1-alpha, alpha is the significance level. Default is 0.05, which means 95% confidence level for the envelope.
- realizations: :class:`.PointProcess`
Point process instance with more than 1 realizations.
- pp
Examples
>>> import libpysal as ps >>> from pointpats import Kenv, PoissonPointProcess, Window >>> from libpysal.cg import shapely_ext >>> va = ps.io.open(ps.examples.get_path("vautm17n.shp")) >>> polys = [shp for shp in va] >>> state = shapely_ext.cascaded_union(polys) >>> pp = PoissonPointProcess(Window(state.parts), 100, 1, asPP=True).realizations[0] >>> csrs = PoissonPointProcess(pp.window, 100, 100, asPP=True) >>> kenv = Kenv(pp, realizations=csrs) >>> kenv.plot()
- Attributes
- namestring
Name of the function. (“G”, “F”, “J”, “K” or “L”)
- observedarray
A 2-dimensional numpy array of 2 columns. The first column is the distance domain sequence for the observed point pattern. The second column is K function for the observed point pattern.
- lowarray
A 1-dimensional numpy array. Lower bound of the simulation envelope.
- higharray
A 1-dimensional numpy array. Higher bound of the simulation envelope.
- meanarray
A 1-dimensional numpy array. Mean values of the simulation envelope.
-
__init__
(self, pp, intervals=10, dmin=0.0, dmax=None, d=None, pct=0.05, realizations=None)[source]¶ Initialize self. See help(type(self)) for accurate signature.
Methods
__init__
(self, pp[, intervals, dmin, dmax, …])Initialize self.
calc
(self, *args, **kwargs)mapper
(self, realizations)plot
(self)-
mapper
(self, realizations)¶
-
plot
(self)¶