Skip to content

Commit

Permalink
Minor code quality improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
nikhilwoodruff committed Oct 15, 2024
1 parent 02df977 commit 4365b1d
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 40 deletions.
76 changes: 38 additions & 38 deletions docs/validation.ipynb

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion policyengine_uk_data/datasets/frs/enhanced_frs.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ def dropout_weights(weights, p):

start_loss = None

iterator = trange(5_000)
iterator = trange(1_000)
for i in iterator:
optimizer.zero_grad()
weights_ = dropout_weights(weights, dropout_rate)
Expand Down
3 changes: 2 additions & 1 deletion policyengine_uk_data/utils/imputations/capital_gains.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import pandas as pd
import numpy as np
from policyengine_core.data import Dataset

# Fit a spline to each income band's percentiles
try:
Expand Down Expand Up @@ -165,7 +166,7 @@ def stack_datasets(data_1, data_2):
return joined_data


def impute_cg_to_dataset(dataset):
def impute_cg_to_dataset(dataset: Dataset):
data = dataset.load_dataset()
zero_weight_copy_1 = copy.deepcopy(data)
zero_weight_copy_2 = copy.deepcopy(data)
Expand Down

0 comments on commit 4365b1d

Please sign in to comment.