so i tried using the scikit learn linear regression on this olympic data frame.
the part for athletes is working but for age its not showing a linear prediction(i know that the correlation of age vs medals is not good)
reg=LinearRegression()
predictors=["athletes", "age"]
output="medals"
reg.fit(train[predictors],train[output])
i was expecting a straight line for the second plot too. I know the plot given here predicts the data for both the input parameters but i want to know how scikit differentiates between the two inputs i.e athletes and age