linear regression Flashcards

(39 cards)

1
Q

What is supervised learning?

A

Learning from labelled examples.

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

What is the key characteristic of supervised learning?

A

It uses input-output pairs to learn a mapping.

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

What is unsupervised learning?

A

Learning patterns from unlabelled data.

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

What is the goal of unsupervised learning?

A

To find structure in data.

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

What is reinforcement learning?

A

Learning by trial and error using rewards.

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

What makes reinforcement learning different?

A

It uses feedback from actions instead of fixed labels.

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

What are the three components of a supervised learning model?

A

Model type, cost function, optimizer.

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

What does the model type determine?

A

How predictions are made.

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

What does the cost function do?

A

Measures prediction error.

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

What is the role of the optimizer?

A

Updates parameters to reduce error.

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

What is a parametric model?

A

A model with a fixed number of parameters.

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

What is a non-parametric model?

A

A model that adapts its complexity to the data.

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

What is the first step in training a model?

A

Initialize the model.

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

What happens after making predictions?

A

Calculate the cost.

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

When does training stop?

A

When a stopping condition is met.

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

What kind of task is linear regression used for?

A

Regression (predicting continuous values).

17
Q

What is the simple linear regression formula?

A

h(x) = θ₀ + θ₁x

18
Q

What is the vector form of linear regression?

A

h(x) = θᵀx

19
Q

What is the purpose of the bias term in x?

A

To allow the model to shift the line vertically.

20
Q

What are the features in the gem price example?

A

Weight and purity.

21
Q

What is the output in the gem price example?

A

Price of the gem.

22
Q

How do we compute the prediction?

A

Multiply features by weights and add the bias.

23
Q

What is the cost function used in linear regression?

A

Mean Squared Error (MSE).

24
Q

What is the formula for MSE?

A

J(θ) = (1/2m) ∑(h(xᵢ) - yᵢ)²

25
Why is there a 1/2 in the MSE formula?
To simplify differentiation.
26
What does the cost function measure?
How far predictions are from actual values.
27
What is gradient descent used for?
Minimizing the cost function.
28
What is the gradient descent update rule?
θⱼ := θⱼ - α * ∂J/∂θⱼ
29
What does the learning rate α control?
How big the update steps are.
30
What happens if α is too small?
Slow learning.
31
What happens if α is too large?
Overshooting or divergence.
32
When do we stop gradient descent?
When cost stabilizes or after max iterations.
33
What were the initial θ values in the example?
[2, 2, 2]
34
What were the initial predictions in the example?
32, 106, 32
35
How was cost calculated in the example?
Using MSE with predictions vs. actual prices.
36
What was the result of the first update?
Parameters changed slightly to reduce cost.
37
What are the key training steps?
Define hypothesis, choose cost, optimize.
38
Why use vectorization in ML?
To speed up computation.
39
What is the goal of training the model?
Minimize the cost function.