class_docstr: Implements a general heavy-tail Lambert W x F distribution.
  
  Lambert W x F random variables are a transformed version of a random variables
  with distribution F that have heavier tails. In particular, they are defined
  as a (non-linear) transformation of random variables X with distribution F.
  It therefore is straightforward to implement Lambert W x F distributions as a
  particular TransformedDistribution, where the input can be specified by user
  as any TensorFlow Distribution class.
  
  ### Mathematical Details
  
  Let X be a random variable following distribution F with mean mu
  and standard deviation sigma, define as U = (X-mu)/sigma its zero-mean,
  unit-variance version. Then
  
  Y = (U * exp (delta/2 * U^2)) * sigma + mu
  
  is a location-scale heavy-tailed Lambert W x F with parameters mu,
  sigma and delta, where delta can take any non-negative real value. In
  particular, for delta = 0, the Lambert W x F distribution reduces to the
  F distribution. That is F distributions are a subset of Lambert W x
  F distributions.
  
  See `tfp.bijectors.LambertWTail` for details on the transformation.
  
  ### References:
  [1]: Goerg, G.M., 2011. Lambert W random variables - a new family of
  generalized skewed distributions with applications to risk estimation.
  The Annals of Applied Statistics, 5(3), pp.2197-2230.
  [2]: Goerg, G.M., 2015. The Lambert way to Gaussianize heavy-tailed data with
  the inverse of Tukey's h transformation as a special case. The Scientific
  World Journal.
class_docstr_tok: ["Implements","a","general","heavy-tail","Lambert","W","x","F","distribution",".","Lambert","W","x","F","random","variables","are","a","transformed","version","of","a","random","variables","with","distribution","F","that","have","heavier","tails",".","In","particular",",","they","are","defined","as","a","(","non-linear",")","transformation","of","random","variables","X","with","distribution","F.","It","therefore","is","straightforward","to","implement","Lambert","W","x","F","distributions","as","a","particular","TransformedDistribution",",","where","the","input","can","be","specified","by","user","as","any","TensorFlow","Distribution","class",".","#","#","#","Mathematical","Details","Let","X","be","a","random","variable","following","distribution","F","with","mean","mu","and","standard","deviation","sigma",",","define","as","U","=","(","X-mu",")","\/sigma","its","zero-mean",",","unit-variance","version",".","Then","Y","=","(","U","*","exp","(","delta\/2","*","U^2",")",")","*","sigma","+","mu","is","a","location-scale","heavy-tailed","Lambert","W","x","F","with","parameters","mu",",","sigma","and","delta",",","where","delta","can","take","any","non-negative","real","value",".","In","particular",",","for","delta","=","0",",","the","Lambert","W","x","F","distribution","reduces","to","the","F","distribution",".","That","is","F","distributions","are","a","subset","of","Lambert","W","x","F","distributions",".","See","`","tfp.bijectors.LambertWTail","`","for","details","on","the","transformation",".","#","#","#","References",":","[","1","]",":","Goerg",",","G.M.",",","2011",".","Lambert","W","random","variables","-","a","new","family","of","generalized","skewed","distributions","with","applications","to","risk","estimation",".","The","Annals","of","Applied","Statistics",",","5","(","3",")",",","pp.2197-2230",".","[","2","]",":","Goerg",",","G.M.",",","2015",".","The","Lambert","way","to","Gaussianize","heavy-tailed","data","with","the","inverse","of","Tukey","'s","h","transformation","as","a","special","case",".","The","Scientific","World","Journal","."]
docstr: Initializes the class.
  
  Args:
    distribution: `tf.Distribution`-like instance. Distribution F that is
      transformed to produce this Lambert W x F distribution.
    shift: shift that should be applied before & after tail transformation.
      For a location-scale family `distribution` (e.g., `Normal` or
      `StudentT`) this usually is set as the mean / location parameter. For a
      scale family `distribution` (e.g., `Gamma` or `Fisher`) this must be
      set to 0 to guarantee a proper transformation on the positive
      real-line.
    scale: scaling factor that should be applied before & after the tail
      trarnsformation.  Usually the standard deviation or scaling parameter
      of the `distribution`.
    tailweight: Tail parameter `delta` of the resulting Lambert W x F
      distribution(s).
    validate_args: Python `bool`, default `False`. When `True` distribution
      parameters are checked for validity despite possibly degrading runtime
      performance. When `False` invalid inputs may silently render incorrect
      outputs.
    allow_nan_stats: Python `bool`, default `True`. When `True`,
      statistics (e.g., mean, mode, variance) use the value '`NaN`' to
      indicate the result is undefined. When `False`, an exception is raised
      if one or more of the statistic's batch members are undefined.
    name: A name for the operation (optional).
docstr_tok: ["Initializes","the","class",".","Args",":","distribution",":","`","tf.Distribution","`","-like","instance",".","Distribution","F","that","is","transformed","to","produce","this","Lambert","W","x","F","distribution",".","shift",":","shift","that","should","be","applied","before","&","after","tail","transformation",".","For","a","location-scale","family","`","distribution","`","(","e.g.",",","`","Normal","`","or","`","StudentT","`",")","this","usually","is","set","as","the","mean","\/","location","parameter",".","For","a","scale","family","`","distribution","`","(","e.g.",",","`","Gamma","`","or","`","Fisher","`",")","this","must","be","set","to","0","to","guarantee","a","proper","transformation","on","the","positive","real-line",".","scale",":","scaling","factor","that","should","be","applied","before","&","after","the","tail","trarnsformation",".","Usually","the","standard","deviation","or","scaling","parameter","of","the","`","distribution","`",".","tailweight",":","Tail","parameter","`","delta","`","of","the","resulting","Lambert","W","x","F","distribution","(","s",")",".","validate_args",":","Python","`","bool","`",",","default","`","False","`",".","When","`","True","`","distribution","parameters","are","checked","for","validity","despite","possibly","degrading","runtime","performance",".","When","`","False","`","invalid","inputs","may","silently","render","incorrect","outputs",".","allow_nan_stats",":","Python","`","bool","`",",","default","`","True","`",".","When","`","True","`",",","statistics","(","e.g.",",","mean",",","mode",",","variance",")","use","the","value","'","`","NaN","`","'","to","indicate","the","result","is","undefined",".","When","`","False","`",",","an","exception","is","raised","if","one","or","more","of","the","statistic","'s","batch","members","are","undefined",".","name",":","A","name","for","the","operation","(","optional",")","."]
code: def __init__(
      self,
      distribution,
      shift,
      scale,
      tailweight=None,
      validate_args=False,
      allow_nan_stats=True,
      name="LambertWDistribution",
  ):
      """Initializes the class.
  
      Args:
        distribution: `tf.Distribution`-like instance. Distribution F that is
          transformed to produce this Lambert W x F distribution.
        shift: shift that should be applied before & after tail transformation.
          For a location-scale family `distribution` (e.g., `Normal` or
          `StudentT`) this usually is set as the mean / location parameter. For a
          scale family `distribution` (e.g., `Gamma` or `Fisher`) this must be
          set to 0 to guarantee a proper transformation on the positive
          real-line.
        scale: scaling factor that should be applied before & after the tail
          trarnsformation.  Usually the standard deviation or scaling parameter
          of the `distribution`.
        tailweight: Tail parameter `delta` of the resulting Lambert W x F
          distribution(s).
        validate_args: Python `bool`, default `False`. When `True` distribution
          parameters are checked for validity despite possibly degrading runtime
          performance. When `False` invalid inputs may silently render incorrect
          outputs.
        allow_nan_stats: Python `bool`, default `True`. When `True`,
          statistics (e.g., mean, mode, variance) use the value '`NaN`' to
          indicate the result is undefined. When `False`, an exception is raised
          if one or more of the statistic's batch members are undefined.
        name: A name for the operation (optional).
      """
      parameters = dict(locals())
      with tf.name_scope(name) as name:
          dtype = dtype_util.common_dtype(
              [tailweight, shift, scale], tf.float32
          )
          tailweight = 0.0 if tailweight is None else tailweight
          self._tailweight = tensor_util.convert_nonref_to_tensor(
              tailweight, name="tailweight", dtype=dtype
          )
          self._shift = tensor_util.convert_nonref_to_tensor(
              shift, name="shift", dtype=dtype
          )
          self._scale = tensor_util.convert_nonref_to_tensor(
              scale, name="scale", dtype=dtype
          )
          dtype_util.assert_same_float_dtype(
              (self.tailweight, self.shift, self.scale)
          )
          self._allow_nan_stats = allow_nan_stats
          super(LambertWDistribution, self).__init__(
              distribution=distribution,
              bijector=lambertw_transform.LambertWTail(
                  shift=shift,
                  scale=scale,
                  tailweight=tailweight,
                  validate_args=validate_args,
              ),
              parameters=parameters,
              validate_args=validate_args,
              name=name,
          )
  
imports: import numpy
  import tensorflow.compat.v2
  from tensorflow_probability.python.bijectors import identity
  from tensorflow_probability.python.bijectors import lambertw_transform
  from tensorflow_probability.python.bijectors import softplus
  from tensorflow_probability.python.distributions import normal
  from tensorflow_probability.python.distributions import transformed_distribution
  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 tensor_util
label_desc: Use image node_id 1 to create a new LambertWDistribution object from inherited base classes: transformed_distribution with example: obj = LambertWDistribution(distribution, shift, scale, tailweight, validate_args, allow_nan_stats, name)