Skip to main content

Answer ZH

逐步解答

  1. 展開平方項: 令 θ~=θ+θ\tilde{\theta} = \theta^+ - \theta^-。目標函數為: J=12(yΦTθ~)T(yΦTθ~)+λ(θi++θi)J = \frac{1}{2} (y - \Phi^T \tilde{\theta})^T (y - \Phi^T \tilde{\theta}) + \lambda \sum (\theta_i^+ + \theta_i^-) J=12(yTy2yTΦTθ~+θ~TΦΦTθ~)+λ(θi++θi)J = \frac{1}{2} (y^T y - 2 y^T \Phi^T \tilde{\theta} + \tilde{\theta}^T \Phi \Phi^T \tilde{\theta}) + \lambda \sum (\theta_i^+ + \theta_i^-) 為了最小化,我們可以忽略常數項 12yTy\frac{1}{2} y^T y

  2. 替換 x\mathbf{x}: 令 x=[θ+θ]\mathbf{x} = \begin{bmatrix} \theta^+ \\ \theta^- \end{bmatrix}。 那麼 θ~=θ+θ=[II]x\tilde{\theta} = \theta^+ - \theta^- = \begin{bmatrix} I & -I \end{bmatrix} \mathbf{x}

  3. 二次部分 (xTHx\mathbf{x}^T \mathbf{H} \mathbf{x}): 二次項是 12θ~T(ΦΦT)θ~\frac{1}{2} \tilde{\theta}^T (\Phi \Phi^T) \tilde{\theta}。 代入 θ~\tilde{\theta}12xT[II](ΦΦT)[II]x\frac{1}{2} \mathbf{x}^T \begin{bmatrix} I \\ -I \end{bmatrix} (\Phi \Phi^T) \begin{bmatrix} I & -I \end{bmatrix} \mathbf{x} =12xT[ΦΦTΦΦTΦΦTΦΦT]x= \frac{1}{2} \mathbf{x}^T \begin{bmatrix} \Phi \Phi^T & -\Phi \Phi^T \\ -\Phi \Phi^T & \Phi \Phi^T \end{bmatrix} \mathbf{x} 因此,H=[ΦΦTΦΦTΦΦTΦΦT]\mathbf{H} = \begin{bmatrix} \Phi \Phi^T & -\Phi \Phi^T \\ -\Phi \Phi^T & \Phi \Phi^T \end{bmatrix}

  4. 線性部分 (fTx\mathbf{f}^T \mathbf{x}): 我們有兩個貢獻:來自迴歸交叉項和正則化項。

    • 迴歸:12(2yTΦTθ~)=(Φy)Tθ~-\frac{1}{2} (2 y^T \Phi^T \tilde{\theta}) = -(\Phi y)^T \tilde{\theta}。 代入 θ~=θ+θ\tilde{\theta} = \theta^+ - \theta^-(Φy)Tθ++(Φy)Tθ-(\Phi y)^T \theta^+ + (\Phi y)^T \theta^-。 用 x\mathbf{x} 表示:[(Φy)T(Φy)T]x\begin{bmatrix} -(\Phi y)^T & (\Phi y)^T \end{bmatrix} \mathbf{x}。 所以這對 f\mathbf{f} 的貢獻是 [ΦyΦy]\begin{bmatrix} -\Phi y \\ \Phi y \end{bmatrix}
    • 正則化:λ(θi++θi)=λ1Tx\lambda \sum (\theta_i^+ + \theta_i^-) = \lambda \mathbf{1}^T \mathbf{x}。 這對 f\mathbf{f} 的貢獻是 λ1\lambda \mathbf{1}

    加總起來: f=λ1+[ΦyΦy]=λ1[ΦyΦy]\mathbf{f} = \lambda \mathbf{1} + \begin{bmatrix} -\Phi y \\ \Phi y \end{bmatrix} = \lambda \mathbf{1} - \begin{bmatrix} \Phi y \\ -\Phi y \end{bmatrix}

  5. 約束: θ+0\theta^+ \ge 0θ0\theta^- \ge 0 意味著 x0\mathbf{x} \ge 0