In the recent hit drama "Basic Law of Genius", many interesting mathematical knowledge points are mentioned, such as "Affinity Number", "Bash Game", "Kong Mingqi", "Seven Bridges Problem", etc. Li. Among them, Mr.Tech is most interested in the Bayesian network used by the male and female protagonists in the play to participate in the mathematical modeling competition.
▲The heroine uses a Bayesian network for algorithm modeling to predict the suspect's trajectory and arrest time. Screenshot of the picture from the TV series "Basic Law of Genius"
Bayesian network is a classification algorithm, which is widely used in medical diagnosis, risk control and other business scenarios, and plays an important role. How much do you know about "Bayesian Networks"? Today, I will join you in the field of machine learning and learn this magical algorithm model together.
1. Into the Bayesian Network
In life, people tend to infer the cause from the final result, so as to better avoid risk, or create sufficient conditions in advance to achieve the expected goal. However, the connections between things are often intricate and complicated. How do we peel off the cocoons and clearly analyze the interdependence between events and events? Is it possible to calculate and measure causal effects mathematically, helping us trace and even predict the direction of things? Bayesian networks are an effective way for data scientists and algorithm engineers to solve such problems today.
A Bayesian network is a model that describes the relationship between random variables (events). For example, Bayesian networks can represent probabilistic relationships between diseases and symptoms. Based on symptoms, the network can calculate the probability that various diseases are present.
The Bayesian network is represented by a Directed Acyclic Graph (DAG), in which each node represents a random variable, and the connections between nodes are represented by directed arrows, which point from the "caused node" to the "affected node" , expressing the strength of the relationship in terms of conditional probability.
In reality, the diagnosis process of a doctor is highly consistent with the reasoning mechanism of the Bayesian network. As shown in the picture above, if the patient has a very severe cough, or even has symptoms such as shortness of breath and shortness of breath, the doctor will preliminarily determine that the patient may have pneumonia based on the haze weather and the patient's smoking history. Next, the doctor will ask the patient to take an X-ray of the lungs, and make a more scientific diagnosis based on the patient's X-ray performance.
At present, many medical assistance systems are based on Bayesian networks, which well precipitate past medical diagnosis experience, realize intelligent diagnosis, and help doctors greatly improve diagnosis efficiency.
Next, we dive into deeper questions: How do Bayesian networks quantify and compute causal/conditional dependencies between events? In the above cases, smog, smoking, allergies, and bacterial infections are all risk factors for pneumonia. So which risk factor has the greatest impact? This requires us to understand the underlying mathematical idea of Bayesian network - Bayes' theorem.
2. Bayesian Networks and Bayesian Theorem
Bayes' theorem was proposed by the famous British mathematician Thomas Bayes. It is a theorem about conditional probability. The formula is as follows:
Understand the Bayesian formula based on the knowledge of probability theory in high school: P(A), P(B) represents the independent probability of event A and event B. P(A|B) is a conditional probability, indicating the probability that event A occurs when event B occurs. P(B|A) is also a conditional probability, indicating the probability of event B occurring when event A occurs.
Bayes' theorem has a priori probability and a posteriori probability.
Prior probability: refers to the probability obtained based on past experience and statistical analysis. Is the probability before the "result" occurs, such as P(A) in the formula is the prior probability. Prior probabilities generally appear as "cause" in "cause-to-effect" problems.
Posterior probability: It is the probability value after correction according to the observed sample. It means that after the result occurs, we calculate and analyze the most likely cause of the result according to the "result", that is, the "cause" in "seeking the cause". P(A|B) in the formula is the posterior probability.
Next, we will simplify the medical diagnosis example just mentioned to further understand Bayes' theorem.
Assumptions (the prior probabilities are all hypothetical data):
The probability of a patient's bacterial infection P(V ) = 5%
The probability that the patient catches a cold P(C ) = 30%
Probability P(C|V) = 40% for patients to catch a cold due to bacterial infection
Then: According to Bayes' theorem, the posterior probability of cold patients being infected by bacteria P(V|C) = P(C|V) P(V) / P(C) = 40% 5% / 30% ≈66.67% A little more complicated.
Hypothesis (the prior probabilities are all hypothetical data): the probability that the patient has fever P(F) = 6%
The probability P(F|C) = 60% for the patient to have a fever due to a cold
Then: the probability of a patient having a fever due to bacterial infection P(F|V) = P(C|V) * P(F|C) = 24%
Then: According to Bayes' theorem, the posterior probability of fever patients being infected by bacteria P(V|F) = P(F|V) P(V) / P(F) = 24% 5% / 6% = 20%
As mentioned above, the Bayesian network is actually based on Bayes' theorem to quantify the causal relationship and dependency between things, and make the strength of the causality or dependency to be reasoned and calculated.
When solving practical business problems, algorithm engineers often obtain prior probability through statistics of historical data, and then use Bayesian network for inference to realize intelligent analysis of machine failure causes, patient etiologies, etc., as well as machine equipment failures. Prediction of probability, patient risk, etc.
However, in the actual machine learning process, the amount of data that algorithm engineers need to calculate is very large, and the Bayesian network constructed is more complex.
Bayes' theorem is very similar to the reasoning process of the human brain. As an important branch of learning and reasoning in the field of artificial intelligence, Bayes' theorem has always attracted much attention. The Bayesian network based on Bayes' theorem was proposed by Judea Pearl in 1986 and is a research hotspot in the field of machine learning in recent years. In 2011, Judea Pearl also won the Turing Award, the "Nobel Prize of Computing" for his contributions to artificial intelligence and Bayesian networks.
At present, the research of Bayesian network by algorithm engineers focuses on structure learning, hoping to build a more objective and reliable network model, and better play the advantages of Bayesian network in uncertainty reasoning.
Interactive Communication: How Much Do You Know About Bayesian Networks? Welcome to leave a message in the background of the public account, and talk to us about your understanding~
Conclusion:
In "Basic Law of Genius", the heroine successfully applied Bayesian network and Bayesian theorem to solve the problem of suspect trajectory prediction and tracking. In the real world, people have made more in-depth applications of big data and AI technologies, and are constantly exploring the use of data intelligence technologies to solve various uncertain problems, such as building dynamic Bayesian networks based on rich and real-time data to help relevant departments predict public emergencies. The impact of incidents, supporting emergency management, etc.
As a data intelligence enterprise, Getui has always been at the forefront of technological innovation. Through in-depth management and mining of massive data, Getuu processes data into information and knowledge, and interprets the humanistic meaning of data, so as to better serve industry customers and relevant government departments, and help scientific decision-making.
Want to learn more about cutting-edge technologies? Continue to pay attention to the series of column "Man Talking DI" of Ge Push Technology Practice, and feel the charm of digital intelligence up close with Mr.Tech~
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。