Skip to content

Commit

Permalink
Changed all 2s to all 1.75. Changed Run_Number to 0. Changed post-pro…
Browse files Browse the repository at this point in the history
…c to use commented out code that does integer age bin boundaries not decimal.
  • Loading branch information
Jonathan Bloedow committed Jan 23, 2024
1 parent 1f06c90 commit 5e479ec
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions tests/sft_tests/hint_tests/hint_test_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ def set_param_fn(config):
config.parameters.Simulation_Type = "TYPHOID_SIM"
config.parameters.Simulation_Duration = SIMULATION_DURATION_IN_YEARS * 365.0
config.parameters.Base_Individual_Sample_Rate = 0.2
config.parameters.Run_Number = 0

config.parameters.Base_Year = BASE_YEAR
config.parameters.Inset_Chart_Reporting_Start_Year = 2005
Expand All @@ -39,7 +40,6 @@ def set_param_fn(config):
config.parameters.Report_Typhoid_ByAgeAndGender_Start_Year = 2005
config.parameters.Report_Typhoid_ByAgeAndGender_Stop_Year = 2020

config.parameters.Age_Initialization_Distribution_Type = "DISTRIBUTION_COMPLEX"
config.parameters.Typhoid_3year_Susceptible_Fraction = 0
config.parameters.Typhoid_6month_Susceptible_Fraction = 0
config.parameters.Typhoid_6year_Susceptible_Fraction = 0
Expand Down Expand Up @@ -192,4 +192,4 @@ def age_base_hint_test(self, custom_build_demog):
self.experiment.run(wait_until_done=True)
task.handle_experiment_completion(self.experiment)
self.experiment = self.experiment
self._check_result()
self._check_result()
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,9 @@ def test(self):
for idx, rate in enumerate(transmission_matrix[0]):
left = age_bin_edges_in_years[idx]
right = age_bin_edges_in_years[idx + 1]
# age_bin_interval = str(pd.Interval(left=left, right=right, closed='right'))
age_bin_interval = str(pd.Interval(left=left, right=right, closed='right'))
# workaround for old Pandas library
age_bin_interval = f'({left:.1f}, {right:.1f}]'
#age_bin_interval = f'({left:.1f}, {right:.1f}]'
if rate == 0:
if age_bin_interval in count_dict:
self.success = False
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ def test_age_base_hint_values_all_1s(self):
build_demog_age_bins_all_1s = partial(build_demog_target_all_age_bin, value=1)
self.age_base_hint_test(build_demog_age_bins_all_1s)

def test_age_base_hint_values_all_2s(self):
build_demog_age_bins_all_2s = partial(build_demog_target_all_age_bin, value=2)
self.age_base_hint_test(build_demog_age_bins_all_2s)
def test_age_base_hint_values_all_gt1(self):
build_demog_age_bins_all_gt1 = partial(build_demog_target_all_age_bin, value=1.75)
self.age_base_hint_test(build_demog_age_bins_all_gt1)

def test_age_base_hint_values_all_halves(self):
build_demog_age_bins_all_halves = partial(build_demog_target_all_age_bin, value=0.5)
Expand Down

0 comments on commit 5e479ec

Please sign in to comment.