Foundations

Choosing a Prediction Target Without Fooling Yourself

Define a label that matches your real goal, and avoid traps such as weak proxies, selective outcomes, unfinished time windows and leakage.

Key takeaways

  • Write the label definition as an exact procedure, including the time window and what happens to ambiguous cases.
  • A proxy target imports every gap between itself and your goal, and a more accurate model can widen the harm.
  • Outcomes observed only after a past decision are a filtered sample that can mislead you about everyone else.
  • Cases whose outcome window has not finished are unknown, and counting them as negatives biases the labels.
  • Check that the label cannot be rebuilt from any input, and review examples by hand before trusting it.

A good prediction target measures the thing you care about, can be recorded for the cases you will score, is known after a definite delay and cannot be reconstructed from information that sneaks in from the future. If it fails any of these, a model can score well and still be useless or harmful.

The target deserves more scrutiny than the algorithm. A model learns to predict exactly what the label column says, including its shortcuts, omissions and history.

The target is a definition

"Predict equipment failure" sounds complete. It is not. Does a planned replacement count? A sensor fault with a healthy machine? A stoppage fixed by restarting? And failure within the next hour, week or quarter?

Write the rule so that code can apply it: "label 1 if an unplanned work order of type A or B is opened for this machine in the 7 days after the snapshot time, otherwise 0". Then list the cases the rule handles badly and decide about each.

Pay attention to who creates the underlying records. If one site logs every minor fault and another only serious ones, the model will learn logging habits along with machine health.

Proxies and what they smuggle in

The thing you want is often unmeasurable or slow, so you substitute something close.

You care about Tempting proxy The gap
Reader satisfaction Clicks Misleading headlines get clicks
Health need Health care spending Spending also reflects access to care
Employee performance Manager ratings Ratings carry the rater's habits and biases
Crime Arrests Arrests reflect where enforcement looks
Product quality Returns Many unhappy buyers never return anything

The health case is well documented. A widely discussed 2019 study led by Ziad Obermeyer examined an algorithm that used expected cost as a stand-in for need and found that it understated the needs of Black patients, since less had been spent on their care at a given level of illness. The model could predict cost well and still rank people badly for the purpose.

To audit a proxy, take a sample where you can measure the real goal more carefully, by expert review or follow-up, and compare. Do the comparison by group as well as overall. If you must use a proxy, name it in every report.

Outcomes you only see after saying yes

A lender learns whether a loan is repaid only for loans it made. A hiring team sees performance only for people it hired. A fraud team confirms fraud mainly in cases it investigated.

This is the selective labels problem. Your training data describes the cases that passed an earlier filter, and that filter may have used information you do not have. Applicants who were approved despite weak numbers may have had other strengths, so they make weak numbers look safer than they are.

Treating the unobserved as negatives is worse still: it teaches the model that whatever nobody examined is fine. Options include randomly auditing a small share of cases where ethically and legally acceptable, using outside outcome data with proper permission, or restricting the claim to the population you actually observed. Statistical corrections exist, and each rests on assumptions you should state. Examples from lending or hiring here are teaching material only and not a validated procedure.

Get time right

Every supervised target on logged data has a timeline.

The timeline behind one training row
1 Observation period History used to compute features 2 Snapshot time The moment of prediction; nothing later is allowed 3 Gap, if needed Time required to act on the score 4 Outcome window Where the label is determined Observation period History used to compute features 1 Snapshot time The moment of prediction; nothing later is allowed 2 Gap, if needed Time required to act on the score 3 Outcome window Where the label is determined 4

A row is complete only when its outcome window has closed. Say your data was extracted at the end of June 30, 2026, and the target is cancellation within 90 days of the snapshot. The latest snapshot date with a full window is April 1, 2026. A May snapshot with no cancellation yet is unknown, not negative.

Marking those recent rows as 0 makes recent customers look loyal. Dropping only the unfinished non-cancellers while keeping the early cancellers skews the other way, so cut by snapshot date for everyone. If waiting for full windows costs too much data, survival analysis methods are designed for such censored observations.

The gap matters when action takes time. Predicting a failure one minute ahead may be easy and useless if ordering the part takes three days.

Leakage through the label

Because the label and some features often come from the same systems, they can contaminate each other.

  • A field such as "retention offer sent" is filled in only after a customer asks to leave.
  • A diagnosis code is entered at discharge, then used to predict that diagnosis at admission.
  • The target is "total spend next month" and a feature is a yearly total that includes next month.
  • Positive cases came from one database and negatives from another, so formatting alone separates them.

A warning sign is performance far beyond what experts think possible, often driven by one feature. Work through a leakage audit and make sure joins respect what was known at each point in time.

Negatives deserve a definition too

Teams spend effort on what counts as a positive and let everything else fall into class 0. Look at that remainder. In a fraud table, it holds transactions confirmed as legitimate, transactions nobody checked and frauds that have not yet been reported. Only the first group is known to be negative.

You have several honest choices. Exclude unverified cases, which may leave a sample unlike real traffic. Keep them as negatives and state that the model predicts "reported and confirmed fraud". Wait longer so that late reports arrive. Or review a random sample of unverified cases to estimate how many positives hide there.

The same care applies to sampling. If you keep all positives but only one negative in a hundred to save compute, the model's probabilities will be too high for real traffic. With uniform random sampling of negatives, you can correct them: multiply the predicted odds by the sampling fraction, here 0.01. A predicted probability of 0.5 means odds of 1, which become 0.01, a real probability of about 0.0099. Keep the evaluation set at natural proportions so that precision means what readers think it means.

Shape of the target

How you encode the outcome changes what the model can learn.

Turning a continuous quantity into yes or no discards information. If "late delivery" means more than 30 minutes, then 31 minutes and 5 hours become identical, while 29 and 31 minutes become opposites. Predicting the delay itself, or several quantiles of it, lets you move the threshold later.

Combining several outcomes into one score hides trade-offs. Weights that merge clicks, purchases and complaints are value judgments, so keeping separate predictions and combining them openly is often easier to defend.

Very rare targets may tempt you toward a broader, more common event. That can help if the two share causes, and mislead if they do not. Check on the rare event directly.

Targets that change because you predict them

Once you act on a score, you alter the outcomes you later train on. A successful intervention turns predicted failures into non-failures, and a retrained model may conclude those cases were never risky. A recommender sees clicks mostly on what it chose to show.

Record which cases received which action, keep a randomized holdout where acceptable, and read about feedback loops before the first retraining. Also ask whether people can game the target once they know it matters.

Test the definition before modeling

  1. Draw fifty labeled rows at random, positives and negatives.
  2. Read each with someone who knows the process, and mark disagreements.
  3. Count positives over time, and look for sudden jumps that signal a recording change.
  4. Plot the label rate by site, source system and group.
  5. Ask whether a perfect predictor of this label would solve the original problem.

The fifth question is the sharpest. If the honest answer is "only partly", say how, and decide whether the part is worth having. This step belongs in the wider work of framing a business question.

Common questions

Can I change the target midway through a project?

Yes, and it is often wise after reading real examples. Treat the new definition as a new version, rebuild the evaluation sets and avoid comparing scores across definitions.

What if experts disagree on the correct label?

Measure the disagreement, improve the written guidance and consider recording the uncertainty. A model cannot be reliably more consistent with "the truth" than the definition allows you to verify.

Written for 4MachineLearning with AI writing tools and not reviewed line by line by a person. Check anything you rely on against a textbook or primary source. Report an error.

Keep reading

All 42 articles in Foundations →

Latest news on this topic