class_docstr: ClaSP (Classification Score Profile) Segmentation.
  
  Using ClaSP for the CPD problem is straightforward: We first compute the profile
  and then choose its global maximum as the change point. The following CPDs
  are obtained using a bespoke recursive split segmentation algorithm.
  
  Parameters
  ----------
  period_length :         int, default = 10
      size of window for sliding, based on the period length of the data
  n_cps :                 int, default = 1
      the number of change points to search
  fmt :                  str {"dense", "sparse"}, optional (default="sparse")
      Annotation output format:
      * If "sparse", a pd.Series of the found Change Points is returned
      * If "dense", a pd.IndexSeries with the Segmentation of X is returned
  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.annotation.clasp import ClaSPSegmentation
  >>> from sktime.annotation.clasp import find_dominant_window_sizes
  >>> from sktime.datasets import load_gun_point_segmentation
  >>> X, true_period_size, cps = load_gun_point_segmentation() # doctest: +SKIP
  >>> dominant_period_size = find_dominant_window_sizes(X) # doctest: +SKIP
  >>> clasp = ClaSPSegmentation(dominant_period_size, n_cps=1) # doctest: +SKIP
  >>> found_cps = clasp.fit_predict(X) # doctest: +SKIP
  >>> profiles = clasp.profiles # doctest: +SKIP
  >>> scores = clasp.scores # doctest: +SKIP
class_docstr_tok: ["ClaSP","(","Classification","Score","Profile",")","Segmentation",".","Using","ClaSP","for","the","CPD","problem","is","straightforward",":","We","first","compute","the","profile","and","then","choose","its","global","maximum","as","the","change","point",".","The","following","CPDs","are","obtained","using","a","bespoke","recursive","split","segmentation","algorithm",".","Parameters","--","--","--","--","--","period_length",":","int",",","default","=","10","size","of","window","for","sliding",",","based","on","the","period","length","of","the","data","n_cps",":","int",",","default","=","1","the","number","of","change","points","to","search","fmt",":","str","{","``","dense","''",",","``","sparse","''","}",",","optional","(","default=","''","sparse","''",")","Annotation","output","format",":","*","If","``","sparse","''",",","a","pd.Series","of","the","found","Change","Points","is","returned","*","If","``","dense","''",",","a","pd.IndexSeries","with","the","Segmentation","of","X","is","returned","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.annotation.clasp","import","ClaSPSegmentation",">",">",">","from","sktime.annotation.clasp","import","find_dominant_window_sizes",">",">",">","from","sktime.datasets","import","load_gun_point_segmentation",">",">",">","X",",","true_period_size",",","cps","=","load_gun_point_segmentation","(",")","#","doctest",":","+SKIP",">",">",">","dominant_period_size","=","find_dominant_window_sizes","(","X",")","#","doctest",":","+SKIP",">",">",">","clasp","=","ClaSPSegmentation","(","dominant_period_size",",","n_cps=1",")","#","doctest",":","+SKIP",">",">",">","found_cps","=","clasp.fit_predict","(","X",")","#","doctest",":","+SKIP",">",">",">","profiles","=","clasp.profiles","#","doctest",":","+SKIP",">",">",">","scores","=","clasp.scores","#","doctest",":","+SKIP"]
docstr: Return scores in ClaSP's profile for each annotation.
  
  Parameters
  ----------
  X : pd.DataFrame
      Data to annotate (time series).
  
  Returns
  -------
  Y : pd.Series
      Scores for sequence X exact format depends on annotation type.
docstr_tok: ["Return","scores","in","ClaSP","'s","profile","for","each","annotation",".","Parameters","--","--","--","--","--","X",":","pd.DataFrame","Data","to","annotate","(","time","series",")",".","Returns","--","--","--","-","Y",":","pd.Series","Scores","for","sequence","X","exact","format","depends","on","annotation","type","."]
code: def _predict_scores(self, X):
      """Return scores in ClaSP's profile for each annotation.
  
      Parameters
      ----------
      X : pd.DataFrame
          Data to annotate (time series).
  
      Returns
      -------
      Y : pd.Series
          Scores for sequence X exact format depends on annotation type.
      """
      self.found_cps, self.profiles, self.scores = self._run_clasp(X)
  
      # Scores of the Change Points
      if self.fmt == "sparse":
          return pd.Series(self.scores)
  
      # Full Profile of Segmentation
      # ClaSP creates multiple profiles. Hard to map.
      # Thus, we return the main (first) one
      elif self.fmt == "dense":
          return pd.Series(self.profiles[0])
  
file_path: sktime/sktime/annotation/clasp.py
imports: from sktime.annotation.base import BaseSeriesAnnotator
  from queue import PriorityQueue
  import numpy
  import pandas
  from sktime.transformations.series.clasp import ClaSPTransformer
  from sktime.utils.validation.series import check_series
label_desc: Use image node_id 4 for calling the ClaSPSegmentation obj's underlying member method code with example usage: obj._predict_scores(X) and returns: pd, pd