Open Gabinou opened 6 years ago
The current re-opened pull request only works in 1D, for callable functions and not density matrices. Two generation algorithms have been implemented: the thinning algorithm and the inversion algorithm, as described in Generating Nonhomogeneous Poisson Processes by Pasupathy.
This continuous stochastic process generates points distributed according to a density function or density matrix. Can be used to generate poisson processes whose rate function varies with time, space, or any other data space.
The user would need to supply a deterministic function, or matrix representing the density in the data space, as well as the boundaries of this data space. These can be n-dimensional. Then, points are generated using the thinning/acceptance-rejection algorithm. This necessitaets the generation of a maximum lambda value in the data space using the private method
_gen_lmax
, generating uniformly distributed points in the space with ratelmax
(inunthinned
), then rejecting these points with probability proportional to the density at each generated point (gettingthinned
).I found the NonHomogeneousPoissonProcess too dissimilar to inherit from the PoissonProcess. I hope this pull request is closer to being acceptable than my previous one.