What is linear regression?
Linear regression is a supervised machine learning model majorly used in
forecasting. Supervised machine learning models are those where we use
the training data to build the model and then test the accuracy of the model
using the loss function.
Linear regression is one of the simplest regression algorithms in machine
learning. It consists of a dependent variable and an independent variable
which is linearly dependent on the dependent variable.
In case the number of independent variables is more than one then we go
for multiple linear regression.
Linear regression is one of the most widely known time series forecasting
techniques which is used for predictive modelling. As the name suggests, it
assumes a linear relationship between a set of independent variables to that
of the dependent variable (the variable of interest).
Below is the equation to the linear regression model, we all are well aware
of it
y=mx+c
Where y is the dependent variable
M refers to the slope of the line
X is the independent variable and
C is the constant
What is Correlation?
Variables within a dataset can be related for lots of reasons.
For example:
• One variable could cause or depend on the values of another variable.
• One variable could be lightly associated with another variable.
• Two variables could depend on a third unknown variable.
It can be useful in data analysis and modeling to better understand the relationships
between variables. The statistical relationship between two variables is referred to as
their correlation.
A correlation could be positive, meaning both variables move in the same direction, or
negative, meaning that when one variable’s value increases, the other variables’ values
decrease. Correlation can also be neutral or zero, meaning that the variables are
unrelated.
• Positive Correlation: both variables change in the same direction.
• Neutral Correlation: No relationship in the change of the variables.
• Negative Correlation: variables change in opposite directions.