본문 바로가기

Machine Learning

Linear Regression

Hypothesis(가설)

  - H(x) = Wx + b  (W:가중치, b: 바이어스)

Cost Function(가설과 실제의 차이 평균)

  - cost(W,b) = 1/m ∑(H(x^i)-y^i)^2  (i=1 ~ M)

Gradient Descent Algorithm

  - 미분의 기울기를 통한 최적의 점을 구하는 알고리즘

 

multi-variable linear regression의 경우는?

Hypothesis

  - H(x1,x2,x3) = W1x1 + W2x2 + W3x3 + b 

Cost Function

 - cost(W,b) = 1/m ∑(H(x1^i,x2^i,x3^i)-y^i)^2  (i=1 ~ M)

 

다중값일 때 Matrix를 활용

https://www.mathsisfun.com/algebra/matrix-multiplying.html

H(X) = XW   -----   (텐서플로우의 구현에 있어서 위의 그림과 같이 X의 변화에 대해 W 매트릭스를 활용해서 앞에 X를 표기한다)

수학적인 의미는 H(x) = Wx + b 와 같다

'Machine Learning' 카테고리의 다른 글

ML(Machine Learning) tensorflow 설치  (0) 2024.06.21