I m trying to predict a Variable y from a set of features X where X at start are 36 features. I have two questions concerning this:
- How to handle boolean-attributes (0,1) while creating polynomial features? It doesn't make sense to square them for example.
Code I Have so far:
poly = PolynomialFeatures(degree=2)
X_ = poly.fit_transform(X_train)
- How to make a feature selection for polynomial regression? Because creating polynomial features of degree 2 for 36 variables increases the size of X drasticly. Is there a Method to run a selection which returns the best model based on MSE for example?