随机游走001 | 什么是“好”的惩罚函数 (Penalty function)?
Question
A good penalty function should result in an estimator with three properties:
-
Unbiasedness(无偏性): The resulting estimator is nearly unbiased when the true unknown parameter is large to avoid unnecessary modeling bias.
-
Sparsity(稀疏性): The resulting estimator is a thresholding rule, which automatically sets small estmated coefficient to zero to reduce model complexity.
-
Continuity(连续性): The resulting estimator is continuous in data \(z\) to avoid instability in model prediction.
Now you need to verify whether OLS, Ridge, LASSO, SCAD satisfy these preperties or not.
Answer
Conditions
Linear model:
where \(\mathbf{y}=(y_1,\dots,y_n)^\top,\mathbf{X}=(\mathbf{x}_0,\mathbf{x}_1,\dots,\mathbf{x}_n)^\top\),where \(\mathbf{x}_0=(1,1,\dots,1)^\top,\mathbf{x}_i=(x_{i1},\dots,x_{ip})^\top,i=1,\dots,n\),and \(\boldsymbol{\varepsilon}=(\varepsilon_1,\dots,\varepsilon_n)^\top\), \(\boldsymbol{\beta}=(\beta_0,\beta_1,\dots,\beta_p)^\top\).
Now we first consider the ordinary least squre estimator (OLS):
we know that \(\widehat{\boldsymbol{\beta}}^\text{ols}\) is unbiased, since
And of course that \(\widehat{\boldsymbol{\beta}}^{\text{ols}}\) is continuous in data \(z\) and it doesn't have sparsity since no coefficient will be set to zero.
Now we consider the penalized least square regression model whose objective function is
Noting that here we denote \(\mathbf{z}=\mathbf{X}^\top\mathbf{y}\) and assume that the columns of \(\mathbf{X}\) are orthonormal, which means \(\mathbf{X}^\top\mathbf{X}=\mathbf{X}\mathbf{X}^\top=\mathbf{I}\), so that \(\widehat{\boldsymbol{\beta}}^{\text{ols}}=\mathbf{X}^\top\mathbf{y}\), \(\hat{\mathbf{y}}=\mathbf{X}\widehat{\boldsymbol{\beta}}^{\text{ols}}=\mathbf{y}\), and
Thus, the minimization problem of penalized least squares is equivalent ot minimizing componentwise
In order to get the minimizer of \(Q(\theta)\),we let \(\frac{dQ(\theta)}{d\theta}=0\) and have
Here are some observations based on this equation:
- When \(p^\prime_\lambda(|\theta|)=0\) for large \(|\theta|\), the resulting estimator is \(z\) when \(|z|\) is sufficently large, which is that \(\hat{\theta}=z\).
- In order to get sparsity, we hope \(\hat{\theta}=0\) when \(z\) is small, that is \(0\) is the minimizer of \(Q(\theta)\), which requaring
and this condition can be summarized into
- From sparsity, we have \(\hat{\theta}=0,\) if \(|\theta|+p_\lambda^\prime(|\theta|)>|z|\). When \(|\theta|+p^\prime_\lambda(|\theta|)=|z|\), we get a resulting estimator \(\hat{\theta}=\theta_0\). For continuity, we need \(\theta_0\) goes to zero, that is \(\arg\min\{|\theta|+p^\prime_\lambda(|\theta|)\}=0.\)
In conclusion, the conditions of three properties for a good estimator are:
- Unbiasedness condition: $$p_\lambda^\prime(|\theta|)=0, \text{for large }|\theta|;$$
- Sparsity condition: $$\min_\theta{|\theta|+p_\lambda^\prime(|\theta|)}>0;$$
- Continuity condition: $$\arg\min\limits_\theta{|\theta|+p_\lambda^\prime(|\theta|)}=0.$$
Examples
Now we review the OLS estimator with \(p_\lambda(|\theta|)=0\), it's obvious that
Therefore, OLS satisfies unbiasedness and continuity while it does not satisfy sparsity.
Secnondly, we consider ridge regression with \(p_\lambda(|\theta|)=\lambda|\theta|^2\), we can see that
Therefore, ridge regression estimator satisfies continuity while it does not satisfy unbiasedness and sparsity.
Next, we consider LASSO regression with \(p_\lambda(|\theta|)=\lambda|\theta|\). For large \(|\theta|\), we have $$p_\lambda^\prime(|\theta|)=\lambda\text{sgn}(\theta)\neq0,,, \text{since } \lambda>0.$$ For \(H(\theta)=|\theta|+p_\lambda^\prime(|\theta|)=|\theta|+\lambda\text{sgn}(\theta)\),
so that \(\arg\min\limits_\theta H(|\theta|)=0\), and \(\min H(|\theta|)=H(0)=\lambda>0\). Therefore, LASSO regression estimator satisfies sparsity and continuity while it does not satisfy unbiasedness.
Last, we consider SCAD with penalized function
where \(a>1\). So that
For \(H(\theta)=|\theta|+p_\lambda^\prime(|\theta|)=|\theta|+\lambda\{I(\theta\leq\lambda)+\frac{(a\lambda-\theta)_+}{(a-1)\lambda}I(\theta>\lambda)\}\), we have
so that \(\arg\min_\theta H(|\theta|)=0\), and \(\min H(|\theta|)=H(0)=\lambda>0\). Therefore, SCAD estimator satisfies all the three properties.
Conclution
| OLS | Ridge | LASSO | SCAD | |
|---|---|---|---|---|
| Unbiasedness | \(\surd\) | \(\times\) | \(\times\) | \(\surd\) |
| Sparsity | \(\times\) | \(\times\) | \(\surd\) | \(\surd\) |
| Continuity | \(\surd\) | \(\surd\) | \(\surd\) | \(\surd\) |

浙公网安备 33010602011771号