-
-
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
[WIP] Multilinear wrapper for econforge.interpolation #1151
Conversation
I still need to write documentation for this class. It only does basic interpolation/extrapolation. No fancy derivatives/limiting functions yet. However:
|
Codecov Report
@@ Coverage Diff @@
## master #1151 +/- ##
==========================================
+ Coverage 72.80% 72.99% +0.19%
==========================================
Files 70 72 +2
Lines 11156 11237 +81
==========================================
+ Hits 8122 8203 +81
Misses 3034 3034
Continue to review full report at Codecov.
|
@sbenthall I'd like to hear what you think of this and its relation to the existing PR. Do you know if the existing PR does something that this one does not? The code is kind of hard to follow. @alanlujan91 I'd also like your feedback if possible. Specifically about:
|
Awesome!
Who should review? Adrian?
On Tue, Jul 5, 2022 at 3:14 PM Mateo Velásquez-Giraldo < ***@***.***> wrote:
This PR adds a simple wrapper for multilinear interpolators from
econforge.interpolation.
#1136 <#1136> had some progress on
this, but I believe the person in charge is no longer working on HARK. In
addition, my simple class works for any dimension (linear, bilinear,
trilinear); I've added tests that show how to use it and compare its output
with HARK's current classes.
I was careful to also check for distance metrics, which might not seem
important, but are what determines when to stop when solving an infinite
horizon problem. My objects yield the same distance metrics as
LinearInterp and BilinearInterp.
- 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.
------------------------------
You can view, comment on, or merge this pull request online at:
#1151
Commit Summary
- 3881fa8
<3881fa8>
Initial linear interpolator
- b4ad3ff
<b4ad3ff>
Fix filename
- 2e569b1
<2e569b1>
Tests comparing with linearinterp
- 1742fe7
<1742fe7>
Bilinear tests
- f12e35e
<f12e35e>
Add basic multilinear interpolator with decay
- 55b6c1e
<55b6c1e>
Add gradient option
- 22eb3a1
<22eb3a1>
Compute and use the gradients
- 91dccd0
<91dccd0>
Merge branch 'master' into JMP/econforgeinterp
- 4b2b795
<4b2b795>
Merge branch 'master' into JMP/econforgeinterp
- c88afab
<c88afab>
Add basic econforge wrapper
File Changes
(2 files <https://github.com/econ-ark/HARK/pull/1151/files>)
- *A* HARK/econforgeinterp.py
<https://github.com/econ-ark/HARK/pull/1151/files#diff-ce245ccf35468b529a4d73247ba2cc310470d788163baea7594b1bd5e9cb58a6>
(32)
- *A* HARK/tests/test_econforgeinterp.py
<https://github.com/econ-ark/HARK/pull/1151/files#diff-597d7753ee1bca8ef4f78ec15b6f044136022a94fb4776feec90fb7144ea4ea3>
(139)
Patch Links:
- https://github.com/econ-ark/HARK/pull/1151.patch
- https://github.com/econ-ark/HARK/pull/1151.diff
—
Reply to this email directly, view it on GitHub
<#1151>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAKCK75UNODKKG6TMJ2X5LDVSSCSDANCNFSM52XGNL7Q>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
--
Sent from Gmail Mobile
|
@Mv77 I think PR #1136 is different in the following respects:
But it is incomplete, and it doesn't have the clear advantage of yours, which is the multidimensional interpolator. |
I agree, this is great work and I'll go ahead and merge it! |
|
This PR adds a simple wrapper for multilinear interpolators from
econforge.interpolation
.#1136 had some progress on this, but I believe the person in charge is no longer working on HARK. In addition, my simple class works for any dimension (linear, bilinear, trilinear); I've added tests that show how to use it and compare its output with HARK's current classes.
I was careful to also check for
distance metrics
, which might not seem important, but are what determines when to stop when solving an infinite horizon problem. My objects yield the same distance metrics asLinearInterp
andBilinearInterp
.