machine learning pt.2
Regression model and regulation
This post is about linear regression and regulation part.
- 전체적인 경향을 판단할 수 있는 지표 혹은 수치는 weight의 크기라 할 수 있다. (the index to identify overall tendency is
the size of weightbecause the overfitting occurs if the data of training test is lessened.) - using the value of weight, repeat the training of the machine.
- the regulation to restrain the modeling complexity
Summary of this post
Linear |
Ridge |
Lasso |
Elastic Net |
|
|---|---|---|---|---|
| hypo | <—- | wx + b | —- | —-> |
| cost | 오차항 | 오차항 + L2 Norm | 오차항 + L1 Norm | 오차항 + L1 Norm + L2 Norm |
L1 norm and L2 norm regulation — for model handling
L1 Norm = $\displaystyle \sum |w|$
L2 Norm = $\displaystyle \sum w^2$
Linear Regression
- relatively simple model
- the hypothesis of linear regression (for the correlation between X and Y) => wx + b
미지수가 많은 경우, 해가 무수히 많다.라는 말은 새로운 데이터가 입력되었을 때 무엇인지 정확하게 예측하기 어렵다와 같은 말.학습데이터는 잘 예측하지만 새로운 데이터가 추가되면 예측도가 떨어지는 것이므로 overfitting이 발생하기 쉽다.
when the number ofweightin linear regression, the regulation is necessary.
the more the number of weight is added, the more complex the model.