class_docstr: Base class for all unsupervised sequence aligners.
class_docstr_tok: ["Base","class","for","all","unsupervised","sequence","aligners","."]
docstr: Fit alignment given series/sequences to align.
  
  State change:
      Changes state to "fitted".
  
  Writes to self:
      Sets self._is_fitted flag to True.
      Stores `X` and `Z` to self._X and self._Z, respectively.
      Sets fitted model attributes ending in "_".
  
  Parameters
  ----------
  X : list of pd.DataFrame (Series) of length n
      collection of series to align
  Z : pd.DataFrame with n rows, optional
      metadata, i-th row of Z corresponds to i-th element of X
docstr_tok: ["Fit","alignment","given","series\/sequences","to","align",".","State","change",":","Changes","state","to","``","fitted","''",".","Writes","to","self",":","Sets","self._is_fitted","flag","to","True",".","Stores","`","X","`","and","`","Z","`","to","self._X","and","self._Z",",","respectively",".","Sets","fitted","model","attributes","ending","in","``","_","''",".","Parameters","--","--","--","--","--","X",":","list","of","pd.DataFrame","(","Series",")","of","length","n","collection","of","series","to","align","Z",":","pd.DataFrame","with","n","rows",",","optional","metadata",",","i-th","row","of","Z","corresponds","to","i-th","element","of","X"]
code: def fit(self, X, Z=None):
      """Fit alignment given series/sequences to align.
  
      State change:
          Changes state to "fitted".
  
      Writes to self:
          Sets self._is_fitted flag to True.
          Stores `X` and `Z` to self._X and self._Z, respectively.
          Sets fitted model attributes ending in "_".
  
      Parameters
      ----------
      X : list of pd.DataFrame (Series) of length n
          collection of series to align
      Z : pd.DataFrame with n rows, optional
          metadata, i-th row of Z corresponds to i-th element of X
      """
      # if fit is called, estimator is reset, including fitted state
      self.reset()
  
      valid, msg, X_metadata = check_is_scitype(
          X, scitype="Panel", return_metadata=[], var_name="X"
      )
  
      if not valid:
          raise TypeError(msg)
  
      X_mtype = X_metadata["mtype"]
      X_inner_mtype = self.get_tag("X_inner_mtype")
  
      self._X_mtype = X_mtype
  
      X_inner = convert(
          X,
          from_type=X_mtype,
          to_type=X_inner_mtype,
          as_scitype="Panel",
      )
  
      self._fit(X=X_inner, Z=Z)
  
      # convert X to df-list for use in get_aligned, get_alignment_loc
      if X_inner_mtype != "df-list":
          self._X = convert(
              X,
              from_type=X_mtype,
              to_type="df-list",
              as_scitype="Panel",
          )
      else:
          self._X = X_inner
  
      self._Z = Z
  
      self._is_fitted = True
  
      return self
  
file_path: sktime/sktime/alignment/base.py
imports: from sktime.alignment.utils.utils_align import convert_align_to_align_loc, reindex_iloc
  from sktime.base import BaseEstimator
  from sktime.datatypes import check_is_scitype, convert
label_desc: Use image node_id 2 for calling the BaseAligner obj's underlying member method code with example usage: obj.fit(X, Z) and returns: self