Week 2 · Sunday — consolidate and defend
Forecasting studio 2: messy feed diagnosis, chart defense and Week 2 routing (Day 10 extended assessment)
Project thread forecasting · linked lessons day 6, day 7, day 8, day 9, day 10
Milestone W2-b. Three outputs:
- the Saturday quality checks proven on an unseen defective feed;
- point-in-time fix rules with a corrected D-14 query;
- the Week 2 routing decision.
Together with Saturday's outputs, this is the Week 2 main evidence in Appendix C: quality-check outputs, a corrected query and the routing decision.
- 90 minsession length
- 4timed blocks
- 5tasks
- —status
Session plan90 min
Before you start
Prepare before the session (about 2 minutes). Ideally someone else does it. If you do it yourself, paste and run the block without studying it: finding the defects is the assessment.
# from the repository root
mkdir -p forecasting-project/data
cp python/artifacts/airline_sample.sqlite forecasting-project/data/w02_variant.sqlite
sqlite3 forecasting-project/data/w02_variant.sqlite < forecasting-project/data/w02_variant.sql
where forecasting-project/data/w02_variant.sql contains:
DROP TABLE IF EXISTS booking_feed;
CREATE TABLE booking_feed AS
SELECT date, flight_no, days_to_departure, cumulative_bookings,
date(date, '-' || days_to_departure || ' days') AS loaded_at
FROM booking_curve WHERE date BETWEEN '2024-01-01' AND '2024-06-30';
INSERT INTO booking_feed
SELECT date, flight_no, days_to_departure, cumulative_bookings + 6, date(date, '-' || (days_to_departure - 3) || ' days')
FROM booking_curve WHERE days_to_departure = 14 AND date BETWEEN '2024-04-08' AND '2024-04-14';
DELETE FROM booking_feed WHERE flight_no = 'ZX111' AND days_to_departure = 14 AND date BETWEEN '2024-02-05' AND '2024-02-18';
UPDATE booking_feed SET days_to_departure = 15 WHERE flight_no IN ('ZX114','ZX115') AND days_to_departure = 14 AND date BETWEEN '2024-05-01' AND '2024-05-31';
UPDATE booking_feed SET flight_no = lower(flight_no) || ' ' WHERE flight_no = 'ZX118' AND date BETWEEN '2024-03-10' AND '2024-03-23';
UPDATE booking_feed SET cumulative_bookings = cumulative_bookings / 10 WHERE flight_no = 'ZX107' AND days_to_departure = 10 AND date BETWEEN '2024-06-01' AND '2024-06-07';
UPDATE booking_feed SET cumulative_bookings = NULL WHERE flight_no = 'ZX104' AND days_to_departure = 14 AND date BETWEEN '2024-01-20' AND '2024-01-24';
The variant is a separate database copy, so the project's seed-42 dataset version stays unchanged. Also have ready:
- Saturday's quality-check script;
- your Day 10 checkpoint result;
- your weekday time log for Days 6-10.
The departures in the feed lie inside the development period. Nothing from the protected test period is used.
Blocks4
Block 1: Spaced recall (assessment section 1)
20 minThis session is also the Day 10 extended assessment, in four saved sections. Submit each section before opening any reference notes or answer keys.
Section 1: answer the cumulative prompts in task
recall-cumulativeclosed-book (12 minutes) and save them. Then check against lessons 1-9 (8 minutes). Log each miss with a correction innotes/recall-log.md.Block 2: Improve - diagnose a new messy feed (assessment section 2)
40 minUse the feed
booking_feedinforecasting-project/data/w02_variant.sqlite(see setup). It covers departures 2024-01-01 to 2024-06-30 and has an extraloaded_atcolumn: the date on which each row was loaded.- Minutes 0-15 - run Saturday's checks on
booking_feed, adapting table and column names only (taskdiagnose-feed). - Minutes 15-30 - locate and explain every defect: what it is, where it is (flight and dates), how it was
detected, and its effect on
bk_d14. - Minutes 30-40 - fix rules and corrected query (task
fix-rules).
Save your attempt before reading the answer key in the task's expected evidence.
- Minutes 0-15 - run Saturday's checks on
Block 3: Teach-back - explain a chart (assessment section 3)
20 minDo task
explain-chart. Build one chart (10 minutes), then write the explanation (10 minutes). The audience is a simulated RM manager deciding whether the feed can be used for the D-14 forecast.Block 4: Weekly review - workload and routing (assessment section 4)
10 minDo task
routing-review. This is the Week 2 workload review the spec requires. The decision it records adjusts how Weeks 3-4 use their existing time; it never adds sessions.
Tasks5
Task 1
recallAnswer closed-book, then save:
- State your project's grain, cutoff and horizon.
- Name MCAR, MAR and MNAR, with one airline example each.
- Is an outlier an error, a rare truth or a regime change? How would you tell which?
- Why does a join on
(date, flight_no)tobooking_curveinflate sums? - Event time vs processing time: which one decides point-in-time correctness?
- Why must the holdout boundary be drawn before fitting a scaler or an encoder?
- What does a 95% interval for a difference in means not tell you?
- Name one confounder in the fare-and-bookings relationship.
- Name one chart that misleads by its axis, and the fix.
- What is fold-safe target encoding protecting against?
Task 2
analysisRun your Saturday checks against
booking_feed. For every defect you find, record:- what it is;
- the flights and departure dates affected, using counts from your queries;
- the check that found it;
- its effect on the D-14 feature
bk_d14, or on any later feature.
Add any check you were missing.
Task 3
codeFor each defect, write a fix rule and its justification. Then write
sql/w02_feed_d14_fixed.sql. It returns exactly one D-14 value per departure in the feed period, with an explicitbk_d14_statuscolumn (ok,repairedormissing). Report row counts before and after.Task 4
defenseBuild one chart that helps a simulated RM manager decide whether the feed is usable. A good choice is the daily count of D-14 rows per departure date, coloured by
bk_d14_status, or a small-multiples view by flight.Then:
- Give it an insight-led title stating the finding.
- Write a 100-150 word explanation that includes one interpretation limit.
- Answer the manager's simulated question, "Can we just drop the bad days?", in at most 60 words.
Task 5
reviewWeek 2 workload and routing review. Write 100-200 words in
decision-log.mdusing these inputs:- recall accuracy, from section 1 and the app's review queue;
- the Day 10 checkpoint result;
- task difficulty: which studio tasks overran and by how much;
- backlog: any studio id still open, and its unfinished tasks;
- actual weekday minutes against the 30-minute budget.
Choose one routing decision:
- (a) keep the plan;
- (b) reduce exercise depth in named areas;
- (c) allocate named studio blocks in Weeks 3-4 to weak concepts.
Name the concept ids. State what evidence would trigger re-routing at the Week 4 review.
Rubric4 criteria
| Criterion | Meets | Exceeds |
|---|---|---|
| Defect detection | At least five of the six planted defects are located, with flight and date ranges, and their effect on `bk_d14` is stated. | All six are found. The note explains why Saturday's clean-data checks missed any of them, and adds checks that would catch them next time, such as a `loaded_at` versus snapshot-date check. |
| Point-in-time repair | The duplicates are resolved by load time as known at the cutoff, not by "latest wins". The corrected query returns one row per departure with a status column. | Every repair is justified with evidence from the feed itself, such as `loaded_at` for the relabelled rows. Imputations are flagged so that later evaluation can exclude or slice them. |
| Chart communication | The chart type fits the question. The title states the finding. One genuine interpretation limit is given. | The explanation leads to a decision for the RM manager, with a clear condition under which the feed would be safe to use. |
| Routing decision | The decision is based on at least two evidence items, names concept ids, and keeps the budgets. | It sets a measurable trigger for the Week 4 review and says which Week 3-4 blocks change. |
Required output
Four saved assessment sections: recall answers, the feed diagnosis with fix rules and the corrected query, the chart with its explanation, and the routing decision.
Saved in forecasting-project/:
notes/recall-log.md(updated);notes/feed-diagnosis-w02.md;sql/w02_feed_d14_fixed.sql, with before and after counts;- the chart file and its explanation;
- the routing entry in
decision-log.md, with next week's priority.
This completes the Week 2 main evidence: quality-check outputs, a corrected query and the Week 2 routing decision. It also serves as the Day 10 extended assessment.
Studios are tracked separately from the 60 core lessons; completing one never completes a lesson.