Lite / Independent Engineering Research / Week 31
Reproducible by design: seeds, versions, data
Six months from now, can you regenerate Figure 3 exactly? Can a stranger? What would they need?
Why should I care?
Reproducibility is not paperwork; it is how you debug your own research. When a number looks wrong, the ability to regenerate it from a recorded seed and commit is the difference between a five-minute fix and starting again.
- Record seeds, code versions and dependencies so every result can be regenerated.
- Keep raw data separate and script every processing step.
- Use a reporting checklist to find gaps before a reviewer does.
Predict
Two people run the same simulation script and get different results. Most likely cause?
- Physics changed
- Different random seeds or software versions
- Computers are random
- Bad luck
Guess first, then reveal
Pseudo-random generators are deterministic given a seed; libraries change behaviour between versions. Record both and the results match.
Discover
Start from 'Typical first draft'. Read what a reviewer could not do. Tick items one at a time and watch the list shrink. Which three items, if missing, would stop anyone regenerating your figures at all?
What the interactive shows (text version)
The reproducibility checklist scorer lists twelve items in five groups (code, randomness, data, reporting, credit), each with a weight. Ticking items raises a score bar; the readout lists what a reviewer could not do because of the missing items.
Understand
Determinism
A pseudo-random generator produces the same sequence from the same seed. Record the seed for every run, and report results across several seeds so a lucky seed cannot carry the result. Record the commit of your code and pin library versions, because the same seed in a different version can give a different sequence.
Raw data are sacred
Keep raw outputs unedited and separate from processed data. Every exclusion, filter and transformation is done by a script with the reason in a comment. Then anyone can check that processing did not create the result.
One command
The gold standard: one documented command regenerates every figure and table from raw data. Reporting checklists (many venues publish one) ask exactly these questions; scoring yourself before submission finds gaps early.
Explain it another way
Intuitive
A recipe that says 'some flour, bake until done' cannot be repeated. Seeds and versions are the exact quantities and oven temperature.
Technical
Reproducible (same data and code give the same result) is weaker than replicable (new data, same method, consistent result). Both matter; the first is fully in your control.
Mathematical
An LCG x_{k+1} = (a·x_k + c) mod m is fully determined by (a, c, m, x₀): record those and anyone can regenerate the stream.
Applied
Build levels on this site recompute recorded runs on the server from their settings: the same idea, applied to marking.
Worked example 1
x_{k+1} = (5x + 3) mod 16, seed 7. First three values?
x₁ = (35 + 3) mod 16 = 38 mod 16 = 6. x₂ = (30 + 3) mod 16 = 1. x₃ = (5 + 3) mod 16 = 8. Anyone with the seed and the rule gets 6, 1, 8.
Common mix-ups
My results are reproducible because I could rerun them on my laptop.
✓ Reproducible means a stranger with your repository, data and instructions can regenerate them, on their machine.
Practice
Practice, not a test. Answers are checked on our server; a wrong answer gets a hint and another try. Nothing is saved.
Apply it
Set up your capstone repository now: raw/ and processed/ folders, a pinned environment, a seed log, and a single script that will regenerate the figures. Score it with the checklist and fix the top three gaps.
Reflect
What is the one thing about your current workflow that only you know and is written down nowhere?
Write your answer on paper or in your own notes. Lite never stores what you write.