class_docstr: The LKJ distribution on correlation matrices.
  
  This is a one-parameter family of distributions on correlation matrices.  The
  probability density is proportional to the determinant raised to the power of
  the parameter: `pdf(X; eta) = Z(eta) * det(X) ** (eta - 1)`, where `Z(eta)` is
  a normalization constant.  The uniform distribution on correlation matrices is
  the special case `eta = 1`.
  
  The distribution is named after Lewandowski, Kurowicka, and Joe, who gave a
  sampler for the distribution in [(Lewandowski, Kurowicka, Joe, 2009)][1].
  
  Note: For better numerical stability, it is recommended that you use
  `CholeskyLKJ` instead.
  
  #### Examples
  
  ```python
  # Initialize a single 3x3 LKJ with concentration parameter 1.5
  dist = tfp.distributions.LKJ(dimension=3, concentration=1.5)
  
  # Evaluate this at a batch of two observations, each in R^{3x3}.
  x = ...  # Shape is [2, 3, 3].
  dist.prob(x)  # Shape is [2].
  
  # Draw 6 LKJ-distributed 3x3 correlation matrices
  ans = dist.sample(sample_shape=[2, 3], seed=42)
  # shape of ans is [2, 3, 3, 3]
  ```
class_docstr_tok: ["The","LKJ","distribution","on","correlation","matrices",".","This","is","a","one-parameter","family","of","distributions","on","correlation","matrices",".","The","probability","density","is","proportional","to","the","determinant","raised","to","the","power","of","the","parameter",":","`","pdf","(","X",";","eta",")","=","Z","(","eta",")","*","det","(","X",")","*","*","(","eta","-","1",")","`",",","where","`","Z","(","eta",")","`","is","a","normalization","constant",".","The","uniform","distribution","on","correlation","matrices","is","the","special","case","`","eta","=","1","`",".","The","distribution","is","named","after","Lewandowski",",","Kurowicka",",","and","Joe",",","who","gave","a","sampler","for","the","distribution","in","[","(","Lewandowski",",","Kurowicka",",","Joe",",","2009",")","]","[","1","]",".","Note",":","For","better","numerical","stability",",","it","is","recommended","that","you","use","`","CholeskyLKJ","`","instead",".","#","#","#","#","Examples","``","`","python","#","Initialize","a","single","3x3","LKJ","with","concentration","parameter","1.5","dist","=","tfp.distributions.LKJ","(","dimension=3",",","concentration=1.5",")","#","Evaluate","this","at","a","batch","of","two","observations",",","each","in","R^","{","3x3","}",".","x","=","...","#","Shape","is","[","2",",","3",",","3","]",".","dist.prob","(","x",")","#","Shape","is","[","2","]",".","#","Draw","6","LKJ-distributed","3x3","correlation","matrices","ans","=","dist.sample","(","sample_shape=","[","2",",","3","]",",","seed=42",")","#","shape","of","ans","is","[","2",",","3",",","3",",","3","]","``","`"]
docstr: Returns the log normalization of an LKJ distribution.
  
  Args:
    concentration: `float` or `double` `Tensor`. The positive concentration
      parameter of the LKJ distributions.
    name: Python `str` name prefixed to Ops created by this function.
  
  Returns:
    log_z: A Tensor of the same shape and dtype as `concentration`, containing
      the corresponding log normalizers.
docstr_tok: ["Returns","the","log","normalization","of","an","LKJ","distribution",".","Args",":","concentration",":","`","float","`","or","`","double","`","`","Tensor","`",".","The","positive","concentration","parameter","of","the","LKJ","distributions",".","name",":","Python","`","str","`","name","prefixed","to","Ops","created","by","this","function",".","Returns",":","log_z",":","A","Tensor","of","the","same","shape","and","dtype","as","`","concentration","`",",","containing","the","corresponding","log","normalizers","."]
code: def _log_normalization(
      self, concentration=None, name="log_normalization"
  ):
      """Returns the log normalization of an LKJ distribution.
  
      Args:
        concentration: `float` or `double` `Tensor`. The positive concentration
          parameter of the LKJ distributions.
        name: Python `str` name prefixed to Ops created by this function.
  
      Returns:
        log_z: A Tensor of the same shape and dtype as `concentration`, containing
          the corresponding log normalizers.
      """
      # The formula is from D. Lewandowski et al [1], p. 1999, from the
      # proof that eqs 16 and 17 are equivalent.
      # Instead of using a for loop for k from 1 to (dimension - 1), we will
      # vectorize the computation by performing operations on the vector
      # `dimension_range = np.arange(1, dimension)`.
      with tf.name_scope(name or "log_normalization_lkj"):
          concentration = tf.convert_to_tensor(
              self.concentration
              if concentration is None
              else concentration
          )
          logpi = float(np.log(np.pi))
          dimension_range = np.arange(
              1.0,
              self.dimension,
              dtype=dtype_util.as_numpy_dtype(concentration.dtype),
          )
          effective_concentration = (
              concentration[..., tf.newaxis]
              + (self.dimension - 1 - dimension_range) / 2.0
          )
          ans = tf.reduce_sum(
              special.log_gamma_difference(
                  dimension_range / 2.0, effective_concentration
              ),
              axis=-1,
          )
          # Then we add to `ans` the sum of `logpi / 2 * k` for `k` run from 1 to
          # `dimension - 1`.
          ans = ans + logpi * (
              self.dimension * (self.dimension - 1) / 4.0
          )
          return ans
  
imports: import numpy
  import tensorflow.compat.v1
  import tensorflow.compat.v2
  from tensorflow_probability.python.bijectors import bijector
  from tensorflow_probability.python.bijectors import chain
  from tensorflow_probability.python.bijectors import cholesky_outer_product
  from tensorflow_probability.python.bijectors import correlation_cholesky
  from tensorflow_probability.python.bijectors import softplus
  from tensorflow_probability.python.distributions import beta
  from tensorflow_probability.python.distributions import distribution
  from tensorflow_probability.python.internal import assert_util
  from tensorflow_probability.python.internal import dtype_util
  from tensorflow_probability.python.internal import parameter_properties
  from tensorflow_probability.python.internal import prefer_static
  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.internal import tensorshape_util
  from tensorflow_probability.python.math import linalg
  from tensorflow_probability.python.math import special
  from tensorflow_probability.python.math.numeric import clip_by_value_preserve_gradient
  from tensorflow_probability.python.random import random_ops
  from tensorflow.python.ops import control_flow_util
label_desc: Use image node_id 11 for calling the LKJ obj's underlying member method code with example usage: obj._log_normalization(concentration, name) and returns: ans