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: Fit to training data.
  
  core logic
  
  Parameters
  ----------
  X : pd.DataFrame
      training data to fit model to, time series
  Y : pd.Series, optional
      ground truth annotations for training if annotator is supervised
  Returns
  -------
  self : returns a reference to self
  
  Notes
  -----
  Create fitted model that sets attributes ending in "_".
docstr_tok: ["Fit","to","training","data",".","core","logic","Parameters","--","--","--","--","--","X",":","pd.DataFrame","training","data","to","fit","model","to",",","time","series","Y",":","pd.Series",",","optional","ground","truth","annotations","for","training","if","annotator","is","supervised","Returns","--","--","--","-","self",":","returns","a","reference","to","self","Notes","--","--","-","Create","fitted","model","that","sets","attributes","ending","in","``","_","''","."]
code: def _fit(self, X, Y=None):
      """Fit to training data.
  
      core logic
  
      Parameters
      ----------
      X : pd.DataFrame
          training data to fit model to, time series
      Y : pd.Series, optional
          ground truth annotations for training if annotator is supervised
      Returns
      -------
      self : returns a reference to self
  
      Notes
      -----
      Create fitted model that sets attributes ending in "_".
      """
      X_np = X.to_numpy()
  
      if len(X_np.shape) == 1:
          X_np = X_np.reshape(-1, 1)
  
      self.estimator_ = clone(self.estimator)
      self.estimator_.fit(X_np)
  
      return self
  
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 2 for calling the PyODAnnotator obj's underlying member method code with example usage: obj._fit(X, Y) and returns: self