What is Machine Learning?
Table of Contents + −
In the previous tutorial, we learned that Artificial Intelligence (AI) is a technology that helps computers perform tasks that normally require human intelligence.
But this gives us an important question:
How can a computer learn to perform these tasks?
This is where Machine Learning (ML) comes in.
📈 What is Machine Learning?
Machine Learning is a way of building AI systems where computers learn patterns from data and use those patterns to make predictions or decisions.
In simple words:
Instead of writing every rule ourselves, we give the computer data and let it learn the patterns from that data.
Let’s understand this with an example.
💡 A Simple Example: Cat or Dog?
Suppose you want to create a program that can identify whether a picture contains a cat or a dog.
You could try to write rules:
The problem is that both cats and dogs have most of these features.
There can also be thousands of different types of cats and dogs.
Writing all these rules manually would be extremely difficult.
Instead, we can give the computer many examples.
The computer analyses these examples and learns patterns.
Then we can give it a new picture:
This is the basic idea behind Machine Learning.
⚖️ Traditional Programming vs Machine Learning
This is one of the most important differences to understand.
Traditional Programming
In traditional programming, we provide the rules.
For example, to calculate the price after applying a discount:
Price = ₹1,000Discount = 10%
Final Price = ₹900We explicitly write the calculation.
The process looks like:
Machine Learning
With Machine Learning, the approach is different.
We provide:
- Data
- Examples
- Expected results
The machine-learning system learns patterns from those examples.
So the key difference is:
| Traditional Programming | Machine Learning |
|---|---|
| Developer writes rules | Model learns patterns |
| Rules are explicit | Patterns are learned |
| Program + data → result | Data + examples → model |
| Usually deterministic | Often probabilistic |
🗃️ What is Data?
Before going further, we need to understand one important word: data.
Data is simply information that we provide to a computer.
For example:
Name Age SalaryRahul 25 ₹40,000Priya 30 ₹60,000Amit 28 ₹50,000This is data.
Images are also data.
Text is data.
Audio is data.
Videos are data.
Almost anything that can be stored and processed by a computer can be used as data.
📌 What Does “Learning” Mean?
When we say that a machine-learning model learns, it does not mean that the computer thinks like a human.
It means the system processes many examples and adjusts its internal mathematical values so that its predictions become better.
For example:
We don’t need to understand the mathematics yet.
For now, remember:
Machine Learning uses data to find patterns that can be used to make predictions.
📈 What is a Machine Learning Model?
You will hear the word model many times in AI.
A machine-learning model is the result of the learning process.
Think of it like this:
For example, suppose we provide thousands of house records:
SizeLocationNumber of bedroomsAge of housePriceThe model can learn relationships between these values.
Later, if we provide a new house:
Size: 1,500 sq ftBedrooms: 3Location: BangaloreAge: 5 yearsthe model can estimate its price.
⚙️ Training and Prediction
Machine Learning usually has two important stages.
1. Training
During training, the model learns from existing data.
2. Prediction
After training, we give the model new data.
For example:
The predicted value may not be perfectly correct. It is an estimate based on the patterns learned from the training data.
🤔 Why Do We Need Machine Learning?
Some problems are easy to solve using normal programming.
For example:
5 + 10 = 15We don’t need Machine Learning for this.
We can simply write:
result = 5 + 10But consider a different problem:
Can you identify whether an email is spam?
There can be millions of different spam messages.
It would be difficult to write a rule for every possible spam message.
Machine Learning can learn patterns from previous examples.
This is where Machine Learning becomes useful.
💡 Another Real-World Example: YouTube Recommendations
Suppose you regularly watch:
- Java tutorials
- Spring Boot tutorials
- React tutorials
- Software engineering videos
A recommendation system can analyse your activity.
The system isn’t simply following one rule like:
IF user watches JavaTHEN show Spring BootModern recommendation systems can use many signals and learn complex patterns from large amounts of data.
⚠️ Machine Learning is Not Always Perfect
This is very important.
A machine-learning model learns from the data it receives.
If the data is:
- Too small
- Incorrect
- Biased
- Poor quality
- Not representative
the model may produce poor results.
For example:
But:
This is why data quality is extremely important in Machine Learning.
⚖️ Different Types of Machine Learning
There are several major approaches to Machine Learning.
The three commonly discussed categories are:
Don’t worry if these names are new.
We’ll understand each one separately.
Supervised Learning
The model learns using examples where the correct answer is already provided.
Unsupervised Learning
The model receives data without predefined answers and tries to find patterns or groups.
Reinforcement Learning
The system learns by taking actions and receiving rewards or penalties.
We’ll cover these in detail later.
🤖 Machine Learning and AI
Now we can update our understanding of AI.
So:
AI is the broader field, and Machine Learning is one of the major ways of building AI systems.
🧱 What About Deep Learning?
You may have heard another term:
Deep Learning is a type of Machine Learning that uses neural networks with multiple layers.
So our hierarchy becomes:
And this is very important for our Generative AI journey.
Modern Generative AI systems such as large language models are built using deep-learning techniques.
But before we jump there, we need to understand Deep Learning and Neural Networks properly.
🧩 Key Points
Let’s summarise what we learned.
-
Machine Learning
Machine Learning is a way of building AI systems that learn patterns from data and use those patterns to make predictions or decisions.
-
The basic process
-
Traditional programming
-
Machine Learning
-
Most importantly
Machine Learning is not the same as AI.
Machine Learning is a major part of AI.
Now we know what Machine Learning is.
The next question is:
How does Machine Learning actually learn patterns from data?
To answer that, we’ll look at the three major types:
We’ll understand each one with simple real-world examples, before moving to Deep Learning.