Skip to content

Commit

Permalink
Add rng seed for scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
sgreenbury committed May 3, 2024
1 parent f9e3cbb commit ebec8b7
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
6 changes: 6 additions & 0 deletions scripts/1_prep_synthpop.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
import numpy as np
from uatk_spc.builder import Builder

SEED = 0


def main():
# Seed RNG
np.ranmdom.seed(SEED)

# Pick a region with SPC output saved
path = "../data/external/spc_output/raw/"
region = "west-yorkshire"
Expand Down
3 changes: 3 additions & 0 deletions scripts/2.1_sandbox-match_households.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@

pd.set_option("display.max_columns", None)

# Seed RNG
SEED = 0
np.ranmdom.seed(SEED)

# ## Step 1: Load in the datasets

Expand Down
4 changes: 4 additions & 0 deletions scripts/2_match_households_and_individuals.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@
truncate_values,
)

# Seed RNG
SEED = 0
np.ranmdom.seed(SEED)

pd.set_option("display.max_columns", None)


Expand Down

0 comments on commit ebec8b7

Please sign in to comment.