Skip to content

Solved discrepancy in JJZ vs LW weights#33

Merged
jdebacker merged 4 commits intoPSLmodels:mainfrom
john-p-ryan:main
Jan 27, 2025
Merged

Solved discrepancy in JJZ vs LW weights#33
jdebacker merged 4 commits intoPSLmodels:mainfrom
john-p-ryan:main

Conversation

@john-p-ryan
Copy link
Contributor

There was a small error in the usage of the np.gradient function which was the source of the discrepancy in the different methods of estimating social welfare weights. Should be of the form np.gradient(f_array, x_grid) rather than just np.gradient(f_array), which led to the mtr_prime estimates being off by a factor of 10 in the JJZ estimates (our iot.z grid had spacing of $10 by default).

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 49.37%. Comparing base (10985c1) to head (90e3345).
Report is 36 commits behind head on main.

❗ There is a different number of reports uploaded between BASE (10985c1) and HEAD (90e3345). Click for more details.

HEAD has 1 upload less than BASE
Flag BASE (10985c1) HEAD (90e3345)
unittests 3 2
Additional details and impacted files
@@             Coverage Diff             @@
##             main      #33       +/-   ##
===========================================
- Coverage   72.81%   49.37%   -23.45%     
===========================================
  Files           3        3               
  Lines         103      160       +57     
===========================================
+ Hits           75       79        +4     
- Misses         28       81       +53     
Flag Coverage Δ
unittests 49.37% <100.00%> (-23.45%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jdebacker
Copy link
Member

@john-p-ryan Great find! Merging.

@jdebacker jdebacker merged commit 305c52f into PSLmodels:main Jan 27, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants