class_docstr: BlockBootstrapPerturber split the time series into contiguous chunks
  called blocks, for each block noise is estimated and noise is exchanged
  and added to the signal (mean) between randomly selected blocks.
  
  References:
      .. [#0] `Bühlmann, Peter. "Bootstraps for time series."
          Statistical science (2002): 52-72.
          <https://projecteuclid.org/journals/statistical-science/volume-17/issue-1/Bootstraps-for-Time-Series/10.1214/ss/1023798998.full>`_
class_docstr_tok: ["BlockBootstrapPerturber","split","the","time","series","into","contiguous","chunks","called","blocks",",","for","each","block","noise","is","estimated","and","noise","is","exchanged","and","added","to","the","signal","(","mean",")","between","randomly","selected","blocks",".","References",":","..","[","#","0","]","`","B\u00fchlmann",",","Peter",".","``","Bootstraps","for","time","series",".","''","Statistical","science","(","2002",")",":","52-72",".","<","https",":","\/\/projecteuclid.org\/journals\/statistical-science\/volume-17\/issue-1\/Bootstraps-for-Time-Series\/10.1214\/ss\/1023798998.full",">","`","_"]
docstr: BlockBootstrapPerturber initialization.
  
  Args:
      window_length (int): window length used for noise estimation. Defaults to 5.
      block_length (int): block length, perturber swaps noise between blocks. Defaults to 5.
      block_swap (int): number of block pairs for perturbation. Defaults to 2.
docstr_tok: ["BlockBootstrapPerturber","initialization",".","Args",":","window_length","(","int",")",":","window","length","used","for","noise","estimation",".","Defaults","to","5.","block_length","(","int",")",":","block","length",",","perturber","swaps","noise","between","blocks",".","Defaults","to","5.","block_swap","(","int",")",":","number","of","block","pairs","for","perturbation",".","Defaults","to","2","."]
code: def __init__(
      self,
      window_length: int = 5,
      block_length: int = 5,
      block_swap: int = 2,
  ):
      """BlockBootstrapPerturber initialization.
  
      Args:
          window_length (int): window length used for noise estimation. Defaults to 5.
          block_length (int): block length, perturber swaps noise between blocks. Defaults to 5.
          block_swap (int): number of block pairs for perturbation. Defaults to 2.
      """
      super(BlockBootstrapPerturber, self).__init__()
      self._mean = None
      self._residual = None
      self._data_length = None
      self._parameters = dict()
      self._parameters["window_length"] = window_length
      self._parameters["block_length"] = block_length
      self._parameters["block_swap"] = block_swap
  
file_path: AIX360/aix360/algorithms/tsutils/tsperturbers/block_bootstrap_perturber.py
imports: import numpy
  import pandas
  from typing import Union
  from aix360.algorithms.tsutils.tsframe import tsFrame
  from aix360.algorithms.tsutils.tsperturbers.tsperturber import BlockSelector, TSPerturber
  from aix360.algorithms.tsutils.tsperturbers.perturber_utils import ts_split_mean_residual
label_desc: Use image node_id 1 to create a new BlockBootstrapPerturber object from inherited base classes: TSPerturber with example: obj = BlockBootstrapPerturber(window_length, block_length, block_swap)