sklearn.preprocessing.PolynomialFeatures的研究

PolynomialFeatures

class sklearn.preprocessing.PolynomialFeatures(degree=2, *, interaction_only=False, include_bias=True, order='C')

官网: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].

大意:生成多项式和交互特征。生成一个新的特征矩阵,该矩阵由次数小于或等于指定次数的特征的所有多项式组合组成。例如,如果输入样本是二维的,形式为[a,b],则二阶多项式特征为[1,a

猜你喜欢

转载自blog.csdn.net/ISWZY/article/details/128233944