The data workflow
The course pathway (Ask, Collect, Check, Interpret, Coach, Reassess) says why each piece of work is done. These nine steps say what is done to the data on the way. They are the steps of the Machine Learning for Engineers course'sData Engineering pages, shown here with what each means for athlete data and the mistake it most often hides. Every tutorial marks the steps it uses.
1 Gather Collect
A watch export, a phone video, a chest-strap file, a sensor log and a paper log, brought into one folder and joined on time or on a key. The raw file is never edited.
The mistake it hides: Joining on time across two clocks that disagree; editing the original.
Book: 4.2 Tables and time series, 4.4 Resampling and aligning · Appendix F Data formats · Engineering version: Gather data
Tutorials that practice this step (40)
- Q-1 Run your first cell and change one number (week 1)
- Q-2 Step through a video one frame at a time (week 1)
- Q-3 Pace from distance and time, checked three ways (week 1)
- CS-1 How high did I jump? (week 1)
- Q-4 Type a small table and plot it (week 2)
- Q-6 A first-order response: heart rate after a step (week 2)
- CS-2 A step test and a first straight line (week 2)
- CS-3 Predict the arc of a jump (week 3)
- Q-10 Open a phone sensor log and plot it (week 4)
- Q-11 Write a data dictionary for one file (week 4)
- Q-12 Find and mark the missing values without deleting anything (week 4)
- CS-4 A messy watch export to a clean table (week 4)
- CS-5 Phone in a pocket: walk, jog, or run? (week 4)
- Q-13 Find the beats in ten seconds of ECG (week 5)
- Q-14 Heart rate from beat intervals (week 5)
- Q-15 One night's RMSSD (week 5)
- CS-6 From a chest-strap recording to a recovery number (week 5)
- Q-16 Open an activity file and list its fields (week 6)
- Q-17 Split a run into laps (week 6)
- Q-18 Count steps from an accelerometer (week 6)
- Q-40 Export a run from the running simulator and read it (week 6)
- Q-41 Drag and rolling resistance from a cycling-simulator export (week 6)
- CS-7 Critical speed from a watch archive (week 6)
- Q-19 Interpolate a threshold from four points (week 7)
- Q-20 Find the lag between two signals (week 7)
- Q-21 Sweat rate from two weighings (week 7)
- CS-8 Find a lactate threshold, and see if it moved (week 7)
- CS-9 A season of load: fitness, fatigue, and a taper (week 7)
- Q-22 Detect a person in one image (week 8)
- Q-23 Read a video frame by frame and save every tenth frame (week 8)
- CS-10 Pose estimation, frame by frame (week 8)
- CS-12 The body-weight force of each foot plant (week 9)
- CS-13 Predicting peak left-leg force (week 9)
- Q-29 Median and spread of ten trials (week 10)
- Q-30 Track a ball and fit its path (week 10)
- CS-14 The arc of a shot or a throw (week 10)
- CS-15 Is the change real? One test, twelve weeks (week 11)
- CS-16 Forecast next week, and beat "same as last week" (week 11)
- Q-36 Read a results file in the browser (week 12)
- CS-17 From a notebook to a page an athlete can open (week 12)
2 Statistics Check
Count, mean, spread and quartiles per session and per athlete: a profile that shows how much data there is and how good it is.
The mistake it hides: Pooling athletes and reading the pooled mean as if it described one of them.
Book: 4.6 Describing data · 11.1 One athlete, many days · Engineering version: Statistics
Tutorials that practice this step (36)
- Q-1 Run your first cell and change one number (week 1)
- Q-2 Step through a video one frame at a time (week 1)
- Q-3 Pace from distance and time, checked three ways (week 1)
- CS-1 How high did I jump? (week 1)
- Q-5 Fit a straight line and read the slope's units (week 2)
- CS-2 A step test and a first straight line (week 2)
- Q-7 The angle from three points (week 3)
- Q-8 Speed from positions, and what noise does to it (week 3)
- Q-9 Fit a parabola to a flight and recover gravity (week 3)
- CS-3 Predict the arc of a jump (week 3)
- Q-10 Open a phone sensor log and plot it (week 4)
- Q-11 Write a data dictionary for one file (week 4)
- Q-12 Find and mark the missing values without deleting anything (week 4)
- CS-4 A messy watch export to a clean table (week 4)
- CS-5 Phone in a pocket: walk, jog, or run? (week 4)
- Q-14 Heart rate from beat intervals (week 5)
- Q-15 One night's RMSSD (week 5)
- CS-6 From a chest-strap recording to a recovery number (week 5)
- Q-16 Open an activity file and list its fields (week 6)
- Q-17 Split a run into laps (week 6)
- CS-7 Critical speed from a watch archive (week 6)
- Q-21 Sweat rate from two weighings (week 7)
- CS-8 Find a lactate threshold, and see if it moved (week 7)
- CS-9 A season of load: fitness, fatigue, and a taper (week 7)
- Q-22 Detect a person in one image (week 8)
- Q-23 Read a video frame by frame and save every tenth frame (week 8)
- Q-24 Seventeen keypoints for one frame, as a table (week 8)
- CS-10 Pose estimation, frame by frame (week 8)
- CS-11 From keypoints to a knee angle over a stride (week 8)
- CS-12 The body-weight force of each foot plant (week 9)
- CS-13 Predicting peak left-leg force (week 9)
- Q-29 Median and spread of ten trials (week 10)
- CS-14 The arc of a shot or a throw (week 10)
- Q-33 A rolling mean and a band (week 11)
- CS-15 Is the change real? One test, twelve weeks (week 11)
- CS-16 Forecast next week, and beat "same as last week" (week 11)
3 Visualize Check
A first look at the raw data for range, gaps and bad values, before any model: −9999 codes, heart-rate dropouts, GPS jumps, keypoint spikes.
The mistake it hides: Plotting only the cleaned data, so the faults are never seen.
Book: 4.7 Charts that make one point · Engineering version: Visualize
Tutorials that practice this step (43)
- Q-2 Step through a video one frame at a time (week 1)
- CS-1 How high did I jump? (week 1)
- Q-4 Type a small table and plot it (week 2)
- Q-5 Fit a straight line and read the slope's units (week 2)
- Q-6 A first-order response: heart rate after a step (week 2)
- CS-2 A step test and a first straight line (week 2)
- Q-7 The angle from three points (week 3)
- Q-8 Speed from positions, and what noise does to it (week 3)
- Q-9 Fit a parabola to a flight and recover gravity (week 3)
- CS-3 Predict the arc of a jump (week 3)
- Q-10 Open a phone sensor log and plot it (week 4)
- Q-12 Find and mark the missing values without deleting anything (week 4)
- CS-4 A messy watch export to a clean table (week 4)
- CS-5 Phone in a pocket: walk, jog, or run? (week 4)
- Q-13 Find the beats in ten seconds of ECG (week 5)
- Q-14 Heart rate from beat intervals (week 5)
- Q-15 One night's RMSSD (week 5)
- CS-6 From a chest-strap recording to a recovery number (week 5)
- Q-16 Open an activity file and list its fields (week 6)
- Q-17 Split a run into laps (week 6)
- Q-18 Count steps from an accelerometer (week 6)
- Q-40 Export a run from the running simulator and read it (week 6)
- Q-41 Drag and rolling resistance from a cycling-simulator export (week 6)
- CS-7 Critical speed from a watch archive (week 6)
- Q-19 Interpolate a threshold from four points (week 7)
- Q-20 Find the lag between two signals (week 7)
- CS-8 Find a lactate threshold, and see if it moved (week 7)
- CS-9 A season of load: fitness, fatigue, and a taper (week 7)
- Q-22 Detect a person in one image (week 8)
- Q-23 Read a video frame by frame and save every tenth frame (week 8)
- Q-24 Seventeen keypoints for one frame, as a table (week 8)
- CS-10 Pose estimation, frame by frame (week 8)
- CS-11 From keypoints to a knee angle over a stride (week 8)
- Q-25 Find foot contacts in an ankle trace (week 9)
- CS-12 The body-weight force of each foot plant (week 9)
- CS-13 Predicting peak left-leg force (week 9)
- Q-29 Median and spread of ten trials (week 10)
- CS-14 The arc of a shot or a throw (week 10)
- Q-33 A rolling mean and a band (week 11)
- CS-15 Is the change real? One test, twelve weeks (week 11)
- CS-16 Forecast next week, and beat "same as last week" (week 11)
- Q-37 One chart that makes one point (week 13)
- CS-18 A one-page progress report (week 13)
4 Cleanse Check
Rules written before the data are seen, applied to a copy, with a change log: dropouts, low-confidence keypoints, a failed sensor.
The mistake it hides: Removing the outlier that was the event: a personal best and a fall both look like outliers.
Book: 4.3 Cleaning · 8.7 Cleaning keypoints · Engineering version: Cleanse
Tutorials that practice this step (23)
- CS-1 How high did I jump? (week 1)
- CS-3 Predict the arc of a jump (week 3)
- Q-11 Write a data dictionary for one file (week 4)
- Q-12 Find and mark the missing values without deleting anything (week 4)
- CS-4 A messy watch export to a clean table (week 4)
- CS-5 Phone in a pocket: walk, jog, or run? (week 4)
- Q-15 One night's RMSSD (week 5)
- CS-6 From a chest-strap recording to a recovery number (week 5)
- CS-7 Critical speed from a watch archive (week 6)
- Q-20 Find the lag between two signals (week 7)
- Q-21 Sweat rate from two weighings (week 7)
- CS-8 Find a lactate threshold, and see if it moved (week 7)
- CS-9 A season of load: fitness, fatigue, and a taper (week 7)
- CS-10 Pose estimation, frame by frame (week 8)
- CS-11 From keypoints to a knee angle over a stride (week 8)
- Q-25 Find foot contacts in an ankle trace (week 9)
- CS-12 The body-weight force of each foot plant (week 9)
- CS-13 Predicting peak left-leg force (week 9)
- Q-28 Height from flight time, with one frame of error (week 10)
- CS-14 The arc of a shot or a throw (week 10)
- CS-15 Is the change real? One test, twelve weeks (week 11)
- CS-16 Forecast next week, and beat "same as last week" (week 11)
- Q-36 Read a results file in the browser (week 12)
5 Features Interpret
Contact and flight time, duty factor, joint angles at an event, rolling load, categories as numbers, and features that come from physics.
The mistake it hides: Features that contain the answer.
Book: 11.4 Regression, 11.7 Leakage · 3.7 The running stride · Engineering version: Features
Tutorials that practice this step (30)
- Q-6 A first-order response: heart rate after a step (week 2)
- Q-7 The angle from three points (week 3)
- Q-8 Speed from positions, and what noise does to it (week 3)
- Q-9 Fit a parabola to a flight and recover gravity (week 3)
- CS-3 Predict the arc of a jump (week 3)
- CS-5 Phone in a pocket: walk, jog, or run? (week 4)
- Q-13 Find the beats in ten seconds of ECG (week 5)
- Q-14 Heart rate from beat intervals (week 5)
- Q-15 One night's RMSSD (week 5)
- CS-6 From a chest-strap recording to a recovery number (week 5)
- Q-17 Split a run into laps (week 6)
- Q-18 Count steps from an accelerometer (week 6)
- Q-40 Export a run from the running simulator and read it (week 6)
- Q-41 Drag and rolling resistance from a cycling-simulator export (week 6)
- CS-7 Critical speed from a watch archive (week 6)
- Q-19 Interpolate a threshold from four points (week 7)
- Q-20 Find the lag between two signals (week 7)
- Q-21 Sweat rate from two weighings (week 7)
- CS-8 Find a lactate threshold, and see if it moved (week 7)
- CS-9 A season of load: fitness, fatigue, and a taper (week 7)
- CS-11 From keypoints to a knee angle over a stride (week 8)
- Q-25 Find foot contacts in an ankle trace (week 9)
- Q-26 Cadence from a cycle length (week 9)
- Q-27 An asymmetry index, three definitions (week 9)
- CS-12 The body-weight force of each foot plant (week 9)
- CS-13 Predicting peak left-leg force (week 9)
- Q-28 Height from flight time, with one frame of error (week 10)
- Q-30 Track a ball and fit its path (week 10)
- CS-14 The arc of a shot or a throw (week 10)
- CS-16 Forecast next week, and beat "same as last week" (week 11)
6 Balance Interpret
Made against missed shots, walk against run windows, rare events: oversample or undersample the training rows only.
The mistake it hides: Balancing the test set, which changes the question the score answers.
Book: 11.6 Classification · Engineering version: Balance
Tutorials that practice this step (1)
7 Scale Interpret
Features in different units (seconds, degrees, meters) brought onto one range so that distance-based models treat them fairly.
The mistake it hides: Fitting the scaler on all rows before the split, so the test rows inform the training.
Book: 11.4 Regression · Engineering version: Scale
Tutorials that practice this step (3)
8 Split Interpret
Training, validation and test sets by athlete, by day or in time order; cross-validation by group.
The mistake it hides: Splitting by row when rows share an athlete: the model memorizes the athlete.
Book: 11.7 Leakage, 11.8 Time series · Engineering version: Split
Tutorials that practice this step (8)
- CS-2 A step test and a first straight line (week 2)
- CS-5 Phone in a pocket: walk, jog, or run? (week 4)
- CS-7 Critical speed from a watch archive (week 6)
- CS-9 A season of load: fitness, fatigue, and a taper (week 7)
- CS-13 Predicting peak left-leg force (week 9)
- Q-31 Scale two features, the right way and the wrong way (week 11)
- Q-32 Split by athlete, not by row (week 11)
- CS-16 Forecast next week, and beat "same as last week" (week 11)
9 Deploy Coach
A notebook, a one-page report, or a page that runs in the browser; a file analysed afterwards (batch) or a strap read live (streaming).
The mistake it hides: A model with no way to reach the athlete.
Book: Chapter 12 · Chapter 13 · Engineering version: Deploy
Tutorials that practice this step (7)
- CS-10 Pose estimation, frame by frame (week 8)
- Q-34 A calculation in a web page (week 12)
- Q-35 Three tests: normal, missing, invalid (week 12)
- CS-17 From a notebook to a page an athlete can open (week 12)
- Q-38 Say how sure you are in one sentence (week 13)
- Q-39 Turn a table into an action card (week 13)
- CS-18 A one-page progress report (week 13)
Reassess
The workflow does not end at a deployed model. The same test, with the same protocol, goes into the athlete record, and the next decision is judged against the noise of the test.
Four questions to keep asking
- The scaler learned the mean and spread of the runners you are about to test on. How much does the score change when it is fitted on the training runners only? (CS-13)
- The largest peak force in a file may be the step before an injury, or a typing error. What would you need to know to tell them apart?
- Ten more athletes, or a better contact-time measurement? Decide from the profile and the first plot.
- Which steps did the AI assistant get wrong when you asked it to run the whole workflow?