How to think in machine learning

Thinking in machine learning is not the same as knowing its methods. It is the habit of looking at a messy situation, such as a shop losing stock or a support queue backing up, and seeing the prediction problem inside it: what is being predicted, from what information, and how wrong you are allowed to be. That habit can be trained deliberately, and it is what separates people who can use the field from people who can only describe it.

Ask what the data would have looked like

Every prediction problem assumes that, at prediction time, you will have the inputs. So the first question is retrospective: what would a row in the table have looked like last Tuesday, before the outcome was known? This immediately eliminates the seductive columns that only exist after the fact, such as a cancellation reason or a refund amount, and those are the source of most too-good results.

Ask three sub-questions in order. What is one row? What is the label, and who decided it? At the moment of prediction, which of these columns would genuinely be filled in? Answering them takes ten minutes and saves weeks of modelling the wrong thing.

Think in shapes and losses

Once a problem is a prediction problem, two design choices do most of the work. The shape says what the output is: one number, one class out of many, one label per token, one box per object. The loss says what counts as a good answer, and it encodes your priorities whether you intend it to or not. A model trained on average error will happily be terrible on the rare cases you care about most.

So say both out loud before you touch a library: “this predicts one probability per customer, and I am penalising mistakes on the rare group more heavily”. If that sentence is hard to say, the design is not yet clear.

Reason backwards from failure

Practitioners spend more time imagining failures than successes, and it is a skill you can borrow. Before training anything, list how the model could be wrong in a way that matters: a leak in the split, a feedback loop where predictions shape future data, a shift in behaviour after a policy change, a label that two annotators would code differently.

Then ask what evidence would reveal each failure, and put that evidence in your evaluation plan. This is cheaper than discovering it after deployment, and it converts vague worry into a checklist you can actually run.

Say the problem as a prediction question

A test for whether you are thinking in the field’s terms: can you state the problem as a single sentence with a subject, an input, an output, and a cost of error? If you can, the rest follows. If you cannot, no model choice will rescue you.

Then ask how you would know the system improved anything real, which is a different question from whether the score rose. Keeping both questions alive is what turns familiarity with the vocabulary into judgement.