-
-
Notifications
You must be signed in to change notification settings - Fork 199
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
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
Replace continuous distribution 'draw_' methods with dolo IID processes #611
Comments
While doing a full replacement with dolo IIDProcesses would be major change--maybe one more appropriate for 2.0 Dolark integration, a more moderate change would be to the necessary refactoring to start mirroring Dolo. I.e., to make a ContinuousDistribution class with a draw method, and subclass it for each particular distribution. This sort of move would move HARK towards equivalence with Dolo, which would become apparent in the DARKolos. |
That's an excellent idea. Go for it. |
Interesting: SymPy has |
Mathematica processes: |
Based on @albop 's presentation, it sounds like we want to replace the HARK Distribution classes with dolo Distribution classes |
Now there is even further lack of feature parity between HARK distributions and dolo IID processes, because of the new Given the time available for delivering 1.0, I will move this ticket to a later milestone. Full HARK/Dolo integration is an admirable goal, but it will be much easier to do after HARK is further refactored into elements that are similar to Dolo's. |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
HARK currently has several functions in
simulation
for drawing from continuous distributions:drawMeanOneLognormal
drawLognormal
drawNormal
drawWeibull
drawUniform
drawBernoulli
This is custom code that has been implemented in many other libraries.
In particular, we can move towards integration with Dolo by replacing this code with calls to the 'simulate()` method in the Dolo IIDProcess class, e.g.:
https://github.com/EconForge/dolo/blob/master/dolo/numeric/processes_iid.py#L114
There are some complications here:
It's possible that the HARK functions and Dolo do not have feature parity. A few observations:
draw
functions have:exact_match
option -- I frankly don't understand what this does yetseed
for the random generatorsimulate
has:T
argument. What is this?stochastic
argument. What is this?simulate
implemented for the LogNormal distribution, and has no class for the Weibull distributionThe automated tests for HARK depend on the current
draw_
code, including the random seed setting. Swapping in Dolo will require recalibration of all the tests. This will make it difficult to guarantee that the new code does not introduce any errors.This would introduce a direct dependency between HARK and Dolo. This is the direction it sounds like @llorracc wants to go. However, from an open-source development perspective, Dolo does not currently have any documented contribution guidelines. Does it have a release cycle or stable releases? It's not clear how this dependency will effect HARK's development process.
The Dolo IIDProcess classes are for the most part not documented. Unless new documentation is written for Dolo, this change will make HARK less easy to understand. Dolo documentation for IID processes is ticketed here: No documentation in Processes classes EconForge/dolo.py#183
[This is related to #519, which is about discrete distributions. Currently in HARK, continuous distributions are handled entirely separately, in
simulation.py
, from discrete distributions, which at the time of this writing are inutilities.py
(changing with #610). Dolo IIDProcesses support discretization, so this change is instrumental to syncing up these functionalities.]The text was updated successfully, but these errors were encountered: