Machine Learning
What is it?
Machine learning is a way of building software that learns patterns from examples instead of being explicitly programmed with rules.
Explain like I'm 5
Why was it created?
Some tasks are too complex or fuzzy to code by hand. ML was developed so programs can learn the rules themselves from data.
Where is it used?
- Spam and fraud detection
- Recommendations
- Demand forecasting
- Image and speech recognition
Why should developers care?
ML powers recommendations, spam filters, forecasts, and most modern AI. It's a core skill area across the industry.
How does it work?
You feed an algorithm labeled or historical data, and it adjusts an internal model to minimize errors. Once trained, the model makes predictions on new, unseen data.
Real-world example
An email service trains a model on millions of emails marked spam or not, then uses it to filter new incoming mail automatically.
Common use cases
- Classification (spam or not)
- Prediction (sales next month)
- Clustering similar items
- Recommendation systems
Advantages
- Learns complex patterns
- Improves with more data
- Automates judgment-like tasks
- Adapts as data changes
Disadvantages
- Needs quality data
- Can learn biases in the data
- Predictions aren't guaranteed correct
- Models can drift over time
When should you use it?
When patterns in data can solve a problem better than fixed rules.
When should you avoid it?
When a clear rule works, or when you lack representative data.
Alternatives
Related terms
Interview questions
Beginner
- What is machine learning?
- What is training data?
Intermediate
- What is the difference between supervised and unsupervised learning?
- What is overfitting?
Senior
- How do you detect and handle model drift in production?
- How do you guard against bias in training data?
Common misconceptions
- "ML models understand the data" — they find statistical correlations, not meaning.
- "More data always helps" — biased or low-quality data can make a model worse.
Fun facts
- The phrase 'machine learning' was popularized in the late 1950s.
- Supervised, unsupervised, and reinforcement learning are its three broad styles.
Timeline
- 1959 — The term 'machine learning' is popularized
Learning resources
Quick summary
Machine learning builds software that learns patterns from data to make predictions, instead of relying on hand-written rules.
Cheat sheet
- Learns patterns from examples
- Train a model, then predict
- Supervised vs unsupervised
- Only as good as its data