Build it yourself
ML Projects: Build Models From Scratch
Build machine learning models from scratch, one tested function at a time, with your Python running in the browser. Nothing to install.
- Bandits and Dynamic Programming from ScratchImplement core multi-armed bandit algorithms and dynamic-programming methods.Medium21 steps
- Direct Preference Optimization (DPO) from ScratchImplement Direct Preference Optimization end-to-end: log-prob utilities, a policy model, Bradley–Terry preferences, the DPO loss and gradients, IPO variants, and a full train/eval pipeline.Hard27 steps
- Neural Networks From Scratch: Forward and BackwardImplement a complete neural network stack from scratch in NumPy: finite-difference gradient checks, dense and activation layers, loss, sequential composition, optimizers, and a training loop that overfits then generalizes on a nonlinear dataset.Hard13 steps
- NumPy House Price RegressionBuild a complete end-to-end house-price regressor in pure NumPy: clean tabular features, engineer simple derived and categorical encodings, split reproducibly, fit OLS via the normal equation, and report MAE, RMSE, R-squared, plus residual stats on held-out homes.Medium24 steps
- NumPy Multiple Linear Regression GDBuild a from-scratch multiple linear regression trainer in pure NumPy: standardize features, minimize MSE with batch gradient descent and early stopping, compare against the normal equation, and report MAE, RMSE, and R-squared via a reusable model API.Medium28 steps
- NumPy Text Classifier from ScratchBuild a complete spam/sentiment text classifier in pure NumPy: clean and tokenize text, extract fixed-vocabulary TF-IDF features, train L2-regularized logistic regression with batch gradient descent, tune the decision threshold on validation data, and deliver a predict(text) API with false-positive/false-negative error analysis.Hard27 steps
- Random Forest from ScratchBuild a complete Random Forest classifier from the ground up, starting with the impurity math behind a single decision tree and ending with a bagged ensemble that votes on predictions.Medium15 steps
- Support Vector Machine from ScratchBuild a linear Support Vector Machine end-to-end using only basic array operations, implementing the hinge loss, regularized objective, and gradient-based training loop.Medium11 steps
- Build a Tiny Autograd Engine from ScratchConstruct a minimal deep learning framework from scratch, layering a lazy numpy-backed buffer, a reverse-mode automatic differentiation engine, a tensor API, and neural network primitives.Hard58 steps