当前位置:网站首页>20. Support vector machine - knowledge of mathematical principles
20. Support vector machine - knowledge of mathematical principles
2022-07-31 21:12:00 【WuJiaYFN】
Main content
- Inner product of vectors
- Using the properties of vector inner product to understand SVM
- SVM's method for selecting better decision boundaries
First, the inner product of vectors
1.1 Definition and geometric meaning of inner product
- If there are two vectors u and v , u^Tv is called the inner product between the vectors u and v
- Geometric meaning: The inner product of vectors is equivalent to the product of projection lengths
1.2 Euclidean length (norm)
If there is a vector u, ∥u∥ represents the norm norm of u, that is, the Euclidean length of the vector u, which is a real number
According to the Pythagorean theorem, the norm is calculated as follows:
1.3 Two ways to calculate inner product
(1) u^Tv = u1 × v1 + u2 × v2 = v^Tu
(2) First, project v to the u vector, and record its length as p (positive and negative, positive in the same direction as u, negative in the opposite direction, scalar), then the inner product of the two vectors:
u^Tv = ||u|| · ||v|| · cosθ = ||u|| · p
Note: If the angle between the two vectors is greater than 90°, then p is negative, and the inner product of the two vectors is also negative
Second, use the properties of vector inner product to understand SVM
If C is set very large and A is minimized to 0, then the cost function of SVM will be simplified as shown in the following figure:
For ease of understanding, let's simplify the function expression: let θ0 = 0, and then only have two parameters, θ1 and θ2
- **What the support vector machine does is: **minimize the square of the parameter vector norm, or the square of the length
According to the inner product calculation formula, there is θ^Tx = p · ||θ||, where p is the projection of x on θ.Use p^(i) ⋅ ∥θ∥ instead of θTx(i)
Three, SVM method to select a better decision boundary
We assume that the decision boundary is shown as the green line in the left figure above, and we can know that the parameter vector θ is perpendicular to the boundary (the proof process can be found in another blog post of mine)
It is found that for each sample x(1) and x(2), their projection lengths on θ are very small, then in order to satisfy the condition p(i)·||θ|| ≥1 or p(i)·||θ||≤-1, then ||θ|| should take a large value, which contradicts the previous minimization of the cost function (1/2||θ||2);
The support vector machine tries to make p(i) (the distance from the training sample to the decision boundary) large enough to make the norm of θ small (such as the decision boundary in the right figure above - green line)) to minimize the cost function;
This is how SVM produces the phenomenon of large-spacing classification;Simplifying by letting θ0 = 0 means that we let the decision circle pass through the origin. If θ0 ≠ 0, the decision boundary is no more than the origin , and the conclusion that SVM produces a classifier with a large gap is also true (in the case of a particularly large C).
If you think the article is helpful to you, you can give me a thumbs up and encourage me. Welcome friends to collect articles and study
Follow me, let's learn together and make progress together!!!
边栏推荐
- Cache and Database Consistency Solutions
- Made with Flutter and Firebase!counter application
- Efficient Concurrency: A Detailed Explanation of Synchornized's Lock Optimization
- 广汽本田安全体验营:“危险”是最好的老师
- grep command written test questions
- Batch (batch size, full batch, mini batch, online learning), iterations and epochs in deep learning
- BM5 合并k个已排序的链表
- Memblaze released the first enterprise-grade SSD based on long-lasting particles. What is the new value behind it?
- Bika LIMS open source LIMS set - use of SENAITE (detection process)
- Performance optimization: remember a tree search interface optimization idea
猜你喜欢
Arduino框架下STM32全系列开发固件安装指南
Chapter VII
Structure of the actual combat battalion module eight operations
AI automatic code writing plugin Copilot (co-pilot)
高效并发:Synchornized的锁优化详解
NVIDIA已经开始测试AD106和AD107 GPU核心的显卡产品
A shortcut to search for specific character content in idea
Realize serial port receiving data based on STM32 ring queue
leetcode:6135. 图中的最长环【内向基环树 + 最长环板子 + 时间戳】
老牌音乐播放器 WinAmp 发布 5.9 RC1 版:迁移到 VS 2019 完全重建,兼容 Win11
随机推荐
Poker Game in C# -- Introduction and Code Implementation of Blackjack Rules
Douyin fetches video list based on keywords API
Memblaze发布首款基于长存颗粒的企业级SSD,背后有何新价值?
全网一触即发,自媒体人的内容分发全能助手——融媒宝
每月一书(202207):《Swift编程权威指南》
Verilog implements a divide-by-9 with a duty cycle of 5/18
-xms -xmx(information value)
AI automatic code writing plugin Copilot (co-pilot)
linux查看redis版本命令(linux查看mysql版本号)
PCB叠层设计
leetcode 665. Non-decreasing Array
-xms -xmx(information value)
Shell script quick start to actual combat -02
有一说一,外包公司到底值不值得去?
ThreadLocal
多线程之锁
Made with Flutter and Firebase!counter application
Architect 04 - Application Service Encryption Design and Practice
Several methods of mysql backup table
手把手教你学会部署Nestjs项目