docstr: Computes the score of `x`
  
  Parameters
  ----------
  x
      `torch.Tensor` with leading batch dimension.
  
  Returns
  -------
  `torch.Tensor¬` of scores with leading batch dimension.
  
  Raises
  ------
  NotFittedError
      Raised if method called and detector has not been fit.
docstr_tok: ["Computes","the","score","of","`","x","`","Parameters","--","--","--","--","--","x","`","torch.Tensor","`","with","leading","batch","dimension",".","Returns","--","--","--","-","`","torch.Tensor\u00ac","`","of","scores","with","leading","batch","dimension",".","Raises","--","--","--","NotFittedError","Raised","if","method","called","and","detector","has","not","been","fit","."]
code: def score(self, x: torch.Tensor) -> torch.Tensor:
      """Computes the score of `x`
  
      Parameters
      ----------
      x
          `torch.Tensor` with leading batch dimension.
  
      Returns
      -------
      `torch.Tensor¬` of scores with leading batch dimension.
  
      Raises
      ------
      NotFittedError
          Raised if method called and detector has not been fit.
      """
      self.check_fitted()
      x_nys = self.nystroem.transform(x)
      x_nys = x_nys.cpu().numpy()
      coef_ = self.svm.coef_ / (self.svm.coef_**2).sum()
      x_nys = self.svm._validate_data(
          x_nys, accept_sparse="csr", reset=False
      )
      result = safe_sparse_dot(
          x_nys, coef_.T, dense_output=True
      ).ravel()
      return -self._to_backend_dtype(result)
  
imports: import warnings
  from typing import Callable, Dict, Optional, Tuple
  import numpy
  import torch
  from sklearn.linear_model import SGDOneClassSVM
  from sklearn.utils.extmath import safe_sparse_dot
  from tqdm import tqdm
  from typing_extensions import Self
  from alibi_detect.od.pytorch.base import TorchOutlierDetector
  from alibi_detect.utils.pytorch.losses import hinge_loss
  from alibi_detect.utils.pytorch.kernels import GaussianRBF
  from alibi_detect.utils._types import TorchDeviceType
label_desc: Use image node_id 4 for calling the SgdSVMTorch obj's underlying member method code with example usage: obj.score(x) and returns: unknown