class_docstr: Shapelet Transform.
  
  Original journal publication:
  @article{hills2014classification,
    title={Classification of time series by shapelet transformation},
    author={Hills, Jon and Lines, Jason and Baranauskas, Edgaras and Mapp,
    James and Bagnall, Anthony},
    journal={Data Mining and Knowledge Discovery},
    volume={28},
    number={4},
    pages={851--881},
    year={2014},
    publisher={Springer}
  }
  
  Parameters
  ----------
  min_shapelet_length                 : int, lower bound on candidate
  shapelet lengths (default = 3)
  max_shapelet_length                 : int, upper bound on candidate
  shapelet lengths (default = inf or series length)
  max_shapelets_to_store_per_class    : int, upper bound on number of
  shapelets to retain from each distinct class (default = 200)
  random_state                        : RandomState, int, or none: to
  control random state objects for deterministic results (default = None)
  verbose                             : int, level of output printed to
  the console (for information only) (default = 0)
  remove_self_similar                 : boolean, remove overlapping
  "self-similar" shapelets from the final transform (default = True)
  
  Attributes
  ----------
  predefined_ig_rejection_level       : float, minimum information gain
  required to keep a shapelet (default = 0.05)
  self.shapelets                      : list of Shapelet objects,
  the stored shapelets after a dataset has been processed
docstr: Return the normalised version of series.
  
  This mirrors the scipy implementation
  with a small difference - rather than allowing /0, the function
  returns output = np.zeroes(len(input)).
  This is to allow for sensible processing of candidate
  shapelets/comparison subseries that are a straight
  line. Original version:
  https://docs.scipy.org/doc/scipy/reference/generated/scipy.stats
  .zscore.html
  
  Parameters
  ----------
  a : array_like
      An array like object containing the sample data.
  
  axis : int or None, optional
      Axis along which to operate. Default is 0. If None, compute over
      the whole array a.
  
  ddof : int, optional
      Degrees of freedom correction in the calculation of the standard
      deviation. Default is 0.
  
  Returns
  -------
  zscore : array_like
      The z-scores, standardized by mean and standard deviation of
      input array a.
docstr_tok: ["Return","the","normalised","version","of","series",".","This","mirrors","the","scipy","implementation","with","a","small","difference","-","rather","than","allowing","\/0",",","the","function","returns","output","=","np.zeroes","(","len","(","input",")",")",".","This","is","to","allow","for","sensible","processing","of","candidate","shapelets\/comparison","subseries","that","are","a","straight","line",".","Original","version",":","https",":","\/\/docs.scipy.org\/doc\/scipy\/reference\/generated\/scipy.stats",".zscore.html","Parameters","--","--","--","--","--","a",":","array_like","An","array","like","object","containing","the","sample","data",".","axis",":","int","or","None",",","optional","Axis","along","which","to","operate",".","Default","is","0",".","If","None",",","compute","over","the","whole","array","a.","ddof",":","int",",","optional","Degrees","of","freedom","correction","in","the","calculation","of","the","standard","deviation",".","Default","is","0",".","Returns","--","--","--","-","zscore",":","array_like","The","z-scores",",","standardized","by","mean","and","standard","deviation","of","input","array","a","."]
code: def zscore(a, axis=0, ddof=0):
      """Return the normalised version of series.
  
      This mirrors the scipy implementation
      with a small difference - rather than allowing /0, the function
      returns output = np.zeroes(len(input)).
      This is to allow for sensible processing of candidate
      shapelets/comparison subseries that are a straight
      line. Original version:
      https://docs.scipy.org/doc/scipy/reference/generated/scipy.stats
      .zscore.html
  
      Parameters
      ----------
      a : array_like
          An array like object containing the sample data.
  
      axis : int or None, optional
          Axis along which to operate. Default is 0. If None, compute over
          the whole array a.
  
      ddof : int, optional
          Degrees of freedom correction in the calculation of the standard
          deviation. Default is 0.
  
      Returns
      -------
      zscore : array_like
          The z-scores, standardized by mean and standard deviation of
          input array a.
      """
      zscored = np.empty(a.shape)
      for i, j in enumerate(a):
          # j = np.asanyarray(j)
          sstd = j.std(axis=axis, ddof=ddof)
  
          # special case - if shapelet is a straight line (i.e. no
          # variance), zscore ver should be np.zeros(len(a))
          if sstd == 0:
              zscored[i] = np.zeros(len(j))
          else:
              mns = j.mean(axis=axis)
              if axis and mns.ndim < j.ndim:
                  zscored[i] = (
                      j - np.expand_dims(mns, axis=axis)
                  ) / np.expand_dims(sstd, axis=axis)
              else:
                  zscored[i] = (j - mns) / sstd
      return zscored
  
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 9 for calling the ShapeletTransform obj's underlying member method code with example usage: obj.zscore(a, axis, ddof) and returns: zscored