Professional Documents
Culture Documents
I want to list
my house
for sale
$$ ????
price ($)
Terminology:
x feature,
covariate, or
predictor
y observation or
response
Machine
Learning
Specializa0on
price ($)
No house sold
recently had exactly
the same sq.ft.
Machine
Learning
Specializa0on
price ($)
Look at average
price in range
Still only 2 houses!
Throwing out info
from all other sales
Machine
Learning
Specializa0on
Linear regression
price ($)
f(x) = w0+w1 x
square feet (sq.ft.)
10
parameters
of model
Machine
Learning
Specializa0on
price ($)
fw (x) = w0+w1 x
square feet (sq.ft.)
11
function
parameterized by
w = (w0 ,w1 )
Machine
Learning
Specializa0on
Which line?
price ($)
fw (x) = w0+w1 x
dierent parameters w
square feet (sq.ft.)
12
x
Machine
Learning
Specializa0on
price ($)
RSS(w0,w1) =
($house 1-[w0+w1sq.ft.house 1])2
+ ($house 2-[w0+w1sq.ft.house 2])2
+ ($house 3-[w0+w1sq.ft.house 3])2
+ [include all houses]
square feet (sq.ft.)
13
x
Machine
Learning
Specializa0on
price ($)
RSS(w0,w1) =
($house 1-[w0+w1sq.ft.house 1])2
+ ($house 2-[w0+w1sq.ft.house 2])2
+ ($house 3-[w0+w1sq.ft.house 3])2
+ [include all houses]
square feet (sq.ft.)
14
price ($)
15
x
Machine
Learning
Specializa0on
price ($)
You show
your friend
your analysis
Machine
Learning
Specializa0on
price ($)
Dude, its
not a linear
relationship!
square feet (sq.ft.)
18
x
Machine
Learning
Specializa0on
price ($)
Dude, its
not a linear
relationship!
square feet (sq.ft.)
19
x
Machine
Learning
Specializa0on
price ($)
fw(x) = w0 + w1 x+ w2 x2
square feet (sq.ft.)
20
x
Machine
Learning
Specializa0on
price ($)
I can
minimize
your RSS
square feet (sq.ft.)
21
x
Machine
Learning
Specializa0on
price ($)
y
My house
isnt worth
so little
square feet (sq.ft.)
22
x
Machine
Learning
Specializa0on
price ($)
Minimizes RSS,
but bad predictions
x
Machine
Learning
Specializa0on
price ($)
fw(x) = w0 + w1 x+ w2 x2
square feet (sq.ft.)
25
x
Machine
Learning
Specializa0on
Training/test split
Training error
price ($)
Minimize to
find
square feet (sq.ft.)
28
Test error
price ($)
Assess
predictions
using
square feet (sq.ft.)
29
Test error () =
($test 1-f(sq.ft.test 1))2
+ ($test 2-f(sq.ft.test 2))2
+ ($test 3-f(sq.ft.test 3))2
+ [include all
test houses]
x
Machine
Learning
Specializa0on
Error
Training/Test Curves
Model complexity
30
price ($)
Only 1 bathroom!
Not same as my
3 bathrooms
square feet (sq.ft.)
32
x
Machine
Learning
Specializa0on
price ($)
fw(x) = w0 + w1 sq.ft.
+ w2 #bath
x2
x1
Machine
Learning
Specializa0on
35
hard work
hard work
= 0 + 1 performance +
2 capstone + 3 forum
informed by other students who
completed specialization
37
Stock prediction
Predict the price of a stock
Depends on
-Recent history of stock price
-News events
-Related commodities
38
Tweet popularity
How many people will retweet your tweet?
Depends on # followers,
# of followers of followers,
features of text tweeted,
popularity of hashtag,
# of past retweets,
39
Smart houses
Smart houses have many distributed sensors
Whats the temperature at your desk? (no sensor)
- Learn spatial function to predict temp
Also depends on
- Thermostat setting
- Blinds open/closed
or window tint
- Vents
- Temperature outside
- Time of day
40