Linear regression: Parameters exercise

The graph below plots 20 examples from a fuel-efficiency dataset, with the feature (car heaviness in thousands of pounds) plotted on the x-axis and the label (miles per gallon) plotted on the y-axis.

Your task: Adjust the Weight and Bias sliders above the graph to find the linear model that minimizes MSE loss on the data.

Questions to consider:

  • What is the lowest MSE you can achieve?
  • What weight and bias values produced this loss?

For the set of points below, we were able to achieve an MSE of 2.61 with a weight of –0.797 and a bias of 19.099

Plot of 20 points and the optimal linear regression line for
              these points, using the weight and bias values above.