nemos.observation_models.PoissonObservations.sample_generator#

PoissonObservations.sample_generator(key, predicted_rate, scale=1.0)[source]#

Sample from the Poisson distribution.

This method generates random numbers from a Poisson distribution based on the given predicted_rate.

Parameters:
  • key (Array) – Random key used for the generation of random numbers in JAX.

  • predicted_rate (Array) – Expected rate (lambda) of the Poisson distribution. Shape (n_time_bins, ), or (n_time_bins, n_neurons).

  • scale (Union[float, Array]) – Scale parameter. For Poisson should be equal to 1.

Returns:

Random numbers generated from the Poisson distribution based on the predicted_rate.

Return type:

jnp.ndarray