Least squares picks the straight line that makes the squared errors smallest. For a line it has a short formula, which you will write and use on six noisy readings.
The idea. and , where and are the means.
Your tasks.
mean, return the average of a list.slope, return by the formula above.c to the intercept, and predict to the model's value at .Have you tried it?
Do the tasks in the editor first, and run the checker after each one. Its hints help when a check fails. When you are ready, compare your code with this solution.
Log in to join the discussion.
Loading…