The final plot between feature and y_

If finally i plot a graph between and feature for example X[i] and y_ then why it isnt coming a straight line . In this case why its called linear regression if the line is not straight?

hey @Sid10 ,
The task you are performing is multiple linear regression where we have multiple independent features and a single target/dependent variable.

Linear Regression assumes these multiple features to be one feature with one target variable , then only we can plot a linear straight line between these two.
for example :
lets X = [ “Age”,“Height” ,“Weight” ] and Y = “Score”

so , if we combine these 3 X’s variables into 1 -> Z , then we can have linear relationship between Z and Y .
but if we try to get a linear Relationship between Age and Score while training using all independent features , we will not achieve any such linear relationship in them.
and hence , you didn’t get a straight line between them.

I hope this would have resolved your doubt.
Thank You.
Happy Coding. :slightly_smiling_face:

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.