class_docstr: Exponential distribution.
  
  The Exponential distribution is parameterized by an event `rate` parameter.
  
  #### Mathematical Details
  
  The probability density function (pdf) is,
  
  ```none
  pdf(x; lambda, x > 0) = exp(-lambda x) / Z
  Z = 1 / lambda
  ```
  
  where `rate = lambda` and `Z` is the normalizaing constant.
  
  The Exponential distribution is a special case of the Gamma distribution,
  i.e.,
  
  ```python
  Exponential(rate) = Gamma(concentration=1., rate)
  ```
  
  The Exponential distribution uses a `rate` parameter, or "inverse scale",
  which can be intuited as,
  
  ```none
  X ~ Exponential(rate=1)
  Y = X / rate
  ```
class_docstr_tok: ["Exponential","distribution",".","The","Exponential","distribution","is","parameterized","by","an","event","`","rate","`","parameter",".","#","#","#","#","Mathematical","Details","The","probability","density","function","(","pdf",")","is",",","``","`","none","pdf","(","x",";","lambda",",","x",">","0",")","=","exp","(","-lambda","x",")","\/","Z","Z","=","1","\/","lambda","``","`","where","`","rate","=","lambda","`","and","`","Z","`","is","the","normalizaing","constant",".","The","Exponential","distribution","is","a","special","case","of","the","Gamma","distribution",",","i.e.",",","``","`","python","Exponential","(","rate",")","=","Gamma","(","concentration=1.",",","rate",")","``","`","The","Exponential","distribution","uses","a","`","rate","`","parameter",",","or","``","inverse","scale","''",",","which","can","be","intuited","as",",","``","`","none","X","~","Exponential","(","rate=1",")","Y","=","X","\/","rate","``","`"]
docstr: Construct Exponential distribution with parameter `rate`.
  
  Args:
    rate: Floating point tensor, equivalent to `1 / mean`. Must contain only
      positive values.
    force_probs_to_zero_outside_support: Python `bool`. When `True`, negative
      and non-integer values are evaluated "strictly": `cdf` returns
      `0`, `sf` returns `1`, and `log_cdf` and `log_sf` correspond.  When
      `False`, the implementation is free to save computation (and TF graph
      size) by evaluating something that matches the Exponential cdf at
      non-negative values `x` but produces an unrestricted result on
      other inputs. In the case of Exponential distribution, the `cdf`
      formula in this case happens to be the continuous function
      `1 - exp(rate * value)`.
      Note that this function is not itself a cdf function.
      Default value: `False`.
    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: Python `str` name prefixed to Ops created by this class.
docstr_tok: ["Construct","Exponential","distribution","with","parameter","`","rate","`",".","Args",":","rate",":","Floating","point","tensor",",","equivalent","to","`","1","\/","mean","`",".","Must","contain","only","positive","values",".","force_probs_to_zero_outside_support",":","Python","`","bool","`",".","When","`","True","`",",","negative","and","non-integer","values","are","evaluated","``","strictly","''",":","`","cdf","`","returns","`","0","`",",","`","sf","`","returns","`","1","`",",","and","`","log_cdf","`","and","`","log_sf","`","correspond",".","When","`","False","`",",","the","implementation","is","free","to","save","computation","(","and","TF","graph","size",")","by","evaluating","something","that","matches","the","Exponential","cdf","at","non-negative","values","`","x","`","but","produces","an","unrestricted","result","on","other","inputs",".","In","the","case","of","Exponential","distribution",",","the","`","cdf","`","formula","in","this","case","happens","to","be","the","continuous","function","`","1","-","exp","(","rate","*","value",")","`",".","Note","that","this","function","is","not","itself","a","cdf","function",".","Default","value",":","`","False","`",".","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",":","Python","`","str","`","name","prefixed","to","Ops","created","by","this","class","."]
code: def __init__(
      self,
      rate,
      force_probs_to_zero_outside_support=False,
      validate_args=False,
      allow_nan_stats=True,
      name="Exponential",
  ):
      """Construct Exponential distribution with parameter `rate`.
  
      Args:
        rate: Floating point tensor, equivalent to `1 / mean`. Must contain only
          positive values.
        force_probs_to_zero_outside_support: Python `bool`. When `True`, negative
          and non-integer values are evaluated "strictly": `cdf` returns
          `0`, `sf` returns `1`, and `log_cdf` and `log_sf` correspond.  When
          `False`, the implementation is free to save computation (and TF graph
          size) by evaluating something that matches the Exponential cdf at
          non-negative values `x` but produces an unrestricted result on
          other inputs. In the case of Exponential distribution, the `cdf`
          formula in this case happens to be the continuous function
          `1 - exp(rate * value)`.
          Note that this function is not itself a cdf function.
          Default value: `False`.
        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: Python `str` name prefixed to Ops created by this class.
      """
      parameters = dict(locals())
      # Even though all statistics of are defined for valid inputs, this is not
      # true in the parent class "Gamma."  Therefore, passing
      # allow_nan_stats=True
      # through to the parent class results in unnecessary asserts.
      with tf.name_scope(name) as name:
          self._rate = tensor_util.convert_nonref_to_tensor(
              rate,
              name="rate",
              dtype=dtype_util.common_dtype(
                  [rate], dtype_hint=tf.float32
              ),
          )
          super(Exponential, self).__init__(
              concentration=1.0,
              rate=self._rate,
              allow_nan_stats=allow_nan_stats,
              validate_args=validate_args,
              force_probs_to_zero_outside_support=(
                  force_probs_to_zero_outside_support
              ),
              name=name,
          )
          self._parameters = parameters
  
imports: import numpy
  import tensorflow.compat.v2
  from tensorflow_probability.python.bijectors import softplus
  from tensorflow_probability.python.distributions import gamma
  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 prefer_static
  from tensorflow_probability.python.internal import samplers
  from tensorflow_probability.python.internal import tensor_util
label_desc: Use image node_id 1 to create a new Exponential object from inherited base classes: gamma with example: obj = Exponential(rate, force_probs_to_zero_outside_support, validate_args, allow_nan_stats, name)