$ \boldsymbol{\hat{y}} = X \boldsymbol{w} $
$ \underset{\boldsymbol{w}}{\operatorname{arg\,min}} \, \xi(\hat{y}, t) = {|| \hat{y} - t||_2}^2 $
$$ x \sim {\mathcal {U}}(0, 1) \\ t = 3 x + \varepsilon \\ \varepsilon \sim N(\mu, \sigma^2) \; \text{with} \; \mu = 0, \sigma = 0.2 $$
How to optimize?
$$ \frac{\partial \xi(\hat{y}, t)}{\partial w} = \frac{\partial \xi}{\partial \hat{y}} \frac{\partial \hat{y}}{\partial w} = \frac{\partial (\hat{y} - t)^2}{\partial \hat{y}} \frac{\partial (x w)}{\partial w} \\ = 2 (\hat{y} - t) x = 2 (x w - t) x $$
$$ \Delta w = \mu \sum_{i=1}^{N} \frac{\partial \xi_i(\hat{y}_i, t_i)}{\partial w} $$
$$ w_{k+1} \gets w_k - \alpha_k \Delta w $$
$$ \sigma(z) = \frac{1}{1+e^{-z}} $$
$$ y = \sigma(X \boldsymbol{w}) $$
$$ \hat{y} = \left\lfloor y + 0.5 \right\rfloor = -\left\lceil -y - 0.5 \right\rceil $$ [Wikipedia: Rounding](https://en.wikipedia.org/wiki/Rounding)
$$ \xi(t,\hat{y}) = - \sum_{i=1}^{n} \left[ t_i log(\hat{y}_i) + (1-t_i)log(1-\hat{y}_i) \right] $$
$$ \Pr(Y_i=k) = \frac{e^{\boldsymbol\beta_k \cdot \mathbf{X}_i}} {\sum\limits_{0 \leq c \leq K} {e^{\boldsymbol\beta_c \cdot \mathbf{X}_i}}} $$
$$ \frac{e^{f_{y_i}}}{\sum_j e^{f_j}} = \frac{Ce^{f_{y_i}}}{C\sum_j e^{f_j}} = \frac{e^{f_{y_i} + \log C}}{\sum_j e^{f_j + \log C}} $$
Overflow!
Numeric stability. [CS231n: Softmax classifier](https://cs231n.github.io/linear-classify/#softmax)
Parameter initialization.
$$ \operatorname{sgn}(w^{\top} \mathbf{x}) = \begin{cases} +1, & \text{Positive} \\ -1, & \text{Negative} \end{cases} $$
$$ \min_{\mathbf{w}}\ C \underset{\text{Hinge-Loss}}{\underbrace{\sum_{i=1}^{n}\max[1-y_{i}\underset{h({\mathbf{x}_i})}{\underbrace{(w^{\top}{\mathbf{x}_i}+b)}},0]}}+\underset{l_{2}\text{-Regularizer}}{\underbrace{\left\Vert w\right\Vert _{z}^{2}}} $$
$$ \Delta w = \begin{cases} 2\lambda w - y_ix_i, & y_i \langle x_i,w \rangle\lt 1\\ 2\lambda w, & \text{otherwise} \end{cases} $$
Training. 