class_docstr: Exponential Moving Average.
  This method uses a data point's deviation from the exponential moving average of a lagging window
  to determine its anomaly score.
docstr: Initializer
  :param TimeSeries time_series: a TimeSeries object.
  :param TimeSeries baseline_time_series: baseline TimeSeries.
  :param float smoothing_factor: smoothing factor for computing exponential moving average.
  :param int lag_window_size: lagging window size.
code: def __init__(
      self,
      time_series,
      baseline_time_series=None,
      smoothing_factor=0,
      use_lag_window=False,
      lag_window_size=None,
  ):
      """
      Initializer
      :param TimeSeries time_series: a TimeSeries object.
      :param TimeSeries baseline_time_series: baseline TimeSeries.
      :param float smoothing_factor: smoothing factor for computing exponential moving average.
      :param int lag_window_size: lagging window size.
      """
      super(ExpAvgDetector, self).__init__(
          self.__class__.__name__, time_series, baseline_time_series
      )
      self.use_lag_window = use_lag_window
      self.smoothing_factor = (
          smoothing_factor
          if smoothing_factor > 0
          else DEFAULT_EMA_SMOOTHING_FACTOR
      )
      self.lag_window_size = (
          lag_window_size
          if lag_window_size
          else int(
              self.time_series_length * DEFAULT_EMA_WINDOW_SIZE_PCT
          )
      )
      self.time_series_items = self.time_series.items()
  
file_path: luminol/src/luminol/algorithms/anomaly_detector_algorithms/exp_avg_detector.py
imports: import numpy
  from luminol import utils
  from luminol.algorithms.anomaly_detector_algorithms import AnomalyDetectorAlgorithm
  from luminol.modules.time_series import TimeSeries
  from luminol.constants import DEFAULT_EMA_SMOOTHING_FACTOR, DEFAULT_EMA_WINDOW_SIZE_PCT
label_desc: Use image node_id 1 to create a new ExpAvgDetector object from inherited base classes: AnomalyDetectorAlgorithm with example: obj = ExpAvgDetector(time_series, baseline_time_series, smoothing_factor, use_lag_window, lag_window_size)