Regression analysis in machine learning is a statistical method for modeling the relationship between a dependent variable (target) and an independent (predictor) with one or more independent variables.

More specifically regression analysis helps us understand how the value of the dependent variable varies according to an independent variable when other independent variables are held constant.

It predicts continuous/true values such as temperature, age, salary price etc.

**We can understand the concept of regression analysis with the following example:**

Example: Suppose there is a marketing company A which does various advertisements every year and gets sales for it. The list below shows the advertisement the company has carried out over the past five years and the appropriate sales:

Now the company wants to make the $ 200 advertisement in 2021 and wants to know the forecast regarding sales for this year.

So to solve this kind of prediction problem in machine learning we need linear regression analysis.

Regression is a supervised machine learning (ml) technique that helps find the correlation between the variables and allows us to predict the continuous output variable based on one or more predictive variables.

It is mainly used for predicting modeling time series and determining the causal-effect relationship between the variables.

In regression, we draw a graph between the most appropriate variables and the given data points. With the help of this plot, a machine learning model can predict the data.

Simply put "regression shows a line or curve that passes between all the data points in the graph predicting the target in such a way that the vertical distance between the data points and the regression line is minimal." The distance between data points and a row tells whether a model has grasped a strong relationship or not.

**Some Examples of Regression Can Be like:**

Forecasting rain using temperature and other factors

Determining market trends

Prediction of road accidents due to driving in bloom.

**Terms for Regression Machine Learning Analysis:**

#### Dependent Variable

The main factor in regression analysis that we want to predict or understand is a dependent variable python machine learning. This is also called a target variable.

#### Independent variable

The factors that influence the dependent variables or used to predict the values of the dependent variables are called independent variables also known as predictors.

#### Outliers

An Outlier is an observation that contains a very low value or a very high value compared to other observed values. An Outlier can harm the result so it should be avoided.

#### Multicollinearity

If the independent variables are more closely correlated with each other than other variables then such a condition is called multi-culinary.

It should not exist in the data set as it creates a problem while ranking the most influential variable.

#### Underfitting and Overfitting

If our algorithm works well with the training set but not well with the test set then such a problem is called Overfitting. And if our algorithm does not function well even with a training array then such a problem is called underfitting.

### Types of Regression

There are different types of regressions used in data science and python machine learning. Each type has its own importance in different scenarios but at its core, all linear regression in (ml) machine learning methods analyze the effect of the independent variable on dependent variables.

Here we discuss some important types of regression listed below:

- Linear regression
- Logistic regression
- Polynomial regression
- Vector regression support
- Regression of the decision tree
- Random regression of forest
- Regression of the ridge
- Lasso regression