# pysal.explore.spaghetti.Network.NetworkF¶

Network.NetworkF(pointpattern, nsteps=10, permutations=99, threshold=0.2, distribution='uniform', lowerbound=None, upperbound=None)[source]

Computes a network constrained F-Function

Parameters: 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 F-function is computed. (Default 0). upperbound : float The upper bound at which the F-function is computed. Defaults to the maximum observed nearest neighbor distance. NetworkF : spaghetti.analysis.NetworkF A network F class instance.

Examples

>>> import pysal.explore.spaghetti as spgh
>>> ntw = spgh.Network(in_data=examples.get_path('streets.shp'))
>>> pt_str = 'crimes'
>>> in_data = examples.get_path('{}.shp'.format(pt_str))
>>> ntw.snapobservations(in_data, pt_str, attribute=True)
>>> crimes = ntw.pointpatterns['crimes']
>>> sim = ntw.simulate_observations(crimes.npoints)
>>> fres = ntw.NetworkF(crimes, permutations=5, nsteps=10)
>>> fres.lowerenvelope.shape[0]
10