class_docstr: Gamma-Gamma distribution.
  
  Gamma-Gamma is a [compound
  distribution](https://en.wikipedia.org/wiki/Compound_probability_distribution)
  defined over positive real numbers using parameters `concentration`,
  `mixing_concentration` and `mixing_rate`.
  
  This distribution is also referred to as the beta of the second kind (B2), and
  can be useful for transaction value modeling, as [(Fader and Hardi, 2013)][1].
  
  #### Mathematical Details
  
  It is derived from the following Gamma-Gamma hierarchical model by integrating
  out the random variable `beta`.
  
  ```none
      beta ~ Gamma(alpha0, beta0)
  X | beta ~ Gamma(alpha, beta)
  ```
  where
  * `concentration = alpha`
  * `mixing_concentration = alpha0`
  * `mixing_rate = beta0`
  
  The probability density function (pdf) is
  
  ```none
                                         x**(alpha - 1)
  pdf(x; alpha, alpha0, beta0) = ---------------------------------
                                 Z * (x + beta0)**(alpha + alpha0)
  ```
  where the normalizing constant `Z = Beta(alpha, alpha0) * beta0**(-alpha0)`.
  
  Samples of this distribution are reparameterized as samples of the Gamma
  distribution are reparameterized using the technique described in
  [(Figurnov et al., 2018)][2].
  
  #### References
  
  [1]: Peter S. Fader, Bruce G. S. Hardi. The Gamma-Gamma Model of Monetary
       Value. _Technical Report_, 2013.
       http://www.brucehardie.com/notes/025/gamma_gamma.pdf
  
  [2]: Michael Figurnov, Shakir Mohamed, Andriy Mnih.
       Implicit Reparameterization Gradients. _arXiv preprint arXiv:1805.08498_,
       2018. https://arxiv.org/abs/1805.08498
class_docstr_tok: ["Gamma-Gamma","distribution",".","Gamma-Gamma","is","a","[","compound","distribution","]","(","https",":","\/\/en.wikipedia.org\/wiki\/Compound_probability_distribution",")","defined","over","positive","real","numbers","using","parameters","`","concentration","`",",","`","mixing_concentration","`","and","`","mixing_rate","`",".","This","distribution","is","also","referred","to","as","the","beta","of","the","second","kind","(","B2",")",",","and","can","be","useful","for","transaction","value","modeling",",","as","[","(","Fader","and","Hardi",",","2013",")","]","[","1","]",".","#","#","#","#","Mathematical","Details","It","is","derived","from","the","following","Gamma-Gamma","hierarchical","model","by","integrating","out","the","random","variable","`","beta","`",".","``","`","none","beta","~","Gamma","(","alpha0",",","beta0",")","X","|","beta","~","Gamma","(","alpha",",","beta",")","``","`","where","*","`","concentration","=","alpha","`","*","`","mixing_concentration","=","alpha0","`","*","`","mixing_rate","=","beta0","`","The","probability","density","function","(","pdf",")","is","``","`","none","x","*","*","(","alpha","-","1",")","pdf","(","x",";","alpha",",","alpha0",",","beta0",")","=","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","-","Z","*","(","x","+","beta0",")","*","*","(","alpha","+","alpha0",")","``","`","where","the","normalizing","constant","`","Z","=","Beta","(","alpha",",","alpha0",")","*","beta0","*","*","(","-alpha0",")","`",".","Samples","of","this","distribution","are","reparameterized","as","samples","of","the","Gamma","distribution","are","reparameterized","using","the","technique","described","in","[","(","Figurnov","et","al.",",","2018",")","]","[","2","]",".","#","#","#","#","References","[","1","]",":","Peter","S.","Fader",",","Bruce","G.","S.","Hardi",".","The","Gamma-Gamma","Model","of","Monetary","Value",".","_Technical","Report_",",","2013.","http",":","\/\/www.brucehardie.com\/notes\/025\/gamma_gamma.pdf","[","2","]",":","Michael","Figurnov",",","Shakir","Mohamed",",","Andriy","Mnih",".","Implicit","Reparameterization","Gradients",".","_arXiv","preprint","arXiv:1805.08498_",",","2018.","https",":","\/\/arxiv.org\/abs\/1805.08498"]
code: def _event_shape(self):
      return tf.TensorShape([])
  
imports: import numpy
  import tensorflow.compat.v2
  from tensorflow_probability.python.bijectors import exp
  from tensorflow_probability.python.bijectors import softplus
  from tensorflow_probability.python.distributions import distribution
  from tensorflow_probability.python.distributions import gamma
  from tensorflow_probability.python.internal import assert_util
  from tensorflow_probability.python.internal import distribution_util
  from tensorflow_probability.python.internal import dtype_util
  from tensorflow_probability.python.internal import parameter_properties
  from tensorflow_probability.python.internal import reparameterization
  from tensorflow_probability.python.internal import samplers
  from tensorflow_probability.python.internal import tensor_util
  from tensorflow_probability.python.math import special
label_desc: Use image node_id 7 for calling the GammaGamma obj's underlying member method code with example usage: obj._event_shape() and returns: tf