class_docstr: Base class for SVM.
code: def kernel_dot(
      self, pA: np.ndarray, pB: np.ndarray, kernel: str
  ) -> np.ndarray:
      k = kernel.lower()
      if k == "poly":
          s = np.dot(pA, pB)
          s = s * self.gamma_ + self.coef0_
          return s**self.degree_  # type: ignore
      if k == "sigmoid":
          s = np.dot(pA, pB)
          s = s * self.gamma_ + self.coef0_
          return np.tanh(s)  # type: ignore
      if k == "rbf":
          diff = pA - pB
          s = (diff * diff).sum()
          return np.exp(-self.gamma_ * s)  # type: ignore
      if k == "linear":
          return np.dot(pA, pB)  # type: ignore
      raise ValueError(f"Unexpected kernel={kernel!r}.")
  
file_path: onnx/onnx/reference/ops/aionnxml/op_svm_helper.py
imports: from typing import Any
  import numpy
label_desc: Use image node_id 3 for calling the SVMCommon obj's underlying member method code with example usage: obj.kernel_dot(pA, pB, kernel) and returns: unknown, np, np, np