class sklearn.preprocessing.PolynomialFeatures(degree=2, interaction_only=False, include_bias=True) [source]
Generate polynomial and interaction features. Generate a new feature matrix consisting of all polynomial combinations of the features with degree less than or equal to the specified degree. For example, if an input sample is two dimensional and of the form [a, b], the degree-2 polynomial features are [1, a, b, a^2, ab, b^2]. Parameters:
degree : integer The degree of the polynomial