I am running a polynomial regression using scikit-learn. I have a large number of variables (23 to be precise) which I am trying to regress using polynomial regression with degree 2.
interaction_only = True, keeps only the interaction terms such as X1*Y1, X2*Y2, and so on.
I want only the other terms i.e, X1, X12, Y1, Y12, and so on.
Is there a function to get this?