Milestone 6 of 8

Inspect the result numerically and visually

Inspect observed points, generation evidence, the selected line, and signed differences without hiding them behind one score.

The selected score is one view of the result. Inspect the values and plots together so that a plausible picture does not hide a numerical mistake.

Goal

Inspect the selected candidate numerically and visually. Plot the observed points, the source line used to generate them, the selected candidate line, and a separate view of signed differences.

Inputs

Use generated_data.csv, selected_result.json, and the full search evidence. The source line is generation evidence and must be labelled separately from the selected candidate. Signed differences use observed - predicted and retain the input identity.

Keep units, axis labels, limits, legends, and the source and selected line identities clear. Do not connect observations as if they were a continuous measurement curve unless the figure explicitly says what the line means.

Deliverables

Implement the numerical and plotting part of src/report.py and save output/fit_and_differences.png. The figure should contain:

  • observed points with their input values;
  • the configured source line labelled as generation evidence;
  • the selected candidate line labelled as the grid result; and
  • a separate signed-difference view with a zero reference.

Record selected score, minimum grid score, one reconstructed point, and a short observation about the visible differences in report.md or the later report section. Keep the plot data traceable to saved arrays.

Checks

Check that the figure uses the saved input, observed, selected prediction, and signed-difference arrays rather than a newly invented calculation. Read those arrays back and compare their lengths and identities. Check that the selected score and minimum grid score agree, that the zero line is present in the difference view, and that labels distinguish source from selected candidate.

Use a deliberate mutation of one plot input to confirm that the audit can detect a mismatch. A successful file existence check is not enough to prove that the figure shows the selected result.

Workspace

Keep report and plotting code in src/report.py; use src/main.py only to orchestrate saved artifacts. Keep the figure under output/ and leave the source data, full grid, and selected result available for read-back.

Hints

HintA plot is another artifact
Record the arrays used for each plotted mark or line. A correctly named PNG can still contain the wrong run.
HintSeparate the two lines
The source line explains how observations were generated. The selected line is the candidate chosen from the grid. They have different roles even when they look close.

Review

Look at the numerical values and figure together. Can you identify the source line, selected line, each difference's sign, and the input behind one plotted point? Remove any claim that the plot alone establishes.

How to check your work

Checks compare figure data, labels, and the difference convention with the supplied fixture. The supplied fixture demonstrates one clear layout; it does not replace numerical inspection.