class_docstr: Computes a covariance matrix based on the Arc Kernel
  (https://arxiv.org/abs/1409.4011) between inputs :math:`\mathbf{x_1}`
  and :math:`\mathbf{x_2}`. First it applies a cylindrical embedding:
  
  .. math::
      g_{i}(\mathbf{x}) = \begin{cases}
      [0, 0]^{T} & \delta_{i}(\mathbf{x}) = \text{false}\\
      \omega_{i} \left[ \sin{\pi\rho_{i}\frac{x_{i}}{u_{i}-l_{i}}},
      \cos{\pi\rho_{i}\frac{x_{i}}{u_{i}-l_{i}}} \right] & \text{otherwise}
      \end{cases}
  
  where
  * :math:`\rho` is the angle parameter.
  * :math:`\omega` is a radius parameter.
  
  then the kernel is built with the particular covariance function, e.g.
  
  .. math::
      \begin{equation}
      k_{i}(\mathbf{x}, \mathbf{x'}) =
      \sigma^{2}\exp \left(-\frac{1}{2}d_{i}(\mathbf{x}, \mathbf{x^{'}}) \right)^{2}
      \end{equation}
  
  and the produt between dimensions
  
  .. math::
      \begin{equation}
      k_{i}(\mathbf{x}, \mathbf{x'}) =
      \sigma^{2}\exp \left(-\frac{1}{2}d_{i}(\mathbf{x}, \mathbf{x^{'}}) \right)^{2}
      \end{equation}
  
  .. note::
      This kernel does not have an `outputscale` parameter. To add a scaling
      parameter, decorate this kernel with a
      :class:`gpytorch.kernels.ScaleKernel`.
      When using with an input of `b x n x d` dimensions, decorate this
      kernel with :class:`gpytorch.kernel.ProductStructuredKernel , setting
      the number of dims, `num_dims to d.`
  
  .. note::
      This kernel does not have an ARD lengthscale option.
  
  :param base_kernel: (Default :obj:`gpytorch.kernels.MaternKernel(nu=2.5)`.)
      The euclidean covariance of choice.
  :type base_kernel: :obj:`~gpytorch.kernels.Kernel`
  :param ard_num_dims: (Default `None`.) The number of dimensions to compute the kernel for.
      The kernel has two parameters which are individually defined for each
      dimension, defaults to None
  :type ard_num_dims: int, optional
  :param angle_prior: Set this if you want to apply a prior to the period angle parameter.
  :type angle_prior: :obj:`~gpytorch.priors.Prior`, optional
  :param radius_prior: Set this if you want to apply a prior to the lengthscale parameter.
  :type radius_prior: :obj:`~gpytorch.priors.Prior`, optional
  
  :var torch.Tensor radius: The radius parameter. Size = `*batch_shape  x 1`.
  :var torch.Tensor angle: The period angle parameter. Size = `*batch_shape  x 1`.
  
  Example:
      >>> x = torch.randn(10, 5)
      >>> # Non-batch: Simple option
      ... base_kernel = gpytorch.kernels.MaternKernel(nu=2.5)
      >>> base_kernel.raw_lengthscale.requires_grad_(False)
      >>> covar_module = gpytorch.kernels.ProductStructureKernel(
              gpytorch.kernels.ScaleKernel(
                  ArcKernel(base_kernel,
                            angle_prior=gpytorch.priors.GammaPrior(0.5,1),
                            radius_prior=gpytorch.priors.GammaPrior(3,2),
                            ard_num_dims=x.shape[-1])),
              num_dims=x.shape[-1])
      >>> covar = covar_module(x)
      >>> print(covar.shape)
      >>> # Now with batch
      >>> covar_module = gpytorch.kernels.ProductStructureKernel(
              gpytorch.kernels.ScaleKernel(
                  ArcKernel(base_kernel,
                            angle_prior=gpytorch.priors.GammaPrior(0.5,1),
                            radius_prior=gpytorch.priors.GammaPrior(3,2),
                            ard_num_dims=x.shape[-1])),
              num_dims=x.shape[-1])
      >>> covar = covar_module(x
      >>> print(covar.shape)
class_docstr_tok: ["Computes","a","covariance","matrix","based","on","the","Arc","Kernel","(","https",":","\/\/arxiv.org\/abs\/1409.4011",")","between","inputs",":","math",":","`","\\mathbf","{","x_1","}","`","and",":","math",":","`","\\mathbf","{","x_2","}","`",".","First","it","applies","a","cylindrical","embedding",":","..","math",":",":","g_","{","i","}","(","\\mathbf","{","x","}",")","=","\\begin","{","cases","}","[","0",",","0","]","^","{","T","}","&","\\delta_","{","i","}","(","\\mathbf","{","x","}",")","=","\\text","{","false","}","\\\\","\\omega_","{","i","}","\\left","[","\\sin","{","\\pi\\rho_","{","i","}","\\frac","{","x_","{","i","}","}","{","u_","{","i","}","-l_","{","i","}","}","}",",","\\cos","{","\\pi\\rho_","{","i","}","\\frac","{","x_","{","i","}","}","{","u_","{","i","}","-l_","{","i","}","}","}","\\right","]","&","\\text","{","otherwise","}","\\end","{","cases","}","where","*",":","math",":","`","\\rho","`","is","the","angle","parameter",".","*",":","math",":","`","\\omega","`","is","a","radius","parameter",".","then","the","kernel","is","built","with","the","particular","covariance","function",",","e.g",".","..","math",":",":","\\begin","{","equation","}","k_","{","i","}","(","\\mathbf","{","x","}",",","\\mathbf","{","x","'","}",")","=","\\sigma^","{","2","}","\\exp","\\left","(","-\\frac","{","1","}","{","2","}","d_","{","i","}","(","\\mathbf","{","x","}",",","\\mathbf","{","x^","{","'","}","}",")","\\right",")","^","{","2","}","\\end","{","equation","}","and","the","produt","between","dimensions","..","math",":",":","\\begin","{","equation","}","k_","{","i","}","(","\\mathbf","{","x","}",",","\\mathbf","{","x","'","}",")","=","\\sigma^","{","2","}","\\exp","\\left","(","-\\frac","{","1","}","{","2","}","d_","{","i","}","(","\\mathbf","{","x","}",",","\\mathbf","{","x^","{","'","}","}",")","\\right",")","^","{","2","}","\\end","{","equation","}","..","note",":",":","This","kernel","does","not","have","an","`","outputscale","`","parameter",".","To","add","a","scaling","parameter",",","decorate","this","kernel","with","a",":","class",":","`","gpytorch.kernels.ScaleKernel","`",".","When","using","with","an","input","of","`","b","x","n","x","d","`","dimensions",",","decorate","this","kernel","with",":","class",":","`","gpytorch.kernel.ProductStructuredKernel",",","setting","the","number","of","dims",",","`","num_dims","to","d.","`","..","note",":",":","This","kernel","does","not","have","an","ARD","lengthscale","option",".",":","param","base_kernel",":","(","Default",":","obj",":","`","gpytorch.kernels.MaternKernel","(","nu=2.5",")","`",".",")","The","euclidean","covariance","of","choice",".",":","type","base_kernel",":",":","obj",":","`","~gpytorch.kernels.Kernel","`",":","param","ard_num_dims",":","(","Default","`","None","`",".",")","The","number","of","dimensions","to","compute","the","kernel","for",".","The","kernel","has","two","parameters","which","are","individually","defined","for","each","dimension",",","defaults","to","None",":","type","ard_num_dims",":","int",",","optional",":","param","angle_prior",":","Set","this","if","you","want","to","apply","a","prior","to","the","period","angle","parameter",".",":","type","angle_prior",":",":","obj",":","`","~gpytorch.priors.Prior","`",",","optional",":","param","radius_prior",":","Set","this","if","you","want","to","apply","a","prior","to","the","lengthscale","parameter",".",":","type","radius_prior",":",":","obj",":","`","~gpytorch.priors.Prior","`",",","optional",":","var","torch.Tensor","radius",":","The","radius","parameter",".","Size","=","`","*","batch_shape","x","1","`",".",":","var","torch.Tensor","angle",":","The","period","angle","parameter",".","Size","=","`","*","batch_shape","x","1","`",".","Example",":",">",">",">","x","=","torch.randn","(","10",",","5",")",">",">",">","#","Non-batch",":","Simple","option","...","base_kernel","=","gpytorch.kernels.MaternKernel","(","nu=2.5",")",">",">",">","base_kernel.raw_lengthscale.requires_grad_","(","False",")",">",">",">","covar_module","=","gpytorch.kernels.ProductStructureKernel","(","gpytorch.kernels.ScaleKernel","(","ArcKernel","(","base_kernel",",","angle_prior=gpytorch.priors.GammaPrior","(","0.5,1",")",",","radius_prior=gpytorch.priors.GammaPrior","(","3,2",")",",","ard_num_dims=x.shape","[","-1","]",")",")",",","num_dims=x.shape","[","-1","]",")",">",">",">","covar","=","covar_module","(","x",")",">",">",">","print","(","covar.shape",")",">",">",">","#","Now","with","batch",">",">",">","covar_module","=","gpytorch.kernels.ProductStructureKernel","(","gpytorch.kernels.ScaleKernel","(","ArcKernel","(","base_kernel",",","angle_prior=gpytorch.priors.GammaPrior","(","0.5,1",")",",","radius_prior=gpytorch.priors.GammaPrior","(","3,2",")",",","ard_num_dims=x.shape","[","-1","]",")",")",",","num_dims=x.shape","[","-1","]",")",">",">",">","covar","=","covar_module","(","x",">",">",">","print","(","covar.shape",")"]
code: def _set_angle(self, value):
      if not torch.is_tensor(value):
          value = torch.as_tensor(value).to(self.raw_angle)
      self.initialize(
          raw_angle=self.raw_angle_constraint.inverse_transform(value)
      )
  
file_path: gpytorch/gpytorch/kernels/arc_kernel.py
imports: from math import pi
  from typing import Callable, Optional
  import torch
  from ..constraints import Interval, Positive
  from ..priors import Prior
  from .kernel import Kernel
label_desc: Use image node_id 4 for calling the ArcKernel obj's underlying member method code with example usage: obj._set_angle(value) without return types