Teaching machines to learn (while I do too)

Saanvi KumarSaanvi Kumar
8 min read

Hey - I’m Saanvi, and I’ve been trying (and failing) to learn machine learning for the past three years.

I’ve watched courses I didn’t finish, read papers I didn’t understand, and trained models that didn’t work - or worse, worked without any explanation. Somewhere along the way, I realized the only way I’m going to learn this is by actually doing it, breaking it, and writing through the chaos.

This blog series is called This Might Be a Model because… most of the time, I’m not entirely sure what I’ve built. Sometimes it predicts things beautifully. Other times it outputs complete nonsense and I stare at it like, “you okay?” But that’s kind of the point.

I’m not here to teach you ML like a professor. I’m here to learn out loud - and if you’re someone who learns by watching others trip over their own models and figure it out slowly, you’re in the right place.

In this series, I’ll be:

  • Trying to understand core ML concepts (and explaining them the way I wish someone had for me)

  • Building simple models from scratch (and sometimes breaking them)

  • Making sense of the big buzzwords without pretending to know it all

It won’t be linear. It might not even be accurate 100% of the time. But it’ll be honest, a little nerdy, and (hopefully) useful to you, too.

So let’s start where all machine learning journeys should:

What is Machine Learning - and why does it feel like everyone already gets it?

Machine learning has incredible branding. It’s the Apple of buzzwords: sleek, futuristic, and just mysterious enough to make you feel behind for not already understanding it.

But peel off the shiny label, and what you actually get is - a bunch of data, a bunch of math, and a model that tries to predict things - often with the enthusiasm of a golden retriever and the accuracy of a Magic 8 Ball.

Here’s the simplest way I’ve come to understand it:

Machine learning is when we stop giving computers step-by-step instructions - and instead, give them examples and let them figure out the rules on their own.

In traditional programming, we tell the computer exactly what to do.
If A, do B. If not A, do C. No questions asked.

But in ML, it’s more like: Here’s a bunch of stuff. Here’s what the answer was. Now learn to guess the answer on your own next time.

We don’t hand it a recipe - we hand it a delicious triple chocolate fudge brownie and say, “good luck reverse engineering that.”

The result? A model: a mathematical function that’s been trained to recognize patterns, make predictions, and hopefully not hallucinate in production.

It’s still logic and rules - just written by the machine, based on what it learned from data. That’s the magic. And also the chaos.

You met ML already - you just didn’t know it

Machine Learning did not enter our lives with ChatGPT. It’s been lurking quietly for years - making predictions, filtering content, and improving products long before anyone slapped “AI-powered” on a landing page.

You’ve probably interacted with ML today - maybe even in the last hour - and thought nothing of it. And that’s kind of the point - the best features are those you don’t realize exist.

Here are some places where ML quietly shows up and makes decisions on your behalf:

  • Your Spotify Discover Weekly playlist - It noticed that you like sad acoustic guitar songs at 1 a.m. and built a whole mood for you.

  • Your email spam filter - A classic. It learned the difference between “Your OTP is 849302” and “Dear Sir, I have a loan proposal.”

  • Face recognition in your camera roll - Somehow knows the difference between you, your sister, and your cousin who looks exactly like you but has slightly different eyebrows.

  • Google Maps predicting traffic - It knows when that one flyover will be backed up because hundreds of phones got stuck there yesterday.

  • Amazon recommendations - You looked at one ceramic mug and now it’s convinced you need seven, plus a matching coaster and a stanley.

  • Instagram’s Explore tab - Reinforcement learning gone wild. You like one video of a scenarios being explained in catto? Your feed is now 98% cats.

The point is: ML is already making small (and sometimes very big) decisions for you. What to recommend. What to hide. What to filter. What to predict.

So if it’s already shaping your digital life (and let’s be honest, your real life too), might as well learn how it works - and maybe even teach it something new.

ML is a triology

There’s no one way to be confused about ML - there’s THREE!

  1. Supervised Learning

    This is the one everyone learns first - mostly because it’s the easiest to wrap your head around.You give the model inputs (features) and tell it what the correct output should be (label). The goal is for the model to learn the relationship between the two - so that next time, when it sees just the input, it can predict the output on its own.

    More formally:

    You have a dataset made up of input-output pairs:
    (X₁, Y₁), (X₂, Y₂), ..., (Xₙ, Yₙ)

    X \= features - the values that can influence the value of your label (e.g. age, income, blood pressure)

    Y \= label/target - the value you want to predict (e.g. house price, disease type, pass/fail)

    The model learns a function:
    f(X) ≈ Y

    Once trained, the model can predict Y for a new, unseen X.

    Models we see here include: Linear Regression, Logistic Regression, Decision Trees, Random Forests, Support Vector Machines and many more.

    These models work in different ways - some are straightforward, like linear regression literally drawing a line through your data. Others, like decision trees and random forests, make decisions by asking a series of “if this, then that” kind of questions. And then there are the slightly more intense ones, like support vector machines, that try to separate your data by drawing fancy boundaries in multi-dimensional space. Don’t worry if that sounds abstract - it kind of is.

    But the point is, each model is just trying to do the same thing: learn from the data you give it, and make a decent prediction next time.

  2. Unsupervised Learning

    This one’s trickier to explain - mostly because there are no clear answers involved (see what I did there).

    In unsupervised learning, you give the model a dataset with inputs (X), but no labels (Y). There's nothing to predict. The model's job is simply to look at the data and try to find patterns, structure, or groupings that weren’t obvious before.

    You’re not saying, “Here’s the right answer.” You’re saying, “Here’s a bunch of stuff - see what you can make of it.”

    More formally:

    You have a dataset made up of only inputs:
    X₁, X₂, ..., Xₙ

    There’s no Y here - no labels, no expected outcomes. The model looks at the data and tries to organize or compress it in some useful way.

    Two common goals here are:

    • Clustering: grouping similar data points together (e.g. grouping customers into segments based on behavior)

    • Dimensionality Reduction: simplifying the data while keeping as much of its structure as possible (e.g. reducing 100 survey questions to 2 main themes)

Some models you’ll see here include: K-Means, DBSCAN, Hierarchical Clustering, Principal Component Analysis (PCA), and t-SNE.

These models don’t predict anything - they explore. K-Means, for example, tries to group your data points into clusters that are similar. PCA takes high-dimensional data and compresses it down to a few key components that explain most of the variation.

The goal is insight, not answers. You’re using unsupervised learning when you don’t know exactly what you’re looking for - but suspect the data knows something you don’t.

It’s often used for:

  • Customer segmentation (who shops like whom?)

  • Organizing large media collections (grouping images or audio by similarity)

  • Anomaly detection (spotting weird patterns that don’t fit the norm)

Is it messier than supervised learning? Definitely. But it’s also what you reach for when the dataset has no labels and your best plan is, “Let’s just see what happens.”

  1. Reinforcement Learning

    Reinforcement Learning is the wild child of machine learning. It doesn’t study examples like supervised learning. It doesn’t search for patterns like unsupervised learning. Instead, it learns by doing - and by occasionally failing spectacularly along the way.

If supervised learning is learning with an answer key, and unsupervised is learning without any answers, then reinforcement learning is like playing a game where you don’t even know the rules - but you can tell you’re doing well when the score goes up.

This is the kind of learning you see in self-driving cars learning to navigate roads, in bots mastering complex games, and in robots figuring out how not to fall on their faces. There’s no one “correct” dataset. It learns through trial and error - tweaking its strategy every time it wins (or crashes into something).

If supervised learning is being taught, and unsupervised learning is being observant, then reinforcement learning is being stubborn - and figuring things out the hard way (just like most of us do).

So where does this leave us

If you’ve made it this far, you now officially know more about machine learning than most people who casually toss around the word “AI.”

You’ve met the big three and every flashy AI headline you see can be traced to one of these three.

Of course, this is just the intro level. I haven’t even told you how these models actually work (math incoming), how they’re built, or how they break spectacularly (cos I don’t know that yet either). But that’s what the rest of this series is for.

So if you’re still here, curious, slightly confused but also kind of hyped - good. Same.

In the next post, we’ll go from theory to action (and more theory). We’ll build our very first ML model: linear regression. Is it simple -yes, without a doubt. But underneath that simplicity is the entire foundation of modern machine learning.

See ya!

24
Subscribe to my newsletter

Read articles from Saanvi Kumar directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Saanvi Kumar
Saanvi Kumar

Hey, I’m Saanvi 👋 This blog is mostly me talking to myself - trying to make sense of whatever I’m learning right now. It could be a bug I spent hours fixing, a concept that finally clicked, or just something cool I came across. Writing it down helps me remember, reflect, and sometimes even feel like I know what i’m doing. If you’re here and figuring things out too - welcome to the mess.