当前位置:网站首页>Popular understanding of ovo and ovr
Popular understanding of ovo and ovr
2022-07-03 15:20:00 【alw_ one hundred and twenty-three】
I have planned to present this series of blog posts in the form of animated interesting popular science , If you're interested Click here .
In reality, we often encounter multi classification learning tasks . Some binary classification algorithms can be directly extended to multi classification , But in more cases , We are based on some strategies , Use the binary classification algorithm to solve the multi classification problem . for example :OvO、OvR.
OvO
Suppose the distribution of the training data set is shown in the figure below ( among A,B,C Represents the category of training data ):

If you want to use logistic regression algorithm to solve this problem 3 Classification problem , have access to OvO.OvO(One Vs One) It is a strategy to use binary classification algorithm to solve multi classification problem . From the literal meaning, we can see that its core idea is one-on-one . So-called “ One ”, It refers to categories . and “ Yes ” It refers to the combination of two different categories from the training set to train multiple classifiers .
The rules of division are simple , It's a combination ( C n 2 C_n^2 Cn2, among n Indicates the number of categories in the training set , In this case for 3). As shown in the figure below ( Each rectangle represents a division ):

Use these 3 Species division , The divided training set trains the binary classifier , You can get 3 A classifier . At this point, the training phase has been completed . As shown in the figure below :

In the prediction phase , Just throw the test samples to those trained in the training stage 3 A classifier is used to predict , The final will be 3 The results predicted by classifiers are counted , The result with the highest number of votes is the predicted result . As shown in the figure below :

OvR
Suppose the distribution of the training data set is shown in the figure below ( among A,B,C Represents the category of training data ):

If you want to use logistic regression algorithm to solve this problem 3 Classification problem , have access to OvR.OvR(One Vs Rest) It is a strategy to use binary classification algorithm to solve multi classification problem . From the literal meaning, we can see that its core idea is A pair of surplus . A pair of surplus means to be right n When classifying samples by category , Take one sample as a class , Consider all the remaining types of samples as another class , In this way n A dichotomous question . So and OvO equally , It needs to be divided in the training stage .
The division is also very simple , As shown in the figure below :

Use these 3 Species division , The divided training set trains the binary classifier , You can get 3 A classifier . At this point, the training phase has been completed . As shown in the figure below :

In the prediction phase , Just throw the test samples to those trained in the training stage 3 A classifier is used to predict , Finally, choose the category with the highest probability as the final result . As shown in the figure below :

边栏推荐
- 视觉上位系统设计开发(halcon-winform)-6.节点与宫格
- socket. IO build distributed web push server
- Global and Chinese markets for transparent OLED displays 2022-2028: Research Report on technology, participants, trends, market size and share
- socket.io搭建分布式Web推送服务器
- [cloud native training camp] module VIII kubernetes life cycle management and service discovery
- Didi off the shelf! Data security is national security
- 如何使用 @NotNull等注解校验 并全局异常处理
- Halcon与Winform学习第一节
- Incluxdb2 buckets create database
- Dataframe returns the whole row according to the value
猜你喜欢

视觉上位系统设计开发(halcon-winform)-1.流程节点设计

Redis主从、哨兵、集群模式介绍

Introduction to redis master-slave, sentinel and cluster mode

需要知道的字符串函数

Dataframe returns the whole row according to the value

Jvm-04-runtime data area heap, method area

Summary of concurrent full knowledge points

Popular understanding of linear regression (I)

【注意力机制】【首篇ViT】DETR,End-to-End Object Detection with Transformers网络的主要组成是CNN和Transformer

Construction of operation and maintenance system
随机推荐
Enable multi-threaded download of chrome and edge browsers
求字符串函数和长度不受限制的字符串函数的详解
Global and Chinese market of postal automation systems 2022-2028: Research Report on technology, participants, trends, market size and share
Visual upper system design and development (Halcon WinForm) -1 Process node design
Unity hierarchical bounding box AABB tree
leetcode_ Power of Four
redis单线程问题强制梳理门外汉扫盲
【日常训练】395. 至少有 K 个重复字符的最长子串
Global and Chinese markets for infrared solutions (for industrial, civil, national defense and security applications) 2022-2028: Research Report on technology, participants, trends, market size and sh
XWiki Installation Tips
Jvm-02-class loading subsystem
Popular understanding of gradient descent
Besides lying flat, what else can a 27 year old do in life?
Using Tengine to solve the session problem of load balancing
Final review points of human-computer interaction
【Transform】【实践】使用Pytorch的torch.nn.MultiheadAttention来实现self-attention
Leetcode sword offer find the number I (nine) in the sorted array
[probably the most complete in Chinese] pushgateway entry notes
Concurrency-02-visibility, atomicity, orderliness, volatile, CAS, atomic class, unsafe
Kubernetes - yaml file interpretation