Keep target values aligned with their inputs

A target belongs to the same example as its input.

A target belongs to the same example as its input. Separate the columns while preserving row order, then zip them back together to check alignment.

Work through the example

The pairs must remain (1, 2) and (2, 4). Swapping targets changes the training examples.

Run the example as a separate Python file. The inputs are synthetic so you can change them and see exactly which assumption affects the result.

Run the example

x, y = [1,2], [2,4]
print(list(zip(x,y)))
print(list(zip(x,reversed(y))))

Expected output

[(1, 2), (2, 4)]
[(1, 4), (2, 2)]

Reference: https://developers.google.com/machine-learning/glossary#feature

The team guide · My original notes on testing coding agents · Working with Lightbulb Partners