1

概念:odds vs logits

 2 years ago
source link: https://allenwind.github.io/blog/6467/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client
Mr.Feng Blog

NLP、深度学习、机器学习、Python、Go

概念:odds vs logits

odds、logits是数学、机器学习和深度学习中容易混淆的概念。

odds vs logits

odds和logits在神经网络和机器学习中都是常见的概念。odds称为几率或可能性,是事件A发生与不发生(非A)的概率的比值,

odds(p)=p1−podds(p)=p1−p

根据概率的取值范围容易得到odds(p)∈[0,+∞)odds⁡(p)∈[0,+∞)。而logit,顾名思义log it,对odds(p)odds⁡(p)取对数变换,

logits(p)=log(odds(p))=logp1−plogits⁡(p)=log⁡(odds⁡(p))=log⁡p1−p

由于 logits(p)∈[−∞,+∞]logits⁡(p)∈[−∞,+∞] 没有上下限,于是可以方便地进行建模。例如最简单的线性模型,

logits(p)=log(p1−p)=β0+n∑i=1βixilogits⁡(p)=log⁡(p1−p)=β0+∑i=1nβixi

这就是可以理解,为什么很多机器学习和深度学习模型的输出在没有加激活(如softmax)称为logit。

对上式变换,有对数线性模型,

p(x)=exp(β0+∑ni=1βixi)1+exp(β0+∑ni=1βixi)p(x)=exp⁡(β0+∑i=1nβixi)1+exp⁡(β0+∑i=1nβixi)

这就是Logistic模型。

转载请包括本文地址:https://allenwind.github.io/blog/6467
更多文章请参考:https://allenwind.github.io/blog/archives/


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK