Lecture 3 - Linear Regression Flashcards

1
Q

What is Linear Regression?

A

It predicts a value by multiplying the input feature weight, summing them up and adding a bias - REFER TO SLIDES FOR THE FORMULA

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

Linear Regression Example

A

REFER TO ONENOTE

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

What is the Normal Vector and How is it used in the performance measure

A

A mathematical equation that gives the directly -> to find the value of theta that minimises the cost function (MSE) - REFER TO SLIDES FOR FORMULA

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

Linear Regression Code (With Normal Vector Code example)

A

REFER TO ONENOTE

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

What is Gradient Descent?

A

An Optimisation algorithm that is used to tweak parameters iteratively to minimise a cost function (MSE). It mesures the local gradient of the error function with regards to the parameter vecter theta and its goes in the direction of descending gradient. Once the gradient reaches zero its has reached a minimum.

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

Gradient Descent Example (CODE AND MATH)

A

REFER TO SLIDES

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

What are some issues with Gradient Descent?

A

When n (as in the greek letter) is too small there is a slow convergence
When n is too big it can overshoot, it never converges or it can even diverge

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

What are the 3 ways to do Gradient decent?

A

Batch GD
Stochastic GD
Mini-Batch GD

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

What is Batch GD?

A

Uses the whole training set to compute the gradients at every step, which make it very slow when the training set it large

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

What is Stochastic GD?

A

Just picks a random instance in the training set at every step and computes the gradients based only on that single instance. Makes the algorithm much faster since it has very little data to manipulate

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

Example of Batch GD

A

REFER TO SLIDES

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

Example of Stochastic GD

A

REFER TO SLIDES

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

What is Mini-Batch GD?

A

At each step, computes the gradients on small random sets of instances (mini-batches). Get a performance boost from hardware optimization of matrix operations (e.g., vectorisation, GPUs).

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

Example of Mini-Batch GD

A

REFER TO SLIDES

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

What is Polynomial Regression?

A

Similar to Linear Regression but use when data is not a straight line. It shows the relationship with higher degree terms

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

Example of Polynomial Repression

A

REFER TO SLIDES

17
Q

What are Learning Curves?

A

Learning Curves are plots of the model’s performance on the training set and the validation set as a function of the training set size. To generate the plots, train the model several times on different sized subsets of the training set.

18
Q

What is Logistic Regression

A

Logistic Regression (also called Logit Regression) is commonly used to estimate the probability that an instance belongs to a particular class (e.g., what is the probability that this email is spam?).

19
Q

How does a Logistic Regression model make a prediction?

A

A Logistic Regression model computes a weighted sum of the input features (plus a bias term). The probability ˆp estimated by the Logistic Regression - REFER TO SLIDES FOR FORMULA

20
Q

Logistic Regression Example

A

REFER TO SLIDES - LINK TO TRAINING AND COST FUNCTIONS