当前位置:网站首页>Three schemes of SVM to realize multi classification
Three schemes of SVM to realize multi classification
2022-07-06 21:01:00 【wx5d786476cd8b2】
SVM It is a binary classifier
SVM The algorithm was originally designed for binary classification problems , When dealing with multiple types of problems , We need to construct a suitable multi class classifier .
at present , structure SVM There are two main methods of multi class classifier
(1) direct method , Modify directly on the objective function , The parameter solutions of multiple classification surfaces are combined into an optimization problem , By solving the optimization problem “ Disposable ” Implementation of multi class classification . This method seems simple , But its computational complexity is relatively high , It's more difficult to achieve , Only suitable for small problems ;
(2) indirect method , Mainly through the combination of multiple two classifiers to achieve the construction of multiple classifiers , Common methods are one-against-one and one-against-all Two kinds of .
One to many (one-versus-rest, abbreviation OVR SVMs)
During the training, the samples of a certain category are classified into one category in turn , The rest of the samples fall into another category , such k Samples of categories construct k individual SVM. In classification, the unknown samples are classified into the category with the maximum classification function value .
If I had four categories ( That is to say 4 individual Label), They are A、B、C、D.
So when I was extracting the training set , Separate extraction
(1)A The corresponding vector is a positive set ,B,C,D The corresponding vector is a negative set ;
(2)B The corresponding vector is a positive set ,A,C,D The corresponding vector is a negative set ;
(3)C The corresponding vector is a positive set ,A,B,D The corresponding vector is a negative set ;
(4)D The corresponding vector is a positive set ,A,B,C The corresponding vector is a negative set ;
Use these four training sets to train separately , Then we get four training result files .
During the test , The corresponding test vectors are tested by using the four training result files .
In the end, each test has a result f1(x),f2(x),f3(x),f4(x).
So the final result is the largest of the four values as the classification result .
evaluation :
There's a flaw in this approach , Because the training set is 1:M, In this case there is biased. So it's not very practical . When extracting data sets , One third of the complete negative set is taken as the training negative set .
One on one (one-versus-one, abbreviation OVO SVMs perhaps pairwise)
This is done by designing a... Between any two types of samples SVM, therefore k Samples of each category need to be designed k(k-1)/2 individual SVM.
When classifying an unknown sample , The last category with the most votes is the category of the unknown sample .
Libsvm The multi class classification in is based on this method .
Suppose there are four types A,B,C,D Four types of . In training, I choose A,B; A,C; A,D; B,C; B,D;C,D The corresponding vector is used as the training set , And then we get six training results , During the test , Test the six results with the corresponding vectors , And then take the form of a vote , Finally, we get a set of results .
The vote is like this :
A=B=C=D=0;
(A,B)-classifier If it is A win, be A=A+1;otherwise,B=B+1;
(A,C)-classifier If it is A win, be A=A+1;otherwise, C=C+1;
...
(C,D)-classifier If it is A win, be C=C+1;otherwise,D=D+1;
The decision is the Max(A,B,C,D)
evaluation : This method is good , But when there are many categories ,model The number of is n*(n-1)/2, The cost is still considerable .
边栏推荐
- None of the strongest kings in the monitoring industry!
- Solution to the 38th weekly match of acwing
- The biggest pain point of traffic management - the resource utilization rate cannot go up
- OLED屏幕的使用
- The mail command is used in combination with the pipeline command statement
- Entity alignment two of knowledge map
- 什么是RDB和AOF
- [wechat applet] operation mechanism and update mechanism
- 审稿人dis整个研究方向已经不仅仅是在审我的稿子了怎么办?
- Can novices speculate in stocks for 200 yuan? Is the securities account given by qiniu safe?
猜你喜欢

2022 nurse (primary) examination questions and new nurse (primary) examination questions

What key progress has been made in deep learning in 2021?

The mail command is used in combination with the pipeline command statement

Application layer of tcp/ip protocol cluster

知识图谱之实体对齐二

Pycharm remote execution

2022 construction electrician (special type of construction work) free test questions and construction electrician (special type of construction work) certificate examination

The most comprehensive new database in the whole network, multidimensional table platform inventory note, flowus, airtable, seatable, Vig table Vika, flying Book Multidimensional table, heipayun, Zhix
![[diy] self designed Microsoft makecode arcade, official open source software and hardware](/img/a3/999c1d38491870c46f380c824ee8e7.png)
[diy] self designed Microsoft makecode arcade, official open source software and hardware

Hardware development notes (10): basic process of hardware development, making a USB to RS232 module (9): create ch340g/max232 package library sop-16 and associate principle primitive devices
随机推荐
快过年了,心也懒了
全网最全的知识库管理工具综合评测和推荐:FlowUs、Baklib、简道云、ONES Wiki 、PingCode、Seed、MeBox、亿方云、智米云、搜阅云、天翎
知识图谱之实体对齐二
[weekly pit] output triangle
Common doubts about the introduction of APS by enterprises
过程化sql在定义变量上与c语言中的变量定义有什么区别
Yyds dry goods count re comb this of arrow function
Recyclerview GridLayout bisects the middle blank area
[DSP] [Part 2] understand c6678 and create project
2022 refrigeration and air conditioning equipment installation and repair examination contents and new version of refrigeration and air conditioning equipment installation and repair examination quest
Can novices speculate in stocks for 200 yuan? Is the securities account given by qiniu safe?
OSPF多区域配置
Laravel笔记-自定义登录中新增登录5次失败锁账户功能(提高系统安全性)
PHP online examination system version 4.0 source code computer + mobile terminal
User defined current limiting annotation
[wechat applet] operation mechanism and update mechanism
Laravel notes - add the function of locking accounts after 5 login failures in user-defined login (improve system security)
OAI 5G NR+USRP B210安装搭建
Tips for web development: skillfully use ThreadLocal to avoid layer by layer value transmission
The biggest pain point of traffic management - the resource utilization rate cannot go up