August 2019
Intermediate to advanced
342 pages
9h 35m
English
In the following example, we see the PowerTransformer class of scikit-learn in action, applying the zero-mean, unit-variance normalization to the transformed output using a Box–Cox transformation:
from sklearn import preprocessingimport numpy as nppt = preprocessing.PowerTransformer(method='box-cox', standardize=False) X_lognormal = np.random.RandomState(616).lognormal(size=(3, 3))pt.fit_transform(X_lognormal)
Read now
Unlock full access