-
-
Notifications
You must be signed in to change notification settings - Fork 199
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update RNG #1193
Update RNG #1193
Conversation
Few errors remain regarding precision given a new RNG. |
Are these the kinds of errors that would disappear if we scaled back our degree of precision? If so, that's the solution. |
TODO: level of precision to 3 or 4 decimals global default |
FIND: assertAlmostEqual((.), (\d.\d{5})) |
fix all tests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this! Some people dream of winning or beauty or fame. It has long been my dream to reduce the excessive precision of our numerical tests. This is a big step in that direction!
Comments:
- I think we might want at least a couple of different precision defaults
- HARK_PRECISION_NORMALIZED for variables that are normalized by permanent income
- HARK_PRECISION_ZERO for variables that should be approximately zero
- Sadly, your PR ruins some beautiful formatting in which explanatory comments were perfectly aligned with each other on the right hand border of some multiline code snippets. Now everything is mooshed to the left to be one space beyond the last character of the actual instruction.
- This is probably the fault of VSCode or Black or Flake8. It's not worth a lot of effort to fix -- but is worth a little. So if it only takes a little, please do it.
Codecov ReportBase: 73.62% // Head: 73.61% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## master #1193 +/- ##
==========================================
- Coverage 73.62% 73.61% -0.02%
==========================================
Files 72 73 +1
Lines 11973 11998 +25
==========================================
+ Hits 8815 8832 +17
- Misses 3158 3166 +8
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
@alanlujan91 let's discuss merging this in tomorrow's meeting. |
Since Numpy version 1.17.0 scipy introduced Generator as a replacement to RandomState.
This PR updates HARK to use Generator as recommended in https://numpy.org/doc/stable/reference/random/index.html#quick-start