Start building with us today.
Buy this course โ $199.00Ai Models From Scratch Beginners Edition
AI Models From Scratch
Course 1 of 3 โ Beginner Edition
Build every piece of an AI model from mathematical primitives. No black boxes. No frameworks. Every neuron, every gradient, every decision boundary โ coded and visualised by you.
Table of Contents
Why This Course?
Most AI courses hand you a model.fit() call and call it education. That is not learning โ that is using someone else's understanding.
This course exists because the engineers who build truly reliable AI systems โ at Google, Meta, DeepMind, and Anthropic โ are not the ones who learned the most frameworks. They are the ones who understand what every line of a neural network is actually doing. This course gives you that understanding, built brick by brick through working software.
Every single lesson ends with a running Streamlit application. Not a notebook. Not pseudocode. A real app with inputs, processing, model, and visual output โ something you can show anyone and explain completely because you built every piece of it from scratch.
"The engineers who really understand AI are the ones who could rebuild it from scratch if they had to. That is the bar this course sets โ and clears."
โ Design principle behind this curriculum
Five Reasons to Take This Course
You will never be fooled by a framework again โ Once you have written forward pass and backprop yourself, PyTorch's autograd is transparent โ not magical.
Debugging AI becomes systematic, not guesswork โ When your loss curves behave strangely, you will know exactly which layer, which operation, or which weight is misbehaving.
Your Intermediate and Expert courses unlock fully โ Every concept in Part 2 (PyTorch) and Part 3 (LLMs, RAG, MLOps) references foundations you built here. Nothing will feel foreign.
You build a portfolio of 30 working apps โ Each lesson is a self-contained Streamlit app. Thirty lessons means thirty portfolio items, each explaining a core AI concept visually.
Industry engineering habits start on Day 1 โ Modular code structure, evaluation rigor, reproducibility, and documentation โ the same standards that big tech teams enforce.
What You Will Build
30 self-contained Streamlit applications โ each one a live, interactive demonstration of a core AI concept.
Every app shares the same four-file structure so the pattern becomes muscle memory:
Who Should Take This Course?
Built for anyone who writes, designs, builds, or decides on software โ not just data scientists.
This course was deliberately designed for a wide technical audience. AI is no longer a specialisation โ it is a layer of every product, every system, every engineering decision.
What Makes This Course Different?
Six concrete differences from every other AI course on the market.
Every Lesson Ships a Working App โ Not a notebook, not a tutorial walkthrough โ a real Streamlit application with UI, model logic, and visual output. Thirty lessons = thirty portfolio items that run on anyone's computer.
Built on CPU. On Purpose. โ Every lesson runs on any laptop with 4GB RAM and no GPU. This forces every app to be lean, well-optimized, and practical. The discipline transfers directly to production engineering.
Scratch-First, Framework-Second โ You implement neurons, backpropagation, gradient descent, and loss functions yourself before ever touching PyTorch. This is how engineers who actually understand AI work.
Production File Structure From Lesson 1 โ Every lesson follows the same modular four-file layout used by AI engineering teams at production companies. You are learning a work structure, not a course structure.
Four-Step Learning Loop per Lesson โ Run it (60 seconds to a working app) โ Understand it (read model.py line by line) โ Break it (change one thing intentionally) โ Extend it (ship a new feature). This loop builds real engineering intuition.
Designed for Non-Data-Scientists โ The curriculum was deliberately structured so that a software architect, product manager, QA engineer, or designer gets as much value as a data scientist. AI literacy is the goal, not AI specialisation.
Key Topics Covered
Six interlocking domains, each with its own section and dedicated Streamlit applications.
๐ Mathematical Engine
N-dimensional arrays & broadcasting
Matrix multiplication & linear transforms
Derivatives, partial derivatives & gradients
Probability distributions & the CLT
Vectorized computation patterns
โก Neuron & Learning
Weighted sum, bias, threshold mechanics
Activation functions: 6 types compared
Loss function geometry & convexity
Gradient descent convergence mechanics
Learning rate sensitivity & optimal ranges
๐ง Network Architecture
Forward pass computation graphs
Backpropagation via chain rule, by hand
Depth vs width capacity tradeoffs
Weight initialization: He, Xavier, zero
Custom training loop anatomy
๐๏ธ Data Engineering
Null imputation & outlier detection
Feature engineering: poly, log, bins
Stratified train/val/test splitting
Min-Max, Standard, Robust normalization
Augmentation as regularization
๐ฒ Classical ML Models
Logistic regression from 60 lines
Linear regression with residual analysis
KNN: distance metrics & K sensitivity
Decision tree splits: Gini vs entropy
Random forests & out-of-bag error
๐ Evaluation & Shipping
Precision, Recall, F1, AUC-ROC suite
Confusion matrices for multi-class
Bias-variance tradeoff via learning curves
Model serialization & version metadata
End-to-end digit recognition system
Prerequisites
The shortest prerequisite list in any serious AI course โ intentionally.
"The only prerequisite that truly matters is curiosity about how things actually work. If you have ever looked at a model's output and wondered 'but what is it actually doing?' โ this course is for you."
โ Course design rationale
Learning Outcomes
What you will be able to do โ concretely โ after completing all 30 lessons.
โ Explain exactly what a neuron computes and why it needs activation
โ Implement gradient descent from scratch on any differentiable function
โ Write a training loop with loss tracking, batching, and early stopping
โ Debug a model by reading its loss curve and weight histograms
โ Implement backpropagation through a 3-layer network with no libraries
โ Build logistic regression, KNN, and decision trees from raw NumPy
โ Design a data preprocessing pipeline that prevents leakage
โ Evaluate a model with precision, recall, F1, and AUC-ROC correctly
โ Identify overfitting/underfitting and apply the right remedy
โ Ship a working Streamlit AI application from a blank file
โ Explain bias-variance tradeoff to a non-technical stakeholder
โ Prepare a model for hand-off to Part 2 (PyTorch) and Part 3 (MLOps)
Course Structure
Six sections, each targeting a distinct layer of understanding, each ending with a working application.
Section Overviews
01 โ The Mathematical Engine (Lessons 1โ5)
Master the linear algebra, calculus, and probability that every AI model is built on โ through code, not textbooks.
02 โ The Neuron: AI's Atom (Lessons 6โ10)
Build the core computational unit of every neural network from scratch and understand exactly why it learns.
03 โ Your First Network (Lessons 11โ15)
Stack neurons into layers, implement backpropagation by hand, and write your own training loop from zero.
04 โ Data Engineering (Lessons 16โ20)
Learn why data prep makes or breaks models โ cleaning, feature engineering, splitting, scaling, and augmentation.
05 โ Classical ML Models (Lessons 21โ25)
Build logistic regression, KNN, decision trees and random forests from scratch, understanding every algorithm decision.
06 โ Evaluation & Graduation (Lessons 26โ30)
Master the full evaluation toolkit and ship a production-ready end-to-end digit recognition system.
Full Curriculum โ All 30 Lessons
Every lesson is a standalone Streamlit app. Each row below is a deliverable, not a topic.
Section 01: The Mathematical Engine ยท Lessons 1โ5
Section 02: The Neuron โ AI's Atom ยท Lessons 6โ10
Section 03: Your First Network ยท Lessons 11โ15
Section 04: Data Engineering ยท Lessons 16โ20
Section 05: Classical ML Models ยท Lessons 21โ25
Section 06: Evaluation & Graduation ยท Lessons 26โ30
Lesson-Level Learning Objectives
Each lesson has a single, measurable outcome. You know exactly what you built and why.
Section Deep Dives
What you actually learn inside each of the six sections โ the non-obvious insights that make this curriculum different.
Section 01: The Mathematical Engine (Lessons 1โ5)
Most AI resources tell you 'you need linear algebra and calculus.' This section shows you exactly which pieces โ and only those pieces โ and hands you a running tool that makes each concept visceral before moving on.
Broadcasting is not magic: Lesson 1 forces you to predict the output shape before running the code. Broadcasting is a deterministic rule, and understanding it prevents a class of bugs that haunt production AI code.
Derivatives as sensitivity: Lesson 4 treats derivatives not as exam equations but as slope-at-a-point tools. You drag a slider and watch the tangent line update. That intuition is the entire foundation of how gradient descent knows which way to step.
The Central Limit Theorem in practice: Lesson 5 lets you run sampling experiments live. You will watch non-normal distributions converge to normal as sample size grows โ the reason validation metrics are reliable even from noisy data.
Section 02: The Neuron โ AI's Atom (Lessons 6โ10)
The neuron is the unit of understanding in all of AI. Engineers who cannot explain a single neuron's computation have no foundation for debugging anything deeper. This section eliminates that gap entirely.
Activation functions have tradeoffs: Lesson 7 plots 6 activation functions side-by-side with their gradient curves. You see exactly why sigmoid saturates, why ReLU dies with negative inputs, and why GELU is preferred in modern transformers. These tradeoffs appear in real architecture decisions.
Loss surfaces determine trainability: Lesson 8 shows you the penalty landscape of different loss functions. Cross-entropy's log penalty creates a steeper gradient far from truth โ that is why it trains faster than MSE for classification, and you can see it.
Learning rate is the single most important hyperparameter: Lesson 10 trains the same model at 8 learning rates simultaneously and overlays the loss curves. No textbook explanation of divergence is as clear as watching it happen in real time.
Section 03: Your First Network (Lessons 11โ15)
Building backprop by hand is the defining exercise of this section. Every AI engineer should be able to trace a gradient from loss to weight without a framework doing it for them. Lesson 12 makes this non-optional.
XOR reveals why depth matters: Lesson 11 shows you that a single layer literally cannot draw the decision boundary that separates XOR inputs. Adding one hidden layer solves it instantly. That geometry is why deep networks are more powerful than wide ones.
Initialization determines whether training starts: Lesson 14 compares zero initialization (weights never differentiate), random initialization (weights explode), and He/Xavier (weights start at the right scale). The histograms make the difference impossible to ignore.
The training loop is architecture, not boilerplate: Lesson 15 walks through every line of a training loop: why you zero gradients, why you call .backward(), why batch size changes the loss landscape. Engineers who skip this explanation treat training as a ritual rather than an engineering decision.
Section 04: Data Engineering (Lessons 16โ20)
The model you build is only as good as the data you feed it. This section covers data engineering decisions that change model accuracy by 10โ30 percentage points โ decisions that most courses treat as preprocessing trivia.
Data leakage is the most common production failure mode: Lesson 18 makes data leakage visible: splitting after normalization, letting val/test statistics influence training features. You toggle the leaky version and watch evaluation metrics become falsely optimistic.
Normalization choice changes convergence speed: Lesson 19 lets you compare MinMax, Standard, and Robust scaling on the same dataset and training run. Standard scaling converges 3ร faster on most datasets โ but Robust is essential when outliers are present.
Augmentation is regularization, not data generation: Lesson 20 reframes augmentation: it is not about making your dataset bigger โ it is about making your model invariant to transforms it will encounter in production. That conceptual shift changes how engineers design augmentation pipelines.
Section 05: Classical ML Models (Lessons 21โ25)
Classical models are not 'old' models โ they are production workhorses that outperform neural networks on tabular data at many companies today. Understanding their internals makes you a more complete AI engineer.
Logistic regression in 60 lines: Lesson 21 builds a logistic classifier from the sigmoid function up, in 60 lines of NumPy. If you cannot explain every line, you cannot debug a neural network layer that does the same computation at scale.
Decision trees are interpretable by design: Lesson 24 builds a tree step-by-step and shows the Gini calculation at every split node. That interpretability is not just pedagogically useful โ it is often a production requirement in regulated industries (finance, healthcare, legal).
Random forests quantify their own uncertainty: Lesson 25 introduces out-of-bag error: the random forest evaluates itself on samples not used in each tree's training. This gives you a validation signal without touching your held-out test set โ a technique used in production feature selection.
Section 06: Evaluation & Graduation (Lessons 26โ30)
Model evaluation is where AI projects win or lose in production. A model with 94% accuracy on an imbalanced dataset may be completely useless. This section teaches you to evaluate models the way senior ML engineers do.
Accuracy is almost never the right metric: Lesson 26 shows you a spam classifier with 96% accuracy that catches no spam at all โ because 96% of email is legitimate. Precision, Recall, and F1 tell the truth. Accuracy hides it.
The confusion matrix is a debugging interface: Lesson 27 turns the confusion matrix into an error analysis tool. Which classes are getting confused for each other, and why? That analysis drives the next experiment โ it is not just a reporting artifact.
The capstone is a complete engineering system: Lesson 30 requires you to build every component โ data loading, preprocessing, the network, the training loop, the inference path, and the Streamlit UI โ from a blank file using only NumPy. If you can do this, you understand AI.
Appendix: Complete Setup Guide
Every lesson uses one or more of the following tools. All are open-source, free, and run without any cloud account or GPU.
Quick Start โ Lesson 1 in 90 Seconds
"Thirty lessons from now you will build a digit recognition system from a completely blank Python file โ no imports except NumPy and Streamlit. That is not a party trick. It is proof that you understand AI at the level that makes every framework, every model, and every debugging session more tractable for the rest of your career."
โ What this course delivers