class_docstr: Aligner interface for dtw-python using pairwise transformer.
  
  Uses transformer for computation of distance matrix passed to alignment.
  
  Parameters
  ----------
  dist_trafo: estimator following the pairwise transformer template
      i.e., instance of concrete class implementing template BasePairwiseTransformer
  step_pattern : str, optional, default = "symmetric2",
      or dtw_python stepPattern object, optional
      step pattern to use in time warping
      one of: 'symmetric1', 'symmetric2' (default), 'asymmetric',
      and dozens of other more non-standard step patterns;
      list can be displayed by calling help(stepPattern) in dtw
  window_type: str  optional, default = "none"
      the chosen windowing function
      "none", "itakura", "sakoechiba", or "slantedband"
      "none" (default) - no windowing
      "sakoechiba" - a band around main diagonal
      "slantedband" - a band around slanted diagonal
      "itakura" - Itakura parallelogram
  open_begin : boolean, optional, default=False
  open_end: boolean, optional, default=False
      whether to perform open-ended alignments
      open_begin = whether alignment open ended at start (low index)
      open_end = whether alignment open ended at end (high index)
class_docstr_tok: ["Aligner","interface","for","dtw-python","using","pairwise","transformer",".","Uses","transformer","for","computation","of","distance","matrix","passed","to","alignment",".","Parameters","--","--","--","--","--","dist_trafo",":","estimator","following","the","pairwise","transformer","template","i.e.",",","instance","of","concrete","class","implementing","template","BasePairwiseTransformer","step_pattern",":","str",",","optional",",","default","=","``","symmetric2","''",",","or","dtw_python","stepPattern","object",",","optional","step","pattern","to","use","in","time","warping","one","of",":","'symmetric1","'",",","'symmetric2","'","(","default",")",",","'asymmetric","'",",","and","dozens","of","other","more","non-standard","step","patterns",";","list","can","be","displayed","by","calling","help","(","stepPattern",")","in","dtw","window_type",":","str","optional",",","default","=","``","none","''","the","chosen","windowing","function","``","none","''",",","``","itakura","''",",","``","sakoechiba","''",",","or","``","slantedband","''","``","none","''","(","default",")","-","no","windowing","``","sakoechiba","''","-","a","band","around","main","diagonal","``","slantedband","''","-","a","band","around","slanted","diagonal","``","itakura","''","-","Itakura","parallelogram","open_begin",":","boolean",",","optional",",","default=False","open_end",":","boolean",",","optional",",","default=False","whether","to","perform","open-ended","alignments","open_begin","=","whether","alignment","open","ended","at","start","(","low","index",")","open_end","=","whether","alignment","open","ended","at","end","(","high","index",")"]
docstr: Fit alignment given series/sequences to align.
  
      core logic
  
  Writes to self:
      alignment : computed alignment from dtw package (nested struct)
  
  Parameters
  ----------
  X: list of pd.DataFrame (sequence) of length n - panel of series to align
  Z: pd.DataFrame with n rows, optional; metadata, row correspond to indices of X
docstr_tok: ["Fit","alignment","given","series\/sequences","to","align",".","core","logic","Writes","to","self",":","alignment",":","computed","alignment","from","dtw","package","(","nested","struct",")","Parameters","--","--","--","--","--","X",":","list","of","pd.DataFrame","(","sequence",")","of","length","n","-","panel","of","series","to","align","Z",":","pd.DataFrame","with","n","rows",",","optional",";","metadata",",","row","correspond","to","indices","of","X"]
code: def _fit(self, X, Z=None):
      """Fit alignment given series/sequences to align.
  
          core logic
  
      Writes to self:
          alignment : computed alignment from dtw package (nested struct)
  
      Parameters
      ----------
      X: list of pd.DataFrame (sequence) of length n - panel of series to align
      Z: pd.DataFrame with n rows, optional; metadata, row correspond to indices of X
      """
      # soft dependency import of dtw
      from dtw import dtw
  
      # these variables from self are accessed
      dist_trafo = self.dist_trafo_
      step_pattern = self.step_pattern
      window_type = self.window_type
      open_begin = self.open_begin
      open_end = self.open_end
  
      # shorthands for 1st and 2nd sequence
      XA = X[0]
      XB = X[1]
  
      # compute distance matrix using cdist
      distmat = dist_trafo(XA, XB)
  
      # pass to the interfaced dtw function and store to self
      alignment = dtw(
          distmat,
          step_pattern=step_pattern,
          window_type=window_type,
          open_begin=open_begin,
          open_end=open_end,
          keep_internals=True,
      )
  
      self.alignment_ = alignment
  
      return self
  
file_path: sktime/sktime/alignment/dtw_python.py
imports: import numpy
  import pandas
  from sktime.alignment.base import BaseAligner
label_desc: Use image node_id 2 for calling the AlignerDTWfromDist obj's underlying member method code with example usage: obj._fit(X, Z) and returns: self