class_docstr: Supervised interval feature transformer.
  
  Extracts intervals in fit using the supervised process described in [1].
  Interval sub-series are extracted for each input feature, and the usefulness of that
  feature extracted on an interval is evaluated using the Fisher score metric.
  Intervals are continually split in half, with the better scoring half retained as a
  feature for the transform.
  
  Multivariate capability is added by running the supervised interval extraction
  process on each dimension of the input data.
  
  As the extracted interval features are already extracted for the supervised
  evaluation in fit, the fit_transform method is recommended if the transformed fit
  data is required.
  
  Parameters
  ----------
  n_intervals : int, default=50
      The number of times the supervised interval selection process is run.
      Each supervised extraction will output a varying amount of features based on
      series length, number of dimensions and the number of features.
  min_interval_length : int, default=3
      The minimum length of extracted intervals. Minimum value of 3.
  features : function with a single 2d array-like parameter or list of said functions,
          default=None
      Functions used to extract features from selected intervals. If None, defaults to
      the following statistics used in [2]:
      [mean, median, std, slope, min, max, iqr, count_mean_crossing,
      count_above_mean].
  randomised_split_point : bool, default=True
      If True, the split point for interval extraction is randomised as is done in [2]
      rather than split in half.
  n_jobs : int, default=1
      The number of jobs to run in parallel for both `fit` and `transform`.
      ``-1`` means using all processors.
  random_state : int or None, default=None
      Seed for random number generation.
  parallel_backend : str, ParallelBackendBase instance or None, default=None
      Specify the parallelisation backend implementation in joblib, if None a 'prefer'
      value of "threads" is used by default.
      Valid options are "loky", "multiprocessing", "threading" or a custom backend.
      See the joblib Parallel documentation for more details.
  
  Attributes
  ----------
  n_instances_ : int
      The number of train cases.
  n_dims_ : int
      The number of dimensions per case.
  series_length_ : int
      The length of each series.
  intervals_ : list of tuples
      Contains information for each feature extracted in fit. Each tuple contains the
      interval start, interval end, interval dimension and the feature extracted.
      Length will be the same as the amount of transformed features.
  
  See Also
  --------
  RandomIntervals
  
  Notes
  -----
  Based on the authors (stevcabello) code: https://github.com/stevcabello/r-STSF/
  
  References
  ----------
  .. [1] Cabello, N., Naghizade, E., Qi, J. and Kulik, L., 2020, November. Fast and
      accurate time series classification through supervised interval search. In 2020
      IEEE International Conference on Data Mining (ICDM) (pp. 948-953). IEEE.
  .. [2] Cabello, N., Naghizade, E., Qi, J. and Kulik, L., 2021. Fast, accurate and
      interpretable time series classification through randomization. arXiv preprint
      arXiv:2105.14876.
class_docstr_tok: ["Supervised","interval","feature","transformer",".","Extracts","intervals","in","fit","using","the","supervised","process","described","in","[","1","]",".","Interval","sub-series","are","extracted","for","each","input","feature",",","and","the","usefulness","of","that","feature","extracted","on","an","interval","is","evaluated","using","the","Fisher","score","metric",".","Intervals","are","continually","split","in","half",",","with","the","better","scoring","half","retained","as","a","feature","for","the","transform",".","Multivariate","capability","is","added","by","running","the","supervised","interval","extraction","process","on","each","dimension","of","the","input","data",".","As","the","extracted","interval","features","are","already","extracted","for","the","supervised","evaluation","in","fit",",","the","fit_transform","method","is","recommended","if","the","transformed","fit","data","is","required",".","Parameters","--","--","--","--","--","n_intervals",":","int",",","default=50","The","number","of","times","the","supervised","interval","selection","process","is","run",".","Each","supervised","extraction","will","output","a","varying","amount","of","features","based","on","series","length",",","number","of","dimensions","and","the","number","of","features",".","min_interval_length",":","int",",","default=3","The","minimum","length","of","extracted","intervals",".","Minimum","value","of","3.","features",":","function","with","a","single","2d","array-like","parameter","or","list","of","said","functions",",","default=None","Functions","used","to","extract","features","from","selected","intervals",".","If","None",",","defaults","to","the","following","statistics","used","in","[","2","]",":","[","mean",",","median",",","std",",","slope",",","min",",","max",",","iqr",",","count_mean_crossing",",","count_above_mean","]",".","randomised_split_point",":","bool",",","default=True","If","True",",","the","split","point","for","interval","extraction","is","randomised","as","is","done","in","[","2","]","rather","than","split","in","half",".","n_jobs",":","int",",","default=1","The","number","of","jobs","to","run","in","parallel","for","both","`","fit","`","and","`","transform","`",".","``","-1","``","means","using","all","processors",".","random_state",":","int","or","None",",","default=None","Seed","for","random","number","generation",".","parallel_backend",":","str",",","ParallelBackendBase","instance","or","None",",","default=None","Specify","the","parallelisation","backend","implementation","in","joblib",",","if","None","a","'prefer'","value","of","``","threads","''","is","used","by","default",".","Valid","options","are","``","loky","''",",","``","multiprocessing","''",",","``","threading","''","or","a","custom","backend",".","See","the","joblib","Parallel","documentation","for","more","details",".","Attributes","--","--","--","--","--","n_instances_",":","int","The","number","of","train","cases",".","n_dims_",":","int","The","number","of","dimensions","per","case",".","series_length_",":","int","The","length","of","each","series",".","intervals_",":","list","of","tuples","Contains","information","for","each","feature","extracted","in","fit",".","Each","tuple","contains","the","interval","start",",","interval","end",",","interval","dimension","and","the","feature","extracted",".","Length","will","be","the","same","as","the","amount","of","transformed","features",".","See","Also","--","--","--","--","RandomIntervals","Notes","--","--","-","Based","on","the","authors","(","stevcabello",")","code",":","https",":","\/\/github.com\/stevcabello\/r-STSF\/","References","--","--","--","--","--","..","[","1","]","Cabello",",","N.",",","Naghizade",",","E.",",","Qi",",","J.","and","Kulik",",","L.",",","2020",",","November",".","Fast","and","accurate","time","series","classification","through","supervised","interval","search",".","In","2020","IEEE","International","Conference","on","Data","Mining","(","ICDM",")","(","pp",".","948-953",")",".","IEEE",".","..","[","2","]","Cabello",",","N.",",","Naghizade",",","E.",",","Qi",",","J.","and","Kulik",",","L.",",","2021",".","Fast",",","accurate","and","interpretable","time","series","classification","through","randomization",".","arXiv","preprint","arXiv:2105.14876","."]
code: def _fit_setup(self, X, y):
      from sktime.utils.numba.stats import (
          row_count_above_mean,
          row_count_mean_crossing,
          row_iqr,
          row_mean,
          row_median,
          row_numba_max,
          row_numba_min,
          row_slope,
          row_std,
      )
  
      self.n_instances_, self.n_dims_, self.series_length_ = X.shape
  
      if self.n_instances_ <= 1:
          raise ValueError(
              "Supervised intervals requires more than 1 training time series."
          )
  
      if self.min_interval_length < 3:
          self._min_interval_length = 3
  
      if self.series_length_ < 6:
          raise ValueError("Series length must be at least 6.")
      elif self._min_interval_length * 2 > self.series_length_:
          raise ValueError(
              "Minimum interval length must be less than half the series length."
          )
  
      if self.features is None:
          self._features = [
              row_mean,
              row_median,
              row_std,
              row_slope,
              row_numba_min,
              row_numba_max,
              row_iqr,
              row_count_mean_crossing,
              row_count_above_mean,
          ]
  
      li = []
      if not isinstance(self._features, list):
          self._features = [self._features]
  
      for f in self._features:
          if callable(f):
              li.append(f)
          else:
              raise ValueError()
      self._features = li
  
      self._n_jobs = check_n_jobs(self.n_jobs)
  
      le = preprocessing.LabelEncoder()
      return le.fit_transform(y)
  
file_path: sktime/sktime/transformations/panel/supervised_intervals.py
imports: import numpy
  from joblib import Parallel, delayed
  from sklearn import preprocessing
  from sklearn.utils import check_random_state
  from sktime.transformations.base import BaseTransformer
  from sktime.utils.validation import check_n_jobs
label_desc: Use image node_id 5 for calling the SupervisedIntervals obj's underlying member method code with example usage: obj._fit_setup(X, y) and returns: le