8000 [WIP] Functional transitions for Frame models by sbenthall · Pull Request #866 · econ-ark/HARK · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

[WIP] Functional transitions for Frame models #866

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

Closed
wants to merge 6 commits into from

Conversation

sbenthall
Copy link
Contributor

#865 is an implementation of Frames ( see #862 #798 ) that, for consistency with the original HARK simulation methods, uses transition methods that drawn from and mutate the model state.

I.e., a transition method will draw values from self.shocks and assign the new values directly to self.state_now. It will neither take arguments that correspond to the 'input variables', nor return any output.

This PR has a (partial) implementation of functional transition methods. These methods would:

  • take model variable values as input
  • return model variable values as output

The core FrameAgentType class then does the logic of drawing variable values to and from memory.

I see the benefits of functional transitions equations being:

  • They correspond more closely to the left hand side of structural equation models, making for less distance between mathematical notation and model configuration
  • They can be potentially vectorized, improving performance. (I believe this is one main reason why Dolo does this route)
  • I believe (though I'm not certain) that functional transition methods will be more amenable to automated operations that would support their use within solution procedures.

I'd like to run this by others before completing the implementation because:

  • It would suggest a deeper refactoring of existing model code to use functional transitions across the board. The current use of transition() within getStates() is an example of how this would work.
  • This prototype implementation introduces a notational marker for pointing to the previous (or t -1) version of a state. The currently proposed implementation is entirely arbitrary. However it connects to questions raised by the namespacing of state variables and the future of NARK.
  • Tests for new functionality/models or Tests to reproduce the bug-fix in code.
  • Updated documentation of features that add new functionality.
  • Update CHANGELOG.md with major/minor changes.

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.

1 participant
0