docstr: Fits the PCA detector.
  
  Parameters
  ----------
  x_ref
      The Dataset tensor.
docstr_tok: ["Fits","the","PCA","detector",".","Parameters","--","--","--","--","--","x_ref","The","Dataset","tensor","."]
code: def fit(self, x_ref: torch.Tensor) -> None:
      """Fits the PCA detector.
  
      Parameters
      ----------
      x_ref
          The Dataset tensor.
      """
      self.pcs = self._fit(x_ref)
      self._set_fitted()
  
imports: from typing import Optional, Callable
  import torch
  from alibi_detect.od.pytorch.base import TorchOutlierDetector
  from alibi_detect.utils._types import TorchDeviceType
label_desc: Use image node_id 4 for calling the PCATorch obj's underlying member method code with example usage: obj.fit(x_ref) without return types