Practice question · True or false
Two runs of the same simulation with the same fixed seed and the same library versions should produce identical output.
Hints
- A pseudo-random generator is a deterministic function of its seed.
- That is precisely why the seed is recorded.
Show the answer
True
Why
True. Pseudo-random values are computed deterministically from the seed, so fixing it fixes the whole sequence and hence the result. This is what makes a stochastic method reproducible without making it any less stochastic.
Practise Reproducibility and Good Practice
The app has 5 more questions on this lesson, and keeps your place in the course. Mathematics I is free to start.
More questions on Reproducibility and Good Practice
- A NumPy vectorised operation and an equivalent Python loop compute identical results, and the vectorised one…
- A colleague sends a script and the number it printed. Select everything you still need before that result can…
- Vectorising usually gives a large speed-up, but sometimes almost none. Why does replacing a loop with an…
- Sort each practice by its effect on reproducibility.
- Complete the purpose of a test suite.
- A test suite contains 40 unit tests, of which 36 passed before a change. The change makes 3 previously…
- Order the steps of putting an analysis on a reproducible footing.