class_docstr: Base class of Detectors that need training.
class_docstr_tok: ["Base","class","of","Detectors","that","need","training","."]
docstr: Trains the detector and detects anomalies on the same series.
  
  Parameters
  ----------
  series
      Time series to be used for training and be detected for anomalies.
  
  Returns
  -------
  Union[TimeSeries, Sequence[TimeSeries]]
      Binary prediciton (1 if considered as an anomaly, 0 if not)
docstr_tok: ["Trains","the","detector","and","detects","anomalies","on","the","same","series",".","Parameters","--","--","--","--","--","series","Time","series","to","be","used","for","training","and","be","detected","for","anomalies",".","Returns","--","--","--","-","Union","[","TimeSeries",",","Sequence","[","TimeSeries","]","]","Binary","prediciton","(","1","if","considered","as","an","anomaly",",","0","if","not",")"]
code: def fit_detect(
      self, series: Union[TimeSeries, Sequence[TimeSeries]]
  ) -> Union[TimeSeries, Sequence[TimeSeries]]:
      """Trains the detector and detects anomalies on the same series.
  
      Parameters
      ----------
      series
          Time series to be used for training and be detected for anomalies.
  
      Returns
      -------
      Union[TimeSeries, Sequence[TimeSeries]]
          Binary prediciton (1 if considered as an anomaly, 0 if not)
      """
      self.fit(series)
      return self.detect(series)
  
file_path: darts/darts/ad/detectors/detectors.py
imports: from abc import ABC, abstractmethod
  from typing import Any, Sequence, Union
  from darts import TimeSeries
  from darts.ad.utils import eval_accuracy_from_binary_prediction
  from darts.logging import raise_if_not
label_desc: Use image node_id 5 for calling the FittableDetector obj's underlying member method code with example usage: obj.fit_detect(series) and returns: self