# 多项式变换（统计学）

多项式变换将现有预测变量的幂和交叉乘积，例如 \( x_{1} \cdot x_{2} \)，作为数据集中的新特征加入，使一个对系数保持线性的模型能够表示弯曲关系。在回归中，这是拟合曲率同时保留普通最小二乘机制的标准方法；在实验设计中，它是响应曲面方法背后的模型；在机器学习中，它是一个特征工程步骤，使线性模型无需改变训练过程就能拟合曲线。<sup>[1](https://developers.google.com/machine-learning/crash-course/numerical-data/polynomial-transforms)</sup><sup> • </sup><sup>[2](https://book.stat420.org/transformations.html)</sup> 大多数工程和制造应用最多使用二阶模型。<sup>[3](https://www.itl.nist.gov/div898/handbook/ppc/section4/ppc431.htm)</sup>

| 关键事实 | 详情 |
|---|---|
| 二阶模型形式 | \( Y = \alpha_{0} + \alpha_{1} \cdot x_{1} + \alpha_{2} \cdot x_{2} + \alpha_{11} \cdot x_{1}^{2} + \alpha_{22} \cdot x_{2}^{2} + \alpha_{12} \cdot x_{1} \cdot x_{2} + \epsilon \) <sup>[3](https://www.itl.nist.gov/div898/handbook/ppc/section4/ppc431.htm)</sup> |
| 估计 | 尽管该模型对变量而言是非线性的，它仍是各项的线性组合，并用OLS拟合 <sup>[4](https://019b8fe2-b34c-160b-c574-800b0c4880a5.share.connect.posit.cloud/regression-extensions-polynomial-functions-and-interaction-terms.html)</sup> |
| 特征数量 | \(p\)个变量的\(d\)次多项式需要\(O(p^{d})\)项 <sup>[5](https://www.hds.utc.fr/~tdenoeux/dokuwiki/_media/en/splines.pdf)</sup> |
| 多重共线性控制 | 将预测变量按其均值中心化可减少各幂次间的结构性多重共线性 <sup>[6](https://online.stat.psu.edu/stat462/node/182/)</sup> |
| 历史锚点 | 响应曲面方法由博克斯和威尔逊于1951年正式提出 <sup>[7](https://doi.org/10.1111/j.2517-6161.1951.tb00067.x)</sup> |
| 正交变体 | 正交多项式拟合效率更高，但系数透明度较低 <sup>[8](https://www.southampton.ac.uk/~mb1a10/stats/FEEG6017_lecture-Interaction_terms_etc_brendan.pdf)</sup> |
| 阶数风险 | 固定\(p\)时，包含截距在内的特征数量为\( \binom{p+d}{d} \)，它随阶数以多项式形式增长，高阶数可能导致过拟合 <sup>[9](https://scikit-learn.org/stable/modules/generated/sklearn.preprocessing.PolynomialFeatures)</sup> |

## 工作原理

该变换从原始变量构建设计矩阵的新列。对于两个解释变量，二阶模型为 \( Y = \alpha_{0} + \alpha_{1} \cdot x_{1} + \alpha_{2} \cdot x_{2} + \alpha_{11} \cdot x_{1}^{2} + \alpha_{22} \cdot x_{2}^{2} + \alpha_{12} \cdot x_{1} \cdot x_{2} + \epsilon \)。单个\(x\)项是主效应，平方项是模拟响应曲面曲率的二次效应，交叉乘积项模拟解释变量之间的交互作用。<sup>[3](https://www.itl.nist.gov/div898/handbook/ppc/section4/ppc431.htm)</sup> 三次及更高次项遵循同一规则：预测变量的每个幂次都作为额外解释变量进入。<sup>[10](https://math.unm.edu/~luyan/stat44054016/chapter8.pdf)</sup>

尽管2次或更高次多项式在\(X\)上非线性，但它是各项的线性组合，因此一旦将\(X^{2}\)作为回归变量加入，普通最小二乘就能直接估计它。<sup>[4](https://019b8fe2-b34c-160b-c574-800b0c4880a5.share.connect.posit.cloud/regression-extensions-polynomial-functions-and-interaction-terms.html)</sup> 代价是组合性的：\(p\)个变量的完整二次模型需要\(O(p^{2})\)个平方项和交叉乘积项，而\(d\)次多项式需要\(O(p^{d})\)项。<sup>[5](https://www.hds.utc.fr/~tdenoeux/dokuwiki/_media/en/splines.pdf)</sup>

## 实施方法

阶数选择通常是序贯的。前向选择拟合递增阶数的模型，直到最高阶项的\(t\)检验不显著；后向消元从高阶开始并剔除项，两种策略不一定给出相同模型。<sup>[11](https://www.sjsu.edu/faculty/guangliang.chen/Math261a/Ch7slides-polynomial-regression.pdf)</sup> 良好做法要求：只要包含较高次幂，就包含所有低阶项，以使系数保持可解释。<sup>[4](https://019b8fe2-b34c-160b-c574-800b0c4880a5.share.connect.posit.cloud/regression-extensions-polynomial-functions-and-interaction-terms.html)</sup> 分层构建意味着，如果保留给定阶数的项，则所有相关的低阶项（包括交叉乘积）也保留；只拟合\(\beta_{2} \cdot x^{2}\)而不拟合\(\beta_{1} \cdot x\)，会隐含地把转折点强制在\(x = 0\)。<sup>[12](https://people.stat.sc.edu/hansont/stat704/notes13.pdf)</sup>

中心化是标准数值保障：从每个预测变量中减去均值可减少\(x\)与其幂次之间的共线性，在中心化二次模型中 \( y_{i} = \beta_{0}^{*} + \beta_{1}^{*}(x_{i} - \bar{x}) + \beta_{11}^{*}(x_{i} - \bar{x})^{2} + \epsilon_{i} \)。<sup>[6](https://online.stat.psu.edu/stat462/node/182/)</sup> 中心化消除或减少解释变量及其交互作用之间的相关性，同时给出相同的拟合值、残差和自由度。<sup>[10](https://math.unm.edu/~luyan/stat44054016/chapter8.pdf)</sup>

最后一项注意事项涉及交互作用：一个变量的效应取决于另一个变量，因此在二次曲面中，\(x_{1}\)每增加一个单位时\(E(Y)\)的变化等于 \( \beta_{1} + 2 \cdot \beta_{11} \cdot x_{1} + \beta_{12} \cdot x_{2} \)，因而既取决于\(x_{1}\)也取决于\(x_{2}\)。<sup>[12](https://people.stat.sc.edu/hansont/stat704/notes13.pdf)</sup>

## 起源

响应曲面方法的形式化归功于乔治·E·P·博克斯（George E. P. Box）和K·B·威尔逊（K. B. Wilson），他们的论文《论最优条件的实验获得》（1951）发表在《皇家统计学会杂志B辑》上，引入了响应曲面和最优条件的术语。<sup>[7](https://doi.org/10.1111/j.2517-6161.1951.tb00067.x)</sup> 博克斯和威尔逊的文章引入了复合设计，在二水平因子阵列上增加星点部分，以便有效估计二次项。<sup>[13](https://www.stat.cmu.edu/technometrics/80-89/VOL-31-02/v3102137.pdf)</sup>

博克斯和德雷珀（Box and Draper，1959）在《美国统计协会杂志》上给出了选择响应曲面设计的依据，将拟合多项式与真实函数之间的差异分解为方差误差和偏差误差。<sup>[14](https://doi.org/10.1080/01621459.1959.10501525)</sup> 相关的变换工作随之出现：在《技术计量学》上的自变量迭代变换，以及在《皇家统计学会杂志B辑》上发表的变换族。<sup>[15](https://doi.org/10.1111/j.2517-6161.1964.tb00553.x)</sup> 在组织研究中，爱德华兹和帕里（Edwards and Parry，1993）在《管理学会杂志》上引入了带响应曲面的多项式回归，作为差值分数的替代方法。<sup>[16](https://doi.org/10.2307/256822)</sup>

## 变体

正交多项式在正交基上重新表达各幂次。在R中，y ~ poly(x, 2)拟合效率更高，但系数透明度较低，因此这种形式适合预测而非直接解释系数。<sup>[8](https://www.southampton.ac.uk/~mb1a10/stats/FEEG6017_lecture-Interaction_terms_etc_brendan.pdf)</sup>

响应曲面设计是与二次模型匹配的抽样方案。博克斯和威尔逊通过引入中心复合设计扩展了费希尔（Fisher）的因子设计工作。<sup>[17](https://www.intechopen.com/chapters/1180646)</sup> 博克斯和亨特（Box and Hunter）1957年的文章强调用预测方差评判设计，并引入了可旋转性。<sup>[13](https://www.stat.cmu.edu/technometrics/80-89/VOL-31-02/v3102137.pdf)</sup> Box–Behnken设计需要更少的实验次数，同时仍能提供响应曲面的准确估计。<sup>[13](https://www.stat.cmu.edu/technometrics/80-89/VOL-31-02/v3102137.pdf)</sup><sup> • </sup><sup>[17](https://www.intechopen.com/chapters/1180646)</sup>

多项式混沌展开（PCE）将同样的展开思想用于不确定性量化：输出随机变量写成 \( Y = \sum_{i} c_{i} \cdot \Psi_{i}(\mathbf{X}) \)，其中\(\Psi_{i}\)是关于输入分布正交的多项式基函数。<sup>[18](https://user.engineering.uiowa.edu/~rahman/jmaa_pce_dependent.pdf)</sup> 奥拉德什金和诺瓦克（Oladyshkin and Nowak，2012）在《可靠性工程与系统安全》上报道的任意PCE，构建的是关于输入矩而非输入密度正交归一化的基。<sup>[19](https://doi.org/10.1016/j.ress.2012.05.002)</sup>

## 应用

在工业中，响应曲面方法广泛用于优化响应；一个已发表例子从中心复合设计拟合二阶模型。<sup>[11](https://www.sjsu.edu/faculty/guangliang.chen/Math261a/Ch7slides-polynomial-regression.pdf)</sup> 在组织研究中，爱德华兹和帕里框架估计诸如 \( Z = b_{0} + b_{1} \cdot X + b_{2} \cdot Y + b_{3} \cdot X^{2} + b_{4} \cdot X \cdot Y + b_{5} \cdot Y^{2} + e \) 的方程，其系数为一致性问题绘制三维响应曲面。<sup>[20](https://www.oxfordbibliographies.com/display/document/obo-9780199846740/obo-9780199846740-0133.xml)</sup> 在不确定性量化中，稀疏PCE结合多项式混沌性质、效应稀疏原理和稀疏回归求解器，用少量模型评估来近似具有许多输入的计算机模型。<sup>[21](https://ethz.ch/content/dam/ethz/special-interest/baug/ibk/risk-safety-and-uncertainty-dam/publications/reports/RSUQ-2020-002C.pdf)</sup>

## 局限与替代方法

过拟合和边界不稳定性是阶数升高的主要代价。\(n-1\)阶多项式可以完美拟合\(n\)个点，这几乎肯定是过拟合。<sup>[11](https://www.sjsu.edu/faculty/guangliang.chen/Math261a/Ch7slides-polynomial-regression.pdf)</sup> 高于3或4阶不常见，因为曲线变得过于灵活并呈现奇怪形状，尤其是在\(X\)边界附近 <sup>[22](https://datamineaz.org/readings/ISL_chp7.pdf)</sup>；四次及更高次多项式应很少使用，因为样本外预测极差，外推尤其危险。<sup>[12](https://people.stat.sc.edu/hansont/stat704/notes13.pdf)</sup> 外推是主要危险：多项式模型可能拟合手头数据，但在数据范围之外转向意外方向 <sup>[10](https://math.unm.edu/~luyan/stat44054016/chapter8.pdf)</sup>，而且由于多项式是全局的，调整系数以修正一个区域可能使函数在遥远区域剧烈振荡，尾部行为不可预测。<sup>[5](https://www.hds.utc.fr/~tdenoeux/dokuwiki/_media/en/splines.pdf)</sup>

病态随阶数增长：\(X' \cdot X\)随阶数增加而更加病态 <sup>[11](https://www.sjsu.edu/faculty/guangliang.chen/Math261a/Ch7slides-polynomial-regression.pdf)</sup>，严重多重共线性使\(X' \cdot X\)的行列式趋近于零，并在正规方程中造成严重舍入误差。<sup>[6](https://online.stat.psu.edu/stat462/node/182/)</sup> 中心化有局限：在严重共线性下，模拟结果建议对二次和交互成分应避免使用中心化，因为即使均值中心化后结果仍受影响。<sup>[23](http://article.sapub.org/10.5923.j.statistics.20190904.01.html)</sup> 在PCE中，高维需要数量达到天文数字的系数，受制于维数灾难。<sup>[24](https://user.engineering.uiowa.edu/~rahman/jmaa_genpce.pdf)</sup>

替代方法：回归样条通常给出更优结果，因为它们通过增加节点数而保持阶数固定来增加灵活性；在Wage数据上，15次多项式产生不理想的边界结果，而具有15个自由度的自然三次样条仍提供合理拟合。<sup>[22](https://datamineaz.org/readings/ISL_chp7.pdf)</sup> 具有\(K\)个节点的三次样条使用\(K+4\)个自由度，而自然样条在边界节点之外被约束为线性，给出更稳定估计和更窄置信区间。<sup>[22](https://datamineaz.org/readings/ISL_chp7.pdf)</sup> 广义可加模型用未指定的平滑函数\(f_{j}(X_{j})\)替换线性项。<sup>[5](https://www.hds.utc.fr/~tdenoeux/dokuwiki/_media/en/splines.pdf)</sup> 尚无已发表的直接对比基准将多项式变换与核方法这一整类方法进行比较。

## References

1. [Numerical data: Polynomial transforms (Google ML Crash Course)](https://developers.google.com/machine-learning/crash-course/numerical-data/polynomial-transforms)
2. [Chapter 14 Transformations, Applied Statistics with R](https://book.stat420.org/transformations.html)
3. [NIST/SEMATECH e-Handbook of Statistical Methods, Section 3.4.3.1 Fitting Polynomial Models](https://www.itl.nist.gov/div898/handbook/ppc/section4/ppc431.htm)
4. [Regression extensions: Polynomial functions and interaction terms (Intro to Econometrics)](https://019b8fe2-b34c-160b-c574-800b0c4880a5.share.connect.posit.cloud/regression-extensions-polynomial-functions-and-interaction-terms.html)
5. [Lecture 7: Splines and Generalized Additive Models – Computational Statistics (UTC)](https://www.hds.utc.fr/~tdenoeux/dokuwiki/_media/en/splines.pdf)
6. [Reducing Structural Multicollinearity (Penn State STAT 462)](https://online.stat.psu.edu/stat462/node/182/)
7. [G. E. P. Box, K. B. Wilson (1951). On the Experimental Attainment of Optimum Conditions. Journal of the Royal Statistical Society Series B (Statistical Methodology).](https://doi.org/10.1111/j.2517-6161.1951.tb00067.x)
8. [Transformations, polynomial fitting, and interaction terms (Southampton COMP6053)](https://www.southampton.ac.uk/~mb1a10/stats/FEEG6017_lecture-Interaction_terms_etc_brendan.pdf)
9. [PolynomialFeatures, scikit-learn 1.9.0 documentation](https://scikit-learn.org/stable/modules/generated/sklearn.preprocessing.PolynomialFeatures)
10. [Chapter 8: Regression Models for Quantitative and Qualitative Predictors (UNM, on Kutner et al.)](https://math.unm.edu/~luyan/stat44054016/chapter8.pdf)
11. [Polynomial Regression Models (SJSU Math 261a slides)](https://www.sjsu.edu/faculty/guangliang.chen/Math261a/Ch7slides-polynomial-regression.pdf)
12. [Chapter 8: Polynomial Regression and Interactions (STAT 704 notes, citing Neter et al. and McCullagh & Nelder)](https://people.stat.sc.edu/hansont/stat704/notes13.pdf)
13. [Response Surface Methodology: 1966–1988 (Technometrics review)](https://www.stat.cmu.edu/technometrics/80-89/VOL-31-02/v3102137.pdf)
14. [G. E. P. Box, Norman R. Draper (1959). A Basis for the Selection of a Response Surface Design. Journal of the American Statistical Association.](https://doi.org/10.1080/01621459.1959.10501525)
15. [G. E. P. Box, D. R. Cox (1964). An Analysis of Transformations. Journal of the Royal Statistical Society Series B (Statistical Methodology).](https://doi.org/10.1111/j.2517-6161.1964.tb00553.x)
16. [J. R. EDWARDS, M. E. PARRY (1993). ON THE USE OF POLYNOMIAL REGRESSION EQUATIONS AS AN ALTERNATIVE TO DIFFERENCE SCORES IN ORGANIZATIONAL RESEARCH.. Academy of Management Journal.](https://doi.org/10.2307/256822)
17. [Historical Background of RSM (IntechOpen book chapter)](https://www.intechopen.com/chapters/1180646)
18. [A polynomial chaos expansion in dependent random variables (Rahman, J. Math. Anal. Appl., 2018)](https://user.engineering.uiowa.edu/~rahman/jmaa_pce_dependent.pdf)
19. [S. Oladyshkin, W. Nowak (2012). Data-driven uncertainty quantification using the arbitrary polynomial chaos expansion. Reliability Engineering & System Safety.](https://doi.org/10.1016/j.ress.2012.05.002)
20. [Polynomial Regression and Response Surface Analysis (Oxford Bibliographies, Lambert & Hardt, 2018)](https://www.oxfordbibliographies.com/display/document/obo-9780199846740/obo-9780199846740-0133.xml)
21. [EXPANSIONS: a review and benchmark of sparse polynomial chaos expansions (ETH Zurich report)](https://ethz.ch/content/dam/ethz/special-interest/baug/ibk/risk-safety-and-uncertainty-dam/publications/reports/RSUQ-2020-002C.pdf)
22. [An Introduction to Statistical Learning, Chapter 7: Moving Beyond Linearity (James et al., Springer; hosted copy)](https://datamineaz.org/readings/ISL_chp7.pdf)
23. [Second Order Regression with Two Predictor Variables Centered on Mean in an Ill Conditioned Model](http://article.sapub.org/10.5923.j.statistics.20190904.01.html)
24. [Wiener–Hermite polynomial expansion for multivariate Gaussian probability measures (Rahman, JMAA 2017)](https://user.engineering.uiowa.edu/~rahman/jmaa_genpce.pdf)

---
*Initially written Sep 29, 2026 · Edited: Oct 15, 2026*

Topic: 物质世界与数学 › 数学与统计学 › 统计学与概率论 › Statistical inference, estimation, sampling, and testing › Regression analysis › Linear and multiple regression

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/polynomial-transformation-statistics

English original: https://www.edgepedia.org/polynomial-transformation-statistics
