深度学习必懂的 13 种概率分布
导读:作为机器学习从业者,你需要知道概率分布相关的知识。这里有一份最常见的基本概率分布教程,大多数和使用 Python 库进行深度学习有关。
共轭意味着它有共轭分布的关系。 在贝叶斯概率论中,如果后验分布 p(θx)与先验概率分布 p(θ)在同一概率分布族中,则先验和后验称为共轭分布,先验称为似然函数的共轭先验。共轭先验维基百科在这里 https://en.wikipedia.org/wiki/Conjugate_prior - 多分类表示随机方差大于 2。
- n 次意味着我们也考虑了先验概率 p(x)。
为了进一步了解概率,我建议阅读 [pattern recognition and machine learning,Bishop 2006]。
代码: https://github.com/graykode/distribution-is-all-you-need/blob/master/uniform.py
代码: https://github.com/graykode/distribution-is-all-you-need/blob/master/bernoulli.py
- 先验概率 p(x)不考虑伯努利分布。因此,如果我们对最大似然进行优化,那么我们很容易被过度拟合。
利用二元交叉熵对二项分类进行分类。它的形式与伯努利分布的负对数相同。
代码: https://github.com/graykode/distribution-is-all-you-need/blob/master/binomial.py
- 参数为 n 和 p 的二项分布是一系列 n 个独立实验中成功次数的离散概率分布。
二项式分布是指通过指定要提前挑选的数量而考虑先验概率的分布。
代码: https://github.com/graykode/distribution-is-all-you-need/blob/master/categorical.py
- 多伯努利称为分类分布。
交叉熵和采取负对数的多伯努利分布具有相同的形式。
代码: https://github.com/graykode/distribution-is-all-you-need/blob/master/multinomial.py
代码: https://github.com/graykode/distribution-is-all-you-need/blob/master/beta.py
- β分布与二项分布和伯努利分布共轭。
- 利用共轭,利用已知的先验分布可以更容易地得到后验分布。
- 当β分布满足特殊情况(α=1,β=1)时,均匀分布是相同的。
代码: https://github.com/graykode/distribution-is-all-you-need/blob/master/dirichlet.py
- dirichlet 分布与多项式分布是共轭的。
- 如果 k=2,则为β分布。
代码: https://github.com/graykode/distribution-is-all-you-need/blob/master/gamma.py
- 如果 gamma(a,1)/gamma(a,1)+gamma(b,1)与 beta(a,b)相同,则 gamma 分布为β分布。
- 指数分布和卡方分布是伽马分布的特例。
代码: https://github.com/graykode/distribution-is-all-you-need/blob/master/exponential.py
代码: https://github.com/graykode/distribution-is-all-you-need/blob/master/gaussian.py
高斯分布是一种非常常见的连续概率分布。
代码: https://github.com/graykode/distribution-is-all-you-need/blob/master/normal.py
正态分布为标准高斯分布,平均值为 0,标准差为 1。
代码: https://github.com/graykode/distribution-is-all-you-need/blob/master/chi-squared.py
- k 自由度的卡方分布是 k 个独立标准正态随机变量的平方和的分布。
- 卡方分布是 β 分布的特例
代码: https://github.com/graykode/distribution-is-all-you-need/blob/master/student-t.py
延伸阅读👇
延伸阅读《神经网络与深度学习》
云计算与数字化转型的关系,终于有人讲明白了
最新评论
推荐文章
作者最新文章
你可能感兴趣的文章
Copyright Disclaimer: The copyright of contents (including texts, images, videos and audios) posted above belong to the User who shared or the third-party website which the User shared from. If you found your copyright have been infringed, please send a DMCA takedown notice to [email protected]. For more detail of the source, please click on the button "Read Original Post" below. For other communications, please send to [email protected].
版权声明:以上内容为用户推荐收藏至CareerEngine平台,其内容(含文字、图片、视频、音频等)及知识版权均属用户或用户转发自的第三方网站,如涉嫌侵权,请通知[email protected]进行信息删除。如需查看信息来源,请点击“查看原文”。如需洽谈其它事宜,请联系[email protected]。
版权声明:以上内容为用户推荐收藏至CareerEngine平台,其内容(含文字、图片、视频、音频等)及知识版权均属用户或用户转发自的第三方网站,如涉嫌侵权,请通知[email protected]进行信息删除。如需查看信息来源,请点击“查看原文”。如需洽谈其它事宜,请联系[email protected]。