class_docstr: In this algorithm, a sign test is performed by comparing data points to the baseline.
  The baseline can be adjusted with an offset and a percent gain. How it works:
  The data is compared within a fixed window and if the results differ significantly from random
  then all points in that window are considered to be an anomaly.
  
  A confidence is used for the statistical null test, 0.01 is the default p_value
  
  The entire time series is scanned with a sliding window and all points are scored.
  
  Either upper or lower threshold can be requested, but not both.
  The lower threshold should be negative if the intent is to measure a drop below baseline.
  For example, a lower threshold of -20 will detect a 20 percent decrease when compared against baseline.
  
  This algorithm assumes that time_series and baseline_time_series are perfectly aligned, meaning that:
   a) every timestamp that exists in time_series also exists in baseline_time_series
   b) lengths of both time series are same
   c) the test window must not be larger than the time series
docstr: Compute anomaly scores for the time series
  anomaly regions are computed with sign test which also assigns a likelihood
  to the entire region
docstr_tok: ["Compute","anomaly","scores","for","the","time","series","anomaly","regions","are","computed","with","sign","test","which","also","assigns","a","likelihood","to","the","entire","region"]
code: def _set_scores(self):
      """
      Compute anomaly scores for the time series
      anomaly regions are computed with sign test which also assigns a likelihood
      to the entire region
      """
  
      scores = np.zeros(len(self.time_series.values))
  
      anomalies = SignTest._rolling_sign_test(
          self.scale * np.array(self.time_series.values),
          self.scale * np.array(self.baseline_time_series.values),
          k=self.scan_window,
          conf=self.confidence,
          alpha=float(self.percent_threshold) / 100,
          offset=self.scale * self.offset,
      )
      for (s, e), prob in anomalies:
          scores[s:e] = 100 * prob
  
      scores_dict = dict()
      for i, timestamp in enumerate(self.time_series.timestamps):
          scores_dict[timestamp] = scores[i]
  
      self.anom_scores = TimeSeries(scores_dict)
  
file_path: luminol/src/luminol/algorithms/anomaly_detector_algorithms/sign_test.py
imports: import numpy
  from luminol import exceptions
  from luminol.algorithms.anomaly_detector_algorithms import AnomalyDetectorAlgorithm
  from luminol.utils import qbinom, pbinom
  from luminol.modules.time_series import TimeSeries
label_desc: Use image node_id 2 for calling the SignTest obj's underlying member method code with example usage: obj._set_scores() without return types