What Machine Learning Is — Programs That Learn from Data

Most of this blog's AI content sits on top of machine learning without ever defining it. This series fixes that from the ground up: before transformers and LLMs, before fine-tuning and RAG, there is the plain idea of a program that improves at a task by learning patterns from data instead of being explicitly told the rules. Understanding that idea — and its three core flavors — is the foundation everything else in modern AI is built on.

This series is for engineers fluent in the LLM world who never built the classical-ML floor underneath it. It’s the companion to the applied series (fine-tuning, inference, evaluation): here we start at the beginning — what learning from data actually means, the kinds of problems it solves, and the vocabulary (features, models, training, generalization) that the rest of AI assumes you already have. Post 1 defines the whole field.

The shift: from rules to examples

Traditional programming is rules in, answers out: you write explicit logic (if income > X and debt < Y then approve) and the program applies it. This works when you can state the rules. It fails when you can’t — nobody can write the explicit rules that distinguish a cat from a dog in a photo, or flag a fraudulent transaction among millions of legitimate ones, because the “rules” are too numerous, too fuzzy, and too entangled for a human to enumerate.

Machine learning inverts the arrangement: examples in, rules out. Instead of writing the logic, you show the system many examples of inputs paired with correct outputs, and an algorithm learns the patterns that map one to the other. You don’t program the rule for “fraud”; you show the system thousands of transactions labeled fraud/not-fraud, and it infers a rule. The classic definition: a program learns from experience (data) if its performance at a task improves with more experience. The deliverable of that learning is a model — a mathematical function, with parameters tuned by the data, that maps new inputs to predicted outputs.

This is why ML took over: for a huge class of problems — perception, language, prediction, recommendation — it is far easier to collect examples than to write rules, and the learned rules are better than any a human could hand-code. Every LLM is this idea at enormous scale: not programmed to write, but trained on text until it learned the patterns.

The vocabulary you need

A few terms recur through all of ML, and pinning them down now makes everything later clearer:

Keep one distinction above all: a model that memorizes its training data is worthless; a model that generalizes to new data is valuable. Everything in ML — evaluation, regularization, the train/test split — exists to chase generalization.

The three kinds of learning

Machine learning divides into three paradigms by what signal the algorithm learns from, and knowing which one a problem is is the first modeling decision:

A useful fourth category, self-supervised learning, powers modern LLMs: the data labels itself (predict the next word from the preceding words), giving supervised-style learning on unlabeled text at massive scale. It’s why foundation models exist — the internet became a labeled dataset for free.

The throughline: ML is the move from writing rules to learning them from examples, producing a model (a parameterized function) whose only real goal is to generalize to new data. It splits by learning signal into supervised (labeled examples — classification/regression, the workhorse), unsupervised (unlabeled — find structure), and reinforcement (interaction and reward), with self-supervised learning (data labeling itself) powering today’s foundation models. This is the floor the entire AI stack stands on, and the rest of the series builds it up one concept at a time.

Key takeaways

Further reading

Sources & References