class_docstr: Transformer that applies outlier detector from pyOD.
  
  Parameters
  ----------
  estimator : PyOD estimator
      See ``https://pyod.readthedocs.io/en/latest/`` documentation for a detailed
      description of all options.
  fmt : str {"dense", "sparse"}, optional (default="dense")
      Annotation output format:
      * If "sparse", a sub-series of labels for only the outliers in X is returned,
      * If "dense", a series of labels for all values in X is returned.
  labels : str {"indicator", "score"}, optional (default="indicator")
      Annotation output labels:
      * If "indicator", returned values are boolean, indicating whether a value is an
      outlier,
      * If "score", returned values are floats, giving the outlier score.
class_docstr_tok: ["Transformer","that","applies","outlier","detector","from","pyOD",".","Parameters","--","--","--","--","--","estimator",":","PyOD","estimator","See","``","https",":","\/\/pyod.readthedocs.io\/en\/latest\/","``","documentation","for","a","detailed","description","of","all","options",".","fmt",":","str","{","``","dense","''",",","``","sparse","''","}",",","optional","(","default=","''","dense","''",")","Annotation","output","format",":","*","If","``","sparse","''",",","a","sub-series","of","labels","for","only","the","outliers","in","X","is","returned",",","*","If","``","dense","''",",","a","series","of","labels","for","all","values","in","X","is","returned",".","labels",":","str","{","``","indicator","''",",","``","score","''","}",",","optional","(","default=","''","indicator","''",")","Annotation","output","labels",":","*","If","``","indicator","''",",","returned","values","are","boolean",",","indicating","whether","a","value","is","an","outlier",",","*","If","``","score","''",",","returned","values","are","floats",",","giving","the","outlier","score","."]
docstr: Create annotations on test/deployment data.
  
  Parameters
  ----------
  X : pd.DataFrame - data to annotate, time series
  
  Returns
  -------
  Y : pd.Series - annotations for sequence X
      exact format depends on annotation type
docstr_tok: ["Create","annotations","on","test\/deployment","data",".","Parameters","--","--","--","--","--","X",":","pd.DataFrame","-","data","to","annotate",",","time","series","Returns","--","--","--","-","Y",":","pd.Series","-","annotations","for","sequence","X","exact","format","depends","on","annotation","type"]
code: def _predict(self, X):
      """Create annotations on test/deployment data.
  
      Parameters
      ----------
      X : pd.DataFrame - data to annotate, time series
  
      Returns
      -------
      Y : pd.Series - annotations for sequence X
          exact format depends on annotation type
      """
      fmt = self.fmt
      labels = self.labels
  
      X_np = X.to_numpy()
  
      if len(X_np.shape) == 1:
          X_np = X_np.reshape(-1, 1)
  
      Y_np = self.estimator_.predict(X_np)
  
      if labels == "score":
          Y_val_np = self.estimator_.decision_function(X_np)
      elif labels == "indicator":
          Y_val_np = Y_np
  
      if fmt == "dense":
          Y = pd.Series(Y_val_np, index=X.index)
      elif fmt == "sparse":
          Y_loc = np.where(Y_np)
          Y = pd.Series(Y_val_np[Y_loc], index=X.index[Y_loc])
  
      return Y
  
file_path: sktime/sktime/annotation/adapters/_pyod.py
imports: import numpy
  from sklearn.base import clone
  from sktime.annotation.base._base import BaseSeriesAnnotator
  from sktime.utils.validation._dependencies import _check_soft_dependencies
  import pandas
label_desc: Use image node_id 3 for calling the PyODAnnotator obj's underlying member method code with example usage: obj._predict(X) and returns: Y