News classification
Contact us
- Add: No. 9, North Fourth Ring Road, Haidian District, Beijing. It mainly includes face recognition, living detection, ID card recognition, bank card recognition, business card recognition, license plate recognition, OCR recognition, and intelligent recognition technology.
- Tel: 13146317170 廖经理
- Fax:
- Email: 398017534@qq.com
Deep learning Bias theorem
Deep learning Bias theorem
What is the use of the 1. Bayes theorem:
In order to solve the problem of "inverse probability", it can predict probability based on past data, and predict probability under limited information.
2. what is the Bias theorem:
Formula: P (A|B) = P (A) * [P (B|A) /P (B)]
1) P (A): prior probability, that is, a subjective judgement of A event probability without knowing the B event.
2) P (B|A) /P (B): possibility function, which is an adjustment factor, that is, the adjustment brought by the new information B, which makes the prior probability closer to the real probability.
2.1., if the "likelihood function" P (B|A) /P (B) > 1, means that the "prior probability" is enhanced, and the possibility of occurrence of event A increases.
2.2., if "likelihood function" = 1, means that B event is not helpful to judge the possibility of event A.
2.3., if the possibility function is < 1, it means that the "prior probability" is weakened, and the possibility of event A decreases.
3) P (A|B): a posteriori probability, that is, after the occurrence of B event, we re evaluate the probability of A events.
3. application cases:
1) total probability formula: the function of this formula is to calculate P (B) in Bayes theorem.
P (B) = P (B|A) P (A) + P (B|A') P (A')
Meaning: if A and A'constitute the whole of a problem (all the sample space), then the probability of event B is equal to the sum of the probability of A and A' multiplied by B for the conditional probability of these two events, respectively.
Case study: No. 1 bowls (30 chocolate +10 fruit sugar), and 2 bowls (20 chocolate +20 fruit sugar).
Question: cover the bowl, pick a bowl randomly, and get a chocolate from it. What is the probability of this chocolate coming from the 1 bowl?
Solution: the number 1 bowl is taken as event A1, and the number 2 bowl is recorded as event A2. Then the problem is P (A|B), that is, the probability of removing the chocolate and the 1 bowl.
1) priori probabilities:
Because the two bowls are the same, so the two bowls have the same probability of selection when they get the new information. Therefore, P (A1) = P (A2) = 0.5 (A1 indicates 1 bowl, A2 indicates bowl 2).
2) the possibility function P (B|A) /P (B):
P (B|A1) indicates the probability of removing chocolate (B) from bowl 1 (A1).
Because there are 30 chocolate +10 sugar in bowl 1, so P (B|A1) = 30/ (30+10) = 75%.
P (B) = P (B|A1) P (A1) + P (B|A2) P (A2) = [30/ (P) + + (()) = 62.5%.
The possibility function P (B|A1) /P (B) = 75%/62.5% = 1.2
3) take the Bayes formula to find the posterior probability:
P (A1|B) = P (A1) *[P (B|A1) /P (B)] = 50%*1.2 =60%
2) if the A in the formula is changed to "rule", B is changed into "phenomenon":
P (rule | phenomenon) = P ([P | law phenomenon) (Law) /P (phenomenon)]
The previous case analysis: there are two laws (from the No. 1 bowl to the law of the No. 2 bowl), and there are two phenomena (chocolate, fruit sugar). And know that the two bowls are exactly the same, so the probability of the two laws is the same. P (rule from No. 1 bowls) = P (rule from 2 bowls) = 0.5. At the same time, P (chocolate phenomenon from bowl 1) = 30/ (30+10) =0.75, P (fruit sugar phenomenon from 1 bowl rule) =10/ (30+10) =0.25; P (chocolate phenomenon from 2 bowl to regular) = 20/ (20+20) =0.5 = = (fruit sugar phenomenon from 2 Bowl rule). In addition, P (chocolate phenomenon) = (30+20) / (30+10+20+20) =0.625, P (fruit sugar phenomenon) = (10+20) / (30+10+20+20) =0.375. The problem now is to observe a chocolate phenomenon and ask to deduce the following rules, that is, how much of the law comes from the No. 1 bowl, that is, P (from bowl No. 1):
P (from the No. 1 bowl to the regular chocolate phenomenon) = P (chocolate phenomenon from the rule of No. 1 bowl) *[P (rule from 1 bowls) /P (chocolate phenomenon)] = 0.75*[0.5/0.625]=60%.
Example 2:
There are 60% boys and 40% girls in 1 schools. Boys always wear pants, while girls wear half a pair of trousers and half wear skirts. If you walk on campus, how long is it for a student to wear pants to ask boys?
There are two rules (male rule, female rule), and know the probability of occurrence of law P (rule of boys) =0.6, P (is the law of girls) =0.4. There are two kinds of phenomena (wearing trousers and wearing skirts), assuming that there are 10 students, 6 boys and 4 girls, then P = (6+2) /10=0.8, P (wear skirt phenomenon) =2/10=0.2. In addition, P (wear trousers phenomenon is male regular) =6/6=1, P (wear dress phenomenon is male law) =0, P (wear trousers phenomenon is female law) = P (wear skirt phenomenon is female law) =0.5. Now, see a student wearing trousers, boys need to infer probability, namely P (boys wear pants | law phenomenon):
P is a boy's rule of wearing pants) = P (wearing trousers, phenomenon is male rule), *[P (rule of boys) /P (wearing trousers),]=1*[0.6/0.8]=0.75.
Example 3:
A taxi crashed on a rainy night. A witness at the scene said that the car was blue. It is known: 1., the accuracy rate of identifying the blue and green taxis is 80%; 2. of the taxis in the area are 85% and 15% are blue. Question: what is the probability that the trouble car is blue?
There are two rules: blue cars, green cars, two phenomena (or observation, data, sampling, etc.): cars are seen as blue and cars are seen as green. From the example, we can see that P (green car) =0.85, P (blue car) =0.15. P (car is considered blue blue car) =0.8, P (car is considered green blue car) =0.2, P (car is considered green green car) =0.8, P (car is considered blue green car) =0.2. Suppose there are 100 cars in the land
In order to solve the problem of "inverse probability", it can predict probability based on past data, and predict probability under limited information.
2. what is the Bias theorem:
Formula: P (A|B) = P (A) * [P (B|A) /P (B)]
1) P (A): prior probability, that is, a subjective judgement of A event probability without knowing the B event.
2) P (B|A) /P (B): possibility function, which is an adjustment factor, that is, the adjustment brought by the new information B, which makes the prior probability closer to the real probability.
2.1., if the "likelihood function" P (B|A) /P (B) > 1, means that the "prior probability" is enhanced, and the possibility of occurrence of event A increases.
2.2., if "likelihood function" = 1, means that B event is not helpful to judge the possibility of event A.
2.3., if the possibility function is < 1, it means that the "prior probability" is weakened, and the possibility of event A decreases.
3) P (A|B): a posteriori probability, that is, after the occurrence of B event, we re evaluate the probability of A events.
3. application cases:
1) total probability formula: the function of this formula is to calculate P (B) in Bayes theorem.
P (B) = P (B|A) P (A) + P (B|A') P (A')
Meaning: if A and A'constitute the whole of a problem (all the sample space), then the probability of event B is equal to the sum of the probability of A and A' multiplied by B for the conditional probability of these two events, respectively.
Case study: No. 1 bowls (30 chocolate +10 fruit sugar), and 2 bowls (20 chocolate +20 fruit sugar).
Question: cover the bowl, pick a bowl randomly, and get a chocolate from it. What is the probability of this chocolate coming from the 1 bowl?
Solution: the number 1 bowl is taken as event A1, and the number 2 bowl is recorded as event A2. Then the problem is P (A|B), that is, the probability of removing the chocolate and the 1 bowl.
1) priori probabilities:
Because the two bowls are the same, so the two bowls have the same probability of selection when they get the new information. Therefore, P (A1) = P (A2) = 0.5 (A1 indicates 1 bowl, A2 indicates bowl 2).
2) the possibility function P (B|A) /P (B):
P (B|A1) indicates the probability of removing chocolate (B) from bowl 1 (A1).
Because there are 30 chocolate +10 sugar in bowl 1, so P (B|A1) = 30/ (30+10) = 75%.
P (B) = P (B|A1) P (A1) + P (B|A2) P (A2) = [30/ (P) + + (()) = 62.5%.
The possibility function P (B|A1) /P (B) = 75%/62.5% = 1.2
3) take the Bayes formula to find the posterior probability:
P (A1|B) = P (A1) *[P (B|A1) /P (B)] = 50%*1.2 =60%
2) if the A in the formula is changed to "rule", B is changed into "phenomenon":
P (rule | phenomenon) = P ([P | law phenomenon) (Law) /P (phenomenon)]
The previous case analysis: there are two laws (from the No. 1 bowl to the law of the No. 2 bowl), and there are two phenomena (chocolate, fruit sugar). And know that the two bowls are exactly the same, so the probability of the two laws is the same. P (rule from No. 1 bowls) = P (rule from 2 bowls) = 0.5. At the same time, P (chocolate phenomenon from bowl 1) = 30/ (30+10) =0.75, P (fruit sugar phenomenon from 1 bowl rule) =10/ (30+10) =0.25; P (chocolate phenomenon from 2 bowl to regular) = 20/ (20+20) =0.5 = = (fruit sugar phenomenon from 2 Bowl rule). In addition, P (chocolate phenomenon) = (30+20) / (30+10+20+20) =0.625, P (fruit sugar phenomenon) = (10+20) / (30+10+20+20) =0.375. The problem now is to observe a chocolate phenomenon and ask to deduce the following rules, that is, how much of the law comes from the No. 1 bowl, that is, P (from bowl No. 1):
P (from the No. 1 bowl to the regular chocolate phenomenon) = P (chocolate phenomenon from the rule of No. 1 bowl) *[P (rule from 1 bowls) /P (chocolate phenomenon)] = 0.75*[0.5/0.625]=60%.
Example 2:
There are 60% boys and 40% girls in 1 schools. Boys always wear pants, while girls wear half a pair of trousers and half wear skirts. If you walk on campus, how long is it for a student to wear pants to ask boys?
There are two rules (male rule, female rule), and know the probability of occurrence of law P (rule of boys) =0.6, P (is the law of girls) =0.4. There are two kinds of phenomena (wearing trousers and wearing skirts), assuming that there are 10 students, 6 boys and 4 girls, then P = (6+2) /10=0.8, P (wear skirt phenomenon) =2/10=0.2. In addition, P (wear trousers phenomenon is male regular) =6/6=1, P (wear dress phenomenon is male law) =0, P (wear trousers phenomenon is female law) = P (wear skirt phenomenon is female law) =0.5. Now, see a student wearing trousers, boys need to infer probability, namely P (boys wear pants | law phenomenon):
P is a boy's rule of wearing pants) = P (wearing trousers, phenomenon is male rule), *[P (rule of boys) /P (wearing trousers),]=1*[0.6/0.8]=0.75.
Example 3:
A taxi crashed on a rainy night. A witness at the scene said that the car was blue. It is known: 1., the accuracy rate of identifying the blue and green taxis is 80%; 2. of the taxis in the area are 85% and 15% are blue. Question: what is the probability that the trouble car is blue?
There are two rules: blue cars, green cars, two phenomena (or observation, data, sampling, etc.): cars are seen as blue and cars are seen as green. From the example, we can see that P (green car) =0.85, P (blue car) =0.15. P (car is considered blue blue car) =0.8, P (car is considered green blue car) =0.2, P (car is considered green green car) =0.8, P (car is considered blue green car) =0.2. Suppose there are 100 cars in the land