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: Check if there are enough data points.
docstr_tok: ["Check","if","there","are","enough","data","points","."]
code: def _sanity_check(self):
      """
      Check if there are enough data points.
      """
      windows = self.lag_window_size + self.future_window_size
      if (
          not self.lag_window_size
          or not self.future_window_size
          or self.time_series_length < windows
          or windows < DEFAULT_BITMAP_MINIMAL_POINTS_IN_WINDOWS
      ):
          raise exceptions.NotEnoughDataPoints
  
      # If window size is too big, too many data points will be assigned a score of 0 in the first lag window
      # and the last future window.
      if (
          self.lag_window_size
          > DEFAULT_BITMAP_MAXIMAL_POINTS_IN_WINDOWS
      ):
          self.lag_window_size = (
              DEFAULT_BITMAP_MAXIMAL_POINTS_IN_WINDOWS
          )
      if (
          self.future_window_size
          > DEFAULT_BITMAP_MAXIMAL_POINTS_IN_WINDOWS
      ):
          self.future_window_size = (
              DEFAULT_BITMAP_MAXIMAL_POINTS_IN_WINDOWS
          )
  
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 2 for calling the BitmapDetector obj's underlying member method code with example usage: obj._sanity_check() without return types