Week 2 Flashcards

1
Q

How do we minimise the error on a regression?

A

Minimise the MSE by optimising B0 and B1, the y intercept and the slope.

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

What is an overdetermined linear system

A

More equations than unknowns.

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

Describe the Linear Least Squares method

A

Create a function of the sum of all the squared errors for each of the x and y values.

Perform partial derivatives for each variable, then set them to 0 and solve the simultaneous equations.

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

Explained variation vs unexplained variation

A

Explained variation is difference between your graph (x,y) and the mean of Y at x.

Unexplained is the difference between your graph (x,y) and the true value of Y at X.

Total variation is the sum

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

We can use our models for prediction. What else can we use them for?

A

Interpretation to gain insights from the data.

e.g.
Gather x,y, train model by finding lambda that gives best prediction
Focus on lambda rather than yp to generate insights
(understand what makes cars safer for example)

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

How do we enhance the linear regression model?

A

Use polynomials to fit the curvature of the data (they help to find variables that explain variations in data better)

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

Why is Polynomial still linear?

A

As the outcome is a linear combination of features

The non-linear relationship between one feature and another doesn’t make the algorithm non-linear, it is the algorithm itself that is still a linear combination of features.

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

How do we choose the order of polynomial models?

A

Using Bayes Information Criterion
BIC = nln(SSe) - nln(n) + ln(n)p

p is number of parameters
n is number of observations
ln is the natural log
SSe is sum of squared error.

Minimise it to balance error and generalisability

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

What is an interaction term

A

Combining variables if both happen at the same time (like smoking and having lung cancer)

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

How do we sample appropriately when doing cross validation?

A

Not random sampling, stratified.

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

Whats stratified sampling

A

Stratified sampling is a sampling technique where the samples are selected in the same proportion as
they appear in the population.

For example, if the population of interest has 60% CEOs and 40% CTOs, then we divide the
population into 2 groups and choose 60% from the CEO group and 40% from the CTO group.

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