Design the Training Table Before Choosing an Algorithm
The model can only learn from the problem representation you give it. Before tuning, define what one row means.
TL;DR: Your training table is part of the model. Before model selection, define what one row represents, when the prediction is made, what history is available, and what future outcome you are predicting. A strong algorithm cannot recover information that was never represented — and a flexible model can look impressive while learning target leakage, inconsistent observation windows, accidental proxies, unstable aggregates, or the wrong unit of analysis.
Visual Summary
The Problem
Before model selection, hyperparameter tuning, or ensembling, there is a more fundamental decision: what does one row represent? In many tabular ML projects, that decision shapes most of what the model can learn.
Call it an Analytical Base Table, a feature table, or a training dataset. Its design determines the observation unit, the prediction timestamp, the feature observation window, the aggregation level, the behavioural signals represented, the target definition, and the information available at prediction time.
A churn model can mean very different things depending on whether one row represents one customer, one customer-month, one customer at a campaign decision date, or one customer-product-period. Those choices affect the target, the feature logic, the validation design, and the real business action the model can support.
That is why I do not treat the training table as a preprocessing detail. It is the translation layer between a business process and a learning problem.
The Approach
A useful training table makes five choices explicit. They are not independent technical settings; they have to describe the same decision setting.
Observation unit
What entity or event does one row represent? One customer, one customer-month, one customer at a campaign decision date, or one customer-product-period. The wrong unit changes the target, the features, and the action the model can support.
Prediction timestamp
When is the decision made? Every training row needs a prediction timestamp t. The table should recreate what was knowable at that moment — not what became known later. Future outcome information must not enter the feature window.
Feature window
What history is available before t? Recent activity, historical trend, segment comparison, and known external signals can be valid features only if they were available at prediction time.
Granularity and behavioural dimensions
Is the table organised by customer, product, day, region, or something else? Which meaningful signals are represented? Features, targets, and granularity must describe the same decision setting.
Target definition
What future outcome matters, and over what window? Define the target after the observation unit and the available information are clear — not before.
A strong algorithm cannot recover information that was never represented. And a flexible model can look impressive while learning target leakage, inconsistent observation windows, accidental proxies, unstable aggregates, or the wrong unit of analysis.
The Outcome
The model still matters. But before asking “Which algorithm should we use?”, ask: “Does this table represent the decision we are actually trying to improve?”
A simpler model on a well-designed training table is often a stronger starting point
than a sophisticated model trained on a distorted one. Good modelling begins before
model.fit().
Key Takeaway
Design insight: The training table is not a preprocessing detail; it is the model’s view of the business decision. Before tuning, make five choices explicit: what one row represents, when the prediction is made, what history is available, how granular and behavioural the features are, and what future outcome defines the target. If those choices do not describe the same decision setting, a flexible model can learn target leakage, inconsistent windows, accidental proxies, unstable aggregates, or the wrong unit of analysis. A simpler model on a well-designed table is often the stronger starting point.
FAQ
What is the first decision in training table design?
Define what one row represents. The observation unit determines the target, the feature logic, the validation design, and the business action the model can support.
Why does a training table need a prediction timestamp?
It recreates what was knowable when the decision was made. The feature window must stop at t, and the target window must start after t; otherwise future outcome information can leak into the features.