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


本文来自互联网用户投稿,文章观点仅代表作者本人,不代表本站立场,不承担相关法律责任。如若转载,请注明出处。 如若内容造成侵权/违法违规/事实不符,请点击【内容举报】进行投诉反馈!

相关文章

立即
投稿

微信公众账号

微信扫一扫加关注

返回
顶部