class_docstr: Symbolic Aggregate approXimation (SAX) transformation.
  
  SAX was originally presented in [1]_.
  
  Parameters
  ----------
  n_segments : int (default: 1)
      Number of PAA segments to compute
      
  alphabet_size_avg : int (default: 5)
      Number of SAX symbols to use
  
  scale: bool (default: False)
       Whether input data should be scaled for each feature to have zero 
       mean and unit variance across the dataset passed at fit time.
       Default for this parameter is set to `False` in version 0.4 to ensure
       backward compatibility, but is likely to change in a future version.
  
  Attributes
  ----------
  breakpoints_avg_ : numpy.ndarray of shape (alphabet_size - 1, )
      List of breakpoints used to generate SAX symbols
  
  Notes
  -----
      This method requires a dataset of equal-sized time series.
  
  Examples
  --------
  >>> sax = SymbolicAggregateApproximation(n_segments=3, alphabet_size_avg=2)
  >>> data = [[-1., 2., 0.1, -1., 1., -1.], [1., 3.2, -1., -3., 1., -1.]]
  >>> sax_data = sax.fit_transform(data)
  >>> sax_data.shape
  (2, 3, 1)
  >>> sax_data
  array([[[1],
          [0],
          [1]],
  <BLANKLINE>
         [[1],
          [0],
          [1]]])
  >>> sax.distance_sax(sax_data[0], sax_data[1])  # doctest: +ELLIPSIS
  0.0
  >>> sax.distance(data[0], data[1])  # doctest: +ELLIPSIS
  0.0
  >>> sax.inverse_transform(sax_data)
  array([[[ 0.67448975],
          [ 0.67448975],
          [-0.67448975],
          [-0.67448975],
          [ 0.67448975],
          [ 0.67448975]],
  <BLANKLINE>
         [[ 0.67448975],
          [ 0.67448975],
          [-0.67448975],
          [-0.67448975],
          [ 0.67448975],
          [ 0.67448975]]])
  
  References
  ----------
  .. [1] J. Lin, E. Keogh, L. Wei, et al. Experiencing SAX: a novel symbolic
     representation of time series. Data Mining and Knowledge Discovery,
     2007. vol. 15(107)
class_docstr_tok: ["Symbolic","Aggregate","approXimation","(","SAX",")","transformation",".","SAX","was","originally","presented","in","[","1","]","_.","Parameters","--","--","--","--","--","n_segments",":","int","(","default",":","1",")","Number","of","PAA","segments","to","compute","alphabet_size_avg",":","int","(","default",":","5",")","Number","of","SAX","symbols","to","use","scale",":","bool","(","default",":","False",")","Whether","input","data","should","be","scaled","for","each","feature","to","have","zero","mean","and","unit","variance","across","the","dataset","passed","at","fit","time",".","Default","for","this","parameter","is","set","to","`","False","`","in","version","0.4","to","ensure","backward","compatibility",",","but","is","likely","to","change","in","a","future","version",".","Attributes","--","--","--","--","--","breakpoints_avg_",":","numpy.ndarray","of","shape","(","alphabet_size","-","1",",",")","List","of","breakpoints","used","to","generate","SAX","symbols","Notes","--","--","-","This","method","requires","a","dataset","of","equal-sized","time","series",".","Examples","--","--","--","--",">",">",">","sax","=","SymbolicAggregateApproximation","(","n_segments=3",",","alphabet_size_avg=2",")",">",">",">","data","=","[","[","-1.",",","2.",",","0.1",",","-1.",",","1.",",","-1",".","]",",","[","1.",",","3.2",",","-1.",",","-3.",",","1.",",","-1",".","]","]",">",">",">","sax_data","=","sax.fit_transform","(","data",")",">",">",">","sax_data.shape","(","2",",","3",",","1",")",">",">",">","sax_data","array","(","[","[","[","1","]",",","[","0","]",",","[","1","]","]",",","<","BLANKLINE",">","[","[","1","]",",","[","0","]",",","[","1","]","]","]",")",">",">",">","sax.distance_sax","(","sax_data","[","0","]",",","sax_data","[","1","]",")","#","doctest",":","+ELLIPSIS","0.0",">",">",">","sax.distance","(","data","[","0","]",",","data","[","1","]",")","#","doctest",":","+ELLIPSIS","0.0",">",">",">","sax.inverse_transform","(","sax_data",")","array","(","[","[","[","0.67448975","]",",","[","0.67448975","]",",","[","-0.67448975","]",",","[","-0.67448975","]",",","[","0.67448975","]",",","[","0.67448975","]","]",",","<","BLANKLINE",">","[","[","0.67448975","]",",","[","0.67448975","]",",","[","-0.67448975","]",",","[","-0.67448975","]",",","[","0.67448975","]",",","[","0.67448975","]","]","]",")","References","--","--","--","--","--","..","[","1","]","J.","Lin",",","E.","Keogh",",","L.","Wei",",","et","al",".","Experiencing","SAX",":","a","novel","symbolic","representation","of","time","series",".","Data","Mining","and","Knowledge","Discovery",",","2007.","vol",".","15","(","107",")"]
docstr: Compute distance between SAX representations as defined in [1]_.
  
  Parameters
  ----------
  ts1 : array-like
      A time series
  ts2 : array-like
      Another time series
  
  Returns
  -------
  float
      SAX distance
  
  References
  ----------
  .. [1] J. Lin, E. Keogh, L. Wei, et al. Experiencing SAX: a novel
     symbolic representation of time series. Data Mining and Knowledge
     Discovery, 2007. vol. 15(107)
docstr_tok: ["Compute","distance","between","SAX","representations","as","defined","in","[","1","]","_.","Parameters","--","--","--","--","--","ts1",":","array-like","A","time","series","ts2",":","array-like","Another","time","series","Returns","--","--","--","-","float","SAX","distance","References","--","--","--","--","--","..","[","1","]","J.","Lin",",","E.","Keogh",",","L.","Wei",",","et","al",".","Experiencing","SAX",":","a","novel","symbolic","representation","of","time","series",".","Data","Mining","and","Knowledge","Discovery",",","2007.","vol",".","15","(","107",")"]
code: def distance(self, ts1, ts2):
      """Compute distance between SAX representations as defined in [1]_.
  
      Parameters
      ----------
      ts1 : array-like
          A time series
      ts2 : array-like
          Another time series
  
      Returns
      -------
      float
          SAX distance
  
      References
      ----------
      .. [1] J. Lin, E. Keogh, L. Wei, et al. Experiencing SAX: a novel
         symbolic representation of time series. Data Mining and Knowledge
         Discovery, 2007. vol. 15(107)
      """
      sax = self.transform([ts1, ts2])
      return self.distance_sax(sax[0], sax[1])
  
imports: import numpy
  from scipy.stats import norm
  from sklearn.base import TransformerMixin
  from sklearn.utils.validation import check_is_fitted, check_array
  from tslearn.bases import BaseModelPackage, TimeSeriesBaseEstimator
  from tslearn.metrics.cysax import cydist_sax, cyslopes, cydist_1d_sax, inv_transform_1d_sax, inv_transform_sax, inv_transform_paa
  from tslearn.utils import ts_size, check_dims
label_desc: Use image node_id 11 for calling the SymbolicAggregateApproximation obj's underlying member method code with example usage: obj.distance(ts1, ts2) and returns: self