Machine Learning: Difference between revisions
Jump to navigation
Jump to search
Adamcolton (talk | contribs) |
Adamcolton (talk | contribs) |
||
| Line 43: | Line 43: | ||
=== Gradient Descent for Linear Regression === | === Gradient Descent for Linear Regression === | ||
* Θ<sub>0</sub> = Θ<sub>0</sub> - α(1/m) Σ<sup>m</sup> (h<sub>Θ</sub>(x<sub>i</sub>) - y<sub>i</sub>) | |||
* Θ<sub>1</sub> = Θ<sub>1</sub> - α(1/m) Σ<sup>m</sup> (h<sub>Θ</sub>(x<sub>i</sub>) - y<sub>i</sub>) * x<sub>i</sub> | |||
[[Category:Notes]] | [[Category:Notes]] | ||
Revision as of 00:32, 29 April 2013
Week 1 - Intro
What is Machine Learning
- Checkers playing computer (Arthur Samuel)
Supervised Learning
Right answer is provided. Types of problems
- Regression
- Classification
Unsupervised Learning
The data has no "correct answer"
Cocktail party algorithm
Week 1 - Linear Regression with One variable
Model Representation
Working with housing prices in Portland as our dataset.
Symbols used
- m - number of training examples
- x - input variables
- y - output variable
- h - hypothesis (function h(x) = y)
Univariate linear regression
Cost Function
hΘ(x) = Θ0 + Θ1x
sum of square error as our cost function. He's using 1/2m rather than 1/m, I'm not sure why.
Cost Function - Intuition : 1
Demo of technique.
Cost Function - Intuition : 2
Contour plots.
Gradient Descent
Θj = Θj - α (d/dΘj) * J(Θ0, Θ1)
Gradient Descent Intuition
Explaining gradient descent.
Gradient Descent for Linear Regression
- Θ0 = Θ0 - α(1/m) Σm (hΘ(xi) - yi)
- Θ1 = Θ1 - α(1/m) Σm (hΘ(xi) - yi) * xi