当前位置:网站首页>深度学习必懂的 13 种概率分布
深度学习必懂的 13 种概率分布
2022-07-28 09:38:00 【大数据v】

导读:作为机器学习从业者,你需要知道概率分布相关的知识。这里有一份最常见的基本概率分布教程,大多数和使用 Python 库进行深度学习有关。
来源:AI开发者
原文链接:
https://github.com/graykode/distribution-is-all-you-need
概率分布概述:

共轭意味着它有共轭分布的关系。
在贝叶斯概率论中,如果后验分布 p(θx)与先验概率分布 p(θ)在同一概率分布族中,则先验和后验称为共轭分布,先验称为似然函数的共轭先验。共轭先验维基百科在这里
https://en.wikipedia.org/wiki/Conjugate_prior
多分类表示随机方差大于 2。
n 次意味着我们也考虑了先验概率 p(x)。
为了进一步了解概率,我建议阅读 [pattern recognition and machine learning,Bishop 2006]。
分布概率与特征:
01 均匀分布(连续)
代码:
https://github.com/graykode/distribution-is-all-you-need/blob/master/uniform.py
均匀分布在 [a,b] 上具有相同的概率值,是简单概率分布。

02 伯努利分布(离散)
代码:
https://github.com/graykode/distribution-is-all-you-need/blob/master/bernoulli.py
先验概率 p(x)不考虑伯努利分布。因此,如果我们对最大似然进行优化,那么我们很容易被过度拟合。
利用二元交叉熵对二项分类进行分类。它的形式与伯努利分布的负对数相同。

03 二项分布(离散)
代码:
https://github.com/graykode/distribution-is-all-you-need/blob/master/binomial.py
参数为 n 和 p 的二项分布是一系列 n 个独立实验中成功次数的离散概率分布。
二项式分布是指通过指定要提前挑选的数量而考虑先验概率的分布。

04 多伯努利分布,分类分布(离散)
代码:
https://github.com/graykode/distribution-is-all-you-need/blob/master/categorical.py
多伯努利称为分类分布。
交叉熵和采取负对数的多伯努利分布具有相同的形式。

05 多项式分布(离散)
代码:
https://github.com/graykode/distribution-is-all-you-need/blob/master/multinomial.py
多项式分布与分类分布的关系与伯努尔分布与二项分布的关系相同。

06 β分布(连续)
代码:
https://github.com/graykode/distribution-is-all-you-need/blob/master/beta.py
β分布与二项分布和伯努利分布共轭。
利用共轭,利用已知的先验分布可以更容易地得到后验分布。
当β分布满足特殊情况(α=1,β=1)时,均匀分布是相同的。

07 Dirichlet 分布(连续)
代码:
https://github.com/graykode/distribution-is-all-you-need/blob/master/dirichlet.py
dirichlet 分布与多项式分布是共轭的。
如果 k=2,则为β分布。

08 伽马分布(连续)
代码:
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 分布为β分布。
指数分布和卡方分布是伽马分布的特例。

09 指数分布(连续)
代码:
https://github.com/graykode/distribution-is-all-you-need/blob/master/exponential.py
指数分布是 α 为 1 时 γ 分布的特例。

10 高斯分布(连续)
代码:
https://github.com/graykode/distribution-is-all-you-need/blob/master/gaussian.py
高斯分布是一种非常常见的连续概率分布。

11 正态分布(连续)
代码:
https://github.com/graykode/distribution-is-all-you-need/blob/master/normal.py
正态分布为标准高斯分布,平均值为 0,标准差为 1。

12 卡方分布(连续)
代码:
https://github.com/graykode/distribution-is-all-you-need/blob/master/chi-squared.py
k 自由度的卡方分布是 k 个独立标准正态随机变量的平方和的分布。
卡方分布是 β 分布的特例

13 t 分布(连续)
代码:
https://github.com/graykode/distribution-is-all-you-need/blob/master/student-t.py
t 分布是对称的钟形分布,与正态分布类似,但尾部较重,这意味着它更容易产生远低于平均值的值。


延伸阅读

延伸阅读《神经网络与深度学习》
干货直达
更多精彩
在公众号对话框输入以下关键词
查看更多优质内容!
读书 | 书单 | 干货 | 讲明白 | 神操作 | 手把手
大数据 | 云计算 | 数据库 | Python | 爬虫 | 可视化
AI | 人工智能 | 机器学习 | 深度学习 | NLP
5G | 中台 | 用户画像 | 数学 | 算法 | 数字孪生
据统计,99%的大咖都关注了这个公众号
边栏推荐
- 3分钟带你了解微信小程序开发
- Set of bus related concepts
- Word segmentation results of ES query index fields
- MATLAB启动慢解决措施
- Several innovative economic models of platofarm have inspired the current metacosmic market
- MySQL 为什么有时候会选错索引?
- Create SSL certificate using OpenSSL
- 7.27 最小生成树阶段性测试题解
- Basic examples that must be mastered by beginners of C #
- How to get more marks in the game under the new economic model of Plato farm
猜你喜欢

Data can't lie. Plato farm is the leader of the meta universe

Have you ever seen this kind of dynamic programming -- the stock problem of state machine dynamic programming (Part 2)

NTU Lin Xuantian's "machine learning cornerstone" problem solving and code implementation | [you deserve it]

Pycharm uses CONDA to call the remote server

Seeing clearly is more important than walking fast, because you can go far only when you walk right

Translation recommendation | debugging bookkeeper protocol - unbounded ledger

路由器固件解密思路

Time series analysis 41 - time series prediction tbats model

软件测试与质量学习笔记1---黑盒测试
C form application uses object binding DataGridView data binding
随机推荐
Arouter source code analysis (III)
极致通缩和永动机模型,将推动 PlatoFarm 爆发
In php7?? And?: Differences between
数据库高级学习笔记--系统包
SeekTiger生态通证STI 新进展,4月14日登录 ZB
7.27 minimum spanning tree phased test problem solution
SQL Server、MySQL主从搭建,EF Core读写分离代码实现
[log] what does a log do? What is a log factory? Configuration and use of log4j? log4j. Properties file configuration, log4j jar package coordinates
OpenAtom OpenHarmony分论坛,今天14:00见!附大事记精彩发布
Install lamp under deepin
Analysis of HashSet internal principle
MySQL master-slave architecture. After the master database is suspended and restarted, how can the slave database automatically connect to the master database
总线相关概念集合
Platofarm has made continuous progress, and has launched the official version and super primitive NFT successively
Some problems about CLR GC tuning
使用IdentityServer出现过SameSite Cookie这个问题吗?
[ESP32][esp-idf][LVGL7.9] 使用oled iic编译失败
对象到对象映射-AutoMapper
判断字符串是不是回文
[OpenHarmony] [RK2206] 构建OpenHarmony编译器 (二)