pymc-devs / pymc-experimental

https://pymc-experimental.readthedocs.io
Other
72 stars 46 forks source link

Fix initial state size in CycleComponent #288

Closed jessegrabowski closed 6 months ago

jessegrabowski commented 6 months ago

Closes #281 Closes #289

The CycleComponent should have 2 states -- [cycle_sin, cycle_cos], and associated dims. I had incorrectly assigned it only a single initial state, so the cosine component was forced to always be zero at initialization.

In addition, model.param_dims will now correctly return named dims for the cycle initial state.

Adds a test of model initial states against statsmodels to catch issues like this in the future.