MixedPoissonProcess¶
- class samplepaths.continuous.MixedPoissonProcess(*, rate_func, rate_args=None, rate_kwargs=None, rng=None)[source]¶
Bases:
PoissonProcessMixed poisson process.
A mixed poisson process is a Poisson process for which the rate is a scalar random variate. The sample method will generate a random variate for the rate before generating a Poisson process realization with the rate. A Poisson process with rate \(\lambda\) is a count of occurrences of i.i.d. exponential random variables with mean \(1/\lambda\). Use the
rateattribute to get the most recently generated random rate.- Parameters:
- property rng: Generator¶
Random number generator used by the process.
This is the generator passed at instantiation, or the package default
samplepaths.random.generatorwhen none was given.
- sample_paths(n, paths, workers=1)¶
Generate several independent realizations at once.
The realizations have the distribution of those of
sample(). Many processes generate them together, which is much faster than callingsample()repeatedly. For a given seed, the values differ from those of repeated calls tosample(), because the random numbers are drawn in a different order.With
workersgreater than one, the realizations are generated on that many threads, each with its own generator derived from the generator of the process. The result is reproducible for a given seed and number of workers, and differs between numbers of workers. Processes which generate their realizations one after the other ignoreworkers.