Machine Learning
A subset of AI where systems learn patterns from data rather than following explicitly programmed rules, improving their performance as they see more examples.
Why it matters
Machine learning is the engine behind almost every AI product you use. Knowing how it learns helps you understand why AI systems behave the way they do and where they fail.
How it differs from traditional programming
In traditional software, a developer writes rules: "if the email contains these words, mark it as spam." In machine learning, you give the system thousands of labeled examples — spam and not-spam — and it figures out the rules itself. The result is a model: a mathematical function that maps inputs to outputs based on patterns it discovered in the training data.
Three types of learning
- Supervised learning — learns from labeled examples. You provide input-output pairs and the model learns the mapping. Most common in practice: classification, regression, translation.
- Unsupervised learning — finds structure in unlabeled data. Clustering, anomaly detection, dimensionality reduction. Useful when you do not know what patterns to look for.
- Reinforcement learning — learns by trial and error, receiving rewards or penalties. Used in game-playing AI, robotics, and the RLHF step that makes language models more helpful.
The training loop
All ML follows the same basic cycle: feed data in, make a prediction, measure how wrong it was, adjust the model slightly, repeat. This loop runs millions or billions of times during training. The quality of the training data determines the ceiling of what the model can learn.