class_docstr: Base class for torch backend outlier detection algorithms.
class_docstr_tok: ["Base","class","for","torch","backend","outlier","detection","algorithms","."]
docstr: Check if threshold is inferred.
  
  Raises
  ------
  ThresholdNotInferredError
      Raised if threshold is not inferred.
docstr_tok: ["Check","if","threshold","is","inferred",".","Raises","--","--","--","ThresholdNotInferredError","Raised","if","threshold","is","not","inferred","."]
code: def check_threshold_inferred(self):
      """Check if threshold is inferred.
  
      Raises
      ------
      ThresholdNotInferredError
          Raised if threshold is not inferred.
      """
      if not self.threshold_inferred:
          raise ThresholdNotInferredError(self.__class__.__name__)
  
imports: from typing import List, Union, Optional, Dict
  from dataclasses import dataclass, fields
  from abc import ABC, abstractmethod
  import numpy
  import torch
  from alibi_detect.od.pytorch.ensemble import FitMixinTorch
  from alibi_detect.utils.pytorch.misc import get_device
  from alibi_detect.exceptions import ThresholdNotInferredError
  from alibi_detect.utils._types import TorchDeviceType
label_desc: Use image node_id 3 for calling the TorchOutlierDetector obj's underlying member method code with example usage: obj.check_threshold_inferred() without return types