Gradient Descent Flashcards

1
Q

What is Gradient Descent?

A

Gradient Descent is an iterative solution that incrementally steps towards an optimal solution.

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

Highlevel steps of Gradient Descent

A
  1. Start with an initial guess
  2. Improve the guess one step at a time..
  3. …until it finds an optimal solution or reaches the maximum number of steps.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

In linear regression, Gradient Descent estimates ___________________ and ________________ to minimize ____________________

A
  1. Intercept
  2. Slope
  3. Sum of squared residuals
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Loss or _________ function

A

cost

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

What is Loss function in Linear regression

A

Since the goal is to minimize SSR, it’s a type of Loss or cost function.

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

What is Loss or cost function

A

The terms loss or cost function refer to anything we want to optimize when we fit a model to data. In linear regression, the cost/loss function is SSR/MSE. That being said, some people refer to Loss function when the function is applied to only one data point. And Cost function when the function is applied all of the data.

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

What is tangent line

A

Tangent line touches the curve at a single point and doesn’t intersect with it.

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

Derivation of Gradient descent

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

Intercept and slope are called _____________ in machine learning

A

Parameters

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

How do you calculate step size?

A

step size = derivate * learning rate

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

What is learning rate?

A

The learning rate prevents us from taking step that are too big and skipping past the lowest point in the curve.

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

How is learning rate determined for Gradient descent?

A

For Gradient Descent, the learning rate is determined automatically. It starts with relatively large and gets smaller with every step.

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

Apart from default learning rate in gradient descent, what approach can you use?

A

You can use cross validation to determine good learning rate.

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

What is cross validation?

A

Cross validation is a technique used in machine learning to evaluate the performance of a model on unseen data.

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

What is the relationship between derivative and learning rate

A

The magnitude of the derivative is proportional to how big of a step we should take toward the minimum. The +/- tells us the direction.

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

What is the maximum number of steps usually set to?

A

1000

17
Q

The smaller the slope means ________

A

We are getting closer to the optimal value since the slope of the tangent line is not as steep as before

18
Q

When we are optimizing both slope and intercept, we get _____ of the SSR

A

3D graph
1. X- intercept
2. Y - SSR
3. Z - slope

19
Q

Gradient descent calculation for two parameters

A