Skip to content
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 Jacobian code #1298

Closed
wants to merge 6 commits into from
Closed

Update Jacobian code #1298

wants to merge 6 commits into from

Conversation

wdu9
Copy link
Collaborator

@wdu9 wdu9 commented Jul 6, 2023

Please ensure your pull request adheres to the following guidelines:

  • 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.

This pull request fixes a bug in the calc_jacobian method under the IndShockConsumerType.

@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@codecov
Copy link

codecov bot commented Jul 8, 2023

Codecov Report

Patch coverage: 97.72% and project coverage change: +0.04 🎉

Comparison is base (37134b9) 72.55% compared to head (2d95caf) 72.60%.

❗ Current head 2d95caf differs from pull request most recent head 5da0547. Consider uploading reports for the commit 5da0547 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1298      +/-   ##
==========================================
+ Coverage   72.55%   72.60%   +0.04%     
==========================================
  Files          78       78              
  Lines       13009    13033      +24     
==========================================
+ Hits         9439     9462      +23     
- Misses       3570     3571       +1     
Impacted Files Coverage Δ
HARK/ConsumptionSaving/ConsIndShockModel.py 87.23% <97.72%> (+0.18%) ⬆️

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@wdu9
Copy link
Collaborator Author

wdu9 commented Jul 8, 2023

@alanlujan91 Could you review this?

This pull requests fixes an important bug in the HARK methods that compute the Heterogenous Agent Jacobian matrices used in the Sequence Space Jacobian Methods.

I'm not sure if I should update the changelog or write an additional test as it is a bug fix.

@alanlujan91 alanlujan91 requested a review from Mv77 July 26, 2023 17:47
@sbenthall
Copy link
Contributor

@Mv77 take a peak?

@@ -922,3 +922,7 @@ def test_calc_jacobian(self):
self.assertAlmostEqual(CJAC_Perm.T[30][29], -0.06120, places=HARK_PRECISION)
self.assertAlmostEqual(CJAC_Perm.T[30][30], 0.05307, places=HARK_PRECISION)
self.assertAlmostEqual(CJAC_Perm.T[30][31], 0.04674, places=HARK_PRECISION)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clear these added lines!

Copy link
Contributor

@Mv77 Mv77 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey,

We should merge this in. It's a bugfix. @wdu9 could you:

  • Edit the changelog to reflect the bugfix.
  • Resolve the conflict with the jacobian example notebook (merge in master to this and re-run the notebook?)
  • Remove some empty lines you introduced in the testfile.

After that I'll merge this in.

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