Syllabus Lesson 74 of 246 · Module 5: Optimisation
Module 5: Optimisation

Gate: pick and tune an optimiser (AI off)

Why it matters Choosing and tuning an optimiser under a budget, on a problem you have not seen, is the everyday version of everything in this module.

AI tutor off. The task is linear regression, but the eight inputs have wildly different scales, from 10 down to 0.05, and every input matters equally to the answer. That is a badly stretched landscape. You get at most 300 full-data gradient steps.

Your turn

Write fit(X, y) returning (w, b) using at most 300 gradient evaluations (the test counts them through grad_fn, which you must use for every gradient). Any optimiser and schedule you like. The check runs your fit on a fresh problem with the same scales (new weights and noise), with closed-form solvers switched off, and the final mean squared error must be below 0.05.

AI off: no tutor, hints or worked solution on this one. Your own thinking only.

Spotted a problem in this lesson? Report it · Ask about this lesson

This exercise opens soon

Finish the lesson before it and this one unlocks. The whole course is free, no account needed, and you can read this lesson right now.