[Advanced Classification] part 5 - 2

2023. 1. 19. 14:45
๐Ÿง‘๐Ÿป‍๐Ÿ’ป์šฉ์–ด ์ •๋ฆฌ

Hard Margin SVM
Sample Constraints
SVM Primal problem

 

Hard Margin SVM

 

support vector ๊ฐ’๋“ค์— ์˜ํ•ด์„œ hypothesis h(x) ๊ฐ€ ์–ด๋–ป๊ฒŒ ๊ฒฐ์ •์ด ๋˜๋Š”์ง€์— ๋Œ€ํ•ด์„œ ๋ด…์‹œ๋‹ค.

 

์œ„ ์‹์„ ์ฐธ๊ณ ํ•˜์—ฌ ์•„๋ž˜ ์„ค๋ช…์„ ๋ณด์ž.

 

h(x) = W^T x + b >= 1 for y = 1

 

h(x) = W^T x + b >= -1 for y = -1

์—์„œ ๋ณด๋ฉด, 

y ( W^T x + b ) >= 1 for all samples์ธ ๊ฒƒ์„ ์•Œ ์ˆ˜ ์žˆ๋‹ค.

 

 

๐Ÿ’ก ์ด์™€ ๊ฐ™์€ ๊ฒƒ์„ SVM์—์„œ์˜ Sample Constraints๋ผ๊ณ  ํ•˜๊ฒŒ ๋ฉ๋‹ˆ๋‹ค.

 

์ถœ์ฒ˜ :   https://www.saedsayad.com/support_vector_machine.htm

 

 

๊ฒฐ๊ตญ, margin์„ maximizationํ•˜๊ธฐ ์œ„ํ•ด์„œ๋Š” ||W||์˜ ๊ฐ’์„ minimizationํ•˜๋Š” ๊ฒƒ๊ณผ ๊ฐ™์€ ๊ฒƒ์ž…๋‹ˆ๋‹ค.

 

๋ฐ”๋กœ minimizationํ•˜๋Š” ๊ฒƒ์€ ๊ณ„์‚ฐ ์ƒ ์–ด๋ ค์›€์„ ๊ฒช์œผ๋ฏ€๋กœ, ||W||^2์„ minimizationํ•˜๋Š” ๋ฌธ์ œ์™€ ๋™์ผํ•ฉ๋‹ˆ๋‹ค.

 

์ด๋Ÿฌํ•œ ๋ฌธ์ œ๋ฅผ

SVM Primal problem

์ด๋ผ๊ณ  ํ•ฉ๋‹ˆ๋‹ค.

 

ํ•˜๋‚˜์˜ ์ตœ์ ํ™” ๋ฌธ์ œ๋ฅผ ๋งŒ๋“  ๊ฒƒ์ž…๋‹ˆ๋‹ค.

 

๊ฒฐ๊ตญ,

 

y ( W^T x + b ) >= 1 for all samples์™€ ๊ฐ™์€ constrained๋ฅผ ๊ฐ€์ง‘๋‹ˆ๋‹ค. constrained optimization

 

 

 

๋งŒ์•ฝ data sample ๋“ค์ด ์„œ๋กœ ๊ฐ„์˜ linearly separableํ•˜์ง€ ์•Š๋‹ค๋ฉด, ์•ž์„œ ์„ค์ •ํ•œ hyper plane์œผ๋กœ Sample๋“ค์„ ๊ตฌ๋ถ„ํ•  ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค.

 

 

์ด๋•Œ ์‚ฌ์šฉํ•˜๋Š” ๊ฒƒ์ด,

 

Kernel ํ•จ์ˆ˜

 

์ž…๋‹ˆ๋‹ค.

 

 

-> linearly separable ํ•˜์ง€ ์•Š์€ data sample๋“ค์ด ์žˆ๋‹ค๊ณ  ํ•  ๋•Œ, linearly separableํ•˜๊ฒŒ ๋งŒ๋“œ๋Š” ๊ณผ์ •์ž…๋‹ˆ๋‹ค.

 

์ถœ์ฒ˜: https://medium.com/@zxr.nju/what-is-the-kernel-trick-why-is-it-important-98a98db0961d

 

์ด๋•Œ, decision surface๊ฐ€ 2์ฐจ์› hyper plane์œผ๋กœ ๊ตฌ์„ฑ ๋˜์–ด์„œ ๊ตฌ๋ถ„ํ•ฉ๋‹ˆ๋‹ค.

 

 

- polynomial kernel

- Gausiian radial basis function(RBF)

- Hyperbolic tangent (multilayer perceptron kernel)

 

์œ ์ €๊ฐ€ ์ง์ ‘ ์„ ํƒํ•˜์—ฌ ์„œ๋กœ ๋‹ค๋ฅธ ํ˜•ํƒœ๋กœ mapping ๊ฐ€๋Šฅํ•˜๋‹ค.

 

 

 

 

 

 

 

 

 

 

 

 

'Artificial Intelligence' ์นดํ…Œ๊ณ ๋ฆฌ์˜ ๋‹ค๋ฅธ ๊ธ€

[Ensemble Learning] part 6 - 1  (0) 2023.01.20
[Advanced Classification] part 5 - 3  (0) 2023.01.19
[Advanced Classification] part 5 - 1  (0) 2023.01.19
[Linear Classification] part 4 - 3  (0) 2023.01.19
[Linear Classification] part 4 - 2  (0) 2023.01.19

BELATED ARTICLES

more