Network.
simulate_observations
(count, distribution='uniform')[源代码]¶在网络上生成模拟点模式。
参数: |
|
---|---|
返回: |
|
实例
>>> import pysal.explore.spaghetti as spgh
>>> ntw = spgh.Network(examples.get_path('streets.shp'))
>>> ntw.snapobservations(examples.get_path('crimes.shp'),
... 'crimes',
... attribute=True)
>>> npts = ntw.pointpatterns['crimes'].npoints
>>> sim = ntw.simulate_observations(npts)
>>> isinstance(sim, spgh.network.SimulatedPointPattern)
True