class_docstr: Elbow Class Pairwise (ECP) transformer to select a subset of channels.
  
  Overview: From the input of multivariate time series data, create a distance
  matrix [1] by calculating the distance between each class centroid. The ECP
  selects the subset of channels using the elbow method that maximizes the
  distance between each class centroids pair across all channels.
  
  Note: Channels, variables, dimensions, features are used interchangeably in
  literature.
  
  Attributes
  ----------
  channels_selected_ : list of integers; integer being the index of the channel
      List of channels selected by the ECS.
  distance_frame_ : DataFrame
      distance matrix of the class centroids pair and channels.
          ``shape = [n_channels, n_class_centroids_pairs]``
      Table 1 provides an illustration in [1].
  train_time_ : int
      Time taken to train the ECP.
  
  Notes
  -----
  Original repository: https://github.com/mlgig/Channel-Selection-MTSC
  
  References
  ----------
  ..[1]: Bhaskar Dhariyal et al. "Fast Channel Selection for Scalable Multivariate
  Time Series Classification." AALTD, ECML-PKDD, Springer, 2021
  
  Examples
  --------
  >>> from sktime.transformations.panel.channel_selection import ElbowClassPairwise
  >>> from sktime.utils._testing.panel import make_classification_problem
  >>> X, y = make_classification_problem(n_columns=3, n_classes=3, random_state=42)
  >>> cs = ElbowClassPairwise()
  >>> cs.fit(X, y)
  ElbowClassPairwise(...)
  >>> Xt = cs.transform(X)
class_docstr_tok: ["Elbow","Class","Pairwise","(","ECP",")","transformer","to","select","a","subset","of","channels",".","Overview",":","From","the","input","of","multivariate","time","series","data",",","create","a","distance","matrix","[","1","]","by","calculating","the","distance","between","each","class","centroid",".","The","ECP","selects","the","subset","of","channels","using","the","elbow","method","that","maximizes","the","distance","between","each","class","centroids","pair","across","all","channels",".","Note",":","Channels",",","variables",",","dimensions",",","features","are","used","interchangeably","in","literature",".","Attributes","--","--","--","--","--","channels_selected_",":","list","of","integers",";","integer","being","the","index","of","the","channel","List","of","channels","selected","by","the","ECS",".","distance_frame_",":","DataFrame","distance","matrix","of","the","class","centroids","pair","and","channels",".","``","shape","=","[","n_channels",",","n_class_centroids_pairs","]","``","Table","1","provides","an","illustration","in","[","1","]",".","train_time_",":","int","Time","taken","to","train","the","ECP",".","Notes","--","--","-","Original","repository",":","https",":","\/\/github.com\/mlgig\/Channel-Selection-MTSC","References","--","--","--","--","--","..","[","1","]",":","Bhaskar","Dhariyal","et","al",".","``","Fast","Channel","Selection","for","Scalable","Multivariate","Time","Series","Classification",".","''","AALTD",",","ECML-PKDD",",","Springer",",","2021","Examples","--","--","--","--",">",">",">","from","sktime.transformations.panel.channel_selection","import","ElbowClassPairwise",">",">",">","from","sktime.utils._testing.panel","import","make_classification_problem",">",">",">","X",",","y","=","make_classification_problem","(","n_columns=3",",","n_classes=3",",","random_state=42",")",">",">",">","cs","=","ElbowClassPairwise","(",")",">",">",">","cs.fit","(","X",",","y",")","ElbowClassPairwise","(","...",")",">",">",">","Xt","=","cs.transform","(","X",")"]
docstr: Fit ECP to a specified X and y.
  
  Parameters
  ----------
  X: pandas DataFrame or np.ndarray
      The training input samples.
  y: array-like or list
      The class values for X.
  
  Returns
  -------
  self : reference to self.
docstr_tok: ["Fit","ECP","to","a","specified","X","and","y.","Parameters","--","--","--","--","--","X",":","pandas","DataFrame","or","np.ndarray","The","training","input","samples",".","y",":","array-like","or","list","The","class","values","for","X",".","Returns","--","--","--","-","self",":","reference","to","self","."]
code: def _fit(self, X, y):
      """Fit ECP to a specified X and y.
  
      Parameters
      ----------
      X: pandas DataFrame or np.ndarray
          The training input samples.
      y: array-like or list
          The class values for X.
  
      Returns
      -------
      self : reference to self.
      """
      self.channels_selected_ = []
      start = int(round(time.time() * 1000))
      centroid_obj = _shrunk_centroid(1e-5)
      df = centroid_obj.create_centroid(X.copy(), y)
      obj = _distance_matrix()
      self.distance_frame_ = obj.distance(df)
  
      for pairdistance in self.distance_frame_.items():
          distance = pairdistance[1].sort_values(ascending=False).values
          indices = pairdistance[1].sort_values(ascending=False).index
  
          self.channels_selected_.extend(
              _detect_knee_point(distance, indices)[0]
          )
          self.channels_selected_ = list(set(self.channels_selected_))
      self.train_time_ = int(round(time.time() * 1000)) - start
  
      return self
  
imports: import itertools
  import time
  import numpy
  import pandas
  from sklearn.neighbors import NearestCentroid
  from sktime.datatypes import convert
  from sktime.datatypes._panel._convert import from_3d_numpy_to_nested
  from sktime.transformations.base import BaseTransformer
label_desc: Use image node_id 2 for calling the ElbowClassPairwise obj's underlying member method code with example usage: obj._fit(X, y) and returns: self