—
Squared loss and gradient
Tutor me on https://mlprep.iwase.dev/item/ml-screen-regression-foundation-gradient/. This is a screening item. If window.mlPrepAgent is available, read attempts for item ml-screen-regression-foundation-gradient before tutoring. Inspect my attempt, keep the item ID, and do not reveal the full answer first. After a real attempt, append its record with recorded_by agent, include agent_session_id when available, and read it back.Problem
For , , and at , use
Compute the predictions, residuals, , and the gradient with respect to .
Reveal answer or reference solution
The predictions are , so the residuals are . Thus,
The intercept gradient is
and the slope gradient is
Therefore, .
Previous attempts
Loading attempts saved in this browser…