The doc for PolynomialFeatures states that:
PolynomialFeatures = Generate a new feature matrix consisting of all polynomial combinations of the features with degree less than or equal to the specified degree.
Which means that set interaction_only, if I have 3 input features A, B and C, it will generate 7 features: 1, A, B, C, AB, AC, BC.
I can't think of a way to filter the combinations to keep only the combinations of features with degree equal to the specified degree.
ie. Generate only: AB, AC, BC.
Is this possible?
Thanks,