def test_serialize_paa(): X = _get_random_walk() # PAA transform (and inverse transform) of the data n_paa_segments = 10 paa = PiecewiseAggregateApproximation(n_segments=n_paa_segments) _check_not_fitted(paa) paa.fit(X) _check_params_predict(paa, X, ['transform'])
def fit(self, X): """ Prepares the data for encoding *i*\ SAX according to``PiecewiseAggregateApproximation`` :returns: Received data for encoding, defined by ``tslearn`` :rtype: numpy.ndarray of PiecewiseAggregateApproximation """ return PiecewiseAggregateApproximation.fit(self, X)