ML with Tensorflow - GitHub Pageshunkim.github.io/ml/lec6.pdfML with Tensorflow Author: Sung Kim...

31
Lecture 6-1 Softmax classification: Multinomial classification Sung Kim <[email protected]>

Transcript of ML with Tensorflow - GitHub Pageshunkim.github.io/ml/lec6.pdfML with Tensorflow Author: Sung Kim...

Page 1: ML with Tensorflow - GitHub Pageshunkim.github.io/ml/lec6.pdfML with Tensorflow Author: Sung Kim Created Date: 3/29/2016 7:49:09 AM ...

Lecture 6-1 Softmax classification:

Multinomial classification

Sung Kim <[email protected]>

Page 2: ML with Tensorflow - GitHub Pageshunkim.github.io/ml/lec6.pdfML with Tensorflow Author: Sung Kim Created Date: 3/29/2016 7:49:09 AM ...

Logistic regression

Page 3: ML with Tensorflow - GitHub Pageshunkim.github.io/ml/lec6.pdfML with Tensorflow Author: Sung Kim Created Date: 3/29/2016 7:49:09 AM ...

Logistic regression

Page 4: ML with Tensorflow - GitHub Pageshunkim.github.io/ml/lec6.pdfML with Tensorflow Author: Sung Kim Created Date: 3/29/2016 7:49:09 AM ...

Logistic regression

Page 5: ML with Tensorflow - GitHub Pageshunkim.github.io/ml/lec6.pdfML with Tensorflow Author: Sung Kim Created Date: 3/29/2016 7:49:09 AM ...

Logistic regression

Page 6: ML with Tensorflow - GitHub Pageshunkim.github.io/ml/lec6.pdfML with Tensorflow Author: Sung Kim Created Date: 3/29/2016 7:49:09 AM ...

Logistic regression

Page 7: ML with Tensorflow - GitHub Pageshunkim.github.io/ml/lec6.pdfML with Tensorflow Author: Sung Kim Created Date: 3/29/2016 7:49:09 AM ...

Multinomial classification

x1 (hours) x2 (attendance) y (grade)

10 5 A

9 5 A

3 2 B

2 4 B

11 1 C

Page 8: ML with Tensorflow - GitHub Pageshunkim.github.io/ml/lec6.pdfML with Tensorflow Author: Sung Kim Created Date: 3/29/2016 7:49:09 AM ...

Multinomial classification

Page 9: ML with Tensorflow - GitHub Pageshunkim.github.io/ml/lec6.pdfML with Tensorflow Author: Sung Kim Created Date: 3/29/2016 7:49:09 AM ...

Multinomial classification

Page 10: ML with Tensorflow - GitHub Pageshunkim.github.io/ml/lec6.pdfML with Tensorflow Author: Sung Kim Created Date: 3/29/2016 7:49:09 AM ...

Multinomial classification

Page 11: ML with Tensorflow - GitHub Pageshunkim.github.io/ml/lec6.pdfML with Tensorflow Author: Sung Kim Created Date: 3/29/2016 7:49:09 AM ...

Multinomial classification

Page 12: ML with Tensorflow - GitHub Pageshunkim.github.io/ml/lec6.pdfML with Tensorflow Author: Sung Kim Created Date: 3/29/2016 7:49:09 AM ...

Multinomial classification

Page 13: ML with Tensorflow - GitHub Pageshunkim.github.io/ml/lec6.pdfML with Tensorflow Author: Sung Kim Created Date: 3/29/2016 7:49:09 AM ...

Multinomial classification

Page 14: ML with Tensorflow - GitHub Pageshunkim.github.io/ml/lec6.pdfML with Tensorflow Author: Sung Kim Created Date: 3/29/2016 7:49:09 AM ...

Matrix multiplication

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

Page 15: ML with Tensorflow - GitHub Pageshunkim.github.io/ml/lec6.pdfML with Tensorflow Author: Sung Kim Created Date: 3/29/2016 7:49:09 AM ...

Multinomial classification

Page 16: ML with Tensorflow - GitHub Pageshunkim.github.io/ml/lec6.pdfML with Tensorflow Author: Sung Kim Created Date: 3/29/2016 7:49:09 AM ...

Multinomial classification

Page 17: ML with Tensorflow - GitHub Pageshunkim.github.io/ml/lec6.pdfML with Tensorflow Author: Sung Kim Created Date: 3/29/2016 7:49:09 AM ...

Where is sigmoid?

Page 18: ML with Tensorflow - GitHub Pageshunkim.github.io/ml/lec6.pdfML with Tensorflow Author: Sung Kim Created Date: 3/29/2016 7:49:09 AM ...

Lecture 6-2 Softmax classification:

softmax and cost function

Sung Kim <[email protected]>

Page 19: ML with Tensorflow - GitHub Pageshunkim.github.io/ml/lec6.pdfML with Tensorflow Author: Sung Kim Created Date: 3/29/2016 7:49:09 AM ...

Where is sigmoid?

Page 20: ML with Tensorflow - GitHub Pageshunkim.github.io/ml/lec6.pdfML with Tensorflow Author: Sung Kim Created Date: 3/29/2016 7:49:09 AM ...

Where is sigmoid?

Page 21: ML with Tensorflow - GitHub Pageshunkim.github.io/ml/lec6.pdfML with Tensorflow Author: Sung Kim Created Date: 3/29/2016 7:49:09 AM ...

Sigmoid?

https://www.udacity.com/course/viewer#!/c-ud730/l-6370362152/m-6379811817

Page 22: ML with Tensorflow - GitHub Pageshunkim.github.io/ml/lec6.pdfML with Tensorflow Author: Sung Kim Created Date: 3/29/2016 7:49:09 AM ...

https://www.udacity.com/course/viewer#!/c-ud730/l-6370362152/m-6379811817

Page 23: ML with Tensorflow - GitHub Pageshunkim.github.io/ml/lec6.pdfML with Tensorflow Author: Sung Kim Created Date: 3/29/2016 7:49:09 AM ...

https://www.udacity.com/course/viewer#!/c-ud730/l-6370362152/m-6379811817

Page 24: ML with Tensorflow - GitHub Pageshunkim.github.io/ml/lec6.pdfML with Tensorflow Author: Sung Kim Created Date: 3/29/2016 7:49:09 AM ...

Cost function

https://www.udacity.com/course/viewer#!/c-ud730/l-6370362152/m-6379811817

Page 25: ML with Tensorflow - GitHub Pageshunkim.github.io/ml/lec6.pdfML with Tensorflow Author: Sung Kim Created Date: 3/29/2016 7:49:09 AM ...

Cross-entropy cost function

Page 26: ML with Tensorflow - GitHub Pageshunkim.github.io/ml/lec6.pdfML with Tensorflow Author: Sung Kim Created Date: 3/29/2016 7:49:09 AM ...

Cross-entropy cost function

Page 27: ML with Tensorflow - GitHub Pageshunkim.github.io/ml/lec6.pdfML with Tensorflow Author: Sung Kim Created Date: 3/29/2016 7:49:09 AM ...

Cross-entropy cost function

Page 28: ML with Tensorflow - GitHub Pageshunkim.github.io/ml/lec6.pdfML with Tensorflow Author: Sung Kim Created Date: 3/29/2016 7:49:09 AM ...

Logistic cost VS cross entropy

cost(H(x), y) = ylog(H(x))� (1� y)log(1�H(x)) c

Page 29: ML with Tensorflow - GitHub Pageshunkim.github.io/ml/lec6.pdfML with Tensorflow Author: Sung Kim Created Date: 3/29/2016 7:49:09 AM ...

Cost function

https://www.udacity.com/course/viewer#!/c-ud730/l-6370362152/m-6379811817

Page 30: ML with Tensorflow - GitHub Pageshunkim.github.io/ml/lec6.pdfML with Tensorflow Author: Sung Kim Created Date: 3/29/2016 7:49:09 AM ...

https://www.udacity.com/course/viewer#!/c-ud730/l-6370362152/m-6379811827

Gradient descent

Page 31: ML with Tensorflow - GitHub Pageshunkim.github.io/ml/lec6.pdfML with Tensorflow Author: Sung Kim Created Date: 3/29/2016 7:49:09 AM ...

Next

Applications & Tips