Lecture 2 Flashcards

(46 cards)

1
Q

What is x?

A

feature or independent variable

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is y?

A

target or dependent variable

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What do we use x for?

A

to predict y

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

How is the ith observation denoted?

A

(x_i, y_i)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is H?

A

the hypothesis function

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What does the hypothesis function do?

A

takes in an x as input and returns a predicted y

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What are parameters?

A

define the relationship between the input and output of a hypothesis function

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is the constant model?

A

H(x) = h

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

How many parameters does the constant model have?

A

one: h

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

How do we calculate the mean?

A

adding all the numbers in our set up and divide by n numbers

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

How do we calculate the median?

A

sort our numbers in ascending order and take the middle number

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What are both the mean and the median?

A

they are summary statistics

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What are summary statistics?

A

they summarize a collection of numbers with a single number

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is a loss function?

A

quantifies how bad a prediction is for a single data point

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What can we say about our loss if our prediction is close to the actual value?

A

that we should have low loss

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What can we say about our loss if our prediction is far from the actual value?

A

that we should have high loss

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

What is error?

A

the difference between actual and predicted values

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

What does y_i - H(x_i) mean?

A

actual - predicted

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

What does y_i stand for?

20
Q

What does H(x_i) stand for?

21
Q

What is the squares loss function?

A

L_sq(y_i, H(x_i)) = (y_i - H(x_i))^2

22
Q

How can we simplify the squared loss function for the constant model?

A

L_sq(y_i, h) = (y_i - h)^2

23
Q

What is the average of squared losses?

A

a single number that describes the quality of our predictions across our entire dataset

24
Q

What is another term for the average squared loss?

A

mean square error (MSE)

25
What does L stand for?
loss for a single point
26
What does R stand for?
average loss over all points; empirical risk
27
What is the notation for mean squared error?
R_sq(h)
28
What is the summation notation for mean squared error?
R_sq(h) = 1/n En i=1 (y_i - h)^2
29
What is the first step of minimizing our loss?
take its derivative with respect to h
29
What does h* stand for?
the best prediction
30
What is the second step of minimizing our loss?
set it equal to 0
31
What is the third step of minimizing our loss?
solve for the resulting h*
32
What is the final step of minimizing our loss?
perform a second derivative test to ensure we found a minimum
33
What is the derivative of x^n?
d/dx x^n = nxn^n-1
34
What is the derivative of f(g(x))?
d/dx (f(g(x))) = f'(g(x)) * g'(x)
35
What is the derivative of (y_i - h)^2?
2(h - y_i)
36
What is the total derivative of R_sq(h)?
-2/n En i=1 (y_i - h)
37
38
What is h* of R_sq(h)?
1/n En i=1 y_i; the mean
39
What shape is R_sq(h)?
convex
40
If R_sq(h) opens upwards, what is h*?
it is a minimum
41
What is the best constant prediction in terms of the mean squared error?
the mean
42
What is h* the solution to?
an optimization problem
43
What is the first step of the modeling recipe?
choose a model
44
What is the second step of the modeling recipe?
choose a loss function
45
What is the third step of the modeling recipe?
minimize average loss to find optimal model parameters