dbldatagen.distributions.gamma module

This file defines the Gamma statistical distributions related classes

class Gamma(shape, scale)[source]

Bases: DataDistribution

Specify Gamma distribution with specific shape and scale

Parameters:
  • shape – shape parameter (k)

  • scale – scale parameter (theta)

See https://en.wikipedia.org/wiki/Gamma_distribution

Scaling is performed to normalize values between 0 and 1

static gamma_func(shape_series: Series, scale_series: Series, random_seed: Series) Series[source]

Pandas / Numpy based function to generate gamma samples

Parameters:
  • shape_series – pandas series of shape (k) values

  • scale_series – pandas series of scale (theta) values

  • random_seed – pandas series of random seed values

Returns:

Samples scaled from 0 .. 1

generateNormalizedDistributionSample()[source]

Generate sample of data for distribution

Returns:

random samples from distribution scaled to values between 0 and 1

property scale

Return scale parameter.

property shape

Return shape parameter.