Regression Flashcards

Includes simple and multiple linear regression, gradient descent algorithm, overfitting and underfitting.

1
Q

What is regression?

A

It is the process of determining the relation between one or more independent variables and the output variable is continuous.
eg: house price prediction, used car price prediction, mark prediction etc.

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

What are the types of regression?

A
  1. Simple linear regression
  2. Multiple Linear regression
  3. Polynomial regression
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is simple linear regression?

A

In simple linear regression, there is only one independent variable and one dependent variable.

If x is the independent variable and y is the dependent variable, then, the relation between x and y can be modeled by:
y=a+bx

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

What is Multiple Linear Regression?

A

Here, we assume that there are N independent variables and one dependent variable. So, the value of the dependent variable can be predicted from the N independent variables. It is represented as:
y=Oo+O1x1+O2x2+…+Onxn

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

What is polynomial regression?

A

Let x be the predictor variable and y be the dependent variable. Then, the polynomial regression can be applied as follows:
y=a0+a1x+a2x^2+…+anx^n

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

What is the Gradient Descent Algorithm?

A

Gradient descent is an optimization algorithm that minimizes the cost function in linear regression. It’s a first-order iterative algorithm that finds a local minimum or maximum of a function.

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

What are the steps involved in the Gradient Descent Algorithm?

A
  1. Initialize b0 =0, b1=0, l=.01
  2. find the derivative of the cost function(MSE) w.r.t b0 and b1.
  3. Update b0=b0-lDb0.
    and b1=b1-lDb1
  4. Find the MSE. Repeat till MSE~0
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Explain overfitting in regression?

A

Overfitting occurs when the model is trained too well on the training data, such that it even captures the noise and the fluctuations present in the data along with the underlying patterns.

As a result, The model performs too well in training data but fails to generalize effectively on new unseen data.

In the context of regression, overfitting can be explained with the following points:
1. capturing noise.
2. High variance.
3. Poor Generalization.

The overfitting In regression can be prevented by the following steps:

  1. Regularization
  2. cross-validation
  3. Feature Selection
  4. Increasing data size
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is logistic regression?

A

It is used when the dependent variable is binary. Logistic regression uses a logistic function, also called the sigmoid function, to map real-valued numbers into values between 0 and 1. The S-shaped curve formed by the logistic function is called the sigmoid function.

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