January 2020
Beginner to intermediate
372 pages
10h
English
We can center the variable distributions at 0 and then scale them to their absolute maximum, as recommended by scikit-learn, by combining the use of two transformers. To do this, we need to import the required packages and load the data, just like we did in step 1 to step 3 of this recipe:
from sklearn.preprocessing import StandardScaler
scaler_mean = StandardScaler(with_mean=True, with_std=False)
scaler_maxabs = MaxAbsScaler()
Read now
Unlock full access