现实任务中, 基学习器相互独立通常无法满足. 假设$\epsilon_1(\x), \cdots, \epsilon_M(\x)$满足 $\mathbb{E}[\epsilon_m(\x)] = \mu, \text{var}[\epsilon_m(\x)] = \sigma^2, \forall m \in [M]$, 且彼此之间的线性相关系数均为$\rho$. 请证明 \begin{align*} \text{var}[\epsilon_{bag}(\x)] = \rho \sigma^2 + \frac{1 - \rho}{M}\sigma^2. \end{align*}
时间: 2023-07-05 15:35:22 浏览: 70
假设Bagging模型的预测值为$\hat{y}_{bag}(\x)$,每个基学习器的预测值为$\hat{y}_m(\x)$,则有:
\begin{align*}
\hat{y}_{bag}(\x) &= \frac{1}{M}\sum_{m=1}^M \hat{y}_m(\x) \\
\epsilon_{bag}(\x) &= y(\x) - \hat{y}_{bag}(\x) \\
&= y(\x) - \frac{1}{M}\sum_{m=1}^M \hat{y}_m(\x) \\
&= \frac{1}{M}\sum_{m=1}^M (y(\x) - \hat{y}_m(\x)) \\
&= \frac{1}{M}\sum_{m=1}^M \epsilon_m(\x)
\end{align*}
因此,我们有:
\begin{align*}
\text{var}[\epsilon_{bag}(\x)] &= \text{var}\left[\frac{1}{M}\sum_{m=1}^M \epsilon_m(\x)\right] \\
&= \frac{1}{M^2}\sum_{m=1}^M\sum_{n=1}^M \text{cov}(\epsilon_m(\x), \epsilon_n(\x)) \\
&= \frac{1}{M^2}\left(M\sigma^2 + (M^2-M)\rho\sigma^2\right) \\
&= \frac{1}{M}\rho\sigma^2 + \frac{1-\rho}{M}\sigma^2 \\
&= \rho \sigma^2 + \frac{1-\rho}{M}\sigma^2
\end{align*}
其中$\text{cov}(\epsilon_m(\x), \epsilon_n(\x))$表示$\epsilon_m(\x)$和$\epsilon_n(\x)$的协方差。由于$\epsilon_m(\x)$和$\epsilon_n(\x)$的期望均为$\mu$,且它们的协方差为$\rho\sigma^2$,因此$\text{cov}(\epsilon_m(\x), \epsilon_n(\x))=\rho\sigma^2$。将上式代入可得证。
阅读全文