Skip to content
Snippets Groups Projects
Commit 1f2b5098 authored by Felix Matthias Krumm's avatar Felix Matthias Krumm
Browse files

Merge branch 'fix-remaining-svm-issues' into 'main'

Resolve "Explain non trivial formulars & maths"

Closes #108 and #105

See merge request !130
parents 82b0a1d2 3dcdf819
No related branches found
No related tags found
1 merge request!130Resolve "Explain non trivial formulars & maths"
Pipeline #93984 passed
book/src/AI-Models/Support-Vector-Machine/SVM-Margin.png

191 KiB

......@@ -32,20 +32,27 @@ $$\{(x_i,y_i) | i = 1,...,m; y_i \in \{-1,1\}\}$$
and builds a hyperplane which tries its best to separate the two classes.
The hyperplane is build by a normal vector \\(w\\) trough the origin. Perpendicular to this are the hyperplanes with a set distance from the origin called bias
The hyperplane is build by a normal vector \\(w\\) trough the origin. Perpendicular to this are the hyperplanes with a set distance from the origin called bias or offset. For this distance we will take a fixed initial bias and divide it by the norm of the normal vector.
$$ \frac{b}{||w||_2} $$
$$ \frac{b}{||w||} $$
With this we have unique hyperplane where its points have the characteristics of.
With this we have unique hyperplane based on the normal vector and the bias where each point of the hyperplane \\(x\\) satisfies the following condition. Each point paired with the normal vector - bias is 0.
$$ \langle w,x \rangle + b = 0 $$
$$ (w*x) - b = 0 $$
All points, which position are not on the hyperplane the value is either positive or negative respective to its class.
To now find this Hyperplane we say that the labels for our training data are \\(y_i = \pm1\\)
Therefore the following formal condition is given:
$$ y_i = sgn(\langle w,x_i \rangle +b) $$
$$ y_i = sigmoid((w*x) - b) $$
We now use the formula of the hyperplane and plug the output into a sigmoid function to get a result between 0 and 1.
Here is a visualized example to help you understand the different parameters of the hyperplane.
![Margin](./SVM-Margin.png)
Source: <https://commons.wikimedia.org/wiki/File:SVM_margin.png>
Furthermore the hyperplanes should be positioned to have the biggest margin possible, therefore the closest points to the hyperplane are used as support vectors for training which should give us the best combination for \\(w\\) and \\(b\\). After that the hyperplane can simply be used as a decision function.
......
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment