locan.simulation.simulate_locdata.make_Matern#

locan.simulation.simulate_locdata.make_Matern(parent_intensity=1, region=(0, 1.0), cluster_mu=1, radius=1.0, clip=True, shuffle=True, seed=None)[source]#

Generate clustered point data following a Matern cluster random point process. Parent positions are distributed according to a homogeneous Poisson process with parent_intensity within the boundaries given by region expanded by the maximum radius. Each parent position is then replaced by spots of size radius with Poisson distributed points inside. Offspring from parent events that are located outside the region are included.

Parameters:
  • parent_intensity (int | float) – The intensity (points per unit region measure) of the Poisson point process for parent events.

  • region (Union[Region, _SupportsArray[dtype[Any]], _NestedSequence[_SupportsArray[dtype[Any]]], bool, int, float, complex, str, bytes, _NestedSequence[Union[bool, int, float, complex, str, bytes]]]) – The region (or support) for all features. If array-like it must provide upper and lower bounds for each feature.

  • cluster_mu (int | float) – The mean number of points of the Poisson point process for cluster(cluster_mu) events.

  • radius (float | Sequence[float]) – The radius for the spots. If tuple, the number of elements must be larger than the expected number of parents.

  • clip (bool) – If True the result will be clipped to ‘region’. If False the extended region will be kept.

  • shuffle (bool) – If True shuffle the samples.

  • seed (Union[None, int, Sequence[int], SeedSequence, BitGenerator, Generator]) – random number generation seed

Returns:

The generated samples, labels, parent_samples of shape (n_samples, n_features) and region

Return type:

tuple[npt.NDArray[np.float64], npt.NDArray[np.int64], npt.NDArray[np.float64], Region]