class_docstr: TSShiftPerturber adds random lag in a time continuous block of the
  time series data. The lag introduction cause gap in the data, which is
  imputed using the specified interpolation function.
class_docstr_tok: ["TSShiftPerturber","adds","random","lag","in","a","time","continuous","block","of","the","time","series","data",".","The","lag","introduction","cause","gap","in","the","data",",","which","is","imputed","using","the","specified","interpolation","function","."]
docstr: TSShiftPerturber initialization
  
  Args:
      max_shift (int): maximum allowed lag. Defaults to 2.
      block_length (int): block size lag is introduced in selected blocks. Defaults to 5.
      n_blocks (int): number of blocks to perturb. Defaults to 1.
      interpolation_kind (str): interpolation method for data imputation. Refer to
          https://docs.scipy.org/doc/scipy/reference/generated/scipy.interpolate.interp1d.html.
          Defaults to "linear".
docstr_tok: ["TSShiftPerturber","initialization","Args",":","max_shift","(","int",")",":","maximum","allowed","lag",".","Defaults","to","2.","block_length","(","int",")",":","block","size","lag","is","introduced","in","selected","blocks",".","Defaults","to","5.","n_blocks","(","int",")",":","number","of","blocks","to","perturb",".","Defaults","to","1.","interpolation_kind","(","str",")",":","interpolation","method","for","data","imputation",".","Refer","to","https",":","\/\/docs.scipy.org\/doc\/scipy\/reference\/generated\/scipy.interpolate.interp1d.html",".","Defaults","to","``","linear","''","."]
code: def __init__(
      self,
      max_shift: int = 2,
      block_length: int = 5,
      n_blocks: int = 1,
      interpolation_kind: str = "linear",
  ):
      """TSShiftPerturber initialization
  
      Args:
          max_shift (int): maximum allowed lag. Defaults to 2.
          block_length (int): block size lag is introduced in selected blocks. Defaults to 5.
          n_blocks (int): number of blocks to perturb. Defaults to 1.
          interpolation_kind (str): interpolation method for data imputation. Refer to
              https://docs.scipy.org/doc/scipy/reference/generated/scipy.interpolate.interp1d.html.
              Defaults to "linear".
      """
      super(TSShiftPerturber, self).__init__()
      self._data = None
      self._parameters = dict()
      self._parameters["block_length"] = block_length
      self._parameters["max_shift"] = max_shift
      self._parameters["n_blocks"] = n_blocks
      self._parameters["interpolation_kind"] = interpolation_kind
  
file_path: AIX360/aix360/algorithms/tsutils/tsperturbers/ts_shift_perturber.py
imports: import numpy
  import pandas
  from typing import Union
  from scipy.interpolate import interp1d
  from aix360.algorithms.tsutils.tsframe import tsFrame, to_np_array
  from aix360.algorithms.tsutils.tsperturbers.tsperturber import BlockSelector, TSPerturber
label_desc: Use image node_id 1 to create a new TSShiftPerturber object from inherited base classes: TSPerturber with example: obj = TSShiftPerturber(max_shift, block_length, n_blocks, interpolation_kind)