当前位置:网站首页>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 .
边栏推荐
- HAL学习笔记 - 7 定时器之高级定时器
- HAL库学习笔记-12 SPI
- 基于wifi的温度采集与控制系统
- EPS32+Platform+Arduino 跑马灯
- 【RoboMaster】A板接收JY-ME01角度传感器数据--modebus协议&CRC软件校验
- Jingwei Qili: OLED character display based on hmep060 (and Fuxi project establishment demonstration)
- HAL库学习笔记-13 I2C和SPI的应用
- 2022春招——上海安路FPGA岗面经(以及乐鑫SOC面试)
- HAL库学习笔记-14 ADC和DAC
- 物联网倾斜监测解决方案
猜你喜欢

From entry to soul: how to use tb6600 single chip microcomputer to control stepping motor with high precision (42/57)

Ml8 self study notes

【软件工程之美 - 专栏笔记】25 | 有哪些方法可以提高开发效率?

【RoboMaster】从零开始控制RM电机(2)-CAN通信原理及电调通信协议

Hal library learning notes-12 SPI

华为云14天鸿蒙设备开发-Day1环境搭建

【软件工程之美 - 专栏笔记】30 | 用好源代码管理工具,让你的协作更高效

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

STM32 printf问题总结 semihosting microLIB理解

QT学习笔记-Qt Model/View
随机推荐
【软件工程之美 - 专栏笔记】29 | 自动化测试:如何把Bug杀死在摇篮里?
TLE5012b+STM32F103C8T6(bluepill)读取角度数据
2022 spring recruit - Shanghai an road FPGA post Manager (and Lexin SOC interview)
Based on stc51: schematic diagram and source code of four axis flight control open source project (entry-level DIY)
HAL库学习笔记-10 HAL库外设驱动框架概述
【软件工程之美 - 专栏笔记】19 | 作为程序员,你应该有产品意识
Power electronics: single inverter design (matlab program +ad schematic diagram)
QT学习笔记-Qt Model/View
QT learning notes QT model/view
基于msp430f2491的proteus仿真
Pit avoidance: about the interconnection of two hc-05 master-slave integrated Bluetooth modules, there is no connection problem
Design and implementation of QT learning notes data management system
倾角传感器精度校准检测
HAL库学习笔记- 9 DMA
JUC并发知识点
基于51单片机的直流电机调速系统(L298的使用)
从头安装MYSQL(MYSQL安装文档-解压版)
【软件工程之美 - 专栏笔记】24 | 技术债务:是继续修修补补凑合着用,还是推翻重来?
EPS32+Platform+Arduino 跑马灯
【软件工程之美 - 专栏笔记】“一问一答”第3期 | 18个软件开发常见问题解决策略