class_docstr: TSImputePerturber removes random block from the time series data, and imputes
  the value with specified interpolation method.
class_docstr_tok: ["TSImputePerturber","removes","random","block","from","the","time","series","data",",","and","imputes","the","value","with","specified","interpolation","method","."]
docstr: TSImputePerturber initialization
  
  Args:
      block_length (int): length of the block size, continuous time window length over
          which perturbation will be performed. Defaults to 5.
      n_blocks (int): number of blocks to perturb. Defaults to 1.
      sparsity (float): sparsity controls data sampling, there by creating across data
          sparse sampling, Defaults to 1.0.
      padding (int): this parameter is used smoothen the imputation boundaries. Defaults to 5.
      interpolation_kind (str): interpolation method for data imputation. Refer to
          https://docs.scipy.org/doc/scipy/reference/generated/scipy.interpolate.interp1d.html
          for possible values. Defaults to linear.
docstr_tok: ["TSImputePerturber","initialization","Args",":","block_length","(","int",")",":","length","of","the","block","size",",","continuous","time","window","length","over","which","perturbation","will","be","performed",".","Defaults","to","5.","n_blocks","(","int",")",":","number","of","blocks","to","perturb",".","Defaults","to","1.","sparsity","(","float",")",":","sparsity","controls","data","sampling",",","there","by","creating","across","data","sparse","sampling",",","Defaults","to","1.0.","padding","(","int",")",":","this","parameter","is","used","smoothen","the","imputation","boundaries",".","Defaults","to","5.","interpolation_kind","(","str",")",":","interpolation","method","for","data","imputation",".","Refer","to","https",":","\/\/docs.scipy.org\/doc\/scipy\/reference\/generated\/scipy.interpolate.interp1d.html","for","possible","values",".","Defaults","to","linear","."]
code: def __init__(
      self,
      block_length: int = 5,
      n_blocks: int = 1,
      sparsity: float = 1.0,
      padding: int = 5,
      interpolation_kind: str = "linear",
      # https://docs.scipy.org/doc/scipy/reference/generated/scipy.interpolate.interp1d.html
  ):
      """TSImputePerturber initialization
  
      Args:
          block_length (int): length of the block size, continuous time window length over
              which perturbation will be performed. Defaults to 5.
          n_blocks (int): number of blocks to perturb. Defaults to 1.
          sparsity (float): sparsity controls data sampling, there by creating across data
              sparse sampling, Defaults to 1.0.
          padding (int): this parameter is used smoothen the imputation boundaries. Defaults to 5.
          interpolation_kind (str): interpolation method for data imputation. Refer to
              https://docs.scipy.org/doc/scipy/reference/generated/scipy.interpolate.interp1d.html
              for possible values. Defaults to linear.
      """
      super(TSImputePerturber, self).__init__()
      self._data = None
      self._parameters = dict()
      self._parameters["block_length"] = block_length
      self._parameters["n_blocks"] = n_blocks
      self._parameters["sparsity"] = sparsity
      self._parameters["padding"] = padding
      self._parameters["interpolation_kind"] = interpolation_kind
  
file_path: AIX360/aix360/algorithms/tsutils/tsperturbers/ts_impute_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 TSImputePerturber object from inherited base classes: TSPerturber with example: obj = TSImputePerturber(block_length, n_blocks, sparsity, padding, interpolation_kind)