Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

[machine Learning] (5): Bayesian decision

2025-02-21 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >

Share

Shulou(Shulou.com)06/01 Report--

In the last section, we introduced the overall framework and basic points of supervised learning. According to the way of thinking of the total score, we will introduce some corresponding algorithms respectively. In today's section, we look at the application of Bayesian theorem in machine learning. The main points of this chapter are as follows:

1. Bayesian theorem

two。 Bayesian Theorem in Classification

3. Risk and utility measurement

4. Association rules

Bayesian Theorem

Bayesian theorem comes from conditional probability in statistics. It can reveal the corresponding relationship between two variables. The basic formula is as follows:

Where P (C | x) represents the conditional probability of event C occurring when data x is observed, which we call a posteriori probability (posterior probability); P (C) = P (C probability 1) is the probability of event C occurrence, which is called prior probability (prior probabilty), because this is the knowledge about C obtained before the observation of data x. P (x | C) is called quasi-likelihood, which, in contrast to P (C | x), represents the probability that the observed value of the sample belonging to event C is x; P (x) represents evidence (evidence), which is the edge probability of x observed, that is:

The edge probability here can be understood as the joint probability of x and C, that is, the probability when it occurs at the same time. The above formula can be obtained from the multiplication principle.

Second, Bayesian theorem in classification

In the classification problem, Bayesian theorem is mainly used to calculate the probability of class, that is, the probability that the observed sample data x belongs to class C. In general, we can assume that there are K mutually exclusive and exhaustive class sets C and the number of elements K, and we can get a priori probability to satisfy:

Based on the observed sample data x, we can calculate the posterior probability of a class, that is:

In order to minimize the error, the Bayesian classifier (Bayes' classfier) of course selects the class with the highest a posteriori probability, that is:

Third, risk and utility measurement

With Bayesian theorem, we can try to measure the risks in decision-making. For example, we can define action α-I to represent the decision to assign input to class Cmuri, while λ-ik represents the loss caused by the action assigned to class Cmuri when it actually belongs to class Cmurk, so we can calculate the expected risk (expected risk) of action α-I:

Our goal is to choose the action with the least risk. Similarly, we can define utility functions:

Here, contrary to risk measurement, let's find the action α-I that maximizes utility.

IV. Association rules

Relevance analysis is also an area of great concern in machine learning. as far as the application of Bayesian theorem is concerned, take the common "shopping basket" as an example, such as X and Y represent customers who buy two kinds of goods respectively. So we have the following three important measures of relevance:

1. The confidence (confidence) of association rule X- > Y, that is, what percentage of customers who buy X will buy Y at the same time:

two。 The degree of promotion (lift) of association rule X- > Y, also known as the degree of interest (interest), that is, the effect of purchasing X on purchasing Y.

3. The support degree (support) of the association rule X- > Y, indicating the significance of the rule:

All right, that's all for today, and we'll continue tomorrow!

Refer:

Introduction to Machine Learning, Ethen Alpaydin (Turkey), Machinery Industry Press

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Network Security

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report