[Linear Regression] part 2 - 1

2023. 1. 14. 13:44

๐ŸŽฏ Keyword ๐ŸŽฏ

- linear model
- MSE
- model parameter

 

 

Linear Model

- Hopothesis set H => Input Feature์™€ Model parameter์˜ linear combinations์œผ๋กœ ์ด๋ฃจ์–ด์ ธ ์žˆ์Šต๋‹ˆ๋‹ค.

 

=> ๋‹จ์ˆœํ•˜๋‹ค.

=> ์ž…๋ ฅ์ด ์ถœ๋ ฅ์— ์–ผ๋งˆ๋‚˜ ์˜ํ–ฅ์„ ์ฃผ๋Š”์ง€๋ฅผ ์•Œ ์ˆ˜ ์žˆ๋‹ค.

=> ๋‹ค์–‘ํ•œ ํ™˜๊ฒฝ์—์„œ ์•ˆ์ •์ ์ธ ์„ฑ๋Šฅ ์ œ๊ณต ๊ฐ€๋Šฅ.

 

=> ์„ ํ˜• ๋ชจ๋ธ์ด๋ผ๊ณ  ํ•ด์„œ ๋ฐ˜๋“œ์‹œ ์ž…๋ ฅ ๋ณ€์ˆ˜์— ์„ ํ˜•์ผ ํ•„์š”๋Š” ์—†์Šต๋‹ˆ๋‹ค.

 

 

Regression์€ Supervised Learning ๋ฌธ์ œ์— ํฌํ•จ๋˜๊ธฐ ๋•Œ๋ฌธ์— ์‚ฌ์šฉํ•˜๋Š” data ์ƒ˜ํ”Œ์˜ ๊ตฌ์„ฑ์€ ์ž…๋ ฅ x์™€ ์ถœ๋ ฅ y์˜ pair๋กœ ๊ตฌ์„ฑ๋ฉ๋‹ˆ๋‹ค.

์ด๋•Œ, y๋Š” ์—ฐ์†์ ์ธ ๊ฐ’์ด ๋ฉ๋‹ˆ๋‹ค.

 

ํ•˜๋‚˜์˜ ์ž…๋ ฅ๋ณ€์ˆ˜๋Š” univaritate problem์ด๋ผ๊ณ  ํ•ฉ๋‹ˆ๋‹ค.

 

๋‹ค์–‘ํ•œ ๋ณ€์ˆ˜๋“ค์„ Regression model์— ํฌํ•จํ•˜๋Š” ๊ฒƒ์„ multivariate problem์ด๋ผ๊ณ  ํ•ฉ๋‹ˆ๋‹ค.

=> ์ž…๋ ฅ ๋ณ€์ˆ˜์˜ ๊ฐœ์ˆ˜์— ์ดํ•ด์„œ๋งŒ ๊ฒฐ์ •๋˜๋Š” ์ฐจ์ด์ž…๋‹ˆ๋‹ค.

 

 

Linear Regression์€ "์ฃผ์–ด์ง„ ์ž…๋ ฅ์— ๋Œ€ํ•ด ์ถœ๋ ฅ๊ณผ์˜ ์„ ํ˜•์ ์ธ ๊ด€๊ณ„๋ฅผ ์ถ”๋ก ํ•˜๋Š” ๋ฌธ์ œ"์ž…๋‹ˆ๋‹ค.

  • ์ž…๋ ฅ๊ณผ ์ถœ๋ ฅ ์Œ์œผ๋กœ ์„ ํ˜• ๋ชจ๋ธ์„ ํ•™์Šตํ•˜๊ฒŒ ๋ฉ๋‹ˆ๋‹ค.
  • ์ƒˆ๋กœ์šด ์ž…๋ ฅ์ด ๋ชจ๋ธ์— ๋“ค์–ด๊ฐ”์„ ๋•Œ ์ถœ๋ ฅ์„ ๋‚ด๋†“๋Š” ๋ชจ๋ธ์ž…๋‹ˆ๋‹ค.

 

1. ์–ด๋–ค predictor๋ฅผ ์‚ฌ์šฉํ•  ๊ฒƒ์ธ์ง€?

 

ํ•˜๋‚˜์˜ ์ž…๋ ฅ feature๋ฅผ ์‚ฌ์šฉํ•˜๋Š” Hypothesis๋ฅผ Univariate linear model์ด๋ผ๊ณ  ํ•ฉ๋‹ˆ๋‹ค.

 

์ด ๋•Œ, ์ž…๋ ฅ feature๋Š” ํ•˜๋‚˜์ด์ง€๋งŒ, model parameter๋Š” 2๊ฐœ์ž…๋‹ˆ๋‹ค.

 

 

2. ์–ด๋–ป๊ฒŒ ์˜ค์ฐจ๋ฅผ ์ค„์ผ ๊ฒƒ์ธ๊ฐ€?

Linear model์—์„œ loss๋ฅผ ์ธก์ •ํ•˜๊ธฐ ์œ„ํ•ด MSE(Min Squared Error)๋ฅผ ์‚ฌ์šฉํ•ฉ๋‹ˆ๋‹ค.

=> ๋ชจ๋ธ์˜ ์ถœ๋ ฅ๊ณผ ์ •๋‹ต๊ณผ์˜ ์˜ค์ฐจ์ž…๋‹ˆ๋‹ค.

 

 

3. ์–ด๋–ป๊ฒŒ parameter๋ฅผ ๊ตฌํ•  ๊ฒƒ์ธ๊ฐ€?

-> Gradient Descent Algorithm์ด๋‚˜ Normal equation์„ ์‚ฌ์šฉ.

 

 

์„ ํ˜• ๋ชจ๋ธ์„ ์‚ฌ์šฉํ•˜๊ฒ ๋‹ค๊ณ  ํ•˜๋Š” ์ˆœ๊ฐ„, ๋ชจ๋ธ์˜ ํ˜•ํƒœ๊ฐ€ ์ฃผ์–ด์ง€๋Š” ๊ฒƒ์ž…๋‹ˆ๋‹ค.

loss function ์—ญ์‹œ MSE๋กœ ์‚ฌ์šฉํ•ฉ๋‹ˆ๋‹ค.

 

๊ทธ๋Ÿฌ๋ฏ€๋กœ parameter optimization์— ๋Œ€ํ•ด ์ž์„ธํžˆ ์•Œ์•„๋ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.

 

 

 

 

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

[Gradient Descent] part 2 - 3  (0) 2023.01.14
[Linear Regression] part 2 - 2  (0) 2023.01.14
[Foundation of Supervised Learning] part 1 - 2  (0) 2023.01.12
[Foundation of Supervised Learning] part 1 - 1  (0) 2023.01.12
Deep Learning ๊ธฐ๋ฐ˜ ์ดํ•ด  (0) 2022.02.21

BELATED ARTICLES

more