# Types of Regression in Data Science

The field of Data Science has indicated colossal development in the past decade. The tremendous measures of that are getting created, and the gigantic computational force that advanced PCs have has empowered specialists, and researchers to accomplish momentous outcomes in the field of Data Science, and Artificial Intelligence.In Data Science, one of the key strategies to ace is regression analysis. The elementary step involves learning Linear Regression and Logistic Regression.

There are a few relapse strategies that could apply in Machine Learning. In view of the application, and the ease of use of every relapse procedure has its own significance. This article acquaints you with seven types of Regression that you should know. It expands your insight past the well-known thought of Linear and Logistic Regression.

## What is Regression?

Let us firstly see what is Regression?

In simple words, the statistical techniques used to determine the relationship between a dependent and an independent variable is called regression. This relationship is then used to fit a corresponding line to the independent variable and forecast the dependent variable according to it. Regression has a wide variety of applications. An example of this can be forming an equation from known data of the price of the stock of the previous 5 years to predict the future price of the stock.

## Types of Regression

There are mainly 7 types of regression that we are going to learn in this AI tutorial.

### 1. Linear Regression

The Linear Regression is utilized to build up a connection between an independent and a dependent variable by fitting the model into the best fit. The straight line which obtains upon the best fit is called a regression line.

The objective in Linear Regression is to limit the separation between the real information focuses and the anticipated information focuses i.e., limit the residuals and locate the best-fitted line.

Representation of Linear regression:

**Dependent variable = Intercept + Slope * Independent Variable + Error ()**

### 2. Logistic Regression

In the case of a Linear Regression, when the dependent variable is discrete, it becomes Logistic Regression. Logistic Regression appraises the parameters of a strategic model and is a type of binomial regression. Subsequently, this is utilized to manage information that has two potential outcomes. The connection between the models and the indicators are utilized to foresee the likelihood of an occasion where the outcome is twofold that is either yes or no.

**odds= p/ (1-p) = probability of event occurrence / probability of not event occurrence**

** ln(odds) = ln(p/(1-p))**

Here, p is the probability of the occurrence of the event. ()

Logistic Regression requires a large sample size to draw the outcome.

### 3. Polynomial Regression

When the relationship between a dependent and independent variable is nonlinear, polynomial regression is used. For this, the least-squares method is used. In this type of regression, the power of the independent equation is more than one. In short, this type of regression is generally adopted for curvilinear data.

The equation is of the form: **y=a+b*x^2 ()**

### 4. Stepwise Regression

This type of regression is utilized when we deal with multiple independent variables. Right now, the determination of autonomous factors is finished with the assistance of a programmed procedure, which includes no human mediation.

The Stepwise Regression procedures follow three methodologies –

- Firstly, Forward determination which includes over and again adding factors to check in its improvement which stops when no further enhancements past a degree are conceivable.
- Secondly, Backward Elimination approach which includes cancellation of factors each in turn until no more factors could be erased without huge misfortune.
- Thirdly, The bidirectional end which is a blend of the other two methodologies.

With each progression, the variable is included or subtracted from the arrangement of informative factors. The methodologies for stepwise relapse are forward choice, in reverse disposal, and bidirectional end.

The equation is of the form: **y=a+b*x+e**

Where ‘e’ is the error term.

### 5. Ridge Regression

Ridge Regression is a procedure for examining data obtained from multiple regressions. At the point when multicollinearity happens, least-squares methods are impartial. A level of inclination add to the relapse gauges and an outcome, ridge regression diminishes the standard errors.

In other words, Ridge Regression is a method utilized when the information experiences multicollinearity (autonomous factors are profoundly connected). In multicollinearity, despite the fact that the least-squares gauges (OLS) are fair-minded, their differences are enormous which veers off the watched an incentive a long way from the genuine worth.

Regularly in relapse issues, the model turns out to be excessively unpredictable and tends to overfit. Along these lines it is important to decrease the change in the model and keep the model from overfitting. Ridge Regression is one such method that punishes the size of the coefficients.

### 6. Lasso Regression

In short, Lasso Regression is like Ridge Regression regarding its use. However, the only difference is that the data is being fed is not normal. The assumptions of Lasso regression are the same as least squared regression except normality is not to be assumed. Lasso Regression shrinks coefficients to zero, which certainly helps in feature selection.

It’s equation is as shown below:

### 7. ElasticNet Regression

ElasticNet regression is being utilized in the case of dominant independent variables being more than one amongst many correlated independent variables.

Also, seasonality & time value factors are made to work together to identify the type of regression.

ElasticNet Regression is a combination of Lasso Regression and Ridge Regression methods. It is prepared with L1 and L2 earlier as regularizer.

The equation represents as:

A clear advantage of trade-off among Lasso and Ridge is that it permits Elastic-Net to acquire a portion of Ridge’s dependability under rotation.

## Summary

In conclusion, these are the 7 most important Types of Regression Techniques which are a must learn for everyone who aspires to gain the knowledge of AI. Once these techniques are learned, a better overall understanding of how Natural Language Processing and Machine Learning Algorithms are implanted is obtained.