Let's begin!
The feature is Engine Size and the label is Co2 Emission.
On a linear equation, we can state that:
y = mx + c
Co2 Emission = (Slope * Engine Size) + Intercept
As mentioned, Coefficient and Intercept in the simple linear regression, are the parameters of the fit line. Given that it is a simple linear regression, with only 2 parameters, and knowing that the parameters are the intercept and slope of the line, sklearn can estimate them directly from our data. Notice that all of the data must be available to traverse and calculate the parameter. You can also try and run it by yourself!
Comments
Post a Comment