class_docstr: Piecewise Aggregate Approximation.
  
  Parameters
  ----------
  window_size : int, float or None (default = 1)
      Length of the sliding window. If float, it represents
      a percentage of the size of each time series and must be
      between 0 and 1.
  
  output_size : int, float or None (default = None)
      Size of the returned time series. If float, it represents
      a percentage of the size of each time series and must be
      between 0. and 1. Ignored if ``window_size`` is not None.
      It can't be None if ``window_size`` is None. If you want to use
      ``output_size`` over ``window_size``, you must set
      ``window_size=None``.
  
  overlapping : bool (default = True)
      When ``window_size=None``, ``output_size`` is used to derive the window
      size; the window size is fixed if ``overlapping=True`` and may vary
      if ``overlapping=False``. Ignored if ``window_size`` is specified.
  
  References
  ----------
  .. [1] E. Keogh, K. Chakrabarti, M. Pazzani, and S. Mehrotra,
         "Dimensionality reduction for fast similarity search in large
         time series databases". Knowledge and information Systems,
         3(3), 263-286 (2001).
  
  Examples
  --------
  >>> from pyts.approximation import PiecewiseAggregateApproximation
  >>> X = [[0, 4, 2, 1, 7, 6, 3, 5],
  ...      [2, 5, 4, 5, 3, 4, 2, 3]]
  >>> transformer = PiecewiseAggregateApproximation(window_size=2)
  >>> transformer.transform(X)
  array([[2. , 1.5, 6.5, 4. ],
         [3.5, 4.5, 3.5, 2.5]])
class_docstr_tok: ["Piecewise","Aggregate","Approximation",".","Parameters","--","--","--","--","--","window_size",":","int",",","float","or","None","(","default","=","1",")","Length","of","the","sliding","window",".","If","float",",","it","represents","a","percentage","of","the","size","of","each","time","series","and","must","be","between","0","and","1.","output_size",":","int",",","float","or","None","(","default","=","None",")","Size","of","the","returned","time","series",".","If","float",",","it","represents","a","percentage","of","the","size","of","each","time","series","and","must","be","between","0.","and","1",".","Ignored","if","``","window_size","``","is","not","None",".","It","ca","n't","be","None","if","``","window_size","``","is","None",".","If","you","want","to","use","``","output_size","``","over","``","window_size","``",",","you","must","set","``","window_size=None","``",".","overlapping",":","bool","(","default","=","True",")","When","``","window_size=None","``",",","``","output_size","``","is","used","to","derive","the","window","size",";","the","window","size","is","fixed","if","``","overlapping=True","``","and","may","vary","if","``","overlapping=False","``",".","Ignored","if","``","window_size","``","is","specified",".","References","--","--","--","--","--","..","[","1","]","E.","Keogh",",","K.","Chakrabarti",",","M.","Pazzani",",","and","S.","Mehrotra",",","``","Dimensionality","reduction","for","fast","similarity","search","in","large","time","series","databases","''",".","Knowledge","and","information","Systems",",","3","(","3",")",",","263-286","(","2001",")",".","Examples","--","--","--","--",">",">",">","from","pyts.approximation","import","PiecewiseAggregateApproximation",">",">",">","X","=","[","[","0",",","4",",","2",",","1",",","7",",","6",",","3",",","5","]",",","...","[","2",",","5",",","4",",","5",",","3",",","4",",","2",",","3","]","]",">",">",">","transformer","=","PiecewiseAggregateApproximation","(","window_size=2",")",">",">",">","transformer.transform","(","X",")","array","(","[","[","2.",",","1.5",",","6.5",",","4",".","]",",","[","3.5",",","4.5",",","3.5",",","2.5","]","]",")"]
docstr: Reduce the dimensionality of each time series.
  
  Parameters
  ----------
  X : array-like, shape = (n_samples, n_timestamps)
  
  Returns
  -------
  X_new : array, shape = (n_samples, n_timestamps_new)
docstr_tok: ["Reduce","the","dimensionality","of","each","time","series",".","Parameters","--","--","--","--","--","X",":","array-like",",","shape","=","(","n_samples",",","n_timestamps",")","Returns","--","--","--","-","X_new",":","array",",","shape","=","(","n_samples",",","n_timestamps_new",")"]
code: def transform(self, X):
      """Reduce the dimensionality of each time series.
  
      Parameters
      ----------
      X : array-like, shape = (n_samples, n_timestamps)
  
      Returns
      -------
      X_new : array, shape = (n_samples, n_timestamps_new)
  
      """
      X = check_array(X)
      n_samples, n_timestamps = X.shape
  
      window_size, output_size = self._check_params(n_timestamps)
      if window_size == 1:
          return X
      else:
          start, end, n_timestamps_new = segmentation(
              n_timestamps, window_size, self.overlapping, output_size
          )
          X_paa = _paa(
              X, n_samples, n_timestamps, start, end, n_timestamps_new
          )
          return X_paa
  
file_path: pyts/pyts/approximation/paa.py
imports: import numpy
  from math import ceil
  from numba import njit, prange
  from sklearn.base import BaseEstimator
  from sklearn.utils.validation import check_array
  from ..base import UnivariateTransformerMixin
  from ..utils import segmentation
label_desc: Use image node_id 3 for calling the PiecewiseAggregateApproximation obj's underlying member method code with example usage: obj.transform(X) and returns: X, X_paa