class_docstr: Bitmap Algorithm.
  This method breaks time series into chunks and uses the frequency of similar chunks
  to determine anomaly scores.
  The ideas are from this paper:
  Assumption-Free Anomaly Detection in Time Series(http://alumni.cs.ucr.edu/~ratana/SSDBM05.pdf).
class_docstr_tok: ["Bitmap","Algorithm",".","This","method","breaks","time","series","into","chunks","and","uses","the","frequency","of","similar","chunks","to","determine","anomaly","scores",".","The","ideas","are","from","this","paper",":","Assumption-Free","Anomaly","Detection","in","Time","Series","(","http",":","\/\/alumni.cs.ucr.edu\/~ratana\/SSDBM05.pdf",")","."]
docstr: Compute distance difference between two windows' chunk frequencies,
  which is then marked as the anomaly score of the data point on the window boundary in the middle.
  :param int i: index of the data point between two windows.
  :return float: the anomaly score.
docstr_tok: ["Compute","distance","difference","between","two","windows","'","chunk","frequencies",",","which","is","then","marked","as","the","anomaly","score","of","the","data","point","on","the","window","boundary","in","the","middle",".",":","param","int","i",":","index","of","the","data","point","between","two","windows",".",":","return","float",":","the","anomaly","score","."]
code: def _compute_anom_score_between_two_windows(self, i):
      """
      Compute distance difference between two windows' chunk frequencies,
      which is then marked as the anomaly score of the data point on the window boundary in the middle.
      :param int i: index of the data point between two windows.
      :return float: the anomaly score.
      """
      lag_window_chunk_dict = self.lag_dicts[i]
      future_window_chunk_dict = self.fut_dicts[i]
      score = 0
      for chunk in lag_window_chunk_dict:
          if chunk in future_window_chunk_dict:
              score += math.pow(
                  future_window_chunk_dict[chunk]
                  - lag_window_chunk_dict[chunk],
                  2,
              )
          else:
              score += math.pow(lag_window_chunk_dict[chunk], 2)
      for chunk in future_window_chunk_dict:
          if chunk not in lag_window_chunk_dict:
              score += math.pow(future_window_chunk_dict[chunk], 2)
      return score
  
file_path: luminol/src/luminol/algorithms/anomaly_detector_algorithms/bitmap_detector.py
imports: from collections import defaultdict
  from copy import copy
  import math
  from luminol import exceptions
  from luminol.algorithms.anomaly_detector_algorithms import AnomalyDetectorAlgorithm
  from luminol.modules.time_series import TimeSeries
  from luminol.constants import DEFAULT_BITMAP_PRECISION, DEFAULT_BITMAP_CHUNK_SIZE, DEFAULT_BITMAP_LAGGING_WINDOW_SIZE_PCT, DEFAULT_BITMAP_LEADING_WINDOW_SIZE_PCT, DEFAULT_BITMAP_MINIMAL_POINTS_IN_WINDOWS, DEFAULT_BITMAP_MAXIMAL_POINTS_IN_WINDOWS
label_desc: Use image node_id 7 for calling the BitmapDetector obj's underlying member method code with example usage: obj._compute_anom_score_between_two_windows(i) and returns: score