akelleh / causality

Tools for causal analysis
MIT License
1.06k stars 128 forks source link

Transition to PyMC3 #41

Closed frmsaul closed 5 years ago

frmsaul commented 6 years ago

Hi, Are there any plans to transition to pymc3? I'v noticed that pymc is somewhat old and doesn't have a lot of development going for it, yet pymc3 provides new features and serious performance boost. How difficult would it be to transition from pymc to pymc3?

Saul

akelleh commented 6 years ago

Shouldn't be hard! I've been planning on it. I haven't had much time to work on it lately, but feel free to contribute a branch!

frmsaul commented 6 years ago

Sounds good, Ill give it a shot this weekend. Btw, this is a really cool library, thanks for creating it.

akelleh commented 6 years ago

Glad you like it!

frmsaul commented 6 years ago

Hi,

I took a look at the code, and it seems that moving to pymc3 might require a little more work than I initially thought. The main reasons are that pymc3 doesn't have the stochastic decorator and that causality tests don't cover the statements that interface with pymc. Ill try to write some tests for it later this weekend, so we can do the transition without worries. Let me know if you have any pointers to writing good tests for that. Here is a test coverage report for the file that interfaces with pymc independence_tests.py

For now, I submitted a pull request updating the versions for all the other packages used.

akelleh commented 6 years ago

Sounds great! I seem to remember running into that issue before when I was playing around with pymc3 and thinking of upgrading. It'd be great if you sorted it out!

Your changes look good so far. There was one that needs to be reverted (for efficiency).

Thanks for contributing!!!

Best, A

On Fri, Oct 13, 2017 at 10:22 PM, Saul Fuhrmann notifications@github.com wrote:

Hi,

I took a look at the code, and it seems that moving to pymc3 might require a little more work than I initially thought. The main reasons are that pymc3 doesn't have the stochastic decorator and that causality tests don't cover the statements that interface with pymc. Ill try to write some tests for it later this weekend, so we can do the transition without worries. Let me know if you have any pointers to writing good tests for that. Here is a test coverage report for the file that interfaces with pymc independence_tests.py https://s3-us-west-2.amazonaws.com/test-coverage-saulf/causality_inference_independence_tests___init___py.html

For now, I submitted a pull request updating the versions for all the other packages used.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/akelleh/causality/issues/41#issuecomment-336603266, or mute the thread https://github.com/notifications/unsubscribe-auth/ABrkQIKyGJm_WZa4E2DbKiBS6rysTMJQks5ssBrMgaJpZM4P16ql .

--

Adam Kelleher | BuzzFeed | Principal Data Scientist | (843) 737-1257 | tw: @akelleh | github: akelleh

111 East 18th St., NY, NY 10003

1 Most Innovative Company In The World – Fast Company

http://www.fastcompany.com/3056057/most-innovative-companies/buzzfeed-for-shaking-up-media-across-the-globe

akelleh commented 5 years ago

Updating: pymc3 is incompatible with the statsmodels kernel regression, so I'm removing the mixed independence tests, which are the only portion of the package that uses pymc 2. That'll let me get rid of that dependency, and we can upgrade to pymc3 for future features. I'll reimplement mixed variable type independence tests if/when there's a compatible kernel density estimator, or pymc removes the theano dependence (I think that's planned for pymc4)