class_docstr: The von Mises distribution over angles.
  
  The von Mises distribution is a univariate directional distribution.
  Similarly to Normal distribution, it is a maximum entropy distribution.
  The samples of this distribution are angles, measured in radians.
  They are 2 pi-periodic: x = 0 and x = 2pi are equivalent.
  This means that the density is also 2 pi-periodic.
  The generated samples, however, are guaranteed to be in [-pi, pi) range.
  
  When `concentration = 0`, this distribution becomes a Uniform distribuion on
  the [-pi, pi) domain.
  
  The von Mises distribution is a special case of von Mises-Fisher distribution
  for n=2. However, the TFP's VonMisesFisher implementation represents the
  samples and location as (x, y) points on a circle, while VonMises represents
  them as scalar angles.
  
  #### Mathematical details
  
  The probability density function (pdf) of this distribution is,
  
  ```none
  pdf(x; loc, concentration) = exp(concentration cos(x - loc)) / Z
  Z = 2 * pi * I_0 (concentration)
  ```
  
  where:
  * `I_0 (concentration)` is the modified Bessel function of order zero;
  * `loc` the circular mean of the distribution, a scalar. It can take arbitrary
    values, but it is 2pi-periodic: loc and loc + 2pi result in the same
    distribution.
  * `concentration >= 0` parameter is the concentration parameter. When
  `concentration = 0`,
    this distribution becomes a Uniform distribution on [-pi, pi).
  
  #### Examples
  
  Examples of initialization of one or a batch of distributions.
  
  ```python
  # Create a batch of three von Mises distributions.
  loc = [1, 2, 3]
  concentration = [1, 2, 3]
  dist = tfp.distributions.VonMises(loc=[1.0, 2.0], concentration=[0.5, 2.0])
  
  dist.sample([3])  # Shape [3, 2]
  ```
  
  Arguments are broadcast when possible.
  
  ```python
  dist = tfp.distributions.VonMises(loc=1.0, concentration=[0.5, 2.0])
  
  # Evaluate the pdf of both distributions on the same point, 3.0,
  # returning a length 2 tensor.
  dist.prob(3.0)
  ```
class_docstr_tok: ["The","von","Mises","distribution","over","angles",".","The","von","Mises","distribution","is","a","univariate","directional","distribution",".","Similarly","to","Normal","distribution",",","it","is","a","maximum","entropy","distribution",".","The","samples","of","this","distribution","are","angles",",","measured","in","radians",".","They","are","2","pi-periodic",":","x","=","0","and","x","=","2pi","are","equivalent",".","This","means","that","the","density","is","also","2","pi-periodic",".","The","generated","samples",",","however",",","are","guaranteed","to","be","in","[","-pi",",","pi",")","range",".","When","`","concentration","=","0","`",",","this","distribution","becomes","a","Uniform","distribuion","on","the","[","-pi",",","pi",")","domain",".","The","von","Mises","distribution","is","a","special","case","of","von","Mises-Fisher","distribution","for","n=2",".","However",",","the","TFP","'s","VonMisesFisher","implementation","represents","the","samples","and","location","as","(","x",",","y",")","points","on","a","circle",",","while","VonMises","represents","them","as","scalar","angles",".","#","#","#","#","Mathematical","details","The","probability","density","function","(","pdf",")","of","this","distribution","is",",","``","`","none","pdf","(","x",";","loc",",","concentration",")","=","exp","(","concentration","cos","(","x","-","loc",")",")","\/","Z","Z","=","2","*","pi","*","I_0","(","concentration",")","``","`","where",":","*","`","I_0","(","concentration",")","`","is","the","modified","Bessel","function","of","order","zero",";","*","`","loc","`","the","circular","mean","of","the","distribution",",","a","scalar",".","It","can","take","arbitrary","values",",","but","it","is","2pi-periodic",":","loc","and","loc","+","2pi","result","in","the","same","distribution",".","*","`","concentration",">","=","0","`","parameter","is","the","concentration","parameter",".","When","`","concentration","=","0","`",",","this","distribution","becomes","a","Uniform","distribution","on","[","-pi",",","pi",")",".","#","#","#","#","Examples","Examples","of","initialization","of","one","or","a","batch","of","distributions",".","``","`","python","#","Create","a","batch","of","three","von","Mises","distributions",".","loc","=","[","1",",","2",",","3","]","concentration","=","[","1",",","2",",","3","]","dist","=","tfp.distributions.VonMises","(","loc=","[","1.0",",","2.0","]",",","concentration=","[","0.5",",","2.0","]",")","dist.sample","(","[","3","]",")","#","Shape","[","3",",","2","]","``","`","Arguments","are","broadcast","when","possible",".","``","`","python","dist","=","tfp.distributions.VonMises","(","loc=1.0",",","concentration=","[","0.5",",","2.0","]",")","#","Evaluate","the","pdf","of","both","distributions","on","the","same","point",",","3.0",",","#","returning","a","length","2","tensor",".","dist.prob","(","3.0",")","``","`"]
docstr: Construct von Mises distributions with given location and concentration.
  
  The parameters `loc` and `concentration` must be shaped in a way that
  supports broadcasting (e.g. `loc + concentration` is a valid operation).
  
  Args:
    loc: Floating point tensor, the circular means of the distribution(s).
    concentration: Floating point tensor, the level of concentration of the
      distribution(s) around `loc`. Must take non-negative values.
      `concentration = 0` defines a Uniform distribution, while
      `concentration = +inf` indicates a Deterministic distribution at `loc`.
    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.
  
  Raises:
    TypeError: if loc and concentration are different dtypes.
docstr_tok: ["Construct","von","Mises","distributions","with","given","location","and","concentration",".","The","parameters","`","loc","`","and","`","concentration","`","must","be","shaped","in","a","way","that","supports","broadcasting","(","e.g",".","`","loc","+","concentration","`","is","a","valid","operation",")",".","Args",":","loc",":","Floating","point","tensor",",","the","circular","means","of","the","distribution","(","s",")",".","concentration",":","Floating","point","tensor",",","the","level","of","concentration","of","the","distribution","(","s",")","around","`","loc","`",".","Must","take","non-negative","values",".","`","concentration","=","0","`","defines","a","Uniform","distribution",",","while","`","concentration","=","+inf","`","indicates","a","Deterministic","distribution","at","`","loc","`",".","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",".","Raises",":","TypeError",":","if","loc","and","concentration","are","different","dtypes","."]
code: def __init__(
      self,
      loc,
      concentration,
      validate_args=False,
      allow_nan_stats=True,
      name="VonMises",
  ):
      """Construct von Mises distributions with given location and concentration.
  
      The parameters `loc` and `concentration` must be shaped in a way that
      supports broadcasting (e.g. `loc + concentration` is a valid operation).
  
      Args:
        loc: Floating point tensor, the circular means of the distribution(s).
        concentration: Floating point tensor, the level of concentration of the
          distribution(s) around `loc`. Must take non-negative values.
          `concentration = 0` defines a Uniform distribution, while
          `concentration = +inf` indicates a Deterministic distribution at `loc`.
        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.
  
      Raises:
        TypeError: if loc and concentration are different dtypes.
      """
      parameters = dict(locals())
      with tf.name_scope(name) as name:
          dtype = dtype_util.common_dtype(
              [loc, concentration], dtype_hint=tf.float32
          )
          self._loc = tensor_util.convert_nonref_to_tensor(
              loc, name="loc", dtype=dtype
          )
          self._concentration = tensor_util.convert_nonref_to_tensor(
              concentration, name="concentration", dtype=dtype
          )
          dtype_util.assert_same_float_dtype(
              [self._loc, self._concentration]
          )
          super(VonMises, self).__init__(
              dtype=dtype,
              reparameterization_type=reparameterization.FULLY_REPARAMETERIZED,
              validate_args=validate_args,
              allow_nan_stats=allow_nan_stats,
              parameters=parameters,
              name=name,
          )
  
imports: import numpy
  import tensorflow.compat.v2
  from tensorflow_probability.python.bijectors import sigmoid
  from tensorflow_probability.python.bijectors import softplus
  from tensorflow_probability.python.distributions import distribution
  from tensorflow_probability.python.distributions import kullback_leibler
  from tensorflow_probability.python.distributions import normal
  from tensorflow_probability.python.internal import assert_util
  from tensorflow_probability.python.internal import custom_gradient
  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 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.gradient import value_and_gradient
label_desc: Use image node_id 1 to create a new VonMises object from inherited base classes: distribution with example: obj = VonMises(loc, concentration, validate_args, allow_nan_stats, name)