H05 · due at the start of Class 5, Tue, Jan 19
Linear regression 1: heart rate against workload
Linear regressionAppBuild B-2
Fit a straight line to your step-test stages and a first-order response to the instructor's heart rate. Report slope with units, residuals, and what the fit cannot tell you.
Chapter 2: The Athlete as a System · Week 2 hub
Book exercises
Course Guide: Linear regression 1: heart rate against workload
- Exercise 2.12 CORE Python analysis, 25 min
Run Listing 2.5, then change the model so the floor is fixed rather than fitted. Refit $$ to the strap's recovery data with the floor set to 74, 76, 78, 80 and 82 bpm. parts Tabulate $$ against the… - Exercise 2.20 CORE Build, 60 min
Build step B-2. Extend your B-1 page with a form that takes a stage name and a 15-second count, and a table that lists every entry with its heart rate. steps Write the specification first: inputs,… - Exercise 2.21 CORE Communicate, 20 min
A 15-year-old runner asks you what “threshold” means. Explain it in at most 120 words without using the word “lactate”. Include one thing she could do with the idea in training. - Exercise 2.22 Check the AI, 8 min
An AI assistant wrote this to find Sam's recovery time constant from steptest_hr.csv, and reported $=930 s$: quote rec = hr[hr.phase == "recovery"]\\ t = rec.time_s - rec.time_s.iloc[0]\\ slope =… - Exercise 2.23 Python analysis, 20 min
Core. Repeat the straight-line fit of Listing 2.4 on the strap's second-by-second data, data/ steptest_hr.csv, with scikit-learn's LinearRegression. The stages end at 300, 500 and 700 s; their… - Exercise 2.24 Python analysis, 40 min
Case file: take an interval session from the instructor's watch archive in the instructor's case file (the activity has heart rate, pace and distance). The question is how heart rate rises with…
Prepare with these tutorials
- Q-5 Fit a straight line and read the slope's units (quick tutorial, 15 min)
- Q-6 A first-order response: heart rate after a step (quick tutorial, 15 min)
- CS-2 A step test and a first straight line (case study, 50 min)
Two paths, same skills
Course data
Use the files below. The instructor's own data is the default.
Your own data
Any watch, phone, video or chest-strap recording of your own works in place of the course data. It stays on your device. How to collect it.
book
Book data, Chapter 2: The Athlete as a System
The 6 example files that Chapter 2 of Data-Driven Athletics reads, under the same names the listings use.
heart
John Hedengren: Polar H10 chest-strap recordings
4 chest-strap sessions (ECG at 130 Hz with beat-by-beat RR) from June 2026: 2 full nights and 2 daytime sessions, with 3-minute excerpts and nightly HRV.
Build step
B-2 is part of this assignment.
What to turn in
- A notebook (or app) that runs top to bottom, reading the data by its address or from a file you include.
- The answer to the task, with units and how sure you are.
- One paragraph for the athlete or coach: what to do, and the limit of the finding.
- Your AI-use statement and the verify-it checklist (how).
Scoring
| Method and correctness | 40% |
| Reproducibility and data handling | 25% |
| Interpretation and limitations | 25% |
| Presentation and AI disclosure | 10% |