1. 思路
The point of this quick post is to write out why using the log-odds is infact very well motivated in the first place, and once it is modeled by a linear function, what you get is the logistic function.
Beginning with log-odds would infact be begging the question, so let us try to understand.
2. 结论
log-odds 是个很自然的选择,sigmoid 是对 log-odds 的线性建模。(事实逻辑回归可以说是the log-odds with a linear function的最简单的例子,如果我们有结构化输出,这种模型的自然扩展将是the Conditional Random Field。使用线性函数的选择只是在其他一些有利的属性中凸优化)。
3. 理解
假设我们有一个线性分类器:
我们要求得合适的W和 ,使 0-1 loss 的期望值最小,即下面这个期望最小:









值得注意的是,到目前为止,我们对数据完全没有做出任何假设。 所以上面的分类器就新样本点的预期损失而言,是我们在泛化方面可以拥有的最佳分类器。 这种分类器称为贝叶斯分类器,有时也称为Plug-in 分类器。



我们得到了 log-odds ratio !
请注意,通过不对数据做出任何假设,只需写出条件风险,log-odds ratio 就会直接下降。 这不是偶然的,因为最佳贝叶斯分类器具有用于二进制分类的这种形式。 但问题仍然存在,我们如何模拟这个对数比值比? 最简单的选择是考虑线性模型(there is no reason to stick to a linear model, but due to some reasons, one being convexity, we stick to a linear model):



由此可见,log-odds 是个很自然的选择,sigmoid 是对 log-odds 的线性建模。
网友评论