EconForge / interpolation.py

BSD 2-Clause "Simplified" License
123 stars 35 forks source link

Albop/interp #23

Closed albop closed 6 years ago

albop commented 6 years ago

@chrishyland, @spvdchachan, @jstac I implemented a first version of the multilinear routines we talked about in https://github.com/EconForge/interpolation.py/issues/22 . There are call examples in https://github.com/EconForge/interpolation.py/blob/albop/interp/examples/example_mlinterp.py and some tests in https://github.com/EconForge/interpolation.py/blob/albop/interp/interpolation/multilinear/tests/test_multilinear.py

@denfromufa: you might be interested too as you requested it in issue #7 . @JeppeDruedahl

It would be great if you could have a look and see whether it fits your needs and/or gives consistent results. Any help with the tests or the documentation would be really appreciated (an example notebook is also a good idea).

If nobody finds a bug in the next days, I plan to merge in master and do a release soon. Additional docs and tests can then be done as PR on mastr.

Random remarks:

chrishyland commented 6 years ago

Hi @albop Thank you for doing that. Code looks great! I'll be able to review it more thoroughly after class today.

albop commented 6 years ago

Just removed the limit d<=2 for nonuniform multilinear interpolation.

chrishyland commented 6 years ago

Code looks great Pablo! Very keen to try it out.

jstac commented 6 years ago

Thanks @albop! Sorry to be late to the party. I was tied up with a few short deadlines and my inbox was left to go crazy.

I'm super pleased to have these new routines. I'm teaching dynamic programming at NYU this fall and I'll get all the students using these routines so they get a good workout.

The other thing is that we'll now start to numba-fy the dynamic programming part of the QuantEcon lectures:

https://lectures.quantecon.org/py/index_dynamic_programming.html

The previously missing pieces of the puzzle were jitted optimization and jitted interpolation...

@QBatista It would be great if we could work on this together while you are in NYC.

PS @chrishyland and @spvdchachan started thinking about how to jit compile some of the DP lectures and might be willing to share their thoughts when we get started.

albop commented 6 years ago

Cool. Now there should be updated versions both on pip and conda. In the near future my plans look a bit like yours, with more work on interpolation and some on optimization. I have some ideas there and will expose them before starting.