class_docstr: Base pairwise transformer for panel data template class.
  
  The base pairwise transformer specifies the methods and method signatures that all
  pairwise transformers have to implement.
  
  Specific implementations of these methods is deferred to concrete classes.
class_docstr_tok: ["Base","pairwise","transformer","for","panel","data","template","class",".","The","base","pairwise","transformer","specifies","the","methods","and","method","signatures","that","all","pairwise","transformers","have","to","implement",".","Specific","implementations","of","these","methods","is","deferred","to","concrete","classes","."]
docstr: Compute distance/kernel matrix.
  
  Behaviour: returns pairwise distance/kernel matrix
      between samples in X and X2 (equal to X if not passed)
  
  Parameters
  ----------
  X : Series or Panel, any supported mtype, of n instances
      Data to transform, of python type as follows:
          Series: pd.Series, pd.DataFrame, or np.ndarray (1D or 2D)
          Panel: pd.DataFrame with 2-level MultiIndex, list of pd.DataFrame,
              nested pd.DataFrame, or pd.DataFrame in long/wide format
          subject to sktime mtype format specifications, for further details see
              examples/AA_datatypes_and_datasets.ipynb
  X2 : Series or Panel, any supported mtype, of m instances
          optional, default: X = X2
      Data to transform, of python type as follows:
          Series: pd.Series, pd.DataFrame, or np.ndarray (1D or 2D)
          Panel: pd.DataFrame with 2-level MultiIndex, list of pd.DataFrame,
              nested pd.DataFrame, or pd.DataFrame in long/wide format
          subject to sktime mtype format specifications, for further details see
              examples/AA_datatypes_and_datasets.ipynb
      X and X2 need not have the same mtype
  
  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",".","Behaviour",":","returns","pairwise","distance\/kernel","matrix","between","samples","in","X","and","X2","(","equal","to","X","if","not","passed",")","Parameters","--","--","--","--","--","X",":","Series","or","Panel",",","any","supported","mtype",",","of","n","instances","Data","to","transform",",","of","python","type","as","follows",":","Series",":","pd.Series",",","pd.DataFrame",",","or","np.ndarray","(","1D","or","2D",")","Panel",":","pd.DataFrame","with","2-level","MultiIndex",",","list","of","pd.DataFrame",",","nested","pd.DataFrame",",","or","pd.DataFrame","in","long\/wide","format","subject","to","sktime","mtype","format","specifications",",","for","further","details","see","examples\/AA_datatypes_and_datasets.ipynb","X2",":","Series","or","Panel",",","any","supported","mtype",",","of","m","instances","optional",",","default",":","X","=","X2","Data","to","transform",",","of","python","type","as","follows",":","Series",":","pd.Series",",","pd.DataFrame",",","or","np.ndarray","(","1D","or","2D",")","Panel",":","pd.DataFrame","with","2-level","MultiIndex",",","list","of","pd.DataFrame",",","nested","pd.DataFrame",",","or","pd.DataFrame","in","long\/wide","format","subject","to","sktime","mtype","format","specifications",",","for","further","details","see","examples\/AA_datatypes_and_datasets.ipynb","X","and","X2","need","not","have","the","same","mtype","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.
  
      Behaviour: returns pairwise distance/kernel matrix
          between samples in X and X2 (equal to X if not passed)
  
      Parameters
      ----------
      X : Series or Panel, any supported mtype, of n instances
          Data to transform, of python type as follows:
              Series: pd.Series, pd.DataFrame, or np.ndarray (1D or 2D)
              Panel: pd.DataFrame with 2-level MultiIndex, list of pd.DataFrame,
                  nested pd.DataFrame, or pd.DataFrame in long/wide format
              subject to sktime mtype format specifications, for further details see
                  examples/AA_datatypes_and_datasets.ipynb
      X2 : Series or Panel, any supported mtype, of m instances
              optional, default: X = X2
          Data to transform, of python type as follows:
              Series: pd.Series, pd.DataFrame, or np.ndarray (1D or 2D)
              Panel: pd.DataFrame with 2-level MultiIndex, list of pd.DataFrame,
                  nested pd.DataFrame, or pd.DataFrame in long/wide format
              subject to sktime mtype format specifications, for further details see
                  examples/AA_datatypes_and_datasets.ipynb
          X and X2 need not have the same mtype
  
      Returns
      -------
      distmat: np.array of shape [n, m]
          (i,j)-th entry contains distance/kernel between X[i] and X2[j]
      """
      X = self._pairwise_panel_x_check(X)
  
      if X2 is None:
          X2 = X
      else:
          X2 = self._pairwise_panel_x_check(X2, var_name="X2")
  
      return self._transform(X=X, X2=X2)
  
imports: from sktime.base import BaseEstimator
  from sktime.datatypes import check_is_scitype, convert_to
  from sktime.datatypes._series_as_panel import convert_Series_to_Panel
label_desc: Use image node_id 7 for calling the BasePairwiseTransformerPanel obj's underlying member method code with example usage: obj.transform(X, X2) and returns: self