[PR #1629] fix(labs): correct error cascade amplification factor in lab 04 #9235

Open
opened 2026-05-03 01:29:42 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/harvard-edge/cs249r_book/pull/1629
Author: @Shashank-Tripathi-07
Created: 5/3/2026
Status: 🔄 Open

Base: devHead: fix/lab04-cascade-amp-factor


📝 Commits (1)

  • f488282 fix(labs): correct error cascade amplification factor in lab 04

📊 Changes

1 file changed (+1 additions, -1 deletions)

View changed files

📝 labs/vol1/lab_04_data_engr.py (+1 -1)

📄 Description

Summary

Part C simulates a data error cascade through a pipeline. With the default settings (2% ingestion error, 5 stages), the amplification factor of 1.4 produced ~10.8% output error -- but the answer key marks "~15% (significant amplification)" as correct, and the MathPeek accordion explains that 2% error "can degrade accuracy by ~15%."

Change

# Before: 2% * 1.4^5 = 10.8%  (wrong -- doesn't match answer key)
_amp_factor = 1.4

# After: 2% * 1.5^5 = 15.2%  (correct -- matches answer key and MathPeek)
_amp_factor = 1.5

Test plan

  • Open lab 04 Part C with default sliders (2% error, 5 stages)
  • Confirm output error displays ~15%
  • Confirm "Correct" callout appears when selecting "~15% (significant amplification)"

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/harvard-edge/cs249r_book/pull/1629 **Author:** [@Shashank-Tripathi-07](https://github.com/Shashank-Tripathi-07) **Created:** 5/3/2026 **Status:** 🔄 Open **Base:** `dev` ← **Head:** `fix/lab04-cascade-amp-factor` --- ### 📝 Commits (1) - [`f488282`](https://github.com/harvard-edge/cs249r_book/commit/f488282755c52d441c2b102871dc3bd5778c6037) fix(labs): correct error cascade amplification factor in lab 04 ### 📊 Changes **1 file changed** (+1 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `labs/vol1/lab_04_data_engr.py` (+1 -1) </details> ### 📄 Description ## Summary Part C simulates a data error cascade through a pipeline. With the default settings (2% ingestion error, 5 stages), the amplification factor of `1.4` produced ~10.8% output error -- but the answer key marks **"~15% (significant amplification)"** as correct, and the MathPeek accordion explains that 2% error "can degrade accuracy by ~15%." ## Change ```python # Before: 2% * 1.4^5 = 10.8% (wrong -- doesn't match answer key) _amp_factor = 1.4 # After: 2% * 1.5^5 = 15.2% (correct -- matches answer key and MathPeek) _amp_factor = 1.5 ``` ## Test plan - [ ] Open lab 04 Part C with default sliders (2% error, 5 stages) - [ ] Confirm output error displays ~15% - [ ] Confirm "Correct" callout appears when selecting "~15% (significant amplification)" --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-05-03 01:29:42 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/cs249r_book#9235