Python sklearn.preprocessing.PowerTransformer() Examples

The following are 1 code examples of sklearn.preprocessing.PowerTransformer(). You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may also want to check out all available functions/classes of the module sklearn.preprocessing , or try the search function .
Example #1
Source File: transformer.py    From pyts with BSD 3-Clause "New" or "Revised" License 6 votes vote down vote up
def transform(self, X):
        """Transform the data.

        Parameters
        ----------
        X : array-like, shape = (n_samples, n_timestamps)
            Data to transform.

        Returns
        -------
        X_new : array-like, shape = (n_samples, n_timestamps)
            Transformed data.

        """
        X = check_array(X, dtype='float64', force_all_finite='allow-nan')
        transformer = SklearnPowerTransformer(
            method=self.method, standardize=self.standardize
        )
        X_new = transformer.fit_transform(X.T).T
        return X_new