docstr: Fit the detector on reference data.
  
  Parameters
  ----------
  x_ref
      Reference data used to fit the detector.
docstr_tok: ["Fit","the","detector","on","reference","data",".","Parameters","--","--","--","--","--","x_ref","Reference","data","used","to","fit","the","detector","."]
code: def fit(self, x_ref: np.ndarray) -> None:
      """Fit the detector on reference data.
  
      Parameters
      ----------
      x_ref
          Reference data used to fit the detector.
      """
      self.backend.fit(self.backend._to_backend_dtype(x_ref))
  
imports: from typing import Callable, Union, Optional, Dict, Any, List, Tuple
  from typing_extensions import Literal
  import numpy
  from alibi_detect.base import outlier_prediction_dict
  from alibi_detect.exceptions import _catch_error
  from alibi_detect.od.base import TransformProtocol, TransformProtocolType
  from alibi_detect.base import BaseDetector, FitMixin, ThresholdMixin
  from alibi_detect.od.pytorch import LOFTorch, Ensembler
  from alibi_detect.od.base import get_aggregator, get_normalizer, NormalizerLiterals, AggregatorLiterals
  from alibi_detect.utils.frameworks import BackendValidator
  from alibi_detect.version import __version__
  from alibi_detect.utils._types import TorchDeviceType
label_desc: Use image node_id 2 for calling the LOF obj's underlying member method code with example usage: obj.fit(x_ref) without return types