Artificial Intelligence/Studying

Logistic regression

geum 2020. 12. 29. 23:08

[๋ถ€์ŠคํŠธ์ฝ”์Šค] ํ…์„œํ”Œ๋กœ์šฐ๋กœ ์‹œ์ž‘ํ•˜๋Š” ๋”ฅ๋Ÿฌ๋‹ ๊ธฐ์ดˆ

 

Classification

binary classification : variable is either 0 or 1

 

 

Logistic vs Linear

 

์ถœ์ฒ˜ : ๋ถ€์ŠคํŠธ์ฝ”์Šค Lec 05-1 ๊ฐ•์˜ ์ž๋ฃŒ - logistic vs linear

- Logistic regression์„ ์ ์šฉํ•˜๊ธฐ ์œ„ํ•œ ๋ฐ์ดํ„ฐ๋“ค์€ ์ด์‚ฐ์ (๊ตฌ๋ถ„์ด ๋ช…ํ™•ํ•จ)

- Linear regression์€ ์—ฐ์†์ 

- 0, 1 ํ˜•ํƒœ๋กœ ๊ฐ’์„ ์–ป๊ณ  ์‹ถ์„ ๋•Œ Linear regression์€ ๋ฐ”๋กœ ์–ป์„ ์ˆ˜ ์—†๊ณ  ๋‹ค๋ฅธ ์‹์„ ํ•„์š”๋กœ ํ•จ

 

 

Sigmoid(Logistic) function

 

์ถœ์ฒ˜ : ๋ถ€์ŠคํŠธ์ฝ”์Šค Lec 05-1 ๊ฐ•์˜ ์ž๋ฃŒ - Sigmoid function

- ์ค‘๊ฐ„ ๊ฐ’์€ 0.5

- ๊ณ„๋‹จ ํ˜•์‹์˜ ํ•จ์ˆ˜๋ฅผ ๋ฏธ๋ถ„์ด ๊ฐ€๋Šฅํ•œ ๊ณก์„  ํ˜•ํƒœ๋กœ ๋ฐ”๊พธ์–ด์ฃผ๋Š” ์—ญํ• 

- Binary classification → ๋งˆ์ง€๋ง‰ ๋ ˆ์ด์–ด ํ™œ์„ฑํ•จ์ˆ˜๋กœ ์‚ฌ์šฉ

 

 

Decision Boundary

์ถœ์ฒ˜ : (์ขŒ) ๋ถ€์ŠคํŠธ์ฝ”์Šค Lec 05-1 ๊ฐ•์˜ ์ž๋ฃŒ (์šฐ) ๋‚˜

- ์ด์ง„ ํด๋ž˜์Šค ๋˜๋Š” ๋‹ค์ค‘ ํด๋ž˜์Šค ๋ถ„๋ฅ˜ ๋ฌธ์ œ์—์„œ ๋ชจ๋ธ์ด ํ•™์Šตํ•œ ํด๋ž˜์Šค ์‚ฌ์ด์˜ ๊ตฌ๋ถ„์„ 

 

 

New cost function for logistic