Extract a feature column

A feature column contains one input value per example.

A feature column contains one input value per example. Extract file size without passing the measured duration into the prediction input.

Work through the example

Two examples give two feature values, [1, 2]. The feature vector has length 2.

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

rows = [(1,2),(2,4)]
features = [size for size,seconds in rows]
print(features, len(features))

Expected output

[1, 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