Saving a Summary
A summary records the run.
For this small experiment, save:
- seed;
- number of points;
- true slope;
- fitted slope;
- loss;
- one written observation.
Write a summary file
Save experiment summary
Ready to run.
The file is plain text so the result is easy to inspect.
Summary is not a diary
A useful summary is short. It records what someone needs to understand or rerun the experiment.
If every number is saved but the seed is missing, the summary is incomplete. If the plot is saved but no observation is written, the inspection is unfinished.
Exercise: Summary field
Which field is essential for rerunning the same noisy data?
Answer it first, then check.
Hint
Record the value passed to np.random.default_rng(...).
Solution
The essential field is the seed. Recreating the same run also requires the
same code, data-generation settings, and relevant environment.