TF 2.0 is out! Get hands-on practice at TF World, Oct 28-31. Use code TF20 for 20% off select passes. Register now

tfp.edward2.Dirichlet

View source on GitHub

Create a random variable for Dirichlet.

Aliases:

tfp.edward2.Dirichlet(
    *args,
    **kwargs
)

See Dirichlet for more details.

Returns:

RandomVariable.

Original Docstring for Distribution

Initialize a batch of Dirichlet distributions.

Args:

  • concentration: Positive floating-point Tensor indicating mean number of class occurrences; aka "alpha". Implies self.dtype, and self.batch_shape, self.event_shape, i.e., if concentration.shape = [N1, N2, ..., Nm, k] then batch_shape = [N1, N2, ..., Nm] and event_shape = [k].
  • 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.