geoprior.scripts.update_ablation_record_posthoc#

Update ablation record using post-hoc calibrated metrics.

What this does#

For each JSONL row (one run), this script:

  • finds the run folder via the timestamped geoprior_eval_phys_<TS>_interpretable.json file

  • replaces top-level metrics with post-hoc calibrated values: mae, mse, rmse, r2, coverage80, sharpness80, and per-horizon metrics

  • writes units and detailed blocks into record["metrics"]

  • stores the old pre-patch values under record["legacy"]["pre_posthoc_patch"]

Typical layout#

results_root/
  run_folder_A/
    geoprior_eval_phys_<TS>_interpretable.json
    <city>_GeoPriorSubsNet_eval_diagnostics_TestSet_H3_calibrated.json
    ablations_records/ablation_record.jsonl
  run_folder_B/
    ...

The ablations_records/ folder lives under each run folder.

Functions

main()

geoprior.scripts.update_ablation_record_posthoc.main()[source]#
Return type:

int