> For the complete documentation index, see [llms.txt](https://json007.gitbook.io/svm/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://json007.gitbook.io/svm/linear_model.md).

# Linear model

线性回归是典型的常见的线性模型。应该特征的线性组合都是线性模型。

## Model specification

$$p(y|x,\theta) = N(y|w^Tx,\sigma^2)$$\
线性回归通过把$$x$$替代成某个非线性函数$$\phi(x)$$则可以用于非线性关系的建模，则是：\
$$p(y|x,\theta) = N(y|w^T\phi(x),\sigma^2)$$\
比如多项式： $$\phi(x) = \[1,x,x^2,…,x^d]$$

MLaPP 的 第7章 Linear regression （page 248）

[什么是异方差？为什么异方差的出现通常与模型中某个解释变量的变化有关？](https://www.zhihu.com/question/354637231)
