class_docstr: Base series annotator.
  
  Parameters
  ----------
  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.
  
  Notes
  -----
  Assumes "predict" data is temporal future of "fit"
  Single time series in both, no meta-data.
  
  The base series annotator specifies the methods and method
  signatures that all annotators have to implement.
  
  Specific implementations of these methods is deferred to concrete
  annotators.
docstr: Fit to data, then predict it.
  
  Fits model to X and Y with given annotation parameters
  and returns the annotations made by the model.
  
  Parameters
  ----------
  X : pd.DataFrame, pd.Series or np.ndarray
      Data to be transformed
  Y : pd.Series or np.ndarray, optional (default=None)
      Target values of data to be predicted.
  
  Returns
  -------
  self : pd.Series
      Annotations for sequence X exact format depends on annotation type.
docstr_tok: ["Fit","to","data",",","then","predict","it",".","Fits","model","to","X","and","Y","with","given","annotation","parameters","and","returns","the","annotations","made","by","the","model",".","Parameters","--","--","--","--","--","X",":","pd.DataFrame",",","pd.Series","or","np.ndarray","Data","to","be","transformed","Y",":","pd.Series","or","np.ndarray",",","optional","(","default=None",")","Target","values","of","data","to","be","predicted",".","Returns","--","--","--","-","self",":","pd.Series","Annotations","for","sequence","X","exact","format","depends","on","annotation","type","."]
code: def fit_predict(self, X, Y=None):
      """Fit to data, then predict it.
  
      Fits model to X and Y with given annotation parameters
      and returns the annotations made by the model.
  
      Parameters
      ----------
      X : pd.DataFrame, pd.Series or np.ndarray
          Data to be transformed
      Y : pd.Series or np.ndarray, optional (default=None)
          Target values of data to be predicted.
  
      Returns
      -------
      self : pd.Series
          Annotations for sequence X exact format depends on annotation type.
      """
      # Non-optimized default implementation; override when a better
      # method is possible for a given algorithm.
      return self.fit(X, Y).predict(X)
  
file_path: sktime/sktime/annotation/base/_base.py
imports: from sktime.base import BaseEstimator
  from sktime.utils.validation.annotation import check_fmt, check_labels
  from sktime.utils.validation.series import check_series
label_desc: Use image node_id 7 for calling the BaseSeriesAnnotator obj's underlying member method code with example usage: obj.fit_predict(X, Y) and returns: self