class_docstr: Derivative Algorithm.
  This method is the derivative version of Method 1.
  Instead of data point value, it uses the derivative of the data point.
docstr: Compute anomaly scores for the time series.
docstr_tok: ["Compute","anomaly","scores","for","the","time","series","."]
code: def _set_scores(self):
      """
      Compute anomaly scores for the time series.
      """
      anom_scores = {}
      self._compute_derivatives()
      derivatives_ema = utils.compute_ema(
          self.smoothing_factor, self.derivatives
      )
      for i, (timestamp, value) in enumerate(self.time_series_items):
          anom_scores[timestamp] = abs(
              self.derivatives[i] - derivatives_ema[i]
          )
      stdev = numpy.std(list(anom_scores.values()))
      if stdev:
          for timestamp in anom_scores.keys():
              anom_scores[timestamp] /= stdev
      self.anom_scores = TimeSeries(self._denoise_scores(anom_scores))
  
file_path: luminol/src/luminol/algorithms/anomaly_detector_algorithms/derivative_detector.py
imports: import numpy
  from luminol import utils
  from luminol.algorithms.anomaly_detector_algorithms import AnomalyDetectorAlgorithm
  from luminol.constants import DEFAULT_DERI_SMOOTHING_FACTOR
  from luminol.modules.time_series import TimeSeries
label_desc: Use image node_id 3 for calling the DerivativeDetector obj's underlying member method code with example usage: obj._set_scores() without return types