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: Check which scoring metric to use.
  
  Parameters
  ----------
  scoring_metric : string
      Choose from "ROC_AUC" or "F1"
  
  Returns
  -------
  scoring_metric_call : a callable, keyed by the `scoring_metric` input
      _roc_auc_score, if scoring_metric = "ROC_AUC"
      _binary_f1_score, if scoring_metric = "F1"
docstr_tok: ["Check","which","scoring","metric","to","use",".","Parameters","--","--","--","--","--","scoring_metric",":","string","Choose","from","``","ROC_AUC","''","or","``","F1","''","Returns","--","--","--","-","scoring_metric_call",":","a","callable",",","keyed","by","the","`","scoring_metric","`","input","_roc_auc_score",",","if","scoring_metric","=","``","ROC_AUC","''","_binary_f1_score",",","if","scoring_metric","=","``","F1","''"]
code: def _check_scoring_metric(self, scoring_metric):
      """Check which scoring metric to use.
  
      Parameters
      ----------
      scoring_metric : string
          Choose from "ROC_AUC" or "F1"
  
      Returns
      -------
      scoring_metric_call : a callable, keyed by the `scoring_metric` input
          _roc_auc_score, if scoring_metric = "ROC_AUC"
          _binary_f1_score, if scoring_metric = "F1"
      """
      from sktime.transformations.series._clasp_numba import (
          _binary_f1_score,
          _roc_auc_score,
      )
  
      valid_scores = ("ROC_AUC", "F1")
  
      if scoring_metric not in valid_scores:
          raise ValueError(
              f"invalid input, please use one of {valid_scores}"
          )
  
      if scoring_metric == "ROC_AUC":
          return _roc_auc_score
      elif scoring_metric == "F1":
          return _binary_f1_score
  
imports: from sktime.transformations.base import BaseTransformer
label_desc: Use image node_id 3 for calling the ClaSPTransformer obj's underlying member method code with example usage: obj._check_scoring_metric(scoring_metric) and returns: _roc_auc_score, _binary_f1_score