<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="zh-Hans-CN">
	<id>https://wiki.swarma.org/index.php?action=history&amp;feed=atom&amp;title=%E6%9F%A5%E7%9C%8B%E5%81%8F%E5%B7%AE%E6%96%B9%E5%B7%AE%E6%9D%83%E8%A1%A1%E7%9A%84%E6%BA%90%E4%BB%A3%E7%A0%81</id>
	<title>查看偏差方差权衡的源代码 - 版本历史</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.swarma.org/index.php?action=history&amp;feed=atom&amp;title=%E6%9F%A5%E7%9C%8B%E5%81%8F%E5%B7%AE%E6%96%B9%E5%B7%AE%E6%9D%83%E8%A1%A1%E7%9A%84%E6%BA%90%E4%BB%A3%E7%A0%81"/>
	<link rel="alternate" type="text/html" href="https://wiki.swarma.org/index.php?title=%E6%9F%A5%E7%9C%8B%E5%81%8F%E5%B7%AE%E6%96%B9%E5%B7%AE%E6%9D%83%E8%A1%A1%E7%9A%84%E6%BA%90%E4%BB%A3%E7%A0%81&amp;action=history"/>
	<updated>2026-11-03T02:05:12Z</updated>
	<subtitle>本wiki的该页面的版本历史</subtitle>
	<generator>MediaWiki 1.35.0</generator>
	<entry>
		<id>https://wiki.swarma.org/index.php?title=%E6%9F%A5%E7%9C%8B%E5%81%8F%E5%B7%AE%E6%96%B9%E5%B7%AE%E6%9D%83%E8%A1%A1%E7%9A%84%E6%BA%90%E4%BB%A3%E7%A0%81&amp;diff=34704&amp;oldid=prev</id>
		<title>13944556914：/* 引用 */</title>
		<link rel="alternate" type="text/html" href="https://wiki.swarma.org/index.php?title=%E6%9F%A5%E7%9C%8B%E5%81%8F%E5%B7%AE%E6%96%B9%E5%B7%AE%E6%9D%83%E8%A1%A1%E7%9A%84%E6%BA%90%E4%BB%A3%E7%A0%81&amp;diff=34704&amp;oldid=prev"/>
		<updated>2024-05-21T03:25:00Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;引用&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;zh-Hans-CN&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;←上一版本&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;2024年5月21日 (二) 03:25的版本&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l100&quot; &gt;第100行：&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;第100行：&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;references/&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;references/&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;旧词条迁移&lt;/del&gt;]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;待润色&lt;/ins&gt;]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>13944556914</name></author>
	</entry>
	<entry>
		<id>https://wiki.swarma.org/index.php?title=%E6%9F%A5%E7%9C%8B%E5%81%8F%E5%B7%AE%E6%96%B9%E5%B7%AE%E6%9D%83%E8%A1%A1%E7%9A%84%E6%BA%90%E4%BB%A3%E7%A0%81&amp;diff=15104&amp;oldid=prev</id>
		<title>Thingamabob：创建页面，内容为“在[https://en.wikipedia.org/wiki/Statistics 统计学]与[https://en.wikipedia.org/wiki/Machine_learning 机器学习]中，偏差方差分析是一组预测性模…”</title>
		<link rel="alternate" type="text/html" href="https://wiki.swarma.org/index.php?title=%E6%9F%A5%E7%9C%8B%E5%81%8F%E5%B7%AE%E6%96%B9%E5%B7%AE%E6%9D%83%E8%A1%A1%E7%9A%84%E6%BA%90%E4%BB%A3%E7%A0%81&amp;diff=15104&amp;oldid=prev"/>
		<updated>2020-10-14T11:42:37Z</updated>

		<summary type="html">&lt;p&gt;创建页面，内容为“在[https://en.wikipedia.org/wiki/Statistics 统计学]与[https://en.wikipedia.org/wiki/Machine_learning 机器学习]中，偏差方差分析是一组预测性模…”&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新页面&lt;/b&gt;&lt;/p&gt;&lt;div&gt;在[https://en.wikipedia.org/wiki/Statistics 统计学]与[https://en.wikipedia.org/wiki/Machine_learning 机器学习]中，偏差方差分析是一组预测性模型的特性，意味着参数估计[https://en.wikipedia.org/wiki/Bias_(statistics) 偏差]较小的模型在样本间的参数估计有较高的方差，反之亦然。偏差方差困境是不能同时最小化这两个误差来源的冲突问题，这两个误差来源让有监督学习算法不能在训练集上很好地进行泛化。&lt;br /&gt;
&lt;br /&gt;
*[https://en.wikipedia.org/wiki/Bias_of_an_estimator 偏差(bias)]来自于学习算法中错误假设造成的误差。高偏差会导致算法不能将特征与目标输出很好地关联起来。（欠拟合）&lt;br /&gt;
&lt;br /&gt;
*[https://en.wikipedia.org/wiki/Variance 方差(variance)]来自于算法对训练集中小波动敏感性造成的误差。高方差会导致算法对训练集中的随机噪声进行建模而不是目标输出。（[https://en.wikipedia.org/wiki/Overfitting 过拟合]）&lt;br /&gt;
&lt;br /&gt;
这种权衡适用于所有的[https://en.wikipedia.org/wiki/Supervised_learning 有监督学习]模型：分类，回归（函数拟合），&amp;lt;ref name=&amp;quot;geman&amp;quot;&amp;gt;{{cite journal |last1=Geman |first1=Stuart |authorlink1=Stuart Geman |author2=E. Bienenstock |author3=R. Doursat |year=1992 |title=Neural networks and the bias/variance dilemma |journal=Neural Computation |volume=4 |pages=1–58 |doi=10.1162/neco.1992.4.1.1 |url=http://web.mit.edu/6.435/www/Geman92.pdf}}&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;Bias–variance decomposition, In Encyclopedia of Machine Learning. Eds. Claude Sammut, Geoffrey I. Webb. Springer 2011. pp. 100-101&amp;lt;/ref&amp;gt;结构化输出学习。它也被用来解释启发式学习在人类学习中的有效性。&amp;lt;ref name=&amp;quot;ReferenceA&amp;quot;&amp;gt;{{Cite journal | last1 = Gigerenzer | first1 = Gerd| last2 = Brighton | first2 = Henry| doi = 10.1111/j.1756-8765.2008.01006.x | title = Homo Heuristicus: Why Biased Minds Make Better Inferences | journal = Topics in Cognitive Science | volume = 1 | pages = 107–143| year = 2009 | pmid =  25164802| pmc = }}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
偏差方差困境是在特定问题下，分析学习算法泛化预期误差的一种方式，[https://en.wikipedia.org/wiki/Generalization_error 泛化误差]来自于三个部分：偏差，方差，以及一个称之为“不可避免误差”的量，这个误差一般是问题本身的噪音产生的。&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==动机==&lt;br /&gt;
&lt;br /&gt;
方差偏差分析是有监督学习的一个核心问题。理想情况下，人们希望选择一种模型，这种模型既能准确捕获训练数据规律性，又能很好的概括未知数据。不幸的是，通常是不可能同时做到这两点的。高方差的学习方法可能能够很好的表达它的数据集但，但是可能过度拟合噪声或不具备代表性的训练数据。相比之下，低方差的算法通常会生成一个更简单的模型，这种模型不会过拟合，但是会导致在训练数据上欠拟合，无法捕捉到重要的规律。&lt;br /&gt;
低偏差的模型通常比较复杂（如高阶回归多项式），这使得它们能够更准确的表达训练集。然而，在这个过程中，它们也可能表示了训练集中的一个巨大的噪声的一部分，尽管复杂性增加了，也使得它们的预测变得不是那么的准确。相比之下，具有较高偏差的模型往往相对较简单（低阶甚至是线性的回归多项式），但是在训练集之外应用时可能会产生较低方差的预测。&lt;br /&gt;
&lt;br /&gt;
==偏差与方差的平方分解==&lt;br /&gt;
&lt;br /&gt;
假设我们有一个训练集包含一个点集 &amp;lt;math&amp;gt;x_1, \cdots , x_n&amp;lt;/math&amp;gt; 以及与&amp;lt;math&amp;gt;x_i&amp;lt;/math&amp;gt;相关的实值&amp;lt;math&amp;gt;y_i&amp;lt;/math&amp;gt;。我们假定一个有噪声的函数&amp;lt;math&amp;gt;y=f(x)+\varepsilon&amp;lt;/math&amp;gt;，其中&amp;lt;math&amp;gt;\varepsilon&amp;lt;/math&amp;gt;是有着0均值和&amp;lt;math&amp;gt;\sigma^2&amp;lt;/math&amp;gt;方差的噪声。&lt;br /&gt;
&lt;br /&gt;
我们想要通过学习算法找到一个函数&amp;lt;math&amp;gt;\hat{f}(x)&amp;lt;/math&amp;gt;使其尽量拟合真实的函数&amp;lt;math&amp;gt;f(x)&amp;lt;/math&amp;gt;。我们所谓的“尽可能”是使用&amp;lt;math&amp;gt;\hat{f}(x)&amp;lt;/math&amp;gt;与&amp;lt;math&amp;gt;y&amp;lt;/math&amp;gt;之间的均方误差来表达的，即我们想要&amp;lt;math&amp;gt;(y - \hat{f}(x))^2&amp;lt;/math&amp;gt;对于&amp;lt;math&amp;gt;x_1, \cdots , x_n&amp;lt;/math&amp;gt;和样本外的点都最小。当然，我们不可能完美做到这一点，因为&amp;lt;math&amp;gt;y_i&amp;lt;/math&amp;gt;必定会包含噪声&amp;lt;math&amp;gt;\varepsilon&amp;lt;/math&amp;gt;，这意味对于我们得到的所有函数，我们都要接受其中存在这不可避免的误差。&lt;br /&gt;
任意一个有监督机器学习算法，都可以使得&amp;lt;math&amp;gt;\hat{f}(x)&amp;lt;/math&amp;gt;对训练集之外的点进行泛化。结果就是，无论我们选择了哪个&amp;lt;math&amp;gt;\hat{f}(x)&amp;lt;/math&amp;gt;函数，我们可以使用一个样本外的任意&amp;lt;math&amp;gt;x&amp;lt;/math&amp;gt;分解期望误差：&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\mathrm { E } \left[ ( y - \hat { f } ( x ) ) ^ { 2 } \right] = ( \operatorname { Bias } [ \hat { f } ( x ) ] ) ^ { 2 } + \mathrm { Var } [ \hat { f } ( x ) ] + \sigma ^ { 2 }&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
其中：&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\text { Bias } [ \hat { f } ( x ) ] = \mathrm { E } [ \hat { f } ( x ) - f ( x ) ]&amp;lt;/math&amp;gt;以及：&lt;br /&gt;
:&amp;lt;math&amp;gt;\begin{align}\operatorname{Var}\big[\hat{f}(x)\big] = \operatorname{E}[\hat{f}(x)^2] - \Big(\operatorname{E}[{\hat{f}}(x)]\Big)^2\end{align}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
期望包括了不同训练集的选择，这些样本都来自于同样的联合分布P(x,y)，这三个项分别表示：&lt;br /&gt;
&lt;br /&gt;
*学习方法偏差的平方可以视作因为简化假设导致的误差。比如，当我们想要拟合一个非线性的函数&amp;lt;math&amp;gt;f(x)&amp;lt;/math&amp;gt;却使用了一个线性的模型，于是估计&amp;lt;math&amp;gt;\hat{f}(x)&amp;lt;/math&amp;gt;就会存在存在误差。&lt;br /&gt;
&lt;br /&gt;
*学习方法的方差或者直观地来说就是学习方法&amp;lt;math&amp;gt;\hat{f}(x)&amp;lt;/math&amp;gt;多大程度上偏离了其均值。&lt;br /&gt;
&lt;br /&gt;
*不可约误差&amp;lt;math&amp;gt;\sigma^2&amp;lt;/math&amp;gt;。因为这三项都是非负的，这三项组成了训练集外样本的期望误差的下界。&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\hat{f}(x)&amp;lt;/math&amp;gt;的模型越复杂，那么它就可以拟合越多的数据点，偏差也就会越低。然而，复杂度会使得模型更加“偏向于”拟合数据点，因此方差就会变大。&lt;br /&gt;
&lt;br /&gt;
=== 推导 ===&lt;br /&gt;
&lt;br /&gt;
偏差方差平方分解的推导过程如下。&amp;lt;ref&amp;gt;{{cite web |first1=Sethu |last1=Vijayakumar |title=The Bias–Variance Tradeoff |publisher=University Edinburgh |year=2007 |accessdate=19 August 2014 |url=http://www.inf.ed.ac.uk/teaching/courses/mlsc/Notes/Lecture4/BiasVariance.pdf}}&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;{{cite web |title=Notes on derivation of bias-variance decomposition in linear regression |first=Greg|last=Shakhnarovich |year=2011 |accessdate=20 August 2014 |url=http://ttic.uchicago.edu/~gregory/courses/wis-ml2012/lectures/biasVarDecom.pdf|archiveurl=https://web.archive.org/web/20140821063842/http://ttic.uchicago.edu/~gregory/courses/wis-ml2012/lectures/biasVarDecom.pdf|archivedate=21 August 2014}}&amp;lt;/ref&amp;gt;为了记号上的方便，引入两个缩写&amp;lt;math&amp;gt;f = f(x)&amp;lt;/math&amp;gt; 以及 &amp;lt;math&amp;gt;\hat{f} = \hat{f}(x)&amp;lt;/math&amp;gt;。首先，回忆一下，通过定义对于任意的随机变量&amp;lt;math&amp;gt;X&amp;lt;/math&amp;gt;，我们有：&lt;br /&gt;
:&amp;lt;math&amp;gt;\begin{align}\operatorname{Var}[X] = \operatorname{E}[X^2] - \Big(\operatorname{E}[X]\Big)^2\end{align}&amp;lt;/math&amp;gt;&lt;br /&gt;
整理得到:&lt;br /&gt;
:&amp;lt;math&amp;gt;\begin{align}\operatorname{E}[X^2] = \operatorname{Var}[X] + \Big(\operatorname{E}[X]\Big)^2\end{align}&amp;lt;/math&amp;gt;&lt;br /&gt;
因为 &amp;lt;math&amp;gt;f&amp;lt;/math&amp;gt; 是[https://en.wikipedia.org/wiki/Deterministic_algorithm 确定的]&lt;br /&gt;
:&amp;lt;math&amp;gt;\begin{align}\operatorname{E}[f] = f\end{align}&amp;lt;/math&amp;gt;.&lt;br /&gt;
这里， 给定 &amp;lt;math&amp;gt;y = f + \epsilon&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\operatorname{E}[\epsilon] = 0&amp;lt;/math&amp;gt;, 令 &amp;lt;math&amp;gt;\operatorname{E}[y] = \operatorname{E}[f + \epsilon] = \operatorname{E}[f] = f&amp;lt;/math&amp;gt;.&lt;br /&gt;
同理因为 &amp;lt;math&amp;gt;\operatorname{Var}[\varepsilon] = \sigma^2,&amp;lt;/math&amp;gt;&lt;br /&gt;
于是, 因为 &amp;lt;math&amp;gt;\epsilon&amp;lt;/math&amp;gt; 和 &amp;lt;math&amp;gt;\hat{f}&amp;lt;/math&amp;gt; 是独立的，我们可以写成：&lt;br /&gt;
:&amp;lt;math&amp;gt;\begin{align}\operatorname{E}\big[(y - \hat{f})^2\big] &amp;amp; = \operatorname{E}[y^2 + \hat{f}^2 - 2 y\hat{f}] \\ &amp;amp; = \operatorname{E}[y^2] + \operatorname{E}[\hat{f}^2] - \operatorname{E}[2y\hat{f}] \\ &amp;amp; = \operatorname{Var}[y] + \operatorname{E}[y]^2 + \operatorname{Var}[\hat{f}] + \Big(\operatorname{E}[\hat{f}]\Big)^2 - 2f\operatorname{E}[\hat{f}] \\ &amp;amp; = \operatorname{Var}[y] + \operatorname{Var}[\hat{f}] + \Big(f^2 - 2f\operatorname{E}[\hat{f}] + (\operatorname{E}[\hat{f}])^2\Big) \\ &amp;amp; = \operatorname{Var}[y] + \operatorname{Var}[\hat{f}] + (f - \operatorname{E}[\hat{f}])^2 \\ &amp;amp; = \sigma^2 + \operatorname{Var}[\hat{f}] + \operatorname{Bias}[\hat{f}]^2\end{align}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 回归应用 ===&lt;br /&gt;
&lt;br /&gt;
偏差方差分解回归[https://en.wikipedia.org/wiki/Regularization_(mathematics) 正则化]方法的基础，比如 [https://en.wikipedia.org/wiki/Lasso_(statistics) Lasso] 与 [https://en.wikipedia.org/wiki/Ridge_regression ridge] 回归。正则化方法将偏置项引入了回归的解，这样可以大大减少相对与[https://en.wikipedia.org/wiki/Ordinary_least_squares 一般的最小平方(OLS)]的解法的方差。虽然OLS的解法提供了非偏置回顾估计，但正则化技术产生的较低的方差提供了优越的MSE的性能。&lt;br /&gt;
&lt;br /&gt;
=== 分类应用 ===&lt;br /&gt;
偏差方差分解最初是为最小二乘法回归提出的。对于在[https://en.wikipedia.org/wiki/0-1_loss 0-1损失]（错误分类率）下的分类，可能会发现类似的分解。&amp;lt;ref&amp;gt;{{cite conference |last=Domingos |first=Pedro |title=A unified bias-variance decomposition |conference=ICML |year=2000 |url=http://homes.cs.washington.edu/~pedrod/bvd.pdf}}&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;{{cite journal |first1=Giorgio |last1=Valentini |first2=Thomas G. |last2=Dietterich |title=Bias–variance analysis of support vector machines for the development of SVM-based ensemble methods |journal=[[Journal of Machine Learning Research|JMLR]] |volume=5 |year=2004 |pages=725–775}}&amp;lt;/ref&amp;gt; 或者，如果分类问题可以被称为概率分类，那么对于真实概率的预期平方误差可以像之前一样地分解。&amp;lt;ref&amp;gt;{{cite book |first1=Christopher D. |last1=Manning |first2=Prabhakar |last2=Raghavan |first3=Hinrich |last3=Schütze |title=Introduction to Information Retrieval |publisher=Cambridge University Press |year=2008 |url=http://nlp.stanford.edu/IR-book/ |pages=308–314}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== 方法 ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[https://en.wikipedia.org/wiki/Dimensionality_reduction 降维]和[https://en.wikipedia.org/wiki/Feature_selection 特征选择]可以通过简化模型来减少方差。同样，一个更大的训练集也会减少方差。&amp;lt;ref&amp;gt;{{cite book | last = Belsley | first = David | title = Conditioning diagnostics : collinearity and weak data in regression | publisher = Wiley | location = New York | year = 1991 | isbn = 978-0471528890 }}&amp;lt;/ref&amp;gt;增加特征（预测器）倾向于减少偏差，而不是引入额外的方差。学习算法通常有一些控制偏差和方差的可调整参数。列如：&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* （[https://en.wikipedia.org/wiki/Generalized_linear_model 广义的]）线性模型可以被正则化来减小方差但是代价是增大偏差。&lt;br /&gt;
&lt;br /&gt;
* 在[https://en.wikipedia.org/wiki/Artificial_neural_network 人工神经网络]中，随着隐层数量的增加，方差增大但是偏差减小。像GLMs，通常会使用正则化方法。&lt;br /&gt;
&lt;br /&gt;
* 在[https://en.wikipedia.org/wiki/K-nearest_neighbor k邻近]模型中，一个很大的k值会导致很大的偏差和很低的偏差（如下）。&lt;br /&gt;
&lt;br /&gt;
* 在[https://en.wikipedia.org/wiki/Instance-based_learning 实例学习]中，正则化可以通过改变不同的原型和范例的组合来实现。&amp;lt;ref&amp;gt;{{cite journal | last1 = Gagliardi | first1 = F | year = 2011 | title = Instance-based classifiers applied to medical databases: diagnosis and knowledge extraction | url = | journal = Artificial Intelligence in Medicine | volume = 52 | issue = 3| pages = 123–139 | doi = 10.1016/j.artmed.2011.04.002 }}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* 在[decision trees 决策树]中，树的深度决定了方差。决策树通常会剪枝来控制方差。一种解决这种权衡的方法是使用混合模型和[https://en.wikipedia.org/wiki/Ensemble_learning 集成学习]。.&amp;lt;ref&amp;gt;Jo-Anne Ting, Sethu Vijaykumar, Stefan Schaal, Locally Weighted Regression for Control. In Encyclopedia of Machine Learning. Eds. Claude Sammut, Geoffrey I. Webb. Springer 2011. p. 615&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;Scott Fortmann-Roe. Understanding the Bias–Variance Tradeoff. 2012. http://scott.fortmann-roe.com/docs/BiasVariance.html&amp;lt;/ref&amp;gt;比如，[https://en.wikipedia.org/wiki/Boosting_(machine_learning) boosting]算法组合很多“弱”（高偏差）模型来集成出一个低方差且独立的模型，而[https://en.wikipedia.org/wiki/Bootstrap_aggregating bagging]算法用一种方式组合了“强”学习器来减小他们的方差。&lt;br /&gt;
&lt;br /&gt;
=== k邻近 ===&lt;br /&gt;
&lt;br /&gt;
k邻近回归的情况下，参数k的偏差方差分解的[https://en.wikipedia.org/wiki/Closed-form_expression 闭式表达]是存在的：:&amp;lt;math&amp;gt;\operatorname{E}[(y - \hat{f}(x))^2\mid X=x] = \left( f(x) - \frac{1}{k}\sum_{i=1}^k f(N_i(x)) \right)^2 + \frac{\sigma^2}{k} + \sigma^2&amp;lt;/math&amp;gt;其中&amp;lt;math&amp;gt;N_1(x), \dots, N_k(x)&amp;lt;/math&amp;gt;是x的k个训练集中的邻近。偏差（第一项）是k的单调递增函数，然而偏差（第二项）是k的递减函数。实际上，在可行的假设下，最邻近估计器的偏差会完全消失当训练集趋向于无穷大的时候。&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== 人类学习中的应用 ===&lt;br /&gt;
&lt;br /&gt;
虽然我们在机器学习的背景下广泛讨论了这个问题，但在人类认知方面，尤其是 [https://en.wikipedia.org/wiki/Gerd_Gigerenzer Gerd Gigerenzer] 和他同事在启发式学习背景下，对偏差方差困境进行了研究。他们认为（见参考），人类大脑通过采用高偏差/低方差的启发式学习方法，在典型的稀疏、缺乏特点的训练集中，人类大脑解决了这种困境。这反映了这样一个事实，零偏差方法对新情况的泛化性较差，而且不合理的假定准确推测了世界的真实状况。由此尝试的启发式学习方法相对简单，但是在更广泛的情况下会有更好的推论。[ https://en.wikipedia.org/wiki/Stuart_Geman Geman]等人认为，偏差方差困境意味着一般性的物体识别这样的能力是无法从零开始学习的，而是需要一定的“硬编码”，再根据经验来调整。这是因为无模型的推理方法需要不切实际的大型训练集，才能避免高方差。&lt;br /&gt;
&lt;br /&gt;
==参考==&lt;br /&gt;
&lt;br /&gt;
* [[Accuracy and precision]]&lt;br /&gt;
* [[Bias of an estimator]]&lt;br /&gt;
* [[Gauss–Markov theorem]]&lt;br /&gt;
* [[Hyperparameter optimization]]&lt;br /&gt;
* [[Minimum-variance unbiased estimator]]&lt;br /&gt;
* [[Model selection]]&lt;br /&gt;
* [[Regression model validation]]&lt;br /&gt;
* [[Supervised learning]]{{Div col end}}&lt;br /&gt;
&lt;br /&gt;
==引用==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:旧词条迁移]]&lt;/div&gt;</summary>
		<author><name>Thingamabob</name></author>
	</entry>
</feed>