class_docstr: A kernel for discrete indices. Kernel is defined by a lookup table.
  
  .. math::
  
      \begin{equation}
          k(i, j) = \left(BB^\top + \text{diag}(\mathbf v) \right)_{i, j}
      \end{equation}
  
  where :math:`B` is a low-rank matrix, and :math:`\mathbf v` is a  non-negative vector.
  These parameters are learned.
  
  Args:
      num_tasks (int):
          Total number of indices.
      batch_shape (torch.Size, optional):
          Set if the MultitaskKernel is operating on batches of data (and you want different
          parameters for each batch)
      rank (int):
          Rank of :math:`B` matrix. Controls the degree of
          correlation between the outputs. With a rank of 1 the
          outputs are identical except for a scaling factor.
      prior (:obj:`gpytorch.priors.Prior`):
          Prior for :math:`B` matrix.
      var_constraint (Constraint, optional):
          Constraint for added diagonal component. Default: `Positive`.
  
  Attributes:
      covar_factor:
          The :math:`B` matrix.
      raw_var:
          The element-wise log of the :math:`\mathbf v` vector.
code: def var(self):
      return self.raw_var_constraint.transform(self.raw_var)
  
file_path: gpytorch/gpytorch/kernels/index_kernel.py
imports: from typing import Optional
  import torch
  from linear_operator.operators import DiagLinearOperator, InterpolatedLinearOperator, PsdSumLinearOperator, RootLinearOperator
  from ..constraints import Interval, Positive
  from ..priors import Prior
  from .kernel import Kernel
label_desc: Use image node_id 2 for calling the IndexKernel obj's underlying member method code with example usage: obj.var() and returns: self