8 weeksBeginner45 min a dayWeek 1 free
ML foundations in 8 weeks
Start from arrays and finish with a small neural network. One topic a week, mostly Easy problems, about 30 to 45 minutes a day. Good before you start the interview plans.
Start hereCompute every pairwise distance without a Python loop0 of 51 steps done on this device · Week 1 · Problem
Start Week 1You are here
NumPy foundations
0 of 6 done · 6 problems- ProblemCompute every pairwise distance without a Python loopEasy
- ProblemOne-hot encode class labels with fancy indexingEasy
- ProblemRank leaderboard scores so ties share a placeEasy
- ProblemUndo a length sort with the inverse permutation from argsortEasy
- ProblemRemap sparse token ids to a compact vocabulary with np.uniqueEasy
- ProblemAverage values per group id with weighted bincountEasy
Week 2
Linear algebra
0 of 6 done · 6 problems- ProblemBuild a cosine similarity matrix for a set of embeddingsEasy
- ProblemMeasure how much a rank-k approximation loses with the SVDEasy
- ProblemProject vectors onto the span of a few basis vectorsEasy
- ProblemCount the numerical rank of a matrix from its singular valuesEasy
- ProblemCompute a matrix's 2-norm condition number from its singular valuesEasy
- ProblemFind the main direction of your data with PCAMedium
Week 3
Calculus and gradients
0 of 6 done · 6 problems- ProblemCheck a gradient with central differencesEasy
- ProblemDifferentiate a quadratic form when the matrix is not symmetricEasy
- ProblemDerive the gradient of mean squared error for a linear modelEasy
- ProblemBuild a Jacobian with central finite differencesEasy
- ProblemClassify a critical point from its HessianEasy
- ProblemDerive the gradient of softmax plus cross-entropyMedium
Week 4
Probability and statistics
0 of 6 done · 6 problems- ProblemTrack mean and variance of a stream in one passEasy
- ProblemCompute the KL divergence between two diagonal GaussiansEasy
- ProblemCompare two token distributions with Jensen-Shannon divergenceEasy
- ProblemSample categories from fixed uniforms with the inverse CDFEasy
- ProblemCompute the mean and variance of a discrete random variable and of aX + bEasy
- ProblemUpdate a discrete posterior over hypotheses after each observationEasy
Week 5
Working with data
0 of 7 done · 7 problems- ProblemStandardise features without leaking test dataEasy
- ProblemScale features with the median and IQR so outliers do not dominateEasy
- ProblemEncode hour of day and day of week as sine and cosine featuresEasy
- ProblemSummarise API calls per model with named groupby aggregationsEasy
- ProblemKeep only the latest subscription record per userEasy
- ProblemTotal the tokens each model used on successful API callsEasy
- ProblemFind users whose total API spend is over a budget with HAVINGEasy
Week 6
Your first models
0 of 6 done · 6 problems- ProblemFit linear regression in one line with the normal equationEasy
- ProblemFit a polynomial curve by expanding x into powersEasy
- ProblemCompute the elastic net penalty and its gradientEasy
- ProblemClassify points by majority vote of their nearest neighboursEasy
- ProblemRun one epoch of the perceptron learning ruleEasy
- ProblemClassify by the nearest class centroidEasy
Week 7
Judging and grouping
0 of 6 done · 6 problems- ProblemCompute precision, recall and F1 from predictionsEasy
- ProblemMeasure how overconfident a classifier is with expected calibration errorEasy
- ProblemBuild a confusion matrixEasy
- ProblemRun one iteration of k-meansEasy
- ProblemPick spread-out starting centroids with farthest-first seedingEasy
- ProblemReport the explained variance ratio of PCAEasy
Week 8
A small neural network
0 of 8 done · 7 problems- ProblemImplement GELU, the activation inside GPT and BERTEasy
- ProblemCompute softplus without overflowing on large inputsEasy
- ProblemBinary cross-entropy straight from logitsEasy
- ProblemCross-entropy with label smoothing from raw logitsEasy
- ProblemBackward pass of a dense layerEasy
- ProblemCompute Xavier and He initialisation scales for dense and conv weightsEasy
- ProblemCount the parameters of an MLPEasy
- MockTimed mock: ML Engineer
Progress is saved in this browser. Solved problems, lessons you marked done and mocks you took tick themselves; tick anything else by hand.
Other plans: AI Engineer in 4 weeks, ML Engineer in 6 weeks, LLM internals in 3 weeks, Interview sprint in 2 weeks, ML and LLM engineer in 4 weeks.
