Notice
Recent Posts
Recent Comments
«   2026/06   »
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30
Tags
more
Archives
Today
Total
관리 메뉴

CogandKim

Machine Learning 머신 러닝 - How to minimize cost 본문

MachineLearning

Machine Learning 머신 러닝 - How to minimize cost

김정출 2016. 7. 11. 22:17


Machine Learning 머신 러닝 - How to minimize cost



관련 포스트

Machine Learning 머신러닝 - ML & Deep Learning

Machine Learning 머신 러닝 - Linear Regression

TensorFlow 설치 및 PyCharm 설치

TensorFlow Linear Regression

TensorFlow Minimize Cost, Gradient Discent Algorithm





Hypothesis and Cost

- H(x) = Wx+b

- cost(W,b)= 1mi=1m(H(x(i))-y(i))2  ( m = num of data)

Simplified hypothesis

- H(x) = Wx

- cost(W)= 1mi=1m(W*x(i)-y(i))2  ( m = num of data)

What cost(W) looks like?

x

y

1

1

2

2

3

3


- W=1, cost(W) = 13((1*1-1)2+(1*2-2)2+(1*3-3)2) =0

- W=0, cost(W) = 4.67

- W=2, cost(W) = 4.67

How to minimize cost? cost(W) => minimize

Gradient descent algorithm

- Minimize cost function

- Gradient descent is used many minimization problems

- For a given cost function cost(W,b), it will find W,b to minimize cost

- It can be applied to more general function : cost(W1, W2, … )

Find m = 0



Reference

Sung Kim https://www.youtube.com/channel/UCML9R2ol-l0Ab9OXoNnr7Lw

Andrew Ng’s ML class

- https://class.coursera.org/ml-003/lecture

- http://www.holehouse.org/mlclass