Logistic Regression

Formulation

$$\log\left(\frac{p(y=1|x)}{p(y=0|x)} \right) = wx + b$$

$$p(y=1|x) = \displaystyle \frac{1}{1+e^{-(wx+b)}}$$

Example:

Age Buy
10
15
12
21
43

Stochastic Gradient Descent

$$w_{new} = w_{old} + \eta \times error(y,x) $$
  • $\eta$: learning rate

Regularizing logistic regression


In [ ]: