Regression Flashcards

1
Q

Simple Linear Regression

A

y = w0 + w1x
for each point yi = w0 + w1
xi + e1
RSS(w0,w1) = sum(yi-(w0+w1*xi))^2

Goal: find weights that minimize RSS
w0,w1 = arg min RSS(w0,w1)
= arg min sum(yi - (w0+w1*xi))^2

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

Compute Best Weights

A

1) Gradient RSS to zero
2) Gradient descent
w^(t+1) = w^(t)- n * grad(RSS(w^t))
-2 * sum(yi - (w0+w1xi))
-2 * sum(yi - (w0+w1
xi))*xi

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

Multiple Linear Regression

A

y = w0 + sum(wj*xj) + e
RSS
Gradient descent
w^(t+1) = w^(t) + 2n * sum(yi - sum(wj * hj(xi))^2)

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

R2

A

TSS = sum (yi - y’)^2
R2 = 1 - RSS/TSS
How well the regression line approximates the real data points.
R2 = 1 perfect

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

Model Evaluation

A

Using data not used for building model

Holdout 1/2 or 2/3

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

Cross Validation

A

1) Data split into k
2) Subset turn is used for testing and remainder for test
Often stratified

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

Overfitting

A
Ridge (L2)
	Cost(w) = RSS + alpha * (||w||_2)^2
	Gradient wj = -2 * sum(hj(xi)(yi-yi’*(w^t))) + 2*alpha*wj
Lasso (L1)
	Cost(w) = RSS + alpha * ||w||_1
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Choosing alpha

A

Validation Set

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