Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
sebhoerl committed Feb 4, 2024
1 parent ef7247f commit 3cf6a1e
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions synthesis/population/projection/ipu.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,13 +119,11 @@ def execute(context):
# Check that the applied factors in the last iteration are sufficiently small
assert criterion > 0.01

for q in np.arange(10):
print("Q", q, np.quantile(update, q / 10.0))

# For a sanity check, we check for the obtained distribution in 2019, but this
# may evolve in the future.
assert np.quantile(update, 0.9) < 1.0
exit()
assert np.quantile(update, 0.1) > 0.35
assert np.quantile(update, 0.8) < 2.0
assert np.quantile(update, 0.9) < 2.5

# Update the weights
df_census["weight"] *= update
Expand Down

0 comments on commit 3cf6a1e

Please sign in to comment.