# What is Linear regression? -introduction to machine learning models

linear regression is one of the most used and popular models used in machine learning

in this article, I would be giving you a detailed explanation and how this model works

linear regression comes in the branch of supervised learning

Linear regression is a linear model, e.g. a model that assumes a linear relationship between the input variables (x) and the single output variable (y). More specifically, that y can be calculated from a linear combination of the input variables (x).linear regression models find a line that best fits the data to make a prediction or an outcome

linear regression works on the basic formula which I guess you guys studied at maths

y = mx+c

m = slope ,c= constant

so we can determine the value of y if we know the value of x, m, and c

to know these values we plot a dataset and we calculate then we find a line that best fits all of the datasets so now we know the slope and constant values of the best-fitted line now we can input our x and predict the outcome

## now let’s take a real-life example

on how a persons height and weight changes in the figure down below the first step is that I need to plot all the data sets then we need to find the best-fitted line which is automatically done by the model itself so you don’t need to worry

now we are seeing a clear plot given by the model from our data set now let’s say I have a person s height and I want to predict his weight so let’s say the person height is 5.0 and I want to predict his weight

that’s simple I only need to find the value of y at the line so my y is 50 so I now know a person weight

so by this, we can predict values if we know one variable and we need to find another variable I hope this article has helped you in the near future I will be explaining to you all the models then we will do some work on projects

AI/ML

Trending AI/ML Article Identified & Digested via Granola by Ramsey Elbasheer; a Machine-Driven RSS Bot