2020)
2121from pathlib import Path
2222from policyengine_uk_data .storage import STORAGE_FOLDER
23- from policyengine_uk_data .datasets import EnhancedFRS_2022_23
23+ from policyengine_uk_data .datasets import EnhancedFRS_2023_24
2424
2525FOLDER = Path (__file__ ).parent
2626
@@ -32,14 +32,14 @@ def calibrate(
3232 overwrite_efrs = True ,
3333):
3434 matrix_ , y_ , country_mask = create_constituency_target_matrix (
35- EnhancedFRS_2022_23 , 2025
35+ EnhancedFRS_2023_24 , 2025
3636 )
3737
3838 m_national_ , y_national_ = create_national_target_matrix (
39- EnhancedFRS_2022_23 , 2025
39+ EnhancedFRS_2023_24 , 2025
4040 )
4141
42- sim = Microsimulation (dataset = EnhancedFRS_2022_23 )
42+ sim = Microsimulation (dataset = EnhancedFRS_2023_24 )
4343
4444 COUNT_CONSTITUENCIES = 650
4545
@@ -181,12 +181,13 @@ def dropout_weights(weights, p):
181181
182182 if overwrite_efrs :
183183 with h5py .File (
184- STORAGE_FOLDER / "enhanced_frs_2022_23 .h5" , "r+"
184+ STORAGE_FOLDER / "enhanced_frs_2023_24 .h5" , "r+"
185185 ) as f :
186- if "household_weight/2025 " in f :
187- del f ["household_weight/2025 " ]
186+ if "household_weight/2023 " in f :
187+ del f ["household_weight/2023 " ]
188188 f .create_dataset (
189- "household_weight/2025" , data = final_weights .sum (axis = 0 )
189+ "household_weight/2023" ,
190+ data = final_weights .sum (axis = 0 ) / 1.021 ,
190191 )
191192 l .backward ()
192193 optimizer .step ()
0 commit comments