I had no idea what ML actually was three days ago. Here’s what clicked for me — explained so it’ll click for you too.
I decided to learn Machine Learning from scratch. No shortcuts, no “just use this library” — the real thing, from the ground up. And I’m documenting every step of the way so you can follow along.
This is Day 1. I don’t know much yet. But I think that’s actually useful — because I still remember what it feels like to be completely confused by this stuff.
So let’s start with the most basic question: what even is Machine Learning?
The traditional way computers work
Normally, when you write a program, you’re the one writing all the rules. You tell the computer exactly what to do in every situation.
Traditional programming is explicit: you write rules, the computer follows them. if weight > 100kg: flag as heavy. You encode all the logic yourself.
Simple example
Want to write a spam filter the traditional way? You’d write rules like: “if the email contains the word ‘lottery’, mark as spam.” Then “if it contains ‘click here to claim’, mark as spam.” You’d spend weeks writing hundreds of rules — and spammers would just change their words and outsmart you.
This approach works fine for simple, predictable problems. But the real world is messy. Some rules have a thousand exceptions. And some problems — like recognising a cat in a photo — are so complex that no human could ever write down all the rules needed.
ML flips the whole thing around
Instead of writing the rules yourself, you show the computer thousands of examples — and it figures out the rules on its own.
Think of it like teaching a child. You don’t explain the formal rules of grammar before they learn to speak. You just show them thousands of examples of language, and they figure out the patterns. ML works the same way — learn from examples, not from explicit instructions.
For the spam filter: instead of writing rules, you give the model 100,000 emails already labelled as “spam” or “not spam”. It finds the patterns itself — and it’s usually far better at it than any set of hand-written rules.
The three main types of ML
Supervised learning
You provide labelled data. The model learns to map inputs to correct outputs. Most real-world ML is this.
Unsupervised learning
No labels. The model finds hidden patterns and structure on its own.
Reinforcement learning
An agent learns by trial and error, earning rewards for good actions. Think game-playing AI.
We’ll start with supervised learning — it’s where most real projects live, and it’s the foundation everything else builds on.
The ML workflow (memorise this)
Every ML project — from a hobby script to a production system at Google — follows the same basic loop:
Data → Clean → Features → Model → Train → Evaluate → Tune → Deploy
The tools change, the algorithms change — but this loop never does. Keep it in mind. We’ll go through each step in detail over the coming posts.
Your first three tools
Every ML practitioner uses these three Python libraries constantly. Install them and get familiar:
import numpy as np # fast arrays & math (the backbone of everything)
import pandas as pd # data tables — like Excel but programmable
import matplotlib.pyplot as plt # visualize your dataAnd here’s the very first piece of code I ran — plotting fake house price data to get a feel for what “finding a pattern” actually looks like:
your first ML experiment
import numpy as np
import matplotlib.pyplot as plt
# Generate some fake "house size vs price" data
np.random.seed(42)
house_size = np.random.randint(500, 3500, 50) # sq ft
price = house_size * 150 + np.random.randn(50) * 30000 # noisy relationship
# Plot it
plt.scatter(house_size, price, alpha=0.6)
plt.xlabel("House size (sq ft)")
plt.ylabel("Price ($)")
plt.title("Can we predict price from size?")
plt.show()
Run it. Look at the plot. You’ll see a cloud of dots sloping upward — bigger houses, higher prices, with some messiness. That relationship between input and output? Teaching a model to learn that relationship automatically is exactly what we’re going to do in the next post.
What I learned today?
ML is not magic. It’s pattern recognition at scale. You give it data, it finds structure, you use that structure to make predictions. The math behind it is real and learnable — and we’ll build it up piece by piece from here.
Next up: Linear Regression — we’ll build our first actual ML model from scratch, derive the math, and write it in pure Python before using any library. See you there.
BEFORE THE NEXT POST – TRY THIS
Run it, look at the plot, and ask yourself: “Could I draw a line through this data to predict price?”
That line — and the math behind fitting it — is Linear Regression.
