class_docstr: Base class for all unsupervised sequence aligners.
class_docstr_tok: ["Base","class","for","all","unsupervised","sequence","aligners","."]
docstr: Return distance matrix of alignment.
  
      core logic
  
  Behaviour: returns pairwise distance matrix of alignment distances
      not all aligners will return or implement this (optional)
  
  Accesses in self:
      Fitted model attributes ending in "_".
  
  Returns
  -------
  distmat: an (n x n) np.array of floats, where n is length of X passed to fit
      [i,j]-th entry is alignment distance between X[i] and X[j] passed to fit
docstr_tok: ["Return","distance","matrix","of","alignment",".","core","logic","Behaviour",":","returns","pairwise","distance","matrix","of","alignment","distances","not","all","aligners","will","return","or","implement","this","(","optional",")","Accesses","in","self",":","Fitted","model","attributes","ending","in","``","_","''",".","Returns","--","--","--","-","distmat",":","an","(","n","x","n",")","np.array","of","floats",",","where","n","is","length","of","X","passed","to","fit","[","i",",","j","]","-th","entry","is","alignment","distance","between","X","[","i","]","and","X","[","j","]","passed","to","fit"]
code: def _get_distance_matrix(self):
      """Return distance matrix of alignment.
  
          core logic
  
      Behaviour: returns pairwise distance matrix of alignment distances
          not all aligners will return or implement this (optional)
  
      Accesses in self:
          Fitted model attributes ending in "_".
  
      Returns
      -------
      distmat: an (n x n) np.array of floats, where n is length of X passed to fit
          [i,j]-th entry is alignment distance between X[i] and X[j] passed to fit
      """
      # the default implementation assumes
      # that the aligner can only align two sequences
      if self.get_tag("capability:multiple-alignment", False):
          raise NotImplementedError
  
      import numpy as np
  
      dist = self.get_distance()
  
      distmat = np.zeros((2, 2), dtype="float")
      distmat[0, 1] = dist
      distmat[1, 0] = dist
  
      return distmat
  
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 13 for calling the BaseAligner obj's underlying member method code with example usage: obj._get_distance_matrix() and returns: distmat