Teaching a linear model about area through interactions
Polynomial features add products and powers of inputs to the design matrix while keeping the fitted coefficients linear.
PolynomialFeatures in practice
Including length times width alongside each dimension supplies an area term. Higher degree and many input dimensions can rapidly expand the matrix.
中文
交互特征怎样让线性模型理解面积?
多项式特征把输入变量的乘积和幂加入设计矩阵,回归系数仍可线性拟合。
PolynomialFeatures 应用实例
矩形长宽分别进入模型,再加入长乘宽就能表达面积项。维度和阶数一高,产生的列数会迅速增长。