nemos.observation_models.GammaObservations.sample_generator#

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

Sample from the Gamma distribution.

This method generates random numbers from a Gamma distribution based on the given predicted_rate and scale.

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]) – The scale parameter for the distribution.

Returns:

Random numbers generated from the Gamma distribution based on the predicted_rate and the scale.

Return type:

jnp.ndarray