From 236d1ec00fb4ada144b90a77f1e3653bcbd5d10e Mon Sep 17 00:00:00 2001 From: Nikhil Woodruff Date: Tue, 24 Jun 2025 13:43:12 +0100 Subject: [PATCH] Fix log --- changelog_entry.yaml | 4 ++++ .../datasets/frs/local_areas/constituencies/calibrate.py | 7 +++++++ 2 files changed, 11 insertions(+) diff --git a/changelog_entry.yaml b/changelog_entry.yaml index e69de29bb..22aa61d9a 100644 --- a/changelog_entry.yaml +++ b/changelog_entry.yaml @@ -0,0 +1,4 @@ +- bump: patch + changes: + fixed: + - Missing columns in the calibration log. diff --git a/policyengine_uk_data/datasets/frs/local_areas/constituencies/calibrate.py b/policyengine_uk_data/datasets/frs/local_areas/constituencies/calibrate.py index de7b6ed43..c15675444 100644 --- a/policyengine_uk_data/datasets/frs/local_areas/constituencies/calibrate.py +++ b/policyengine_uk_data/datasets/frs/local_areas/constituencies/calibrate.py @@ -160,6 +160,13 @@ def dropout_weights(weights, p): excluded_training_targets, ) performance_step["epoch"] = epoch + performance_step["loss"] = performance_step.rel_abs_error**2 + performance_step["target_name"] = [ + f"{area}/{metric}" + for area, metric in zip( + performance_step.name, performance_step.metric + ) + ] performance = pd.concat( [performance, performance_step], ignore_index=True )