class_docstr: Base adapter mixin for tslearn distances and kernels.
docstr: Compute distance/kernel matrix.
  
      Core logic
  
  Behaviour: returns pairwise distance/kernel matrix
      between samples in X and X2
          if X2 is not passed, is equal to X
          if X/X2 is a pd.DataFrame and contains non-numeric columns,
              these are removed before computation
  
  Parameters
  ----------
  X: 3D np.array of shape [num_instances, num_vars, num_time_points]
  X2: 3D np.array of shape [num_instances, num_vars, num_time_points], optional
      default X2 = X
  
  Returns
  -------
  distmat: np.array of shape [n, m]
      (i,j)-th entry contains distance/kernel between X[i] and X2[j]
docstr_tok: ["Compute","distance\/kernel","matrix",".","Core","logic","Behaviour",":","returns","pairwise","distance\/kernel","matrix","between","samples","in","X","and","X2","if","X2","is","not","passed",",","is","equal","to","X","if","X\/X2","is","a","pd.DataFrame","and","contains","non-numeric","columns",",","these","are","removed","before","computation","Parameters","--","--","--","--","--","X",":","3D","np.array","of","shape","[","num_instances",",","num_vars",",","num_time_points","]","X2",":","3D","np.array","of","shape","[","num_instances",",","num_vars",",","num_time_points","]",",","optional","default","X2","=","X","Returns","--","--","--","-","distmat",":","np.array","of","shape","[","n",",","m","]","(","i",",","j",")","-th","entry","contains","distance\/kernel","between","X","[","i","]","and","X2","[","j","]"]
code: def _transform(self, X, X2=None):
      """Compute distance/kernel matrix.
  
          Core logic
  
      Behaviour: returns pairwise distance/kernel matrix
          between samples in X and X2
              if X2 is not passed, is equal to X
              if X/X2 is a pd.DataFrame and contains non-numeric columns,
                  these are removed before computation
  
      Parameters
      ----------
      X: 3D np.array of shape [num_instances, num_vars, num_time_points]
      X2: 3D np.array of shape [num_instances, num_vars, num_time_points], optional
          default X2 = X
  
      Returns
      -------
      distmat: np.array of shape [n, m]
          (i,j)-th entry contains distance/kernel between X[i] and X2[j]
      """
      if isinstance(X, list):
          X = self._coerce_df_list_to_list_of_arr(X)
      if isinstance(X2, list):
          X2 = self._coerce_df_list_to_list_of_arr(X2)
  
      if self._is_cdist:
          return self._eval_tslearn_pwtrafo(X, X2)
      else:
          return self._eval_tslearn_pwtrafo_vectorized(X, X2)
  
imports: import numpy
label_desc: Use image node_id 5 for calling the _TslearnPwTrafoAdapter obj's underlying member method code with example usage: obj._transform(X, X2) and returns: self, self