locan.simulation.simulate_locdata.simulate_cluster¶
- locan.simulation.simulate_locdata.simulate_cluster(centers=3, region=(0, 1.0), expansion_distance=0, offspring=None, clip=True, shuffle=True, seed=None)[source]¶
Generate clustered point data. Parent positions are taken from centers or are distributed according to a homogeneous Poisson process with exactly centers within the boundaries given by region expanded by the expansion_distance. Each parent position is then replaced by offspring points as passed or generated by a given function. Offspring from parent events that are located outside the region are included.
- Parameters:
centers (
Union[int,_Buffer,_SupportsArray[dtype[Any]],_NestedSequence[_SupportsArray[dtype[Any]]],bool,float,complex,str,bytes,_NestedSequence[bool|int|float|complex|str|bytes]]) – The number of parents or coordinates for parent events, where each parent represents a cluster center.region (
Union[Region,_Buffer,_SupportsArray[dtype[Any]],_NestedSequence[_SupportsArray[dtype[Any]]],bool,int,float,complex,str,bytes,_NestedSequence[bool|int|float|complex|str|bytes]]) – The region (or support) for each feature. If array-like it must provide upper and lower bounds for each feature.expansion_distance (
float) – The distance by which region is expanded on all boundaries.offspring (
Union[_Buffer,_SupportsArray[dtype[Any]],_NestedSequence[_SupportsArray[dtype[Any]]],bool,int,float,complex,str,bytes,_NestedSequence[bool|int|float|complex|str|bytes],Callable[...,Any],None]) – Points or function for point process to provide cluster. Callable must take single parent point as parameter and return an iterable. If array-like it must have the same length as parent events.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 (
None|int|Sequence[int] |SeedSequence|BitGenerator|Generator) – random number generation seed
- Returns:
The generated samples.
- Return type: