機器學習中的凸和非凸優化問題

題目(145):機器學習中的優化問題,哪些是凸優化問題,哪些是非凸優化問題?請各舉一個例子。

  • 凸優化定義

  • 凸優化問題

  • 非凸優化問題

  • 凸優化定義:公式、geometric insight

  • 凸優化問題:邏輯迴歸;通過Hessian matrix的半正定性質判定;局部最優等價於全部最優

  • 非凸優化問題:PCA;PCA求解方式

凸優化問題

邏輯迴歸

Li(θ)=log(1+exp(yiθTxi))L_i(\theta) = \log(1+\exp(-y_i \theta^T x_i))

損失函數推導
logistic regression model:
logp1p=θTxp=exp(θTx)1+exp(θTx)\log \frac{p}{1-p}=\theta^T x \Rightarrow p = \frac{\exp(\theta^T x)}{1+\exp(\theta^T x)}

maxMLEminlogMLE:=minL(x,y;θ)\max \text{MLE} \simeq -\min \log \text{MLE}:= \min L(x,y;\theta)

L=(ylogp+(1y)log(1p))=ylog11+exp(θTx)(1y)log11+exp(θTx)=ylog(1+exp(θTx))+(1y)log(1+exp(θTx))=log(1+exp(θTxy)),\begin{aligned} L &= - (y \log p + (1-y) \log (1-p)) \\ &= - y \log \frac{1}{1+\exp(-\theta^T x)} - (1-y) \log \frac{1}{1+\exp(\theta^T x)}\\ &= y \log (1+\exp(-\theta^T x)) + (1-y) \log (1+\exp(\theta^T x))\\ &=\log (1+\exp(-\theta^T x \cdot y)), \end{aligned}

where Y{0,1}Y \in \{0,1\} and p=P(Y=1X=x)p=P(Y=1|X=x).

其它例子:SVM, linear regression\textcolor{red}{\text{\small 其它例子:SVM, linear regression}}

非凸優化問題

PCA

minVVTL(V)=XVTVXF2\min_{V V^T}L(V)= \| X-V^T V X\|_F^2

(minimise the reconstruction error)\textcolor{gray}{\textit{\small (minimise the reconstruction error)}}

Formulation from the perspective of maximising the variance\textcolor{red}{\text{\small Formulation from the perspective of maximising the variance}}

驗證該目標爲非凸問題:檢查定義
If VV^\ast is the minimum, then V-V^\ast is also the minimum as L(V)=L(V)L(V^\ast)=L(-V^\ast).
L(12V+12(V))=L(0)=XF2>XVTVXF2=12L(V)+12L(V)\begin{aligned} L\large(\frac{1}{2} V^\ast + \frac{1}{2} (-V^\ast) \large)=L(0)&=\|X\|_F^2 \\ &> \| X-V^{\ast T} V^\ast X\|_F^2=\frac{1}{2} L(V^\ast) + \frac{1}{2} L(-V^\ast) \end{aligned}

求解: SVD\textcolor{red}{\text{\small SVD}}

其它例子:low-rank model (e.g. matrix decomposition), deep neural network\textcolor{red}{\text{\small 其它例子:low-rank model (e.g. matrix decomposition), deep neural network}}

參考文獻:

  1. 《百面機器學習》
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章