pysal.explore.spaghetti.NetworkBase

class pysal.explore.spaghetti.NetworkBase(ntw, pointpattern, nsteps=10, permutations=99, threshold=0.5, distribution='poisson', lowerbound=None, upperbound=None)[source]

Base object for performing network analysis on a spaghetti.Network object.

Parameters:
ntw : spaghetti.Network

spaghetti Network object.

pointpattern : spaghetti.network.PointPattern

A spaghetti point pattern object.

nsteps : int

The number of steps at which the count of the nearest neighbors is computed.

permutations : int

The number of permutations to perform (default 99).

threshold : float

The level at which significance is computed. – 0.5 would be 97.5% and 2.5%

distribution : str

The distribution from which random points are sampled – uniform or poisson

lowerbound : float

The lower bound at which the function is computed. (Default 0).

upperbound : float

The upper bound at which the function is computed. Defaults to the maximum observed nearest neighbor distance.

Attributes:
sim : numpy.ndarray

simulated distance matrix

npts : int

pointpattern.npoints

xaxis : numpy.ndarray

observed x-axis of values

observed : numpy.ndarray

observed y-axis of values

Methods

computeenvelope() compute upper and lower bounds of envelope
setbounds(nearest) set upper and lower bounds
validatedistribution() enusure statistical distribution is supported
__init__(ntw, pointpattern, nsteps=10, permutations=99, threshold=0.5, distribution='poisson', lowerbound=None, upperbound=None)[source]

Initialize self. See help(type(self)) for accurate signature.

Methods

__init__(ntw, pointpattern[, nsteps, …]) Initialize self.
computeenvelope() compute upper and lower bounds of envelope
setbounds(nearest) set upper and lower bounds
validatedistribution() enusure statistical distribution is supported