Basics of ML

Machine Learning Explained Simply: The Technology That Learns From Experience
It all started back in 2022 when ChatGPT 3.5 dropped. Ever since childhood, I had imagined a tool like that. It felt unreal at the time. The responses, the conversations, the feeling that a machine could actually understand what you were saying. I was still in school back then. Honestly, I still am lol. But in 2025, after getting completely overwhelmed by AI, vibe coding, and the nonstop hype online, I created a Twitter account to figure out what was actually happening under the hood and stay updated with the latest news.
Twitter is a really interesting place.
Some people there are building insane things. Some are just farming engagement. But somewhere between all the noise, I discovered something important: underneath modern AI is machine learning.
Machine learning is the thing powering almost everything we call AI today.
Later, I also got interested in reinforcement learning after watching different RL environments online. It genuinely looked like video games. Agents learning through trial and error, improving after every attempt, slowly figuring things out on their own. I loved it instantly.
Anyway, without wandering too much, this blog is my attempt to walk you through the fundamentals of machine learning in simple words. I’m nowhere near an expert yet, but I’ve learned a lot through different resources, especially Andrew Ng’s Machine Learning course, and I want to share those ideas in the simplest way possible.
⸻
I still remember the first time I truly understood machine learning.
I was watching Andrej Karpathy's explaining the working of LLMs. That was it. I got hooked immediately. Before that, I thought machine learning was all about memorizing complicated equations and impossible math. But it really isn’t. At its core, machine learning is about patterns. It’s about letting computers discover those patterns on their own instead of hard-coding every rule manually.
So what actually is machine learning?
The most common definition, and honestly still the best one I’ve found, is this:
Machine learning is a field of study that gives computers the ability to learn without being explicitly programmed.
⸻
Think about email spam filters.
Years ago, engineers had to manually write rules like: “If the email contains the phrase ‘Nigerian prince,’ mark it as spam.” But scammers adapted quickly. They changed words, formatting, and patterns. The rules kept breaking.
Today, instead of writing rules manually, we show algorithms millions of examples of spam and non-spam emails. The algorithm studies the patterns and learns by itself.
That’s machine learning.
Another way I like to explain it is this:
Machine learning is the art of teaching computers to recognize patterns in data and make predictions without giving them step-by-step instructions.
Everything else in AI basically builds on top of that idea.
⸻
Traditional programming works like this:
Input + Rules = Output
You write the rules yourself.
Machine learning flips the equation:
Input + Output = Rules
The machine figures out the rules on its own.
That’s the breakthrough.
⸻
For decades, computers were only good at tasks where humans could clearly define instructions. Things like calculating taxes, sorting numbers, or managing databases worked perfectly because the logic was straightforward. But some problems are too complicated for manual rules.
How do you explicitly program a computer to:
- recognize a cat in an image?
- understand human speech?
- recommend the perfect YouTube video?
- predict stock market behavior?
You can’t realistically write millions of tiny rules for every situation.
Machine learning solves this problem by allowing systems to learn from examples instead. Feed enough data into an algorithm, and it starts identifying hidden relationships on its own. That’s why machine learning became the foundation of modern AI.
At its heart, machine learning is really just pattern recognition.
Imagine showing a computer thousands of house listings with information like:
- square footage
- number of bedrooms
- location
- price
Eventually, the model notices relationships.
Bigger houses usually cost more. Better locations increase value. More bedrooms often affect pricing.
Using those patterns, the computer creates a mathematical model capable of predicting prices for houses it has never seen before.
That prediction ability is what makes machine learning powerful.
⸻
Andrew Ng’s course introduces three major types of machine learning. They sound intimidating at first, but you already interact with all of them in your everyday life.
1. Supervised Learning
Supervised learning is learning with an answer key.
We provide the algorithm with both the input and the correct output, almost like giving a student solved examples before a test.
For example, imagine predicting house prices.
Inputs:
- size
- location
- number of bedrooms
Output:
- price
The algorithm studies thousands of houses that have already been sold and learns the relationship between features and prices.
Spam detection works the same way.
Input:
- email text
Output:
- spam or not spam
The model studies labeled examples until it starts recognizing patterns by itself.
This is called supervised learning because humans provide the correct answers during training.
One major supervised learning task is called regression.
Regression is used when the output is a number.
Examples include:
- predicting house prices
- forecasting revenue
- estimating temperature
- predicting sales
A simple regression model tries to learn the relationship between inputs and outputs mathematically.
For example, larger houses usually cost more.
The algorithm attempts to draw the best possible line through the data so it can make accurate predictions for new examples.
Another supervised learning task is classification.
Sometimes we don’t want numerical predictions. We want decisions.
Questions like:
- Is this email spam?
- Is this transaction fraudulent?
- Does this image contain a cat?
- Is this tumor dangerous?
These are classification problems.
Instead of predicting numbers, the model predicts categories.
Classification systems power many AI applications we use daily.
⸻
2. Unsupervised Learning
Now imagine giving a machine data without any labels or answers.
No categories and instructions. Basically, no “correct” outputs.
That’s unsupervised learning.
The algorithm has to find structure in the data completely on its own.
A good example is customer segmentation.
Suppose a company has data about what people buy, how much they spend, and how often they visit a website. Nobody labeled customers as “luxury shoppers” or “budget buyers.” The algorithm groups similar people together automatically and discovers hidden patterns humans may never notice. Google News grouping similar articles from different websites is another example.
Unsupervised learning honestly feels magical sometimes because it uncovers structure inside chaos.
One common unsupervised learning technique is clustering.
Clustering simply means grouping similar things together.
Examples:
- similar customers
- similar songs
- similar movies
- similar user behavior
Spotify recommendations and many recommendation systems rely heavily on these ideas.
⸻
3. Reinforcement Learning
Reinforcement learning is completely different from the other two.
In RL, an agent interacts with an environment and learns through rewards and penalties.
Imagine teaching a computer to play chess.
The AI makes moves. If it wins, it receives positive feedback. If it loses, it receives negative feedback. Over millions of games, it slowly learns winning strategies on its own. No human manually teaches every move.
Another example is a robot learning how to walk in a simulation. It falls repeatedly at first, but every mistake helps it improve slightly until it eventually learns balance and movement.
Reinforcement learning is a massive field by itself, and honestly, I’m not goated enough yet to explain the deeper parts properly in this blog.
⸻
There are also a few terms you’ll hear constantly while learning machine learning.
Features
Features are simply the characteristics of your data.
If you’re predicting house prices, features could include:
- square footage
- number of bedrooms
- zip code
Think of features as spreadsheet columns.
Model
A model is the mathematical representation of the patterns the algorithm learned.
It’s the thing that actually makes predictions after training.
Training
Training is the process of feeding data into the algorithm so it can learn patterns.
You can think of it like repeatedly showing someone flashcards until they start recognizing answers automatically.
Generalization
Generalization is one of the most important ideas in machine learning.
A good model shouldn’t just memorize training examples. It should perform well on completely new, unseen data. Memorizing answers is not learning. It’s cheating. And cheating stops working the moment the questions change.
⸻
Thoughts
Alright, I’ve just given you some basic groundwork here. It’s not possible to write an entire book here, especially since I’m not an expert yet either. Now, you should go study mathematics and machine learning, and check out the resources below.
Now, Machine learning is often presented as something mysterious or almost magical. But underneath all the hype, the core idea is surprisingly simple:
Experience improves performance.
Humans learn from experience. Machines can too.
The difference is that machines can learn from millions of examples at a scale humans never could. That’s why machine learning is transforming almost every industry today. Honestly, I think it’s one of the most important inventions humanity has ever created.
It’s also one of the most interesting subjects I’ve studied recently. The deeper you go into it, the more everything starts making sense. There’s a lot of hype online, though, and honestly, most of it is noise.
Don’t get trapped by that.
Study deeply. Understand the fundamentals. Build things. Stay curious.
And remember this:
You’re literally what AI is trying to become.
-alok