Polynomial functions (quadratic, cubic, etc.) are used to reduce the displacement in the model and allow interactions between members. In scikit-learn, it is implemented as a conversion to sklearn.preprocessing.PolynomialFeatures .
The idea is that you have three functions a , b and c . Quadratic functions will be generated by extending (a + b + c) ^ 2 . Thus, a^2 , b^2 c^2 , a*b , a*c , b*c would be a set of quadratic functions.
Inside scikit-learn PolynomialFeatures , when the degree argument is passed, all members to this degree are created.
This is usually used before building a linear model. This reduces bias, but very quickly increases the size of the feature set.
source share