tensorflow / probability

Probabilistic reasoning and statistical analysis in TensorFlow
https://www.tensorflow.org/probability/
Apache License 2.0
4.16k stars 1.08k forks source link

Addition of "location" type parameter in the Gamma distribution #1805

Open ikrommyd opened 2 months ago

ikrommyd commented 2 months ago

Adding a loc type parameter to the Gamma distribution like scipy has would be beneficial. It is relatively common in physcs for people to use the Gamma distribution and data shifts are always important in such things. @jonas-eschle

SiegeLordEx commented 2 months ago

You can use the TransformedDistribution to apply these transformations in the meantime (and were this to ever be added, this is how we'd implement it):

shifted_scaled_gamma = tfd.TransformedDistribution(tfd.Gamma(...), [tfb.Shift(loc), tfb.Scale(scale)])
ikrommyd commented 2 months ago

Thanks a lot for the suggestion. Great concept!