当前位置:网站首页>Bayes' law
Bayes' law
2022-07-07 08:09:00 【Steven Devin】
1. probability theory
First review some probability theory .
joint probability : event A And events B Probability of simultaneous occurrence ; Also called product rule .
P ( A , B ) = P ( A ∩ B ) = P ( A ∣ B ) P ( B ) = P ( B ∣ A ) P ( A ) P(A,B) = P(A \cap B) = P(A|B)P(B) = P(B|A)P(A) P(A,B)=P(A∩B)=P(A∣B)P(B)=P(B∣A)P(A)
Summation rule : event A and event B The probability of different occurrences .
P ( A ∪ B ) = P ( A ) + P ( B ) − P ( A ∩ B ) P(A \cup B) = P(A) + P(B)-P(A\cap B) P(A∪B)=P(A)+P(B)−P(A∩B)
If A and B Are mutually exclusive :
P ( A ∪ B ) = P ( A ) + P ( B ) P(A \cup B) = P(A) + P(B) P(A∪B)=P(A)+P(B)
Total probability : If the event A The occurrence of may be caused by many possible event B Lead to .
P ( A ) = ∑ i n P ( A ∣ B i ) P ( B i ) P(A) = \sum_{i} ^nP(A|B_{i})P(B_{i}) P(A)=i∑nP(A∣Bi)P(Bi)
Conditional probability : Given event B event A Probability of occurrence .
P ( A ∣ B ) = P ( A , B ) P ( B ) P(A|B)=\frac{P(A,B)}{P(B)} P(A∣B)=P(B)P(A,B)
2. Bayes' law
In machine learning , Given the observed training data B, We are often interested in finding the best hypothesis space A.
The best hypothetical space is the most possible hypothetical space , That is, given training data B, Put all kinds of training data B In hypothetical space A Medium Prior probability Add up .
According to the above definition , Finding hypothesis space A The probability is as follows :
P ( A ) = ∑ n P ( A ∣ B i ) P ( B i ) P(A) = \sum_{n} P(A|B_{i})P(B_{i}) P(A)=n∑P(A∣Bi)P(Bi)
Is that familiar ?
This is actually All probability formula , event A The occurrence of may be caused by data B 1 B_1 B1, B 2 B_2 B2… … B n B_n Bn
Many reasons lead to .
For a given training data B, Finding hypothesis space A Probability , Bayesian theorem provides a more direct method .
Bayesian law uses :
- Hypothetical space A Of Prior probability P ( A ) P(A) P(A)
- And observation data Prior probability probability P ( B ) P(B) P(B)
- Given a hypothetical space A, Observation data B Probability P ( B ∣ A ) P(B|A) P(B∣A)
Find the given observation data B, Finding hypothesis space A Probability P ( A ∣ B ) P(A|B) P(A∣B), Also known as Posterior probability , Because it reflects the given data B, For hypothetical space A The influence of probability .
Contrary to a priori probability , P(A) And B It's independent .
Bayes' formula :
P ( A ∣ B ) = P ( B ∣ A ) P ( A ) P ( B ) P(A|B)=\frac{P(B|A)P(A)}{P(B)} P(A∣B)=P(B)P(B∣A)P(A)
The derivation of Bayesian formula is also very simple , Combining the conditional probability and joint probability mentioned in the first part, we can find .
Conditional probability :
P ( A ∣ B ) = P ( A , B ) P ( B ) P(A|B)=\frac{P(A,B)}{P(B)} P(A∣B)=P(B)P(A,B)
joint probability :
P ( A , B ) = P ( B ∣ A ) P ( A ) {P(A,B)} = P(B|A)P(A) P(A,B)=P(B∣A)P(A)
3. Maximum posterior probability MAP
Sometimes , Given data B, Want to ask for hypothetical space A The most likely assumption in is called Maximum posterior probability MAP(Maximum a Posteriori).
A M A P = a r g m a x P ( A ∣ B ) A_{MAP} = argmax P(A|B) AMAP=argmaxP(A∣B)
That is o :
= a r g m a x P ( B ∣ A ) P ( A ) P ( B ) = argmax \frac{P(B|A)P(A)}{P(B)} =argmaxP(B)P(B∣A)P(A)
Get rid of P ( B ) P(B) P(B) Because it is related to the assumption A yes independent .
= a r g m a x P ( B ∣ A ) P ( A ) = argmax P(B|A)P(A) =argmaxP(B∣A)P(A)
边栏推荐
- Linux server development, redis source code storage principle and data model
- Linux Installation MySQL 8.0 configuration
- Es FAQ summary
- UnityHub破解&Unity破解
- ZCMU--1492: Problem D(C语言)
- The legend about reading the configuration file under SRC
- 2022 Inner Mongolia latest advanced fire facility operator simulation examination question bank and answers
- Myabtis_ Plus
- Complex network modeling (II)
- LeetCode简单题之找到一个数字的 K 美丽值
猜你喜欢
Notes on PHP penetration test topics
快解析内网穿透助力外贸管理行业应对多种挑战
Shell 脚本的替换功能实现
CDC (change data capture technology), a powerful tool for real-time database synchronization
【数字IC验证快速入门】13、SystemVerilog interface 和 program 学习
Network learning (I) -- basic model learning
Introduction to basic components of wechat applet
Es FAQ summary
Qt学习27 应用程序中的主窗口
Myabtis_Plus
随机推荐
C language communication travel card background system
Few shot Learning & meta learning: small sample learning principle and Siamese network structure (I)
复杂网络建模(一)
Quick analysis of Intranet penetration helps the foreign trade management industry cope with a variety of challenges
Blob 對象介紹
数据库实时同步利器——CDC(变化数据捕获技术)
Avatary的LiveDriver试用体验
Main window in QT learning 27 application
Content of string
微信小程序基本组件使用介绍
Qt学习26 布局管理综合实例
调用 pytorch API完成线性回归
【数字IC验证快速入门】14、SystemVerilog学习之基本语法1(数组、队列、结构体、枚举、字符串...内含实践练习)
Linux Installation MySQL 8.0 configuration
ROS Bridge 笔记(05)— carla_ackermann_control 功能包(将Ackermann messages 转化为 CarlaEgoVehicleControl 消息)
Empire CMS collection Empire template program general
青龙面板--整理能用脚本
2022 recurrent training question bank and answers of refrigeration and air conditioning equipment operation
运放电路的反馈电阻上并联一个电容是什么作用
Search for an element in a binary search tree (BST)