逻辑回归解决的其实是一个两类分类问题。
假设这个问题满足伯努利分布。
The Bernoulli distribution with mean φ, written Bernoulli(φ), specifies a distribution over y ∈ {0, 1}, so that
p(y = 1; φ) = φ; p(y = 0; φ) = 1 − φ.
其中,η成为分布的自然参数(nature parameter);T(y)是充分统计量(sufficient statistic),通常 T(y)=y。
我们将伯努利分布改写为指数族分布可以得到:
根据第二行的式子。我们可以得到
\[\phi {\rm{ = }}\frac{1}{{1{\rm{ + }}{{\rm{e}}^{ - \eta }}}}\]
可以看出这就是Sigmod函数的形式,假设
\[\eta = {\theta ^T}x\]
将这个式子代入伯努利分布的概率函数中得到
\[P(y|x,\theta ) = {(\frac{1}{{1{\rm{ + }}{{\rm{e}}^{ - {\theta ^T}x}}}})^y}{(1 - \frac{1}{{1{\rm{ + }}{{\rm{e}}^{ - {\theta ^T}x}}}})^{1 - y}}\]
接下来通过极大似然就可以确定参数了