class_docstr: Random Shapelet Transform.
  
  Implementation of the binary shapelet transform along the lines of [1]_[2]_, with
  randomly extracted shapelets.
  
  Overview: Input "n" series with "d" dimensions of length "m". Continuously extract
  candidate shapelets and filter them in batches.
      For each candidate shapelet
          - Extract a shapelet from an instance with random length, position and
            dimension
          - Using its distance to train cases, calculate the shapelets information
            gain
          - Abandon evaluating the shapelet if it is impossible to obtain a higher
            information gain than the current worst
      For each shapelet batch
          - Add each candidate to its classes shapelet heap, removing the lowest
            information gain shapelet if the max number of shapelets has been met
          - Remove self-similar shapelets from the heap
  Using the final set of filtered shapelets, transform the data into a vector of
  of distances from a series to each shapelet.
  
  Parameters
  ----------
  n_shapelet_samples : int, default=10000
      The number of candidate shapelets to be considered for the final transform.
      Filtered down to <= max_shapelets, keeping the shapelets with the most
      information gain.
  max_shapelets : int or None, default=None
      Max number of shapelets to keep for the final transform. Each class value will
      have its own max, set to n_classes / max_shapelets. If None uses the min between
      10 * n_instances and 1000
  min_shapelet_length : int, default=3
      Lower bound on candidate shapelet lengths.
  max_shapelet_length : int or None, default= None
      Upper bound on candidate shapelet lengths. If None no max length is used.
  remove_self_similar : boolean, default=True
      Remove overlapping "self-similar" shapelets when merging candidate shapelets.
  time_limit_in_minutes : int, default=0
      Time contract to limit build time in minutes, overriding n_shapelet_samples.
      Default of 0 means n_shapelet_samples is used.
  contract_max_n_shapelet_samples : int, default=np.inf
      Max number of shapelets to extract when time_limit_in_minutes is set.
  n_jobs : int, default=1
      The number of jobs to run in parallel for both `fit` and `transform`.
      ``-1`` means using all processors.
  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.
  batch_size : int or None, default=100
      Number of shapelet candidates processed before being merged into the set of best
      shapelets.
  random_state : int or None, default=None
      Seed for random number generation.
  
  Attributes
  ----------
  n_classes : int
      The number of classes.
  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.
  classes_ : list
      The classes labels.
  shapelets : list
      The stored shapelets and relating information after a dataset has been
      processed.
      Each item in the list is a tuple containing the following 7 items:
      (shapelet information gain, shapelet length, start position the shapelet was
      extracted from, shapelet dimension, index of the instance the shapelet was
      extracted from in fit, class value of the shapelet, The z-normalised shapelet
      array)
  
  See Also
  --------
  ShapeletTransformClassifier
  
  Notes
  -----
  For the Java version, see
  `TSML <https://github.com/uea-machine-learning/tsml/blob/master/src/main/
  java/tsml/transformers/ShapeletTransform.java>`_.
  
  References
  ----------
  .. [1] Jon Hills et al., "Classification of time series by shapelet transformation",
     Data Mining and Knowledge Discovery, 28(4), 851--881, 2014.
  .. [2] A. Bostrom and A. Bagnall, "Binary Shapelet Transform for Multiclass Time
     Series Classification", Transactions on Large-Scale Data and Knowledge Centered
     Systems, 32, 2017.
  
  Examples
  --------
  >>> from sktime.transformations.panel.shapelet_transform import (
  ...     RandomShapeletTransform
  ... )
  >>> from sktime.datasets import load_unit_test
  >>> X_train, y_train = load_unit_test(split="train", return_X_y=True)
  >>> t = RandomShapeletTransform(
  ...     n_shapelet_samples=500,
  ...     max_shapelets=10,
  ...     batch_size=100,
  ... ) # doctest: +SKIP
  >>> t.fit(X_train, y_train) # doctest: +SKIP
  RandomShapeletTransform(...)
  >>> X_t = t.transform(X_train) # doctest: +SKIP
docstr: Return testing parameter settings for the estimator.
  
  Parameters
  ----------
  parameter_set : str, default="default"
      Name of the set of test parameters to return, for use in tests. If no
      special parameters are defined for a value, will return `"default"` set.
  
  Returns
  -------
  params : dict or list of dict, default = {}
      Parameters to create testing instances of the class
      Each dict are parameters to construct an "interesting" test instance, i.e.,
      `MyClass(**params)` or `MyClass(**params[i])` creates a valid test instance.
      `create_test_instance` uses the first (or only) dictionary in `params`
docstr_tok: ["Return","testing","parameter","settings","for","the","estimator",".","Parameters","--","--","--","--","--","parameter_set",":","str",",","default=","''","default","''","Name","of","the","set","of","test","parameters","to","return",",","for","use","in","tests",".","If","no","special","parameters","are","defined","for","a","value",",","will","return","`","``","default","''","`","set",".","Returns","--","--","--","-","params",":","dict","or","list","of","dict",",","default","=","{","}","Parameters","to","create","testing","instances","of","the","class","Each","dict","are","parameters","to","construct","an","``","interesting","''","test","instance",",","i.e.",",","`","MyClass","(","*","*","params",")","`","or","`","MyClass","(","*","*","params","[","i","]",")","`","creates","a","valid","test","instance",".","`","create_test_instance","`","uses","the","first","(","or","only",")","dictionary","in","`","params","`"]
code: def get_test_params(cls, parameter_set="default"):
      """Return testing parameter settings for the estimator.
  
      Parameters
      ----------
      parameter_set : str, default="default"
          Name of the set of test parameters to return, for use in tests. If no
          special parameters are defined for a value, will return `"default"` set.
  
      Returns
      -------
      params : dict or list of dict, default = {}
          Parameters to create testing instances of the class
          Each dict are parameters to construct an "interesting" test instance, i.e.,
          `MyClass(**params)` or `MyClass(**params[i])` creates a valid test instance.
          `create_test_instance` uses the first (or only) dictionary in `params`
      """
      return {
          "max_shapelets": 5,
          "n_shapelet_samples": 50,
          "batch_size": 20,
      }
  
imports: import heapq
  import time
  import warnings
  from itertools import zip_longest
  from operator import itemgetter
  import numpy
  import pandas
  from joblib import Parallel, delayed
  from sklearn import preprocessing
  from sklearn.utils import check_random_state
  from sklearn.utils.multiclass import class_distribution
  from sktime.transformations.base import BaseTransformer
  from sktime.utils.validation import check_n_jobs
label_desc: Use image node_id 4 for calling the RandomShapeletTransform obj's underlying member method code with example usage: obj.get_test_params(cls, parameter_set) and returns: dict