class_docstr: Base Class for AnomalyDetector algorithm.
docstr: Denoise anomaly scores.
  Low anomaly scores could be noisy. The following two series will have good correlation result with out denoise:
  [0.08, 4.6, 4.6, 4.6, 1.0, 1.0]
  [0.0010, 0.0012, 0.0012, 0.0008, 0.0008]
  while the second series is pretty flat(suppose it has a max score of 100).
  param dict scores: the scores to be denoised.
docstr_tok: ["Denoise","anomaly","scores",".","Low","anomaly","scores","could","be","noisy",".","The","following","two","series","will","have","good","correlation","result","with","out","denoise",":","[","0.08",",","4.6",",","4.6",",","4.6",",","1.0",",","1.0","]","[","0.0010",",","0.0012",",","0.0012",",","0.0008",",","0.0008","]","while","the","second","series","is","pretty","flat","(","suppose","it","has","a","max","score","of","100",")",".","param","dict","scores",":","the","scores","to","be","denoised","."]
code: def _denoise_scores(self, scores):
      """
      Denoise anomaly scores.
      Low anomaly scores could be noisy. The following two series will have good correlation result with out denoise:
      [0.08, 4.6, 4.6, 4.6, 1.0, 1.0]
      [0.0010, 0.0012, 0.0012, 0.0008, 0.0008]
      while the second series is pretty flat(suppose it has a max score of 100).
      param dict scores: the scores to be denoised.
      """
      if scores:
          maximal = max(scores.values())
          if maximal:
              for key in scores:
                  if (
                      scores[key]
                      < DEFAULT_NOISE_PCT_THRESHOLD * maximal
                  ):
                      scores[key] = 0
      return scores
  
file_path: luminol/src/luminol/algorithms/anomaly_detector_algorithms/__init__.py
imports: from luminol.constants import DEFAULT_NOISE_PCT_THRESHOLD
label_desc: Use image node_id 3 for calling the AnomalyDetectorAlgorithm obj's underlying member method code with example usage: obj._denoise_scores(scores) and returns: scores