Python sklearn.preprocessing.PowerTransformer() Examples

The following are 1 code examples for showing how to use sklearn.preprocessing.PowerTransformer(). These examples are extracted from open source projects. 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 check out the related API usage on the sidebar.

You may also want to check out all available functions/classes of the module sklearn.preprocessing , or try the search function .

Example 1
Project: pyts   Author: johannfaouzi   File:    License: BSD 3-Clause "New" or "Revised" License 6 votes vote down vote up
def transform(self, X):
        """Transform the data.

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

        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