class_docstr: ClaSP (Classification Score Profile) Transformer.
  
  Implementation of the Classification Score Profile of a time series.
  ClaSP hierarchically splits a TS into two parts, where each split point is
  determined by training a binary TS classifier for each possible split point and
  selecting the one with highest accuracy, i.e., the one that is best at identifying
  subsequences to be from either of the partitions.
  
  Parameters
  ----------
  window_length :       int, default = 10
      size of window for sliding.
  scoring_metric :      string, default = ROC_AUC
      the scoring metric to use in ClaSP - choose from ROC_AUC or F1
  exclusion_radius : int
      Exclusion Radius for change points to be non-trivial matches
  
  Notes
  -----
  As described in
  @inproceedings{clasp2021,
    title={ClaSP - Time Series Segmentation},
    author={Sch"afer, Patrick and Ermshaus, Arik and Leser, Ulf},
    booktitle={CIKM},
    year={2021}
  }
  
  Examples
  --------
  >>> from sktime.transformations.series.clasp import ClaSPTransformer
  >>> from sktime.annotation.clasp import find_dominant_window_sizes
  >>> from sktime.datasets import load_electric_devices_segmentation
  >>> X, true_period_size, true_cps = load_electric_devices_segmentation()
  >>> dominant_period_size = find_dominant_window_sizes(X) # doctest: +SKIP
  >>> clasp = ClaSPTransformer(window_length=dominant_period_size) # doctest: +SKIP
  >>> clasp.fit(X) # doctest: +SKIP
  >>> profile = clasp.transform(X) # doctest: +SKIP
docstr: Compute ClaSP.
  
  Takes as input a single time series dataset and returns the
  Classification Score profile for that single time series.
  
  Parameters
  ----------
  X : 2D numpy.ndarray
     A single pandas series or a 1d numpy array
  y : ignored argument for interface compatibility
      Additional data, e.g., labels for transformation
  
  Returns
  -------
  Xt : 1D numpy.ndarray
      transformed version of X
      ClaSP of the single time series as output
      with length as (n-window_length+1)
docstr_tok: ["Compute","ClaSP",".","Takes","as","input","a","single","time","series","dataset","and","returns","the","Classification","Score","profile","for","that","single","time","series",".","Parameters","--","--","--","--","--","X",":","2D","numpy.ndarray","A","single","pandas","series","or","a","1d","numpy","array","y",":","ignored","argument","for","interface","compatibility","Additional","data",",","e.g.",",","labels","for","transformation","Returns","--","--","--","-","Xt",":","1D","numpy.ndarray","transformed","version","of","X","ClaSP","of","the","single","time","series","as","output","with","length","as","(","n-window_length+1",")"]
code: def _transform(self, X, y=None):
      """Compute ClaSP.
  
      Takes as input a single time series dataset and returns the
      Classification Score profile for that single time series.
  
      Parameters
      ----------
      X : 2D numpy.ndarray
         A single pandas series or a 1d numpy array
      y : ignored argument for interface compatibility
          Additional data, e.g., labels for transformation
  
      Returns
      -------
      Xt : 1D numpy.ndarray
          transformed version of X
          ClaSP of the single time series as output
          with length as (n-window_length+1)
      """
      from sktime.transformations.series._clasp_numba import clasp
  
      scoring_metric_call = self._check_scoring_metric(
          self.scoring_metric
      )
  
      X = X.flatten()
      Xt, _ = clasp(
          X,
          self.window_length,
          score=scoring_metric_call,
          exclusion_radius=self.exclusion_radius,
      )
  
      return Xt
  
imports: from sktime.transformations.base import BaseTransformer
label_desc: Use image node_id 2 for calling the ClaSPTransformer obj's underlying member method code with example usage: obj._transform(X, y) and returns: Xt