728x90
Predicting exam score :
regression using three inputs ( x1, x2, x3)

Hypothesis
H(x)=Wx+b
H(x1,x2,x3)=w1x1+w2x2+w3x3+b
Cost function
H(x1,x2,x3)=w1x1+w2x2+w3x3+b
cost(W,b)=1mm∑i=1(H(x(i)1,x(i)2,x(i)3)−y(i))2
Multi-variable
H(x1,x2,x3)=w1x1+w2x2+w3x3+b
H(x1,x2,x3,...,xn)=w1x1+w2x2+w3x3+...+wnxn+b
Hypothesis using matrix
w1x1+w2x2+w3x3
(x1x2x3)⋅(w1w2w3)=(x1w1+x2w2+x3w3)
(x11x12x13x21x22x23x31x32x33x41x42x43x51x52x53)⋅(w1w2w3)=(x11w1x12w2x13w3x21w1x22w2x23w3x31w1x32w2x33w3x41w1x42w2x43w3x51w1x52w2x53w3)
[5,3][3,1][5,1]
[5,3] [?,?] [5,1] [n,3] [3,1] [n,1] <- n= -1 or None
*H(X)=XW *
matrix이용해서 간단하게 연산한다.

[?,?] = [3,2]
WX vs XW
Lecture (theory):
- H(x) = Wx + b
Implementation(TensorFlow)
- H(x) = XW
이론적으로는 위의 모양처럼 쓰이지만 matrix를 쓰기위해 TensorFlow에서는 저런 형태로 사용
728x90
'AI > 딥러닝의 기본' 카테고리의 다른 글
ML lec06 - Softmax Regression(Multinominal Logistic Regression) (0) | 2020.05.20 |
---|---|
ML Lec 5: Logistic Classification (0) | 2020.05.20 |
ML lec 03 - Linear Regression의 cost 최소화 알고리즘의 원리 설명 (0) | 2020.04.22 |
ML lec 02 - Linear Regression의 Hypothesis 와 cost 설명 (0) | 2020.04.22 |
ML lec 01 - 기본적인 Machine Learning 의 용어와 개념 설명 (0) | 2020.04.22 |