class_docstr: Copy of DiffPercentThreshold Algorithm from algorithms/anomaly_detector_algorithms/diff_percent_threshold.py to test
  whether passing a AnomalyDetectorAlgorithm class works for AnomalyDetector module
class_docstr_tok: ["Copy","of","DiffPercentThreshold","Algorithm","from","algorithms\/anomaly_detector_algorithms\/diff_percent_threshold.py","to","test","whether","passing","a","AnomalyDetectorAlgorithm","class","works","for","AnomalyDetector","module"]
docstr: :param time_series: current time series
  :param baseline_time_series: baseline time series
  :param percent_threshold_upper: If time_series is larger than baseline_time_series by this percent, then its
  an anomaly
  :param percent_threshold_lower: If time_series is smaller than baseline_time_series by this percent, then its
  an anomaly
docstr_tok: [":","param","time_series",":","current","time","series",":","param","baseline_time_series",":","baseline","time","series",":","param","percent_threshold_upper",":","If","time_series","is","larger","than","baseline_time_series","by","this","percent",",","then","its","an","anomaly",":","param","percent_threshold_lower",":","If","time_series","is","smaller","than","baseline_time_series","by","this","percent",",","then","its","an","anomaly"]
code: def __init__(
      self,
      time_series,
      baseline_time_series,
      percent_threshold_upper=None,
      percent_threshold_lower=None,
  ):
      """
      :param time_series: current time series
      :param baseline_time_series: baseline time series
      :param percent_threshold_upper: If time_series is larger than baseline_time_series by this percent, then its
      an anomaly
      :param percent_threshold_lower: If time_series is smaller than baseline_time_series by this percent, then its
      an anomaly
      """
      super(CustomAlgo, self).__init__(
          self.__class__.__name__, time_series, baseline_time_series
      )
      self.percent_threshold_upper = percent_threshold_upper
      self.percent_threshold_lower = percent_threshold_lower
  
imports: import os
  import sys
  import unittest
  from luminol import exceptions
  from luminol.anomaly_detector import AnomalyDetector
  from luminol.modules.time_series import TimeSeries
  from luminol.algorithms.anomaly_detector_algorithms import AnomalyDetectorAlgorithm
label_desc: Use image node_id 1 to create a new CustomAlgo object from inherited base classes: AnomalyDetectorAlgorithm with example: obj = CustomAlgo(time_series, baseline_time_series, percent_threshold_upper, percent_threshold_lower)