class_docstr: Unimodal distribution of two dependent angles on the 2-torus (S^1 ⨂ S^1) given by
  
  .. math::
  
      C^{-1}\exp(\kappa_1\cos(x-\mu_1) + \kappa_2\cos(x_2 -\mu_2) + \rho\sin(x_1 - \mu_1)\sin(x_2 - \mu_2))
  
  and
  
  .. math::
  
      C = (2\pi)^2 \sum_{i=0} {2i \choose i}
      \left(\frac{\rho^2}{4\kappa_1\kappa_2}\right)^i I_i(\kappa_1)I_i(\kappa_2),
  
  where I_i(\cdot) is the modified bessel function of first kind, mu's are the locations of the distribution,
  kappa's are the concentration and rho gives the correlation between angles x_1 and x_2.
  
  This distribution is a submodel of the Bivariate von Mises distribution, called the Sine Distribution [2] in
  directional statistics.
  
  
  This distribution is helpful for modeling coupled angles such as torsion angles in peptide chains.
  To infer parameters, use :class:`~pyro.infer.NUTS` or :class:`~pyro.infer.HMC` with priors that
  avoid parameterizations where the distribution becomes bimodal; see note below.
  
  .. note:: Sample efficiency drops as
  
      .. math::
  
          \frac{\rho}{\kappa_1\kappa_2} \rightarrow 1
  
      because the distribution becomes increasingly bimodal. To avoid bimodality use the `weighted_correlation`
      parameter with a skew away from one (e.g., Beta(1,3)). The `weighted_correlation` should be in [0,1].
  
  .. note:: The correlation and weighted_correlation params are mutually exclusive.
  
  .. note:: In the context of :class:`~pyro.infer.SVI`, this distribution can be used as a likelihood but not for
      latent variables.
  
  ** References: **
    1. Probabilistic model for two dependent circular variables Singh, H., Hnizdo, V., and Demchuck, E. (2002)
    2. Protein Bioinformatics and Mixtures of Bivariate von Mises Distributions for Angular Data,
       Mardia, K. V, Taylor, T. C., and Subramaniam, G. (2007)
  
  :param torch.Tensor phi_loc: location of first angle
  :param torch.Tensor psi_loc: location of second angle
  :param torch.Tensor phi_concentration: concentration of first angle
  :param torch.Tensor psi_concentration: concentration of second angle
  :param torch.Tensor correlation: correlation between the two angles
  :param torch.Tensor weighted_correlation: set correlation to weighted_corr * sqrt(phi_conc*psi_conc)
      to avoid bimodality (see note). The `weighted_correlation` should be in [0,1].
class_docstr_tok: ["Unimodal","distribution","of","two","dependent","angles","on","the","2-torus","(","S^1","\u2a02","S^1",")","given","by","..","math",":",":","C^","{","-1","}","\\exp","(","\\kappa_1\\cos","(","x-\\mu_1",")","+","\\kappa_2\\cos","(","x_2","-\\mu_2",")","+","\\rho\\sin","(","x_1","-","\\mu_1",")","\\sin","(","x_2","-","\\mu_2",")",")","and","..","math",":",":","C","=","(","2\\pi",")","^2","\\sum_","{","i=0","}","{","2i","\\choose","i","}","\\left","(","\\frac","{","\\rho^2","}","{","4\\kappa_1\\kappa_2","}","\\right",")","^i","I_i","(","\\kappa_1",")","I_i","(","\\kappa_2",")",",","where","I_i","(","\\cdot",")","is","the","modified","bessel","function","of","first","kind",",","mu","'s","are","the","locations","of","the","distribution",",","kappa","'s","are","the","concentration","and","rho","gives","the","correlation","between","angles","x_1","and","x_2",".","This","distribution","is","a","submodel","of","the","Bivariate","von","Mises","distribution",",","called","the","Sine","Distribution","[","2","]","in","directional","statistics",".","This","distribution","is","helpful","for","modeling","coupled","angles","such","as","torsion","angles","in","peptide","chains",".","To","infer","parameters",",","use",":","class",":","`","~pyro.infer.NUTS","`","or",":","class",":","`","~pyro.infer.HMC","`","with","priors","that","avoid","parameterizations","where","the","distribution","becomes","bimodal",";","see","note","below",".","..","note",":",":","Sample","efficiency","drops","as","..","math",":",":","\\frac","{","\\rho","}","{","\\kappa_1\\kappa_2","}","\\rightarrow","1","because","the","distribution","becomes","increasingly","bimodal",".","To","avoid","bimodality","use","the","`","weighted_correlation","`","parameter","with","a","skew","away","from","one","(","e.g.",",","Beta","(","1,3",")",")",".","The","`","weighted_correlation","`","should","be","in","[","0,1","]",".","..","note",":",":","The","correlation","and","weighted_correlation","params","are","mutually","exclusive",".","..","note",":",":","In","the","context","of",":","class",":","`","~pyro.infer.SVI","`",",","this","distribution","can","be","used","as","a","likelihood","but","not","for","latent","variables",".","*","*","References",":","*","*","1",".","Probabilistic","model","for","two","dependent","circular","variables","Singh",",","H.",",","Hnizdo",",","V.",",","and","Demchuck",",","E.","(","2002",")","2",".","Protein","Bioinformatics","and","Mixtures","of","Bivariate","von","Mises","Distributions","for","Angular","Data",",","Mardia",",","K.","V",",","Taylor",",","T.","C.",",","and","Subramaniam",",","G.","(","2007",")",":","param","torch.Tensor","phi_loc",":","location","of","first","angle",":","param","torch.Tensor","psi_loc",":","location","of","second","angle",":","param","torch.Tensor","phi_concentration",":","concentration","of","first","angle",":","param","torch.Tensor","psi_concentration",":","concentration","of","second","angle",":","param","torch.Tensor","correlation",":","correlation","between","the","two","angles",":","param","torch.Tensor","weighted_correlation",":","set","correlation","to","weighted_corr","*","sqrt","(","phi_conc","*","psi_conc",")","to","avoid","bimodality","(","see","note",")",".","The","`","weighted_correlation","`","should","be","in","[","0,1","]","."]
code: def expand(self, batch_shape, _instance=None):
      new = self._get_checked_instance(SineBivariateVonMises, _instance)
      batch_shape = torch.Size(batch_shape)
      for k in SineBivariateVonMises.arg_constraints.keys():
          setattr(new, k, getattr(self, k).expand(batch_shape))
      new.norm_const = self.norm_const.expand(batch_shape)
      super(SineBivariateVonMises, new).__init__(
          batch_shape, self.event_shape, validate_args=False
      )
      new._validate_args = self._validate_args
      return new
  
imports: import math
  import warnings
  from math import pi
  import torch
  from torch.distributions import VonMises
  from torch.distributions.utils import broadcast_all, lazy_property
  from pyro.distributions import constraints
  from pyro.distributions.torch_distribution import TorchDistribution
  from pyro.distributions.util import broadcast_shape
  from pyro.ops.special import log_I1
label_desc: Use image node_id 7 for calling the SineBivariateVonMises obj's underlying member method code with example usage: obj.expand(batch_shape, _instance) and returns: new