Python源码示例:sklearn.preprocessing.PowerTransformer()
示例1def 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