이전 시간에 배웠듯이 linear model은 오직 하나의 global optima를 가지므로,
linear model임이 확정된다면, 미분값 0인 지점을 단순 계산으로 찾아 J(β)가 최소인 지점을 정의하는 것이 가능하다!
As linear models always have a global optima (no local optima), we can use a nice way to get parameters without iterations.



이 두 장의 슬라이드는 잘 이해가 가지 않지만
어쩌겟습니까? 암튼 중요한 건 다음 부분임
(your brain power may be a burden)
cost function J(β)를 β에 대해 미분한 값, 즉
임을 알았으며,
이 값이 0이 되는 β는 다음과 같이 찾을 수 있다!
| Gradient Descent | Normal Equation | |
|---|---|---|
| 방식 | iteration 사용 | 단순 계산 |
| 학습률 | 좋은 학습률을 찾아야 함 | 없어도 됨 |
| feature 수 | 많으면 좋음 | 많으면 계산 어려움 (적어야 좋음) |
| non-invertible 여부 | 상관없음 | 가 invertible이어야 함 |

단순히 feature 수를 늘린다고 좋은 모델이 되는 것은 아님!
Overfitting의 위험이 존재하기 때문.
한마디로 학습 데이터에 대하여 과하게 학습한 나머지 실제 데이터에 대한 오차는 증가하는 현상! 노란 고양이 데이터로 고양이의 특성을 학습한 알고리즘이 하얀 고양이는 고양이로 인식하지 못하는 경우를 예로 들 수 있다.
그럼 feature 개수를 늘리는 것 말고
최적화를 위한 다른 방안은 없을까!?
한글로 어케 번역해야 할지 모르겠지만
error값을 더 많이 반영하도록 한다 정도면 되지 않을까!
가중치: 개별 구성요소가 차지하는 비중이나 중요도를 나타내는 수치
아 exp란 거 이번에 처음 알았어...
밴드 너비 고려할 이웃의 개수! 그래프의 폭 조정!


한마디로,

파란 그래프: represents from which the data were generated
주황 그래프: corresponds to the local regression estimate
초록색 종 모양: indicates weights assigned to each point
주황색 점: the fitted value at
주황색 선분 (기울기): the fit at obtained by fitting a weighted linear regression
The number of parameters is fixed! (The form of mapping function is defined before training starts)
ex) Linear regression, Logistic regression, Neural networks
The number of parameters can grow or shrink depending on the amount(size) of training data! (The form of mapping function is NOT defined)
ex) Locally weighted linear regression, Decision tree, random forest, k-NN