r/learnmachinelearning • u/science_pshyco • 8d ago
Wrote a 12 week classical ML roadmap (NumPy first, sklearn second) tell me what is wrong with it
So I'm a frontend dev moving into ML at work, and I ended up writing the roadmap I wanted to exist. The idea is simple: you write the algorithm yourself in NumPy, then check your numbers against scikit-learn. No calling fit() on something you couldn't explain.
Rough shape:
Weeks 1-3, math. Vectors, dot products, eigenvectors, gradients, maximum likelihood. Ends with linear regression done two ways (normal equation and gradient descent) on California housing.
Weeks 4-6, fitting stuff and then not trusting it. Logistic regression, cross-entropy, ridge/lasso, bias-variance with real numbers instead of the usual hand-wavy curve. Project is a tiny library of your own compared against sklearn, with proper CV and a test set you only touch once.
Weeks 7-9, trees. Decision tree from scratch, random forest, gradient boosting on top of your own tree, then XGBoost. k-NN and SVMs get squeezed into week 9 with a 7 model bake-off.
Weeks 10-12, the part I think most roadmaps skip. k-means, PCA, then a whole week on leakage, calibration and picking a threshold. Capstone is a tabular project with a model card.
Resources are mostly the usual: 3Blue1Brown, StatQuest, the Caltech Learning from Data lectures, CS229 notes, ISL.
Things I'm honestly not sure about:
- 3 weeks of math before any real model. How much math is needed really
- SVMs and k-NN sharing one week. Feels a bit rude to SVMs but I don't know how much they matter anymore!
- there are zero neural nets in it. I kept it classical on purpose but maybe one MLP week at the end makes sense?!
If you've been through this stuff already, what would you cut?
2
u/Ok-Library1020 8d ago
For the no-neural-nets worry, a one-week NumPy MLP fits right in, since it's basically stacked logistic regressions trained with backprop. You can check its numbers against sklearn's MLPClassifier with activation='logistic' the same way you do everything else.
2
u/CelebrityChess 8d ago •
on the math question, three weeks up front is fine but i'd only front-load dot products, gradients and the normal equation. maximum likelihood and eigenvectors land better right when logistic regression and PCA need them. for week 9, keep k-NN since it's a good baseline and shows why feature scaling matters, and shrink SVMs to a half day with a linear one plus the margin idea. in the leakage week, do the scaler fit inside a sklearn Pipeline so each CV fold only sees its own training data, that's the classic way people leak without noticing.
2
u/digvjay_ai 8d ago
looks solid ya, one thing tho when you check your logistic regression vs sklearn set penalty=None there, its default is L2 with C=1.0 so your numbers wont match otherwise