5/25
Part 1 of 5 · Less varianceLearn and do

The adjusted metric keeps each user's distance from the line, plus the mean

Take 0.75, the line's slope, times each user's distance from the average xx, and subtract it from yy. adjust(y, x, theta) does that, and you write it at the end of this step:

y_cv = adjust(y, x, 0.75)
print(y_cv)
print(y.mean(), y_cv.mean())
print(y.var(), y_cv.var())
Predict

Subtract 0.75 × (x - mean of x) from each y. What happens to the mean and the variance?

Pick one to see what it prints.
Pick an answer above to see the rest