Skip to content

Commit

Permalink
update scaling function
Browse files Browse the repository at this point in the history
  • Loading branch information
meyerkm committed Oct 17, 2024
1 parent 97bd07c commit 1b626fc
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions deeprvat/deeprvat/associate.py
Original file line number Diff line number Diff line change
Expand Up @@ -1625,14 +1625,10 @@ def average_burdens(
for r in range(len(repeats)):
zero_effect_val = center_scale_df.loc[r, "mode"]
repeat_max = max_dfs.loc[r, "max"]
# Subtract off zero effect burden value (mode)
this_burdens[:, :, r] -= zero_effect_val
adjusted_max = repeat_max - zero_effect_val
min_val = this_burdens[:, :, r].min()
# Scale values between -1 and 1
# Subtract off zero effect burden value (mode) and scale
this_burdens[:, :, r] = (
2 * ((this_burdens[:, :, r] - min_val) / (adjusted_max - min_val))
- 1
(this_burdens[:, :, r] - zero_effect_val) / adjusted_max
)

this_burdens = AGG_FCT[agg_fct](this_burdens, axis=2)
Expand Down

0 comments on commit 1b626fc

Please sign in to comment.