Rows, Features, and Labels
Every row must mean one thing
A dataset is an organized collection of examples. In a table, each row is one observation - perhaps one customer, transaction, image, or five-minute time window. A feature is an input fact available to the model, represented by a column such as queue_depth. A label or target is the known answer the model is asked to learn, such as breached_slo.
timestamp | queue_depth | error_rate | breached_slo
10:00 | 14 | 0.01 | 0
10:05 | 91 | 0.12 | 1
The unit of analysis is what one row represents. Mixing one-row-per-user with one-row-per-event creates duplicate influence and confusing labels. The schema describes column names, types, meanings, and constraints. Shape matters too: in common Python notation X holds the rectangular feature matrix with shape (rows, features), while y holds one target value per row.
Analogy: A dataset is a stack of case files. Each file must describe the same kind of case, use the same form fields, and attach the correct outcome sheet. Otherwise the model is comparing mismatched paperwork.
Warning: A row identifier can be useful for tracing an error back to its source, but it is rarely a meaningful feature. Remove IDs from model inputs unless their predictive meaning is deliberate and defensible.