Machine Learning (ML)
A branch of AI where systems learn patterns from data to make predictions or decisions.
Instead of writing explicit rules, engineers give a machine-learning algorithm examples and let it discover the patterns. The result is a model that can generalize to new data it has never seen.
The three classic flavors are supervised learning (learning from labeled examples), unsupervised learning (finding structure in unlabeled data) and reinforcement learning (learning from rewards). Deep learning is machine learning with large neural networks.
💡 Example: A bank trains a model on past transactions labeled "fraud" or "legit" so it can flag suspicious new ones.
Machine learning in plain English
Machine learning (ML) means teaching a computer by example. Instead of programming every rule, you give an algorithm lots of examples, such as past house sales with their prices, and it works out a pattern it can apply to new cases it has never seen.
How machine learning works, step by step
- Collect examples. This is the training data, for instance 50,000 emails each marked “spam” or “not spam”.
- Train a model. The algorithm adjusts its internal settings (its parameters) until its guesses on the training examples are as good as possible.
- Test it on new data. A model that only memorized the training set is overfitting. What matters is how well it does on examples it hasn't seen.
- Use it. Making predictions with a trained model is called inference.
The three main types of machine learning
| Type | Learns from | Everyday example |
|---|---|---|
| Supervised learning | Examples with the right answer attached | Predicting house prices; flagging fraud |
| Unsupervised learning | Examples without labels; it finds structure | Grouping customers with similar habits |
| Reinforcement learning | Trial, error and rewards | Game-playing agents; robot control |
Machine learning vs AI vs deep learning
AI is the big goal: machines that act intelligently. Machine learning is the main way AI is built today. Deep learning is a powerful kind of machine learning that uses many-layered neural networks and drives image recognition, speech and chatbots. Our guide machine learning vs deep learning explains the difference with a side-by-side table.
Where you meet machine learning
- Card-fraud alerts from your bank.
- “Because you watched…” recommendations.
- Spam and phishing filters.
- Delivery-time and demand forecasts.
- Photo apps that group pictures by face.
Frequently asked questions
Is machine learning the same as AI?
Not exactly. Machine learning is a subset of AI. All machine learning is AI, but some AI, like a hand-written rule system, is not machine learning.
Do I need to know math to understand machine learning?
Not to understand the ideas. Building models from scratch uses statistics, linear algebra and calculus, but the core concepts (examples, patterns, testing on new data) need no math at all.
Ready to learn more? Read Machine Learning Explained, then try the Medium AI quiz, which has plenty of machine-learning questions.