class_docstr: Base class for sklearn backend outlier detection algorithms.
class_docstr_tok: ["Base","class","for","sklearn","backend","outlier","detection","algorithms","."]
docstr: Predict outlier labels for the data.
  
  Computes the outlier scores. If the detector is not fit on reference data we raise an error.
  If the threshold is inferred, the outlier labels and p-values are also computed and returned.
  Otherwise, the outlier labels and p-values are set to ``None``.
  
  Parameters
  ----------
  x
      Data to predict.
  
  Returns
  -------
  `SklearnOutlierDetectorOutput`
      Output of the outlier detector.
  
  Raises
  ------
  ValueError
      Raised if the detector is not fit on reference data.
docstr_tok: ["Predict","outlier","labels","for","the","data",".","Computes","the","outlier","scores",".","If","the","detector","is","not","fit","on","reference","data","we","raise","an","error",".","If","the","threshold","is","inferred",",","the","outlier","labels","and","p-values","are","also","computed","and","returned",".","Otherwise",",","the","outlier","labels","and","p-values","are","set","to","``","None","``",".","Parameters","--","--","--","--","--","x","Data","to","predict",".","Returns","--","--","--","-","`","SklearnOutlierDetectorOutput","`","Output","of","the","outlier","detector",".","Raises","--","--","--","ValueError","Raised","if","the","detector","is","not","fit","on","reference","data","."]
code: def predict(self, x: np.ndarray) -> SklearnOutlierDetectorOutput:
      """Predict outlier labels for the data.
  
      Computes the outlier scores. If the detector is not fit on reference data we raise an error.
      If the threshold is inferred, the outlier labels and p-values are also computed and returned.
      Otherwise, the outlier labels and p-values are set to ``None``.
  
      Parameters
      ----------
      x
          Data to predict.
  
      Returns
      -------
      `SklearnOutlierDetectorOutput`
          Output of the outlier detector.
  
      Raises
      ------
      ValueError
          Raised if the detector is not fit on reference data.
      """
      self.check_fitted()
      scores = self.score(x)
  
      return SklearnOutlierDetectorOutput(
          instance_score=scores,
          is_outlier=self._classify_outlier(scores),
          p_value=self._p_vals(scores),
          threshold_inferred=self.threshold_inferred,
          threshold=self.threshold,
      )
  
imports: from typing import List, Union, Optional, Dict
  from dataclasses import dataclass, asdict
  from abc import ABC, abstractmethod
  from typing_extensions import Self
  import numpy
  from alibi_detect.exceptions import NotFittedError, ThresholdNotInferredError
label_desc: Use image node_id 8 for calling the SklearnOutlierDetector obj's underlying member method code with example usage: obj.predict(x) and returns: SklearnOutlierDetectorOutput