AI/딥러닝의 기본
ML lec 02 - Linear Regression의 Hypothesis 와 cost 설명
만능성구
2020. 4. 22. 14:11
728x90
(Linear) Hypothesis
H(x) = Wx + b
W와 b에 따라 가설이 결정된다.
Which hypothesis is better?
차이가 적을 때!
Cost function (Loss function)
$H(x) - y$
How fit the line to our(training) data
$(H(x) - y)^2$ 차이를 더 잘 알 수 있다!
$cost = {\sum_{i=1}^{m} {(H(x^{(i)}) - y^{(i)}) ^2}}$
여기에 $H(x) = Wx + b$ 을 적용하면
$${cost(W, b)} = {{1}\over{m}} {\sum_{i=1}^{m} {(H(x^{(i)}) - y^{(i)}) ^2}}$$
Goal : Minimize cost
minimize cost(W,b)
728x90