I am using
scikit-learn. I use the following to center the predictor features:
X = sklearn.preprocessing.StandardScaler().fit_transform(X)
I will use the following code to create the polynomial features:
poly = PolynomialFeatures(degree=2) poly.fit_transform(X)
My question is regarding if I should center the data before or after creating the polynomial features. Would it matter and how?