1
$\begingroup$

I am trying to prove that $\ell(\beta) = \sum_{i=1}^n \left (-y_i \beta^{\top}x_i + \ln \left (1 + e^{\beta^{\top}x_i }\right )\right )$ is a convex function. I follow the following steps:

Let $\beta_1, \beta_2 \in \mathbb{R}^{d+1}$, where $d$ is the dimension of $x$ \begin{equation} \ell(\beta_2) - \ell(\beta_1) = \sum_{i=1}^n\left ( -y_i(\beta_2 - \beta_1)^T\hat x_i + \ln\frac{1+e^{\beta_2^T\hat x_i}}{1 + e^{\beta_1^T\hat x_i}} \right ) \end{equation} \begin{align} \nabla \ell(\beta_1)^T(\beta_2 - \beta_1) &= \left (\sum_{i=1}^n(-y_i\hat x_i + \frac{\hat x_i e^{\beta_1^T\hat x_i}}{1+e^{\beta_1^T\hat x_i}})\right )^T(\beta_2 - \beta_1)\notag\\ &=\sum_{i=1}^n \left( (-y_i + \frac{e^{\beta_1^T\hat x_i}}{1 + e^{\beta_1^T x_i}})(\beta_2 - \beta_1)^T\hat x_i\right)\notag \end{align} We have \begin{align} \ell(\beta_2) - \ell(\beta_1) - \nabla \ell(\beta_1)^T(\beta_2 - \beta_1) &= \sum_{i=1}^n\left( \ln\frac{1+e^{\beta_2^T\hat x_i}}{1+e^{\beta_1^T\hat x_i}} - \frac{e^{\beta_1^T\hat x_i}}{1 + e^{\beta_1^T x_i}}(\beta_2^T\hat x_i - \beta_1^T\hat x_i)\right) \notag\\ &=\sum_{i=1}^n\left( \ln\frac{1+e^{-\beta_2^T\hat x_i}}{1+e^{-\beta_1^T\hat x_i}} + \frac{1}{1+e^{\beta_1^T x_i}}(\beta_2^T\hat x_i - \beta_1^T\hat x_i) \right) \end{align}

I want to prove that $\ell(\beta_2) - \ell(\beta_1) - \nabla \ell(\beta_1)^T(\beta_2 - \beta_1) \geq 0$. The problem can be reduced to proving that $\ln\frac{1+e^{-y}}{1+e^{-x}}+\frac{1}{1+e^x}(y-x)\geq 0$. I think this equality holds, but I still cannot solve it after several attempts.

$\endgroup$
3
  • 2
    $\begingroup$ Your function is convex just since $\log(1+\exp(x))$ is convex $\endgroup$ Commented Oct 9, 2021 at 12:45
  • $\begingroup$ (I fixed a typo in your main inequality) $\endgroup$ Commented Oct 9, 2021 at 12:47
  • $\begingroup$ Many thanks, Fedor. $\endgroup$
    – Daniel Liu
    Commented Oct 9, 2021 at 15:09

0

You must log in to answer this question.

Browse other questions tagged .