当前位置:网站首页>ML10 self study notes SVM
ML10 self study notes SVM
2022-07-29 06:17:00 【19-year-old flower girl】
SVM( Classification problem )

SVM deduction
Want the maximum distance between the two classes 
To calculate the distance . Suppose the decision boundary is such a plane , That is to calculate the distance from this point to the straight line .
Definition of plane :WTX=b.WT For the normal vector . All we have to do is dist(x,h), But direct calculation is troublesome , Usually, it is calculated in this way .
Find two points in the plane x’ and x’’, These two points can be brought into the plane formula , Two points form a vector ,dist This vector is related to x’ and x’’ The vector formed is vertical . Such as ② Formula , The normal vector is perpendicular to any vector in the plane .
Because it is difficult to calculate the straight-line distance , So calculate the distance between two points instead , You can calculate X And X’ The distance between them can be obtained by projecting in the vertical direction dist(x,h), Such as the formula in the last line . Then an equal sign is used to simplify , take X’ use ① Formula substitution .
data
y(xi) It's the forecast ,Yi It's the tag value .
Objective function
The original distance is |wtx+b|, With absolute value , But in the previous decision equation y(xi) And yi The product of is always positive , Therefore, the absolute value can be directly removed after multiplication in the formula in this section .
min Next is the required point closest to the decision boundary ( sample ), Find the distance ,max Is the greatest distance , This maximizes the distance obtained just now . What is the goal w Make this objective function maximum .
Objective function solution
Be practical w The minimum value of . Because of the demand w and w2 The minimum value of is the same , So we need 1/2w2 The minimum value of is the same .
Use Lagrange multiplier method to solve .
There is a dual property . Minimum required , You can find the partial derivative .
Like what? w,b bring L Minimum , And then put w,b Replace the original formula 
next step , What kind of αi Make the whole largest . Usually, the maximum value will be converted into the minimum value ( Plus a minus sign ).
SVM Solving examples

Dot product in brackets is inner product . That is, substitute the data .
solve , Finding partial derivatives . Because all αi, Must be greater than zero ( constraint condition ), But when right α2 When the partial derivative equals zero , The obtained value is complex , So the best value is on the boundary , Make α1 and α2 Take zero respectively . The second satisfaction , It can be obtained from the previous formula α3.
Bring back w solve . For sample points , as long as α It's zero , Then he is meaningless , No more calculations , According to the previous image ,x2 It won't be included in the calculation formula , The final result is composed of samples on the boundary , therefore x2 Points on non boundary are not included in the calculation formula .
Soft space

The objective function has also changed .
Additional parameters .
Nuclear transformation
It was linear , Not used Φ(x) function , Just use a simple x,
Because mapping to high dimensions is sometimes difficult to calculate , First map to the high dimension , It is troublesome to calculate the inner product of high-dimensional multiple data , But by first finding the inner product and then mapping , First find the inner product , Then mapping can achieve the same effect , But the computational complexity is reduced .
When there is no kernel function , Classification is not very good ( That solid line ), The classification is better after using Gaussian kernel function , loops . The kernel function is to make the low dimension indivisible , Convert to high dimensional separable .
边栏推荐
- JUC并发知识点
- 2.4G频段的无线收发芯片 SI24R1 问题汇总解答
- 华为云14天鸿蒙设备开发-Day1环境搭建
- DP4301—SUB-1G高集成度无线收发芯片
- LoRa开启物联网新时代-ASR6500S、ASR6501/6502、ASR6505、ASR6601
- 抽象类以及接口
- 数学建模心得
- 京微齐力:基于HMEP060的OLED字符显示(及FUXI工程建立演示)
- Reading papers on fake news detection (2): semi supervised learning and graph neural networks for fake news detection
- HAL库学习笔记-12 SPI
猜你喜欢

STM32 串口乱码

倾角传感器用于通信铁塔、高压电塔长期监测

Reading papers on fake news detection (2): semi supervised learning and graph neural networks for fake news detection

新能源共享充电桩管理运营平台

基于STC51:四轴飞控开源项目原理图与源码(入门级DIY)

Ml8 self study notes

充电桩充电技术新能源充电桩开发

【软件工程之美 - 专栏笔记】26 | 持续交付:如何做到随时发布新版本到生产环境?

【软件工程之美 - 专栏笔记】21 | 架构设计:普通程序员也能实现复杂系统?

FPGA based: moving target detection (supplementary simulation results, available)
随机推荐
2022 spring move - core technology FPGA development post pen test question (original question and experience)
2022 spring move - core technology FPGA post technical aspects (one side experience)
【软件工程之美 - 专栏笔记】“一问一答”第3期 | 18个软件开发常见问题解决策略
Am model in NLP field
EPS32+Platform+Arduino 跑马灯
Pytorch Basics (Introductory)
Hal library learning notes-11 I2C
低成本2.4GHz 无线收发芯片--Ci24R1
Torch. NN. Parameter() function understanding
Hal library learning notes-13 application of I2C and SPI
【RoboMaster】从零开始控制RM电机(2)-CAN通信原理及电调通信协议
Error importing Spacy module - oserror: [e941] can't find model 'en'
FPGA based: moving target detection (supplementary simulation results, available)
Pytorch's data reading mechanism
Hal library learning notes - 8 use of serial communication
【软件工程之美 - 专栏笔记】21 | 架构设计:普通程序员也能实现复杂系统?
智能温度控制系统
基于DAC0832的直流电机控制系统
基于STM32:情侣互动玩偶(设计方案+源码+3D图纸+AD电路)
DP1332E 多协议高度集成非接触式读写芯片