What is Machine Learning?
Theme
Palette
Download
Caption (tap to copy)
📖 Deep dive (full written explanation)
This cover frames the entire day by contrasting machine learning with the kind of programming everyone learns first. In ordinary software a human author sits down and writes the rules explicitly: if the input looks like this, return that. Machine learning inverts the relationship — you supply examples of inputs and the answers you want, and the system derives the rules on its own.
The post deliberately leads with the concept rather than algorithms or math. ML is a way of building software, and once you understand that the rules are learned from data rather than handwritten, every specific technique you meet later — regression, trees, neural networks — slots in as a different method for the same underlying goal.
Machine learning is the discipline of constructing programs that improve at a task by learning patterns from data instead of executing hand-coded instructions. You present a model with examples — inputs paired with the outputs you'd like — and a training procedure adjusts the model until it reliably produces good outputs, including on inputs it has never encountered.
The phrase to hold onto is 'discovered, not coded'. A traditional program's behavior is fully specified by its author. An ML model's behavior emerges from the data it was trained on. That single shift is what makes ML powerful for problems no one can fully specify, and also what makes it fail in ways traditional code never does.
This comparison is the heart of the concept post. In traditional programming you provide data and rules, and the computer produces answers; you, the author, own the logic and it is explicit in the source. The weakness is that you must anticipate every case, and real inputs always include cases you forgot.
Machine learning flips the arrows: you provide data and the answers, and the computer produces the rules. The logic is statistical rather than explicit, which lets the system generalize from examples to situations you never enumerated. Seeing the two arrangements side by side makes the definition concrete — ML is, almost literally, programming with the inputs and outputs swapped.
Features and labels are the vocabulary you'll use constantly, so they earn an early slide. A feature is any input variable the model can observe: the square footage of a house, the pixels of an image, the words in an email. A label is the target you want predicted: the sale price, the digit in the image, whether the email is spam.
Training is the process of showing the model many feature/label pairs so it can learn the mapping from one to the other. Getting fluent with this framing pays off immediately, because nearly every supervised ML problem reduces to 'I have these features, I want to predict this label', and the whole toolkit is organized around that shape.
A model is best understood as a function with adjustable internal numbers called parameters. Before training those numbers are arbitrary and the function's outputs are useless. Training is the act of tuning the parameters so the function maps your example inputs to the correct outputs as closely as possible.
Once training finishes, the model is simply that fitted function frozen in place. Using it — 'inference' — means feeding new features through the same function to get a prediction. Demystifying the model as 'a function whose knobs were tuned by data' removes much of the mystique: linear regression, a decision tree, and a neural network differ only in the shape of the function and how its parameters are tuned.
This code slide makes the abstract definition runnable in five lines. The features X are house sizes, the labels y are their prices, and LinearRegression().fit(X, y) tunes the line that best maps size to price. Calling predict on a new, unseen size returns the model's estimate.
The slide is worth studying because it mirrors the universal scikit-learn pattern: assemble X and y, create a model, call fit, then call predict. Almost every supervised model in Python follows this exact rhythm regardless of how complex it is internally, so internalizing it here means you already know the skeleton of nearly every example to come.
This mind map lays out the three broad families of machine learning so you can place any technique you encounter. Supervised learning uses labeled data to predict an output from inputs — the most common case in practice. Unsupervised learning has no labels and instead finds structure, like clustering customers or compressing data. Reinforcement learning has no fixed answers either; an agent learns by acting in an environment and receiving rewards.
The value of the map is orientation. When you meet a new algorithm, asking 'which of these three is it?' immediately tells you what kind of data it needs and what kind of problem it solves, which is far more useful than memorizing algorithms in isolation.
Supervised learning gets its own slide because it's where the overwhelming majority of practical ML lives and where you should almost always start. The setup is simple: you have inputs paired with known correct answers, the model learns the mapping, and then it predicts answers for new inputs.
The two flavors are worth distinguishing. Classification predicts a category from a fixed set — spam or not spam, which of three flower species. Regression predicts a continuous number — a price, a temperature, a demand forecast. The practical rule of thumb is that if you can produce labeled examples for your problem, supervised learning is usually the most direct and reliable path to a working model.
This stack diagram untangles four terms people constantly conflate. Artificial intelligence is the broadest: any machine doing something that seems intelligent, including old-fashioned rule systems. Machine learning is the subset of AI that learns from data. Neural networks are a particular family of ML models built from layered units. Deep learning is neural networks with many layers.
The nesting matters because the words are used loosely in marketing. Seeing them as concentric — AI contains ML, ML contains neural networks, and deep learning is the deep end of those networks — lets you read a headline and know roughly what is actually being described, rather than treating the terms as interchangeable buzzwords.
These five bullets are the recitable mental model for the whole day. Traditional code writes rules while ML learns them. The basic transaction is features in, label out. A model is just a function whose parameters were tuned by data. Supervised learning means examples that come with answers. And deep learning is one subset of the larger ML field, not a synonym for it.
If you remember only this slide you already have the working frame for everything that follows. The later posts add the motivation, the mechanics of training, a hands-on example, and the common pitfalls on top of these five sentences.
This mistake slide guards against the single most damaging misconception about ML: that the model understands anything. It does not. It finds and exploits statistical regularities in the specific data you trained it on. There is no comprehension, no common sense, and no ability to reason beyond the patterns present in the examples.
The practical consequences are concrete. If the relevant pattern isn't in the data, the model can't learn it. If the data is biased, the model inherits and often amplifies the bias. If the data is too small, the model latches onto noise. Treating ML as a powerful but literal-minded pattern-matcher — rather than an oracle — sets correct expectations and prevents a whole class of disappointments.
This closes the conceptual post and points forward. Now that you know what machine learning is, how it differs from traditional programming, and the objects it's built from, the next post tackles why it matters at all — the classes of problems that learned models solve and that rules-based code never could.