luke14free / pm-prophet

GAM timeseries modeling with auto-changepoint detection. Inspired by Facebook Prophet and implemented in PyMC3
325 stars 42 forks source link

Example code not working in Python 2.7 #7

Closed danna-naser closed 5 years ago

danna-naser commented 5 years ago

I am trying to reproduce the example using example_wp_log_peyton_manning.csv with Python 2.7. I have all of the correct dependencies from the requirements file, but I keep getting the error

ValueError: Mass matrix contains zeros on the diagonal. 
The derivative of RV `intercept_model`.ravel()[0] is zero.
The derivative of RV `changepoints_model`.ravel()[0] is zero.
The derivative of RV `seasonality_model`.ravel()[2] is zero.
The derivative of RV `seasonality_model`.ravel()[3] is zero.
The derivative of RV `seasonality_model`.ravel()[4] is zero.
The derivative of RV `seasonality_model`.ravel()[5] is zero.
The derivative of RV `sigma_model_log__`.ravel()[0] is zero.

The code I used is attached with references to matplotlib removed test.txt with versions: theano == 1.0.3 numpy == 1.15.3 pandas == 0.23.4 pymc3 == 3.5

luke14free commented 5 years ago

are you using MAP initialization? what sampler are you using? thanks

danna-naser commented 5 years ago

I'm not using MAP initialization and the issue seems to only be with method='NUTS'

luke14free commented 5 years ago

Uhm, I can't reproduce this. This is what I get with python 2: https://gist.github.com/luke14free/54a66febb676dce3aaebdac3e5c48823

Looks like a pymc/theano issue.. What OS are you on?

danna-naser commented 5 years ago

I'm on Linux. What versions of pymc3 and theano are you using? Thank you!

luke14free commented 5 years ago

I created a new environment and installed the requirements.txt, but here it is: https://gist.github.com/luke14free/5a408d07376339edb85080021eeac0de

are you using jupyter? if yes have you tried executing the script via regular python?

luke14free commented 5 years ago

Closing this as I can't reproduce it and the discussion become idle. Feel free to reopen it if you have more information :)