Lecture 2 Flashcards

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?

A

actual

20
Q

What does H(x_i) stand for?

A

predicted

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
Q

What does L stand for?

A

loss for a single point

26
Q

What does R stand for?

A

average loss over all points; empirical risk

27
Q

What is the notation for mean squared error?

A

R_sq(h)

28
Q

What is the summation notation for mean squared error?

A

R_sq(h) = 1/n En i=1 (y_i - h)^2

29
Q

What is the first step of minimizing our loss?

A

take its derivative with respect to h

29
Q

What does h* stand for?

A

the best prediction

30
Q

What is the second step of minimizing our loss?

A

set it equal to 0

31
Q

What is the third step of minimizing our loss?

A

solve for the resulting h*

32
Q

What is the final step of minimizing our loss?

A

perform a second derivative test to ensure we found a minimum

33
Q

What is the derivative of x^n?

A

d/dx x^n = nxn^n-1

34
Q

What is the derivative of f(g(x))?

A

d/dx (f(g(x))) = fā€™(g(x)) * gā€™(x)

35
Q

What is the derivative of (y_i - h)^2?

A

2(h - y_i)

36
Q

What is the total derivative of R_sq(h)?

A

-2/n En i=1 (y_i - h)

37
Q
A
38
Q

What is h* of R_sq(h)?

A

1/n En i=1 y_i; the mean

39
Q

What shape is R_sq(h)?

A

convex

40
Q

If R_sq(h) opens upwards, what is h*?

A

it is a minimum

41
Q

What is the best constant prediction in terms of the mean squared error?

A

the mean

42
Q

What is h* the solution to?

A

an optimization problem

43
Q

What is the first step of the modeling recipe?

A

choose a model

44
Q

What is the second step of the modeling recipe?

A

choose a loss function

45
Q

What is the third step of the modeling recipe?

A

minimize average loss to find optimal model parameters