当前位置:网站首页>机器学习——支持向量机原理
机器学习——支持向量机原理
2022-08-02 05:11:00 【樱花的浪漫】
Support Vector Machine
要解决的问题:什么样的决策边界才是最好的呢?
决策边界:选出来离两个类别的距离最远的决策边界

点到平面的距离的计算


数据标签定义


优化的目标


目标函数
放缩变换:对于决策方程(w,b)可以通过放缩使得其结果值|Y|>= 1
(之前我们认为恒大于0,现在严格了些)


因为后面最小值为1
常规套路:将求解极大值问题转换成极小值问题:![]()
如何求解:应用拉格朗日乘子法求解
拉格朗日乘子法
带约束的优化问题:
原式转换: 
我们的式子: 
(约束条件不要忘: 
分别对w和b求偏导,分别得到两个条件(由于对偶性质)

对w求偏导:
对b求偏导:
SVM求解
带入原始:
其中

完成了第一步求解 ![]()
继续对ɑ求极大值:

条件:
极大值转换成求极小值:
条件:
SVM求解实例
数据:3个点,其中正例 X1(3,3) ,X2(4,3) ,负例X3(1,1)
求解:
约束条件:

原式:

由于:
化简可得:
分别对ɑ1和ɑ2求偏导,偏导等于0可得:
(并不满足约束条件
,所以解应在边界上)

最小值在(0.25,0,0.25)处取得
将ɑ结果带入求解

平面方程为:
支持向量:真正发挥作用的数据点,ɑ值不为0的点,即边界点,非边界点的ɑ值必定为0

soft-margin
软间隔:有时候数据中有一些噪音点,如果考虑它们咱们的线就不太好

新的目标函数:
当C趋近于很大时:意味着分类严格不能有错误
当C趋近于很小时:意味着可以有更大的错误容忍
C是我们需要指定的一个超参数
拉格朗日乘子法:
约束: 

低维不可分问题
核变换:既然低维的时候不可分,那我给它映射到高维呢?
低维不可分问题
(𝑋)
实例:
高斯核函数:



边栏推荐
- Google notes cut hidden plug-in installation impression
- Use the browser's local storage to realize the function of remembering the user name
- How much does a test environment cost? Start with cost and efficiency
- 51单片机外设篇:DS18B20
- swinIR论文阅读笔记
- [PSQL] window function, GROUPING operator
- H5 access payment process - WeChat payment & Alipay payment
- How H5 realizes evoking APP
- 5年在职经验之谈:2年功能测试、3年自动化测试,从入门到不可自拔...
- C language: Check for omissions and fill in vacancies (3)
猜你喜欢

Detailed explanation of interface in Go language

5年在职经验之谈:2年功能测试、3年自动化测试,从入门到不可自拔...

The company does not pay attention to software testing, and the new Ali P8 has written a test case writing specification for us

Stress testing and performance analysis of node projects

程序员写PPT的小技巧

51 MCU Peripherals: Infrared Communication

使用TinkerPop框架对GDB增删改查

51单片机外设篇:DS18B20

MySQL implements sorting according to custom (specified order)

国际顶会OSDI首度收录淘宝系统论文,端云协同智能获大会主旨演讲推荐
随机推荐
Redis数据库
ApiPost 真香真强大,是时候丢掉 Postman、Swagger 了
51单片机外设篇:ADC
What do interview test engineers usually ask?The test supervisor tells you
跨桌面端Web容器演进
21 Day Learning Challenge Schedule
Google Chrome(谷歌浏览器)安装使用
LeetCode brush topic series - 787 K station transfer within the cheapest flight
Integrate ssm (1)
Go language study notes - grpc serverclient protobuf Go language from scratch
MYSQL unique constraint
Redis-cluster mode (master-slave replication mode, sentinel mode, clustering mode)
kubernetes affinity, anti-affinity, taint, tolerance
为什么4个字节的float要比8个字节的long大呢?
对node工程进行压力测试与性能分析
Contents of encoding-indexes.js file printed with Bluetooth:
TikTok平台的两种账户有什么区别?
分布式文件存储服务器之Minio对象存储技术参考指南
构造方法、成员变量、局部变量
el-input can only input integers (including positive numbers, negative numbers, 0) or only integers (including positive numbers, negative numbers, 0) and decimals