class_docstr: Representation of a kernel :math:`k: \mathcal{X}^2 \to \mathbb{R}` as an
  n-dimensional feature map :math:`\phi: \mathcal{X} \to \mathbb{R}^n` satisfying:
  :math:`k(x, x') ≈ \phi(x)^\top \phi(x')`.
docstr: Initializes a KernelFeatureMap instance:
  
  .. code-block:: text
  
      feature_map(x) = output_transform(input_transform(x)^{T} weight + bias).
  
  Args:
      kernel: The kernel :math:`k` used to define the feature map.
      weight: A tensor of weights used to linearly combine the module's inputs.
      bias: A tensor of biases to be added to the linearly combined inputs.
      input_transform: An optional input transform for the module.
      output_transform: An optional output transform for the module.
docstr_tok: ["Initializes","a","KernelFeatureMap","instance",":","..","code-block",":",":","text","feature_map","(","x",")","=","output_transform","(","input_transform","(","x",")","^","{","T","}","weight","+","bias",")",".","Args",":","kernel",":","The","kernel",":","math",":","`","k","`","used","to","define","the","feature","map",".","weight",":","A","tensor","of","weights","used","to","linearly","combine","the","module","'s","inputs",".","bias",":","A","tensor","of","biases","to","be","added","to","the","linearly","combined","inputs",".","input_transform",":","An","optional","input","transform","for","the","module",".","output_transform",":","An","optional","output","transform","for","the","module","."]
code: def __init__(
      self,
      kernel: Kernel,
      weight: Tensor,
      bias: Optional[Tensor] = None,
      input_transform: Optional[TInputTransform] = None,
      output_transform: Optional[TOutputTransform] = None,
  ) -> None:
      r"""Initializes a KernelFeatureMap instance:
  
      .. code-block:: text
  
          feature_map(x) = output_transform(input_transform(x)^{T} weight + bias).
  
      Args:
          kernel: The kernel :math:`k` used to define the feature map.
          weight: A tensor of weights used to linearly combine the module's inputs.
          bias: A tensor of biases to be added to the linearly combined inputs.
          input_transform: An optional input transform for the module.
          output_transform: An optional output transform for the module.
      """
      super().__init__()
      self.kernel = kernel
      self.register_buffer("weight", weight)
      self.register_buffer("bias", bias)
      self.weight = weight
      self.bias = bias
      self.input_transform = input_transform
      self.output_transform = output_transform
  
imports: from __future__ import annotations
  from typing import Optional, Union
  import torch
  from botorch.sampling.pathwise.utils import TInputTransform, TOutputTransform, TransformedModuleMixin
  from gpytorch.kernels import Kernel
  from linear_operator.operators import LinearOperator
  from torch import Size, Tensor
  from torch.nn import Module
label_desc: Use image node_id 1 to create a new KernelFeatureMap object from inherited base classes: FeatureMap with example: obj = KernelFeatureMap(kernel, weight, bias, input_transform, output_transform)